feat(desktop): add Kimi Code VS Code extension support#375
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughKimi Code 拡張機能のサポートを追加し、VS Code の diff 表示で Changes
Sequence Diagram(s)sequenceDiagram
participant Ext as VS Code Extension<br/>(Kimi Code)
participant Worker as Extension Host<br/>Worker
participant Main as Main Process<br/>vscode-shim
participant Renderer as Renderer<br/>(File Viewer)
participant FS as File System
Ext->>Worker: executeCommand('vscode.diff',<br/>leftUri, rightUri, leftContent)
Worker->>Main: IPC: open-diff<br/>(leftUri, rightUri,<br/>leftContent)
Main->>Main: Resolve leftUri to<br/>file content or use<br/>leftContent if provided
alt leftContent provided
Main->>Main: Use inline leftContent
else Non-file scheme
Main->>FS: Fetch content from<br/>provider/resolver
FS-->>Main: content
end
Main->>Renderer: fireOpenDiff with<br/>inlineOriginalContent
Renderer->>Renderer: Store inlineOriginalContent<br/>& inlineOriginalContentKey
Renderer->>Renderer: Skip Git original fetch
Renderer->>Renderer: Use inline content<br/>as diff baseline
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4722b7f032
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca63fec841
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f8abf40da
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Extract 250-line glob utility (globToRegExp, expandBracePatterns, matchesAnyGlob, etc.) from workspace.ts into glob-utils.ts so it can be tested independently - Add 23 unit tests for glob matching, brace expansion, and directory prefix optimization - Replace magic number `-1` in showQuickPick separator filter with a named constant `QUICK_PICK_ITEM_KIND_SEPARATOR` Committed-by: GLM-5 via Crush <crush@charm.land>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61f51326e9
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The extraction to glob-utils.ts accidentally replaced `path.sep` with a literal `"/"`, making the function a no-op on Windows where backslashes would never be converted. Add a platform-aware test. Committed-by: GLM-5 via Crush <crush@charm.land>
Committed-by: GLM-5 via Crush <crush@charm.land>
Capture `workspaceFolderPath` as `rootPath` const before entering the closure so TypeScript narrows the type to `string`. Committed-by: GLM-5 via Crush <crush@charm.land>
Summary
Kimi Code (
moonshot-ai.kimi-code) VS Code 拡張を Superset Desktop で利用できるようにする。拡張登録・UI
KNOWN_EXTENSIONS/SUPPORTED_EXTENSIONSにmoonshot-ai.kimi-code/kimi.webviewを追加RightSidebarTab.Kimiを追加し、サイドバーとVscodeExtensionButtonsに Kimi タブを表示kimiを追加SiOpenai、Kimi →LuSparklesに整理VS Code Shim の補強
ExtensionContextにstorageUri/globalStorageUri/logUriを追加workspace.fs.readDirectoryを実装(シンボリックリンクの種別判定含む)workspace.findFilesの glob マッチングを自前実装に刷新(brace expansion{a,b}、character class[...]、**再帰対応)workspace.createFileSystemWatcherをfs.watchベースの実際の監視に更新(exclude glob によるディレクトリスキップ付き)TextEditor.edit()を実装(インメモリ上で行挿入 → 同期書き戻し)TextDocument/TextEditorにisDirty/isUntitledを追加workspace.openTextDocumentが非 file scheme URI をtextDocumentContentProvider経由で解決するよう修正window.showQuickPickでQuickPickItemKind.Separator(kind: -1) をフィルタするよう対応vscode.diffコマンドで非 file scheme の左辺 URI を content provider で解決して baseline content を renderer に渡すよう変更vscode.openで file scheme の場合にfireOpenFileを呼ぶよう修正vscode.openFolder/kimi.webview.focusを no-op でハンドルInline Baseline Diff パイプライン
fireOpenDiff/ IPC / tRPC subscription にleftContentフィールドを追加useVscodeDiffSync→ tabs store →FileViewerPane→useFileContentまでinlineOriginalContentを伝播inlineOriginalContentKeyでドキュメント同一性を管理し、Git 由来でない差分も diff viewer で表示可能にテスト・リファクタリング
globToRegExp,expandBracePatterns,matchesAnyGlob等)をglob-utils.tsに切り出し、23 件のユニットテストを追加showQuickPickのマジックナンバー-1をQUICK_PICK_ITEM_KIND_SEPARATOR定数に置き換えValidation
glob-utils.test.ts: 23 tests passgit diff --checkcleanNotes
vscode.openFolder/ settings 画面遷移は現状 no-op ベース。Superset 側の画面遷移導線までは未接続Summary by CodeRabbit
リリースノート
New Features
Tests
Refactor