-
Notifications
You must be signed in to change notification settings - Fork 341
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
feat(amazonq): add commands to command palette #4965
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"toggle auto-suggestions" would be another good one to have in the palette
47c4bbb
to
4095ecd
Compare
4095ecd
to
a0eb8b9
Compare
DemoScreen.Recording.2024-05-26.at.7.44.00.PM.movMetrics
|
a0eb8b9
to
764d5ad
Compare
314f0ae
to
5234f57
Compare
Screen.Recording.2024-05-29.at.2.34.05.PM.mov |
packages/amazonq/package.json
Outdated
"enablement": "aws.codewhisperer.connected" | ||
}, | ||
{ | ||
"command": "aws.amazonq.toggleCodeSuggestion.commandPalette", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, we can avoid these .commandPalette
cases and re-use the existing commands.
Setting source
may require some thought, but it's less important than avoiding lots of duplicate command defininitions.
isSuggestionsEnabled | ||
? void showTimedMessage('Amazon Q: Auto-Suggestions are currently running.', MessageTimeOut) | ||
: void showTimedMessage('Amazon Q: Auto-Suggestions are currently paused.', MessageTimeOut) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using a ternary may be clearer and less verbose
void showTimedMessage(`... ${isSuggestionsEnabled ? ... : ...}`)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this kind of message is probably more appripriate as a status message rather than a popup
5234f57
to
bec44f1
Compare
TODO:
|
b73cecf
to
10c01f7
Compare
@@ -93,6 +107,12 @@ export const toggleCodeScans = Commands.declare( | |||
}) | |||
|
|||
await vscode.commands.executeCommand('aws.amazonq.refreshStatusBar') | |||
void showTimedMessage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void showTimedMessage( | |
void vscode.window.setStatusBarMessage( |
export const firstStartUpSource = ExtStartUpSources.firstStartUp | ||
/** Indicates a CodeWhisperer command was executed as a result of selecting an ellipses menu item */ | ||
export const cwEllipsesMenu = 'ellipsesMenu' | ||
/** Indicates a CodeWhisperer command was executed from the command palette */ | ||
export const commandPalette = 'commandPalette' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all of these constants should live in packages/core/src/shared/telemetry/telemetry.ts
or perhaps a new packages/core/src/shared/telemetry/constants.ts
file.
however, that can be done in a separate PR, to unblock this PR.
10c01f7
to
246ea0e
Compare
Commands Added - Amazon Q: Focus on Chat View - Amazon Q: Open Code Reference Log - Amazon Q: Select Customizations - Amazon Q: Toggle Auto-Scans - Amazon Q: Toggle Auto-Suggestions - Amazon Q: Try inline suggestion example - Amazon Q: Sign out Notes: - Amazon Q commands are now displayed when the user is logged in. - Auto-Scans and Select Customizations commands are enabled when the user is not logged in using builder-id
246ea0e
to
06ada04
Compare
Problem
Add commands in Command Palette for Amazon Q to improve feature discoverability
Solution
Commands Added
TODO:
DiscussFromCommandPalette
pattern. -- Discussed offline, this is the right approach. Going forward use the same prefix and add.commandPalette
as suffix.telemetry
/metrics
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.