@@ -297,23 +297,22 @@ describe('read_docs tool with researcher agent', () => {
297297 logger,
298298 } )
299299
300- const { agentState : newAgentState } = await runAgentStep (
301- new MockWebSocket ( ) as unknown as WebSocket ,
302- {
303- system : 'Test system prompt' ,
304- userId : TEST_USER_ID ,
305- userInputId : 'test-input' ,
306- clientSessionId : 'test-session' ,
307- fingerprintId : 'test-fingerprint' ,
308- onResponseChunk : ( ) => { } ,
309- agentType : 'researcher' ,
310- fileContext : mockFileContextWithAgents ,
311- localAgentTemplates : agentTemplates ,
312- agentState,
313- prompt : 'Get React documentation' ,
314- params : undefined ,
315- } ,
316- )
300+ const { agentState : newAgentState } = await runAgentStep ( {
301+ ws : new MockWebSocket ( ) as unknown as WebSocket ,
302+ system : 'Test system prompt' ,
303+ userId : TEST_USER_ID ,
304+ userInputId : 'test-input' ,
305+ clientSessionId : 'test-session' ,
306+ fingerprintId : 'test-fingerprint' ,
307+ onResponseChunk : ( ) => { } ,
308+ agentType : 'researcher' ,
309+ fileContext : mockFileContextWithAgents ,
310+ localAgentTemplates : agentTemplates ,
311+ agentState,
312+ prompt : 'Get React documentation' ,
313+ params : undefined ,
314+ logger,
315+ } )
317316
318317 expect ( context7Api . fetchContext7LibraryDocumentation ) . toHaveBeenCalledWith (
319318 'React' ,
@@ -372,7 +371,8 @@ describe('read_docs tool with researcher agent', () => {
372371 logger,
373372 } )
374373
375- await runAgentStep ( new MockWebSocket ( ) as unknown as WebSocket , {
374+ await runAgentStep ( {
375+ ws : new MockWebSocket ( ) as unknown as WebSocket ,
376376 system : 'Test system prompt' ,
377377 userId : TEST_USER_ID ,
378378 userInputId : 'test-input' ,
@@ -385,6 +385,7 @@ describe('read_docs tool with researcher agent', () => {
385385 agentState,
386386 prompt : 'Get React hooks documentation' ,
387387 params : undefined ,
388+ logger,
388389 } )
389390
390391 expect ( context7Api . fetchContext7LibraryDocumentation ) . toHaveBeenCalledWith (
@@ -421,23 +422,22 @@ describe('read_docs tool with researcher agent', () => {
421422 logger,
422423 } )
423424
424- const { agentState : newAgentState } = await runAgentStep (
425- new MockWebSocket ( ) as unknown as WebSocket ,
426- {
427- system : 'Test system prompt' ,
428- userId : TEST_USER_ID ,
429- userInputId : 'test-input' ,
430- clientSessionId : 'test-session' ,
431- fingerprintId : 'test-fingerprint' ,
432- onResponseChunk : ( ) => { } ,
433- agentType : 'researcher' ,
434- fileContext : mockFileContextWithAgents ,
435- localAgentTemplates : agentTemplates ,
436- agentState,
437- prompt : 'Get documentation for NonExistentLibrary' ,
438- params : undefined ,
439- } ,
440- )
425+ const { agentState : newAgentState } = await runAgentStep ( {
426+ ws : new MockWebSocket ( ) as unknown as WebSocket ,
427+ system : 'Test system prompt' ,
428+ userId : TEST_USER_ID ,
429+ userInputId : 'test-input' ,
430+ clientSessionId : 'test-session' ,
431+ fingerprintId : 'test-fingerprint' ,
432+ onResponseChunk : ( ) => { } ,
433+ agentType : 'researcher' ,
434+ fileContext : mockFileContextWithAgents ,
435+ localAgentTemplates : agentTemplates ,
436+ agentState,
437+ prompt : 'Get documentation for NonExistentLibrary' ,
438+ params : undefined ,
439+ logger,
440+ } )
441441
442442 // Check that the "no documentation found" message was added
443443 const toolResultMessages = newAgentState . messageHistory . filter (
@@ -489,23 +489,22 @@ describe('read_docs tool with researcher agent', () => {
489489 logger,
490490 } )
491491
492- const { agentState : newAgentState } = await runAgentStep (
493- new MockWebSocket ( ) as unknown as WebSocket ,
494- {
495- system : 'Test system prompt' ,
496- userId : TEST_USER_ID ,
497- userInputId : 'test-input' ,
498- clientSessionId : 'test-session' ,
499- fingerprintId : 'test-fingerprint' ,
500- onResponseChunk : ( ) => { } ,
501- agentType : 'researcher' ,
502- fileContext : mockFileContextWithAgents ,
503- localAgentTemplates : agentTemplates ,
504- agentState,
505- prompt : 'Get React documentation' ,
506- params : undefined ,
507- } ,
508- )
492+ const { agentState : newAgentState } = await runAgentStep ( {
493+ ws : new MockWebSocket ( ) as unknown as WebSocket ,
494+ system : 'Test system prompt' ,
495+ userId : TEST_USER_ID ,
496+ userInputId : 'test-input' ,
497+ clientSessionId : 'test-session' ,
498+ fingerprintId : 'test-fingerprint' ,
499+ onResponseChunk : ( ) => { } ,
500+ agentType : 'researcher' ,
501+ fileContext : mockFileContextWithAgents ,
502+ localAgentTemplates : agentTemplates ,
503+ agentState,
504+ prompt : 'Get React documentation' ,
505+ params : undefined ,
506+ logger,
507+ } )
509508
510509 // Check that the error message was added
511510 const toolResultMessages = newAgentState . messageHistory . filter (
@@ -556,23 +555,22 @@ describe('read_docs tool with researcher agent', () => {
556555 logger,
557556 } )
558557
559- const { agentState : newAgentState } = await runAgentStep (
560- new MockWebSocket ( ) as unknown as WebSocket ,
561- {
562- system : 'Test system prompt' ,
563- userId : TEST_USER_ID ,
564- userInputId : 'test-input' ,
565- clientSessionId : 'test-session' ,
566- fingerprintId : 'test-fingerprint' ,
567- onResponseChunk : ( ) => { } ,
568- agentType : 'researcher' ,
569- fileContext : mockFileContextWithAgents ,
570- localAgentTemplates : agentTemplates ,
571- agentState,
572- prompt : 'Get React server components documentation' ,
573- params : undefined ,
574- } ,
575- )
558+ const { agentState : newAgentState } = await runAgentStep ( {
559+ ws : new MockWebSocket ( ) as unknown as WebSocket ,
560+ system : 'Test system prompt' ,
561+ userId : TEST_USER_ID ,
562+ userInputId : 'test-input' ,
563+ clientSessionId : 'test-session' ,
564+ fingerprintId : 'test-fingerprint' ,
565+ onResponseChunk : ( ) => { } ,
566+ agentType : 'researcher' ,
567+ fileContext : mockFileContextWithAgents ,
568+ localAgentTemplates : agentTemplates ,
569+ agentState,
570+ prompt : 'Get React server components documentation' ,
571+ params : undefined ,
572+ logger,
573+ } )
576574
577575 // Check that the topic is included in the error message
578576 const toolResultMessages = newAgentState . messageHistory . filter (
@@ -624,23 +622,22 @@ describe('read_docs tool with researcher agent', () => {
624622 logger,
625623 } )
626624
627- const { agentState : newAgentState } = await runAgentStep (
628- new MockWebSocket ( ) as unknown as WebSocket ,
629- {
630- system : 'Test system prompt' ,
631- userId : TEST_USER_ID ,
632- userInputId : 'test-input' ,
633- clientSessionId : 'test-session' ,
634- fingerprintId : 'test-fingerprint' ,
635- onResponseChunk : ( ) => { } ,
636- agentType : 'researcher' ,
637- fileContext : mockFileContextWithAgents ,
638- localAgentTemplates : agentTemplates ,
639- agentState,
640- prompt : 'Get React documentation' ,
641- params : undefined ,
642- } ,
643- )
625+ const { agentState : newAgentState } = await runAgentStep ( {
626+ ws : new MockWebSocket ( ) as unknown as WebSocket ,
627+ system : 'Test system prompt' ,
628+ userId : TEST_USER_ID ,
629+ userInputId : 'test-input' ,
630+ clientSessionId : 'test-session' ,
631+ fingerprintId : 'test-fingerprint' ,
632+ onResponseChunk : ( ) => { } ,
633+ agentType : 'researcher' ,
634+ fileContext : mockFileContextWithAgents ,
635+ localAgentTemplates : agentTemplates ,
636+ agentState,
637+ prompt : 'Get React documentation' ,
638+ params : undefined ,
639+ logger,
640+ } )
644641
645642 // Check that the generic error message was added
646643 const toolResultMessages = newAgentState . messageHistory . filter (
0 commit comments