-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect language detection leads to annoying recommendation #143901
Comments
Related to this, I also get C++ guessed if I open a new untitled file and type:
yes just one character. I was attempting to type For my issue, maybe we wait for like 5 characters at least? |
I put my comment in a new issue since I think they're not going to require the same fix. |
Added a minimum amount of text used when guessing which might help here. Getting a confidence score out of the model is a better fix. I wonder if we should revisit how we prompt for ext recommendations in untitled files. A "This Looks Like C++, Would you like to install relevant extensions? Yes / No / Not C++ " would be good for analysis of model performance as well. |
I wonder if we should be prompting at all in this case. If the user isn't even saving the file yet, do we really think they want to install extensions? |
Yeah I thought about that as well, I'd be fine not showing ext installs for Untitled files. @digitarald what do you think? |
Agreed, not showing it for untitled buffers makes sense – until they saved it. |
I don't know... I feel conflicted. As a new user to VS Code, I might:
The language detection was to help new users be on that happy path and if we take away that notification, I'm afraid they won't get guided enough down that path. Now maybe turning the notification into something less aggressive... or perhaps delaying the notification for some amount of time... that might be a happy medium. |
Usertesting showed a lot of confusion with untitled buffers and not getting rich language features, so I agree with @TylerLeonhardt's argument. As far as I understand: The model does bias against recently used file types ↪ Detected file types are likely to have been opened before ↪ So the get=the-extension=for-this-type recommendation might not be that common. Is that right? |
@digitarald @TylerLeonhardt I'm skeptical, but only because I don't think I have all the information. Not getting rich language features in an untitled buffer where you've never saved a single cpp file seems like a reasonable scenario. Not getting rich language features when you have used c++ in the past and installed the extension but we didn't detect the language is more confusing. If this is a new user doing their homework, they are going to need to save this file to run it, at least without some extension installed which implies they already know a bit about how things work in VS Code. I feel like save is the right signal for showing extension recommendations. |
About ~1 yr ago, @isidorn added a "save on run" feature. The intent (my understanding) is that this was added because a lot of new users were "running" untitled files without saving them to an actual concrete file and extensions were having to handle this case (and some weren't causing confusion to the user). This was mostly the case because new users weren't quite grasping that an untitled file wasn't a real file on disk. Maybe @isidorn has some thoughts on this |
I think save on run is equally valid for files on disk -- if you don't have autosave enabled it's easy to make a change and run without saving in between then get stuck in a undesirable "why aren't my changes doing anything" state. |
That being said, I'm looking into gauging model confidence this iteration, so I could see a situation where we only show popups when the model is very confident (or the language was explicitly selected). |
I don't know if we can assume they get that far. |
@TylerLeonhardt correct, we added a sev on run for what you pointed out. I like the flow of untitled file -> language is auto detected -> recommendation is shown. I think it is smooth for new users. |
The model now has some better confidence heuristics built in. |
Testing #143576
Typing out manually
The text was updated successfully, but these errors were encountered: