feat(composer): multiple skills per message + @-mentions alongside slash commands - #848
Open
Pizzaface wants to merge 2 commits into
Open
feat(composer): multiple skills per message + @-mentions alongside slash commands#848Pizzaface wants to merge 2 commits into
Pizzaface wants to merge 2 commits into
Conversation
…ash commands - Patch pi's _expandSkillCommand to expand every /skill:<name> token in a message, not just a leading one; inline tokens expand in place so /skill:a ... /skill:b ... works and @mentions pass through untouched. - Composer onChange: @-mention detection now takes precedence over the slash-command popover, so typing '/skill:x @file' opens the mention picker instead of being swallowed by the '/' early-return. - Tests: scanAtMentionTrigger unit tests, patch runtime test for multi-skill expansion.
After the first skill in a message, typing another "/skill:" showed no selector — the slash popover only triggered at position 0. Add scanSlashCommandToken: a mid-message token that prefix-matches "skill:" now opens a skill-only popover anchored at the token; picking a skill (Enter/Tab/click) inserts it in place instead of replacing the draft. @-mention detection still takes precedence.
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
_expandSkillCommandto expand every/skill:<name>token in a message, not just a leading one. Leading token keeps upstream semantics (trailing text = that skill's args); inline tokens expand in place; unknown skills pass through untouched.@alongside slash commands: the web composer'sonChangeearly-returned when text started with/, force-closing the @-mention popover — so/skill:x @file.tscouldn't be typed. Extracted detection intoscanAtMentionTrigger(); an active@queryat the cursor now takes precedence over the slash-command popover.Changes
patches/@earendil-works%2Fpi-coding-agent@0.84.2.patch_expandSkillCommand: expand all/skill:tokenspatches/README.mdpackages/ui/src/components/SessionViewer.tsxscanAtMentionTrigger()pure helperscanAtMentionTriggerunit testsTest plan
bun run typecheck— exit 0packages/uisuite: 1586 pass (incl. 6 new unit tests)packages/clipatches + extensions: 1696 pass (incl. new runtime expansion test)pi-coding-agent@0.84.2installSkipped render-level popover test intentionally:
fireEvent.inputdoesn't reach React's synthetic onChange under this happy-dom harness (pre-existing limitation); pure-function tests cover the logic.