Skip to content

Commit 116cc77

Browse files
committed
Support multi file code diff POC
1 parent 24e8895 commit 116cc77

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,9 +819,10 @@ export class ChatController {
819819
await this.handleCreatePrompt(message)
820820
break
821821
case 'accept-code-diff':
822+
await this.closeDiffView()
823+
break
822824
case 'confirm-tool-use':
823825
case 'generic-tool-execution':
824-
await this.closeDiffView()
825826
await this.processToolUseMessage(message)
826827
break
827828
case 'reject-code-diff':

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,11 @@ export class Messenger {
242242
const chatStream = new ChatStream(this, tabID, triggerID, toolUse, validation, changeList)
243243
await ToolUtils.queueDescription(tool, chatStream)
244244

245-
if (!validation.requiresAcceptance) {
246-
// Need separate id for read tool and safe bash command execution as 'confirm-tool-use' id is required to change button status from `Confirm` to `Confirmed` state in cwChatConnector.ts which will impact generic tool execution.
247-
this.dispatcher.sendCustomFormActionMessage(
248-
new CustomFormActionMessage(tabID, {
249-
id: 'generic-tool-execution',
250-
})
251-
)
252-
}
245+
this.dispatcher.sendCustomFormActionMessage(
246+
new CustomFormActionMessage(tabID, {
247+
id: 'generic-tool-execution',
248+
})
249+
)
253250
} else {
254251
// TODO: Handle the error
255252
}

0 commit comments

Comments
 (0)