@@ -88,9 +88,19 @@ describe("detectToolCallIssues", () => {
8888 it ( "中间穿插其他工具但 execute_script 仍然连续 null 时触发" , ( ) => {
8989 const history : ToolCallRecord [ ] = [
9090 { name : "execute_script" , args : '{"code":"a()"}' , result : '{"result":null}' , iteration : 1 } ,
91- { name : "get_tab_content" , args : '{"tab_id":1,"prompt":"find buttons"}' , result : "page content..." , iteration : 2 } ,
91+ {
92+ name : "get_tab_content" ,
93+ args : '{"tab_id":1,"prompt":"find buttons"}' ,
94+ result : "page content..." ,
95+ iteration : 2 ,
96+ } ,
9297 { name : "execute_script" , args : '{"code":"b()"}' , result : '{"result":null}' , iteration : 3 } ,
93- { name : "get_tab_content" , args : '{"tab_id":1,"prompt":"check state"}' , result : "page content..." , iteration : 4 } ,
98+ {
99+ name : "get_tab_content" ,
100+ args : '{"tab_id":1,"prompt":"check state"}' ,
101+ result : "page content..." ,
102+ iteration : 4 ,
103+ } ,
94104 { name : "execute_script" , args : '{"code":"c()"}' , result : '{"result":null}' , iteration : 5 } ,
95105 ] ;
96106 const warning = detectToolCallIssues ( history ) ;
0 commit comments