Dedupe strings in tf-idf index & include exactLabelMatch
in runCommand
in smoke tests
#195085
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #194909
This bug was causing things to get a higher score than they deserved.
Also, in order to get the smoke tests to pass this also introduces a new
exactLabelMatch
property torunCommand
.Full Context
The smoke tests install some extensions and they type
workbench.extensions.action.focusExtensionsView
into the Command Palette which causes a certain command to show up that puts focus in the extension view so the extensions can be installed.the
runCommand
had retry logic and would pick the first result of the quick pick regardless of what it is.Previously, if you were to type something like a command name (
workbench.extensions.action.focusExtensionsView
), chances are it wouldn’t match any command except for the one command with that id…if there were no results, it was because the command wasn’t registered yet…so because of the retry logic, that eventually would work as we wait for VS Code to actually register that command.but with the similar commands feature, now things start to match in cases it didn’t match previously… and in this case, it’s matching things on the first try because those commands are actually registered when the one we’re actually looking for isn’t registered yet.
Before my fix to TF-IDF chunking
'workbench.extensions.action.focusExtensionsView'
still matched nothing in TF-IDF (similar commands)… so the tests still pass… but once I tweaked the TF-IDF chunk, suddenly things were matching… and that caused the smoke test to fail.I had 5 ideas for fixing this:
Smoke Test change ideas:
Command Palette change ideas:
@id:
prefix (similar in the Extension Pane) in the command palette that will look up the command id and do nothing elseExtension change ideas:
This is the first one on the list since it's the most straightforward.