feat(ios): render $skill mentions as tappable pills with detail sheet - #320
Open
kingbootoshi wants to merge 1 commit into
Open
feat(ios): render $skill mentions as tappable pills with detail sheet#320kingbootoshi wants to merge 1 commit into
kingbootoshi wants to merge 1 commit into
Conversation
$skill mentions autocomplete in the composer but land in the transcript as plain text. This renders them as accent pills in user bubbles, mirroring the existing plugin-ref pills in FormattedText, and tapping a pill opens a sheet with the skill's display name, scope, description, default prompt, and path. - SkillMentionCatalog: per-conversation @observable registry injected via environment; loads listSkills once, and only when a rendered message actually contains a $mention token, so mention-free transcripts never pay for the RPC - tokenizer mirrors the composer's mention byte rules exactly ($ + [A-Za-z0-9_-]+, rejected mid-word); kept self-contained to avoid colliding with in-flight branches that touch the composer helpers - only names present in the loaded catalog render as pills, so dollar amounts like $200 stay plain text - catalog rebuilt per thread from the thread's cwd - unit tests for the tokenizer; UI test drives the display harness, taps the pill, and asserts the detail sheet Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Follow-up to the kitty litter feedback thread: "skill should highlight in chat too (bonus points if you can click on it and it shows the detail/prompt of the skill as a pop up)."
What
$skillmentions in user message bubbles render as accent pills (same visual language as the existing plugin-ref pills inFormattedText)$name, scope badge, description, default prompt, and pathHow
SkillMentionCatalog(new): per-conversation@Observableregistry injected via environment fromConversationView. It callslistSkillsonce per thread, and only when a rendered message actually contains a$mentiontoken — mention-free transcripts never pay for the RPC and register no observation edges.$+[A-Za-z0-9_-]+, rejected mid-word likecost$cad). It's self-contained rather than reusing the composer's private helpers so this doesn't collide with in-flight branches that touch them — happy to DRY once those land.$200stay plain text.Verification
LitterTests: full suite on iPhone 17 Pro Max sim — 248 tests, 0 failures (includes 13 new tokenizer tests)LitterUITests/SkillMentionPillUITests: drives the conversation display harness (seeded with a$cad/$mujocomessage + stub catalog), asserts the pills exist, taps$cad, asserts the sheet contents, dismisses — passing; saves before/after screenshots as attachments🤖 Generated with Claude Code
Demo
skill-mention-pills.mp4
Demo:
$cadrenders as a pill in the sent bubble; tapping opens the detail sheet with name, scope badge, description, and skill path.