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

Command: register missing commands when unifiedPrompts is enabled #5768

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Oct 1, 2024

CLOSE https://linear.app/sourcegraph/issue/QA-81

Currently, some commands unrelated to the chat commands are not registered when unified prompts feature is enabled, which I believe is unintentional.

This PR add some documentations around some cody commands, and refactor the logic to make it clear what the new unified prompts commands are during the command registeration.

This PR also fixes the issue where the generate unit test command was unintentionally removed when the unified prompts feature is enabled.

Test plan

Manual Testing: Sign into S2 where the feature flag is enabled for all users.

image

  1. In the Cody Commands menu, search for the following commands to make sure they are working:
  • Auto Edit
  • Generate Unit Test
  1. Open the Terminal panel and highlight some text, right click to select "Ask Cody to Explain" to verify a Chat panel is opened with the selected text appended.

image

Before this change, none of these commands were working because they were not registered when the unified prompts feature flag is enabled.

Changelog

Command: Fixed an issue where some commands (Auto-Edit and Cody Explain Terminal Output) were not registered when the unified prompt feature flag is enabled.

Currently, some commands unrelated to the chat commands are not registered when unified prompts feature is enabled, which I believe is unintentional.

This PR add some documentations around some cody commands, and refactor the logic to make it clear what the new unified prompts commands are during the command registeration.

This PR also fixes the issue where the generate unit test command was unintentionally removed when the unified prompts feature is enabled.
@abeatrix abeatrix requested review from vovakulikov and a team October 1, 2024 13:26
executeAutoEditCommand(a)
),
]
? [...chatCommands, ...editCommands, ...unifiedPromptsCommands]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vovakulikov we are currently registering all the chat commands and edit commands when the feature flag is enabled -- am I understanding this correctly?


disposable.push(
// Command that sends the selected output from the Terminal panel to Cody Chat for explanation.
vscode.commands.registerCommand('cody.command.explain-output', a => executeExplainOutput(a)),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i've seperated these commands out to make sure they will always be registered as they are unrelated to the current chat and edit commands

@abeatrix abeatrix changed the title Command: (fix) register missing commands when unifiedPrompts is enabled Command: register missing commands when unifiedPrompts is enabled Oct 1, 2024
@abeatrix abeatrix merged commit 7473517 into main Oct 1, 2024
18 of 20 checks passed
@abeatrix abeatrix deleted the bee/fix-prompts-commands branch October 1, 2024 15:06
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.

2 participants