File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -129,8 +129,20 @@ export async function attemptCompletionTool(
129
129
} )
130
130
131
131
toolResults . push ( ...formatResponse . imageBlocks ( images ) )
132
- cline . userMessageContent . push ( { type : "text" , text : `${ toolDescription ( ) } Result:` } )
133
- cline . userMessageContent . push ( ...toolResults )
132
+
133
+ const newMessage : ( Anthropic . TextBlockParam | Anthropic . ImageBlockParam ) [ ] = [
134
+ { type : "text" , text : `${ toolDescription ( ) } Result:` } ,
135
+ ...toolResults ,
136
+ ]
137
+ if ( cline . apiConfiguration ?. toolCallEnabled === true && block . toolUseId ) {
138
+ cline . userMessageContent . push ( {
139
+ type : "tool_result" ,
140
+ tool_use_id : block . toolUseId ,
141
+ content : newMessage ,
142
+ } )
143
+ } else {
144
+ cline . userMessageContent . push ( ...newMessage )
145
+ }
134
146
135
147
return
136
148
}
You can’t perform that action at this time.
0 commit comments