@@ -481,7 +481,7 @@ describe("chatPaneSelectors", () => {
481481 expect ( selectActiveSubAgentParentItemIds ( state , "t1" ) ) . toEqual ( [ "sub:run-1" ] ) ;
482482 } ) ;
483483
484- it ( "groups edits only with edits to the same file " , ( ) => {
484+ it ( "groups adjacent edits with the rest of the tool-call run " , ( ) => {
485485 const state = {
486486 runtimeItemIdsByThread : {
487487 t1 : [
@@ -572,20 +572,18 @@ describe("chatPaneSelectors", () => {
572572 {
573573 kind : "tool_call_group" ,
574574 id : "tool-call-group:edit-1" ,
575- itemIds : [ "edit-1" , "edit-2" ] ,
575+ itemIds : [ "edit-1" , "edit-2" , "command-1" , "command-2" ] ,
576576 } ,
577+ { kind : "item" , id : "assistant-2" } ,
577578 {
578579 kind : "tool_call_group" ,
579- id : "tool-call-group:command-1 " ,
580- itemIds : [ "command-1 " , "command-2 " ] ,
580+ id : "tool-call-group:edit-3 " ,
581+ itemIds : [ "edit-3 " , "edit-4 " ] ,
581582 } ,
582- { kind : "item" , id : "assistant-2" } ,
583- { kind : "item" , id : "edit-3" } ,
584- { kind : "item" , id : "edit-4" } ,
585583 ] ) ;
586584 } ) ;
587585
588- it ( "applies the same edit grouping rule to generic edit tool calls" , ( ) => {
586+ it ( "groups generic edit tool calls with adjacent tools " , ( ) => {
589587 const state = {
590588 runtimeItemIdsByThread : {
591589 t1 : [ "tool-edit-1" , "tool-edit-2" , "tool-read-1" , "tool-edit-3" ] ,
@@ -643,10 +641,8 @@ describe("chatPaneSelectors", () => {
643641 {
644642 kind : "tool_call_group" ,
645643 id : "tool-call-group:tool-edit-1" ,
646- itemIds : [ "tool-edit-1" , "tool-edit-2" ] ,
644+ itemIds : [ "tool-edit-1" , "tool-edit-2" , "tool-read-1" , "tool-edit-3" ] ,
647645 } ,
648- { kind : "item" , id : "tool-read-1" } ,
649- { kind : "item" , id : "tool-edit-3" } ,
650646 ] ) ;
651647 } ) ;
652648} ) ;
0 commit comments