Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Feb 1, 2025

Description

I took a look at how Continue implements their ⌘L and ⌘I keybindings, 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 ⌘L and ⌘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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

Related Issues

Reviewers


Important

Refactor extension activation by modularizing URI handling, command registration, and code actions into separate files for improved structure.

  • Modularization:
    • Split extension activation logic into handleUri.ts, registerCommands.ts, and registerCodeActions.ts.
    • index.ts exports functions from the new modules.
  • Extension Activation:
    • extension.ts now uses handleUri, registerCommands, and registerCodeActions from activate.
  • Code Actions:
    • COMMAND_IDS in CodeActionProvider.ts is exported for use in registerCodeActions.ts.
  • Command Registration:
    • registerCommands.ts handles command registration, including opening new tabs and button clicks.
  • URI Handling:
    • handleUri.ts processes URIs for /glama and /openrouter paths.

This description was created by Ellipsis for aa806fd. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Feb 1, 2025

⚠️ No Changeset found

Latest commit: aa806fd

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cte cte merged commit a568577 into main Feb 1, 2025
7 checks passed
@cte cte deleted the cte/activation-cleanup branch February 1, 2025 16:39
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.

3 participants