Skip to content

Commit 721522a

Browse files
committed
fix(amazonq): duplicate quick actions
1 parent d206d3b commit 721522a

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

packages/amazonq/src/lsp/chat/messages.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ export function registerLanguageServerEventListener(languageClient: LanguageClie
5050

5151
const chatOptions = languageClient.initializeResult?.awsServerCapabilities?.chatOptions
5252

53-
// Enable the history/export feature flags
54-
chatOptions.history = true
55-
chatOptions.export = true
53+
// overide the quick action commands provided by flare server initialization, which doesn't provide the group header
54+
if (chatOptions?.quickActions?.quickActionsCommandGroups?.[0]) {
55+
chatOptions.quickActions.quickActionsCommandGroups[0].groupName = 'Quick Actions'
56+
}
5657

5758
provider.onDidResolveWebview(() => {
5859
void provider.webview?.postMessage({

packages/amazonq/src/lsp/chat/webviewProvider.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -116,21 +116,7 @@ export class AmazonQChatViewProvider implements WebviewViewProvider {
116116
const init = () => {
117117
const vscodeApi = acquireVsCodeApi()
118118
const hybridChatConnector = new HybridChatAdapter(${(await AuthUtil.instance.getChatAuthState()).amazonQ === 'connected'},${featureConfigData},${welcomeCount},${disclaimerAcknowledged},${regionProfileString},${disabledCommands},${isSMUS},${isSM},vscodeApi.postMessage)
119-
const commands = [hybridChatConnector.initialQuickActions[0], {
120-
groupName: 'Quick Actions',
121-
commands: [
122-
{
123-
command: '/help',
124-
icon: 'help',
125-
description: 'Learn more about Amazon Q',
126-
},
127-
{
128-
command: '/clear',
129-
icon: 'trash',
130-
description: 'Clear this session',
131-
},
132-
],
133-
}]
119+
const commands = [hybridChatConnector.initialQuickActions[0]]
134120
amazonQChat.createChat(vscodeApi, {disclaimerAcknowledged: ${disclaimerAcknowledged}, quickActionCommands: commands}, hybridChatConnector);
135121
}
136122
</script>

packages/amazonq/src/lsp/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export async function startLanguageServer(
6161
awsClientCapabilities: {
6262
window: {
6363
notifications: true,
64+
showSaveFileDialog: true,
6465
},
6566
},
6667
},

0 commit comments

Comments
 (0)