Skip to content

feat(chat): find in conversation with ⌘F/Ctrl+F - #764

Open
Jonathan-Asher wants to merge 1 commit into
xintaofei:mainfrom
Jonathan-Asher:feat/find-in-chat-pr
Open

Jonathan-Asher wants to merge 1 commit into
xintaofei:mainfrom
Jonathan-Asher:feat/find-in-chat-pr

Conversation

@Jonathan-Asher

Copy link
Copy Markdown

What

Adds find-in-chat: ⌘F (Ctrl+F on Win/Linux) opens a compact find bar over the open conversation transcript.

  • Occurrence-level matching over message prose (text parts only — tool calls, tool results, reasoning traces and chrome are excluded, matching what a reader scans visually)
  • Enter / Shift+Enter and the ↑/↓ buttons walk matches; match counter shows "3 of 17"; Esc closes
  • The virtualizer jumps to the hit row (scrollToIndex, centered) and the matching message group gets an amber ring
  • Scoped to the active transcript so background tabs never steal the shortcut; terminal regions decline it so multiplexer chords keep working (same precedent as the tab-switch chord decline in workspace-chrome-controller)
  • i18n keys added for all locales (zh-CN/zh-TW translated, others carry English pending review)

Scope note

Searches the loaded transcript window only — the same accepted degradation as the message navigator (paging in older history extends what's findable, and match indices are recomputed per prepend so they never go stale). A follow-up could hook the same extractor into the reverse-infinite-scroll to reach older history on demand.

Testing

  • New unit tests for the text extractor (text-part joining, non-turn items, tool-only turns)
  • Full message-list-view + virtualized-message-thread suites pass (49 tests)
  • eslint clean on changed files (incl. React Compiler rules); tsc shows only the two pre-existing errors in reasoning.tsx / vitest.config.ts

Search the loaded transcript's message prose from the keyboard: ⌘F opens
a compact find bar over the thread, Enter/Shift+Enter and arrows walk
matches (occurrence-level, capped at 500), Esc closes. The virtualizer
jumps to the hit row and the matching message group gets an amber ring.

Scoped to the active transcript so background tabs never steal the
shortcut; terminal regions decline it (multiplexer chords keep working).
Only message text is searched — tool calls, tool results, reasoning
traces and chrome are excluded, matching what a reader scans visually.
Same loaded-window degradation as the message navigator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant