chore: update JB docs and devex

This commit is contained in:
Test 2024-10-16 16:08:14 -07:00
parent bf03a32668
commit 14073e4831
18 changed files with 135 additions and 78 deletions

10
.gitignore vendored
View file

@ -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/**

View file

@ -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",

View file

@ -1 +0,0 @@
Continue IntelliJ Extension

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
</component>
</project>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View 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>

View file

@ -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>

View file

@ -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.
![run-extension-screenshot](../../media/run-intellij-extension.png)
### 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>

View file

@ -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
View file

@ -0,0 +1,6 @@
{
"name": "intellij",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

View file

@ -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
View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB