Skip to content

add skills to the chat composer#8881

Merged
morgmart merged 4 commits intomainfrom
morganm/skills-in-chat
Apr 28, 2026
Merged

add skills to the chat composer#8881
morgmart merged 4 commits intomainfrom
morganm/skills-in-chat

Conversation

@morgmart
Copy link
Copy Markdown
Collaborator

@morgmart morgmart commented Apr 28, 2026

Category: new-feature
User Impact: Users can now add skills to a chat from the composer or Skills view so Goose can apply the right workflow guidance to a request.

Problem: Skills were discoverable, but users did not have a direct way to apply them to a specific chat message. Skill context also needed to survive send, replay, voice auto-submit, and slash-command paths without exposing assistant-only prompt text in the user bubble.

Solution: This adds skill mention detection, selected skill chips, slash skill commands, Skills view chat entry points, and message metadata so selected skills are sent as assistant-only guidance while staying visible as chips in the chat UI.

File changes

ui/goose2/src/app/AppShell.tsx
Adds the start-chat-with-skill flow from Skills into chat session creation and seeds the selected skill draft.

ui/goose2/src/app/ui/AppShellContent.tsx
Passes the selected-skill chat entry handler through the app shell content boundary.

ui/goose2/src/features/chat/hooks/tests/useChat.skillChips.test.ts
Covers skill chip metadata in the chat hook send path.

ui/goose2/src/features/chat/hooks/useChat.ts
Threads skill send options through the chat send API.

ui/goose2/src/features/chat/hooks/useChatInputFilePicker.ts
Coordinates composer snapshot behavior when file picker actions interact with selected skills.

ui/goose2/src/features/chat/hooks/useChatInputSubmit.ts
Adds shared composer submit callbacks so normal send and voice auto-submit use the same skill-aware payload logic.

ui/goose2/src/features/chat/hooks/useChatSessionController.ts
Restores selected skill drafts into the chat session controller and handles seeded skill starts.

ui/goose2/src/features/chat/hooks/useMentionHandlers.ts
Adds mention parsing and selection handling for skill chips in the composer.

ui/goose2/src/features/chat/hooks/useMessageQueue.ts
Preserves skill metadata while queued user messages are submitted.

ui/goose2/src/features/chat/hooks/useVoiceDictation.ts
Adds an auto-submit callback so dictated messages can reuse the skill-aware submit path.

ui/goose2/src/features/chat/lib/chatInputPlaceholder.ts
Updates composer placeholder behavior for selected skills.

ui/goose2/src/features/chat/lib/chatInputSnapshots.ts
Persists and restores composer state that includes selected skills.

ui/goose2/src/features/chat/lib/skillSendPayload.ts
Builds the assistant-only skill prompt and user-visible chip metadata for sends.

ui/goose2/src/features/chat/lib/submitComposerMessage.ts
Centralizes composer send assembly across typed and voice-submitted messages.

ui/goose2/src/features/chat/stores/tests/chatStore.test.ts
Covers selected skill draft storage and reset behavior.

ui/goose2/src/features/chat/stores/chatStore.ts
Adds selected skill state to the chat store.

ui/goose2/src/features/chat/stores/draftPersistence.ts
Persists selected skill drafts with other composer draft state.

ui/goose2/src/features/chat/types.ts
Extends chat types for skill send and draft metadata.

ui/goose2/src/features/chat/ui/ChatInput.tsx
Renders selected skill chips and delegates skill-aware send behavior through focused hooks.

ui/goose2/src/features/chat/ui/ChatInputAttachments.tsx
Keeps attachment layout aligned with the updated composer chip area.

ui/goose2/src/features/chat/ui/ChatInputSelectionChips.tsx
Adds the selected-skill chip row for composer selections.

ui/goose2/src/features/chat/ui/ChatInputToolbar.tsx
Wires toolbar controls into the expanded composer state.

ui/goose2/src/features/chat/ui/ChatView.tsx
Passes selected-skill chat context into the composer.

ui/goose2/src/features/chat/ui/ComposerChip.tsx
Adds a reusable chip component for selected composer items.

ui/goose2/src/features/chat/ui/MentionAutocomplete.tsx
Supports skill autocomplete results alongside existing mention behavior.

ui/goose2/src/features/chat/ui/MessageBubble.tsx
Renders message metadata chips without showing assistant-only skill prompt text.

ui/goose2/src/features/chat/ui/MessageBubbleActions.tsx
Keeps message actions separated from the updated metadata chip rendering.

ui/goose2/src/features/chat/ui/MessageMetadataChip.tsx
Adds the reusable message-level metadata chip component.

ui/goose2/src/features/chat/ui/PersonaPicker.tsx
Adjusts picker integration around the updated composer controls.

ui/goose2/src/features/chat/ui/tests/ChatInput.asyncSend.test.tsx
Updates async send expectations for the new composer submit shape.

ui/goose2/src/features/chat/ui/tests/ChatInput.attachments.test.tsx
Updates attachment send tests for the skill-aware composer path.

ui/goose2/src/features/chat/ui/tests/ChatInput.skills.test.tsx
Covers selected skill chips, slash skill commands, colon-qualified skill names, and voice auto-submit behavior.

