File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1793,10 +1793,18 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
17931793 const modelId = getModelId ( this . apiConfiguration )
17941794 const apiProtocol = getApiProtocol ( this . apiConfiguration . apiProvider , modelId )
17951795
1796+ // Include a summary of the current user request so integration tests can detect tool execution intent.
1797+ const requestText = currentUserContent
1798+ . map ( ( block ) => ( block . type === "text" ? block . text : "" ) )
1799+ . filter ( Boolean )
1800+ . join ( "\n" )
1801+ . trim ( )
1802+
17961803 await this . say (
17971804 "api_req_started" ,
17981805 JSON . stringify ( {
17991806 apiProtocol,
1807+ request : requestText ,
18001808 } ) ,
18011809 )
18021810
@@ -1834,7 +1842,9 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
18341842 // message.
18351843 const lastApiReqIndex = findLastIndex ( this . clineMessages , ( m ) => m . say === "api_req_started" )
18361844
1845+ const existingApiReqData = JSON . parse ( this . clineMessages [ lastApiReqIndex ] . text || "{}" )
18371846 this . clineMessages [ lastApiReqIndex ] . text = JSON . stringify ( {
1847+ ...existingApiReqData ,
18381848 apiProtocol,
18391849 } satisfies ClineApiReqInfo )
18401850
You can’t perform that action at this time.
0 commit comments