Skip to content

Commit 9ce08d2

Browse files
authored
fix(amazonq): Fixing bugs for agentic chat (aws#6952)
## Problem - Pair programming features should be restricted to Q Chat but right now its available in other tabs like `/test` - Multiple spinner loading events were causing delayed display of code difference views ## Solution - Improved performance by adding a specific check for 'cwc' tab type - Optimized loading by eliminating redundant spinner events sent to the Mynah UI. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent dfee9f7 commit 9ce08d2

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

packages/core/src/amazonq/webview/ui/tabs/generator.ts

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,26 @@ export class TabDataGenerator {
7272
},
7373
]
7474
: [],
75-
promptInputOptions: [
76-
{
77-
type: 'toggle',
78-
id: 'prompt-type',
79-
value: 'ask',
80-
options: [
81-
{
82-
value: 'pair-programming-on',
83-
icon: 'code-block', // TODO: correct icons
84-
},
85-
{
86-
value: 'pair-programming-off',
87-
icon: 'chat', // TODO: correct icons
88-
},
89-
],
90-
},
91-
],
75+
promptInputOptions:
76+
tabType === 'cwc'
77+
? [
78+
{
79+
type: 'toggle',
80+
id: 'prompt-type',
81+
value: 'ask',
82+
options: [
83+
{
84+
value: 'pair-programming-on',
85+
icon: 'code-block', // TODO: correct icons
86+
},
87+
{
88+
value: 'pair-programming-off',
89+
icon: 'chat', // TODO: correct icons
90+
},
91+
],
92+
},
93+
]
94+
: [],
9295
}
9396
return tabData
9497
}

packages/core/src/codewhispererChat/controllers/chat/messenger/messenger.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,9 +284,7 @@ export class Messenger {
284284
} else {
285285
// TODO: Handle the error
286286
}
287-
} else if (cwChatEvent.toolUseEvent?.stop === undefined && toolUseInput !== '') {
288-
// This is for the case when writing tool is executed. The toolUseEvent is non stop but in toolUseInput is not empty. In this case we need show user the current spinner UI.
289-
this.sendInitalStream(tabID, triggerID, undefined)
287+
// TODO: Add a spinner component for fsWrite, previous implementation is causing lag in mynah UX.
290288
}
291289

292290
if (

0 commit comments

Comments
 (0)