Skip to content

feat(skills): list workspace skills without a session#1392

Merged
sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:feat/workspace-skills
Jul 5, 2026
Merged

feat(skills): list workspace skills without a session#1392
sailist merged 1 commit into
MoonshotAI:mainfrom
sailist:feat/workspace-skills

Conversation

@sailist

@sailist sailist commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

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

  • Added 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 new listWorkspaceSkills core RPC and ISkillService.listForWorkDir; unknown workspaces map to 40410 workspace.not_found.
  • Web: the composer now loads skills for the active workspace and shows them in the / 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.
  • Added e2e coverage (session-less listing, parity with the session listing, unknown-workspace 404) and updated the API surface snapshot.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

@changeset-bot

changeset-bot Bot commented Jul 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a4ebe34

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@moonshot-ai/kimi-code Patch

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

@pkg-pr-new

pkg-pr-new Bot commented Jul 5, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@a4ebe34
npx https://pkg.pr.new/@moonshot-ai/kimi-code@a4ebe34

commit: a4ebe34

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

Copy link
Copy Markdown

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: 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] ?? []) : [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@sailist sailist force-pushed the feat/workspace-skills branch from 034155a to c8a20de Compare July 5, 2026 09:33
- 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
@sailist sailist force-pushed the feat/workspace-skills branch from c8a20de to a4ebe34 Compare July 5, 2026 09:39
@sailist sailist merged commit 4963c90 into MoonshotAI:main Jul 5, 2026
10 checks passed
This was referenced Jul 5, 2026
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.

1 participant