File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -104,22 +104,22 @@ func removeAmpMessageBox(msg string) string {
104104func removeClaudeReportTaskToolCall (msg string ) string {
105105 // If we encounter a line starting with `● coder - coder_report_task (MCP)` -- to {
106106 lines := strings .Split (msg , "\n " )
107- toolCallMarkerIdx := - 1
107+ toolCallEndIdx := - 1
108108 toolCallStartIdx := - 1
109109 for i := len (lines ) - 1 ; i >= 0 ; i -- {
110110 line := strings .TrimSpace (lines [i ])
111111 if strings .HasPrefix (line , "● coder - coder_report_task (MCP)" ) {
112- toolCallMarkerIdx = i
113- }
114- if toolCallMarkerIdx != - 1 && line == "{" {
115112 toolCallStartIdx = i
113+ }
114+ if toolCallStartIdx != - 1 && line == "{" {
115+ toolCallEndIdx = i
116116 break
117117 }
118118 }
119119 // If we didn't find the marker, return the original message
120- if toolCallMarkerIdx == - 1 {
120+ if toolCallEndIdx == - 1 {
121121 return msg
122122 }
123123 // Remove from the opening brace to the marker line (inclusive)
124- return strings .Join (append (lines [:toolCallStartIdx ], lines [toolCallMarkerIdx + 1 :]... ), "\n " )
124+ return strings .Join (append (lines [:toolCallStartIdx ], lines [toolCallEndIdx + 1 :]... ), "\n " )
125125}
You can’t perform that action at this time.
0 commit comments