feat(tui): argument auto-completion for /toolset-restart#3728
Merged
Conversation
aheritier
marked this pull request as draft
July 17, 2026 17:34
This comment was marked as resolved.
This comment was marked as resolved.
aheritier
force-pushed
the
feat/toolset-restart-completion
branch
from
July 17, 2026 17:35
fa3d752 to
d60d5c2
Compare
Pressing Tab after "/toolset-restart " opens a completion popup listing the current agent's toolsets. Non-restartable toolsets are shown but dimmed and annotated "(not restartable)", and cannot be selected. The completion opens only on Tab, never auto-opening on space. The argument-completion hook (ArgumentCandidate/CompleteArgument on commands.Item plus the ArgumentCompleter source interface) is command-agnostic so it can be reused for other commands (e.g. /effort, /drop) later, though only /toolset-restart is wired up here.
aheritier
force-pushed
the
feat/toolset-restart-completion
branch
from
July 17, 2026 18:53
d60d5c2 to
b711608
Compare
aheritier
marked this pull request as ready for review
July 17, 2026 19:48
This was referenced Jul 17, 2026
aheritier
enabled auto-merge
July 17, 2026 20:51
dgageot
approved these changes
Jul 18, 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.
What
Pressing Tab after
/toolset-restartnow opens a completion popup listing the current agent's toolsets, so you no longer have to remember or retype exact toolset names.Behavior
(not restartable)suffix and cannot be selected/submitted, rather than being hidden.Design
The completion hook is deliberately command-agnostic:
ArgumentCandidate/CompleteArgumentoncommands.ItemArgumentCompletersource interface implemented by the command completion sourceOnly
/toolset-restartis wired up in this PR, but the same mechanism can later serve commands like/effortand/drop.Implementation notes
Restartable booltotools.ToolsetStatus(pkg/runtime,pkg/tools).Disabledconcept to the completion popup (dimmed style, non-selectable, no ghost preview).TryStartArgumentCompletion, invoked from theswitchFocus/Tab path intui.go(falls through to focus-switch when not applicable).tea.Sequencefor Open+Query so the popup opens with the full item set before the query narrows it.Testing
task build,task test(all packages), andtask lintpass.ArgumentCompletersource mapping,TryStartArgumentCompletion(guards + successful open + seeded query), argument-mode query narrowing/closing, and the Tab/switchFocusintegration.Reviewed locally: approved, no blocking issues.
Closes #3730
This is part 1 of 2 in a stack made with GitButler: