Skip to content

#797 Inline skill mentions, several per prompt - #801

Merged
ivanfenenko merged 2 commits into
mainfrom
feature/797-inline-skill-mentions
Oct 23, 2026
Merged

ivanfenenko merged 2 commits into
mainfrom
feature/797-inline-skill-mentions

Conversation

@ivanfenenko

@ivanfenenko ivanfenenko commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • / in the Session Chat composer is now a cursor-aware trigger like @: it opens at the start of the draft or after whitespace, never inside a word or a file path.
  • Picking a v2 skill inserts a /name span at the caret and keeps the rest of the draft; picking a command inserts the leading /name token the same way. Nothing replaces the whole draft any more (slash overlay and the Commands sheet Skills tile both go through this path).
  • Skill spans use the shared mention span model: they shift with edits, delete as one unit, carry the @ mention colour, persist in composer drafts, and any number can sit anywhere. A skill already in the draft is not offered again; commands are offered only when the / is leading.
  • Send keeps the text verbatim with agent and file mentions intact. Each skill goes out as { id, mention: { start, end, text } } on POST /api/session/{id}/prompt (deduped by id); a server-command draft still goes to the command route and carries skills: [{ id }]. A hand-typed leading /skill args is still admitted as a span.
  • v2 user messages read skills back into the domain Message; history and the optimistic row collapse every span to [/name] and the outgoing bubble highlights every such token, not only a leading one.
  • v1 is unchanged: GET /command still inlines skills, a leading v1 skill still goes to POST command, the v1 prompt route carries no skills.

Checks

  • iOS: xcodebuild test on iPhone 17 simulator for ComposerSubmitRouting, ComposerMentionRouting, CommandInvocationCollapser, MessageDomainAdapter, PromptJSONBodyWriter, SessionChatViewModel, ComposerDraftStore, SessionChatTimelineBlocks, CommandDomainAdapter suites: 476 tests pass.
  • Android: ./gradlew :app:testDebugUnitTest for ComposerMentionRouting, domain.command.*, MessageDomainAdapter, PromptJsonBodyWriter, SessionChatViewModel: 392 tests pass (1 pre-existing skip). ktlint violations in lines added here fixed; pre-existing ones in touched files left as they were.
  • Not run: scenario harness evidence on a v2 server with two inline skills (acceptance item on the issue).

Issue

Risks / Follow-ups

  • Spans are colour-only in the composer; a pill background is a Design System follow-up.
  • Skill listing under the @ trigger (official web behaviour) is out of scope by the ticket.
  • Scenario-harness run on v2 still to do before closing the issue.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith with what you need.

Skills are `/name` spans in the Session Chat composer on both platforms:
the `/` trigger is cursor-aware, picks insert at the caret, spans
reconcile and delete like `@` mentions, and any number can sit anywhere
in the draft. The prompt text goes out verbatim with agent and file
mentions intact; each skill is sent as `{ id, mention }` on the v2 prompt
route, or as `{ id }` alongside a server command. v2 user messages read
`skills` back so history and the optimistic row highlight every
`[/name]` token. v1 routing is unchanged.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@ivanfenenko
ivanfenenko marked this pull request as ready for review October 23, 2026 11:31
Unify the skill read-back on main's PromptSkill and V2UserSkillDTO
(#795): PromptSkill carries the mention offsets, and the timeline
derives the `/name` spans from it for `[/name]` collapse.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@ivanfenenko
ivanfenenko merged commit 67a17f8 into main Oct 23, 2026
2 checks passed
@ivanfenenko
ivanfenenko deleted the feature/797-inline-skill-mentions branch October 23, 2026 13:51
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