feat(TUI): Add inline $skill invocations with prepend + pasteText support#29217
Open
jjdubski wants to merge 5 commits into
Open
feat(TUI): Add inline $skill invocations with prepend + pasteText support#29217jjdubski wants to merge 5 commits into
jjdubski wants to merge 5 commits into
Conversation
Typing $ in the prompt now surfaces available skills in the same autocomplete popup used for @ mentions and / commands. Selecting a skill inserts $skillname as a highlighted virtual-text extmark. On submit, $skill references are expanded inline to the full skill content before the prompt is sent. - Generalized mentionTriggerIndex() to accept a configurable trigger character, reused for $ detection alongside @ - Added source.kind discriminator to distinguish skill extmarks from paste extmarks for correct styling
When using in the prompt, the skill content was expanded inline at the reference position, overwriting the text and disrupting the user's prompt structure. The references now remain in place and skill content is prepended at the beginning of the prompt. Also removes unused type and function left over from the original inline-replacement approach, and fixes the autocomplete dropdown to right-align skill descriptions by padding display names to a uniform width.
Previously, pasting text containing references into the prompt inserted plain text with no extmark highlighting, even though the skill content was correctly prepended on submit via expand(). This made the pasted references visually inconsistent with type-ahead inserted skills. The paste flow now scans the pasted text for references matching known skills and creates skill-styled extmarks for them, matching the appearance of autocomplete-inserted skills. Large pastes that get summarized skip highlighting since the text is hidden behind the [Pasted ~N lines] placeholder.
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
3 tasks
|
Very nice! Can't wait for this to be merged :-) |
|
Awesome! 👏 thanks for picking this up again. |
This was referenced May 26, 2026
|
Very nice |
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 #15617
Closes #10525
Closes #7846
Closes #20982
Closes #24587
Type of change
What does this PR do?
$skillsupport to the prompt composer.$surfaces available skills in autocomplete, and selecting one inserts the skill into the prompt (prepended to the actual prompt itself to match the behavior of /skills command + cleaner).How did you verify your code works?
bun testinside the packages/opencode directorybun typecheckScreenshots / recordings
skill.demo.mp4
Checklist
Any feedback would be greatly appreciated!