Skip to content

Commit 8e00eef

Browse files
authored
fix(chat): Use shell icon in shell command header (#6974)
Remove static response string for shell command reject ## Problem - Use shell icon in shell command header - Remove static response string for shell command reject ## Solution ![image](https://github.com/user-attachments/assets/d67b87c5-b103-4b84-a9ba-e08ed457b1d4) --- - 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 e9cfe3a commit 8e00eef

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

packages/core/src/amazonq/webview/ui/apps/cwChatConnector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ export class Connector extends BaseConnector {
361361
break
362362
case 'run-shell-command':
363363
answer.header = {
364-
icon: 'code-block' as MynahIconsType,
364+
icon: 'shell' as MynahIconsType,
365365
body: 'shell',
366366
status: {
367367
icon: 'ok' as MynahIconsType,
@@ -372,7 +372,7 @@ export class Connector extends BaseConnector {
372372
break
373373
case 'reject-shell-command':
374374
answer.header = {
375-
icon: 'code-block' as MynahIconsType,
375+
icon: 'shell' as MynahIconsType,
376376
body: 'shell',
377377
status: {
378378
icon: 'cancel' as MynahIconsType,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,10 +812,7 @@ export class ChatController {
812812
getLogger().error(
813813
`toolUse name: ${currentToolUse!.name} of toolUseWithError in the stored session doesn't match when click shell command reject button.`
814814
)
815-
return
816815
}
817-
818-
await this.generateStaticTextResponse('reject-shell-command', triggerId)
819816
}
820817

821818
private async processCustomFormAction(message: CustomFormActionMessage) {

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,7 @@ import { AsyncEventProgressMessage } from '../../../../amazonq/commons/connector
6969
import { localize } from '../../../../shared/utilities/vsCodeUtils'
7070
import { getDiffLinesFromChanges } from '../../../../shared/utilities/diffUtils'
7171

72-
export type StaticTextResponseType =
73-
| 'quick-action-help'
74-
| 'onboarding-help'
75-
| 'transform'
76-
| 'help'
77-
| 'reject-shell-command'
72+
export type StaticTextResponseType = 'quick-action-help' | 'onboarding-help' | 'transform' | 'help'
7873

7974
export type MessengerResponseType = {
8075
$metadata: { requestId?: string; httpStatusCode?: number }
@@ -555,7 +550,7 @@ export class Messenger {
555550
},
556551
]
557552
header = {
558-
icon: 'code-block' as MynahIconsType,
553+
icon: 'shell' as MynahIconsType,
559554
body: 'shell',
560555
buttons,
561556
}
@@ -676,10 +671,6 @@ export class Messenger {
676671
]
677672
followUpsHeader = 'Try Examples:'
678673
break
679-
case 'reject-shell-command':
680-
// need to update the string later
681-
message = 'The shell command execution rejected. Abort.'
682-
break
683674
}
684675

685676
this.dispatcher.sendChatMessage(

0 commit comments

Comments
 (0)