fix(vscode): open plan files from review - #2329
Draft
zhuyuy wants to merge 1 commit into
Draft
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
Related to MoonshotAI/kimi-cli#2317, reported against the legacy repository.
Problem
The current VS Code extension receives the complete
plan_reviewbody, so the missing-text part of the legacy report is already addressed. The plan file path is still flattened away when the SDK display is adapted to the Webview, though, leaving no way to open the full plan from the review or the completed tool card.The generic file-open RPC intentionally rejects absolute and workspace-external paths, so using it for session plans under the Kimi home directory would either fail or require weakening an unrelated security boundary.
What changed
openPlanFileRPC. The extension host reads the path from the active SDK session withgetPlan(), verifies that the file exists, and opens that trusted path in VS Code.openFileRPC restricted to workspace-contained files.Validation
apps/vscodeextension and Webview TypeScript checksgit diff --checkChecklist
gen-changesets; no changeset applies becauseapps/vscodeis not a changeset-managed publishable package.