feat(tui): argument auto-completion for /drop#3733
Open
aheritier wants to merge 1 commit into
Open
Conversation
aheritier
force-pushed
the
feat/drop-completion
branch
from
July 17, 2026 20:31
a987cd0 to
c1748bc
Compare
Pressing Tab after "/drop " opens a completion popup listing the session's currently attached file paths, reusing the argument-completion hook shipped for /toolset-restart. Candidate labels are the exact recorded (absolute) paths, so selecting one always resolves via the exact-match branch of resolveAttachedFile; every attached file is droppable, so no candidate is ever marked Disabled. Adds App.AttachedFiles(), a nil-guarded wrapper over the session's AttachedFilesSnapshot(); it works on remote runtimes too since attachments are client-side session state.
aheritier
force-pushed
the
feat/drop-completion
branch
from
July 17, 2026 20:37
c1748bc to
09f6f72
Compare
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.
Closes #3732.
What
Pressing Tab after
/dropopens a completion popup listing the session's currently attached files, so you can drop an attachment without retyping its path.How
Reuses the generic argument-completion hook shipped in #3728 — no editor/tui/popup changes:
App.AttachedFiles()accessor (nil-guarded overAttachedFilesSnapshot()); works on remote runtimes since attachments are client-side session state.dropCandidates+attachDropCompletionon thesession.dropcommand, wired inBuildCommandCategories.resolveAttachedFile; paths containing spaces are safe because the completion value is the full command line. Candidates are never disabled.Tests
/dropReviewed locally: approved, no blocking issues.
Note
Stacked on #3728 (
feat/toolset-restart-completion), which carries the generic hook. Merge after #3728.This is part 2 of 2 in a stack made with GitButler: