feat(composer): add past chats reference flow#3336
Conversation
Squash the verified past:chats implementation chain into one reviewable feature commit for PR preparation. Includes: - Add past:chats entry to the @ reference menu - Show historical chat sessions and selected reference cards - Include referenced chat context at send time - Filter past chats locally in the reference menu - Preview referenced chats on hover with Tooltip Original verified commits: - cdec11d3 feat(composer): add past chats reference entry - bab0be5d feat(composer): include referenced chats in prompt - 81ca7602 feat(composer): filter referenced chats - a805e3bd feat(composer): preview referenced chats on hover
ScopeThis PR only adds the |
SivanCola
left a comment
There was a problem hiding this comment.
Thanks, this is directionally useful, but I don't think it is ready to merge yet.
Please address these before merging:
-
The new
past:chatsentry is rendered inside the@menu, but the menu state machine still only counts and picks file entries.menuModeonly opens whenatMatches.length > 0,countis stillatMatches.length, andpickActive()still routes Enter/Tab topickEntry(atMatches[active]). That means keyboard selection cannot openpast:chats, keyboard selection inside the past-chat list cannot choose a session, and the entry can disappear entirely when there are no file matches. Please makepast:chatsa real selectable item in the@menu state model, including keyboard navigation and the empty-file-list case. -
submit()now awaitsbuildSessionContext(sessionRefs)before callingonSend, but there is no local submitting guard while thosePreviewSessioncalls are pending. During that window, the send button remains enabled and Enter can trigger another submit, so users can duplicate the same message if session preview reads are slow. Please add a pending-submit state or otherwise disable duplicate sends until the async context build finishes. -
git diff --checkcurrently fails due to trailing whitespace indocs/SESSION_REFERENCE_ARCHITECTURE.mdat lines 71, 144, 164-166, 173, 200, 209, and 219.
Notes from review:
- I did not see new dependency, network, command execution, or provider/tool-schema cache-stability risk.
- The PR is behind latest
main-v2, but a merge-tree check against the latest base did not show a text conflict. Please still rebase or update before final verification. - Frontend
typecheckcould not be completed in a temporary worktree because this checkout lacks generated Wailswailsjstypes; that is not counted as a PR-specific failure here.
Once these are addressed and CI stays green, I will consider merging it into main-v2.
Closes #3185
Summary
Add
@ → past:chatsflow to the Composer, allowing users to select a historical chat session and inject its context into the current conversation.What's included
@menu: Newpast:chatsentry in the@context menudocs/SESSION_REFERENCE_ARCHITECTURE.mddocumenting the data flowFiles changed
Composer.tsx@menu entry, session list, search, hover preview, reference card in ComposerFileMenu.tsxpast:chatsmenu itemtypes.tsSessionReferenceinterfacestyles.cssSESSION_REFERENCE_ARCHITECTURE.mdTest checklist
@menu showspast:chatsoptionpast:chatsopens session list@file references still work/command menu still works