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 @@ -806,6 +806,18 @@ export class ChatController {
806806 type : 'chat_message' ,
807807 context : undefined ,
808808 } )
809+
810+ const session = this . sessionStorage . getSession ( message . tabID ! )
811+ const currentToolUse = session . toolUseWithError ?. toolUse
812+ if ( currentToolUse && currentToolUse . name === ToolType . ExecuteBash ) {
813+ session . toolUseWithError . error = new Error ( 'Tool use was rejected by the user.' )
814+ } else {
815+ getLogger ( ) . error (
816+ `toolUse name: ${ currentToolUse ! . name } of toolUseWithError in the stored session doesn't match when click shell command reject button.`
817+ )
818+ return
819+ }
820+
809821 await this . generateStaticTextResponse ( 'reject-shell-command' , triggerId )
810822 }
811823
@@ -827,6 +839,7 @@ export class ChatController {
827839 break
828840 case 'reject-shell-command' :
829841 await this . rejectShellCommand ( message )
842+ await this . processToolUseMessage ( message )
830843 break
831844 default :
832845 getLogger ( ) . warn ( `Unhandled action: ${ message . action . id } ` )
You can’t perform that action at this time.
0 commit comments