chore: update JB docs and devex
This commit is contained in:
parent
bf03a32668
commit
14073e4831
18 changed files with 135 additions and 78 deletions
10
.gitignore
vendored
10
.gitignore
vendored
|
|
@ -148,13 +148,6 @@ codeql
|
|||
**/**/build
|
||||
|
||||
**/.idea/**/*
|
||||
!**/.idea/.name
|
||||
!**/.idea/compiler.xml
|
||||
!**/.idea/gradle.xml
|
||||
!**/.idea/kotlinc.xml
|
||||
!**/.idea/misc.xml
|
||||
!**/.idea/vcs.xml
|
||||
!**/.idea/jarRepositories.xml
|
||||
core/.idea
|
||||
|
||||
continue_server.build
|
||||
|
|
@ -165,10 +158,9 @@ Icon?
|
|||
|
||||
.continue
|
||||
|
||||
|
||||
.prompts/
|
||||
.aider*
|
||||
|
||||
notes.md
|
||||
|
||||
manual-testing-sandbox/Continue/.idea/vcs.xml
|
||||
manual-testing-sandbox/Continue/.idea/**
|
||||
1
binary/package-lock.json
generated
1
binary/package-lock.json
generated
|
|
@ -93,6 +93,7 @@
|
|||
"sqlite": "^5.1.1",
|
||||
"sqlite3": "^5.1.7",
|
||||
"system-ca": "^1.0.3",
|
||||
"tar": "^7.4.3",
|
||||
"tree-sitter-wasms": "^0.1.11",
|
||||
"uuid": "^9.0.1",
|
||||
"vectordb": "^0.4.20",
|
||||
|
|
|
|||
1
extensions/intellij/.idea/.name
generated
1
extensions/intellij/.idea/.name
generated
|
|
@ -1 +0,0 @@
|
|||
Continue IntelliJ Extension
|
||||
6
extensions/intellij/.idea/compiler.xml
generated
6
extensions/intellij/.idea/compiler.xml
generated
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
||||
16
extensions/intellij/.idea/gradle.xml
generated
16
extensions/intellij/.idea/gradle.xml
generated
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
20
extensions/intellij/.idea/jarRepositories.xml
generated
20
extensions/intellij/.idea/jarRepositories.xml
generated
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
6
extensions/intellij/.idea/kotlinc.xml
generated
6
extensions/intellij/.idea/kotlinc.xml
generated
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="1.9.0" />
|
||||
</component>
|
||||
</project>
|
||||
8
extensions/intellij/.idea/misc.xml
generated
8
extensions/intellij/.idea/misc.xml
generated
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="17" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
6
extensions/intellij/.idea/vcs.xml
generated
6
extensions/intellij/.idea/vcs.xml
generated
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
31
extensions/intellij/.run/Run Continue (TCP).run.xml
Normal file
31
extensions/intellij/.run/Run Continue (TCP).run.xml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Run Continue (TCP)" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="env">
|
||||
<map>
|
||||
<entry key="USE_TCP" value="true" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/extensions/intellij" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="runIde" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2">
|
||||
<option name="RunConfigurationTask" enabled="true" run_configuration_name="Run Continue" run_configuration_type="GradleRunConfiguration" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
||||
|
|
@ -1,7 +1,12 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Run Plugin" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<configuration default="false" name="Run Continue" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<log_file alias="idea.log" path="$PROJECT_DIR$/extensions/intellij/build/idea-sandbox/system/log/idea.log" />
|
||||
<ExternalSystemSettings>
|
||||
<option name="env">
|
||||
<map>
|
||||
<entry key="ORG_GRADLE_PROJECT_platformVersion" value="2022.3.3" />
|
||||
</map>
|
||||
</option>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/extensions/intellij" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
|
|
@ -19,6 +24,7 @@
|
|||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
|
|
@ -1,3 +1,88 @@
|
|||
### Commands
|
||||
# Contributing to Continue (JetBrains) <!-- omit in toc -->
|
||||
|
||||
Verify plugin compatibility: `./gradlew verifyPlugin`
|
||||
This file is for contribution guidelines specific to the JetBrains extension. See the root [`CONTRIBUTING.md`](../../CONTRIBUTING.md) for general contribution guidelines.
|
||||
|
||||
## Table of Contents <!-- omit in toc -->
|
||||
|
||||
- [Architecture Overview](#architecture-overview)
|
||||
- [Environment Setup](#environment-setup)
|
||||
- [IDE Installation](#ide-installation)
|
||||
- [Node.js Requirements](#nodejs-requirements)
|
||||
- [Install all dependencies](#install-all-dependencies)
|
||||
- [Misc](#misc)
|
||||
- [Development Workflow](#development-workflow)
|
||||
- [Running the extension](#running-the-extension)
|
||||
- [Packaging](#packaging)
|
||||
- [Debugging](#debugging)
|
||||
- [Editor config](#editor-config)
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
This extension shares much of the code with the VS Code extension by utilizing shared code in the `core` directory and packaging it in a binary in the `binary` directory. Communication occurs over stdin/stdout.
|
||||
|
||||
## Environment Setup
|
||||
|
||||
### IDE Installation
|
||||
|
||||
We recommend using IntelliJ IDEA, which you can download from the [JetBrains website](https://www.jetbrains.com/idea/download).
|
||||
|
||||
Both Ultimate and Community (free) editions are suitable for this project. Continue is built with JDK version 17, as specified in [`./build.gradle.kts`](./build.gradle.kts).
|
||||
|
||||
### Node.js Requirements
|
||||
|
||||
This project requires Node.js version 20.11.0 (LTS) or higher. You have two options for installation:
|
||||
|
||||
1. Download and install directly from [nodejs.org](https://nodejs.org/en/download).
|
||||
2. If you're using NVM (Node Version Manager), set the correct Node.js version for this project by running `nvm use` in the project root.
|
||||
|
||||
### Install all dependencies
|
||||
|
||||
- Unix: `./scripts/install-dependencies.sh`
|
||||
- Windows: `.\scripts\install-dependencies.ps1`
|
||||
|
||||
### Misc
|
||||
|
||||
- Ensure that you have the Gradle plugin installed
|
||||
|
||||
## Development Workflow
|
||||
|
||||
### Running the extension
|
||||
|
||||
- Select the "Run Continue" Gradle configuration in the top-right corner of the IDE
|
||||
- Click the "Run" or "Debug" button
|
||||
- The first time running this will install the IDE version specified in [`./run/Run Continue.run.xml`](./.run/Run%20Continue.run.xml) (`platformVersion` property). This will take a moment as the install size can be close to 1GB.
|
||||
|
||||

|
||||
|
||||
### Packaging
|
||||
|
||||
This will generate a .zip file in [`extensions/intellij/build/distributions`](extensions/intellij/build/distributions) with the version defined in [`extensions/intellij/gradle.properties`](extensions/intellij/gradle.properties)
|
||||
|
||||
- Unix: `./gradlew build`
|
||||
- Windows: `./gradlew.bat build`
|
||||
|
||||
1. If you make changes:
|
||||
- You may need to re-build before running the "Build Plugin" configuration.
|
||||
- If you change code from the `core` or `binary` directories, run `npm run build` from the `binary` directory to create a new binary.
|
||||
- If you change code from the `gui` directory, run `npm run build` from the `gui` directory to create a new bundle.
|
||||
- Any changes to the Kotlin code in the `extensions/intellij` directory will be automatically included when you run "Build Plugin".
|
||||
|
||||
## Debugging
|
||||
|
||||
[CoreMessenger.kt](./src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt) file.
|
||||
|
||||
For the sake of rapid development, it is also possible to configure this communication to happen over local TCP sockets:
|
||||
|
||||
1. In [CoreMessenger.kt](./extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/CoreMessenger.kt), change the `useTcp` variable to `true`.
|
||||
2. Open a VS Code window (we recommend this for a preconfigured Typescript debugging experience) with the `continue` repository. Select the "Core Binary" debug configuration and press play.
|
||||
3. Run the "Run Plugin" Gradle configuration.
|
||||
4. You can now set breakpoints in any of the TypeScript files in VS Code. If you make changes to the code, restart the "Core Binary" debug configuration and reload the _Host IntelliJ_ window.
|
||||
|
||||
If you make changes to Kotlin code, they can often be hot-reloaded with "Run -> Debugging Actions -> Reload Changed Classes".
|
||||
You're right. The organization could be improved to make it more coherent and logical. Here's a suggestion for reorganizing the content:
|
||||
|
||||
## Editor config
|
||||
|
||||
Install the following two IntelliJ plugins to format Java and Kotlin on file save
|
||||
<https://plugins.jetbrains.com/plugin/8527-google-java-format>
|
||||
<https://plugins.jetbrains.com/plugin/14912-ktfmt>
|
||||
|
|
|
|||
|
|
@ -23,4 +23,4 @@ org.gradle.configuration-cache=true
|
|||
# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
|
||||
org.gradle.caching=true
|
||||
# Enable Gradle Kotlin DSL Lazy Property Assignment -> https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:assignment
|
||||
systemProp.org.gradle.unsafe.kotlin.assignment=true
|
||||
systemProp.org.gradle.unsafe.kotlin.assignment=true
|
||||
|
|
|
|||
6
extensions/intellij/package-lock.json
generated
Normal file
6
extensions/intellij/package-lock.json
generated
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"name": "intellij",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
||||
|
|
@ -295,8 +295,6 @@ class ContinueBrowser(val project: Project, url: String, useOsr: Boolean = false
|
|||
*
|
||||
* We use the branchNumber (e.g., 233) instead of the full version number (e.g., 2023.3.4) because
|
||||
* it's a simple integer without dot notation, making it easier to compare.
|
||||
*
|
||||
* @return Boolean True if off-screen rendering should be used, false otherwise.
|
||||
*/
|
||||
private fun shouldRenderOffScreen(): Boolean {
|
||||
val minBuildNumber = 233
|
||||
|
|
|
|||
1
gui/package-lock.json
generated
1
gui/package-lock.json
generated
|
|
@ -137,6 +137,7 @@
|
|||
"sqlite": "^5.1.1",
|
||||
"sqlite3": "^5.1.7",
|
||||
"system-ca": "^1.0.3",
|
||||
"tar": "^7.4.3",
|
||||
"tree-sitter-wasms": "^0.1.11",
|
||||
"uuid": "^9.0.1",
|
||||
"vectordb": "^0.4.20",
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB |
BIN
media/run-intellij-extension.png
Normal file
BIN
media/run-intellij-extension.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Loading…
Add table
Reference in a new issue