merge conflicts
This commit is contained in:
commit
e0ba578411
95 changed files with 15883 additions and 8758 deletions
6
.changes/extensions/vscode/0.8.62.md
Normal file
6
.changes/extensions/vscode/0.8.62.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
## 0.8.62 - 2024-12-10
|
||||
### Added
|
||||
* Tool use
|
||||
* Support for Model Context Protocol
|
||||
### Fixed
|
||||
* hotfix: context providers no longer hidden when not in edit mode
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
project: extensions/vscode
|
||||
kind: Added
|
||||
body: Tool use
|
||||
time: 2024-11-29T16:46:31.677532-08:00
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
project: extensions/vscode
|
||||
kind: Added
|
||||
body: Support for Model Context Protocol
|
||||
time: 2024-11-29T16:46:44.960691-08:00
|
||||
2
.github/workflows/jetbrains-release.yaml
vendored
2
.github/workflows/jetbrains-release.yaml
vendored
|
|
@ -406,7 +406,7 @@ jobs:
|
|||
|
||||
# Run Qodana inspections
|
||||
- name: Qodana - Code Inspection
|
||||
uses: JetBrains/qodana-action@v2024.1.5
|
||||
uses: JetBrains/qodana-action@v2024.3.2
|
||||
with:
|
||||
cache-default-branch-only: true
|
||||
|
||||
|
|
|
|||
49
.github/workflows/pr_checks.yaml
vendored
49
.github/workflows/pr_checks.yaml
vendored
|
|
@ -8,7 +8,7 @@ on:
|
|||
- "extensions/vscode/**"
|
||||
- "core/**"
|
||||
- "gui/**"
|
||||
- ".github/workflows**"
|
||||
- ".github/workflows/**"
|
||||
|
||||
jobs:
|
||||
install-root:
|
||||
|
|
@ -19,12 +19,14 @@ jobs:
|
|||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
id: root-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- name: Install root dependencies
|
||||
if: steps.root-cache.outputs.cache-hit != 'true'
|
||||
run: npm ci
|
||||
|
||||
core-checks:
|
||||
|
|
@ -36,17 +38,20 @@ jobs:
|
|||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
id: root-cache
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
id: core-cache
|
||||
with:
|
||||
path: core/node_modules
|
||||
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
|
||||
|
||||
- name: Install core dependencies
|
||||
if: steps.core-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd core
|
||||
npm ci
|
||||
|
|
@ -68,22 +73,24 @@ jobs:
|
|||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: core/node_modules
|
||||
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
id: gui-cache
|
||||
with:
|
||||
path: gui/node_modules
|
||||
key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }}
|
||||
|
||||
- name: Install gui dependencies
|
||||
if: steps.gui-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd gui
|
||||
npm ci
|
||||
|
|
@ -102,22 +109,24 @@ jobs:
|
|||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: core/node_modules
|
||||
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
id: binary-cache
|
||||
with:
|
||||
path: binary/node_modules
|
||||
key: ${{ runner.os }}-binary-node-modules-${{ hashFiles('binary/package-lock.json') }}
|
||||
|
||||
- name: Install binary dependencies
|
||||
if: steps.binary-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd binary
|
||||
npm ci
|
||||
|
|
@ -136,22 +145,24 @@ jobs:
|
|||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-root-node-modules-${{ hashFiles('package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: core/node_modules
|
||||
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
id: vscode-cache
|
||||
with:
|
||||
path: extensions/vscode/node_modules
|
||||
key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }}
|
||||
|
||||
- name: Install vscode dependencies
|
||||
if: steps.vscode-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd extensions/vscode
|
||||
npm ci
|
||||
|
|
@ -173,7 +184,7 @@ jobs:
|
|||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: core/node_modules
|
||||
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
|
||||
|
|
@ -192,12 +203,12 @@ jobs:
|
|||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: extensions/vscode/node_modules
|
||||
key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: core/node_modules
|
||||
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
|
||||
|
|
@ -220,17 +231,19 @@ jobs:
|
|||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
id: gui-cache
|
||||
with:
|
||||
path: gui/node_modules
|
||||
key: ${{ runner.os }}-gui-node-modules-${{ hashFiles('gui/package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v3
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: core/node_modules
|
||||
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
|
||||
|
||||
- name: Install GUI dependencies
|
||||
if: steps.gui-cache.outputs.cache-hit != 'true'
|
||||
run: cd gui && npm ci
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
|
||||
|
|
|
|||
10
.vscode/tasks.json
vendored
10
.vscode/tasks.json
vendored
|
|
@ -28,6 +28,9 @@
|
|||
"vscode-extension:continue-ui:build",
|
||||
// // To bundle the code the same way we do for publishing
|
||||
"vscode-extension:esbuild",
|
||||
// To ensure extension.js is regenerated even if
|
||||
// vscode-extension:esbuild was already running in background
|
||||
"vscode-extension:esbuild-notify",
|
||||
// Start the React app that is used in the extension
|
||||
"gui:dev"
|
||||
],
|
||||
|
|
@ -36,6 +39,13 @@
|
|||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "vscode-extension:esbuild-notify",
|
||||
"dependsOn": ["vscode-extension:esbuild"],
|
||||
"type": "npm",
|
||||
"script": "esbuild-notify",
|
||||
"path": "extensions/vscode"
|
||||
},
|
||||
{
|
||||
"label": "vscode-extension:esbuild",
|
||||
"dependsOn": ["vscode-extension:continue-ui:build"],
|
||||
|
|
|
|||
|
|
@ -118,9 +118,6 @@ async function installNodeModuleInTempDirAndCopyToCurrent(packageName, toCopy) {
|
|||
}
|
||||
|
||||
(async () => {
|
||||
fs.mkdirSync("out/node_modules", { recursive: true });
|
||||
fs.mkdirSync("bin/node_modules", { recursive: true });
|
||||
|
||||
console.log("[info] Downloading prebuilt lancedb...");
|
||||
for (const target of targets) {
|
||||
if (targetToLanceDb[target]) {
|
||||
|
|
|
|||
|
|
@ -76,12 +76,20 @@ async function getEntriesFilteredByIgnore(dir: string, ide: IDE) {
|
|||
|
||||
const workspaceDirs = await ide.getWorkspaceDirs();
|
||||
|
||||
const withRelativePaths = entries.map((entry) => ({
|
||||
uri: entry[0],
|
||||
type: entry[1],
|
||||
basename: getUriPathBasename(entry[0]),
|
||||
relativePath: getRelativePath(entry[0], workspaceDirs),
|
||||
}));
|
||||
const withRelativePaths = entries
|
||||
.filter(
|
||||
(entry) => entry[1] === FileType.File || entry[1] === FileType.Directory,
|
||||
)
|
||||
.map((entry) => {
|
||||
const relativePath = getRelativePath(entry[0], workspaceDirs);
|
||||
return {
|
||||
uri: entry[0],
|
||||
type: entry[1],
|
||||
basename: getUriPathBasename(entry[0]),
|
||||
relativePath:
|
||||
relativePath + (entry[1] === FileType.Directory ? "/" : ""),
|
||||
};
|
||||
});
|
||||
|
||||
return withRelativePaths.filter((entry) => !ig.ignores(entry.relativePath));
|
||||
}
|
||||
|
|
@ -121,7 +129,7 @@ async function gatherProjectContext(
|
|||
|
||||
function createOnboardingPrompt(context: string): string {
|
||||
return `
|
||||
As a helpful AI assistant, your task is to onboard a new developer to this project.
|
||||
As a helpful AI assistant, your task is to onboard a new developer to this project.
|
||||
Use the following context about the project structure, READMEs, and dependency files to create a comprehensive overview:
|
||||
|
||||
${context}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import {
|
|||
IdeSettings,
|
||||
IdeType,
|
||||
ILLM,
|
||||
LLMOptions,
|
||||
ModelDescription,
|
||||
RerankerDescription,
|
||||
SerializedContinueConfig,
|
||||
|
|
@ -31,7 +32,7 @@ import {
|
|||
slashFromCustomCommand,
|
||||
} from "../commands/index.js";
|
||||
import { AllRerankers } from "../context/allRerankers";
|
||||
import MCPConnectionSingleton from "../context/mcp";
|
||||
import { MCPManagerSingleton } from "../context/mcp";
|
||||
import CodebaseContextProvider from "../context/providers/CodebaseContextProvider";
|
||||
import ContinueProxyContextProvider from "../context/providers/ContinueProxyContextProvider";
|
||||
import CustomContextProviderClass from "../context/providers/CustomContextProvider";
|
||||
|
|
@ -435,8 +436,12 @@ async function intermediateToFinalConfig(
|
|||
) {
|
||||
config.embeddingsProvider = new embeddingsProviderClass();
|
||||
} else {
|
||||
const llmOptions: LLMOptions = {
|
||||
model: options.model ?? "UNSPECIFIED",
|
||||
...options,
|
||||
};
|
||||
config.embeddingsProvider = new embeddingsProviderClass(
|
||||
options,
|
||||
llmOptions,
|
||||
(url: string | URL, init: any) =>
|
||||
fetchwithRequestOptions(url, init, {
|
||||
...config.requestOptions,
|
||||
|
|
@ -464,7 +469,11 @@ async function intermediateToFinalConfig(
|
|||
config.reranker = new LLMReranker(llm);
|
||||
}
|
||||
} else if (rerankerClass) {
|
||||
config.reranker = new rerankerClass(params);
|
||||
const llmOptions: LLMOptions = {
|
||||
model: "rerank-2",
|
||||
...params,
|
||||
};
|
||||
config.reranker = new rerankerClass(llmOptions);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -479,22 +488,36 @@ async function intermediateToFinalConfig(
|
|||
};
|
||||
|
||||
// Apply MCP if specified
|
||||
if (config.experimental?.modelContextProtocolServer) {
|
||||
const mcpConnection = await MCPConnectionSingleton.getInstance(
|
||||
config.experimental.modelContextProtocolServer,
|
||||
);
|
||||
continueConfig = await Promise.race<ContinueConfig>([
|
||||
mcpConnection.modifyConfig(continueConfig),
|
||||
new Promise((_, reject) =>
|
||||
setTimeout(
|
||||
() => reject(new Error("MCP connection timed out after 2000ms")),
|
||||
const mcpManager = MCPManagerSingleton.getInstance();
|
||||
if (config.experimental?.modelContextProtocolServers) {
|
||||
config.experimental.modelContextProtocolServers?.forEach(
|
||||
async (server, index) => {
|
||||
const mcpId = index.toString();
|
||||
const mcpConnection = mcpManager.createConnection(mcpId, server);
|
||||
if (!mcpConnection) {
|
||||
return;
|
||||
}
|
||||
|
||||
const abortController = new AbortController();
|
||||
const mcpConnectionTimeout = setTimeout(
|
||||
() => abortController.abort(),
|
||||
2000,
|
||||
),
|
||||
),
|
||||
]).catch((error) => {
|
||||
console.warn("MCP connection error:", error);
|
||||
return continueConfig; // Return original config if timeout occurs
|
||||
});
|
||||
);
|
||||
|
||||
try {
|
||||
await mcpConnection.modifyConfig(
|
||||
continueConfig,
|
||||
mcpId,
|
||||
abortController.signal,
|
||||
);
|
||||
} catch (e: any) {
|
||||
if (e.name !== "AbortError") {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
clearTimeout(mcpConnectionTimeout);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
return continueConfig;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import fs from "fs";
|
||||
|
||||
import {
|
||||
ContinueConfig,
|
||||
ContinueRcJson,
|
||||
|
|
@ -10,9 +12,12 @@ import { ControlPlaneClient } from "../../control-plane/client.js";
|
|||
import { controlPlaneEnv } from "../../control-plane/env.js";
|
||||
import { TeamAnalytics } from "../../control-plane/TeamAnalytics.js";
|
||||
import ContinueProxy from "../../llm/llms/stubs/ContinueProxy";
|
||||
import { getConfigYamlPath } from "../../util/paths";
|
||||
import { Telemetry } from "../../util/posthog";
|
||||
import { TTS } from "../../util/tts";
|
||||
import { ConfigResult, loadFullConfigNode } from "../load";
|
||||
import { ConfigValidationError } from "../validation";
|
||||
import { loadContinueConfigFromYaml } from "../yaml/loadYaml";
|
||||
|
||||
export default async function doLoadConfig(
|
||||
ide: IDE,
|
||||
|
|
@ -28,20 +33,42 @@ export default async function doLoadConfig(
|
|||
const ideSettings = await ideSettingsPromise;
|
||||
const workOsAccessToken = await controlPlaneClient.getAccessToken();
|
||||
|
||||
let {
|
||||
config: newConfig,
|
||||
errors,
|
||||
configLoadInterrupted,
|
||||
} = await loadFullConfigNode(
|
||||
ide,
|
||||
workspaceConfigs,
|
||||
ideSettings,
|
||||
ideInfo.ideType,
|
||||
uniqueId,
|
||||
writeLog,
|
||||
workOsAccessToken,
|
||||
overrideConfigJson,
|
||||
);
|
||||
const configYamlPath = getConfigYamlPath(ideInfo.ideType);
|
||||
|
||||
let newConfig: ContinueConfig | undefined;
|
||||
let errors: ConfigValidationError[] | undefined;
|
||||
let configLoadInterrupted = false;
|
||||
|
||||
if (fs.existsSync(configYamlPath)) {
|
||||
const result = await loadContinueConfigFromYaml(
|
||||
ide,
|
||||
workspaceConfigs.map((c) => JSON.stringify(c)),
|
||||
ideSettings,
|
||||
ideInfo.ideType,
|
||||
uniqueId,
|
||||
writeLog,
|
||||
workOsAccessToken,
|
||||
undefined,
|
||||
// overrideConfigYaml, TODO
|
||||
);
|
||||
newConfig = result.config;
|
||||
errors = result.errors;
|
||||
configLoadInterrupted = result.configLoadInterrupted;
|
||||
} else {
|
||||
const result = await loadFullConfigNode(
|
||||
ide,
|
||||
workspaceConfigs,
|
||||
ideSettings,
|
||||
ideInfo.ideType,
|
||||
uniqueId,
|
||||
writeLog,
|
||||
workOsAccessToken,
|
||||
overrideConfigJson,
|
||||
);
|
||||
newConfig = result.config;
|
||||
errors = result.errors;
|
||||
configLoadInterrupted = result.configLoadInterrupted;
|
||||
}
|
||||
|
||||
if (configLoadInterrupted || !newConfig) {
|
||||
return { errors, config: newConfig, configLoadInterrupted: true };
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
30
core/config/yaml/convertFromJson.ts
Normal file
30
core/config/yaml/convertFromJson.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { ModelConfig } from "@continuedev/config-yaml";
|
||||
import { ConfigYaml } from "@continuedev/config-yaml/dist/schemas";
|
||||
|
||||
import { SerializedContinueConfig } from "../..";
|
||||
|
||||
export function convertConfigJsonToConfigYaml(
|
||||
configJson: SerializedContinueConfig,
|
||||
): ConfigYaml {
|
||||
return {
|
||||
name: "Local Config",
|
||||
models: [
|
||||
...configJson.models.map(
|
||||
(model): ModelConfig => ({
|
||||
model: model.model,
|
||||
name: model.title,
|
||||
// defaultCompletionOptions: model.completionOptions,
|
||||
provider: model.provider,
|
||||
roles: ["chat"],
|
||||
}),
|
||||
),
|
||||
// ... tabAutocompleteModels
|
||||
// embeddingsModels
|
||||
// rerankModels
|
||||
],
|
||||
context: configJson.contextProviders?.map((provider) => ({
|
||||
uses: provider.name,
|
||||
with: provider.params,
|
||||
})),
|
||||
};
|
||||
}
|
||||
14
core/config/yaml/default.ts
Normal file
14
core/config/yaml/default.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { ConfigYaml } from "@continuedev/config-yaml/dist/schemas";
|
||||
|
||||
// TODO
|
||||
export const defaultConfigYaml: ConfigYaml = {
|
||||
models: [],
|
||||
context: [],
|
||||
name: "Local Config",
|
||||
};
|
||||
|
||||
export const defaultConfigYamlJetBrains: ConfigYaml = {
|
||||
models: [],
|
||||
context: [],
|
||||
name: "Local Config",
|
||||
};
|
||||
348
core/config/yaml/loadYaml.ts
Normal file
348
core/config/yaml/loadYaml.ts
Normal file
|
|
@ -0,0 +1,348 @@
|
|||
import fs from "node:fs";
|
||||
import path from "path";
|
||||
|
||||
import {
|
||||
extendConfig,
|
||||
fillTemplateVariables,
|
||||
validateConfigYaml,
|
||||
} from "@continuedev/config-yaml";
|
||||
import { ConfigYaml } from "@continuedev/config-yaml/dist/schemas";
|
||||
import { ValidationLevel } from "@continuedev/config-yaml/dist/validation";
|
||||
import { fetchwithRequestOptions } from "@continuedev/fetch";
|
||||
import * as YAML from "yaml";
|
||||
|
||||
import {
|
||||
BrowserSerializedContinueConfig,
|
||||
ContinueConfig,
|
||||
IContextProvider,
|
||||
IDE,
|
||||
IdeSettings,
|
||||
IdeType,
|
||||
SlashCommand,
|
||||
} from "../..";
|
||||
import { AllRerankers } from "../../context/allRerankers";
|
||||
import { MCPManagerSingleton } from "../../context/mcp";
|
||||
import { contextProviderClassFromName } from "../../context/providers/index";
|
||||
import { allEmbeddingsProviders } from "../../indexing/allEmbeddingsProviders";
|
||||
import FreeTrial from "../../llm/llms/FreeTrial";
|
||||
import TransformersJsEmbeddingsProvider from "../../llm/llms/TransformersJsEmbeddingsProvider";
|
||||
import {
|
||||
getConfigYamlPath,
|
||||
getContinueDotEnv,
|
||||
readAllGlobalPromptFiles,
|
||||
} from "../../util/paths";
|
||||
import { getSystemPromptDotFile } from "../getSystemPromptDotFile";
|
||||
import {
|
||||
DEFAULT_PROMPTS_FOLDER,
|
||||
getPromptFiles,
|
||||
slashCommandFromPromptFile,
|
||||
} from "../promptFile.js";
|
||||
import { ConfigValidationError } from "../validation.js";
|
||||
|
||||
import { llmsFromModelConfig } from "./models";
|
||||
|
||||
export interface ConfigResult<T> {
|
||||
config: T | undefined;
|
||||
errors: ConfigValidationError[] | undefined;
|
||||
configLoadInterrupted: boolean;
|
||||
}
|
||||
|
||||
function renderTemplateVars(configYaml: string): string {
|
||||
const data: Record<string, string> = {};
|
||||
|
||||
// env.*
|
||||
const envVars = getContinueDotEnv();
|
||||
Object.entries(envVars).forEach(([key, value]) => {
|
||||
data[`env.${key}`] = value;
|
||||
});
|
||||
|
||||
// secrets.* not filled in
|
||||
|
||||
return fillTemplateVariables(configYaml, data);
|
||||
}
|
||||
|
||||
function loadConfigYaml(
|
||||
workspaceConfigs: string[],
|
||||
ideSettings: IdeSettings,
|
||||
ideType: IdeType,
|
||||
rawYaml: string,
|
||||
): ConfigResult<ConfigYaml> {
|
||||
const renderedYaml = renderTemplateVars(rawYaml);
|
||||
let config = YAML.parse(renderedYaml) as ConfigYaml;
|
||||
const errors = validateConfigYaml(config);
|
||||
|
||||
if (errors?.some((error) => error.level === ValidationLevel.Error)) {
|
||||
return {
|
||||
errors: errors.map((error) => ({
|
||||
message: error.message,
|
||||
fatal: error.level === ValidationLevel.Error,
|
||||
})),
|
||||
config: undefined,
|
||||
configLoadInterrupted: true,
|
||||
};
|
||||
}
|
||||
|
||||
for (const workspaceConfig of workspaceConfigs) {
|
||||
const rendered = renderTemplateVars(workspaceConfig);
|
||||
config = extendConfig(config, YAML.parse(rendered) as ConfigYaml);
|
||||
}
|
||||
|
||||
// Set defaults if undefined (this lets us keep config.json uncluttered for new users)
|
||||
return {
|
||||
config,
|
||||
errors: errors.map((error) => ({
|
||||
message: error.message,
|
||||
fatal: error.level === ValidationLevel.Error,
|
||||
})),
|
||||
configLoadInterrupted: false,
|
||||
};
|
||||
}
|
||||
|
||||
async function slashCommandsFromV1PromptFiles(
|
||||
ide: IDE,
|
||||
): Promise<SlashCommand[]> {
|
||||
const slashCommands: SlashCommand[] = [];
|
||||
const workspaceDirs = await ide.getWorkspaceDirs();
|
||||
|
||||
// v1 prompt files
|
||||
let promptFiles: { path: string; content: string }[] = [];
|
||||
promptFiles = (
|
||||
await Promise.all(
|
||||
workspaceDirs.map((dir) =>
|
||||
getPromptFiles(ide, path.join(dir, DEFAULT_PROMPTS_FOLDER)),
|
||||
),
|
||||
)
|
||||
)
|
||||
.flat()
|
||||
.filter(({ path }) => path.endsWith(".prompt"));
|
||||
|
||||
// Also read from ~/.continue/.prompts
|
||||
promptFiles.push(...readAllGlobalPromptFiles());
|
||||
|
||||
for (const file of promptFiles) {
|
||||
const slashCommand = slashCommandFromPromptFile(file.path, file.content);
|
||||
if (slashCommand) {
|
||||
slashCommands.push(slashCommand);
|
||||
}
|
||||
}
|
||||
|
||||
return slashCommands;
|
||||
}
|
||||
|
||||
async function configYamlToContinueConfig(
|
||||
config: ConfigYaml,
|
||||
ide: IDE,
|
||||
ideSettings: IdeSettings,
|
||||
uniqueId: string,
|
||||
writeLog: (log: string) => Promise<void>,
|
||||
workOsAccessToken: string | undefined,
|
||||
allowFreeTrial: boolean = true,
|
||||
): Promise<ContinueConfig> {
|
||||
const continueConfig: ContinueConfig = {
|
||||
slashCommands: await slashCommandsFromV1PromptFiles(ide),
|
||||
models: [],
|
||||
tabAutocompleteModels: [],
|
||||
tools: [],
|
||||
embeddingsProvider: new TransformersJsEmbeddingsProvider(),
|
||||
experimental: {
|
||||
modelContextProtocolServers: [],
|
||||
},
|
||||
};
|
||||
|
||||
// Models
|
||||
for (const model of config.models ?? []) {
|
||||
if (
|
||||
["chat", "summarize", "apply", "edit"].some((role: any) =>
|
||||
model.roles?.includes(role),
|
||||
)
|
||||
) {
|
||||
// Main model array
|
||||
const llms = await llmsFromModelConfig(
|
||||
model,
|
||||
ide,
|
||||
uniqueId,
|
||||
ideSettings,
|
||||
writeLog,
|
||||
);
|
||||
continueConfig.models.push(...llms);
|
||||
} else if (model.roles?.includes("autocomplete")) {
|
||||
// Autocomplete models array
|
||||
const llms = await llmsFromModelConfig(
|
||||
model,
|
||||
ide,
|
||||
uniqueId,
|
||||
ideSettings,
|
||||
writeLog,
|
||||
);
|
||||
continueConfig.tabAutocompleteModels?.push(...llms);
|
||||
}
|
||||
}
|
||||
|
||||
if (allowFreeTrial) {
|
||||
// Obtain auth token (iff free trial being used)
|
||||
const freeTrialModels = continueConfig.models.filter(
|
||||
(model) => model.providerName === "free-trial",
|
||||
);
|
||||
if (freeTrialModels.length > 0) {
|
||||
const ghAuthToken = await ide.getGitHubAuthToken({});
|
||||
for (const model of freeTrialModels) {
|
||||
(model as FreeTrial).setupGhAuthToken(ghAuthToken);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Remove free trial models
|
||||
continueConfig.models = continueConfig.models.filter(
|
||||
(model) => model.providerName !== "free-trial",
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: Split into model roles.
|
||||
|
||||
// Context
|
||||
continueConfig.contextProviders = config.context
|
||||
?.map((context) => {
|
||||
const cls = contextProviderClassFromName(context.uses) as any;
|
||||
if (!cls) {
|
||||
console.warn(`Unknown context provider ${context.uses}`);
|
||||
return undefined;
|
||||
}
|
||||
const instance: IContextProvider = new cls(context.with ?? {});
|
||||
return instance;
|
||||
})
|
||||
.filter((p) => !!p) as IContextProvider[];
|
||||
|
||||
// Embeddings Provider
|
||||
const embedConfig = config.models?.find((model) =>
|
||||
model.roles?.includes("embed"),
|
||||
);
|
||||
if (embedConfig) {
|
||||
const { provider, ...options } = embedConfig;
|
||||
const embeddingsProviderClass = allEmbeddingsProviders[provider];
|
||||
if (embeddingsProviderClass) {
|
||||
if (
|
||||
embeddingsProviderClass.name === "_TransformersJsEmbeddingsProvider"
|
||||
) {
|
||||
continueConfig.embeddingsProvider = new embeddingsProviderClass();
|
||||
} else {
|
||||
continueConfig.embeddingsProvider = new embeddingsProviderClass(
|
||||
options,
|
||||
(url: string | URL, init: any) =>
|
||||
fetchwithRequestOptions(url, init, {
|
||||
...options.requestOptions,
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reranker
|
||||
const rerankConfig = config.models?.find((model) =>
|
||||
model.roles?.includes("rerank"),
|
||||
);
|
||||
if (rerankConfig) {
|
||||
const { provider, ...options } = rerankConfig;
|
||||
const rerankerClass = AllRerankers[provider];
|
||||
|
||||
if (rerankerClass) {
|
||||
continueConfig.reranker = new rerankerClass(
|
||||
options,
|
||||
(url: string | URL, init: any) =>
|
||||
fetchwithRequestOptions(url, init, {
|
||||
...options.requestOptions,
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Apply MCP if specified
|
||||
const mcpManager = MCPManagerSingleton.getInstance();
|
||||
config.mcpServers?.forEach(async (server) => {
|
||||
const mcpId = server.name;
|
||||
const mcpConnection = mcpManager.createConnection(mcpId, {
|
||||
transport: {
|
||||
type: "stdio",
|
||||
args: [],
|
||||
...server,
|
||||
},
|
||||
});
|
||||
if (!mcpConnection) {
|
||||
return;
|
||||
}
|
||||
|
||||
const abortController = new AbortController();
|
||||
const mcpConnectionTimeout = setTimeout(
|
||||
() => abortController.abort(),
|
||||
2000,
|
||||
);
|
||||
|
||||
try {
|
||||
await mcpConnection.modifyConfig(
|
||||
continueConfig,
|
||||
mcpId,
|
||||
abortController.signal,
|
||||
);
|
||||
} catch (e: any) {
|
||||
if (e.name !== "AbortError") {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
clearTimeout(mcpConnectionTimeout);
|
||||
});
|
||||
|
||||
return continueConfig;
|
||||
}
|
||||
|
||||
export async function loadContinueConfigFromYaml(
|
||||
ide: IDE,
|
||||
workspaceConfigs: string[],
|
||||
ideSettings: IdeSettings,
|
||||
ideType: IdeType,
|
||||
uniqueId: string,
|
||||
writeLog: (log: string) => Promise<void>,
|
||||
workOsAccessToken: string | undefined,
|
||||
overrideConfigYaml: string | undefined,
|
||||
): Promise<ConfigResult<ContinueConfig>> {
|
||||
const configYamlPath = getConfigYamlPath(ideType);
|
||||
const rawYaml = fs.readFileSync(configYamlPath, "utf-8");
|
||||
|
||||
const configYamlResult = await loadConfigYaml(
|
||||
workspaceConfigs,
|
||||
ideSettings,
|
||||
ideType,
|
||||
overrideConfigYaml ?? rawYaml,
|
||||
);
|
||||
|
||||
if (!configYamlResult.config || configYamlResult.configLoadInterrupted) {
|
||||
return {
|
||||
errors: configYamlResult.errors,
|
||||
config: undefined,
|
||||
configLoadInterrupted: true,
|
||||
};
|
||||
}
|
||||
|
||||
const continueConfig = await configYamlToContinueConfig(
|
||||
configYamlResult.config,
|
||||
ide,
|
||||
ideSettings,
|
||||
uniqueId,
|
||||
writeLog,
|
||||
workOsAccessToken,
|
||||
);
|
||||
|
||||
const systemPromptDotFile = await getSystemPromptDotFile(ide);
|
||||
if (systemPromptDotFile) {
|
||||
if (continueConfig.systemMessage) {
|
||||
continueConfig.systemMessage += "\n\n" + systemPromptDotFile;
|
||||
} else {
|
||||
continueConfig.systemMessage = systemPromptDotFile;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
config: continueConfig,
|
||||
errors: configYamlResult.errors,
|
||||
configLoadInterrupted: false,
|
||||
};
|
||||
}
|
||||
|
||||
export { type BrowserSerializedContinueConfig };
|
||||
105
core/config/yaml/models.ts
Normal file
105
core/config/yaml/models.ts
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
import { ModelConfig } from "@continuedev/config-yaml";
|
||||
|
||||
import { IDE, IdeSettings, LLMOptions } from "../..";
|
||||
import { BaseLLM } from "../../llm";
|
||||
import { LLMClasses } from "../../llm/llms";
|
||||
|
||||
const AUTODETECT = "AUTODETECT";
|
||||
|
||||
async function modelConfigToBaseLLM(
|
||||
model: ModelConfig,
|
||||
uniqueId: string,
|
||||
ideSettings: IdeSettings,
|
||||
writeLog: (log: string) => Promise<void>,
|
||||
): Promise<BaseLLM | undefined> {
|
||||
const cls = LLMClasses.find((llm) => llm.providerName === model.provider);
|
||||
|
||||
if (!cls) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
let options: LLMOptions = {
|
||||
...model,
|
||||
completionOptions: {
|
||||
...(model.defaultCompletionOptions ?? {}),
|
||||
model: model.model,
|
||||
maxTokens:
|
||||
model.defaultCompletionOptions?.maxTokens ??
|
||||
cls.defaultOptions?.completionOptions?.maxTokens,
|
||||
},
|
||||
writeLog,
|
||||
uniqueId,
|
||||
title: model.name,
|
||||
};
|
||||
|
||||
const llm = new cls(options);
|
||||
return llm;
|
||||
}
|
||||
|
||||
async function autodetectModels(
|
||||
llm: BaseLLM,
|
||||
model: ModelConfig,
|
||||
ide: IDE,
|
||||
uniqueId: string,
|
||||
ideSettings: IdeSettings,
|
||||
writeLog: (log: string) => Promise<void>,
|
||||
): Promise<BaseLLM[]> {
|
||||
try {
|
||||
const modelNames = await llm.listModels();
|
||||
const detectedModels = await Promise.all(
|
||||
modelNames.map(async (modelName) => {
|
||||
// To ensure there are no infinite loops
|
||||
if (modelName === AUTODETECT) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return await modelConfigToBaseLLM(
|
||||
{
|
||||
...model,
|
||||
model: modelName,
|
||||
name: `${llm.title} - ${modelName}`,
|
||||
},
|
||||
uniqueId,
|
||||
ideSettings,
|
||||
writeLog,
|
||||
);
|
||||
}),
|
||||
);
|
||||
return detectedModels.filter((x) => typeof x !== "undefined") as BaseLLM[];
|
||||
} catch (e) {
|
||||
console.warn("Error listing models: ", e);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
export async function llmsFromModelConfig(
|
||||
model: ModelConfig,
|
||||
ide: IDE,
|
||||
uniqueId: string,
|
||||
ideSettings: IdeSettings,
|
||||
writeLog: (log: string) => Promise<void>,
|
||||
): Promise<BaseLLM[]> {
|
||||
const baseLlm = await modelConfigToBaseLLM(
|
||||
model,
|
||||
uniqueId,
|
||||
ideSettings,
|
||||
writeLog,
|
||||
);
|
||||
if (!baseLlm) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (model.model === AUTODETECT) {
|
||||
const models = await autodetectModels(
|
||||
baseLlm,
|
||||
model,
|
||||
ide,
|
||||
uniqueId,
|
||||
ideSettings,
|
||||
writeLog,
|
||||
);
|
||||
return models;
|
||||
} else {
|
||||
return [baseLlm];
|
||||
}
|
||||
}
|
||||
|
|
@ -8,12 +8,49 @@ import { ContinueConfig, MCPOptions, SlashCommand, Tool } from "../..";
|
|||
import { constructMcpSlashCommand } from "../../commands/slash/mcp";
|
||||
import MCPContextProvider from "../providers/MCPContextProvider";
|
||||
|
||||
class MCPConnectionSingleton {
|
||||
private static instance: MCPConnectionSingleton;
|
||||
export class MCPManagerSingleton {
|
||||
private static instance: MCPManagerSingleton;
|
||||
|
||||
private connections: Map<string, MCPConnection> = new Map();
|
||||
|
||||
private constructor() {}
|
||||
|
||||
public static getInstance(): MCPManagerSingleton {
|
||||
if (!MCPManagerSingleton.instance) {
|
||||
MCPManagerSingleton.instance = new MCPManagerSingleton();
|
||||
}
|
||||
return MCPManagerSingleton.instance;
|
||||
}
|
||||
|
||||
createConnection(id: string, options: MCPOptions): MCPConnection | undefined {
|
||||
if (!this.connections.has(id)) {
|
||||
const connection = new MCPConnection(options);
|
||||
this.connections.set(id, connection);
|
||||
return connection;
|
||||
} else {
|
||||
return this.connections.get(id);
|
||||
}
|
||||
}
|
||||
|
||||
getConnection(id: string) {
|
||||
return this.connections.get(id);
|
||||
}
|
||||
|
||||
async removeConnection(id: string) {
|
||||
const connection = this.connections.get(id);
|
||||
if (connection) {
|
||||
await connection.client.close();
|
||||
}
|
||||
|
||||
this.connections.delete(id);
|
||||
}
|
||||
}
|
||||
|
||||
class MCPConnection {
|
||||
public client: Client;
|
||||
private transport: Transport;
|
||||
|
||||
private constructor(private readonly options: MCPOptions) {
|
||||
constructor(private readonly options: MCPOptions) {
|
||||
this.transport = this.constructTransport(options);
|
||||
|
||||
this.client = new Client(
|
||||
|
|
@ -27,17 +64,6 @@ class MCPConnectionSingleton {
|
|||
);
|
||||
}
|
||||
|
||||
public static getInstance(options: MCPOptions): MCPConnectionSingleton {
|
||||
if (!MCPConnectionSingleton.instance) {
|
||||
MCPConnectionSingleton.instance = new MCPConnectionSingleton(options);
|
||||
}
|
||||
return MCPConnectionSingleton.instance;
|
||||
}
|
||||
|
||||
public static getExistingInstance(): MCPConnectionSingleton | null {
|
||||
return MCPConnectionSingleton.instance;
|
||||
}
|
||||
|
||||
private constructTransport(options: MCPOptions): Transport {
|
||||
switch (options.transport.type) {
|
||||
case "stdio":
|
||||
|
|
@ -87,71 +113,89 @@ class MCPConnectionSingleton {
|
|||
}
|
||||
}
|
||||
|
||||
async modifyConfig(config: ContinueConfig): Promise<ContinueConfig> {
|
||||
async modifyConfig(
|
||||
config: ContinueConfig,
|
||||
mcpId: string,
|
||||
signal: AbortSignal,
|
||||
): Promise<void> {
|
||||
try {
|
||||
await this.connectClient();
|
||||
await Promise.race([
|
||||
this.connectClient(),
|
||||
new Promise((_, reject) => {
|
||||
signal.addEventListener("abort", () =>
|
||||
reject(new Error("Connection aborted")),
|
||||
);
|
||||
}),
|
||||
]);
|
||||
} catch (error: any) {
|
||||
if (signal.aborted) {
|
||||
throw new Error("Operation aborted");
|
||||
}
|
||||
if (!error.message.startsWith("StdioClientTransport already started")) {
|
||||
console.error("Failed to connect client:", error);
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
const capabilities = this.client.getServerCapabilities();
|
||||
|
||||
// Resources <—> Context Provider
|
||||
const { resources } = await this.client.listResources();
|
||||
if (capabilities?.resources) {
|
||||
const { resources } = await this.client.listResources({}, { signal });
|
||||
const submenuItems = resources.map((resource: any) => ({
|
||||
title: resource.name,
|
||||
description: resource.description,
|
||||
id: resource.uri,
|
||||
}));
|
||||
|
||||
const submenuItems = resources.map((resource: any) => ({
|
||||
title: resource.name,
|
||||
description: resource.description,
|
||||
id: resource.uri,
|
||||
}));
|
||||
if (!config.contextProviders) {
|
||||
config.contextProviders = [];
|
||||
}
|
||||
|
||||
if (!config.contextProviders) {
|
||||
config.contextProviders = [];
|
||||
config.contextProviders.push(
|
||||
new MCPContextProvider({
|
||||
submenuItems,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
config.contextProviders!.push(
|
||||
new MCPContextProvider({
|
||||
submenuItems,
|
||||
client: this.client,
|
||||
}),
|
||||
);
|
||||
|
||||
// Tools <—> Tools
|
||||
const { tools } = await this.client.listTools();
|
||||
const continueTools: Tool[] = tools.map((tool) => ({
|
||||
displayTitle: tool.name,
|
||||
function: {
|
||||
description: tool.description,
|
||||
name: tool.name,
|
||||
parameters: tool.inputSchema,
|
||||
},
|
||||
readonly: false,
|
||||
type: "function",
|
||||
wouldLikeTo: `use the ${tool.name} tool`,
|
||||
uri: `mcp://${tool.name}`,
|
||||
}));
|
||||
if (capabilities?.tools) {
|
||||
const { tools } = await this.client.listTools({}, { signal });
|
||||
const continueTools: Tool[] = tools.map((tool: any) => ({
|
||||
displayTitle: tool.name,
|
||||
function: {
|
||||
description: tool.description,
|
||||
name: tool.name,
|
||||
parameters: tool.inputSchema,
|
||||
},
|
||||
readonly: false,
|
||||
type: "function",
|
||||
wouldLikeTo: `use the ${tool.name} tool`,
|
||||
uri: `mcp://${tool.name}`,
|
||||
}));
|
||||
|
||||
config.tools = [...config.tools, ...continueTools];
|
||||
|
||||
// Prompts <—> Slash commands
|
||||
const { prompts } = await this.client.listPrompts();
|
||||
if (!config.slashCommands) {
|
||||
config.slashCommands = [];
|
||||
config.tools = [...config.tools, ...continueTools];
|
||||
}
|
||||
|
||||
const slashCommands: SlashCommand[] = prompts.map((prompt) => {
|
||||
return constructMcpSlashCommand(
|
||||
this.client,
|
||||
prompt.name,
|
||||
prompt.description,
|
||||
prompt.arguments?.map((a) => a.name),
|
||||
);
|
||||
});
|
||||
config.slashCommands!.push(...slashCommands);
|
||||
// Prompts <—> Slash commands
|
||||
if (capabilities?.prompts) {
|
||||
const { prompts } = await this.client.listPrompts({}, { signal });
|
||||
if (!config.slashCommands) {
|
||||
config.slashCommands = [];
|
||||
}
|
||||
|
||||
return config;
|
||||
const slashCommands: SlashCommand[] = prompts.map((prompt: any) =>
|
||||
constructMcpSlashCommand(
|
||||
this.client,
|
||||
prompt.name,
|
||||
prompt.description,
|
||||
prompt.arguments?.map((a: any) => a.name),
|
||||
),
|
||||
);
|
||||
|
||||
config.slashCommands.push(...slashCommands);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default MCPConnectionSingleton;
|
||||
export default MCPConnection;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
||||
|
||||
import { BaseContextProvider } from "../";
|
||||
import {
|
||||
ContextItem,
|
||||
|
|
@ -8,10 +6,10 @@ import {
|
|||
ContextSubmenuItem,
|
||||
LoadSubmenuItemsArgs,
|
||||
} from "../../";
|
||||
import { MCPManagerSingleton } from "../mcp";
|
||||
|
||||
interface MCPContextProviderOptions {
|
||||
submenuItems: ContextSubmenuItem[];
|
||||
client: Client;
|
||||
}
|
||||
|
||||
class MCPContextProvider extends BaseContextProvider {
|
||||
|
|
@ -22,6 +20,17 @@ class MCPContextProvider extends BaseContextProvider {
|
|||
type: "submenu",
|
||||
};
|
||||
|
||||
static encodeMCPResourceId(mcpId: string, uri: string): string {
|
||||
return JSON.stringify({ mcpId, uri });
|
||||
}
|
||||
|
||||
static decodeMCPResourceId(mcpResourceId: string): {
|
||||
mcpId: string;
|
||||
uri: string;
|
||||
} {
|
||||
return JSON.parse(mcpResourceId);
|
||||
}
|
||||
|
||||
constructor(options: MCPContextProviderOptions) {
|
||||
super(options);
|
||||
}
|
||||
|
|
@ -30,9 +39,14 @@ class MCPContextProvider extends BaseContextProvider {
|
|||
query: string,
|
||||
extras: ContextProviderExtras,
|
||||
): Promise<ContextItem[]> {
|
||||
const { contents } = await (
|
||||
this.options as MCPContextProviderOptions
|
||||
).client.readResource({ uri: query });
|
||||
const { mcpId, uri } = MCPContextProvider.decodeMCPResourceId(query);
|
||||
|
||||
const connection = MCPManagerSingleton.getInstance().getConnection(mcpId);
|
||||
if (!connection) {
|
||||
throw new Error(`No MCP connection found for ${mcpId}`);
|
||||
}
|
||||
|
||||
const { contents } = await connection.client.readResource({ uri });
|
||||
|
||||
return await Promise.all(
|
||||
contents.map(async (resource) => {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ const modelDescriptionSchema = z.object({
|
|||
"azure",
|
||||
"nebius",
|
||||
"siliconflow",
|
||||
"scaleway",
|
||||
]),
|
||||
model: z.string(),
|
||||
apiKey: z.string().optional(),
|
||||
|
|
@ -86,6 +87,7 @@ const embeddingsProviderSchema = z.object({
|
|||
"gemini",
|
||||
"nebius",
|
||||
"siliconflow",
|
||||
"scaleway",
|
||||
]),
|
||||
apiBase: z.string().optional(),
|
||||
apiKey: z.string().optional(),
|
||||
|
|
|
|||
2
core/index.d.ts
vendored
2
core/index.d.ts
vendored
|
|
@ -1056,7 +1056,7 @@ interface ExperimentalConfig {
|
|||
*/
|
||||
useChromiumForDocsCrawling?: boolean;
|
||||
useTools?: boolean;
|
||||
modelContextProtocolServer?: MCPOptions;
|
||||
modelContextProtocolServers?: MCPOptions[];
|
||||
}
|
||||
|
||||
interface AnalyticsConfig {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import Nvidia from "../llm/llms/Nvidia.js";
|
|||
import Ollama from "../llm/llms/Ollama.js";
|
||||
import OpenAI from "../llm/llms/OpenAI.js";
|
||||
import SageMaker from "../llm/llms/SageMaker.js";
|
||||
import Scaleway from "../llm/llms/Scaleway.js";
|
||||
import SiliconFlow from "../llm/llms/SiliconFlow.js";
|
||||
import ContinueProxy from "../llm/llms/stubs/ContinueProxy.js";
|
||||
import TransformersJsEmbeddingsProvider from "../llm/llms/TransformersJsEmbeddingsProvider.js";
|
||||
|
|
@ -46,4 +47,5 @@ export const allEmbeddingsProviders: Record<
|
|||
watsonx: WatsonX,
|
||||
lmstudio: LMStudio,
|
||||
siliconflow: SiliconFlow,
|
||||
scaleway: Scaleway,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ export const DEFAULT_IGNORE_FILETYPES = [
|
|||
"*.gitkeep",
|
||||
"*.continueignore",
|
||||
"config.json",
|
||||
"config.yaml",
|
||||
"*.csv",
|
||||
"*.uasset",
|
||||
"*.pdb",
|
||||
|
|
@ -102,6 +103,7 @@ export const DEFAULT_IGNORE_DIRS = [
|
|||
"__pycache__/",
|
||||
"site-packages/",
|
||||
".gradle/",
|
||||
".mvn/",
|
||||
".cache/",
|
||||
"gems/",
|
||||
"vendor/",
|
||||
|
|
|
|||
|
|
@ -27,6 +27,6 @@ export default {
|
|||
// "!**/autocomplete/context/root-path-context/test/files/**",
|
||||
],
|
||||
globalSetup: "<rootDir>/test/jest.global-setup.ts",
|
||||
setupFilesAfterEnv: ["<rootDir>/test/jest.setup-after-env.ts"],
|
||||
setupFilesAfterEnv: ["<rootDir>/test/jest.setup-after-env.js"],
|
||||
maxWorkers: 1, // equivalent to CLI --runInBand
|
||||
};
|
||||
|
|
|
|||
|
|
@ -133,6 +133,7 @@ const PARALLEL_PROVIDERS: string[] = [
|
|||
"nebius",
|
||||
"vertexai",
|
||||
"function-network",
|
||||
"scaleway",
|
||||
];
|
||||
|
||||
function llmCanGenerateInParallel(provider: string, model: string): boolean {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
import { fetchwithRequestOptions } from "@continuedev/fetch";
|
||||
import { findLlmInfo } from "@continuedev/llm-info";
|
||||
import { BaseLlmApi, constructLlmApi } from "@continuedev/openai-adapters";
|
||||
import {
|
||||
BaseLlmApi,
|
||||
ChatCompletionCreateParams,
|
||||
constructLlmApi,
|
||||
} from "@continuedev/openai-adapters";
|
||||
import Handlebars from "handlebars";
|
||||
|
||||
import {
|
||||
|
|
@ -406,7 +410,7 @@ export abstract class BaseLLM implements ILLM {
|
|||
e.message.includes("http://127.0.0.1:11434")
|
||||
) {
|
||||
throw new Error(
|
||||
"Failed to connect to local Ollama instance. To start Ollama, first download it at https://ollama.ai.",
|
||||
"Failed to connect to local Ollama instance, please ensure Ollama is both installed and running. You can download Ollama from https://ollama.ai.",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -659,6 +663,12 @@ export abstract class BaseLLM implements ILLM {
|
|||
return { role: "assistant" as const, content: completion };
|
||||
}
|
||||
|
||||
protected modifyChatBody(
|
||||
body: ChatCompletionCreateParams,
|
||||
): ChatCompletionCreateParams {
|
||||
return body;
|
||||
}
|
||||
|
||||
async *streamChat(
|
||||
_messages: ChatMessage[],
|
||||
signal: AbortSignal,
|
||||
|
|
@ -695,9 +705,11 @@ export abstract class BaseLLM implements ILLM {
|
|||
}
|
||||
} else {
|
||||
if (this.shouldUseOpenAIAdapter("streamChat") && this.openaiAdapter) {
|
||||
let body = toChatBody(messages, completionOptions);
|
||||
body = this.modifyChatBody(body);
|
||||
const stream = this.openaiAdapter.chatCompletionStream(
|
||||
{
|
||||
...toChatBody(messages, completionOptions),
|
||||
...body,
|
||||
stream: true,
|
||||
},
|
||||
signal,
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export default class Cloudflare extends BaseLLM {
|
|||
if (value.choices?.[0]?.delta?.content) {
|
||||
yield {
|
||||
role: "assistant",
|
||||
content: value.choices[0].delta,
|
||||
content: value.choices[0].delta.content,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,6 +212,38 @@ class OpenAI extends BaseLLM {
|
|||
}
|
||||
}
|
||||
|
||||
protected modifyChatBody(
|
||||
body: ChatCompletionCreateParams,
|
||||
): ChatCompletionCreateParams {
|
||||
body.stop = body.stop?.slice(0, this.getMaxStopWords());
|
||||
|
||||
// OpenAI o1-preview and o1-mini:
|
||||
if (this.isO1Model(body.model)) {
|
||||
// a) use max_completion_tokens instead of max_tokens
|
||||
body.max_completion_tokens = body.max_tokens;
|
||||
body.max_tokens = undefined;
|
||||
|
||||
// b) don't support system message
|
||||
body.messages = body.messages?.filter(
|
||||
(message: any) => message?.role !== "system",
|
||||
);
|
||||
}
|
||||
|
||||
if (body.prediction && this.supportsPrediction(body.model)) {
|
||||
if (body.presence_penalty) {
|
||||
// prediction doesn't support > 0
|
||||
body.presence_penalty = undefined;
|
||||
}
|
||||
if (body.frequency_penalty) {
|
||||
// prediction doesn't support > 0
|
||||
body.frequency_penalty = undefined;
|
||||
}
|
||||
body.max_completion_tokens = undefined;
|
||||
}
|
||||
|
||||
return body;
|
||||
}
|
||||
|
||||
protected async *_legacystreamComplete(
|
||||
prompt: string,
|
||||
signal: AbortSignal,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import OpenAI from "./OpenAI";
|
||||
|
||||
import { LLMOptions } from "../../index.js";
|
||||
import { LLMOptions, CompletionOptions, ChatMessage } from "../../index.js";
|
||||
import { ChatCompletionCreateParams } from "openai/resources/index";
|
||||
|
||||
|
||||
class Scaleway extends OpenAI {
|
||||
|
|
@ -22,6 +23,14 @@ class Scaleway extends OpenAI {
|
|||
protected _convertModelName(model: string) {
|
||||
return Scaleway.MODEL_IDS[model] || this.model;
|
||||
}
|
||||
protected _convertArgs(options: CompletionOptions, messages: ChatMessage[]): ChatCompletionCreateParams {
|
||||
// Convert model name in the options before passing to parent
|
||||
const modifiedOptions = {
|
||||
...options,
|
||||
model: this._convertModelName(options.model)
|
||||
};
|
||||
return super._convertArgs(modifiedOptions, messages);
|
||||
}
|
||||
}
|
||||
|
||||
export default Scaleway;
|
||||
|
|
|
|||
|
|
@ -43,17 +43,17 @@ import Replicate from "./Replicate";
|
|||
import SageMaker from "./SageMaker";
|
||||
import SambaNova from "./SambaNova";
|
||||
import Scaleway from "./Scaleway";
|
||||
import SiliconFlow from "./SiliconFlow";
|
||||
import ContinueProxy from "./stubs/ContinueProxy";
|
||||
import TestLLM from "./Test";
|
||||
import TextGenWebUI from "./TextGenWebUI";
|
||||
import Together from "./Together";
|
||||
import VertexAI from "./VertexAI";
|
||||
import Vllm from "./Vllm";
|
||||
import WatsonX from "./WatsonX";
|
||||
import xAI from "./xAI";
|
||||
import SiliconFlow from "./SiliconFlow";
|
||||
import TestLLM from "./Test";
|
||||
|
||||
const LLMs = [
|
||||
export const LLMClasses = [
|
||||
Anthropic,
|
||||
Cohere,
|
||||
FreeTrial,
|
||||
|
|
@ -97,6 +97,7 @@ const LLMs = [
|
|||
VertexAI,
|
||||
xAI,
|
||||
SiliconFlow,
|
||||
Scaleway,
|
||||
];
|
||||
|
||||
export async function llmFromDescription(
|
||||
|
|
@ -108,7 +109,7 @@ export async function llmFromDescription(
|
|||
completionOptions?: BaseCompletionOptions,
|
||||
systemMessage?: string,
|
||||
): Promise<BaseLLM | undefined> {
|
||||
const cls = LLMs.find((llm) => llm.providerName === desc.provider);
|
||||
const cls = LLMClasses.find((llm) => llm.providerName === desc.provider);
|
||||
|
||||
if (!cls) {
|
||||
return undefined;
|
||||
|
|
@ -155,7 +156,7 @@ export function llmFromProviderAndOptions(
|
|||
providerName: string,
|
||||
llmOptions: LLMOptions,
|
||||
): ILLM {
|
||||
const cls = LLMs.find((llm) => llm.providerName === providerName);
|
||||
const cls = LLMClasses.find((llm) => llm.providerName === providerName);
|
||||
|
||||
if (!cls) {
|
||||
throw new Error(`Unknown LLM provider type "${providerName}"`);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,15 @@
|
|||
async function* toAsyncIterable(nodeReadable: NodeJS.ReadableStream): AsyncGenerator<Uint8Array> {
|
||||
async function* toAsyncIterable(
|
||||
nodeReadable: NodeJS.ReadableStream,
|
||||
): AsyncGenerator<Uint8Array> {
|
||||
for await (const chunk of nodeReadable) {
|
||||
// @ts-ignore
|
||||
yield chunk as Uint8Array;
|
||||
}
|
||||
}
|
||||
|
||||
export async function* streamResponse(response: Response): AsyncGenerator<string> {
|
||||
export async function* streamResponse(
|
||||
response: Response,
|
||||
): AsyncGenerator<string> {
|
||||
if (response.status !== 200) {
|
||||
throw new Error(await response.text());
|
||||
}
|
||||
|
|
@ -19,7 +24,9 @@ export async function* streamResponse(response: Response): AsyncGenerator<string
|
|||
if (nodeMajorVersion >= 20) {
|
||||
// Use the new API for Node 20 and above
|
||||
const stream = (ReadableStream as any).from(response.body);
|
||||
for await (const chunk of stream.pipeThrough(new TextDecoderStream("utf-8"))) {
|
||||
for await (const chunk of stream.pipeThrough(
|
||||
new TextDecoderStream("utf-8"),
|
||||
)) {
|
||||
yield chunk;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
5387
core/package-lock.json
generated
5387
core/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -45,6 +45,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.0",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
|
|||
|
|
@ -3,13 +3,11 @@ import { TextDecoder, TextEncoder } from "util";
|
|||
import { jest } from "@jest/globals";
|
||||
import fetch, { Request, Response } from "node-fetch";
|
||||
|
||||
console.log("Process debug", process.env.DEBUG);
|
||||
|
||||
if (process.env.DEBUG === "jest") {
|
||||
jest.setTimeout(5 * 60 * 1000);
|
||||
}
|
||||
|
||||
const globalThis = global as any;
|
||||
const globalThis = global;
|
||||
|
||||
globalThis.jest = jest;
|
||||
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
export enum BuiltInToolNames {
|
||||
ReadFile = "read_file",
|
||||
ReadCurrentlyOpenFile = "read_currently_open_file",
|
||||
CreateNewFile = "create_new_file",
|
||||
RunTerminalCommand = "run_terminal_command",
|
||||
ViewSubdirectory = "view_subdirectory",
|
||||
ViewRepoMap = "view_repo_map",
|
||||
ExactSearch = "exact_search",
|
||||
SearchWeb = "search_web",
|
||||
ViewDiff = "view_diff",
|
||||
}
|
||||
ReadFile = "builtin_read_file",
|
||||
ReadCurrentlyOpenFile = "builtin_read_currently_open_file",
|
||||
CreateNewFile = "builtin_create_new_file",
|
||||
RunTerminalCommand = "builtin_run_terminal_command",
|
||||
ViewSubdirectory = "builtin_view_subdirectory",
|
||||
ViewRepoMap = "builtin_view_repo_map",
|
||||
ExactSearch = "builtin_exact_search",
|
||||
SearchWeb = "builtin_search_web",
|
||||
ViewDiff = "builtin_view_diff",
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { ContextItem, ToolExtras } from "..";
|
||||
import MCPConnectionSingleton from "../context/mcp";
|
||||
import { MCPManagerSingleton } from "../context/mcp";
|
||||
import { BuiltInToolNames } from "./builtIn";
|
||||
|
||||
import { createNewFileImpl } from "./implementations/createNewFile";
|
||||
|
|
@ -35,6 +35,18 @@ async function callHttpTool(
|
|||
return data.output;
|
||||
}
|
||||
|
||||
export function encodeMCPToolUri(mcpId: string, toolName: string): string {
|
||||
return `mcp://${encodeURIComponent(mcpId)}/${encodeURIComponent(toolName)}`;
|
||||
}
|
||||
|
||||
export function decodeMCPToolUri(uri: string): [string, string] | null {
|
||||
const url = new URL(uri);
|
||||
if (url.protocol !== "mcp:") {
|
||||
return null;
|
||||
}
|
||||
return [decodeURIComponent(url.hostname), decodeURIComponent(url.pathname)];
|
||||
}
|
||||
|
||||
async function callToolFromUri(
|
||||
uri: string,
|
||||
args: any,
|
||||
|
|
@ -51,11 +63,16 @@ async function callToolFromUri(
|
|||
case "https:":
|
||||
return callHttpTool(uri, args, extras);
|
||||
case "mcp:":
|
||||
const client = await MCPConnectionSingleton.getExistingInstance();
|
||||
const decoded = decodeMCPToolUri(uri);
|
||||
if (!decoded) {
|
||||
throw new Error(`Invalid MCP tool URI: ${uri}`);
|
||||
}
|
||||
const [mcpId, toolName] = decoded;
|
||||
const client = MCPManagerSingleton.getInstance().getConnection(mcpId);
|
||||
|
||||
if (!client) {
|
||||
throw new Error("MCP connection not found");
|
||||
}
|
||||
const toolName = parsedUri!.hostname;
|
||||
const response = await client.client.callTool({
|
||||
name: toolName,
|
||||
arguments: args,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import * as fs from "fs";
|
||||
import * as os from "os";
|
||||
import * as path from "path";
|
||||
|
||||
import * as JSONC from "comment-json";
|
||||
import dotenv from "dotenv";
|
||||
|
||||
|
|
@ -97,6 +98,18 @@ export function getConfigJsonPath(ideType: IdeType = "vscode"): string {
|
|||
return p;
|
||||
}
|
||||
|
||||
export function getConfigYamlPath(ideType: IdeType): string {
|
||||
const p = path.join(getContinueGlobalPath(), "config.yaml");
|
||||
// if (!fs.existsSync(p)) {
|
||||
// if (ideType === "jetbrains") {
|
||||
// fs.writeFileSync(p, YAML.stringify(defaultConfigYamlJetBrains));
|
||||
// } else {
|
||||
// fs.writeFileSync(p, YAML.stringify(defaultConfigYaml));
|
||||
// }
|
||||
// }
|
||||
return p;
|
||||
}
|
||||
|
||||
export function getConfigTsPath(): string {
|
||||
const p = path.join(getContinueGlobalPath(), "config.ts");
|
||||
if (!fs.existsSync(p)) {
|
||||
|
|
|
|||
|
|
@ -502,13 +502,15 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a
|
|||
```json
|
||||
{
|
||||
"experimental": {
|
||||
"modelContextProtocolServer": {
|
||||
"transport": {
|
||||
"type": "stdio",
|
||||
"command": "uvx",
|
||||
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
|
||||
"modelContextProtocolServers": [
|
||||
{
|
||||
"transport": {
|
||||
"type": "stdio",
|
||||
"command": "uvx",
|
||||
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -4,14 +4,41 @@ description: Introduction to customizing Continue
|
|||
keywords: [customize, configure, config]
|
||||
---
|
||||
|
||||
Continue can be deeply customized. This is primarily accomplished by editing a local file located at `~/.continue/config.json` (MacOS / Linux) or `%USERPROFILE%\.continue\config.json` (Windows). `config.json` is created the first time you use Continue.
|
||||
Continue can be deeply customized. For example you might:
|
||||
|
||||
## Getting started
|
||||
- **Change your Model Provider**. Continue allows you to choose your favorite or even add multiple model providers. This allows you to use different models for different tasks, or to try another model if you're not happy with the results from your current model. Continue supports all of the popular model providers, including OpenAI, Anthropic, Microsoft/Azure, Mistral, and more. You can even self host your own model provider if you'd like. Learn more about [model providers](/customize/model-providers).
|
||||
- **Select different model providers for each Compose feature**. Different Continue features can use different model providers. We call these _model types_. For example, you can use a different model provider for chat than you do for autocomplete. Learn more about [model types](/customize/model-types) .
|
||||
- **Add a Context Provider**. Context providers allow you to add information to your prompts, giving your LLM additional context to work with. Context providers allow you to reference snippets from your codebase, or lookup relevant documentation, or use a search engine to find information and much more. Learn more about [context providers](/customize/context-providers).
|
||||
- **Create a Slash Command**. Slash commands allow you to easily add custom functionality to Continue. You can use a slash command that allows you to generate a shell command from natural language, or perhaps generate a commit message, or create your own custom command to do whatever you want. Learn more about [slash commands](/customize/slash-commands).
|
||||
- **Call external tools and functions**. Unchain your LLM with the power of _Tools_. You can call any external tool or function from your prompts. Currently only available with Anthropic. Learn more about [Tools](/customize/tools).
|
||||
|
||||
To open `config.json`, click the "gear" icon in the bottom right corner of the Continue Chat sidebar. When editing this file, you can see the available options suggested as you type, or you can check the [full reference](./deep-dives/configuration.md).
|
||||
Whatever you choose, you'll probably start by editing `config.json`.
|
||||
|
||||
## Editing config.json
|
||||
|
||||
Most custom configuration is done by editing `config.json`. This file is a JSON file that allows you to customize Continue to your liking. It is found at:
|
||||
|
||||
- MacOS and Linux: `~/.continue/config.json`
|
||||
- Windows: `%USERPROFILE%\.continue\config.json`
|
||||
|
||||
You can easily access `config.json` from the Continue Chat sidebar. Open the sidebar by pressing <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains) and click the "gear" icon in the bottom right corner.
|
||||
|
||||

|
||||
|
||||
When editing this file, you can see the available options suggested as you type, or you can check the [full reference](./deep-dives/configuration.md).
|
||||
|
||||
:::info
|
||||
|
||||
`config.json` is created the first time you use Continue. If you'd like to reset your configuration to the default, you can delete this file and Continue will automatically recreate it with the default settings.
|
||||
|
||||
:::
|
||||
|
||||
:::info
|
||||
|
||||
When you save `config.json`, Continue will automatically refresh to take into account your changes.
|
||||
|
||||
:::
|
||||
|
||||
## Per-workspace configuration
|
||||
|
||||
If you'd like to scope certain settings to a particular workspace, you can add a `.continuerc.json` to the root of your project. It has the same [definition](./deep-dives/configuration.md) as `config.json`, and will automatically be applied on top of the local config.json.
|
||||
|
|
|
|||
|
|
@ -114,13 +114,18 @@ The [Model Context Protocol](https://modelcontextprotocol.io/introduction) is a
|
|||
```json
|
||||
{
|
||||
"experimental": {
|
||||
"modelContextProtocolServer": {
|
||||
"transport": {
|
||||
"type": "stdio",
|
||||
"command": "uvx",
|
||||
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
|
||||
"modelContextProtocolServers": [
|
||||
{
|
||||
"transport": {
|
||||
"type": "stdio",
|
||||
"command": "uvx",
|
||||
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Build your own Slash Command
|
||||
You can build your own slash command by following [this tutorial](/customize/tutorials/build-your-own-slash-command).
|
||||
|
|
@ -21,13 +21,15 @@ Currently custom tools can be configured using the [Model Context Protocol](http
|
|||
```json title="~/.continue/config.json"
|
||||
{
|
||||
"experimental": {
|
||||
"modelContextProtocolServer": {
|
||||
"transport": {
|
||||
"type": "stdio",
|
||||
"command": "uvx",
|
||||
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
|
||||
"modelContextProtocolServers": [
|
||||
{
|
||||
"transport": {
|
||||
"type": "stdio",
|
||||
"command": "uvx",
|
||||
"args": ["mcp-server-sqlite", "--db-path", "/Users/NAME/test.db"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -7,6 +7,13 @@ const darkCodeTheme = themes.dracula;
|
|||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
// Docusaurus V3.6 experimental faster compile features
|
||||
// https://docusaurus.io/blog/releases/3.6#adoption-strategy
|
||||
future: {
|
||||
experimental_faster: true,
|
||||
},
|
||||
|
||||
|
||||
title: "Continue",
|
||||
tagline:
|
||||
"the open-source library for accelerating software development with language models",
|
||||
|
|
|
|||
9335
docs/package-lock.json
generated
9335
docs/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -16,9 +16,10 @@
|
|||
"write-heading-ids": "docusaurus write-heading-ids"
|
||||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "^3.5.2",
|
||||
"@docusaurus/plugin-client-redirects": "^3.5.2",
|
||||
"@docusaurus/preset-classic": "^3.5.2",
|
||||
"@docusaurus/core": "^3.6.3",
|
||||
"@docusaurus/faster": "^3.6.3",
|
||||
"@docusaurus/plugin-client-redirects": "^3.6.3",
|
||||
"@docusaurus/preset-classic": "^3.6.3",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.1.0",
|
||||
"prism-react-renderer": "^2.3.1",
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "^3.5.2",
|
||||
"@docusaurus/module-type-aliases": "^3.6.3",
|
||||
"nodemon": "^3.1.4"
|
||||
},
|
||||
"browserslist": {
|
||||
|
|
@ -45,4 +46,4 @@
|
|||
"engines": {
|
||||
"node": ">=20.11.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
BIN
docs/static/img/configure-continue.png
vendored
Normal file
BIN
docs/static/img/configure-continue.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.7 KiB |
|
|
@ -109,6 +109,8 @@ class AsyncFileSaveListener(private val ideProtocolClient: IdeProtocolClient) :
|
|||
".continue\\config.json"
|
||||
) || event.path.endsWith(".continue\\config.ts") || event.path.endsWith(".continuerc.json") || event.path.endsWith(
|
||||
".continuerc.json"
|
||||
) || event.path.endsWith(".continue/config.yaml") || event.path.endsWith(
|
||||
".continue\\config.yaml"
|
||||
)
|
||||
) {
|
||||
return object : AsyncFileListener.ChangeApplier {
|
||||
|
|
|
|||
|
|
@ -5,10 +5,12 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
|||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||
|
||||
|
||||
Pre-release Changes
|
||||
## 0.8.62 - 2024-12-10
|
||||
### Added
|
||||
* Tool use
|
||||
* Support for Model Context Protocol
|
||||
### Fixed
|
||||
* hotfix: context providers no longer hidden when not in edit mode
|
||||
|
||||
## 0.8.59 - 2024-11-25
|
||||
### Fixed
|
||||
|
|
|
|||
|
|
@ -1,128 +0,0 @@
|
|||
{
|
||||
"$schema": "vscode://schemas/color-theme",
|
||||
"name": "Default Dark Modern",
|
||||
"include": "./dark_plus.json",
|
||||
"colors": {
|
||||
"activityBar.activeBorder": "#0078D4",
|
||||
"activityBar.background": "#181818",
|
||||
"activityBar.border": "#2B2B2B",
|
||||
"activityBar.foreground": "#D7D7D7",
|
||||
"activityBar.inactiveForeground": "#868686",
|
||||
"activityBarBadge.background": "#0078D4",
|
||||
"activityBarBadge.foreground": "#FFFFFF",
|
||||
"badge.background": "#616161",
|
||||
"badge.foreground": "#F8F8F8",
|
||||
"button.background": "#0078D4",
|
||||
"button.border": "#FFFFFF12",
|
||||
"button.foreground": "#FFFFFF",
|
||||
"button.hoverBackground": "#026EC1",
|
||||
"button.secondaryBackground": "#313131",
|
||||
"button.secondaryForeground": "#CCCCCC",
|
||||
"button.secondaryHoverBackground": "#3C3C3C",
|
||||
"chat.slashCommandBackground": "#34414B",
|
||||
"chat.slashCommandForeground": "#40A6FF",
|
||||
"checkbox.background": "#313131",
|
||||
"checkbox.border": "#3C3C3C",
|
||||
"debugToolBar.background": "#181818",
|
||||
"descriptionForeground": "#9D9D9D",
|
||||
"dropdown.background": "#313131",
|
||||
"dropdown.border": "#3C3C3C",
|
||||
"dropdown.foreground": "#CCCCCC",
|
||||
"dropdown.listBackground": "#1F1F1F",
|
||||
"editor.background": "#1F1F1F",
|
||||
"editor.findMatchBackground": "#9E6A03",
|
||||
"editor.foreground": "#CCCCCC",
|
||||
"editorGroup.border": "#FFFFFF17",
|
||||
"editorGroupHeader.tabsBackground": "#181818",
|
||||
"editorGroupHeader.tabsBorder": "#2B2B2B",
|
||||
"editorGutter.addedBackground": "#2EA043",
|
||||
"editorGutter.deletedBackground": "#F85149",
|
||||
"editorGutter.modifiedBackground": "#0078D4",
|
||||
"editorLineNumber.activeForeground": "#CCCCCC",
|
||||
"editorLineNumber.foreground": "#6E7681",
|
||||
"editorOverviewRuler.border": "#010409",
|
||||
"editorWidget.background": "#202020",
|
||||
"errorForeground": "#F85149",
|
||||
"focusBorder": "#0078D4",
|
||||
"foreground": "#CCCCCC",
|
||||
"icon.foreground": "#CCCCCC",
|
||||
"input.background": "#313131",
|
||||
"input.border": "#3C3C3C",
|
||||
"input.foreground": "#CCCCCC",
|
||||
"input.placeholderForeground": "#989898",
|
||||
"inputOption.activeBackground": "#2489DB82",
|
||||
"inputOption.activeBorder": "#2488DB",
|
||||
"keybindingLabel.foreground": "#CCCCCC",
|
||||
"menu.background": "#1F1F1F",
|
||||
"notificationCenterHeader.background": "#1F1F1F",
|
||||
"notificationCenterHeader.foreground": "#CCCCCC",
|
||||
"notifications.background": "#1F1F1F",
|
||||
"notifications.border": "#2B2B2B",
|
||||
"notifications.foreground": "#CCCCCC",
|
||||
"panel.background": "#181818",
|
||||
"panel.border": "#2B2B2B",
|
||||
"panelInput.border": "#2B2B2B",
|
||||
"panelTitle.activeBorder": "#0078D4",
|
||||
"panelTitle.activeForeground": "#CCCCCC",
|
||||
"panelTitle.inactiveForeground": "#9D9D9D",
|
||||
"peekViewEditor.background": "#1F1F1F",
|
||||
"peekViewEditor.matchHighlightBackground": "#BB800966",
|
||||
"peekViewResult.background": "#1F1F1F",
|
||||
"peekViewResult.matchHighlightBackground": "#BB800966",
|
||||
"pickerGroup.border": "#3C3C3C",
|
||||
"progressBar.background": "#0078D4",
|
||||
"quickInput.background": "#222222",
|
||||
"quickInput.foreground": "#CCCCCC",
|
||||
"settings.dropdownBackground": "#313131",
|
||||
"settings.dropdownBorder": "#3C3C3C",
|
||||
"settings.headerForeground": "#FFFFFF",
|
||||
"settings.modifiedItemIndicator": "#BB800966",
|
||||
"sideBar.background": "#181818",
|
||||
"sideBar.border": "#2B2B2B",
|
||||
"sideBar.foreground": "#CCCCCC",
|
||||
"sideBarSectionHeader.background": "#181818",
|
||||
"sideBarSectionHeader.border": "#2B2B2B",
|
||||
"sideBarSectionHeader.foreground": "#CCCCCC",
|
||||
"sideBarTitle.foreground": "#CCCCCC",
|
||||
"statusBar.background": "#181818",
|
||||
"statusBar.border": "#2B2B2B",
|
||||
"statusBar.debuggingBackground": "#0078D4",
|
||||
"statusBar.debuggingForeground": "#FFFFFF",
|
||||
"statusBar.focusBorder": "#0078D4",
|
||||
"statusBar.foreground": "#CCCCCC",
|
||||
"statusBar.noFolderBackground": "#1F1F1F",
|
||||
"statusBarItem.focusBorder": "#0078D4",
|
||||
"statusBarItem.prominentBackground": "#6E768166",
|
||||
"statusBarItem.remoteBackground": "#0078D4",
|
||||
"statusBarItem.remoteForeground": "#FFFFFF",
|
||||
"tab.activeBackground": "#1F1F1F",
|
||||
"tab.activeBorder": "#1F1F1F",
|
||||
"tab.activeBorderTop": "#0078D4",
|
||||
"tab.activeForeground": "#FFFFFF",
|
||||
"tab.border": "#2B2B2B",
|
||||
"tab.hoverBackground": "#1F1F1F",
|
||||
"tab.inactiveBackground": "#181818",
|
||||
"tab.inactiveForeground": "#9D9D9D",
|
||||
"tab.unfocusedActiveBorder": "#1F1F1F",
|
||||
"tab.unfocusedActiveBorderTop": "#2B2B2B",
|
||||
"tab.unfocusedHoverBackground": "#1F1F1F",
|
||||
"terminal.foreground": "#CCCCCC",
|
||||
"terminal.tab.activeBorder": "#0078D4",
|
||||
"textBlockQuote.background": "#2B2B2B",
|
||||
"textBlockQuote.border": "#616161",
|
||||
"textCodeBlock.background": "#2B2B2B",
|
||||
"textLink.activeForeground": "#4daafc",
|
||||
"textLink.foreground": "#4daafc",
|
||||
"textPreformat.foreground": "#D0D0D0",
|
||||
"textPreformat.background": "#3C3C3C",
|
||||
"textSeparator.foreground": "#21262D",
|
||||
"titleBar.activeBackground": "#181818",
|
||||
"titleBar.activeForeground": "#CCCCCC",
|
||||
"titleBar.border": "#2B2B2B",
|
||||
"titleBar.inactiveBackground": "#1F1F1F",
|
||||
"titleBar.inactiveForeground": "#9D9D9D",
|
||||
"welcomePage.tileBackground": "#2B2B2B",
|
||||
"welcomePage.progress.foreground": "#0078D4",
|
||||
"widget.border": "#313131"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,193 +0,0 @@
|
|||
{
|
||||
"$schema": "vscode://schemas/color-theme",
|
||||
"name": "Dark+",
|
||||
"include": "./dark_vs.json",
|
||||
"tokenColors": [
|
||||
{
|
||||
"name": "Function declarations",
|
||||
"scope": [
|
||||
"entity.name.function",
|
||||
"support.function",
|
||||
"support.constant.handlebars",
|
||||
"source.powershell variable.other.member",
|
||||
"entity.name.operator.custom-literal"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#DCDCAA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Types declaration and references",
|
||||
"scope": [
|
||||
"support.class",
|
||||
"support.type",
|
||||
"entity.name.type",
|
||||
"entity.name.namespace",
|
||||
"entity.other.attribute",
|
||||
"entity.name.scope-resolution",
|
||||
"entity.name.class",
|
||||
"storage.type.numeric.go",
|
||||
"storage.type.byte.go",
|
||||
"storage.type.boolean.go",
|
||||
"storage.type.string.go",
|
||||
"storage.type.uintptr.go",
|
||||
"storage.type.error.go",
|
||||
"storage.type.rune.go",
|
||||
"storage.type.cs",
|
||||
"storage.type.generic.cs",
|
||||
"storage.type.modifier.cs",
|
||||
"storage.type.variable.cs",
|
||||
"storage.type.annotation.java",
|
||||
"storage.type.generic.java",
|
||||
"storage.type.java",
|
||||
"storage.type.object.array.java",
|
||||
"storage.type.primitive.array.java",
|
||||
"storage.type.primitive.java",
|
||||
"storage.type.token.java",
|
||||
"storage.type.groovy",
|
||||
"storage.type.annotation.groovy",
|
||||
"storage.type.parameters.groovy",
|
||||
"storage.type.generic.groovy",
|
||||
"storage.type.object.array.groovy",
|
||||
"storage.type.primitive.array.groovy",
|
||||
"storage.type.primitive.groovy"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#4EC9B0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Types declaration and references, TS grammar specific",
|
||||
"scope": [
|
||||
"meta.type.cast.expr",
|
||||
"meta.type.new.expr",
|
||||
"support.constant.math",
|
||||
"support.constant.dom",
|
||||
"support.constant.json",
|
||||
"entity.other.inherited-class"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#4EC9B0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Control flow / Special keywords",
|
||||
"scope": [
|
||||
"keyword.control",
|
||||
"source.cpp keyword.operator.new",
|
||||
"keyword.operator.delete",
|
||||
"keyword.other.using",
|
||||
"keyword.other.directive.using",
|
||||
"keyword.other.operator",
|
||||
"entity.name.operator"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#C586C0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Variable and parameter name",
|
||||
"scope": [
|
||||
"variable",
|
||||
"meta.definition.variable.name",
|
||||
"support.variable",
|
||||
"entity.name.variable",
|
||||
"constant.other.placeholder"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Constants and enums",
|
||||
"scope": ["variable.other.constant", "variable.other.enummember"],
|
||||
"settings": {
|
||||
"foreground": "#4FC1FF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Object keys, TS grammar specific",
|
||||
"scope": ["meta.object-literal.key"],
|
||||
"settings": {
|
||||
"foreground": "#9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CSS property value",
|
||||
"scope": [
|
||||
"support.constant.property-value",
|
||||
"support.constant.font-name",
|
||||
"support.constant.media-type",
|
||||
"support.constant.media",
|
||||
"constant.other.color.rgb-value",
|
||||
"constant.other.rgb-value",
|
||||
"support.constant.color"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#CE9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Regular expression groups",
|
||||
"scope": [
|
||||
"punctuation.definition.group.regexp",
|
||||
"punctuation.definition.group.assertion.regexp",
|
||||
"punctuation.definition.character-class.regexp",
|
||||
"punctuation.character.set.begin.regexp",
|
||||
"punctuation.character.set.end.regexp",
|
||||
"keyword.operator.negation.regexp",
|
||||
"support.other.parenthesis.regexp"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#CE9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"constant.character.character-class.regexp",
|
||||
"constant.other.character-class.set.regexp",
|
||||
"constant.other.character-class.regexp",
|
||||
"constant.character.set.regexp"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#d16969"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"],
|
||||
"settings": {
|
||||
"foreground": "#DCDCAA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.operator.quantifier.regexp",
|
||||
"settings": {
|
||||
"foreground": "#d7ba7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["constant.character", "constant.other.option"],
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.character.escape",
|
||||
"settings": {
|
||||
"foreground": "#d7ba7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.name.label",
|
||||
"settings": {
|
||||
"foreground": "#C8C8C8"
|
||||
}
|
||||
}
|
||||
],
|
||||
"semanticTokenColors": {
|
||||
"newOperator": "#C586C0",
|
||||
"stringLiteral": "#ce9178",
|
||||
"customLiteral": "#DCDCAA",
|
||||
"numberLiteral": "#b5cea8"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,394 +0,0 @@
|
|||
{
|
||||
"$schema": "vscode://schemas/color-theme",
|
||||
"name": "Dark (Visual Studio)",
|
||||
"colors": {
|
||||
"checkbox.border": "#6B6B6B",
|
||||
"editor.background": "#1E1E1E",
|
||||
"editor.foreground": "#D4D4D4",
|
||||
"editor.inactiveSelectionBackground": "#3A3D41",
|
||||
"editorIndentGuide.background1": "#404040",
|
||||
"editorIndentGuide.activeBackground1": "#707070",
|
||||
"editor.selectionHighlightBackground": "#ADD6FF26",
|
||||
"list.dropBackground": "#383B3D",
|
||||
"activityBarBadge.background": "#007ACC",
|
||||
"sideBarTitle.foreground": "#BBBBBB",
|
||||
"input.placeholderForeground": "#A6A6A6",
|
||||
"menu.background": "#252526",
|
||||
"menu.foreground": "#CCCCCC",
|
||||
"menu.separatorBackground": "#454545",
|
||||
"menu.border": "#454545",
|
||||
"statusBarItem.remoteForeground": "#FFF",
|
||||
"statusBarItem.remoteBackground": "#16825D",
|
||||
"ports.iconRunningProcessForeground": "#369432",
|
||||
"sideBarSectionHeader.background": "#0000",
|
||||
"sideBarSectionHeader.border": "#ccc3",
|
||||
"tab.lastPinnedBorder": "#ccc3",
|
||||
"list.activeSelectionIconForeground": "#FFF",
|
||||
"terminal.inactiveSelectionBackground": "#3A3D41",
|
||||
"widget.border": "#303031",
|
||||
"actionBar.toggledBackground": "#383a49"
|
||||
},
|
||||
"tokenColors": [
|
||||
{
|
||||
"scope": [
|
||||
"meta.embedded",
|
||||
"source.groovy.embedded",
|
||||
"string meta.image.inline.markdown",
|
||||
"variable.legacy.builtin.python"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#D4D4D4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "emphasis",
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "strong",
|
||||
"settings": {
|
||||
"fontStyle": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "header",
|
||||
"settings": {
|
||||
"foreground": "#000080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "comment",
|
||||
"settings": {
|
||||
"foreground": "#6A9955"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.language",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"constant.numeric",
|
||||
"variable.other.enummember",
|
||||
"keyword.operator.plus.exponent",
|
||||
"keyword.operator.minus.exponent"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#b5cea8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.regexp",
|
||||
"settings": {
|
||||
"foreground": "#646695"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.name.tag",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["entity.name.tag.css", "entity.name.tag.less"],
|
||||
"settings": {
|
||||
"foreground": "#d7ba7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.other.attribute-name",
|
||||
"settings": {
|
||||
"foreground": "#9cdcfe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"entity.other.attribute-name.class.css",
|
||||
"source.css entity.other.attribute-name.class",
|
||||
"entity.other.attribute-name.id.css",
|
||||
"entity.other.attribute-name.parent-selector.css",
|
||||
"entity.other.attribute-name.parent.less",
|
||||
"source.css entity.other.attribute-name.pseudo-class",
|
||||
"entity.other.attribute-name.pseudo-element.css",
|
||||
"source.css.less entity.other.attribute-name.id",
|
||||
"entity.other.attribute-name.scss"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#d7ba7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "invalid",
|
||||
"settings": {
|
||||
"foreground": "#f44747"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.underline",
|
||||
"settings": {
|
||||
"fontStyle": "underline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.bold",
|
||||
"settings": {
|
||||
"fontStyle": "bold",
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.heading",
|
||||
"settings": {
|
||||
"fontStyle": "bold",
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.italic",
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.strikethrough",
|
||||
"settings": {
|
||||
"fontStyle": "strikethrough"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.inserted",
|
||||
"settings": {
|
||||
"foreground": "#b5cea8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.deleted",
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.changed",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "punctuation.definition.quote.begin.markdown",
|
||||
"settings": {
|
||||
"foreground": "#6A9955"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "punctuation.definition.list.begin.markdown",
|
||||
"settings": {
|
||||
"foreground": "#6796e6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.inline.raw",
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "brackets of XML/HTML tags",
|
||||
"scope": "punctuation.definition.tag",
|
||||
"settings": {
|
||||
"foreground": "#808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["meta.preprocessor", "entity.name.function.preprocessor"],
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.preprocessor.string",
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.preprocessor.numeric",
|
||||
"settings": {
|
||||
"foreground": "#b5cea8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.structure.dictionary.key.python",
|
||||
"settings": {
|
||||
"foreground": "#9cdcfe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.diff.header",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "storage",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "storage.type",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["storage.modifier", "keyword.operator.noexcept"],
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["string", "meta.embedded.assembly"],
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "string.tag",
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "string.value",
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "string.regexp",
|
||||
"settings": {
|
||||
"foreground": "#d16969"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "String interpolation",
|
||||
"scope": [
|
||||
"punctuation.definition.template-expression.begin",
|
||||
"punctuation.definition.template-expression.end",
|
||||
"punctuation.section.embedded"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Reset JavaScript string interpolation expression",
|
||||
"scope": ["meta.template.expression"],
|
||||
"settings": {
|
||||
"foreground": "#d4d4d4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"support.type.vendored.property-name",
|
||||
"support.type.property-name",
|
||||
"source.css variable",
|
||||
"source.coffee.embedded"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#9cdcfe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.control",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.operator",
|
||||
"settings": {
|
||||
"foreground": "#d4d4d4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"keyword.operator.new",
|
||||
"keyword.operator.expression",
|
||||
"keyword.operator.cast",
|
||||
"keyword.operator.sizeof",
|
||||
"keyword.operator.alignof",
|
||||
"keyword.operator.typeid",
|
||||
"keyword.operator.alignas",
|
||||
"keyword.operator.instanceof",
|
||||
"keyword.operator.logical.python",
|
||||
"keyword.operator.wordlike"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.other.unit",
|
||||
"settings": {
|
||||
"foreground": "#b5cea8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"punctuation.section.embedded.begin.php",
|
||||
"punctuation.section.embedded.end.php"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "support.function.git-rebase",
|
||||
"settings": {
|
||||
"foreground": "#9cdcfe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.sha.git-rebase",
|
||||
"settings": {
|
||||
"foreground": "#b5cea8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "coloring of the Java import and package identifiers",
|
||||
"scope": [
|
||||
"storage.modifier.import.java",
|
||||
"variable.language.wildcard.java",
|
||||
"storage.modifier.package.java"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#d4d4d4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "this.self",
|
||||
"scope": "variable.language",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
}
|
||||
],
|
||||
"semanticHighlighting": true,
|
||||
"semanticTokenColors": {
|
||||
"newOperator": "#d4d4d4",
|
||||
"stringLiteral": "#ce9178",
|
||||
"customLiteral": "#D4D4D4",
|
||||
"numberLiteral": "#b5cea8"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,468 +0,0 @@
|
|||
{
|
||||
"$schema": "vscode://schemas/color-theme",
|
||||
"name": "Dark High Contrast",
|
||||
"colors": {
|
||||
"editor.background": "#000000",
|
||||
"editor.foreground": "#FFFFFF",
|
||||
"editorIndentGuide.background1": "#FFFFFF",
|
||||
"editorIndentGuide.activeBackground1": "#FFFFFF",
|
||||
"sideBarTitle.foreground": "#FFFFFF",
|
||||
"selection.background": "#008000",
|
||||
"editor.selectionBackground": "#FFFFFF",
|
||||
"statusBarItem.remoteBackground": "#00000000",
|
||||
"ports.iconRunningProcessForeground": "#FFFFFF",
|
||||
"editorWhitespace.foreground": "#7c7c7c",
|
||||
"actionBar.toggledBackground": "#383a49"
|
||||
},
|
||||
"tokenColors": [
|
||||
{
|
||||
"scope": [
|
||||
"meta.embedded",
|
||||
"source.groovy.embedded",
|
||||
"string meta.image.inline.markdown",
|
||||
"variable.legacy.builtin.python"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#FFFFFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "emphasis",
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "strong",
|
||||
"settings": {
|
||||
"fontStyle": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.diff.header",
|
||||
"settings": {
|
||||
"foreground": "#000080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "comment",
|
||||
"settings": {
|
||||
"foreground": "#7ca668"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.language",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"constant.numeric",
|
||||
"constant.other.color.rgb-value",
|
||||
"constant.other.rgb-value",
|
||||
"support.constant.color"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#b5cea8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.regexp",
|
||||
"settings": {
|
||||
"foreground": "#b46695"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.character",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.name.tag",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"entity.name.tag.css",
|
||||
"entity.name.tag.less"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#d7ba7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.other.attribute-name",
|
||||
"settings": {
|
||||
"foreground": "#9cdcfe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"entity.other.attribute-name.class.css",
|
||||
"source.css entity.other.attribute-name.class",
|
||||
"entity.other.attribute-name.id.css",
|
||||
"entity.other.attribute-name.parent-selector.css",
|
||||
"entity.other.attribute-name.parent.less",
|
||||
"source.css entity.other.attribute-name.pseudo-class",
|
||||
"entity.other.attribute-name.pseudo-element.css",
|
||||
"source.css.less entity.other.attribute-name.id",
|
||||
"entity.other.attribute-name.scss"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#d7ba7d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "invalid",
|
||||
"settings": {
|
||||
"foreground": "#f44747"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.underline",
|
||||
"settings": {
|
||||
"fontStyle": "underline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.bold",
|
||||
"settings": {
|
||||
"fontStyle": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.heading",
|
||||
"settings": {
|
||||
"fontStyle": "bold",
|
||||
"foreground": "#6796e6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.italic",
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.strikethrough",
|
||||
"settings": {
|
||||
"fontStyle": "strikethrough"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.inserted",
|
||||
"settings": {
|
||||
"foreground": "#b5cea8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.deleted",
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.changed",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "brackets of XML/HTML tags",
|
||||
"scope": [
|
||||
"punctuation.definition.tag"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#808080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.preprocessor",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.preprocessor.string",
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.preprocessor.numeric",
|
||||
"settings": {
|
||||
"foreground": "#b5cea8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.structure.dictionary.key.python",
|
||||
"settings": {
|
||||
"foreground": "#9cdcfe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "storage",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "storage.type",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "storage.modifier",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "string",
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "string.tag",
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "string.value",
|
||||
"settings": {
|
||||
"foreground": "#ce9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "string.regexp",
|
||||
"settings": {
|
||||
"foreground": "#d16969"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "String interpolation",
|
||||
"scope": [
|
||||
"punctuation.definition.template-expression.begin",
|
||||
"punctuation.definition.template-expression.end",
|
||||
"punctuation.section.embedded"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Reset JavaScript string interpolation expression",
|
||||
"scope": [
|
||||
"meta.template.expression"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#ffffff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"support.type.vendored.property-name",
|
||||
"support.type.property-name",
|
||||
"source.css variable",
|
||||
"source.coffee.embedded"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#d4d4d4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.control",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.operator",
|
||||
"settings": {
|
||||
"foreground": "#d4d4d4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"keyword.operator.new",
|
||||
"keyword.operator.expression",
|
||||
"keyword.operator.cast",
|
||||
"keyword.operator.sizeof",
|
||||
"keyword.operator.logical.python"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.other.unit",
|
||||
"settings": {
|
||||
"foreground": "#b5cea8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "support.function.git-rebase",
|
||||
"settings": {
|
||||
"foreground": "#d4d4d4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.sha.git-rebase",
|
||||
"settings": {
|
||||
"foreground": "#b5cea8"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "coloring of the Java import and package identifiers",
|
||||
"scope": [
|
||||
"storage.modifier.import.java",
|
||||
"variable.language.wildcard.java",
|
||||
"storage.modifier.package.java"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#d4d4d4"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "coloring of the TS this",
|
||||
"scope": "variable.language.this",
|
||||
"settings": {
|
||||
"foreground": "#569cd6"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Function declarations",
|
||||
"scope": [
|
||||
"entity.name.function",
|
||||
"support.function",
|
||||
"support.constant.handlebars",
|
||||
"source.powershell variable.other.member"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#DCDCAA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Types declaration and references",
|
||||
"scope": [
|
||||
"support.class",
|
||||
"support.type",
|
||||
"entity.name.type",
|
||||
"entity.name.namespace",
|
||||
"entity.name.scope-resolution",
|
||||
"entity.name.class",
|
||||
"storage.type.cs",
|
||||
"storage.type.generic.cs",
|
||||
"storage.type.modifier.cs",
|
||||
"storage.type.variable.cs",
|
||||
"storage.type.annotation.java",
|
||||
"storage.type.generic.java",
|
||||
"storage.type.java",
|
||||
"storage.type.object.array.java",
|
||||
"storage.type.primitive.array.java",
|
||||
"storage.type.primitive.java",
|
||||
"storage.type.token.java",
|
||||
"storage.type.groovy",
|
||||
"storage.type.annotation.groovy",
|
||||
"storage.type.parameters.groovy",
|
||||
"storage.type.generic.groovy",
|
||||
"storage.type.object.array.groovy",
|
||||
"storage.type.primitive.array.groovy",
|
||||
"storage.type.primitive.groovy"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#4EC9B0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Types declaration and references, TS grammar specific",
|
||||
"scope": [
|
||||
"meta.type.cast.expr",
|
||||
"meta.type.new.expr",
|
||||
"support.constant.math",
|
||||
"support.constant.dom",
|
||||
"support.constant.json",
|
||||
"entity.other.inherited-class"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#4EC9B0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Control flow / Special keywords",
|
||||
"scope": [
|
||||
"keyword.control",
|
||||
"source.cpp keyword.operator.new",
|
||||
"source.cpp keyword.operator.delete",
|
||||
"keyword.other.using",
|
||||
"keyword.other.directive.using",
|
||||
"keyword.other.operator"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#C586C0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Variable and parameter name",
|
||||
"scope": [
|
||||
"variable",
|
||||
"meta.definition.variable.name",
|
||||
"support.variable"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Object keys, TS grammar specific",
|
||||
"scope": [
|
||||
"meta.object-literal.key"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#9CDCFE"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CSS property value",
|
||||
"scope": [
|
||||
"support.constant.property-value",
|
||||
"support.constant.font-name",
|
||||
"support.constant.media-type",
|
||||
"support.constant.media",
|
||||
"constant.other.color.rgb-value",
|
||||
"constant.other.rgb-value",
|
||||
"support.constant.color"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#CE9178"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "HC Search Editor context line override",
|
||||
"scope": "meta.resultLinePrefix.contextLinePrefix.search",
|
||||
"settings": {
|
||||
"foreground": "#CBEDCB"
|
||||
}
|
||||
}
|
||||
],
|
||||
"semanticHighlighting": true,
|
||||
"semanticTokenColors": {
|
||||
"newOperator": "#FFFFFF",
|
||||
"stringLiteral": "#ce9178",
|
||||
"customLiteral": "#DCDCAA",
|
||||
"numberLiteral": "#b5cea8"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,573 +0,0 @@
|
|||
{
|
||||
"$schema": "vscode://schemas/color-theme",
|
||||
"name": "Light High Contrast",
|
||||
"tokenColors": [
|
||||
{
|
||||
"scope": [
|
||||
"meta.embedded",
|
||||
"source.groovy.embedded",
|
||||
"variable.legacy.builtin.python"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#292929"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "emphasis",
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "strong",
|
||||
"settings": {
|
||||
"fontStyle": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.diff.header",
|
||||
"settings": {
|
||||
"foreground": "#062F4A"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "comment",
|
||||
"settings": {
|
||||
"foreground": "#515151"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.language",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"constant.numeric",
|
||||
"variable.other.enummember",
|
||||
"keyword.operator.plus.exponent",
|
||||
"keyword.operator.minus.exponent"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#096d48"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.regexp",
|
||||
"settings": {
|
||||
"foreground": "#811F3F"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.name.tag",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.name.selector",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.other.attribute-name",
|
||||
"settings": {
|
||||
"foreground": "#264F78"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"entity.other.attribute-name.class.css",
|
||||
"source.css entity.other.attribute-name.class",
|
||||
"entity.other.attribute-name.id.css",
|
||||
"entity.other.attribute-name.parent-selector.css",
|
||||
"entity.other.attribute-name.parent.less",
|
||||
"source.css entity.other.attribute-name.pseudo-class",
|
||||
"entity.other.attribute-name.pseudo-element.css",
|
||||
"source.css.less entity.other.attribute-name.id",
|
||||
"entity.other.attribute-name.scss"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "invalid",
|
||||
"settings": {
|
||||
"foreground": "#B5200D"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.underline",
|
||||
"settings": {
|
||||
"fontStyle": "underline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.bold",
|
||||
"settings": {
|
||||
"foreground": "#000080",
|
||||
"fontStyle": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.heading",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85",
|
||||
"fontStyle": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.italic",
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.strikethrough",
|
||||
"settings": {
|
||||
"fontStyle": "strikethrough"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.inserted",
|
||||
"settings": {
|
||||
"foreground": "#096d48"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.deleted",
|
||||
"settings": {
|
||||
"foreground": "#5A5A5A"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.changed",
|
||||
"settings": {
|
||||
"foreground": "#0451A5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"punctuation.definition.quote.begin.markdown",
|
||||
"punctuation.definition.list.begin.markdown"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0451A5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.inline.raw",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "punctuation.definition.tag",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["meta.preprocessor", "entity.name.function.preprocessor"],
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.preprocessor.string",
|
||||
"settings": {
|
||||
"foreground": "#b5200d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.preprocessor.numeric",
|
||||
"settings": {
|
||||
"foreground": "#096d48"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.structure.dictionary.key.python",
|
||||
"settings": {
|
||||
"foreground": "#0451A5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "storage",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "storage.type",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["storage.modifier", "keyword.operator.noexcept"],
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["string", "meta.embedded.assembly"],
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"string.comment.buffered.block.pug",
|
||||
"string.quoted.pug",
|
||||
"string.interpolated.pug",
|
||||
"string.unquoted.plain.in.yaml",
|
||||
"string.unquoted.plain.out.yaml",
|
||||
"string.unquoted.block.yaml",
|
||||
"string.quoted.single.yaml",
|
||||
"string.quoted.double.xml",
|
||||
"string.quoted.single.xml",
|
||||
"string.unquoted.cdata.xml",
|
||||
"string.quoted.double.html",
|
||||
"string.quoted.single.html",
|
||||
"string.unquoted.html",
|
||||
"string.quoted.single.handlebars",
|
||||
"string.quoted.double.handlebars"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "string.regexp",
|
||||
"settings": {
|
||||
"foreground": "#811F3F"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"punctuation.definition.template-expression.begin",
|
||||
"punctuation.definition.template-expression.end",
|
||||
"punctuation.section.embedded"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["meta.template.expression"],
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"support.constant.property-value",
|
||||
"support.constant.font-name",
|
||||
"support.constant.media-type",
|
||||
"support.constant.media",
|
||||
"constant.other.color.rgb-value",
|
||||
"constant.other.rgb-value",
|
||||
"support.constant.color"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0451A5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"support.type.vendored.property-name",
|
||||
"support.type.property-name",
|
||||
"source.css variable",
|
||||
"source.coffee.embedded"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#264F78"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["support.type.property-name.json"],
|
||||
"settings": {
|
||||
"foreground": "#0451A5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.control",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.operator",
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"keyword.operator.new",
|
||||
"keyword.operator.expression",
|
||||
"keyword.operator.cast",
|
||||
"keyword.operator.sizeof",
|
||||
"keyword.operator.alignof",
|
||||
"keyword.operator.typeid",
|
||||
"keyword.operator.alignas",
|
||||
"keyword.operator.instanceof",
|
||||
"keyword.operator.logical.python",
|
||||
"keyword.operator.wordlike"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.other.unit",
|
||||
"settings": {
|
||||
"foreground": "#096d48"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"punctuation.section.embedded.begin.php",
|
||||
"punctuation.section.embedded.end.php"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "support.function.git-rebase",
|
||||
"settings": {
|
||||
"foreground": "#0451A5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.sha.git-rebase",
|
||||
"settings": {
|
||||
"foreground": "#096d48"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"storage.modifier.import.java",
|
||||
"variable.language.wildcard.java",
|
||||
"storage.modifier.package.java"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "variable.language",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"entity.name.function",
|
||||
"support.function",
|
||||
"support.constant.handlebars",
|
||||
"source.powershell variable.other.member",
|
||||
"entity.name.operator.custom-literal"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#5e2cbc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"support.class",
|
||||
"support.type",
|
||||
"entity.name.type",
|
||||
"entity.name.namespace",
|
||||
"entity.other.attribute",
|
||||
"entity.name.scope-resolution",
|
||||
"entity.name.class",
|
||||
"storage.type.numeric.go",
|
||||
"storage.type.byte.go",
|
||||
"storage.type.boolean.go",
|
||||
"storage.type.string.go",
|
||||
"storage.type.uintptr.go",
|
||||
"storage.type.error.go",
|
||||
"storage.type.rune.go",
|
||||
"storage.type.cs",
|
||||
"storage.type.generic.cs",
|
||||
"storage.type.modifier.cs",
|
||||
"storage.type.variable.cs",
|
||||
"storage.type.annotation.java",
|
||||
"storage.type.generic.java",
|
||||
"storage.type.java",
|
||||
"storage.type.object.array.java",
|
||||
"storage.type.primitive.array.java",
|
||||
"storage.type.primitive.java",
|
||||
"storage.type.token.java",
|
||||
"storage.type.groovy",
|
||||
"storage.type.annotation.groovy",
|
||||
"storage.type.parameters.groovy",
|
||||
"storage.type.generic.groovy",
|
||||
"storage.type.object.array.groovy",
|
||||
"storage.type.primitive.array.groovy",
|
||||
"storage.type.primitive.groovy"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#185E73"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"meta.type.cast.expr",
|
||||
"meta.type.new.expr",
|
||||
"support.constant.math",
|
||||
"support.constant.dom",
|
||||
"support.constant.json",
|
||||
"entity.other.inherited-class"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#185E73"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"keyword.control",
|
||||
"source.cpp keyword.operator.new",
|
||||
"source.cpp keyword.operator.delete",
|
||||
"keyword.other.using",
|
||||
"keyword.other.directive.using",
|
||||
"keyword.other.operator",
|
||||
"entity.name.operator"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#b5200d"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"variable",
|
||||
"meta.definition.variable.name",
|
||||
"support.variable",
|
||||
"entity.name.variable",
|
||||
"constant.other.placeholder"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#001080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["variable.other.constant", "variable.other.enummember"],
|
||||
"settings": {
|
||||
"foreground": "#02715D"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["meta.object-literal.key"],
|
||||
"settings": {
|
||||
"foreground": "#001080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"support.constant.property-value",
|
||||
"support.constant.font-name",
|
||||
"support.constant.media-type",
|
||||
"support.constant.media",
|
||||
"constant.other.color.rgb-value",
|
||||
"constant.other.rgb-value",
|
||||
"support.constant.color"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0451A5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"punctuation.definition.group.regexp",
|
||||
"punctuation.definition.group.assertion.regexp",
|
||||
"punctuation.definition.character-class.regexp",
|
||||
"punctuation.character.set.begin.regexp",
|
||||
"punctuation.character.set.end.regexp",
|
||||
"keyword.operator.negation.regexp",
|
||||
"support.other.parenthesis.regexp"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#D16969"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"constant.character.character-class.regexp",
|
||||
"constant.other.character-class.set.regexp",
|
||||
"constant.other.character-class.regexp",
|
||||
"constant.character.set.regexp"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#811F3F"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.operator.quantifier.regexp",
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"],
|
||||
"settings": {
|
||||
"foreground": "#EE0000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.character",
|
||||
"settings": {
|
||||
"foreground": "#0F4A85"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.character.escape",
|
||||
"settings": {
|
||||
"foreground": "#EE0000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.name.label",
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "token.info-token",
|
||||
"settings": {
|
||||
"foreground": "#316BCD"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "token.warn-token",
|
||||
"settings": {
|
||||
"foreground": "#CD9731"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "token.error-token",
|
||||
"settings": {
|
||||
"foreground": "#CD3131"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "token.debug-token",
|
||||
"settings": {
|
||||
"foreground": "#800080"
|
||||
}
|
||||
}
|
||||
],
|
||||
"colors": {
|
||||
"actionBar.toggledBackground": "#dddddd"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,145 +0,0 @@
|
|||
{
|
||||
"$schema": "vscode://schemas/color-theme",
|
||||
"name": "Default Light Modern",
|
||||
"include": "./light_plus.json",
|
||||
"colors": {
|
||||
"activityBar.activeBorder": "#005FB8",
|
||||
"activityBar.background": "#F8F8F8",
|
||||
"activityBar.border": "#E5E5E5",
|
||||
"activityBar.foreground": "#1F1F1F",
|
||||
"activityBar.inactiveForeground": "#616161",
|
||||
"activityBarBadge.background": "#005FB8",
|
||||
"activityBarBadge.foreground": "#FFFFFF",
|
||||
"badge.background": "#CCCCCC",
|
||||
"badge.foreground": "#3B3B3B",
|
||||
"button.background": "#005FB8",
|
||||
"button.border": "#0000001a",
|
||||
"button.foreground": "#FFFFFF",
|
||||
"button.hoverBackground": "#0258A8",
|
||||
"button.secondaryBackground": "#E5E5E5",
|
||||
"button.secondaryForeground": "#3B3B3B",
|
||||
"button.secondaryHoverBackground": "#CCCCCC",
|
||||
"chat.slashCommandBackground": "#D2ECFF",
|
||||
"chat.slashCommandForeground": "#306CA2",
|
||||
"checkbox.background": "#F8F8F8",
|
||||
"checkbox.border": "#CECECE",
|
||||
"descriptionForeground": "#3B3B3B",
|
||||
"dropdown.background": "#FFFFFF",
|
||||
"dropdown.border": "#CECECE",
|
||||
"dropdown.foreground": "#3B3B3B",
|
||||
"dropdown.listBackground": "#FFFFFF",
|
||||
"editor.background": "#FFFFFF",
|
||||
"editor.foreground": "#3B3B3B",
|
||||
"editor.inactiveSelectionBackground": "#E5EBF1",
|
||||
"editor.selectionHighlightBackground": "#ADD6FF80",
|
||||
"editorGroup.border": "#E5E5E5",
|
||||
"editorGroupHeader.tabsBackground": "#F8F8F8",
|
||||
"editorGroupHeader.tabsBorder": "#E5E5E5",
|
||||
"editorGutter.addedBackground": "#2EA043",
|
||||
"editorGutter.deletedBackground": "#F85149",
|
||||
"editorGutter.modifiedBackground": "#005FB8",
|
||||
"editorIndentGuide.background1": "#D3D3D3",
|
||||
"editorLineNumber.activeForeground": "#171184",
|
||||
"editorLineNumber.foreground": "#6E7681",
|
||||
"editorOverviewRuler.border": "#E5E5E5",
|
||||
"editorSuggestWidget.background": "#F8F8F8",
|
||||
"editorWidget.background": "#F8F8F8",
|
||||
"errorForeground": "#F85149",
|
||||
"focusBorder": "#005FB8",
|
||||
"foreground": "#3B3B3B",
|
||||
"icon.foreground": "#3B3B3B",
|
||||
"input.background": "#FFFFFF",
|
||||
"input.border": "#CECECE",
|
||||
"input.foreground": "#3B3B3B",
|
||||
"input.placeholderForeground": "#767676",
|
||||
"inputOption.activeBackground": "#BED6ED",
|
||||
"inputOption.activeBorder": "#005FB8",
|
||||
"inputOption.activeForeground": "#000000",
|
||||
"keybindingLabel.foreground": "#3B3B3B",
|
||||
"list.activeSelectionBackground": "#E8E8E8",
|
||||
"list.activeSelectionForeground": "#000000",
|
||||
"list.activeSelectionIconForeground": "#000000",
|
||||
"list.hoverBackground": "#F2F2F2",
|
||||
"list.focusAndSelectionOutline": "#005FB8",
|
||||
"menu.border": "#CECECE",
|
||||
"notebook.cellBorderColor": "#E5E5E5",
|
||||
"notebook.selectedCellBackground": "#C8DDF150",
|
||||
"notificationCenterHeader.background": "#FFFFFF",
|
||||
"notificationCenterHeader.foreground": "#3B3B3B",
|
||||
"notifications.background": "#FFFFFF",
|
||||
"notifications.border": "#E5E5E5",
|
||||
"notifications.foreground": "#3B3B3B",
|
||||
"panel.background": "#F8F8F8",
|
||||
"panel.border": "#E5E5E5",
|
||||
"panelInput.border": "#E5E5E5",
|
||||
"panelTitle.activeBorder": "#005FB8",
|
||||
"panelTitle.activeForeground": "#3B3B3B",
|
||||
"panelTitle.inactiveForeground": "#3B3B3B",
|
||||
"peekViewEditor.matchHighlightBackground": "#BB800966",
|
||||
"peekViewResult.background": "#FFFFFF",
|
||||
"peekViewResult.matchHighlightBackground": "#BB800966",
|
||||
"pickerGroup.border": "#E5E5E5",
|
||||
"pickerGroup.foreground": "#8B949E",
|
||||
"ports.iconRunningProcessForeground": "#369432",
|
||||
"progressBar.background": "#005FB8",
|
||||
"quickInput.background": "#F8F8F8",
|
||||
"quickInput.foreground": "#3B3B3B",
|
||||
"searchEditor.textInputBorder": "#CECECE",
|
||||
"settings.dropdownBackground": "#FFFFFF",
|
||||
"settings.dropdownBorder": "#CECECE",
|
||||
"settings.headerForeground": "#1F1F1F",
|
||||
"settings.modifiedItemIndicator": "#BB800966",
|
||||
"settings.numberInputBorder": "#CECECE",
|
||||
"settings.textInputBorder": "#CECECE",
|
||||
"sideBar.background": "#F8F8F8",
|
||||
"sideBar.border": "#E5E5E5",
|
||||
"sideBar.foreground": "#3B3B3B",
|
||||
"sideBarSectionHeader.background": "#F8F8F8",
|
||||
"sideBarSectionHeader.border": "#E5E5E5",
|
||||
"sideBarSectionHeader.foreground": "#3B3B3B",
|
||||
"sideBarTitle.foreground": "#3B3B3B",
|
||||
"statusBar.background": "#F8F8F8",
|
||||
"statusBar.foreground": "#3B3B3B",
|
||||
"statusBar.border": "#E5E5E5",
|
||||
"statusBar.debuggingBackground": "#FD716C",
|
||||
"statusBar.debuggingForeground": "#000000",
|
||||
"statusBar.focusBorder": "#005FB8",
|
||||
"statusBar.noFolderBackground": "#F8F8F8",
|
||||
"statusBarItem.errorBackground": "#C72E0F",
|
||||
"statusBarItem.focusBorder": "#005FB8",
|
||||
"statusBarItem.prominentBackground": "#6E768166",
|
||||
"statusBarItem.remoteBackground": "#005FB8",
|
||||
"statusBarItem.remoteForeground": "#FFFFFF",
|
||||
"tab.activeBackground": "#FFFFFF",
|
||||
"tab.activeBorder": "#F8F8F8",
|
||||
"tab.activeBorderTop": "#005FB8",
|
||||
"tab.activeForeground": "#3B3B3B",
|
||||
"tab.border": "#E5E5E5",
|
||||
"tab.hoverBackground": "#FFFFFF",
|
||||
"tab.inactiveBackground": "#F8F8F8",
|
||||
"tab.inactiveForeground": "#868686",
|
||||
"tab.lastPinnedBorder": "#D4D4D4",
|
||||
"tab.unfocusedActiveBorder": "#F8F8F8",
|
||||
"tab.unfocusedActiveBorderTop": "#E5E5E5",
|
||||
"tab.unfocusedHoverBackground": "#F8F8F8",
|
||||
"terminalCursor.foreground": "#005FB8",
|
||||
"terminal.foreground": "#3B3B3B",
|
||||
"terminal.inactiveSelectionBackground": "#E5EBF1",
|
||||
"terminal.tab.activeBorder": "#005FB8",
|
||||
"textBlockQuote.background": "#F8F8F8",
|
||||
"textBlockQuote.border": "#E5E5E5",
|
||||
"textCodeBlock.background": "#F8F8F8",
|
||||
"textLink.activeForeground": "#005FB8",
|
||||
"textLink.foreground": "#005FB8",
|
||||
"textPreformat.foreground": "#3B3B3B",
|
||||
"textPreformat.background": "#0000001F",
|
||||
"textSeparator.foreground": "#21262D",
|
||||
"titleBar.activeBackground": "#F8F8F8",
|
||||
"titleBar.activeForeground": "#1E1E1E",
|
||||
"titleBar.border": "#E5E5E5",
|
||||
"titleBar.inactiveBackground": "#F8F8F8",
|
||||
"titleBar.inactiveForeground": "#8B949E",
|
||||
"welcomePage.tileBackground": "#F3F3F3",
|
||||
"widget.border": "#E5E5E5"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,194 +0,0 @@
|
|||
{
|
||||
"$schema": "vscode://schemas/color-theme",
|
||||
"name": "Light+",
|
||||
"include": "./light_vs.json",
|
||||
"tokenColors": [
|
||||
{
|
||||
"name": "Function declarations",
|
||||
"scope": [
|
||||
"entity.name.function",
|
||||
"support.function",
|
||||
"support.constant.handlebars",
|
||||
"source.powershell variable.other.member",
|
||||
"entity.name.operator.custom-literal"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#795E26"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Types declaration and references",
|
||||
"scope": [
|
||||
"support.class",
|
||||
"support.type",
|
||||
"entity.name.type",
|
||||
"entity.name.namespace",
|
||||
"entity.other.attribute",
|
||||
"entity.name.scope-resolution",
|
||||
"entity.name.class",
|
||||
"storage.type.numeric.go",
|
||||
"storage.type.byte.go",
|
||||
"storage.type.boolean.go",
|
||||
"storage.type.string.go",
|
||||
"storage.type.uintptr.go",
|
||||
"storage.type.error.go",
|
||||
"storage.type.rune.go",
|
||||
"storage.type.cs",
|
||||
"storage.type.generic.cs",
|
||||
"storage.type.modifier.cs",
|
||||
"storage.type.variable.cs",
|
||||
"storage.type.annotation.java",
|
||||
"storage.type.generic.java",
|
||||
"storage.type.java",
|
||||
"storage.type.object.array.java",
|
||||
"storage.type.primitive.array.java",
|
||||
"storage.type.primitive.java",
|
||||
"storage.type.token.java",
|
||||
"storage.type.groovy",
|
||||
"storage.type.annotation.groovy",
|
||||
"storage.type.parameters.groovy",
|
||||
"storage.type.generic.groovy",
|
||||
"storage.type.object.array.groovy",
|
||||
"storage.type.primitive.array.groovy",
|
||||
"storage.type.primitive.groovy"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#267f99"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Types declaration and references, TS grammar specific",
|
||||
"scope": [
|
||||
"meta.type.cast.expr",
|
||||
"meta.type.new.expr",
|
||||
"support.constant.math",
|
||||
"support.constant.dom",
|
||||
"support.constant.json",
|
||||
"entity.other.inherited-class"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#267f99"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Control flow / Special keywords",
|
||||
"scope": [
|
||||
"keyword.control",
|
||||
"source.cpp keyword.operator.new",
|
||||
"source.cpp keyword.operator.delete",
|
||||
"keyword.other.using",
|
||||
"keyword.other.directive.using",
|
||||
"keyword.other.operator",
|
||||
"entity.name.operator"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#AF00DB"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Variable and parameter name",
|
||||
"scope": [
|
||||
"variable",
|
||||
"meta.definition.variable.name",
|
||||
"support.variable",
|
||||
"entity.name.variable",
|
||||
"constant.other.placeholder"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#001080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Constants and enums",
|
||||
"scope": ["variable.other.constant", "variable.other.enummember"],
|
||||
"settings": {
|
||||
"foreground": "#0070C1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Object keys, TS grammar specific",
|
||||
"scope": ["meta.object-literal.key"],
|
||||
"settings": {
|
||||
"foreground": "#001080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "CSS property value",
|
||||
"scope": [
|
||||
"support.constant.property-value",
|
||||
"support.constant.font-name",
|
||||
"support.constant.media-type",
|
||||
"support.constant.media",
|
||||
"constant.other.color.rgb-value",
|
||||
"constant.other.rgb-value",
|
||||
"support.constant.color"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0451a5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Regular expression groups",
|
||||
"scope": [
|
||||
"punctuation.definition.group.regexp",
|
||||
"punctuation.definition.group.assertion.regexp",
|
||||
"punctuation.definition.character-class.regexp",
|
||||
"punctuation.character.set.begin.regexp",
|
||||
"punctuation.character.set.end.regexp",
|
||||
"keyword.operator.negation.regexp",
|
||||
"support.other.parenthesis.regexp"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#d16969"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"constant.character.character-class.regexp",
|
||||
"constant.other.character-class.set.regexp",
|
||||
"constant.other.character-class.regexp",
|
||||
"constant.character.set.regexp"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#811f3f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.operator.quantifier.regexp",
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["keyword.operator.or.regexp", "keyword.control.anchor.regexp"],
|
||||
"settings": {
|
||||
"foreground": "#EE0000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["constant.character", "constant.other.option"],
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.character.escape",
|
||||
"settings": {
|
||||
"foreground": "#EE0000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.name.label",
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
}
|
||||
],
|
||||
"semanticHighlighting": true,
|
||||
"semanticTokenColors": {
|
||||
"newOperator": "#AF00DB",
|
||||
"stringLiteral": "#a31515",
|
||||
"customLiteral": "#795E26",
|
||||
"numberLiteral": "#098658"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,422 +0,0 @@
|
|||
{
|
||||
"$schema": "vscode://schemas/color-theme",
|
||||
"name": "Light (Visual Studio)",
|
||||
"colors": {
|
||||
"checkbox.border": "#919191",
|
||||
"editor.background": "#FFFFFF",
|
||||
"editor.foreground": "#000000",
|
||||
"editor.inactiveSelectionBackground": "#E5EBF1",
|
||||
"editorIndentGuide.background1": "#D3D3D3",
|
||||
"editorIndentGuide.activeBackground1": "#939393",
|
||||
"editor.selectionHighlightBackground": "#ADD6FF80",
|
||||
"editorSuggestWidget.background": "#F3F3F3",
|
||||
"activityBarBadge.background": "#007ACC",
|
||||
"sideBarTitle.foreground": "#6F6F6F",
|
||||
"list.hoverBackground": "#E8E8E8",
|
||||
"menu.border": "#D4D4D4",
|
||||
"input.placeholderForeground": "#767676",
|
||||
"searchEditor.textInputBorder": "#CECECE",
|
||||
"settings.textInputBorder": "#CECECE",
|
||||
"settings.numberInputBorder": "#CECECE",
|
||||
"statusBarItem.remoteForeground": "#FFF",
|
||||
"statusBarItem.remoteBackground": "#16825D",
|
||||
"ports.iconRunningProcessForeground": "#369432",
|
||||
"sideBarSectionHeader.background": "#0000",
|
||||
"sideBarSectionHeader.border": "#61616130",
|
||||
"tab.lastPinnedBorder": "#61616130",
|
||||
"notebook.cellBorderColor": "#E8E8E8",
|
||||
"notebook.selectedCellBackground": "#c8ddf150",
|
||||
"statusBarItem.errorBackground": "#c72e0f",
|
||||
"list.activeSelectionIconForeground": "#FFF",
|
||||
"list.focusAndSelectionOutline": "#90C2F9",
|
||||
"terminal.inactiveSelectionBackground": "#E5EBF1",
|
||||
"widget.border": "#d4d4d4",
|
||||
"actionBar.toggledBackground": "#dddddd",
|
||||
"diffEditor.unchangedRegionBackground": "#f8f8f8"
|
||||
},
|
||||
"tokenColors": [
|
||||
{
|
||||
"scope": [
|
||||
"meta.embedded",
|
||||
"source.groovy.embedded",
|
||||
"string meta.image.inline.markdown",
|
||||
"variable.legacy.builtin.python"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#000000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "emphasis",
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "strong",
|
||||
"settings": {
|
||||
"fontStyle": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.diff.header",
|
||||
"settings": {
|
||||
"foreground": "#000080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "comment",
|
||||
"settings": {
|
||||
"foreground": "#008000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.language",
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"constant.numeric",
|
||||
"variable.other.enummember",
|
||||
"keyword.operator.plus.exponent",
|
||||
"keyword.operator.minus.exponent"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#098658"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.regexp",
|
||||
"settings": {
|
||||
"foreground": "#811f3f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "css tags in selectors, xml tags",
|
||||
"scope": "entity.name.tag",
|
||||
"settings": {
|
||||
"foreground": "#800000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.name.selector",
|
||||
"settings": {
|
||||
"foreground": "#800000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "entity.other.attribute-name",
|
||||
"settings": {
|
||||
"foreground": "#e50000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"entity.other.attribute-name.class.css",
|
||||
"source.css entity.other.attribute-name.class",
|
||||
"entity.other.attribute-name.id.css",
|
||||
"entity.other.attribute-name.parent-selector.css",
|
||||
"entity.other.attribute-name.parent.less",
|
||||
"source.css entity.other.attribute-name.pseudo-class",
|
||||
"entity.other.attribute-name.pseudo-element.css",
|
||||
"source.css.less entity.other.attribute-name.id",
|
||||
"entity.other.attribute-name.scss"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#800000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "invalid",
|
||||
"settings": {
|
||||
"foreground": "#cd3131"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.underline",
|
||||
"settings": {
|
||||
"fontStyle": "underline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.bold",
|
||||
"settings": {
|
||||
"fontStyle": "bold",
|
||||
"foreground": "#000080"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.heading",
|
||||
"settings": {
|
||||
"fontStyle": "bold",
|
||||
"foreground": "#800000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.italic",
|
||||
"settings": {
|
||||
"fontStyle": "italic"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.strikethrough",
|
||||
"settings": {
|
||||
"fontStyle": "strikethrough"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.inserted",
|
||||
"settings": {
|
||||
"foreground": "#098658"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.deleted",
|
||||
"settings": {
|
||||
"foreground": "#a31515"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.changed",
|
||||
"settings": {
|
||||
"foreground": "#0451a5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"punctuation.definition.quote.begin.markdown",
|
||||
"punctuation.definition.list.begin.markdown"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0451a5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "markup.inline.raw",
|
||||
"settings": {
|
||||
"foreground": "#800000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "brackets of XML/HTML tags",
|
||||
"scope": "punctuation.definition.tag",
|
||||
"settings": {
|
||||
"foreground": "#800000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["meta.preprocessor", "entity.name.function.preprocessor"],
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.preprocessor.string",
|
||||
"settings": {
|
||||
"foreground": "#a31515"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.preprocessor.numeric",
|
||||
"settings": {
|
||||
"foreground": "#098658"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "meta.structure.dictionary.key.python",
|
||||
"settings": {
|
||||
"foreground": "#0451a5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "storage",
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "storage.type",
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["storage.modifier", "keyword.operator.noexcept"],
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["string", "meta.embedded.assembly"],
|
||||
"settings": {
|
||||
"foreground": "#a31515"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"string.comment.buffered.block.pug",
|
||||
"string.quoted.pug",
|
||||
"string.interpolated.pug",
|
||||
"string.unquoted.plain.in.yaml",
|
||||
"string.unquoted.plain.out.yaml",
|
||||
"string.unquoted.block.yaml",
|
||||
"string.quoted.single.yaml",
|
||||
"string.quoted.double.xml",
|
||||
"string.quoted.single.xml",
|
||||
"string.unquoted.cdata.xml",
|
||||
"string.quoted.double.html",
|
||||
"string.quoted.single.html",
|
||||
"string.unquoted.html",
|
||||
"string.quoted.single.handlebars",
|
||||
"string.quoted.double.handlebars"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "string.regexp",
|
||||
"settings": {
|
||||
"foreground": "#811f3f"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "String interpolation",
|
||||
"scope": [
|
||||
"punctuation.definition.template-expression.begin",
|
||||
"punctuation.definition.template-expression.end",
|
||||
"punctuation.section.embedded"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Reset JavaScript string interpolation expression",
|
||||
"scope": ["meta.template.expression"],
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"support.constant.property-value",
|
||||
"support.constant.font-name",
|
||||
"support.constant.media-type",
|
||||
"support.constant.media",
|
||||
"constant.other.color.rgb-value",
|
||||
"constant.other.rgb-value",
|
||||
"support.constant.color"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0451a5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"support.type.vendored.property-name",
|
||||
"support.type.property-name",
|
||||
"source.css variable",
|
||||
"source.coffee.embedded"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#e50000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": ["support.type.property-name.json"],
|
||||
"settings": {
|
||||
"foreground": "#0451a5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword",
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.control",
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.operator",
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"keyword.operator.new",
|
||||
"keyword.operator.expression",
|
||||
"keyword.operator.cast",
|
||||
"keyword.operator.sizeof",
|
||||
"keyword.operator.alignof",
|
||||
"keyword.operator.typeid",
|
||||
"keyword.operator.alignas",
|
||||
"keyword.operator.instanceof",
|
||||
"keyword.operator.logical.python",
|
||||
"keyword.operator.wordlike"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "keyword.other.unit",
|
||||
"settings": {
|
||||
"foreground": "#098658"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": [
|
||||
"punctuation.section.embedded.begin.php",
|
||||
"punctuation.section.embedded.end.php"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#800000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "support.function.git-rebase",
|
||||
"settings": {
|
||||
"foreground": "#0451a5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "constant.sha.git-rebase",
|
||||
"settings": {
|
||||
"foreground": "#098658"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "coloring of the Java import and package identifiers",
|
||||
"scope": [
|
||||
"storage.modifier.import.java",
|
||||
"variable.language.wildcard.java",
|
||||
"storage.modifier.package.java"
|
||||
],
|
||||
"settings": {
|
||||
"foreground": "#000000"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "this.self",
|
||||
"scope": "variable.language",
|
||||
"settings": {
|
||||
"foreground": "#0000ff"
|
||||
}
|
||||
}
|
||||
],
|
||||
"semanticHighlighting": true,
|
||||
"semanticTokenColors": {
|
||||
"newOperator": "#0000ff",
|
||||
"stringLiteral": "#a31515",
|
||||
"customLiteral": "#000000",
|
||||
"numberLiteral": "#098658"
|
||||
}
|
||||
}
|
||||
|
|
@ -2803,10 +2803,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"model": {
|
||||
"enum": [
|
||||
"cohere.rerank-v3-5:0",
|
||||
"amazon.rerank-v1:0"
|
||||
]
|
||||
"enum": ["cohere.rerank-v3-5:0", "amazon.rerank-v1:0"]
|
||||
}
|
||||
},
|
||||
"required": ["model"]
|
||||
|
|
@ -3130,62 +3127,65 @@
|
|||
"description": "Allow tool use. Currently only supported with Claude 3.5 Sonnet",
|
||||
"default": true
|
||||
},
|
||||
"modelContextProtocolServer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"transport": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["stdio"]
|
||||
},
|
||||
"command": {
|
||||
"type": "string"
|
||||
},
|
||||
"args": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"modelContextProtocolServers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"transport": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["stdio"]
|
||||
},
|
||||
"command": {
|
||||
"type": "string"
|
||||
},
|
||||
"args": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["type", "command", "args"]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["websocket"]
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
"required": ["type", "command", "args"]
|
||||
},
|
||||
"required": ["type", "url"]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["sse"]
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["websocket"]
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
"required": ["type", "url"]
|
||||
},
|
||||
"required": ["type", "url"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["transport"]
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["sse"]
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
},
|
||||
"required": ["type", "url"]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["transport"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ import { expect } from "chai";
|
|||
import { WebElement } from "vscode-extension-tester";
|
||||
|
||||
export class TestUtils {
|
||||
public static async waitForElement(
|
||||
locatorFn: () => Promise<WebElement>,
|
||||
public static async waitForElement<T>(
|
||||
locatorFn: () => Promise<T>,
|
||||
timeout: number = 5000,
|
||||
interval: number = 500,
|
||||
): Promise<WebElement> {
|
||||
): Promise<T> {
|
||||
const startTime = Date.now();
|
||||
|
||||
while (Date.now() - startTime < timeout) {
|
||||
|
|
|
|||
7
extensions/vscode/e2e/actions/Global.actions.ts
Normal file
7
extensions/vscode/e2e/actions/Global.actions.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { VSBrowser, WebView } from "vscode-extension-tester";
|
||||
|
||||
export class GlobalActions {
|
||||
public static async openTestWorkspace() {
|
||||
return VSBrowser.instance.openResources("e2e/test-continue");
|
||||
}
|
||||
}
|
||||
1
extensions/vscode/e2e/constants.ts
Normal file
1
extensions/vscode/e2e/constants.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export const DEFAULT_TIMEOUT = 30_000;
|
||||
11
extensions/vscode/e2e/selectors/Autocomplete.selectors.ts
Normal file
11
extensions/vscode/e2e/selectors/Autocomplete.selectors.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { By, WebDriver } from "vscode-extension-tester";
|
||||
|
||||
export class AutocompleteSelectors {
|
||||
public static async getGhostTextContent(driver: WebDriver) {
|
||||
const element = await driver.findElement(
|
||||
By.xpath("//span[contains(@class, 'ghost-text-decoration')]"),
|
||||
);
|
||||
|
||||
return element.getText();
|
||||
}
|
||||
}
|
||||
|
|
@ -18,10 +18,9 @@
|
|||
"provider": "continue-proxy"
|
||||
},
|
||||
"tabAutocompleteModel": {
|
||||
"title": "Qwen",
|
||||
"provider": "mistral",
|
||||
"model": "codestral-latest",
|
||||
"apiKey": ""
|
||||
"title": "TEST LLM",
|
||||
"provider": "test",
|
||||
"model": "this field is not used"
|
||||
},
|
||||
"tabAutocompleteOptions": {
|
||||
"useCache": false
|
||||
|
|
|
|||
55
extensions/vscode/e2e/tests/AutocompleteFinal.test.ts
Normal file
55
extensions/vscode/e2e/tests/AutocompleteFinal.test.ts
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
import {
|
||||
EditorView,
|
||||
TextEditor,
|
||||
InputBox,
|
||||
Workbench,
|
||||
} from "vscode-extension-tester";
|
||||
|
||||
import { TestUtils } from "../TestUtils";
|
||||
import { DEFAULT_TIMEOUT } from "../constants";
|
||||
import { AutocompleteSelectors } from "../selectors/Autocomplete.selectors";
|
||||
import { expect } from "chai";
|
||||
import { GlobalActions } from "../actions/Global.actions";
|
||||
|
||||
describe("Autocomplete", () => {
|
||||
let editor: TextEditor;
|
||||
|
||||
beforeEach(async function () {
|
||||
this.timeout(DEFAULT_TIMEOUT);
|
||||
|
||||
await GlobalActions.openTestWorkspace();
|
||||
await new Workbench().executeCommand("Create: New File...");
|
||||
await (await InputBox.create()).selectQuickPick("Text File");
|
||||
editor = (await new EditorView().openEditor("Untitled-1")) as TextEditor;
|
||||
});
|
||||
|
||||
afterEach(async function () {
|
||||
this.timeout(DEFAULT_TIMEOUT);
|
||||
await editor.clearText();
|
||||
await new EditorView().closeAllEditors();
|
||||
});
|
||||
|
||||
it("Should display completions", async () => {
|
||||
const driver = editor.getDriver();
|
||||
|
||||
const messagePair0 = TestUtils.generateTestMessagePair(0);
|
||||
await editor.typeTextAt(1, 1, messagePair0.userMessage);
|
||||
await editor.typeTextAt(1, messagePair0.userMessage.length + 1, " ");
|
||||
const ghostText0 = await TestUtils.waitForElement(
|
||||
() => AutocompleteSelectors.getGhostTextContent(driver),
|
||||
// The first completion takes longer because Continue needs to load
|
||||
DEFAULT_TIMEOUT,
|
||||
);
|
||||
expect(ghostText0).to.equal(messagePair0.llmResponse);
|
||||
|
||||
await editor.clearText();
|
||||
|
||||
const messagePair1 = TestUtils.generateTestMessagePair(1);
|
||||
await editor.typeTextAt(1, 1, messagePair1.userMessage);
|
||||
await editor.typeTextAt(1, messagePair1.userMessage.length + 1, " ");
|
||||
const ghostText1 = await TestUtils.waitForElement(() =>
|
||||
AutocompleteSelectors.getGhostTextContent(driver),
|
||||
);
|
||||
expect(ghostText1).to.equal(messagePair1.llmResponse);
|
||||
}).timeout(DEFAULT_TIMEOUT);
|
||||
});
|
||||
|
|
@ -1,16 +1,10 @@
|
|||
import {
|
||||
EditorView,
|
||||
WebView,
|
||||
WebDriver,
|
||||
VSBrowser,
|
||||
Key,
|
||||
} from "vscode-extension-tester";
|
||||
import { EditorView, WebView, WebDriver, Key } from "vscode-extension-tester";
|
||||
import { expect } from "chai";
|
||||
import { GUIActions } from "../actions/GUI.actions";
|
||||
import { GUISelectors } from "../selectors/GUI.selectors";
|
||||
import { TestUtils } from "../TestUtils";
|
||||
|
||||
const DEFAULT_TIMEOUT = 30_000;
|
||||
import { DEFAULT_TIMEOUT } from "../constants";
|
||||
import { GlobalActions } from "../actions/Global.actions";
|
||||
|
||||
describe("GUI Test", () => {
|
||||
let view: WebView;
|
||||
|
|
@ -18,7 +12,7 @@ describe("GUI Test", () => {
|
|||
|
||||
before(async function () {
|
||||
this.timeout(DEFAULT_TIMEOUT);
|
||||
await VSBrowser.instance.openResources("e2e/test-continue");
|
||||
await GlobalActions.openTestWorkspace();
|
||||
});
|
||||
|
||||
beforeEach(async function () {
|
||||
|
|
@ -75,7 +69,7 @@ describe("GUI Test", () => {
|
|||
);
|
||||
});
|
||||
|
||||
it.only("Can delete messages", async () => {
|
||||
it("Can delete messages", async () => {
|
||||
const { userMessage: userMessage0, llmResponse: llmResponse0 } =
|
||||
TestUtils.generateTestMessagePair(0);
|
||||
await GUIActions.sendMessage({
|
||||
|
|
|
|||
5
extensions/vscode/package-lock.json
generated
5
extensions/vscode/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.9.248",
|
||||
"version": "0.9.243",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.9.248",
|
||||
"version": "0.9.243",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/fetch": "^1.0.3",
|
||||
|
|
@ -103,6 +103,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.0",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"author": "Continue Dev, Inc",
|
||||
"version": "0.9.242",
|
||||
"version": "0.9.244",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
@ -602,6 +602,7 @@
|
|||
"vscode:prepublish": "npm run esbuild-base -- --minify",
|
||||
"esbuild": "npm run esbuild-base -- --sourcemap",
|
||||
"esbuild-watch": "npm run esbuild-base -- --sourcemap --watch",
|
||||
"esbuild-notify": "npm run esbuild-base -- --sourcemap --notify",
|
||||
"esbuild:visualize": "esbuild-visualizer --metadata ./build/meta.json --filename ./build/stats.html --open",
|
||||
"tsc": "tsc -p ./",
|
||||
"tsc:check": "tsc -p ./ --noEmit",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
const esbuild = require("esbuild");
|
||||
const fs = require("fs");
|
||||
|
||||
const flags = process.argv.slice(2);
|
||||
|
||||
|
|
@ -31,7 +32,6 @@ const esbuildConfig = {
|
|||
throw new Error(result.errors);
|
||||
} else {
|
||||
try {
|
||||
const fs = require("fs");
|
||||
fs.writeFileSync(
|
||||
"./build/meta.json",
|
||||
JSON.stringify(result.metafile, null, 2),
|
||||
|
|
@ -52,6 +52,28 @@ const esbuildConfig = {
|
|||
if (flags.includes("--watch")) {
|
||||
const ctx = await esbuild.context(esbuildConfig);
|
||||
await ctx.watch();
|
||||
} else if (flags.includes("--notify")) {
|
||||
const inFile = esbuildConfig.entryPoints[0];
|
||||
const outFile = esbuildConfig.outfile;
|
||||
|
||||
// The watcher automatically notices changes to source files
|
||||
// so the only thing it needs to be notified about is if the
|
||||
// output file gets removed.
|
||||
if (fs.existsSync (outFile)) {
|
||||
console.log("VS Code Extension esbuild up to date");
|
||||
return;
|
||||
}
|
||||
|
||||
fs.watchFile(outFile, (current, previous) => {
|
||||
if (current.size > 0) {
|
||||
console.log("VS Code Extension esbuild rebuild complete");
|
||||
fs.unwatchFile(outFile);
|
||||
process.exit(0);
|
||||
}
|
||||
});
|
||||
|
||||
console.log("Triggering VS Code Extension esbuild rebuild...");
|
||||
fs.utimesSync(inFile, new Date(), new Date());
|
||||
} else {
|
||||
await esbuild.build(esbuildConfig);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,13 +153,13 @@ async function package(target, os, arch, exe) {
|
|||
|
||||
// onnx runtime bindngs
|
||||
`bin/napi-v3/${os}/${arch}/onnxruntime_binding.node`,
|
||||
`bin/napi-v3/${os}/${arch}/${os === "darwin"
|
||||
? "libonnxruntime.1.14.0.dylib"
|
||||
: os === "linux"
|
||||
? "libonnxruntime.so.1.14.0"
|
||||
: "onnxruntime.dll"
|
||||
`bin/napi-v3/${os}/${arch}/${
|
||||
os === "darwin"
|
||||
? "libonnxruntime.1.14.0.dylib"
|
||||
: os === "linux"
|
||||
? "libonnxruntime.so.1.14.0"
|
||||
: "onnxruntime.dll"
|
||||
}`,
|
||||
"builtin-themes/dark_modern.json",
|
||||
|
||||
// Code/styling for the sidebar
|
||||
"gui/assets/index.js",
|
||||
|
|
@ -192,15 +192,17 @@ async function package(target, os, arch, exe) {
|
|||
|
||||
// out/node_modules (to be accessed by extension.js)
|
||||
`out/node_modules/@vscode/ripgrep/bin/rg${exe}`,
|
||||
`out/node_modules/@esbuild/${target === "win32-arm64"
|
||||
? "esbuild.exe"
|
||||
: target === "win32-x64"
|
||||
? "win32-x64/esbuild.exe"
|
||||
: `${target}/bin/esbuild`
|
||||
`out/node_modules/@esbuild/${
|
||||
target === "win32-arm64"
|
||||
? "esbuild.exe"
|
||||
: target === "win32-x64"
|
||||
? "win32-x64/esbuild.exe"
|
||||
: `${target}/bin/esbuild`
|
||||
}`,
|
||||
`out/node_modules/@lancedb/vectordb-${os === "win32"
|
||||
? "win32-x64-msvc"
|
||||
: `${target}${os === "linux" ? "-gnu" : ""}`
|
||||
`out/node_modules/@lancedb/vectordb-${
|
||||
os === "win32"
|
||||
? "win32-x64-msvc"
|
||||
: `${target}${os === "linux" ? "-gnu" : ""}`
|
||||
}/index.node`,
|
||||
`out/node_modules/esbuild/lib/main.js`,
|
||||
`out/node_modules/esbuild/bin/esbuild`,
|
||||
|
|
|
|||
|
|
@ -481,13 +481,13 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
|
||||
// onnx runtime bindngs
|
||||
`bin/napi-v3/${os}/${arch}/onnxruntime_binding.node`,
|
||||
`bin/napi-v3/${os}/${arch}/${os === "darwin"
|
||||
? "libonnxruntime.1.14.0.dylib"
|
||||
: os === "linux"
|
||||
? "libonnxruntime.so.1.14.0"
|
||||
: "onnxruntime.dll"
|
||||
`bin/napi-v3/${os}/${arch}/${
|
||||
os === "darwin"
|
||||
? "libonnxruntime.1.14.0.dylib"
|
||||
: os === "linux"
|
||||
? "libonnxruntime.so.1.14.0"
|
||||
: "onnxruntime.dll"
|
||||
}`,
|
||||
"builtin-themes/dark_modern.json",
|
||||
|
||||
// Code/styling for the sidebar
|
||||
"gui/assets/index.js",
|
||||
|
|
@ -520,15 +520,17 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
|
||||
// out/node_modules (to be accessed by extension.js)
|
||||
`out/node_modules/@vscode/ripgrep/bin/rg${exe}`,
|
||||
`out/node_modules/@esbuild/${target === "win32-arm64"
|
||||
? "esbuild.exe"
|
||||
: target === "win32-x64"
|
||||
? "win32-x64/esbuild.exe"
|
||||
: `${target}/bin/esbuild`
|
||||
`out/node_modules/@esbuild/${
|
||||
target === "win32-arm64"
|
||||
? "esbuild.exe"
|
||||
: target === "win32-x64"
|
||||
? "win32-x64/esbuild.exe"
|
||||
: `${target}/bin/esbuild`
|
||||
}`,
|
||||
`out/node_modules/@lancedb/vectordb-${os === "win32"
|
||||
? "win32-x64-msvc"
|
||||
: `${target}${os === "linux" ? "-gnu" : ""}`
|
||||
`out/node_modules/@lancedb/vectordb-${
|
||||
os === "win32"
|
||||
? "win32-x64-msvc"
|
||||
: `${target}${os === "linux" ? "-gnu" : ""}`
|
||||
}/index.node`,
|
||||
`out/node_modules/esbuild/lib/main.js`,
|
||||
`out/node_modules/esbuild/bin/esbuild`,
|
||||
|
|
|
|||
|
|
@ -270,6 +270,28 @@ async function processDiff(
|
|||
}
|
||||
}
|
||||
|
||||
function waitForSidebarReady(
|
||||
sidebar: ContinueGUIWebviewViewProvider,
|
||||
timeout: number,
|
||||
interval: number,
|
||||
): Promise<boolean> {
|
||||
return new Promise((resolve) => {
|
||||
const startTime = Date.now();
|
||||
|
||||
const checkReadyState = () => {
|
||||
if (sidebar.isReady) {
|
||||
resolve(true);
|
||||
} else if (Date.now() - startTime >= timeout) {
|
||||
resolve(false); // Timed out
|
||||
} else {
|
||||
setTimeout(checkReadyState, interval);
|
||||
}
|
||||
};
|
||||
|
||||
checkReadyState();
|
||||
});
|
||||
}
|
||||
|
||||
// Copy everything over from extension.ts
|
||||
const getCommandsMap: (
|
||||
ide: VsCodeIde,
|
||||
|
|
@ -413,18 +435,25 @@ const getCommandsMap: (
|
|||
// This is a temporary fix—sidebar.webviewProtocol.request is blocking
|
||||
// when the GUI hasn't yet been setup and we should instead be
|
||||
// immediately throwing an error, or returning a Result object
|
||||
|
||||
if (!sidebar.isReady) {
|
||||
focusGUI();
|
||||
return;
|
||||
|
||||
const isReady = await waitForSidebarReady(sidebar, 5000, 100);
|
||||
if (!isReady) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const historyLength = await sidebar.webviewProtocol.request(
|
||||
"getWebviewHistoryLength",
|
||||
undefined,
|
||||
false,
|
||||
);
|
||||
const isContinueInputFocused = await sidebar.webviewProtocol.request(
|
||||
"isContinueInputFocused",
|
||||
undefined,
|
||||
false,
|
||||
);
|
||||
|
||||
if (isContinueInputFocused) {
|
||||
|
|
@ -434,6 +463,7 @@ const getCommandsMap: (
|
|||
void sidebar.webviewProtocol?.request(
|
||||
"focusContinueInputWithNewSession",
|
||||
undefined,
|
||||
false,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -441,6 +471,7 @@ const getCommandsMap: (
|
|||
sidebar.webviewProtocol?.request(
|
||||
"focusContinueInputWithNewSession",
|
||||
undefined,
|
||||
false,
|
||||
);
|
||||
void addHighlightedCodeToContext(sidebar.webviewProtocol);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,11 @@ import { controlPlaneEnv, EXTENSION_NAME } from "core/control-plane/env";
|
|||
import { Core } from "core/core";
|
||||
import { FromCoreProtocol, ToCoreProtocol } from "core/protocol";
|
||||
import { InProcessMessenger } from "core/protocol/messenger";
|
||||
import { getConfigJsonPath, getConfigTsPath } from "core/util/paths";
|
||||
import {
|
||||
getConfigJsonPath,
|
||||
getConfigTsPath,
|
||||
getConfigYamlPath,
|
||||
} from "core/util/paths";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import * as vscode from "vscode";
|
||||
|
||||
|
|
@ -245,6 +249,14 @@ export class VsCodeExtension {
|
|||
await this.configHandler.reloadConfig();
|
||||
});
|
||||
|
||||
fs.watchFile(
|
||||
getConfigYamlPath("vscode"),
|
||||
{ interval: 1000 },
|
||||
async (stats) => {
|
||||
await this.configHandler.reloadConfig();
|
||||
},
|
||||
);
|
||||
|
||||
fs.watchFile(getConfigTsPath(), { interval: 1000 }, (stats) => {
|
||||
this.configHandler.reloadConfig();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
import * as os from "os";
|
||||
|
||||
import * as vscode from "vscode";
|
||||
|
||||
export class ConfigPyCodeLensProvider implements vscode.CodeLensProvider {
|
||||
public provideCodeLenses(
|
||||
document: vscode.TextDocument,
|
||||
_: vscode.CancellationToken,
|
||||
): vscode.CodeLens[] | Thenable<vscode.CodeLens[]> {
|
||||
const codeLenses: vscode.CodeLens[] = [];
|
||||
|
||||
if (!document.uri.path.endsWith(".continue/config.json")) {
|
||||
return codeLenses;
|
||||
}
|
||||
|
||||
const lines = document.getText().split(os.EOL);
|
||||
const lineOfModels = lines.findIndex((line) =>
|
||||
line.includes('"models": ['),
|
||||
);
|
||||
|
||||
const lineOfSystemMessage = lines.findIndex((line) =>
|
||||
line.includes("ContinueConfig("),
|
||||
);
|
||||
|
||||
if (lineOfSystemMessage >= 0) {
|
||||
const range = new vscode.Range(
|
||||
lineOfSystemMessage,
|
||||
0,
|
||||
lineOfSystemMessage + 1,
|
||||
0,
|
||||
);
|
||||
codeLenses.push(
|
||||
new vscode.CodeLens(range, {
|
||||
title: "✏️ Edit in UI",
|
||||
command: "continue.openConfigUI", // command likely doesn't exist anymore, check
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
return codeLenses;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
export { ConfigPyCodeLensProvider } from "./ConfigPyCodeLensProvider";
|
||||
export { DiffViewerCodeLensProvider } from "./DiffViewerCodeLensProvider";
|
||||
export { QuickActionsCodeLensProvider } from "./QuickActionsCodeLensProvider";
|
||||
export { SuggestionsCodeLensProvider } from "./SuggestionsCodeLensProvider";
|
||||
|
|
|
|||
|
|
@ -110,11 +110,6 @@ export function registerAllCodeLensProviders(
|
|||
new providers.SuggestionsCodeLensProvider(),
|
||||
);
|
||||
|
||||
configPyCodeLensDisposable = registerCodeLensProvider(
|
||||
"*",
|
||||
new providers.ConfigPyCodeLensProvider(),
|
||||
);
|
||||
|
||||
registerQuickActionsProvider(config, context);
|
||||
|
||||
subscribeToVSCodeQuickActionsSettings(() =>
|
||||
|
|
@ -124,8 +119,5 @@ export function registerAllCodeLensProviders(
|
|||
context.subscriptions.push(verticalPerLineCodeLensProvider);
|
||||
context.subscriptions.push(suggestionsCodeLensDisposable);
|
||||
|
||||
// was opening config UI from config.json. Not currently applicable.
|
||||
// context.subscriptions.push(configPyCodeLensDisposable);
|
||||
|
||||
return { verticalDiffCodeLens };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,28 +2,15 @@ import * as fs from "node:fs";
|
|||
import * as path from "node:path";
|
||||
|
||||
import mergeJson from "core/util/merge";
|
||||
import { convertTheme } from "monaco-vscode-textmate-theme-converter/lib/cjs";
|
||||
import {
|
||||
convertTheme,
|
||||
IVSCodeTheme,
|
||||
} from "monaco-vscode-textmate-theme-converter/lib/cjs";
|
||||
import * as vscode from "vscode";
|
||||
|
||||
import { getExtensionUri } from "./vscode";
|
||||
|
||||
const builtinThemes: any = {
|
||||
"Default Dark Modern": "dark_modern",
|
||||
"Dark+": "dark_plus",
|
||||
"Default Dark+": "dark_plus",
|
||||
"Dark (Visual Studio)": "dark_vs",
|
||||
"Visual Studio Dark": "dark_vs",
|
||||
"Dark High Contrast": "hc_black",
|
||||
"Default High Contrast": "hc_black",
|
||||
"Light High Contrast": "hc_light",
|
||||
"Default High Contrast Light": "hc_light",
|
||||
"Default Light Modern": "light_modern",
|
||||
"Light+": "light_plus",
|
||||
"Default Light+": "light_plus",
|
||||
"Light (Visual Studio)": "light_vs",
|
||||
"Visual Studio Light": "light_vs",
|
||||
};
|
||||
|
||||
/**
|
||||
* Strip comments from theme
|
||||
*/
|
||||
function parseThemeString(themeString: string | undefined): any {
|
||||
themeString = themeString
|
||||
?.split("\n")
|
||||
|
|
@ -35,7 +22,7 @@ function parseThemeString(themeString: string | undefined): any {
|
|||
}
|
||||
|
||||
export function getTheme() {
|
||||
let currentTheme = undefined;
|
||||
let currentTheme: string | undefined = undefined;
|
||||
// Get color theme from settings
|
||||
// use user settings if available
|
||||
// otherwise use default
|
||||
|
|
@ -51,93 +38,115 @@ export function getTheme() {
|
|||
);
|
||||
const activeColorTheme = vscode.window.activeColorTheme.kind;
|
||||
|
||||
if (autoDetectHighContrast || autoDetectColorScheme) {
|
||||
switch (activeColorTheme) {
|
||||
case vscode.ColorThemeKind.Dark:
|
||||
colorTheme = workbenchConfig.get<string>(
|
||||
"workbench.preferredDarkColorTheme",
|
||||
);
|
||||
break;
|
||||
case vscode.ColorThemeKind.Light:
|
||||
colorTheme = workbenchConfig.get<string>(
|
||||
"workbench.preferredLightColorTheme",
|
||||
);
|
||||
break;
|
||||
case vscode.ColorThemeKind.HighContrast:
|
||||
colorTheme = workbenchConfig.get<string>(
|
||||
"workbench.preferredHighContrastColorTheme",
|
||||
);
|
||||
break;
|
||||
case vscode.ColorThemeKind.HighContrastLight:
|
||||
colorTheme = workbenchConfig.get<string>(
|
||||
"workbench.preferredHighContrastLightColorTheme",
|
||||
);
|
||||
break;
|
||||
default:
|
||||
console.log("unknown color theme kind", activeColorTheme);
|
||||
colorTheme = workbenchConfig.get<string>("workbench.colorTheme");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!colorTheme) {
|
||||
colorTheme =
|
||||
workbenchConfig.get<string>("workbench.colorTheme") ??
|
||||
"Default Dark Modern";
|
||||
// prettier-ignore
|
||||
switch (true) {
|
||||
case autoDetectColorScheme && vscode.ColorThemeKind.Dark === activeColorTheme:
|
||||
colorTheme = workbenchConfig.get<string>(
|
||||
"workbench.preferredDarkColorTheme",
|
||||
);
|
||||
break;
|
||||
case autoDetectColorScheme && vscode.ColorThemeKind.Light === activeColorTheme:
|
||||
colorTheme = workbenchConfig.get<string>(
|
||||
"workbench.preferredLightColorTheme",
|
||||
);
|
||||
break;
|
||||
case autoDetectHighContrast && vscode.ColorThemeKind.HighContrast === activeColorTheme:
|
||||
colorTheme = workbenchConfig.get<string>(
|
||||
"workbench.preferredHighContrastColorTheme",
|
||||
);
|
||||
break;
|
||||
case autoDetectHighContrast && vscode.ColorThemeKind.HighContrastLight === activeColorTheme:
|
||||
colorTheme = workbenchConfig.get<string>(
|
||||
"workbench.preferredHighContrastLightColorTheme",
|
||||
);
|
||||
break;
|
||||
default:
|
||||
console.log("unknown color theme kind", activeColorTheme);
|
||||
colorTheme =
|
||||
workbenchConfig.get<string>("workbench.colorTheme") ??
|
||||
"Default Dark Modern";
|
||||
break;
|
||||
}
|
||||
|
||||
let parsed;
|
||||
try {
|
||||
// Pass color theme to webview for syntax highlighting
|
||||
for (let i = vscode.extensions.all.length - 1; i >= 0; i--) {
|
||||
if (currentTheme) {
|
||||
break;
|
||||
}
|
||||
const extension = vscode.extensions.all[i];
|
||||
if (extension.packageJSON?.contributes?.themes?.length > 0) {
|
||||
if (currentTheme) {
|
||||
break;
|
||||
}
|
||||
for (const theme of extension.packageJSON.contributes.themes) {
|
||||
if (theme.label === colorTheme) {
|
||||
if (theme.id === colorTheme || theme.label === colorTheme) {
|
||||
const themePath = path.join(extension.extensionPath, theme.path);
|
||||
currentTheme = fs.readFileSync(themePath).toString();
|
||||
|
||||
parsed = parseThemeString(currentTheme);
|
||||
|
||||
// Handle nested includes
|
||||
let currentParsedTheme = parsed;
|
||||
let currentThemePath = themePath;
|
||||
let mergedTheme = currentParsedTheme;
|
||||
|
||||
while (currentParsedTheme.include) {
|
||||
const themeDir = path.dirname(currentThemePath);
|
||||
const includeThemePath = path.join(
|
||||
themeDir,
|
||||
currentParsedTheme.include,
|
||||
);
|
||||
|
||||
if (fs.existsSync(includeThemePath)) {
|
||||
const includeThemeString = fs
|
||||
.readFileSync(includeThemePath)
|
||||
.toString();
|
||||
|
||||
const includeTheme = parseThemeString(includeThemeString);
|
||||
// Merge with base theme taking precedence, then overlay current customizations
|
||||
mergedTheme = mergeJson(
|
||||
mergeJson({}, includeTheme), // Start with base
|
||||
mergedTheme, // Overlay with customizations
|
||||
);
|
||||
|
||||
// Update for next iteration - only update path and parsed theme for include checking
|
||||
currentThemePath = includeThemePath;
|
||||
currentParsedTheme = includeTheme;
|
||||
} else {
|
||||
console.log(
|
||||
`include theme not found for ${currentTheme} looked for ${currentParsedTheme.include} in ${themeDir}`,
|
||||
includeThemePath,
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
parsed = mergedTheme;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (currentTheme === undefined && builtinThemes[colorTheme]) {
|
||||
const filename = `${builtinThemes[colorTheme]}.json`;
|
||||
currentTheme = fs
|
||||
.readFileSync(
|
||||
path.join(getExtensionUri().fsPath, "builtin-themes", filename),
|
||||
)
|
||||
.toString();
|
||||
if (!currentTheme) {
|
||||
console.warn(`did not find any theme files for theme ${colorTheme}`);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Strip comments from theme
|
||||
let parsed = parseThemeString(currentTheme);
|
||||
let convertedTheme: { base: string; include?: string } & Record<
|
||||
string,
|
||||
any
|
||||
> = convertTheme(parsed);
|
||||
|
||||
if (parsed.include) {
|
||||
const includeThemeString = fs
|
||||
.readFileSync(
|
||||
path.join(getExtensionUri().fsPath, "builtin-themes", parsed.include),
|
||||
)
|
||||
.toString();
|
||||
const includeTheme = parseThemeString(includeThemeString);
|
||||
parsed = mergeJson(parsed, includeTheme);
|
||||
}
|
||||
|
||||
const converted = convertTheme(parsed);
|
||||
|
||||
converted.base = (
|
||||
["vs", "hc-black"].includes(converted.base)
|
||||
? converted.base
|
||||
convertedTheme.base = (
|
||||
["vs", "hc-black"].includes(convertedTheme.base)
|
||||
? convertedTheme.base
|
||||
: activeColorTheme === vscode.ColorThemeKind.Light ||
|
||||
activeColorTheme === vscode.ColorThemeKind.HighContrastLight
|
||||
? "vs"
|
||||
: "vs-dark"
|
||||
) as any;
|
||||
|
||||
return converted;
|
||||
return convertedTheme;
|
||||
} catch (e) {
|
||||
console.log("Error loading color theme: ", e);
|
||||
}
|
||||
|
|
|
|||
26
gui/package-lock.json
generated
26
gui/package-lock.json
generated
|
|
@ -7,6 +7,7 @@
|
|||
"name": "gui",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.0.0",
|
||||
"@headlessui/react": "^1.7.17",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@reduxjs/toolkit": "^2.3.0",
|
||||
|
|
@ -106,6 +107,7 @@
|
|||
"@aws-sdk/client-sagemaker-runtime": "^3.621.0",
|
||||
"@aws-sdk/credential-providers": "^3.620.1",
|
||||
"@continuedev/config-types": "^1.0.13",
|
||||
"@continuedev/config-yaml": "^1.0.0",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
@ -543,6 +545,15 @@
|
|||
"integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@continuedev/config-yaml": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.0.tgz",
|
||||
"integrity": "sha512-NwagzzpnPLbMC3delzFSjWiFv5fp8ReFjdMQF0ko0Xg+U0Myja90k/J7JWGegF/SZMABxc/OJchElJFr58TwGA==",
|
||||
"dependencies": {
|
||||
"yaml": "^2.6.1",
|
||||
"zod": "^3.23.8"
|
||||
}
|
||||
},
|
||||
"node_modules/@emotion/is-prop-valid": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.3.1.tgz",
|
||||
|
|
@ -14042,10 +14053,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.1.tgz",
|
||||
"integrity": "sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==",
|
||||
"dev": true,
|
||||
"version": "2.6.1",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz",
|
||||
"integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==",
|
||||
"bin": {
|
||||
"yaml": "bin.mjs"
|
||||
},
|
||||
|
|
@ -14065,6 +14075,14 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/zod": {
|
||||
"version": "3.23.8",
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz",
|
||||
"integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
},
|
||||
"node_modules/zwitch": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz",
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
"test:watch": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.0.0",
|
||||
"@headlessui/react": "^1.7.17",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@reduxjs/toolkit": "^2.3.0",
|
||||
|
|
|
|||
BIN
gui/public/logos/scaleway.png
Normal file
BIN
gui/public/logos/scaleway.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3 KiB |
|
|
@ -1,6 +1,5 @@
|
|||
import { Listbox, Transition } from "@headlessui/react";
|
||||
import { ChevronUpDownIcon } from "@heroicons/react/24/outline";
|
||||
import { UserCircleIcon } from "@heroicons/react/24/solid";
|
||||
import { Fragment, useContext } from "react";
|
||||
import styled from "styled-components";
|
||||
import {
|
||||
|
|
@ -14,6 +13,7 @@ import { IdeMessengerContext } from "../context/IdeMessenger";
|
|||
import { useAuth } from "../context/Auth";
|
||||
import { setSelectedProfileId } from "../redux/slices/sessionSlice";
|
||||
import { useDispatch } from "react-redux";
|
||||
import { setDialogMessage, setShowDialog } from "../redux/slices/uiSlice";
|
||||
|
||||
const StyledListboxOption = styled(Listbox.Option)<{ selected: boolean }>`
|
||||
background-color: ${({ selected }) =>
|
||||
|
|
@ -137,9 +137,18 @@ export default function AccountDialog() {
|
|||
</Listbox>
|
||||
</div>
|
||||
|
||||
<div className="flex w-full justify-end">
|
||||
<Button className="w-auto" onClick={logout}>
|
||||
<div className="flex w-full justify-end gap-2">
|
||||
<SecondaryButton className="w-auto" onClick={logout}>
|
||||
Sign out
|
||||
</SecondaryButton>
|
||||
<Button
|
||||
className="w-auto"
|
||||
onClick={() => {
|
||||
dispatch(setDialogMessage(undefined));
|
||||
dispatch(setShowDialog(false));
|
||||
}}
|
||||
>
|
||||
Done
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -58,9 +58,6 @@ export const vscInputBackground = `var(${VSC_INPUT_BACKGROUND_VAR}, rgb(45 45 45
|
|||
export const vscQuickInputBackground = `var(${VSC_QUICK_INPUT_BACKGROUND_VAR}, ${VSC_INPUT_BACKGROUND_VAR}, rgb(45 45 45))`;
|
||||
export const vscBackground = `var(${VSC_BACKGROUND_VAR}, rgb(30 30 30))`;
|
||||
export const vscForeground = `var(${VSC_FOREGROUND_VAR}, #fff)`;
|
||||
export const vscForegroundMuted = `var(${VSC_FOREGROUND_MUTED_VAR}, #999)`;
|
||||
export const vscDescriptionForeground = `var(${VSC_DESCRIPTION_FOREGROUND}, #999)`;
|
||||
export const vscInputPlaceholderForeground = `var(${VSC_INPUT_PLACEHOLDER_FOREGROUND}, #999)`;
|
||||
export const vscButtonBackground = `var(${VSC_BUTTON_BACKGROUND_VAR}, #1bbe84)`;
|
||||
export const vscButtonForeground = `var(${VSC_BUTTON_FOREGROUND_VAR}, #ffffff)`;
|
||||
export const vscEditorBackground = `var(${VSC_EDITOR_BACKGROUND_VAR}, ${VSC_BACKGROUND_VAR}, rgb(30 30 30))`;
|
||||
|
|
@ -70,10 +67,6 @@ export const vscListActiveForeground = `var(${VSC_LIST_ACTIVE_FOREGROUND_VAR}, $
|
|||
export const vscInputBorder = `var(${VSC_INPUT_BORDER_VAR}, ${lightGray})`;
|
||||
export const vscInputBorderFocus = `var(${VSC_INPUT_BORDER_FOCUS_VAR}, ${lightGray})`;
|
||||
export const vscBadgeBackground = `var(${VSC_BADGE_BACKGROUND_VAR}, #1bbe84)`;
|
||||
export const vscBadgeForeground = `var(${VSC_BADGE_FOREGROUND_VAR}, #fff)`;
|
||||
export const vscSidebarBorder = `var(${VSC_SIDEBAR_BORDER_VAR}, transparent)`;
|
||||
export const vscDiffRemovedLineBackground = `var(${VSC_DIFF_REMOVED_LINE_BACKGROUND_VAR}, #808080)`;
|
||||
export const vscDiffInsertedLineBackground = `var(${VSC_DIFF_INSERTED_LINE_BACKGROUND_VAR}, #28a745)`;
|
||||
|
||||
if (typeof document !== "undefined") {
|
||||
for (const colorVar of VSC_THEME_COLOR_VARS) {
|
||||
|
|
@ -181,6 +174,26 @@ export const SecondaryButton = styled.button`
|
|||
}
|
||||
`;
|
||||
|
||||
export const GhostButton = styled.button`
|
||||
padding: 10px 12px;
|
||||
margin: 8px 0;
|
||||
border-radius: ${defaultBorderRadius};
|
||||
|
||||
border: none;
|
||||
color: ${vscForeground};
|
||||
background-color: transparent;
|
||||
|
||||
&:disabled {
|
||||
color: gray;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&:hover:enabled {
|
||||
cursor: pointer;
|
||||
background-color: rgba(255, 255, 255, 0.08); /* Subtle hover effect */
|
||||
}
|
||||
`;
|
||||
|
||||
export const InputSubtext = styled.span`
|
||||
font-size: 0.75rem;
|
||||
line-height: 1rem;
|
||||
|
|
@ -216,64 +229,6 @@ export const CustomScrollbarDiv = styled.div`
|
|||
}
|
||||
`;
|
||||
|
||||
export const TextArea = styled.textarea`
|
||||
padding: 8px;
|
||||
font-family: inherit;
|
||||
border-radius: ${defaultBorderRadius};
|
||||
margin: 16px auto;
|
||||
height: auto;
|
||||
width: calc(100% - 32px);
|
||||
background-color: ${vscInputBackground};
|
||||
color: ${vscForeground};
|
||||
z-index: 1;
|
||||
border: 1px solid transparent;
|
||||
|
||||
resize: vertical;
|
||||
|
||||
&:focus {
|
||||
outline: 1px solid ${lightGray};
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
&::placeholder {
|
||||
color: ${lightGray}80;
|
||||
}
|
||||
`;
|
||||
|
||||
export const Pre = styled.pre`
|
||||
border-radius: ${defaultBorderRadius};
|
||||
padding: 8px;
|
||||
max-height: 150px;
|
||||
overflow-y: scroll;
|
||||
margin: 0;
|
||||
background-color: ${vscBackground};
|
||||
border: none;
|
||||
|
||||
/* text wrapping */
|
||||
white-space: pre-wrap; /* Since CSS 2.1 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
`;
|
||||
|
||||
export const H3 = styled.h3`
|
||||
background-color: ${vscInputBackground};
|
||||
border-radius: ${defaultBorderRadius};
|
||||
padding: 4px 8px;
|
||||
width: fit-content;
|
||||
`;
|
||||
|
||||
export const Hr = styled.hr`
|
||||
border: 0.5px solid ${lightGray};
|
||||
`;
|
||||
|
||||
export const HelperText = styled.p`
|
||||
margin-top: 2.5px;
|
||||
font-size: ${getFontSize() - 2}px;
|
||||
color: ${lightGray};
|
||||
`;
|
||||
|
||||
export const Input = styled.input`
|
||||
width: 100%;
|
||||
padding: 8px 12px;
|
||||
|
|
@ -295,21 +250,6 @@ export const Input = styled.input`
|
|||
}
|
||||
`;
|
||||
|
||||
export const NumberInput = styled.input.attrs({ type: "number" })`
|
||||
padding: 8px 12px;
|
||||
margin: 8px 4px;
|
||||
box-sizing: border-box;
|
||||
border-radius: ${defaultBorderRadius};
|
||||
outline: 1px solid ${lightGray};
|
||||
border: none;
|
||||
background-color: ${vscBackground};
|
||||
color: ${vscForeground};
|
||||
|
||||
&:focus {
|
||||
background: ${vscInputBackground};
|
||||
}
|
||||
`;
|
||||
|
||||
export const Select = styled.select`
|
||||
padding: 8px 12px;
|
||||
margin: 8px 0;
|
||||
|
|
@ -325,43 +265,6 @@ export const Label = styled.label<{ fontSize?: number }>`
|
|||
font-size: ${(props) => props.fontSize || getFontSize()}px;
|
||||
`;
|
||||
|
||||
const spin = keyframes`
|
||||
from {
|
||||
-webkit-transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
-webkit-transform: rotate(360deg);
|
||||
}
|
||||
`;
|
||||
|
||||
export const Loader = styled.div`
|
||||
border: 4px solid transparent;
|
||||
border-radius: 50%;
|
||||
border-top: 4px solid white;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
-webkit-animation: ${spin} 1s ease-in-out infinite;
|
||||
animation: ${spin} 1s ease-in-out infinite;
|
||||
margin: auto;
|
||||
`;
|
||||
|
||||
export const MainContainerWithBorder = styled.div<{ borderWidth?: string }>`
|
||||
border-radius: ${defaultBorderRadius};
|
||||
padding: ${(props) => props.borderWidth || "1px"};
|
||||
background-color: white;
|
||||
`;
|
||||
|
||||
export const appear = keyframes`
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0px);
|
||||
}
|
||||
`;
|
||||
|
||||
export const HeaderButton = styled.button<{
|
||||
inverted: boolean | undefined;
|
||||
backgroundColor?: string;
|
||||
|
|
|
|||
|
|
@ -29,5 +29,5 @@ const StyledPre = styled.pre<{ theme: any }>`
|
|||
|
||||
export const SyntaxHighlightedPre = (props: any) => {
|
||||
const currentTheme = useContext(VscThemeContext);
|
||||
return <StyledPre {...props} theme={currentTheme} />;
|
||||
return <StyledPre {...props} theme={currentTheme.theme} />;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ export const models: { [key: string]: ModelPackage } = {
|
|||
"sambanova",
|
||||
"cerebras",
|
||||
"nebius",
|
||||
"scaleway"
|
||||
],
|
||||
isOpenSource: true,
|
||||
},
|
||||
|
|
@ -379,7 +380,7 @@ export const models: { [key: string]: ModelPackage } = {
|
|||
contextLength: 8192,
|
||||
},
|
||||
icon: "meta.png",
|
||||
providerOptions: ["groq"],
|
||||
providerOptions: ["groq", "scaleway"],
|
||||
isOpenSource: false,
|
||||
},
|
||||
llama3170bChat: {
|
||||
|
|
@ -392,7 +393,7 @@ export const models: { [key: string]: ModelPackage } = {
|
|||
contextLength: 8192,
|
||||
},
|
||||
icon: "meta.png",
|
||||
providerOptions: ["groq"],
|
||||
providerOptions: ["groq", "scaleway"],
|
||||
isOpenSource: false,
|
||||
},
|
||||
llama31405bChat: {
|
||||
|
|
@ -1107,6 +1108,19 @@ export const models: { [key: string]: ModelPackage } = {
|
|||
providerOptions: ["nebius"],
|
||||
isOpenSource: true,
|
||||
},
|
||||
Qwen25Coder32b: {
|
||||
title: "Qwen 2.5 Coder 32b",
|
||||
description:
|
||||
"Qwen 2.5 is an auto-regressive language model that uses an optimized transformer architecture.",
|
||||
params: {
|
||||
title: "Qwen 2.5 Coder 32b",
|
||||
model: "qwen2.5-coder-32b",
|
||||
contextLength: 128_000,
|
||||
},
|
||||
icon: "qwen.png",
|
||||
providerOptions: ["scaleway"],
|
||||
isOpenSource: true,
|
||||
},
|
||||
grokBeta: {
|
||||
title: "Grok Beta",
|
||||
description: "Generative artificial intelligence chatbot developed by xAI.",
|
||||
|
|
|
|||
|
|
@ -161,6 +161,35 @@ export const providers: Partial<Record<string, ProviderInfo>> = {
|
|||
packages: [models.llama31Chat, models.deepseek],
|
||||
apiKeyUrl: "https://function.network/join-waitlist",
|
||||
},
|
||||
scaleway: {
|
||||
title: "Scaleway",
|
||||
provider: "scaleway",
|
||||
refPage: "scaleway",
|
||||
description: "Use the Scaleway Generative APIs to instantly access leading open models",
|
||||
longDescription: `Hosted in European data centers, ideal for developers requiring low latency, full data privacy, and compliance with EU AI Act. You can generate your API key in [Scaleway's console](https://console.scaleway.com/generative-api/models). Get started:\n1. Create an API key [here](https://console.scaleway.com/iam/api-keys/)\n2. Paste below\n3. Select a model preset`,
|
||||
params: {
|
||||
apiKey: "",
|
||||
},
|
||||
collectInputFor: [
|
||||
{
|
||||
inputType: "text",
|
||||
key: "apiKey",
|
||||
label: "API key",
|
||||
placeholder: "Enter your Scaleway API key",
|
||||
required: true,
|
||||
},
|
||||
...completionParamsInputsConfigs,
|
||||
],
|
||||
icon: "scaleway.png",
|
||||
tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource],
|
||||
packages: [
|
||||
models.llama318bChat,
|
||||
models.llama3170bChat,
|
||||
models.mistralNemo,
|
||||
models.Qwen25Coder32b,
|
||||
],
|
||||
apiKeyUrl: "https://console.scaleway.com/iam/api-keys",
|
||||
},
|
||||
azure: {
|
||||
title: "Azure OpenAI",
|
||||
provider: "azure",
|
||||
|
|
@ -312,7 +341,6 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n
|
|||
models.llama3170bChat,
|
||||
models.llama318bChat,
|
||||
{ ...models.mixtralTrial, title: "Mixtral" },
|
||||
models.llama270bChat,
|
||||
{
|
||||
...models.AUTODETECT,
|
||||
params: {
|
||||
|
|
|
|||
216
package-lock.json
generated
216
package-lock.json
generated
|
|
@ -6,7 +6,6 @@
|
|||
"": {
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/parser": "^7.8.0",
|
||||
"concurrently": "^9.1.0",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-plugin-tailwindcss": "^0.6.8"
|
||||
|
|
@ -360,6 +359,7 @@
|
|||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
|
|
@ -369,6 +369,7 @@
|
|||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1"
|
||||
},
|
||||
|
|
@ -585,6 +586,7 @@
|
|||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
|
|
@ -596,25 +598,12 @@
|
|||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/cliui": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
|
||||
"integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"string-width": "^4.2.0",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"wrap-ansi": "^7.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
},
|
||||
|
|
@ -626,7 +615,8 @@
|
|||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
|
|
@ -634,46 +624,6 @@
|
|||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/concurrently": {
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.1.0.tgz",
|
||||
"integrity": "sha512-VxkzwMAn4LP7WyMnJNbHN5mKV9L2IbyDjpzemKr99sXNR3GqRNMMHdm7prV1ws9wg7ETj6WUkNOigZVsptwbgg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"chalk": "^4.1.2",
|
||||
"lodash": "^4.17.21",
|
||||
"rxjs": "^7.8.1",
|
||||
"shell-quote": "^1.8.1",
|
||||
"supports-color": "^8.1.1",
|
||||
"tree-kill": "^1.2.2",
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"bin": {
|
||||
"conc": "dist/bin/concurrently.js",
|
||||
"concurrently": "dist/bin/concurrently.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/open-cli-tools/concurrently?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/concurrently/node_modules/supports-color": {
|
||||
"version": "8.1.1",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
|
||||
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/supports-color?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
|
|
@ -823,12 +773,6 @@
|
|||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/es-abstract": {
|
||||
"version": "1.23.3",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz",
|
||||
|
|
@ -962,15 +906,6 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
|
||||
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/escape-string-regexp": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
|
|
@ -1462,15 +1397,6 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "6.* || 8.* || >= 10.*"
|
||||
}
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
|
||||
|
|
@ -1651,6 +1577,7 @@
|
|||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
|
|
@ -1897,15 +1824,6 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
|
||||
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-glob": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
||||
|
|
@ -2151,12 +2069,6 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lodash.merge": {
|
||||
"version": "4.6.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
|
||||
|
|
@ -2601,15 +2513,6 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.8",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
|
||||
|
|
@ -2687,15 +2590,6 @@
|
|||
"queue-microtask": "^1.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/rxjs": {
|
||||
"version": "7.8.1",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
|
||||
"integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-array-concat": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz",
|
||||
|
|
@ -2798,18 +2692,6 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/shell-quote": {
|
||||
"version": "1.8.2",
|
||||
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.2.tgz",
|
||||
"integrity": "sha512-AzqKpGKjrj7EM6rKVQEPpB288oCfnrEIuyoT9cyF4nmGa7V8Zk6f7RRqYisX8X9m+Q7bd632aZW4ky7EhbQztA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/side-channel": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz",
|
||||
|
|
@ -2837,20 +2719,6 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/string-width": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/string.prototype.trim": {
|
||||
"version": "1.2.9",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz",
|
||||
|
|
@ -2905,6 +2773,7 @@
|
|||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
|
|
@ -2939,6 +2808,7 @@
|
|||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"has-flag": "^4.0.0"
|
||||
},
|
||||
|
|
@ -2977,15 +2847,6 @@
|
|||
"node": ">=8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tree-kill": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
|
||||
"integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tree-kill": "cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-api-utils": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz",
|
||||
|
|
@ -3010,12 +2871,6 @@
|
|||
"strip-bom": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.8.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
|
||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/type-check": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
|
||||
|
|
@ -3215,23 +3070,6 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/wrap-ansi": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
||||
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ansi-styles": "^4.0.0",
|
||||
"string-width": "^4.1.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
|
|
@ -3239,42 +3077,6 @@
|
|||
"dev": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/y18n": {
|
||||
"version": "5.0.8",
|
||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
|
||||
"integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs": {
|
||||
"version": "17.7.2",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
|
||||
"integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cliui": "^8.0.1",
|
||||
"escalade": "^3.1.1",
|
||||
"get-caller-file": "^2.0.5",
|
||||
"require-directory": "^2.1.1",
|
||||
"string-width": "^4.2.3",
|
||||
"y18n": "^5.0.5",
|
||||
"yargs-parser": "^21.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/yargs-parser": {
|
||||
"version": "21.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
|
||||
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ export const modelDescriptionSchema = z.object({
|
|||
"azure",
|
||||
"continue-proxy",
|
||||
"nebius",
|
||||
"scaleway"
|
||||
]),
|
||||
model: z.string(),
|
||||
apiKey: z.string().optional(),
|
||||
|
|
@ -109,6 +110,7 @@ export const embeddingsProviderSchema = z.object({
|
|||
"gemini",
|
||||
"continue-proxy",
|
||||
"nebius",
|
||||
"scaleway",
|
||||
]),
|
||||
apiBase: z.string().optional(),
|
||||
apiKey: z.string().optional(),
|
||||
|
|
|
|||
2
packages/config-yaml/.npmignore
Normal file
2
packages/config-yaml/.npmignore
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.env
|
||||
test
|
||||
20
packages/config-yaml/jest.config.mjs
Normal file
20
packages/config-yaml/jest.config.mjs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
|
||||
export default {
|
||||
transform: {
|
||||
"\\.[jt]sx?$": ["ts-jest", { useESM: true }],
|
||||
},
|
||||
|
||||
moduleNameMapper: {
|
||||
"(.+)\\.js": "$1",
|
||||
},
|
||||
extensionsToTreatAsEsm: [".ts"],
|
||||
preset: "ts-jest/presets/default-esm",
|
||||
testTimeout: 10000,
|
||||
testEnvironment: "node",
|
||||
globals: {
|
||||
__dirname: path.dirname(fileURLToPath(import.meta.url)),
|
||||
__filename: path.resolve(fileURLToPath(import.meta.url)),
|
||||
},
|
||||
};
|
||||
4041
packages/config-yaml/package-lock.json
generated
Normal file
4041
packages/config-yaml/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
23
packages/config-yaml/package.json
Normal file
23
packages/config-yaml/package.json
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "@continuedev/config-yaml",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
|
||||
"build": "tsc"
|
||||
},
|
||||
"author": "Continue Dev, Inc.",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"yaml": "^2.6.1",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cross-env": "^7.0.3",
|
||||
"ts-jest": "^29.2.3",
|
||||
"ts-node": "^10.9.2"
|
||||
}
|
||||
}
|
||||
95
packages/config-yaml/src/index.ts
Normal file
95
packages/config-yaml/src/index.ts
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
import * as YAML from "yaml";
|
||||
import { ConfigYaml, configYamlSchema } from "./schemas/index.js";
|
||||
|
||||
const REGISTRY_URL = "https://registry.continue.dev";
|
||||
const LATEST = "latest";
|
||||
|
||||
function parseUses(uses: string): {
|
||||
owner: string;
|
||||
packageName: string;
|
||||
version: string;
|
||||
} {
|
||||
const [owner, packageNameAndVersion] = uses.split("/");
|
||||
const [packageName, version] = packageNameAndVersion.split("@");
|
||||
return {
|
||||
owner,
|
||||
packageName,
|
||||
version: version ?? LATEST,
|
||||
};
|
||||
}
|
||||
|
||||
export function extendConfig(config: ConfigYaml, pkg: ConfigYaml): ConfigYaml {
|
||||
return {
|
||||
...config,
|
||||
models: [...(config.models ?? []), ...(pkg.models ?? [])],
|
||||
context: [...(config.context ?? []), ...(pkg.context ?? [])],
|
||||
tools: [...(config.tools ?? []), ...(pkg.tools ?? [])],
|
||||
data: [...(config.data ?? []), ...(pkg.data ?? [])],
|
||||
mcpServers: [...(config.mcpServers ?? []), ...(pkg.mcpServers ?? [])],
|
||||
};
|
||||
}
|
||||
|
||||
export async function resolvePackages(
|
||||
configYaml: ConfigYaml,
|
||||
): Promise<ConfigYaml> {
|
||||
if (!configYaml.packages) return configYaml;
|
||||
|
||||
for (const pkgDesc of configYaml.packages) {
|
||||
const { owner, packageName, version } = parseUses(pkgDesc.uses);
|
||||
const downloadUrl = new URL(
|
||||
`/${owner}/${packageName}/${version}`,
|
||||
REGISTRY_URL,
|
||||
);
|
||||
const resp = await fetch(downloadUrl);
|
||||
if (!resp.ok) {
|
||||
throw new Error(
|
||||
`Failed to fetch package ${pkgDesc.uses} from registry: ${resp.statusText}`,
|
||||
);
|
||||
}
|
||||
const downloadBuf = await resp.arrayBuffer();
|
||||
const downloadStr = new TextDecoder().decode(downloadBuf);
|
||||
const pkg = YAML.parse(downloadStr);
|
||||
|
||||
const validatedPkg = configYamlSchema.parse(pkg);
|
||||
configYaml = extendConfig(configYaml, validatedPkg);
|
||||
}
|
||||
return configYaml;
|
||||
}
|
||||
|
||||
export function renderConfigYaml(configYaml: string): ConfigYaml {
|
||||
try {
|
||||
const parsed = YAML.parse(configYaml);
|
||||
const result = configYamlSchema.parse(parsed);
|
||||
return result;
|
||||
} catch (e: any) {
|
||||
throw new Error(`Failed to parse config yaml: ${e.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
const TEMPLATE_VAR_REGEX = /\${{[\s]*([^}\s]+)[\s]*}}/g;
|
||||
|
||||
export function getTemplateVariables(templatedYaml: string): string[] {
|
||||
const variables = new Set<string>();
|
||||
const matches = templatedYaml.matchAll(TEMPLATE_VAR_REGEX);
|
||||
for (const match of matches) {
|
||||
variables.add(match[1]);
|
||||
}
|
||||
return Array.from(variables);
|
||||
}
|
||||
|
||||
export function fillTemplateVariables(
|
||||
templatedYaml: string,
|
||||
data: { [key: string]: string },
|
||||
): string {
|
||||
return templatedYaml.replace(TEMPLATE_VAR_REGEX, (match, variableName) => {
|
||||
// Inject data
|
||||
if (variableName in data) {
|
||||
return data[variableName];
|
||||
}
|
||||
// If variable doesn't exist, return the original expression
|
||||
return match;
|
||||
});
|
||||
}
|
||||
|
||||
export type { ModelConfig } from "./schemas/models.js";
|
||||
export { validateConfigYaml } from "./validation.js";
|
||||
6
packages/config-yaml/src/schemas/context.ts
Normal file
6
packages/config-yaml/src/schemas/context.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import { z } from "zod";
|
||||
|
||||
export const contextSchema = z.object({
|
||||
uses: z.string(),
|
||||
with: z.any().optional(),
|
||||
});
|
||||
5
packages/config-yaml/src/schemas/data.ts
Normal file
5
packages/config-yaml/src/schemas/data.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import { z } from "zod";
|
||||
|
||||
export const dataSchema = z.object({
|
||||
provider: z.string(),
|
||||
});
|
||||
34
packages/config-yaml/src/schemas/index.ts
Normal file
34
packages/config-yaml/src/schemas/index.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import * as z from "zod";
|
||||
import { contextSchema } from "./context.js";
|
||||
import { dataSchema } from "./data.js";
|
||||
import { modelSchema } from "./models.js";
|
||||
|
||||
const packageSchema = z.object({
|
||||
uses: z.string(),
|
||||
with: z.any().optional(),
|
||||
});
|
||||
|
||||
const toolSchema = z.object({
|
||||
url: z.string(),
|
||||
apiKey: z.string().optional(),
|
||||
});
|
||||
|
||||
const mcpServerSchema = z.object({
|
||||
name: z.string(),
|
||||
command: z.string(),
|
||||
args: z.array(z.string()).optional(),
|
||||
|
||||
env: z.record(z.string()).optional(),
|
||||
});
|
||||
|
||||
export const configYamlSchema = z.object({
|
||||
name: z.string(),
|
||||
packages: z.array(packageSchema).optional(),
|
||||
models: z.array(modelSchema).optional(),
|
||||
context: z.array(contextSchema).optional(),
|
||||
data: z.array(dataSchema).optional(),
|
||||
tools: z.array(toolSchema).optional(),
|
||||
mcpServers: z.array(mcpServerSchema).optional(),
|
||||
});
|
||||
|
||||
export type ConfigYaml = z.infer<typeof configYamlSchema>;
|
||||
54
packages/config-yaml/src/schemas/models.ts
Normal file
54
packages/config-yaml/src/schemas/models.ts
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
import { z } from "zod";
|
||||
|
||||
export const clientCertificateOptionsSchema = z.object({
|
||||
cert: z.string(),
|
||||
key: z.string(),
|
||||
passphrase: z.string().optional(),
|
||||
});
|
||||
export type ClientCertificateOptions = z.infer<
|
||||
typeof clientCertificateOptionsSchema
|
||||
>;
|
||||
|
||||
export const requestOptionsSchema = z.object({
|
||||
timeout: z.number().optional(),
|
||||
verifySsl: z.boolean().optional(),
|
||||
caBundlePath: z.union([z.string(), z.array(z.string())]).optional(),
|
||||
proxy: z.string().optional(),
|
||||
headers: z.record(z.string()).optional(),
|
||||
extraBodyProperties: z.record(z.any()).optional(),
|
||||
noProxy: z.array(z.string()).optional(),
|
||||
clientCertificate: clientCertificateOptionsSchema.optional(),
|
||||
});
|
||||
export type RequestOptions = z.infer<typeof requestOptionsSchema>;
|
||||
export const modelRolesSchema = z.enum([
|
||||
"chat",
|
||||
"autocomplete",
|
||||
"embed",
|
||||
"rerank",
|
||||
"edit",
|
||||
"apply",
|
||||
"summarize",
|
||||
]);
|
||||
export type ModelRoles = z.infer<typeof modelRolesSchema>;
|
||||
|
||||
export const completionOptionsSchema = z.object({
|
||||
contextLength: z.number().optional(),
|
||||
maxTokens: z.number().optional(),
|
||||
temperature: z.number().optional(),
|
||||
topP: z.number().optional(),
|
||||
topK: z.number().optional(),
|
||||
stop: z.array(z.string()).optional(),
|
||||
n: z.number().optional(),
|
||||
});
|
||||
export type CompletionOptions = z.infer<typeof completionOptionsSchema>;
|
||||
|
||||
export const modelSchema = z.object({
|
||||
name: z.string(),
|
||||
provider: z.string(),
|
||||
model: z.string(),
|
||||
roles: modelRolesSchema.array().optional(),
|
||||
defaultCompletionOptions: completionOptionsSchema.optional(),
|
||||
requestOptions: requestOptionsSchema.optional(),
|
||||
});
|
||||
|
||||
export type ModelConfig = z.infer<typeof modelSchema>;
|
||||
71
packages/config-yaml/src/validation.ts
Normal file
71
packages/config-yaml/src/validation.ts
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
import { ConfigYaml, configYamlSchema } from "./schemas/index.js";
|
||||
|
||||
export enum ValidationLevel {
|
||||
Warning,
|
||||
Error,
|
||||
}
|
||||
|
||||
export interface ConfigValidationError {
|
||||
level: ValidationLevel;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export function validateConfigYaml(
|
||||
config: ConfigYaml,
|
||||
): ConfigValidationError[] {
|
||||
const errors: ConfigValidationError[] = [];
|
||||
|
||||
try {
|
||||
configYamlSchema.parse(config);
|
||||
} catch (e: any) {
|
||||
return [
|
||||
{
|
||||
level: ValidationLevel.Error,
|
||||
message: e.message,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
config.models?.forEach((model) => {
|
||||
// Max tokens not too close to context length
|
||||
if (
|
||||
model.defaultCompletionOptions?.contextLength &&
|
||||
model.defaultCompletionOptions?.maxTokens
|
||||
) {
|
||||
const difference =
|
||||
model.defaultCompletionOptions?.contextLength -
|
||||
model.defaultCompletionOptions?.maxTokens;
|
||||
|
||||
if (difference < 1000) {
|
||||
errors.push({
|
||||
level: ValidationLevel.Warning,
|
||||
message: `Model "${model.name}" has a contextLength of ${model.defaultCompletionOptions?.contextLength} and a maxTokens of ${model.defaultCompletionOptions?.maxTokens}. This leaves only ${difference} tokens for input context and will likely result in your inputs being truncated.`,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (model.roles?.includes("autocomplete")) {
|
||||
const modelName = model.model.toLocaleLowerCase();
|
||||
const nonAutocompleteModels = [
|
||||
// "gpt",
|
||||
// "claude",
|
||||
"mistral",
|
||||
"instruct",
|
||||
];
|
||||
|
||||
if (
|
||||
nonAutocompleteModels.some((m) => modelName.includes(m)) &&
|
||||
!modelName.includes("deepseek") &&
|
||||
!modelName.includes("codestral") &&
|
||||
!modelName.toLowerCase().includes("coder")
|
||||
) {
|
||||
errors.push({
|
||||
level: ValidationLevel.Warning,
|
||||
message: `${model.model} is not trained for tab-autocomplete, and will result in low-quality suggestions. See the docs to learn more about why: https://docs.continue.dev/features/tab-autocomplete#i-want-better-completions-should-i-use-gpt-4`,
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return errors;
|
||||
}
|
||||
23
packages/config-yaml/tsconfig.json
Normal file
23
packages/config-yaml/tsconfig.json
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "NodeNext",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["DOM", "ESNext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"moduleResolution": "NodeNext",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": false,
|
||||
"noEmitOnError": false,
|
||||
"types": ["node", "jest"],
|
||||
"outDir": "dist",
|
||||
"declaration": true
|
||||
// "sourceMap": true
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
||||
|
|
@ -13,6 +13,8 @@ They are purely a translation layer, and are not concerned with:
|
|||
- Batching embeddings (yes, it requires some knowledge of max batch size, but it's more important to maintain 1 req = 1 req)
|
||||
- Using streamChat for streamComplete and vice-versa if one isn't defined
|
||||
|
||||
The goal is for this to change as infrequently as possible. It should only require updating when the actual API format changes.
|
||||
|
||||
They are concerned with:
|
||||
|
||||
- Converting model aliases
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined {
|
|||
case "nvidia":
|
||||
return openAICompatible("https://integrate.api.nvidia.com/v1/", config);
|
||||
case "scaleway":
|
||||
return openAICompatible("https://api.scaleway.ai/v1/", config);
|
||||
return openAICompatible("https://api.scaleway.ai/v1/", config);
|
||||
case "fireworks":
|
||||
return openAICompatible("https://api.fireworks.ai/inference/v1/", config);
|
||||
case "together":
|
||||
|
|
@ -99,4 +99,5 @@ export {
|
|||
type CompletionCreateParamsStreaming,
|
||||
} from "openai/resources/index";
|
||||
|
||||
// export
|
||||
export type { BaseLlmApi } from "./apis/base.js";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue