feat(skills): list workspace skills without a session#1392
Conversation
🦋 Changeset detectedLatest commit: a4ebe34 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 034155a828
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| return modelProvider.skillsBySession.value[sid] ?? []; | ||
| if (sid) return modelProvider.skillsBySession.value[sid] ?? []; | ||
| const wid = activeWorkspaceId.value; | ||
| return wid ? (modelProvider.skillsByWorkspace.value[wid] ?? []) : []; |
There was a problem hiding this comment.
Handle pre-session skill commands before activation
When there is no active session, returning workspace skills here makes Composer treat /skill ... as a known slash command, so it clears the draft and emits command instead of going through handleSubmit/startSessionAndSendPrompt; App.vue then calls client.activateSkill(...), whose implementation returns immediately when activeSessionId is empty. In the onboarding composer for a workspace with any skill, selecting or typing that skill now silently does nothing rather than creating a session or sending the text.
Useful? React with 👍 / 👎.
034155a to
c8a20de
Compare
- add GET /api/v1/workspaces/{workspace_id}/skills backed by a listWorkspaceSkills core RPC and ISkillService.listForWorkDir, reusing the session skill-loading path so results match a new session
- web: populate the composer slash menu from workspace skills before a session exists, then fall back to session skills once one is active
c8a20de to
a4ebe34
Compare
Related Issue
No linked issue. This comes from a direct product need: the web composer could not offer skills while creating a new session, because skills were only discoverable through an existing session.
Problem
The Kimi server only exposed skills via
GET /api/v1/sessions/{session_id}/skills, so a client had to create a session before it could discover which skills were available. As a result the web composer's/menu was empty on the new-session (onboarding) screen, even though every workspace already has project / user / built-in skills that a session created there would see.What changed
GET /api/v1/workspaces/{workspace_id}/skills. It resolves the workspace to its root and scans the same skill roots a new session would (project + user + extra + built-in + enabled-plugin skills), so the result matches what a session created in that workspace would see. Backed by a newlistWorkspaceSkillscore RPC andISkillService.listForWorkDir; unknown workspaces map to40410 workspace.not_found./menu before a session exists, then falls back to the session's skills once one is active. No component changes were needed — the existing single skill read path gains a workspace fallback.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.