Skip to content

Commit d636449

Browse files
fix(chat): Add Undo clickable button and string change (aws#7051)
## Problem The Ux design does not meet the requirement ## Solution Make the undo a clickable button and change the string when user reject the generated code ![image](https://github.com/user-attachments/assets/53bf59e8-ffc6-45ba-9944-236e4e3bae69) --- - 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 5dac164 commit d636449

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ export class Connector extends BaseConnector {
394394
if (answer.header) {
395395
answer.header.status = {
396396
icon: 'cancel' as MynahIconsType,
397-
text: 'Rejected',
397+
text: 'Change discarded',
398398
status: 'error',
399399
}
400400
answer.header.buttons = []

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

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ import {
5353
MynahIconsType,
5454
DetailedList,
5555
MynahUIDataModel,
56-
MynahIcons,
57-
Status,
5856
} from '@aws/mynah-ui'
5957
import { Database } from '../../../../shared/db/chatDb/chatDb'
6058
import { TabType } from '../../../../amazonq/webview/ui/storages/tabsStorage'
@@ -810,25 +808,12 @@ export class Messenger {
810808
{
811809
id: 'reject-code-diff',
812810
status: 'clear',
813-
icon: 'cancel' as MynahIconsType,
811+
icon: 'revert' as MynahIconsType,
812+
text: 'Undo',
814813
},
815814
]
816-
const status: {
817-
icon?: MynahIcons | MynahIconsType
818-
status?: {
819-
status?: Status
820-
icon?: MynahIcons | MynahIconsType
821-
text?: string
822-
}
823-
} = {
824-
status: {
825-
text: 'Accepted',
826-
status: 'success',
827-
},
828-
}
829815
header = {
830816
buttons,
831-
...status,
832817
fileList,
833818
}
834819
} else if (toolUse?.name === ToolType.ListDirectory || toolUse?.name === ToolType.FsRead) {

0 commit comments

Comments
 (0)