Merge pull request #2552 from continuedev/pe/jb-remove-old-paths

chore(jb): update default config values
This commit is contained in:
Patrick Erichsen 2024-10-17 14:24:39 -07:00 • committed by GitHub
commit 00b3a88341
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 275 additions and 135 deletions

12
.gitignore vendored
View file

@ -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/**
manual-testing-sandbox/.idea/**
extensions/intellij/.idea/**
**/.idea/workspace.xml
**/.idea/usage.statistics.xml
**/.idea/shelf/

1
.idea/.name generated Normal file
View file

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

57
.idea/codeStyles/Project.xml generated Normal file
View file

@ -0,0 +1,57 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<HTMLCodeStyleSettings>
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
</HTMLCodeStyleSettings>
<JSCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
</JSCodeStyleSettings>
<TypeScriptCodeStyleSettings version="0">
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
</TypeScriptCodeStyleSettings>
<VueCodeStyleSettings>
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
</VueCodeStyleSettings>
<codeStyleSettings language="HTML">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="Vue">
<option name="SOFT_MARGINS" value="80" />
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
</component>

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View file

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

6
.idea/compiler.xml generated Normal file
View file

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

6
.idea/git_toolbox_blame.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxBlameSettings">
<option name="version" value="2" />
</component>
</project>

17
.idea/gradle.xml generated Normal file
View file

@ -0,0 +1,17 @@
<?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$/extensions/intellij" />
<option name="gradleJvm" value="corretto-17" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$/extensions/intellij" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

20
.idea/jarRepositories.xml generated Normal file
View file

@ -0,0 +1,20 @@
<?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
.idea/kotlinc.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KotlinJpsPluginSettings">
<option name="version" value="1.9.0" />
</component>
</project>

6
.idea/ktfmt.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KtfmtSettings">
<option name="enableKtfmt" value="Enabled" />
</component>
</project>

11
.idea/misc.xml generated Normal file
View file

@ -0,0 +1,11 @@
<?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$/extensions/intellij" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="19" project-jdk-type="JavaSDK" />
<component name="SuppressKotlinCodeStyleNotification">
<option name="disableForAll" value="true" />
</component>
</project>

11
.idea/modules.xml generated Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/modules/com.github.continuedev.continueintellijextension.continue-intellij-extension.main.iml" filepath="$PROJECT_DIR$/.idea/modules/com.github.continuedev.continueintellijextension.continue-intellij-extension.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/continue-intellij-extension.iml" filepath="$PROJECT_DIR$/.idea/modules/continue-intellij-extension.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/continue-intellij-extension.main.iml" filepath="$PROJECT_DIR$/.idea/modules/continue-intellij-extension.main.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/modules/continue-intellij-extension.test.iml" filepath="$PROJECT_DIR$/.idea/modules/continue-intellij-extension.test.iml" />
</modules>
</component>
</project>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="AdditionalModuleElements">
<content url="file://$MODULE_DIR$/../../extensions/intellij/src/main" dumb="true">
<sourceFolder url="file://$MODULE_DIR$/../../extensions/intellij/src/main" isTestSource="false" />
</content>
</component>
</module>

6
.idea/prettier.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PrettierConfiguration">
<option name="myConfigurationMode" value="AUTOMATIC" />
</component>
</project>

6
.idea/vcs.xml generated Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View file

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

View file

@ -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();

View file

@ -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()
}
}

View file

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

View file

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