feat(tui): show skills in slash autocomplete and group /skills dialog by source - #43537
Open
mccaffrey-jonathan wants to merge 2 commits into
Open
feat(tui): show skills in slash autocomplete and group /skills dialog by source#43537mccaffrey-jonathan wants to merge 2 commits into
mccaffrey-jonathan wants to merge 2 commits into
Conversation
… by source Skills registered as server commands were skipped in the slash autocomplete, so /<skillName> was not discoverable. Include them with a :skill label, matching the :mcp convention. The /skills dialog listed every skill under one heading. Group entries by source (Project, Global, Built-in) derived from the skill location. Closes anomalyco#7846 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TTuWSW35XoRbPYixZr8oKQ
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
…sions - skillSource treated a location with no common root with the project as "Project": path.relative returns an absolute path across Windows drives and UNC shares, so neither ".." check fired. Guard with path.isAbsolute. - Classify against the worktree rather than the cwd. Project skills come from .opencode directories walked from the cwd up to the worktree root, so a session started in a subdirectory labelled its own project skills "Global". - Skip a skill whose name collides with a builtin slash command. Selecting an entry inserts "/<name>" without the ":skill" label, so the collision rendered a second row that silently ran the builtin.
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.
Issue for this PR
Closes #7846
Type of change
What does this PR do?
Two remaining gaps from #7846 (the
/skillsdialog itself already exists):/<skillName>offered no completion even though submitting it works. They now appear labeled:skill, following the existing:mcpconvention. This matches the/<skillName>invocation style requested in the issue thread./skillsdialog listed every skill under a single "Skills" heading. The issue asks for the source to be shown; entries are now grouped Project / Global / Built-in, derived from each skill's location relative to the project directory.How did you verify your code works?
bun test test/component/dialog-skill.test.ts— unit tests for the source classification (built-in, project, global, shared-prefix sibling edge case)bun test test/cli/tui/dialog-skill.test.tsx— mounts DialogSkill against a mock SDK and asserts the rendered frame shows the three group headers in order with the right skills under eachbun run typecheckin packages/tui; oxlint reports no new warnings on the changed filesScreenshots / recordings
(attach frame capture: pr1-dialog-frame.txt / TUI screenshot)
Built and tested with Claude assistance; I reviewed and verified the changes.
Checklist