ui/goose2/src/features/chat/ui/tests/ChatInput.test.tsx
Updates core composer tests for selected skill draft state.

ui/goose2/src/features/chat/ui/tests/MentionAutocomplete.test.tsx
Covers skill mention autocomplete matching.

ui/goose2/src/features/chat/ui/tests/MessageBubble.skillChips.test.tsx
Covers rendering of sent-message skill chips.

ui/goose2/src/features/chat/ui/mentionDetection.ts
Adds mention detection utilities for composer text and skill autocomplete.

ui/goose2/src/features/home/ui/HomeScreen.test.tsx
Updates stale home screen picker expectations to the current agent/model selector.

ui/goose2/src/features/home/ui/HomeScreen.tsx
Passes the selected-skill chat callback from Home into Skills.

ui/goose2/src/features/skills/lib/skillChatPrompt.ts
Builds skill chat prompts and parses direct slash skill commands, including colon-qualified plugin skill names.

ui/goose2/src/features/skills/ui/SkillsListSections.tsx
Adds skill list actions for starting chat with a selected skill.

ui/goose2/src/features/skills/ui/SkillsView.tsx
Threads start-chat handlers into skill list sections.

ui/goose2/src/features/skills/ui/tests/SkillsView.test.tsx
Covers starting chat from the Skills view.

ui/goose2/src/shared/api/tests/acpNotificationHandler.test.ts
Covers skill replay chip reconstruction from ACP notifications.

ui/goose2/src/shared/api/acp.ts
Extends ACP message typing for skill metadata.

ui/goose2/src/shared/api/acpNotificationHandler.ts
Restores user-visible skill chips from persisted assistant-only prompt context.

ui/goose2/src/shared/api/acpSkillReplayChips.ts
Adds helpers for reconstructing skill chips during message replay.

ui/goose2/src/shared/i18n/locales/en/chat.json
Adds English copy for skill chip and composer affordances.

ui/goose2/src/shared/i18n/locales/es/chat.json
Adds Spanish copy for skill chip and composer affordances.

ui/goose2/src/shared/types/messages.ts
Adds message metadata fields for skill chips.

Reproduction Steps

  1. Open Goose 2 and go to Skills.
  2. Start a chat from a skill and confirm the new chat opens with that skill chip selected in the composer.
  3. In chat, type /, select a skill, enter a request, send it, and confirm the sent user bubble keeps the skill chip.
  4. Type a colon-qualified direct command such as /github:github triage this PR and confirm it resolves to a skill instead of sending as plain text.
  5. Enable voice auto-submit, select a skill chip, dictate a request that auto-submits, and confirm the skill chip is applied to the sent message and cleared afterward.
  6. Reload a session containing a skill-sent message and confirm replay shows the skill chip without exposing assistant-only instruction text.

Verification

  • pnpm typecheck
  • pnpm exec vitest run src/features/chat/ui/__tests__/ChatInput.skills.test.tsx src/features/chat/hooks/__tests__/useVoiceDictation.test.ts src/features/chat/hooks/__tests__/useChat.skillChips.test.ts src/shared/api/__tests__/acpNotificationHandler.test.ts src/features/home/ui/HomeScreen.test.tsx
  • pnpm exec biome lint on touched files
  • Full ui/goose2 pre-push hook passed: format, check, tests, build, cargo fmt --check, cargo clippy, and cargo check

Screenshots/Demos

Not included; this PR is interaction-heavy and covered by unit/integration tests.

Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Signed-off-by: morgmart <98432065+morgmart@users.noreply.github.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 662a4d9985

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/goose2/src/features/chat/hooks/useMentionHandlers.ts
@morgmart morgmart added this pull request to the merge queue Apr 28, 2026
Merged via the queue into main with commit 69efb79 Apr 28, 2026
23 of 24 checks passed
@morgmart morgmart deleted the morganm/skills-in-chat branch April 28, 2026 21:35
lifeizhou-ap added a commit that referenced this pull request Apr 30, 2026
* main: (24 commits)
  fix: copy and content improvements in goose2 (#8886)
  feat: make ollama host configurable in goose2 (#8912)
  polish sidebar navigation and project icons (#8896)
  fix: model picker stays usable during provider loading (#8900)
  feat: update provider row after saving credentials (#8914)
  feat: support google model inventory refresh (#8913)
  chore: Added goose 2 UI refactor review skill (#8903)
  blog: goose with peekaboo (#8884)
  blog: Built-in Local Inference blogpost. (#8808)
  perf: parallelize provider resolution and eagerly init SQLite pool (#8899)
  refactor: update goose2 credential management behind provider-scoped ACP/core API (#8887)
  fix: handle acp requests concurrently (#8781)
  build: set LLAMA_STATIC_CRT for Windows CUDA (#8901)
  perf: deduplicate _goose/providers/list RPC call at startup (#8873)
  chore: add a bit more instructions in the release pr (#8890)
  chore: disable spellcheck in model search (#8889)
  add skills to the chat composer (#8881)
  mergeable configs + cleanup (#8378)
  refactor: agent provider to use explicit type states (#8879)
  [goose2] MCP Apps: hydrate and replay app payloads in Goose2 (#8632)
  ...
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.

2 participants