Skip to content

Commit 3968f51

Browse files
authored
fix(featureDev): 'Code changes summary' component when only 1 file was updated (#4439)
1 parent 3be1dda commit 3968f51

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

plugins/amazonq/mynah-ui/src/mynah-ui/ui/apps/featureDevChatConnector.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,15 @@ export class Connector {
158158
...messageData.deletedFiles,
159159
])
160160
const answer: ChatItem = {
161-
type: ChatItemType.CODE_RESULT,
161+
type: ChatItemType.ANSWER,
162162
relatedContent: undefined,
163163
followUp: undefined,
164164
canBeVoted: true,
165165
codeReference: messageData.references,
166166
// TODO get the backend to store a message id in addition to conversationID
167167
messageId: messageData.messageID ?? messageData.triggerID ?? messageData.conversationID,
168168
fileList: {
169+
rootFolderTitle: 'Changes',
169170
filePaths: (messageData.filePaths as DiffTreeFileInfo[]).map(path => path.zipFilePath),
170171
deletedFiles: (messageData.deletedFiles as DiffTreeFileInfo[]).map(path => path.zipFilePath),
171172
actions,

plugins/amazonq/mynah-ui/src/mynah-ui/ui/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,9 @@ export const createMynahUI = (ideApi: any, featureDevInitEnabled: boolean, codeT
267267
},
268268
onFileComponentUpdate: (tabID: string, filePaths: DiffTreeFileInfo[], deletedFiles: DiffTreeFileInfo[]) => {
269269
const updateWith: Partial<ChatItem> = {
270-
type: ChatItemType.CODE_RESULT,
270+
type: ChatItemType.ANSWER,
271271
fileList: {
272+
rootFolderTitle: 'Changes',
272273
filePaths: filePaths.map(i => i.zipFilePath),
273274
deletedFiles: deletedFiles.map(i => i.zipFilePath),
274275
details: getDetails(filePaths),

0 commit comments

Comments
 (0)