fix: keep @ file references available in /skill argument text#340
Open
ShreyanshVaibhaw wants to merge 1 commit into
Open
fix: keep @ file references available in /skill argument text#340ShreyanshVaibhaw wants to merge 1 commit into
ShreyanshVaibhaw wants to merge 1 commit into
Conversation
A matched /skill command with argument text returned an empty completion state, so typing @ to reference a file inside a skill invocation offered no suggestions. Skill arguments are prompt text, so fall through to the file-reference completer there. Generic slash commands keep completions off, matching the existing tests. Fixes huggingface#316
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.
Summary
Fixes #316.
Opening this after claiming the issue two days ago; the reporter confirmed the exact reproduction in the meantime (
/skill:foo @on the same line shows no completions). Happy to adjust or close if a different fix is planned.Root cause
Not stale state - a routing gap in
build_completion_state(src/tau_coding/tui/autocomplete.py). Any text starting with/never reaches the@file completer, and a matched/skill:command with argument text returned an empty completion state. So@references, which work in normal prompt text, offered nothing inside a skill invocation.Fix
Skill arguments are prompt text, so that branch now falls through to the file-reference completer (the TUI already passes
cwd, so it works end to end):/skill:review fix @appnow suggests@src/app.py. Generic slash commands like/help @readkeep completions off - that behavior is deliberate and its existing test (test_file_reference_completion_stays_off_for_slash_commands) is untouched.Scope note
The reporter also raised skill chaining (
/skill:foo /skill:barin one line). That is new command-parsing semantics rather than a completion-routing bug, so it is deliberately out of scope here (noted on the issue).Tests
test_file_reference_completion_works_in_skill_command_arguments, written first and confirmed failing before the fix.tests/test_tui_autocomplete.py: 30 passed.ruffandmypyclean. Rebased on currentmain.🤖 Generated with Claude Code