-
Notifications
You must be signed in to change notification settings - Fork 846
Jetbrains Extension Support #2129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: c654a6a 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces comprehensive JetBrains extension support for the Kilocode project. The implementation provides a bridge between JetBrains IDEs and the existing VS Code extension ecosystem, enabling Kilocode extensions to run natively within IntelliJ IDEA and other JetBrains IDEs.
Key changes include:
- Complete RPC protocol implementation for extension communication
- Extension process management and lifecycle handling
- Editor state synchronization between IDE and extensions
- File system event monitoring and workspace management
Reviewed Changes
Copilot reviewed 113 out of 218 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/ipc/*.kt | Core IPC infrastructure including message passing protocols, sockets, and load estimation |
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/editor/*.kt | Editor state management, tab handling, and document synchronization |
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/events/*.kt | Event bus system for workspace and webview events |
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/*.kt | Core extension management, RPC protocols, and process lifecycle |
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/commands/*.kt | Command registry and execution framework |
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/actors/*.kt | Main thread service implementations |
Comments suppressed due to low confidence (32)
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/ipc/MessageListener.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/ipc/LoadEstimator.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/ipc/ISocket.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/ipc/IMessagePassingProtocol.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/ipc/ILoadEstimator.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/ipc/ChunkStream.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/ipc/BufferedEmitter.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/events/WorkspaceEvents.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/events/WebviewEvents.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/events/EventBus.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/editor/WorkspaceEdit.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/editor/TabTypes.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/editor/TabStateManager.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/editor/EditorTypes.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/editor/EditorStateService.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/editor/EditorListener.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/editor/EditorHolder.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/editor/EditorCommands.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/editor/EditorAndDocManager.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/WorkspaceManager.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/ServiceProxyRegistry.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/RPCManager.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/PluginContext.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// Copyright 2009-2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/ExtensionUnixDomainSocketServer.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/ExtensionSocketServer.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/ExtensionProcessManager.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/ExtensionManager.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// Copyright 2009-2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/ExtensionIdentifier.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/ExtensionHostMessageType.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/core/ExtensionHostManager.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// Copyright 2009-2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/commands/Commands.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// Copyright 2009-2025 Weibo, Inc.
jetbrains/plugin/src/main/kotlin/ai/kilocode/jetbrains/actors/MainThreadWindowShape.kt:1
- New file is missing the required kilocode_change comment at the top. Add the comment '// kilocode_change - new file' as the first line.
// SPDX-FileCopyrightText: 2025 Weibo, Inc.
c73dc88
to
f4e0f1e
Compare
…ove deps handling This commit introduces significant improvements to how native modules and dependencies are handled within the JetBrains plugin. Key changes include: - **Architecture-specific native module loading**: The `genPlatform.gradle` script has been updated to support different architectures (arm64, x64) for native `.node` modules. It now creates architecture-specific directories and generates a JavaScript loader to dynamically select the correct native module at runtime based on the OS and architecture. This ensures compatibility across various macOS, Windows, and Linux environments. - **Enhanced dependency checking**: New `deps:check` scripts have been added to `jetbrains/host/package.json` and integrated into `turbo.json`. This ensures that the VS Code submodule is initialized and up-to-date before patching or copying dependencies, preventing issues with missing files. - **Streamlined dependency copying**: The `deps:copy` script now includes `mkdir -p` to ensure the target directory exists before copying, improving robustness. - **Simplified `npm install` for resources**: The `copy:resource-nodemodules` script in `jetbrains/plugin/package.json` now uses `npm install` directly instead of `npm ci` and removes the `package-lock.json` copy, simplifying the resource bundling process. These changes improve the build reliability, cross-platform compatibility, and overall maintainability of the JetBrains plugin.
Migrates the `check-dependencies.sh` script to a cross-platform Node.js version (`check-dependencies.js`). This change improves compatibility across Windows, macOS, and Linux environments for the JetBrains plugin build process. Updates `package.json` to use the new Node.js script and bumps `glob` and `rimraf` dependencies. The shell script is retained but modified to call the new Node.js script and include retry logic for CI environments.
abee4a6
to
b324387
Compare
0b60e7c
to
871a4f4
Compare
Adjust the CI pipeline to gracefully handle Java version discrepancies, particularly for JetBrains plugin builds. This update enables the `code-qa.yml` workflow to conditionally build the VSIX on Windows runners by excluding JetBrains components, acknowledging the platform's Java 17 limitations. Concurrently, the Java dependency check script now provides nuanced feedback in CI environments, issuing warnings for non-Java 17 versions on Linux/macOS and allowing continuation, while explicitly bypassing JetBrains plugin compilation on Windows CI where Java 17 is not guaranteed.
871a4f4
to
2990d37
Compare
1a9964e
to
8b5b03a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woof, what a monster PR! I left a bunch of comments, but let's meet up tomorrow and chat about things. Some of that kotlin code is absolutely wild, haha. Approving since all the changes in the extension are benign, but let's chat briefly and then merge tomorrow!
|
||
// Create ExtensionManager instance and register extension | ||
const extensionManager = new ExtensionManager() | ||
const rooCodeIdentifier = extensionManager.registerExtension("kilocode").identifier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roo - not sure if we want to rename all of these
// Promisify Node.js fs functions | ||
const fsStat = promisify(fs.stat) | ||
const fsReadDir = promisify(fs.readdir) | ||
const fsReadFile = promisify(fs.readFile) | ||
const fsWriteFile = promisify(fs.writeFile) | ||
const fsRename = promisify(fs.rename) | ||
const fsCopyFile = promisify(fs.copyFile) | ||
const fsUnlink = promisify(fs.unlink) | ||
const fsLstat = promisify(fs.lstat) | ||
const fsMkdir = promisify(fs.mkdir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { promises as fs } from "fs"
Could just use this?
/** | ||
* Update change-notes in plugin.xml based on version from gradle.properties and CHANGELOG.md | ||
*/ | ||
function updateChangeNotes() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool!
// Remove "Thanks @username!" mentions at the beginning | ||
.replace(/^Thanks\s+@[^!]+!\s*-?\s*/g, "") | ||
// Remove "Thanks @username!" mentions anywhere | ||
.replace(/Thanks\s+@[^!]+!\s*-?\s*/g, "") | ||
// Remove "Thanks @username" mentions (without exclamation) | ||
.replace(/Thanks\s+@[^,)]+[,)]\s*/g, "") | ||
// Remove standalone contributor mentions like "(thanks @username!)" | ||
.replace(/\(thanks\s+@[^)]+\)\s*/g, "") | ||
// Remove leftover "Thanks !" patterns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol but I get it
* Collection of predefined prompt configurations for different use cases. | ||
* Each configuration contains a template with placeholders for dynamic content. | ||
*/ | ||
object SupportPromptConfigs { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that we are keeping these in Kotlin! It'd think we'd want all prompt stuff to live in our core host and this would just delegate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, we have this for storybook! we could consolidate
apps/storybook/generated-theme-styles/dark-modern.css
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait, didn't I see this file already??
turbo.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#nit maybe add anywhere but the end to avoid conflicts when / if roo changes this
@hassoncs I am convinced the plugin was heavily vibed by Copilot - when I looked at the branch list on GH back when I did my PR, there were dozens and dozens of copilot/xxxx branches in there. But hey it works – we will just need lots of Kilo credits to work on it now. Welcome to the new technical debt! :-P |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Context
This PR introduces comprehensive JetBrains extension support for the Kilocode project. The implementation provides a bridge between JetBrains IDEs and the existing VS Code extension ecosystem, enabling Kilocode extensions to run natively within IntelliJ IDEA and other JetBrains IDEs.
Implementation
Screenshots