Skip to content
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

Initial attempt to support editor commands #194849

Closed
wants to merge 5 commits into from

Conversation

TylerLeonhardt
Copy link
Member

This depends on #193937 and would allow Editor Commands' descriptions to be picked up in the TF-IDF indexing of commands.

The problem I currently struggle with is what to do with this introduction of ICommandMetadata... do we want to add it to monaco? Do we want to add maybe a subset of it (just the description property)?

Additionally, I noticed that the concept of a LocalizedString isn't a thing in the monaco API... so that would be another thing to introduce.

Should we add these types? Or should we have description be a string and then use that instead?

This does a few things in a few strategic commits:

### Commit 1

The first commit contains the actual functional changes.
* In our TF-IDF implementation in the Command Palette we now consume command's description if available. This will help provide more hits in the similar commands category section of the Command Palette. To do this we now include the description in the MenuItem which is needed by the Command Palette.
* It allows Allows `description` to be an `ILocalizedString` so that we can include both the translated & original strings in the TF-IDF calculation
This depends on #193937 and would allow Editor Commands' descriptions to be picked up in the TF-IDF indexing of commands.

The problem I currently struggle with is what to do with this introduction of `ICommandMetadata`... do we want to add it to monaco? Do we want to add maybe a subset of it (just the description property)?

Additionally, I noticed that the concept of a LocalizedString isn't a thing in the monaco API... so that would be _another_ thing to introduce.

Should we add these types? Or should we have `description` be a `string` and then use that instead?
@TylerLeonhardt TylerLeonhardt self-assigned this Oct 4, 2023
@@ -53,7 +53,7 @@ class SelectToBracketAction extends EditorAction {
alias: 'Select to Bracket',
precondition: undefined,
metadata: {
description: `Select to Bracket`,
description: nls.localize2('smartSelect.selectToBracketDescription', "Select the text inside and including the brackets or curly braces"),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an example

Base automatically changed from tyler/icy-walrus to main October 5, 2023 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant