Skip to content

Commit 3a0c36a

Browse files
committed
clean up
1 parent 5bd3a52 commit 3a0c36a

File tree

1 file changed

+3
-6
lines changed
  • apps/web/client/src/components/store/editor/chat

1 file changed

+3
-6
lines changed

apps/web/client/src/components/store/editor/chat/context.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,13 @@ export class ChatContext {
140140
highlightedContext: HighlightMessageContext[],
141141
frames: FrameData[],
142142
): BranchMessageContext[] {
143-
// Get unique branch IDs from highlighted context
144-
const uniqueBranchIds = new Set<string>();
143+
// Get unique branch IDs from selected elements and frames context
144+
const uniqueBranchIds = new Set<string>(frames.map(frame => frame.frame.branchId));
145+
145146
highlightedContext.forEach(highlight => {
146147
uniqueBranchIds.add(highlight.branchId);
147148
});
148149

149-
frames.forEach((frame) => {
150-
uniqueBranchIds.add(frame.frame.branchId);
151-
});
152-
153150
// Get branch objects for each unique branch ID
154151
const branchContext: BranchMessageContext[] = [];
155152
uniqueBranchIds.forEach(branchId => {

0 commit comments

Comments
 (0)