Extension activation cleanup #702
Merged
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.
Description
I took a look at how Continue implements their
⌘Land⌘Ikeybindings, and it's pretty interesting (and very doable). When I started to implement it I found that it was helpful to start structuring our extension a bit more like Continue does. To that end, I copied some of the extension activation conventions, and this sets me up to add new commands for⌘Land⌘I.The integration tests already assert that we're correctly registering commands, so this should be a safe change.
For reference, here is Continue's command registration module:
Type of change
How Has This Been Tested?
Checklist:
Additional context
Related Issues
Reviewers
Important
Refactor extension activation by modularizing URI handling, command registration, and code actions into separate files for improved structure.
handleUri.ts,registerCommands.ts, andregisterCodeActions.ts.index.tsexports functions from the new modules.extension.tsnow useshandleUri,registerCommands, andregisterCodeActionsfromactivate.COMMAND_IDSinCodeActionProvider.tsis exported for use inregisterCodeActions.ts.registerCommands.tshandles command registration, including opening new tabs and button clicks.handleUri.tsprocesses URIs for/glamaand/openrouterpaths.This description was created by
for aa806fd. It will automatically update as commits are pushed.