@@ -817,64 +817,6 @@ describe("RunAgentSubscriber", () => {
817
817
} ) ,
818
818
) ;
819
819
} ) ;
820
-
821
- test ( "should handle multiple tool calls with different buffers" , async ( ) => {
822
- const multiToolAgent = new TestAgent ( ) ;
823
- multiToolAgent . subscribe ( mockSubscriber ) ;
824
- multiToolAgent . setEventsToEmit ( [
825
- {
826
- type : EventType . TOOL_CALL_START ,
827
- toolCallId : "call-1" ,
828
- toolCallName : "search" ,
829
- } as ToolCallStartEvent ,
830
- {
831
- type : EventType . TOOL_CALL_START ,
832
- toolCallId : "call-2" ,
833
- toolCallName : "calculate" ,
834
- } as ToolCallStartEvent ,
835
- {
836
- type : EventType . TOOL_CALL_ARGS ,
837
- toolCallId : "call-1" ,
838
- delta : '{"query": "test"}' ,
839
- } as ToolCallArgsEvent ,
840
- {
841
- type : EventType . TOOL_CALL_ARGS ,
842
- toolCallId : "call-2" ,
843
- delta : '{"a": 1, "b": 2}' ,
844
- } as ToolCallArgsEvent ,
845
- {
846
- type : EventType . TOOL_CALL_END ,
847
- toolCallId : "call-1" ,
848
- } as ToolCallEndEvent ,
849
- {
850
- type : EventType . TOOL_CALL_END ,
851
- toolCallId : "call-2" ,
852
- } as ToolCallEndEvent ,
853
- ] ) ;
854
-
855
- await multiToolAgent . runAgent ( { } ) ;
856
-
857
- expect ( mockSubscriber . onToolCallStartEvent ) . toHaveBeenCalledTimes ( 2 ) ;
858
- expect ( mockSubscriber . onToolCallEndEvent ) . toHaveBeenCalledTimes ( 2 ) ;
859
- expect ( mockSubscriber . onNewToolCall ) . toHaveBeenCalledTimes ( 2 ) ;
860
-
861
- // Verify separate buffers were maintained
862
- expect ( mockSubscriber . onToolCallEndEvent ) . toHaveBeenNthCalledWith (
863
- 1 ,
864
- expect . objectContaining ( {
865
- toolCallName : "search" ,
866
- toolCallArgs : { query : "test" } ,
867
- } ) ,
868
- ) ;
869
-
870
- expect ( mockSubscriber . onToolCallEndEvent ) . toHaveBeenNthCalledWith (
871
- 2 ,
872
- expect . objectContaining ( {
873
- toolCallName : "calculate" ,
874
- toolCallArgs : { a : 1 , b : 2 } ,
875
- } ) ,
876
- ) ;
877
- } ) ;
878
820
} ) ;
879
821
880
822
describe ( "Buffer Accumulation Tests" , ( ) => {
0 commit comments