Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/core/src/amazonq/webview/ui/apps/cwChatConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export class Connector extends BaseConnector {
break
case 'run-shell-command':
answer.header = {
icon: 'code-block' as MynahIconsType,
icon: 'shell' as MynahIconsType,
body: 'shell',
status: {
icon: 'ok' as MynahIconsType,
Expand All @@ -372,7 +372,7 @@ export class Connector extends BaseConnector {
break
case 'reject-shell-command':
answer.header = {
icon: 'code-block' as MynahIconsType,
icon: 'shell' as MynahIconsType,
body: 'shell',
status: {
icon: 'cancel' as MynahIconsType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -812,10 +812,7 @@ export class ChatController {
getLogger().error(
`toolUse name: ${currentToolUse!.name} of toolUseWithError in the stored session doesn't match when click shell command reject button.`
)
return
}

await this.generateStaticTextResponse('reject-shell-command', triggerId)
}

private async processCustomFormAction(message: CustomFormActionMessage) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@ import { AsyncEventProgressMessage } from '../../../../amazonq/commons/connector
import { localize } from '../../../../shared/utilities/vsCodeUtils'
import { getDiffLinesFromChanges } from '../../../../shared/utilities/diffUtils'

export type StaticTextResponseType =
| 'quick-action-help'
| 'onboarding-help'
| 'transform'
| 'help'
| 'reject-shell-command'
export type StaticTextResponseType = 'quick-action-help' | 'onboarding-help' | 'transform' | 'help'

export type MessengerResponseType = {
$metadata: { requestId?: string; httpStatusCode?: number }
Expand Down Expand Up @@ -555,7 +550,7 @@ export class Messenger {
},
]
header = {
icon: 'code-block' as MynahIconsType,
icon: 'shell' as MynahIconsType,
body: 'shell',
buttons,
}
Expand Down Expand Up @@ -676,10 +671,6 @@ export class Messenger {
]
followUpsHeader = 'Try Examples:'
break
case 'reject-shell-command':
// need to update the string later
message = 'The shell command execution rejected. Abort.'
break
}

this.dispatcher.sendChatMessage(
Expand Down
Loading