feat(vscode): migrate extension to Node SDK - #1769
Conversation
|
❌ Nix build failed Hash mismatch in
Please update |
🦋 Changeset detectedLatest commit: c6af35d The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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: 2e3e73c8cb
ℹ️ 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".
| function serializeToolOutput(output: unknown): string { | ||
| if (typeof output === 'string') return output; | ||
| try { | ||
| return JSON.stringify(output, null, 2) ?? ''; |
There was a problem hiding this comment.
Preserve content-part tool outputs for live events
When a tool returns ContentPart[] output (for example media or MCP image results), this helper stringifies the array before sending it to the webview. The webview protocol and replay path already accept content-part arrays, so live runs render raw JSON/data payloads and then look different after reload. Keep arrays as arrays and only stringify non-content objects.
Useful? React with 👍 / 👎.
…plying the default
* feat(vscode): migrate extension to Node SDK * fix(vscode): address CI failures * fix(vis): handle token count records * fix(vscode): keep chat toolbar and header readable at narrow widths * fix(vscode): map yolo to core yolo permission and honor the global yolo setting * docs(vscode): record Node SDK migration design * docs(vscode): split breaking changes out of the 0.6.0 changelog * fix(vscode): keep a resumed session's thinking effort instead of reapplying the default * fix(vscode): announce session status when a view attaches so the display matches it * fix(vscode): align webview thinking effort handling with the TUI
* feat(vscode): migrate extension to Node SDK * fix(vscode): address CI failures * fix(vis): handle token count records * fix(vscode): keep chat toolbar and header readable at narrow widths * fix(vscode): map yolo to core yolo permission and honor the global yolo setting * docs(vscode): record Node SDK migration design * docs(vscode): split breaking changes out of the 0.6.0 changelog * fix(vscode): keep a resumed session's thinking effort instead of reapplying the default * fix(vscode): announce session status when a view attaches so the display matches it * fix(vscode): align webview thinking effort handling with the TUI
Related Issue
No linked issue. This implements the planned migration of the existing Kimi Code VS Code extension into this monorepo.
Problem
The released VS Code extension still runs a separately installed Python CLI over stdio. That duplicates runtime installation and session/config behavior, and prevents the editor integration from using the stable in-process TypeScript SDK and the same Kimi Code home as the terminal app.
What changed
apps/vscodewith the existing extension ID, commands, Webview, and target platform matrix@moonshot-ai/kimi-code-sdkv1 harnessmigration-legacyfor opt-in 0.5.x config/session migration, including already-migrated TUI homes and partial-failure reportingThe extension keeps version
0.6.0. Legacy OAuth and MCP OAuth credentials are not copied and require reauthorization. Concurrent writes to the same session from multiple processes are not supported.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.Validation
pnpm --filter kimi-code test— 263 passedpnpm exec vitest run packages/node-sdk/test— 226 passed, 1 todopnpm --filter @moonshot-ai/migration-legacy test— 191 passedpnpm --filter @moonshot-ai/agent-core test— 3853 passed, expected skips/failures unchangedpnpm --filter kimi-code buildpnpm sherifpnpm exec changeset statusgit diff --check origin/main...HEADThe VS Code-specific README and changelog are included; no separate CLI docs update is required.