diff --git a/.gitignore b/.gitignore
index 03db26b8e..78880810a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -147,20 +147,20 @@ codeql
**/**/.qodana
**/**/build
-**/.idea/**/*
-core/.idea
-
continue_server.build
continue_server.dist
Icon
Icon?
-.continue
-
.prompts/
.aider*
notes.md
-manual-testing-sandbox/Continue/.idea/**
\ No newline at end of file
+manual-testing-sandbox/.idea/**
+extensions/intellij/.idea/**
+
+**/.idea/workspace.xml
+**/.idea/usage.statistics.xml
+**/.idea/shelf/
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 000000000..c0d78d1d5
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+Continue IntelliJ Extension
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 000000000..49630cce2
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 000000000..79ee123c2
--- /dev/null
+++ b/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 000000000..b589d56e9
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/git_toolbox_blame.xml b/.idea/git_toolbox_blame.xml
new file mode 100644
index 000000000..7dc124965
--- /dev/null
+++ b/.idea/git_toolbox_blame.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 000000000..6733405f9
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 000000000..fdc392fe8
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 000000000..fdf8d994a
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/ktfmt.xml b/.idea/ktfmt.xml
new file mode 100644
index 000000000..bfb71662f
--- /dev/null
+++ b/.idea/ktfmt.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 000000000..efa79f7df
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 000000000..5b1c3f963
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/com.github.continuedev.continueintellijextension.continue-intellij-extension.main.iml b/.idea/modules/com.github.continuedev.continueintellijextension.continue-intellij-extension.main.iml
new file mode 100644
index 000000000..d2841a905
--- /dev/null
+++ b/.idea/modules/com.github.continuedev.continueintellijextension.continue-intellij-extension.main.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/prettier.xml b/.idea/prettier.xml
new file mode 100644
index 000000000..b0c1c68fb
--- /dev/null
+++ b/.idea/prettier.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 000000000..35eb1ddfb
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/binary/package-lock.json b/binary/package-lock.json
index 932419aa6..11191c775 100644
--- a/binary/package-lock.json
+++ b/binary/package-lock.json
@@ -117,6 +117,7 @@
"@types/node-fetch": "^2.6.11",
"@types/pg": "^8.11.6",
"@types/request": "^2.48.12",
+ "@types/tar": "^6.1.13",
"@types/uuid": "^9.0.7",
"@types/win-ca": "^3.5.4",
"cross-env": "^7.0.3",
diff --git a/core/util/paths.ts b/core/util/paths.ts
index 864fc2c68..3002892ca 100644
--- a/core/util/paths.ts
+++ b/core/util/paths.ts
@@ -3,9 +3,9 @@ import dotenv from "dotenv";
import * as fs from "fs";
import * as os from "os";
import * as path from "path";
-import { defaultConfig, defaultConfigJetBrains } from "../config/default.js";
-import Types from "../config/types.js";
-import { IdeType, SerializedContinueConfig } from "../index.js";
+import { defaultConfig, defaultConfigJetBrains } from "../config/default";
+import Types from "../config/types";
+import { IdeType, SerializedContinueConfig } from "../";
dotenv.config();
diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/ServerConstants.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/ServerConstants.kt
index ece322284..5a1b8af0e 100644
--- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/ServerConstants.kt
+++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/ServerConstants.kt
@@ -1,51 +1,31 @@
+/**
+ * Note: This file is out of sync with the contents of core/util/paths.ts, which we use in VS Code.
+ * This is potentially causing JetBrains specific bugs.
+ */
package com.github.continuedev.continueintellijextension.constants
-import java.io.File
import java.nio.file.Files
import java.nio.file.Paths
-const val DEFAULT_CONFIG = """
+// Uncertain if this is being used anywhere since we also attempt to write a default config in
+// core/util/paths.ts
+const val DEFAULT_CONFIG =
+ """
{
"models": [
{
- "title": "GPT-4",
- "provider": "free-trial",
- "model": "gpt-4"
- },
- {
- "title": "GPT-3.5-Turbo",
- "provider": "free-trial",
- "model": "gpt-3.5-turbo"
- },
- {
- "title": "Phind CodeLlama",
- "provider": "free-trial",
- "model": "phind-codellama-34b"
- },
- {
- "title": "Gemini Pro",
- "provider": "free-trial",
- "model": "gemini-pro"
- }
- ],
- "slashCommands": [
- {
- "name": "edit",
- "description": "Edit highlighted code"
- },
- {
- "name": "comment",
- "description": "Write comments for the highlighted code"
- },
- {
- "name": "share",
- "description": "Export the current chat session to markdown"
- },
- {
- "name": "cmd",
- "description": "Generate a shell command"
+ "model": "claude-3-5-sonnet-20240620",
+ "provider": "anthropic",
+ "apiKey": "",
+ "title": "Claude 3.5 Sonnet"
}
],
+ "tabAutocompleteModel": {
+ "title": "Codestral",
+ "provider": "mistral",
+ "model": "codestral-latest",
+ "apiKey": ""
+ },
"customCommands": [
{
"name": "test",
@@ -54,17 +34,43 @@ const val DEFAULT_CONFIG = """
}
],
"contextProviders": [
- { "name": "diff", "params": {} },
{
- "name": "open",
+ "name": "diff",
"params": {}
},
- { "name": "terminal", "params": {} }
- ]
+ {
+ "name": "folder",
+ "params": {}
+ },
+ {
+ "name": "codebase",
+ "params": {}
+ }
+ ],
+ "slashCommands": [
+ {
+ "name": "edit",
+ "description": "Edit selected code"
+ },
+ {
+ "name": "comment",
+ "description": "Write comments for the selected code"
+ },
+ {
+ "name": "share",
+ "description": "Export the current chat session to markdown"
+ },
+ {
+ "name": "commit",
+ "description": "Generate a git commit message"
+ }
+ ],
+ "docs": []
}
"""
-const val DEFAULT_CONFIG_JS = """
+const val DEFAULT_CONFIG_JS =
+ """
function modifyConfig(config) {
return config;
}
@@ -74,102 +80,69 @@ export {
"""
fun getContinueGlobalPath(): String {
- val continuePath = Paths.get(System.getProperty("user.home"), ".continue")
- if (Files.notExists(continuePath)) {
- Files.createDirectories(continuePath)
- }
- return continuePath.toString()
+ val continuePath = Paths.get(System.getProperty("user.home"), ".continue")
+ if (Files.notExists(continuePath)) {
+ Files.createDirectories(continuePath)
+ }
+ return continuePath.toString()
}
fun getContinueRemoteConfigPath(remoteHostname: String): String {
- val path = Paths.get(getContinueGlobalPath(), ".configs")
- if (Files.notExists(path)) {
- Files.createDirectories(path)
- }
- return Paths.get(path.toString(), remoteHostname).toString()
+ val path = Paths.get(getContinueGlobalPath(), ".configs")
+ if (Files.notExists(path)) {
+ Files.createDirectories(path)
+ }
+ return Paths.get(path.toString(), remoteHostname).toString()
}
-
fun getConfigJsonPath(remoteHostname: String? = null): String {
- val path = Paths.get(
- if (remoteHostname != null) getContinueRemoteConfigPath(remoteHostname) else getContinueGlobalPath(),
- "config.json"
- )
- if (Files.notExists(path)) {
- Files.createFile(path)
- Files.writeString(path, if (remoteHostname == null) DEFAULT_CONFIG else "{}")
- }
- return path.toString()
+ val path =
+ Paths.get(
+ if (remoteHostname != null) getContinueRemoteConfigPath(remoteHostname)
+ else getContinueGlobalPath(),
+ "config.json")
+ if (Files.notExists(path)) {
+ Files.createFile(path)
+ Files.writeString(path, if (remoteHostname == null) DEFAULT_CONFIG else "{}")
+ }
+ return path.toString()
}
fun getConfigJsPath(remoteHostname: String? = null): String {
- val path = Paths.get(
- if (remoteHostname != null) getContinueRemoteConfigPath(remoteHostname) else getContinueGlobalPath(),
- "config.js"
- )
- if (Files.notExists(path)) {
- Files.createFile(path)
- Files.writeString(path, DEFAULT_CONFIG_JS);
- }
- return path.toString()
+ val path =
+ Paths.get(
+ if (remoteHostname != null) getContinueRemoteConfigPath(remoteHostname)
+ else getContinueGlobalPath(),
+ "config.js")
+ if (Files.notExists(path)) {
+ Files.createFile(path)
+ Files.writeString(path, DEFAULT_CONFIG_JS)
+ }
+ return path.toString()
}
fun getSessionsDir(): String {
- val path = Paths.get(getContinueGlobalPath(), "sessions")
- if (Files.notExists(path)) {
- Files.createDirectories(path)
- }
- return path.toString()
+ val path = Paths.get(getContinueGlobalPath(), "sessions")
+ if (Files.notExists(path)) {
+ Files.createDirectories(path)
+ }
+ return path.toString()
}
fun getSessionsListPath(): String {
- val path = Paths.get(getSessionsDir(), "sessions.json")
- if (Files.notExists(path)) {
- Files.createFile(path)
- Files.writeString(path, "[]");
- }
- return path.toString()
+ val path = Paths.get(getSessionsDir(), "sessions.json")
+ if (Files.notExists(path)) {
+ Files.createFile(path)
+ Files.writeString(path, "[]")
+ }
+ return path.toString()
}
fun getSessionFilePath(sessionId: String): String {
- val path = Paths.get(getSessionsDir(), "$sessionId.json")
- if (Files.notExists(path)) {
- Files.createFile(path)
- Files.writeString(path, "{}");
- }
- return path.toString()
+ val path = Paths.get(getSessionsDir(), "$sessionId.json")
+ if (Files.notExists(path)) {
+ Files.createFile(path)
+ Files.writeString(path, "{}")
+ }
+ return path.toString()
}
-
-fun devDataPath(): String {
- val path = Paths.get(getContinueGlobalPath(), "dev_data")
- if (Files.notExists(path)) {
- Files.createDirectories(path)
- }
- return path.toString()
-}
-
-fun getDevDataFilepath(filename: String): String {
- val path = Paths.get(devDataPath(), filename)
- if (Files.notExists(path)) {
- Files.createFile(path)
- }
- return path.toString()
-}
-
-fun getMigrationsFolderPath(): String {
- val path = Paths.get(getContinueGlobalPath(), ".migrations")
- if (Files.notExists(path)) {
- Files.createDirectories(path)
- }
- return path.toString()
-}
-
-fun migrate(id: String, callback: () -> Unit) {
- val migrationsPath = getMigrationsFolderPath()
- val migrationPath = Paths.get(migrationsPath, id).toString()
- val migrationFile = File(migrationPath)
- if (!migrationFile.exists()) {
- migrationFile.writeText("")
- callback()
- }
-}
\ No newline at end of file
diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json
index 8bb6aa229..6d948deff 100644
--- a/extensions/vscode/package-lock.json
+++ b/extensions/vscode/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "continue",
- "version": "0.9.217",
+ "version": "0.9.218",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "continue",
- "version": "0.9.217",
+ "version": "0.9.218",
"license": "Apache-2.0",
"dependencies": {
"@electron/rebuild": "^3.2.10",
diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json
index bd74f59fc..73b204dd9 100644
--- a/extensions/vscode/package.json
+++ b/extensions/vscode/package.json
@@ -2,7 +2,7 @@
"name": "continue",
"icon": "media/icon.png",
"author": "Continue Dev, Inc",
- "version": "0.9.217",
+ "version": "0.9.218",
"repository": {
"type": "git",
"url": "https://github.com/continuedev/continue"