@@ -111,22 +111,11 @@ describe("SelectActiveIntentTool - Phase 1 End-to-End Test", () => {
111111 )
112112
113113 // Execute: Call select_active_intent
114- const toolUse : ToolUse < "select_active_intent" > = {
115- type : "tool_use" ,
116- id : "tool-1" ,
117- name : "select_active_intent" ,
118- params : { intent_id : "INT-001" } ,
119- }
120-
121- await selectActiveIntentTool . execute (
122- { intent_id : "INT-001" } ,
123- mockTask ,
124- {
125- askApproval : vi . fn ( ) ,
126- handleError : mockHandleError ,
127- pushToolResult : mockPushToolResult ,
128- } ,
129- )
114+ await selectActiveIntentTool . execute ( { intent_id : "INT-001" } , mockTask , {
115+ askApproval : vi . fn ( ) ,
116+ handleError : mockHandleError ,
117+ pushToolResult : mockPushToolResult ,
118+ } )
130119
131120 // Verify: pushToolResult was called with XML context
132121 expect ( mockPushToolResult ) . toHaveBeenCalledTimes ( 1 )
@@ -178,15 +167,11 @@ describe("SelectActiveIntentTool - Phase 1 End-to-End Test", () => {
178167 await fs . writeFile ( tracePath , "" , "utf-8" )
179168
180169 // Execute
181- await selectActiveIntentTool . execute (
182- { intent_id : "INT-002" } ,
183- mockTask ,
184- {
185- askApproval : vi . fn ( ) ,
186- handleError : mockHandleError ,
187- pushToolResult : mockPushToolResult ,
188- } ,
189- )
170+ await selectActiveIntentTool . execute ( { intent_id : "INT-002" } , mockTask , {
171+ askApproval : vi . fn ( ) ,
172+ handleError : mockHandleError ,
173+ pushToolResult : mockPushToolResult ,
174+ } )
190175
191176 // Verify: XML contains "No recent changes" message
192177 const contextXml = mockPushToolResult . mock . calls [ 0 ] [ 0 ]
@@ -261,15 +246,11 @@ describe("SelectActiveIntentTool - Phase 1 End-to-End Test", () => {
261246 )
262247
263248 // Execute: Select INT-001
264- await selectActiveIntentTool . execute (
265- { intent_id : "INT-001" } ,
266- mockTask ,
267- {
268- askApproval : vi . fn ( ) ,
269- handleError : mockHandleError ,
270- pushToolResult : mockPushToolResult ,
271- } ,
272- )
249+ await selectActiveIntentTool . execute ( { intent_id : "INT-001" } , mockTask , {
250+ askApproval : vi . fn ( ) ,
251+ handleError : mockHandleError ,
252+ pushToolResult : mockPushToolResult ,
253+ } )
273254
274255 // Verify: Only INT-001 trace entry is included
275256 const contextXml = mockPushToolResult . mock . calls [ 0 ] [ 0 ]
@@ -285,15 +266,11 @@ describe("SelectActiveIntentTool - Phase 1 End-to-End Test", () => {
285266 await fs . writeFile ( intentsPath , intentsYaml , "utf-8" )
286267
287268 // Execute
288- await selectActiveIntentTool . execute (
289- { intent_id : "INT-999" } ,
290- mockTask ,
291- {
292- askApproval : vi . fn ( ) ,
293- handleError : mockHandleError ,
294- pushToolResult : mockPushToolResult ,
295- } ,
296- )
269+ await selectActiveIntentTool . execute ( { intent_id : "INT-999" } , mockTask , {
270+ askApproval : vi . fn ( ) ,
271+ handleError : mockHandleError ,
272+ pushToolResult : mockPushToolResult ,
273+ } )
297274
298275 // Verify: Error was returned
299276 expect ( mockPushToolResult ) . toHaveBeenCalled ( )
@@ -304,20 +281,15 @@ describe("SelectActiveIntentTool - Phase 1 End-to-End Test", () => {
304281
305282 it ( "should handle missing intent_id parameter" , async ( ) => {
306283 // Execute without intent_id
307- await selectActiveIntentTool . execute (
308- { intent_id : "" } ,
309- mockTask ,
310- {
311- askApproval : vi . fn ( ) ,
312- handleError : mockHandleError ,
313- pushToolResult : mockPushToolResult ,
314- } ,
315- )
284+ await selectActiveIntentTool . execute ( { intent_id : "" } , mockTask , {
285+ askApproval : vi . fn ( ) ,
286+ handleError : mockHandleError ,
287+ pushToolResult : mockPushToolResult ,
288+ } )
316289
317290 // Verify: Missing parameter error
318291 expect ( mockSayAndCreateMissingParamError ) . toHaveBeenCalledWith ( "select_active_intent" , "intent_id" )
319292 expect ( mockTask . consecutiveMistakeCount ) . toBeGreaterThan ( 0 )
320293 } )
321294 } )
322295} )
323-
0 commit comments