You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8455da9
Browse filesBrowse the repository at this point in the historyBrowse files
fix(chat): apply chip handoffs as one batch; widen table copy chip path
Cursor Bugbot: a multi-context chip handoff dispatched one event per context,
and insertContextChip resolved label collisions against selectedContexts read
through a ref that only refreshes on render. Each dispatch therefore saw the
same stale list, so a second same-label selection was never ordinalized and
addContext dropped it while its @token still landed in the text. The event now
carries the whole batch and insertContextChips threads each resolved context
forward as it goes.
Greptile: an explicit multi-row ('some') selection no longer requires every
selected row to be loaded before taking the chip-carrying sync path. That
gate assumed the paged fall-through would copy more, but its loadRows returns
rowsRef.current unchanged for 'some' — the same rows, minus the chip. Renamed
the parameter to to say what it actually gates on.
Remaining chip-less cases are inherent to the async Clipboard API, which
replaces the whole clipboard and cannot hold a custom MIME: a filtered
select-all (must page in more rows) and selections past the 500-row chip cap.
'Add to chat' covers both — it is not gesture-bound and drains to the cap.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/prompt-editor/use-prompt-editor.ts
+21-12Lines changed: 21 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -468,35 +468,44 @@ export function usePromptEditor({
468
468
)
469
469
470
470
/**
471
-
* Inserts a context as an `@label` chip at the caret and registers it. Unlike
471
+
* Inserts contexts as `@label` chips at the caret and registers them. Unlike
472
472
* the menu-driven inserts, this is triggered programmatically (the
473
473
* highlight-to-chat action in the file/table viewers) rather than by a typed
474
474
* `@`/`/` trigger, so it always inserts at the current cursor position.
475
+
*
476
+
* Takes the whole batch so label collisions resolve against the chips added
477
+
* earlier in the same call: `selectedContexts` is React state read through a
478
+
* ref, so it does not reflect an add until the next render.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/utils.test.ts
0 commit comments