diff --git a/.vscode/settings.json b/.vscode/settings.json
index d07234a75..eaf1da238 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -14,8 +14,6 @@
}
},
"search.exclude": {
- "**/binary": true,
- "binary/": false,
"**/core/vendor/**": true,
"**/gui/dist": true,
"**/extensions/vscode/gui/**": true,
diff --git a/core/config/load.ts b/core/config/load.ts
index 4edb2da82..2064dd61d 100644
--- a/core/config/load.ts
+++ b/core/config/load.ts
@@ -674,7 +674,7 @@ function readConfigJs(): string | undefined {
return fs.readFileSync(configJsPath, "utf8");
}
-async function buildConfigTs(ide: IDE, ideType: IdeType) {
+async function buildConfigTsandReadConfigJs(ide: IDE, ideType: IdeType) {
const configTsPath = getConfigTsPath();
if (!fs.existsSync(configTsPath)) {
@@ -724,7 +724,7 @@ async function loadFullConfigNode(
let intermediate = await serializedToIntermediateConfig(serialized, ide);
// Apply config.ts to modify intermediate config
- const configJsContents = await buildConfigTs(ide, ideType);
+ const configJsContents = await buildConfigTsandReadConfigJs(ide, ideType);
if (configJsContents) {
try {
// Try config.ts first
diff --git a/core/indexing/ignore.ts b/core/indexing/ignore.ts
index 93ad7b43d..0b2714f1d 100644
--- a/core/indexing/ignore.ts
+++ b/core/indexing/ignore.ts
@@ -70,6 +70,7 @@ export const DEFAULT_IGNORE_FILETYPES = [
"*.bin",
"*.pag",
"*.swp",
+ "*.jsonl",
// "*.prompt", // can be incredibly confusing for the LLM to have another set of instructions injected into the prompt
];
diff --git a/.idea/runConfigurations/Run_Continue.xml b/extensions/intellij/.run/Run_Continue.xml
similarity index 80%
rename from .idea/runConfigurations/Run_Continue.xml
rename to extensions/intellij/.run/Run_Continue.xml
index 13c802366..59aa4a51a 100644
--- a/.idea/runConfigurations/Run_Continue.xml
+++ b/extensions/intellij/.run/Run_Continue.xml
@@ -2,6 +2,7 @@
+
\ No newline at end of file
diff --git a/extensions/intellij/.run/Tail_dev_logs.xml b/extensions/intellij/.run/Tail_dev_logs.xml
new file mode 100644
index 000000000..9f738c563
--- /dev/null
+++ b/extensions/intellij/.run/Tail_dev_logs.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extensions/intellij/CONTRIBUTING.md b/extensions/intellij/CONTRIBUTING.md
index 5ea6929f2..544cb6323 100644
--- a/extensions/intellij/CONTRIBUTING.md
+++ b/extensions/intellij/CONTRIBUTING.md
@@ -1,7 +1,6 @@
# Contributing to Continue (JetBrains extension)
-This file is for contribution guidelines specific to the JetBrains extension. See the root [
-`CONTRIBUTING.md`](../../CONTRIBUTING.md) for general contribution guidelines.
+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
@@ -18,6 +17,7 @@ This file is for contribution guidelines specific to the JetBrains extension. Se
- [Setting breakpoints](#setting-breakpoints)
- [Available Gradle tasks](#available-gradle-tasks)
- [Packaging](#packaging)
+ - [Testing the packaged extension](#testing-the-packaged-extension)
## Architecture Overview
@@ -57,22 +57,27 @@ This project requires Node.js version 20.11.0 (LTS) or higher. You have two opti
## Development Workflow
-Because the `gui` and `core` are written in TypeScript, our development workflow is built around the assumption that you have VS Code installed.
+Because the `gui` and `core` are written in TypeScript, our development workflow is built around the assumption that you
+have VS Code installed.
### Running the extension
- Open the project in VS Code and star the `Core binary` task
- Switch back to Intellij and select the "Run Continue" configuration in the top-right corner of the IDE
- Click the "Debug" button
- - The first time running this will install the IDE version specified by the `platformVersion` property in [`./run/Run Extension.run.xml`](./.run/Run%20Extension.run.xml). This will take a moment as the installation size can be close to 1GB.
+ - The first time running this will install the IDE version specified by the `platformVersion` property in [
+ `./run/Run Extension.run.xml`](./.run/Run%20Extension.run.xml). This will take a moment as the installation size
+ can be close to 1GB.
\
-This should open a new instance on IntelliJ with the extension installed and connected via TCP to the server started through the `Core binary` task.
+This should open a new instance on IntelliJ with the extension installed and connected via TCP to the server started
+through the `Core binary` task.
### Reloading changes
-- `extensions/intellij`: Attempt to reload changed classes by selecting `Run | Debugging Actions | Reload Changed Classes`
+- `extensions/intellij`: Attempt to reload changed classes by selecting
+ _Run | Debugging Actions | Reload Changed Classes`_
- This will often fail on new imports, schema changes etc. In that case, you need to stop and restart the extension
- `gui`: Changes will be reloaded automatically
- `core`: Run `npm run build` from the `binary` directory and restart the `Core binary` task in VS Code
@@ -103,8 +108,13 @@ verifyPluginConfiguration - Checks if Java and Kotlin compilers configuration me
### Packaging
-- Unix: `./gradlew build`
-- Windows: `./gradlew.bat build`
+- Unix: `./gradlew buildPlugin`
+- Windows: `./gradlew.bat buildPlugin`
-This will generate a .zip file in `./build/distributions` with the version defined in [
-`./gradle.properties`](./gradle.properties)
+This will generate a .zip file in `./build/distributions` with the version defined in [`./gradle.properties`](./gradle.properties)
+
+#### Testing the packaged extension
+
+- Navigate to the Plugins settings page (_Settings | Plugins_)
+- Click on the gear icon
+- Click _Install from disk_ and select the ZIP file in `./build/distributions`
diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt
index fbfb7c986..9beb8b0c8 100644
--- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt
+++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/InlineEditAction.kt
@@ -16,31 +16,33 @@ import com.intellij.openapi.editor.colors.EditorFontType
import com.intellij.openapi.editor.impl.EditorImpl
import com.intellij.openapi.project.DumbAware
import com.intellij.openapi.project.Project
+import com.intellij.openapi.util.IconLoader
import com.intellij.openapi.util.Ref
import com.intellij.openapi.util.TextRange
import com.intellij.ui.JBColor
import com.intellij.util.ui.JBUI
import com.intellij.util.ui.UIUtil
-import net.miginfocom.swing.MigLayout
-import org.jdesktop.swingx.JXPanel
-import org.jdesktop.swingx.JXTextArea
import java.awt.*
import java.awt.event.*
+import java.awt.geom.AffineTransform
import java.awt.geom.Path2D
+import java.awt.geom.RoundRectangle2D
import javax.swing.*
import javax.swing.border.EmptyBorder
import javax.swing.event.DocumentEvent
import javax.swing.event.DocumentListener
+import javax.swing.event.ListDataListener
import javax.swing.plaf.basic.BasicComboBoxUI
import kotlin.math.max
-import java.awt.geom.RoundRectangle2D
-import java.awt.geom.AffineTransform
-import javax.swing.event.ListDataListener
+import net.miginfocom.swing.MigLayout
+import org.jdesktop.swingx.JXPanel
+import org.jdesktop.swingx.JXTextArea
const val MAIN_FONT_SIZE = 13
fun makeTextArea(): JTextArea {
- val textArea = CustomTextArea(1, 40).apply {
+ val textArea =
+ CustomTextArea(1, 40).apply {
lineWrap = true
wrapStyleWord = true
isOpaque = false
@@ -49,9 +51,9 @@ fun makeTextArea(): JTextArea {
margin = JBUI.insets(6, 4, 6, 4)
font = UIUtil.getFontWithFallback("Arial", Font.PLAIN, MAIN_FONT_SIZE)
preferredSize = Dimension(400, 75)
- }
- textArea.putClientProperty(UIUtil.HIDE_EDITOR_FROM_DATA_CONTEXT_PROPERTY, true)
- return textArea
+ }
+ textArea.putClientProperty(UIUtil.HIDE_EDITOR_FROM_DATA_CONTEXT_PROPERTY, true)
+ return textArea
}
fun makePanel(
@@ -67,249 +69,270 @@ fun makePanel(
onAccept: () -> Unit,
onReject: () -> Unit
): JPanel {
- val topPanel = ShadowPanel(MigLayout("wrap 1, insets 2 ${leftInset} 2 2, gap 0!")).apply {
+ val topPanel =
+ ShadowPanel(MigLayout("wrap 1, insets 2 ${leftInset} 2 2, gap 0!")).apply {
background = JBColor(0x20888888.toInt(), 0x20888888.toInt())
isOpaque = false
- }
+ }
- val panel = CustomPanel(
- MigLayout("wrap 1, insets 4 10 0 2, gap 0!, fillx"),
- project,
- modelTitles,
- comboBoxRef,
- onEnter,
- onCancel,
- onAccept,
- onReject,
- textArea
- ).apply {
- val globalScheme = EditorColorsManager.getInstance().globalScheme
- val defaultBackground = globalScheme.defaultBackground
- background = defaultBackground
- add(textArea, "grow, gap 0!, height 100%")
+ val panel =
+ CustomPanel(
+ MigLayout("wrap 1, insets 4 10 0 2, gap 0!, fillx"),
+ project,
+ modelTitles,
+ comboBoxRef,
+ onEnter,
+ onCancel,
+ onAccept,
+ onReject,
+ textArea)
+ .apply {
+ val globalScheme = EditorColorsManager.getInstance().globalScheme
+ val defaultBackground = globalScheme.defaultBackground
+ background = defaultBackground
+ add(textArea, "grow, gap 0!, height 100%")
- putClientProperty(UIUtil.HIDE_EDITOR_FROM_DATA_CONTEXT_PROPERTY, true)
- preferredSize = textArea.preferredSize
- setup()
- }
+ putClientProperty(UIUtil.HIDE_EDITOR_FROM_DATA_CONTEXT_PROPERTY, true)
+ preferredSize = textArea.preferredSize
+ setup()
+ }
- customPanelRef.set(panel)
+ customPanelRef.set(panel)
- textArea.addComponentListener(object : ComponentAdapter() {
+ textArea.addComponentListener(
+ object : ComponentAdapter() {
override fun componentResized(e: ComponentEvent?) {
- panel.revalidate()
- panel.repaint()
+ panel.revalidate()
+ panel.repaint()
}
- })
+ })
- topPanel.add(panel, "grow, gap 0!")
+ topPanel.add(panel, "grow, gap 0!")
- return topPanel
+ return topPanel
}
fun openInlineEdit(project: Project?, editor: Editor) {
- if (project == null) return
+ if (project == null) return
- // Don't open in terminal
- if (EditorUtils().isTerminal(editor)) {
- return
- }
+ // Don't open in terminal
+ if (EditorUtils().isTerminal(editor)) {
+ return
+ }
- val manager = EditorComponentInlaysManager.from(editor, true)
+ val manager = EditorComponentInlaysManager.from(editor, true)
- // Get list of model titles
- val continuePluginService = project.service()
- val modelTitles = mutableListOf()
- continuePluginService.coreMessenger?.request("config/getSerializedProfileInfo", null, null) { response ->
- val config = response as Map
- val models = (config["config"] as Map)["models"] as List