You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8e69659
Browse filesBrowse the repository at this point in the historyBrowse files
fix(provider): resolve skills and slash commands against the workspace root
Both composer pickers are empty or incomplete in a packaged desktop build.
`DesktopEnvironment` sets the server's cwd to the user's home directory when
packaged (`isPackaged ? homeDirectory : appRoot`). `ServerProvider.skills` and
`ServerProvider.slashCommands` are produced once per provider instance against
that single cwd, but both are project-scoped:
- `ClaudeSkills` scans `<configDir>/skills` and `<cwd>/.claude/skills`, so the
"project" root resolves to `~/.claude/skills` for every project. A user who
keeps no skills there sees none at all, and `$` reports "No skills found".
- the CLI's init handshake reports project-scoped slash commands, so `/` lists
only the built-ins. Measured on one real workspace: the CLI reports 140
commands from the project root versus 48 from a neutral directory.
A provider is a machine-level installation in this model — version, auth and
models genuinely are per-machine — so rather than making the snapshot
project-aware this adds a workspace-scoped surface beside it:
- `ProviderInstance` gains optional `discoverSkillsForCwd` and
`discoverSlashCommandsForCwd`. Optional, so the other drivers are untouched.
- `ProviderRegistry` gains matching `*ForInstance` methods that follow the
existing `getProviderMaintenanceCapabilitiesForInstance` delegation pattern
and resolve empty when a driver cannot enumerate per directory.
- new `providers.workspaceSkills` RPC resolves
`thread.worktreePath ?? project.workspaceRoot` — the same idiom
`assets.createUrl` already uses — and is mapped to orchestration:read.
- the composer prefers the workspace result for `$` and `/`, falling back to
the snapshot, so an older server behaves exactly as before.
The RPC is keyed on the project with an optional thread, because the composer
is frequently on a draft thread that has no persisted row yet, and that is
precisely when the pickers matter.
`ClaudeDriver`'s capabilities cache is now keyed by cwd (capacity 16) instead
of holding a single entry probed against the server's cwd.
`makeClaudeCapabilitiesCacheKey` already included cwd and `ClaudeHome.test.ts`
already asserted that two cwds produce two keys, so this completes what the key
was designed for. Binary path and resolved HOME are constant within one
instance's scope, so keying on cwd preserves the isolation the composite key
provided. Cost is one CLI probe per workspace per existing 5-minute TTL:
measured ~1.6s cold, ~20ms warm.
Skills are deliberately still read from the filesystem rather than the init
handshake: `init.skills` carries bare names, while `ServerProviderSkill`
requires `path` and displays `description`, which only the scan can supply.
0 commit comments