Repository navigation
Chat: @ in the composer completes file paths (#708, D279) - #732
Merged
Merged
Conversation
This was referenced Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #708
What changed
internal/app/chatview/suggest.go: the popup takes a query at the caret (QueryAt) for "/" and "@"; one popup, two sources (Slash, newPath PathSource). Lists are kept per terminal, and for "@" per typed folder.FilterPaths: paths with a part that starts with the text first, then paths that hold it, at most 50. An insert replaces only "@text" up to the caret; a folder goes in as "@dir/" and the popup stays open.internal/app/chatview/composer.go: stores the caret as the field builds.internal/review/tree.go:Repo.KnownFiles(git ls-files --cached --others --exclude-standard, sorted).internal/app/chat.go:pathSource/listPathsread off the UI thread: the git files and their folders, without files deleted in the work tree, with a nested repo listed once; outside git, a plain read of the typed folder (Repo.Entries).docs/spec/ChatView.md, and D279.Tests
TestQueryAtCaret,TestFilterPathsOrderAndCap,TestAtInsertsAFile,TestAtInsertsAFolderAndStaysOpen,TestInsertKeepsTheTextAfterTheCaret,TestAtWithNoMatchSaysSo,TestListPathsInGit,TestListPathsOutsideGitReadsTheTypedFolder,TestListPathsOfAnEmptyFolder(temp folders only).go test -tags e2e -run TestChatPathPopup ./cmd/contrpasses.chat-paths, Dark and Light checked by eye.Pre-check
suggestOpenbecamequery, which handles "/" the same way (the slash tests pass).