Skip to content

feat(composer): multiple skills per message + @-mentions alongside slash commands - #848

Open
Pizzaface wants to merge 2 commits into
mainfrom
feat/multi-skill-at-mention
Open

feat(composer): multiple skills per message + @-mentions alongside slash commands#848
Pizzaface wants to merge 2 commits into
mainfrom
feat/multi-skill-at-mention

Conversation

@Pizzaface

Copy link
Copy Markdown
Owner

Summary

  • Multiple skills per message: patched pi's _expandSkillCommand to 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's onChange early-returned when text started with /, force-closing the @-mention popover — so /skill:x @file.ts couldn't be typed. Extracted detection into scanAtMentionTrigger(); an active @query at the cursor now takes precedence over the slash-command popover.

Changes

File Change
patches/@earendil-works%2Fpi-coding-agent@0.84.2.patch rewrite _expandSkillCommand: expand all /skill: tokens
patches/README.md document the new hunk
packages/ui/src/components/SessionViewer.tsx mention scan takes precedence over slash popover in composer onChange
`packages/ui/src/components/session-viewer/at-mention-handlers.ts\ new scanAtMentionTrigger() pure helper
tests patch runtime multi-skill test + scanAtMentionTrigger unit tests

Test plan

  • bun run typecheck — exit 0
  • packages/ui suite: 1586 pass (incl. 6 new unit tests)
  • packages/cli patches + extensions: 1696 pass (incl. new runtime expansion test)
  • Regenerated patch dry-run applied cleanly against a pristine pi-coding-agent@0.84.2 install

Skipped render-level popover test intentionally: fireEvent.input doesn't reach React's synthetic onChange under this happy-dom harness (pre-existing limitation); pure-function tests cover the logic.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant