File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
packages/core/src/codewhispererChat/controllers/chat Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -803,6 +803,18 @@ export class ChatController {
803803 type : 'chat_message' ,
804804 context : undefined ,
805805 } )
806+
807+ const session = this . sessionStorage . getSession ( message . tabID ! )
808+ const currentToolUse = session . toolUseWithError ?. toolUse
809+ if ( currentToolUse && currentToolUse . name === ToolType . ExecuteBash ) {
810+ session . toolUseWithError . error = new Error ( 'Tool use was rejected by the user.' )
811+ } else {
812+ getLogger ( ) . error (
813+ `toolUse name: ${ currentToolUse ! . name } of toolUseWithError in the stored session doesn't match when click shell command reject button.`
814+ )
815+ return
816+ }
817+
806818 await this . generateStaticTextResponse ( 'reject-shell-command' , triggerId )
807819 }
808820
@@ -824,6 +836,7 @@ export class ChatController {
824836 break
825837 case 'reject-shell-command' :
826838 await this . rejectShellCommand ( message )
839+ await this . processToolUseMessage ( message )
827840 break
828841 default :
829842 getLogger ( ) . warn ( `Unhandled action: ${ message . action . id } ` )
You can’t perform that action at this time.
0 commit comments