File tree Expand file tree Collapse file tree 6 files changed +266
-374
lines changed
webview-ui/src/components/chat Expand file tree Collapse file tree 6 files changed +266
-374
lines changed Original file line number Diff line number Diff line change @@ -5,4 +5,3 @@ webview-ui/build/
55package-lock.json
66src /core /prompts /system.ts
77src /core /prompts /model_prompts /claude4.ts
8- src /core /prompts /model_prompts /jsonToolToXml.ts
Original file line number Diff line number Diff line change @@ -569,6 +569,15 @@ export function parseAssistantMessageV3(assistantMessage: string): AssistantMess
569569 }
570570 }
571571
572+ if ( currentInvokeName === "Bash" ) {
573+ currentToolUse = {
574+ type : "tool_use" ,
575+ name : "execute_command" ,
576+ params : { } ,
577+ partial : true ,
578+ }
579+ }
580+
572581 continue
573582 }
574583 }
@@ -621,6 +630,14 @@ export function parseAssistantMessageV3(assistantMessage: string): AssistantMess
621630 }
622631 }
623632
633+ if ( currentToolUse && currentInvokeName === "Bash" ) {
634+ if ( currentParameterName === "command" ) {
635+ currentToolUse . params [ "command" ] = value
636+ } else if ( currentParameterName === "requires_approval" ) {
637+ currentToolUse . params [ "requires_approval" ] = value === "true" ? "true" : "false"
638+ }
639+ }
640+
624641 currentParameterName = ""
625642 continue
626643 }
@@ -633,7 +650,7 @@ export function parseAssistantMessageV3(assistantMessage: string): AssistantMess
633650 assistantMessage . startsWith ( isInvokeClose , currentCharIndex - isInvokeClose . length + 1 )
634651 ) {
635652 // If we have a tool use from this invoke, finalize it
636- if ( currentToolUse && ( currentInvokeName === "LS" || currentInvokeName === "Grep" ) ) {
653+ if ( currentToolUse && ( currentInvokeName === "LS" || currentInvokeName === "Grep" || currentInvokeName === "Bash" ) ) {
637654 currentToolUse . partial = false
638655 contentBlocks . push ( currentToolUse )
639656 currentToolUse = undefined
You can’t perform that action at this time.
0 commit comments