Skip to content

feat(tui): argument auto-completion for /drop#3733

Open
aheritier wants to merge 1 commit into
mainfrom
feat/drop-completion
Open

feat(tui): argument auto-completion for /drop#3733
aheritier wants to merge 1 commit into
mainfrom
feat/drop-completion

Conversation

@aheritier

@aheritier aheritier commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Closes #3732.

What

Pressing Tab after /drop opens 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:

  • New App.AttachedFiles() accessor (nil-guarded over AttachedFilesSnapshot()); works on remote runtimes since attachments are client-side session state.
  • dropCandidates + attachDropCompletion on the session.drop command, wired in BuildCommandCategories.
  • Exact recorded file paths are used as candidate labels, guaranteeing resolvability via the exact-match branch of resolveAttachedFile; paths containing spaces are safe because the completion value is the full command line. Candidates are never disabled.

Tests

  • Ordering, exact labels, path-with-spaces, no-attachments-empty
  • Wiring targets only /drop
  • Fresh lookup on every invocation (no stale snapshot)

Reviewed 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:

@aheritier
aheritier requested a review from a team as a code owner July 17, 2026 20:26
@aheritier
aheritier force-pushed the feat/drop-completion branch from a987cd0 to c1748bc Compare July 17, 2026 20:31
@aheritier aheritier added area/agent For work that has to do with the general agent loop/agentic features of the app area/docs Documentation changes area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat:). Use on PRs only. labels Jul 17, 2026
@aheritier
aheritier force-pushed the feat/drop-completion branch from c1748bc to 09f6f72 Compare July 17, 2026 20:37
@aheritier
aheritier requested a review from docker-agent July 17, 2026 20:52
dgageot
dgageot previously approved these changes Jul 18, 2026
Base automatically changed from feat/toolset-restart-completion to main July 18, 2026 07:25
@aheritier
aheritier dismissed dgageot’s stale review July 18, 2026 07:25

The base branch was changed.

dgageot
dgageot previously approved these changes Jul 18, 2026
@aheritier
aheritier enabled auto-merge July 18, 2026 12:19
@aheritier
aheritier force-pushed the feat/drop-completion branch 4 times, most recently from b911ce1 to fff367c Compare July 18, 2026 12:43
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
aheritier force-pushed the feat/drop-completion branch from fff367c to 4488ae5 Compare July 18, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agent For work that has to do with the general agent loop/agentic features of the app area/docs Documentation changes area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants