File tree Expand file tree Collapse file tree
agent-gateway/web/src/components/chat
agent-gui/src/components/chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1679,7 +1679,8 @@ export const ChatHistorySidebar = memo(function ChatHistorySidebar(props: ChatHi
16791679 // Cancelled mid-batch: exitSelectionMode already reset the selection UI.
16801680 return ;
16811681 }
1682- const failedIds = result . failedIds . filter ( ( id ) => orderedConversationIds . includes ( id ) ) ;
1682+ const orderedConversationIdSet = new Set ( orderedConversationIds ) ;
1683+ const failedIds = result . failedIds . filter ( ( id ) => orderedConversationIdSet . has ( id ) ) ;
16831684 setSelectedConversationIds ( new Set ( failedIds ) ) ;
16841685 selectionAnchorRef . current = failedIds [ 0 ] ?? null ;
16851686 if ( failedIds . length === 0 ) {
Original file line number Diff line number Diff line change @@ -1222,7 +1222,8 @@ export const ChatHistorySidebar = memo(function ChatHistorySidebar(props: ChatHi
12221222 // Cancelled mid-batch: exitSelectionMode already reset the selection UI.
12231223 return ;
12241224 }
1225- const failedIds = result . failedIds . filter ( ( id ) => orderedConversationIds . includes ( id ) ) ;
1225+ const orderedConversationIdSet = new Set ( orderedConversationIds ) ;
1226+ const failedIds = result . failedIds . filter ( ( id ) => orderedConversationIdSet . has ( id ) ) ;
12261227 setSelectedConversationIds ( new Set ( failedIds ) ) ;
12271228 selectionAnchorRef . current = failedIds [ 0 ] ?? null ;
12281229 if ( failedIds . length === 0 ) {
You can’t perform that action at this time.
0 commit comments