Repository navigation
Add native chat skill picker with host-aware discovery - #9480
Conversation
Adds a unified, keyboard-first skill and command picker to native chat that: - Uses agent-native invocation syntax (slash for Claude/OpenClaude/Grok, dollar for Codex) - Discovers skills only on the pane's execution host (local, WSL, SSH-unavailable, or runtime) - Groups or separates commands and skills per agent configuration - Deduplicates by canonical path but preserves visibility through all contributing roots - Handles IME composition, loading states, and errors without claiming PTY-level control - Records picker telemetry (open, item accepted, send classification, discovery outcomes) - Extends shared agent profiles to define per-agent skill grammars and source ownership
Clean up stale design specs, implementation plans, and investigation notes from docs/reference/. These documents predate the current implementation and are no longer actively maintained or referenced by the codebase.
- Move skill comparison and source classification to shared module for native/WSL reuse - Extract display text sanitization to prevent control/zero-width character spoofing - Add native-chat command envelope parser and surfacer for skill invocations - Extend discovery timeout backstop to account for WSL metadata read sequence
Translate skill picker UI strings including commands, skills, loading states, error messages, and scope labels for the new skill picker feature across four language locales.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (39)
📝 WalkthroughWalkthroughAdds a unified native chat command and skill picker with agent-specific profiles, ranking, sanitization, keyboard handling, telemetry, localization, and transcript normalization. Skill discovery now supports native and WSL targets, Claude plugin sources, runtime resolution, canonical-path deduplication, ownership metadata, caching, and structured errors. The web preload API propagates discovery failures. Documentation tracking is narrowed and stale source references are removed. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/src/components/native-chat/NativeChatComposer.tsx (1)
261-292: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAttached images are silently dropped when the send is classified as a command/unknown token.
When
classifySend(text)returns anything other than'chat',send()sendstextvia plainsendNativeChatMessageand never passesimagePaths— butclearImageAttachments()still runs unconditionally at the end. If a user attaches an image and then sends text that starts with the agent's slash/skill prefix (a verified command, or just unrecognized text starting with//$), the image is discarded without ever being sent and without any notice to the user.🐛 Proposed fix
const classification = classifySend(text) let pendingHandle: NativeChatSendHandle | null = null - if (classification !== 'chat') { + if (classification !== 'chat' && imagePaths.length === 0) { pendingHandle = sendNativeChatMessage(target.settings, target.ptyId, text) } else if (imagePaths.length > 0) { pendingHandle = sendNativeChatMessageWithImageAttachments( target.settings, target.ptyId, text, imagePaths ) } else if (text.trim().length > 0) { pendingHandle = sendNativeChatMessage(target.settings, target.ptyId, text) } else { submitNativeChatPrompt(target.settings, target.ptyId) }Alternatively, surface a
setNotice(...)warning before dropping the attachment so the loss isn't silent.Also applies to: 318-320
🧹 Nitpick comments (3)
src/shared/skills.ts (1)
84-102: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse
z.discriminatedUnion('status', ...)for the outer runtime union.
ResolvedProjectRuntimeSchema/RepairProjectRuntimeSchemaare combined with a plainz.union, even thoughstatusis a clean, unique discriminator across both branches — the same pattern already used one level down forkindat Line 58. Per Zod's docs, plain unions check options sequentially, whilediscriminatedUniondoes O(1) lookup and gives clearer "no matching discriminator" errors, which is preferable at this IPC/RPC trust boundary.♻️ Suggested change
- projectRuntime: z.union([ResolvedProjectRuntimeSchema, RepairProjectRuntimeSchema]).optional() + projectRuntime: z + .discriminatedUnion('status', [ResolvedProjectRuntimeSchema, RepairProjectRuntimeSchema]) + .optional()src/main/runtime/rpc/methods/skills.test.ts (1)
45-55: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCorrect the Windows path fixture string.
The string
'C\\\\repo'evaluates toC\\repo. To represent a typical Windows pathC:\repo, use'C:\\repo'.♻️ Proposed fix
- { cwd: 'C\\\\repo', worktreeId: 'worktree-1' }, + { cwd: 'C:\\repo', worktreeId: 'worktree-1' },src/main/skills/discovery.ts (1)
227-233: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winClaude plugin discovery ignores
includeCwd.Repo-root scanning gates
cwdinclusion onargs.includeCwd !== false, but the plugin-roots branch here only checksargs.cwdtruthiness. A caller passingcwdwithincludeCwd: false(expecting cwd-scoped scanning to be fully suppressed) would still trigger Claude plugin discovery against thatcwd, which contradicts the flag's documented purpose. No current caller in this cohort hits that combination, but it's a latent inconsistency in a publicdiscoverSkillscontract.♻️ Proposed fix
const roots = [ ...buildSkillDiscoverySources({ ...args, homeDir }), // Why: plugin discovery is native-chat data keyed to an explicit workspace. // Untargeted scans (Settings) keep their pre-picker inventory and cost. - ...(args.cwd ? await discoverClaudePluginSkillSources({ homeDir, cwd: args.cwd }) : []) + ...(args.cwd && args.includeCwd !== false + ? await discoverClaudePluginSkillSources({ homeDir, cwd: args.cwd }) + : []) ]
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: b583ab90-c38f-4195-9be0-d3216459a7f9
📒 Files selected for processing (81)
.gitignoredocs/reference/2026-06-27-orca-mobile-manual-network-address-design.mddocs/reference/README.mddocs/reference/agent-hook-stdin-lifecycle.mddocs/reference/agent-session-resume-cli-evidence.mddocs/reference/browser-local-https-certificate-trust.mddocs/reference/direct-url-or-file-entry.mddocs/reference/feature-discovery-interaction-tracking.mddocs/reference/feature-education-retention-analytics.mddocs/reference/feature-education-state.mddocs/reference/git-compatibility.mddocs/reference/headless-linux-server.mddocs/reference/keyboard-layout-shortcut-dispatch.mddocs/reference/new-user-parallel-work-telemetry.mddocs/reference/opencode-commit-message-stdin.mddocs/reference/plans/2026-06-27-orca-mobile-manual-network-address.mddocs/reference/plans/2026-07-10-ssh-repo-host-reconciliation.mddocs/reference/project-ordering-mode.mddocs/reference/reliability-gates-implementation-plan.mddocs/reference/reliability-pain-points-2026-06-30.mddocs/reference/ssh-gssapi-kerberos.mddocs/reference/ssh-typing-latency-under-relay-load.mddocs/reference/telemetry-availability.mddocs/reference/terminal-cold-park-reveal-cost.mddocs/reference/terminal-hidden-view-parking.mddocs/reference/terminal-model-view-contract.mddocs/reference/terminal-query-authority.mddocs/reference/terminal-session-lifecycle.mddocs/reference/terminal-side-effect-authority.mddocs/reference/terminal-switch-typing-lag-investigation.mdsrc/main/ipc/skills.test.tssrc/main/ipc/skills.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/rpc/methods/skills.test.tssrc/main/runtime/rpc/methods/skills.tssrc/main/skills/claude-plugin-skill-sources-wsl.test.tssrc/main/skills/claude-plugin-skill-sources-wsl.tssrc/main/skills/claude-plugin-skill-sources.test.tssrc/main/skills/claude-plugin-skill-sources.tssrc/main/skills/discovery.test.tssrc/main/skills/discovery.tssrc/main/skills/skill-discovery-sources.tssrc/main/skills/skill-discovery-target.tssrc/main/skills/skill-discovery-wsl-plugins.test.tssrc/main/skills/skill-discovery-wsl.test.tssrc/main/skills/skill-discovery-wsl.tssrc/main/skills/skill-freshness-inventory-limits.test.tssrc/renderer/src/components/native-chat/NativeChatAutocompleteMenus.test.tsxsrc/renderer/src/components/native-chat/NativeChatAutocompleteMenus.tsxsrc/renderer/src/components/native-chat/NativeChatComposer.test.tsxsrc/renderer/src/components/native-chat/NativeChatComposer.tsxsrc/renderer/src/components/native-chat/NativeChatComposerField.tsxsrc/renderer/src/components/native-chat/native-chat-agent-commands.tssrc/renderer/src/components/native-chat/native-chat-composer-state.test.tssrc/renderer/src/components/native-chat/native-chat-composer-state.tssrc/renderer/src/components/native-chat/native-chat-picker-items.tssrc/renderer/src/components/native-chat/native-chat-skill-discovery-context.tssrc/renderer/src/components/native-chat/use-native-chat-composer-keydown.test.tsxsrc/renderer/src/components/native-chat/use-native-chat-composer-keydown.tssrc/renderer/src/components/native-chat/use-native-chat-live-session.tssrc/renderer/src/components/native-chat/use-native-chat-picker-command-dispatch.tssrc/renderer/src/components/native-chat/use-native-chat-picker-state.tssrc/renderer/src/components/native-chat/use-native-chat-skills.react.test.tsxsrc/renderer/src/components/native-chat/use-native-chat-skills.test.tssrc/renderer/src/components/native-chat/use-native-chat-skills.tssrc/renderer/src/components/native-chat/use-native-chat-typed-insertion.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/native-chat-telemetry.tssrc/renderer/src/web/web-preload-api.test.tssrc/renderer/src/web/web-preload-api.tssrc/shared/native-chat-agent-profiles.test.tssrc/shared/native-chat-agent-profiles.tssrc/shared/native-chat-command-envelope.test.tssrc/shared/native-chat-command-envelope.tssrc/shared/skill-display-text.tssrc/shared/skills.tssrc/shared/telemetry-events.ts
💤 Files with no reviewable changes (29)
- docs/reference/terminal-hidden-view-parking.md
- docs/reference/feature-discovery-interaction-tracking.md
- docs/reference/terminal-model-view-contract.md
- docs/reference/keyboard-layout-shortcut-dispatch.md
- docs/reference/plans/2026-07-10-ssh-repo-host-reconciliation.md
- docs/reference/README.md
- docs/reference/new-user-parallel-work-telemetry.md
- docs/reference/2026-06-27-orca-mobile-manual-network-address-design.md
- docs/reference/telemetry-availability.md
- docs/reference/git-compatibility.md
- docs/reference/terminal-query-authority.md
- docs/reference/direct-url-or-file-entry.md
- docs/reference/agent-session-resume-cli-evidence.md
- docs/reference/terminal-cold-park-reveal-cost.md
- docs/reference/feature-education-retention-analytics.md
- docs/reference/browser-local-https-certificate-trust.md
- docs/reference/agent-hook-stdin-lifecycle.md
- docs/reference/terminal-side-effect-authority.md
- docs/reference/opencode-commit-message-stdin.md
- docs/reference/plans/2026-06-27-orca-mobile-manual-network-address.md
- docs/reference/headless-linux-server.md
- docs/reference/ssh-typing-latency-under-relay-load.md
- docs/reference/feature-education-state.md
- docs/reference/ssh-gssapi-kerberos.md
- src/renderer/src/components/native-chat/native-chat-agent-commands.ts
- docs/reference/project-ordering-mode.md
- docs/reference/terminal-switch-typing-lag-investigation.md
- docs/reference/terminal-session-lifecycle.md
- docs/reference/reliability-pain-points-2026-06-30.md
- Fix i18n plural handling: rename `count` to `sourceCount` to prevent unintended plural-key resolution in localized strings - Fix skill discovery array mutations: copy `root.providers` to prevent bugs during dedup merge - Fix image attachments being silently dropped when message text starts with /skill or agent prefix - Extract `quoteBashString` utility for WSL command code reuse across builders - Add line-separator safety characters (0x2028/0x2029) to skill display filter - Remove stale doc reference links and clarify inline comments
Track previously untracked operational guides in `docs/reference/` that explain Git binary compatibility requirements across host types and how to run `orca serve` on headless Linux. Update AGENTS.md and README.md to link to these references.
* Add native chat skill and command picker with host-aware discovery Adds a unified, keyboard-first skill and command picker to native chat that: - Uses agent-native invocation syntax (slash for Claude/OpenClaude/Grok, dollar for Codex) - Discovers skills only on the pane's execution host (local, WSL, SSH-unavailable, or runtime) - Groups or separates commands and skills per agent configuration - Deduplicates by canonical path but preserves visibility through all contributing roots - Handles IME composition, loading states, and errors without claiming PTY-level control - Records picker telemetry (open, item accepted, send classification, discovery outcomes) - Extends shared agent profiles to define per-agent skill grammars and source ownership * Remove obsolete reference and design documentation Clean up stale design specs, implementation plans, and investigation notes from docs/reference/. These documents predate the current implementation and are no longer actively maintained or referenced by the codebase. * Extract shared skill discovery utilities and add skill invocation envelo - Move skill comparison and source classification to shared module for native/WSL reuse - Extract display text sanitization to prevent control/zero-width character spoofing - Add native-chat command envelope parser and surfacer for skill invocations - Extend discovery timeout backstop to account for WSL metadata read sequence * Localize skill picker UI for Spanish, Japanese, Korean, Chinese Translate skill picker UI strings including commands, skills, loading states, error messages, and scope labels for the new skill picker feature across four language locales. * Fix skill picker bugs and improve code robustness - Fix i18n plural handling: rename `count` to `sourceCount` to prevent unintended plural-key resolution in localized strings - Fix skill discovery array mutations: copy `root.providers` to prevent bugs during dedup merge - Fix image attachments being silently dropped when message text starts with /skill or agent prefix - Extract `quoteBashString` utility for WSL command code reuse across builders - Add line-separator safety characters (0x2028/0x2029) to skill display filter - Remove stale doc reference links and clarify inline comments * Add reference docs for git compatibility and headless Linux server setup Track previously untracked operational guides in `docs/reference/` that explain Git binary compatibility requirements across host types and how to run `orca serve` on headless Linux. Update AGENTS.md and README.md to link to these references.
Summary
Unifies native chat's slash command and skill autocomplete into a single picker with host-aware skill discovery. Supports local discovery, WSL distros, remote runtimes, and Claude plugins as skill sources.
Key additions:
/prefix for slash,$prefix for Codex dollar skills)skill-discovery-target.tsthat routes to native, WSL, or runtime skill scannersclaude-plugin-skill-sources.tsnative-chat-agent-profiles.ts) defining picker grammar per agentnative-chat-command-envelope.ts) to surface non-catalog skill sends as user turnsRefactoring:
NativeChatPickerMenuCleanup:
docs/reference/) that were local planning sketches.gitignoreto stop tracking the reference directoryTesting
Cross-platform notes
wsl.exesubprocess