merge main
This commit is contained in:
commit
883cea5e8d
119 changed files with 16191 additions and 8795 deletions
4
.changes/unreleased/Changed-20241213-091505.yaml
Normal file
4
.changes/unreleased/Changed-20241213-091505.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
project: extensions/vscode
|
||||
kind: Changed
|
||||
body: Improved autocomplete in untitled files
|
||||
time: 2024-12-13T09:15:05.552877-08:00
|
||||
4
.changes/unreleased/Fixed-20241213-091454.yaml
Normal file
4
.changes/unreleased/Fixed-20241213-091454.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
project: extensions/vscode
|
||||
kind: Fixed
|
||||
body: Display more mid-line completions
|
||||
time: 2024-12-13T09:14:54.808683-08:00
|
||||
4
.changes/unreleased/Fixed-20241213-091519.yaml
Normal file
4
.changes/unreleased/Fixed-20241213-091519.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
project: extensions/vscode
|
||||
kind: Fixed
|
||||
body: Restored syntax highlighting
|
||||
time: 2024-12-13T09:15:19.485189-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
|
||||
|
||||
|
|
|
|||
34
.github/workflows/pr_checks.yaml
vendored
34
.github/workflows/pr_checks.yaml
vendored
|
|
@ -204,15 +204,40 @@ jobs:
|
|||
node-version-file: ".nvmrc"
|
||||
|
||||
- uses: actions/cache@v4
|
||||
id: vscode-node-modules-cache
|
||||
with:
|
||||
path: extensions/vscode/node_modules
|
||||
key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v4
|
||||
id: core-node-modules-cache
|
||||
with:
|
||||
path: core/node_modules
|
||||
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
|
||||
|
||||
- uses: actions/cache@v4
|
||||
id: storage-cache
|
||||
with:
|
||||
path: extensions/vscode/e2e/storage
|
||||
key: ${{ runner.os }}-vscode-storage-${{ hashFiles('extensions/vscode/package-lock.json') }}
|
||||
|
||||
- name: Download Dependencies if Cache Miss
|
||||
if: steps.storage-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
cd extensions/vscode
|
||||
npm run e2e:ci:download
|
||||
|
||||
- name: Set up SSH
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.GH_ACTIONS_SSH_TEST_KEY_PEM }}
|
||||
SSH_HOST: ${{ secrets.GH_ACTIONS_SSH_TEST_DNS_NAME }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSH_KEY" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan -H "$SSH_HOST" >> ~/.ssh/known_hosts
|
||||
echo -e "Host ssh-test-container\n\tHostName $SSH_HOST\n\tUser ec2-user\n\tIdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config
|
||||
|
||||
- name: Install Xvfb for Linux and run e2e tests
|
||||
run: |
|
||||
sudo apt-get install -y xvfb # Install Xvfb
|
||||
|
|
@ -220,7 +245,14 @@ jobs:
|
|||
export DISPLAY=:99 # Export the display number to the environment
|
||||
cd extensions/vscode
|
||||
npm run package
|
||||
npm run e2e:ci
|
||||
npm run e2e:ci:run
|
||||
|
||||
- name: Upload e2e test screenshots
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: e2e-screenshots
|
||||
path: extensions/vscode/e2e/storage/screenshots
|
||||
|
||||
gui-tests:
|
||||
needs: [gui-checks, core-checks]
|
||||
|
|
|
|||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -166,4 +166,6 @@ extensions/intellij/.idea/**
|
|||
extensions/intellij/bin
|
||||
extensions/.continue-debug/
|
||||
|
||||
*.vsix
|
||||
*.vsix
|
||||
|
||||
.continuerules
|
||||
|
|
@ -72,11 +72,7 @@ export class CompletionProvider {
|
|||
|
||||
// Set temperature (but don't override)
|
||||
if (llm.completionOptions.temperature === undefined) {
|
||||
const value = await Telemetry.getValueForFeatureFlag(
|
||||
PosthogFeatureFlag.AutocompleteTemperature,
|
||||
);
|
||||
|
||||
llm.completionOptions.temperature = value ?? 0.01;
|
||||
llm.completionOptions.temperature = 0.01;
|
||||
}
|
||||
|
||||
if (llm instanceof OpenAI) {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,11 @@ export class ImportDefinitionsService {
|
|||
}
|
||||
|
||||
private async _getFileInfo(filepath: string): Promise<FileInfo | null> {
|
||||
if (filepath.endsWith(".ipynb")) {
|
||||
// Commenting out this line was the solution to https://github.com/continuedev/continue/issues/1463
|
||||
return null;
|
||||
}
|
||||
|
||||
const parser = await getParserForFile(filepath);
|
||||
if (!parser) {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { streamLines } from "../../../diff/util";
|
||||
import { DEFAULT_AUTOCOMPLETE_OPTS } from "../../../util/parameters";
|
||||
import { PosthogFeatureFlag, Telemetry } from "../../../util/posthog";
|
||||
import { HelperVars } from "../../util/HelperVars";
|
||||
|
||||
import { stopAtStartOf, stopAtStopTokens } from "./charStream";
|
||||
|
|
@ -16,6 +17,8 @@ import {
|
|||
streamWithNewLines,
|
||||
} from "./lineStream";
|
||||
|
||||
const STOP_AT_PATTERNS = ["diff --git"];
|
||||
|
||||
export class StreamTransformPipeline {
|
||||
async *transform(
|
||||
generator: AsyncGenerator<string>,
|
||||
|
|
@ -28,7 +31,10 @@ export class StreamTransformPipeline {
|
|||
): AsyncGenerator<string> {
|
||||
let charGenerator = generator;
|
||||
|
||||
charGenerator = stopAtStopTokens(generator, stopTokens);
|
||||
charGenerator = stopAtStopTokens(generator, [
|
||||
...stopTokens,
|
||||
...STOP_AT_PATTERNS,
|
||||
]);
|
||||
charGenerator = stopAtStartOf(charGenerator, suffix);
|
||||
for (const charFilter of helper.lang.charFilters ?? []) {
|
||||
charGenerator = charFilter({
|
||||
|
|
@ -68,11 +74,14 @@ export class StreamTransformPipeline {
|
|||
fullStop,
|
||||
);
|
||||
|
||||
lineGenerator = showWhateverWeHaveAtXMs(
|
||||
lineGenerator,
|
||||
const timeoutValue =
|
||||
helper.options.showWhateverWeHaveAtXMs ??
|
||||
(DEFAULT_AUTOCOMPLETE_OPTS.showWhateverWeHaveAtXMs as number),
|
||||
);
|
||||
(await Telemetry.getValueForFeatureFlag(
|
||||
PosthogFeatureFlag.AutocompleteTimeout,
|
||||
)) ??
|
||||
DEFAULT_AUTOCOMPLETE_OPTS.showWhateverWeHaveAtXMs;
|
||||
|
||||
lineGenerator = showWhateverWeHaveAtXMs(lineGenerator, timeoutValue!);
|
||||
|
||||
const finalGenerator = streamWithNewLines(lineGenerator);
|
||||
for await (const update of finalGenerator) {
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ export async function testAutocompleteFiltering(
|
|||
const line = prefix.split("\n").length - 1;
|
||||
const character = prefix.split("\n")[line].length;
|
||||
const autocompleteInput: AutocompleteInput = {
|
||||
isUntitledFile: false,
|
||||
completionId: "test-completion-id",
|
||||
filepath,
|
||||
pos: {
|
||||
|
|
|
|||
|
|
@ -90,6 +90,17 @@ export function postprocessCompletion({
|
|||
completion = completion.slice(1);
|
||||
}
|
||||
}
|
||||
|
||||
// When there is no suffix, Codestral tends to begin with a new line
|
||||
// We do this to avoid double new lines
|
||||
if (
|
||||
suffix.length === 0 &&
|
||||
prefix.endsWith("\n\n") &&
|
||||
completion.startsWith("\n")
|
||||
) {
|
||||
// Remove a single leading \n from the completion
|
||||
completion = completion.slice(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (llm.model.includes("granite")) {
|
||||
|
|
|
|||
|
|
@ -70,6 +70,14 @@ export async function shouldPrefilter(
|
|||
return true;
|
||||
}
|
||||
|
||||
// Don't offer completions when we have no information (untitled file and no file contents)
|
||||
if (
|
||||
helper.filepath.includes("Untitled") &&
|
||||
helper.fileContents.trim() === ""
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// if (
|
||||
// helper.options.transform &&
|
||||
// (await shouldLanguageSpecificPrefilter(helper))
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ import { getBasename } from "../../util";
|
|||
import { AutocompleteLanguageInfo } from "../constants/AutocompleteLanguageInfo";
|
||||
import { HelperVars } from "../util/HelperVars";
|
||||
|
||||
import { SnippetPayload } from "../snippets";
|
||||
import {
|
||||
AutocompleteTemplate,
|
||||
getTemplateForModel,
|
||||
} from "./AutocompleteTemplate";
|
||||
import { getStopTokens } from "./getStopTokens";
|
||||
import { SnippetPayload } from "../snippets";
|
||||
import { formatSnippets } from "./formatting";
|
||||
import { getSnippets } from "./filtering";
|
||||
import { formatSnippets } from "./formatting";
|
||||
import { getStopTokens } from "./getStopTokens";
|
||||
|
||||
function getTemplate(helper: HelperVars): AutocompleteTemplate {
|
||||
if (helper.options.template) {
|
||||
|
|
@ -62,6 +62,9 @@ export function renderPrompt({
|
|||
// If prefix is manually passed
|
||||
let prefix = helper.input.manuallyPassPrefix || helper.prunedPrefix;
|
||||
let suffix = helper.input.manuallyPassPrefix ? "" : helper.prunedSuffix;
|
||||
if (suffix === "") {
|
||||
suffix = "\n";
|
||||
}
|
||||
|
||||
const reponame = getBasename(workspaceDirs[0] ?? "myproject");
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export type RecentlyEditedRange = RangeInFile & {
|
|||
};
|
||||
|
||||
export interface AutocompleteInput {
|
||||
isUntitledFile: boolean;
|
||||
completionId: string;
|
||||
filepath: string;
|
||||
pos: Position;
|
||||
|
|
|
|||
|
|
@ -73,7 +73,10 @@ async function getEntriesFilteredByIgnore(dir: string, ide: IDE) {
|
|||
ig = ig.add(igPatterns);
|
||||
}
|
||||
|
||||
const filteredEntries = entries.filter((entry) => !ig.ignores(entry.name));
|
||||
const filteredEntries = entries.filter((entry) => {
|
||||
const name = entry.isDirectory() ? `${entry.name}/` : entry.name;
|
||||
return !ig.ignores(name);
|
||||
});
|
||||
|
||||
return filteredEntries;
|
||||
}
|
||||
|
|
@ -117,7 +120,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}
|
||||
|
|
|
|||
|
|
@ -32,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";
|
||||
|
|
@ -456,8 +456,8 @@ async function intermediateToFinalConfig(
|
|||
config.embeddingsProvider = new embeddingsProviderClass();
|
||||
} else {
|
||||
const llmOptions: LLMOptions = {
|
||||
model: options.model ?? "UNSPECIFIED",
|
||||
...options,
|
||||
model: "UNSPECIFIED",
|
||||
};
|
||||
config.embeddingsProvider = new embeddingsProviderClass(
|
||||
llmOptions,
|
||||
|
|
@ -489,8 +489,8 @@ async function intermediateToFinalConfig(
|
|||
}
|
||||
} else if (rerankerClass) {
|
||||
const llmOptions: LLMOptions = {
|
||||
...params,
|
||||
model: "rerank-2",
|
||||
...params,
|
||||
};
|
||||
config.reranker = new rerankerClass(llmOptions);
|
||||
}
|
||||
|
|
@ -507,22 +507,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,22 +113,26 @@ class MCPConnectionSingleton {
|
|||
}
|
||||
}
|
||||
|
||||
async checkClientAttribute(func: () => Promise<any>): Promise<any> {
|
||||
async modifyConfig(
|
||||
config: ContinueConfig,
|
||||
mcpId: string,
|
||||
signal: AbortSignal,
|
||||
): Promise<void> {
|
||||
try {
|
||||
const result = await func();
|
||||
return result;
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
async modifyConfig(config: ContinueConfig): Promise<ContinueConfig> {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +140,7 @@ class MCPConnectionSingleton {
|
|||
|
||||
// Resources <—> Context Provider
|
||||
if (capabilities?.resources) {
|
||||
const { resources } = await this.client.listResources();
|
||||
const { resources } = await this.client.listResources({}, { signal });
|
||||
const submenuItems = resources.map((resource: any) => ({
|
||||
title: resource.name,
|
||||
description: resource.description,
|
||||
|
|
@ -124,14 +154,13 @@ class MCPConnectionSingleton {
|
|||
config.contextProviders.push(
|
||||
new MCPContextProvider({
|
||||
submenuItems,
|
||||
client: this.client,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
// Tools <—> Tools
|
||||
if (capabilities?.tools) {
|
||||
const { tools } = await this.client.listTools();
|
||||
const { tools } = await this.client.listTools({}, { signal });
|
||||
const continueTools: Tool[] = tools.map((tool: any) => ({
|
||||
displayTitle: tool.name,
|
||||
function: {
|
||||
|
|
@ -150,7 +179,7 @@ class MCPConnectionSingleton {
|
|||
|
||||
// Prompts <—> Slash commands
|
||||
if (capabilities?.prompts) {
|
||||
const { prompts } = await this.client.listPrompts();
|
||||
const { prompts } = await this.client.listPrompts({}, { signal });
|
||||
if (!config.slashCommands) {
|
||||
config.slashCommands = [];
|
||||
}
|
||||
|
|
@ -166,9 +195,7 @@ class MCPConnectionSingleton {
|
|||
|
||||
config.slashCommands.push(...slashCommands);
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
|
@ -1070,7 +1070,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.",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -472,15 +476,13 @@ export abstract class BaseLLM implements ILLM {
|
|||
): AsyncGenerator<string> {
|
||||
const { completionOptions, log } = this._parseCompletionOptions(options);
|
||||
|
||||
const madeUpFimPrompt = `${prefix}<FIM>${suffix}`;
|
||||
const fimLog = `Prefix: ${prefix}\nSuffix: ${suffix}`;
|
||||
if (log) {
|
||||
if (this.writeLog) {
|
||||
await this.writeLog(
|
||||
this._compileLogMessage(madeUpFimPrompt, completionOptions),
|
||||
);
|
||||
await this.writeLog(this._compileLogMessage(fimLog, completionOptions));
|
||||
}
|
||||
if (this.llmRequestHook) {
|
||||
this.llmRequestHook(completionOptions.model, madeUpFimPrompt);
|
||||
this.llmRequestHook(completionOptions.model, fimLog);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -511,18 +513,14 @@ export abstract class BaseLLM implements ILLM {
|
|||
}
|
||||
}
|
||||
|
||||
this._logTokensGenerated(
|
||||
completionOptions.model,
|
||||
madeUpFimPrompt,
|
||||
completion,
|
||||
);
|
||||
this._logTokensGenerated(completionOptions.model, fimLog, completion);
|
||||
|
||||
if (log && this.writeLog) {
|
||||
await this.writeLog(`Completion:\n${completion}\n\n`);
|
||||
}
|
||||
|
||||
return {
|
||||
prompt: madeUpFimPrompt,
|
||||
prompt: fimLog,
|
||||
completion,
|
||||
completionOptions,
|
||||
};
|
||||
|
|
@ -659,6 +657,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 +699,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,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,6 +150,8 @@ class OpenAI extends BaseLLM {
|
|||
finalOptions.max_completion_tokens = undefined;
|
||||
|
||||
finalOptions.prediction = options.prediction;
|
||||
} else {
|
||||
finalOptions.prediction = undefined;
|
||||
}
|
||||
|
||||
return finalOptions;
|
||||
|
|
@ -212,6 +214,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",
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ export const CORE_TO_WEBVIEW_PASS_THROUGH: (keyof ToWebviewFromCoreProtocol)[] =
|
|||
"didChangeAvailableProfiles",
|
||||
"setTTSActive",
|
||||
"getWebviewHistoryLength",
|
||||
"getCurrentSessionId",
|
||||
"signInToControlPlane",
|
||||
"openDialogMessage",
|
||||
"docs/suggestions",
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export type ToWebviewFromIdeOrCoreProtocol = {
|
|||
];
|
||||
setTTSActive: [boolean, void];
|
||||
getWebviewHistoryLength: [undefined, number];
|
||||
getCurrentSessionId: [undefined, string];
|
||||
signInToControlPlane: [undefined, void];
|
||||
openDialogMessage: ["account", void];
|
||||
"docs/suggestions": [PackageDocsResult[], void];
|
||||
|
|
|
|||
|
|
@ -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,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,
|
||||
|
|
|
|||
14
core/util/findLast.ts
Normal file
14
core/util/findLast.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
export function findLastIndex(
|
||||
arr: any[],
|
||||
criterion: (item: any) => boolean,
|
||||
): number {
|
||||
let lastIndex = -1;
|
||||
|
||||
for (let i = arr.length - 1; i >= 0; i--) {
|
||||
if (criterion(arr[i])) {
|
||||
lastIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return lastIndex;
|
||||
}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
import * as fs from "fs";
|
||||
import * as os from "os";
|
||||
import { pathToFileURL } from "url";
|
||||
import * as path from "path";
|
||||
import * as JSONC from "comment-json";
|
||||
import dotenv from "dotenv";
|
||||
import * as fs from "fs";
|
||||
import * as os from "os";
|
||||
import * as path from "path";
|
||||
import { pathToFileURL } from "url";
|
||||
|
||||
import { IdeType, SerializedContinueConfig } from "../";
|
||||
import { defaultConfig, defaultConfigJetBrains } from "../config/default";
|
||||
|
|
@ -105,6 +105,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)) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { IdeInfo } from "../index.js";
|
|||
import type { PostHog as PostHogType } from "posthog-node";
|
||||
|
||||
export enum PosthogFeatureFlag {
|
||||
AutocompleteTemperature = "autocomplete-temperature",
|
||||
AutocompleteTimeout = "autocomplete-timeout",
|
||||
}
|
||||
|
||||
export const EXPERIMENTS: {
|
||||
|
|
@ -13,11 +13,11 @@ export const EXPERIMENTS: {
|
|||
[key: string]: { value: number };
|
||||
};
|
||||
} = {
|
||||
[PosthogFeatureFlag.AutocompleteTemperature]: {
|
||||
control: { value: 0.01 },
|
||||
"0_33": { value: 0.33 },
|
||||
"0_66": { value: 0.66 },
|
||||
"0_99": { value: 0.99 },
|
||||
[PosthogFeatureFlag.AutocompleteTimeout]: {
|
||||
control: { value: 150 },
|
||||
"250": { value: 250 },
|
||||
"350": { value: 350 },
|
||||
"450": { value: 450 },
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ export const supportedLanguages: { [key: string]: LanguageName } = {
|
|||
mjs: LanguageName.JAVASCRIPT,
|
||||
cjs: LanguageName.JAVASCRIPT,
|
||||
py: LanguageName.PYTHON,
|
||||
ipynb: LanguageName.PYTHON,
|
||||
// ipynb: LanguageName.PYTHON, // It contains Python, but the file format is a ton of JSON.
|
||||
pyw: LanguageName.PYTHON,
|
||||
pyi: LanguageName.PYTHON,
|
||||
el: LanguageName.ELISP,
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
title: Azure OpenAI
|
||||
title: Azure AI Foundry
|
||||
slug: ../azure
|
||||
---
|
||||
|
||||
Azure OpenAI is a cloud-based service that provides access to OpenAI's models, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, create an Azure OpenAI resource in the [Azure portal](https://portal.azure.com).
|
||||
Azure AI Foundry is a cloud-based service that provides access to models from OpenAI, Mistral AI, and others, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, create an Azure AI Foundry resource in the [Azure portal](https://portal.azure.com).
|
||||
|
||||
:::info
|
||||
|
||||
For details on model setup, see [General model configuration](#general-model-configuration).
|
||||
For details on OpenAI model setup, see [Azure OpenAI Service configuration](#general-model-configuration).
|
||||
|
||||
:::
|
||||
|
||||
|
|
@ -28,13 +28,17 @@ We recommend configuring **GPT-4o** as your chat model.
|
|||
|
||||
## Autocomplete model
|
||||
|
||||
Azure OpenAI currently does not offer any autocomplete models.
|
||||
We recommend configuring **Codestral** as your autocomplete model.
|
||||
|
||||
[Click here](../../model-types/autocomplete.md) to see a list of autocomplete models.
|
||||
|
||||
:::info
|
||||
**Codestral** will be available on Azure in the near future.
|
||||
:::
|
||||
```json title="config.json"
|
||||
{
|
||||
"tabAutocompleteModel": {
|
||||
"title": "Codestral",
|
||||
"provider": "mistral",
|
||||
"model": "codestral-latest"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Embeddings model
|
||||
|
||||
|
|
@ -67,11 +71,11 @@ You need to apply for access to the Azure OpenAI service. Response times are typ
|
|||
**[Click here to apply for access to the Azure OpenAI service](https://azure.microsoft.com/en-us/products/ai-services/openai-service)**
|
||||
:::
|
||||
|
||||
## General model configuration
|
||||
## Azure OpenAI Service configuration
|
||||
|
||||
Azure OpenAI requires a handful of additional parameters to be configured, such as a deployment name and API base URL.
|
||||
Azure OpenAI Service requires a handful of additional parameters to be configured, such as a deployment name and API base URL.
|
||||
|
||||
To find this information in _Azure AI Studio_, first select the model that you would like to connect. Then visit _Endpoint_ > _Target URI_.
|
||||
To find this information in _Azure AI Foundry_, first select the model that you would like to connect. Then visit _Endpoint_ > _Target URI_.
|
||||
|
||||
For example, a Target URI of `https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview` would map to the following:
|
||||
|
||||
|
|
|
|||
|
|
@ -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,6 +5,13 @@ 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
|
||||
### Changed
|
||||
* Improved autocomplete in untitled files
|
||||
### Fixed
|
||||
* Display more mid-line completions
|
||||
* Restored syntax highlighting
|
||||
|
||||
## 0.8.62 - 2024-12-10
|
||||
### Added
|
||||
* Tool use
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
import { expect } from "chai";
|
||||
import { WebElement } from "vscode-extension-tester";
|
||||
import { DEFAULT_TIMEOUT } from "./constants";
|
||||
|
||||
export class TestUtils {
|
||||
public static async waitForElement(
|
||||
locatorFn: () => Promise<WebElement>,
|
||||
timeout: number = 5000,
|
||||
public static async waitForSuccess<T>(
|
||||
locatorFn: () => Promise<T>,
|
||||
timeout: number = DEFAULT_TIMEOUT.MD,
|
||||
interval: number = 500,
|
||||
): Promise<WebElement> {
|
||||
): Promise<T> {
|
||||
const startTime = Date.now();
|
||||
|
||||
while (Date.now() - startTime < timeout) {
|
||||
try {
|
||||
const element = await locatorFn();
|
||||
if (element) {
|
||||
return element;
|
||||
}
|
||||
const result = await locatorFn();
|
||||
return result;
|
||||
} catch (e) {
|
||||
if (Date.now() - startTime >= timeout) {
|
||||
throw new Error(`Element not found after ${timeout}ms timeout`);
|
||||
|
|
|
|||
31
extensions/vscode/e2e/actions/Autocomplete.actions.ts
Normal file
31
extensions/vscode/e2e/actions/Autocomplete.actions.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { TextEditor } from "vscode-extension-tester";
|
||||
import { TestUtils } from "../TestUtils";
|
||||
import { AutocompleteSelectors } from "../selectors/Autocomplete.selectors";
|
||||
import { expect } from "chai";
|
||||
import { DEFAULT_TIMEOUT } from "../constants";
|
||||
|
||||
export class AutocompleteActions {
|
||||
public static async testCompletions(editor: TextEditor) {
|
||||
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.waitForSuccess(
|
||||
() => AutocompleteSelectors.getGhostTextContent(driver),
|
||||
// The first completion takes longer because Continue needs to load
|
||||
DEFAULT_TIMEOUT.XL,
|
||||
);
|
||||
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.waitForSuccess(() =>
|
||||
AutocompleteSelectors.getGhostTextContent(driver),
|
||||
);
|
||||
expect(ghostText1).to.equal(messagePair1.llmResponse);
|
||||
}
|
||||
}
|
||||
|
|
@ -41,7 +41,9 @@ export class GUIActions {
|
|||
};
|
||||
|
||||
public static openGui = async () => {
|
||||
return new Workbench().executeCommand("continue.focusContinueInput");
|
||||
return TestUtils.waitForSuccess(() =>
|
||||
new Workbench().executeCommand("continue.focusContinueInput"),
|
||||
);
|
||||
};
|
||||
|
||||
public static selectModelFromDropdown = async (
|
||||
|
|
@ -51,7 +53,7 @@ export class GUIActions {
|
|||
const dropdownButton = await GUISelectors.getModelDropdownButton(view);
|
||||
await dropdownButton.click();
|
||||
|
||||
const dropdownOption = await TestUtils.waitForElement(() => {
|
||||
const dropdownOption = await TestUtils.waitForSuccess(() => {
|
||||
return GUISelectors.getModelDropdownOption(view, option);
|
||||
});
|
||||
|
||||
|
|
|
|||
8
extensions/vscode/e2e/actions/Global.actions.ts
Normal file
8
extensions/vscode/e2e/actions/Global.actions.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { VSBrowser, WebView } from "vscode-extension-tester";
|
||||
import * as path from "path";
|
||||
|
||||
export class GlobalActions {
|
||||
public static async openTestWorkspace() {
|
||||
return VSBrowser.instance.openResources(path.join("e2e/test-continue"));
|
||||
}
|
||||
}
|
||||
8
extensions/vscode/e2e/constants.ts
Normal file
8
extensions/vscode/e2e/constants.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
const BASELINE = 15_000;
|
||||
|
||||
export const DEFAULT_TIMEOUT = {
|
||||
XS: BASELINE * 0.2,
|
||||
SM: BASELINE * 0.5,
|
||||
MD: BASELINE,
|
||||
XL: BASELINE * 5,
|
||||
};
|
||||
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();
|
||||
}
|
||||
}
|
||||
11
extensions/vscode/e2e/selectors/SSH.selectors.ts
Normal file
11
extensions/vscode/e2e/selectors/SSH.selectors.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { By, SideBarView } from "vscode-extension-tester";
|
||||
|
||||
export class SSHSelectors {
|
||||
public static async connectedToRemoteConfirmationMessage() {
|
||||
const view = new SideBarView();
|
||||
const element = await view.findElement(
|
||||
By.xpath('//*[contains(text(), "Connected to remote.")]'),
|
||||
);
|
||||
return element;
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
35
extensions/vscode/e2e/tests/Autocomplete.test.ts
Normal file
35
extensions/vscode/e2e/tests/Autocomplete.test.ts
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import {
|
||||
EditorView,
|
||||
TextEditor,
|
||||
InputBox,
|
||||
Workbench,
|
||||
} from "vscode-extension-tester";
|
||||
|
||||
import { DEFAULT_TIMEOUT } from "../constants";
|
||||
import { GlobalActions } from "../actions/Global.actions";
|
||||
import { AutocompleteActions } from "../actions/Autocomplete.actions";
|
||||
|
||||
describe("Autocomplete", () => {
|
||||
let editor: TextEditor;
|
||||
|
||||
beforeEach(async function () {
|
||||
this.timeout(DEFAULT_TIMEOUT.XL);
|
||||
|
||||
await GlobalActions.openTestWorkspace();
|
||||
await new Workbench().executeCommand("Create: New File...");
|
||||
await (
|
||||
await InputBox.create(DEFAULT_TIMEOUT.MD)
|
||||
).selectQuickPick("Text File");
|
||||
editor = (await new EditorView().openEditor("Untitled-1")) as TextEditor;
|
||||
});
|
||||
|
||||
afterEach(async function () {
|
||||
this.timeout(DEFAULT_TIMEOUT.XL);
|
||||
await editor.clearText();
|
||||
await new EditorView().closeAllEditors();
|
||||
});
|
||||
|
||||
it("Should display completions", async () => {
|
||||
await AutocompleteActions.testCompletions(editor);
|
||||
}).timeout(DEFAULT_TIMEOUT.XL);
|
||||
});
|
||||
|
|
@ -1,29 +1,22 @@
|
|||
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 * as path from "path";
|
||||
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;
|
||||
let driver: WebDriver;
|
||||
|
||||
before(async function () {
|
||||
this.timeout(DEFAULT_TIMEOUT);
|
||||
await VSBrowser.instance.openResources(path.join("e2e/test-continue"));
|
||||
this.timeout(DEFAULT_TIMEOUT.XL);
|
||||
await GlobalActions.openTestWorkspace();
|
||||
});
|
||||
|
||||
beforeEach(async function () {
|
||||
this.timeout(DEFAULT_TIMEOUT);
|
||||
this.timeout(DEFAULT_TIMEOUT.XL);
|
||||
|
||||
await GUIActions.openGui();
|
||||
|
||||
|
|
@ -32,14 +25,10 @@ describe("GUI Test", () => {
|
|||
|
||||
await GUIActions.switchToReactIframe(driver);
|
||||
await GUIActions.selectModelFromDropdown(view, "TEST LLM");
|
||||
|
||||
// await new Promise((res) => {
|
||||
// setTimeout(res, DEFAULT_TIMEOUT);
|
||||
// });
|
||||
});
|
||||
|
||||
afterEach(async function () {
|
||||
this.timeout(DEFAULT_TIMEOUT);
|
||||
this.timeout(DEFAULT_TIMEOUT.XL);
|
||||
|
||||
await view.switchBack();
|
||||
await new EditorView().closeAllEditors();
|
||||
|
|
@ -52,7 +41,7 @@ describe("GUI Test", () => {
|
|||
expect(await description.getText()).has.string(
|
||||
"Quickly get up and running using our API keys.",
|
||||
);
|
||||
}).timeout(DEFAULT_TIMEOUT);
|
||||
}).timeout(DEFAULT_TIMEOUT.XL);
|
||||
});
|
||||
|
||||
describe("Chat", () => {
|
||||
|
|
@ -61,7 +50,7 @@ describe("GUI Test", () => {
|
|||
const messagePair = TestUtils.generateTestMessagePair();
|
||||
await messageInput.sendKeys(messagePair.userMessage);
|
||||
await messageInput.sendKeys(Key.ENTER);
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, messagePair.llmResponse),
|
||||
);
|
||||
});
|
||||
|
|
@ -71,12 +60,12 @@ describe("GUI Test", () => {
|
|||
const messagePair = TestUtils.generateTestMessagePair();
|
||||
await messageInput.sendKeys(messagePair.userMessage);
|
||||
(await GUISelectors.getSubmitInputButton(view)).click();
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, messagePair.llmResponse),
|
||||
);
|
||||
});
|
||||
|
||||
it.only("Can delete messages", async () => {
|
||||
it("Can delete messages", async () => {
|
||||
const { userMessage: userMessage0, llmResponse: llmResponse0 } =
|
||||
TestUtils.generateTestMessagePair(0);
|
||||
await GUIActions.sendMessage({
|
||||
|
|
@ -84,7 +73,7 @@ describe("GUI Test", () => {
|
|||
message: userMessage0,
|
||||
inputFieldIndex: 0,
|
||||
});
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, llmResponse0),
|
||||
);
|
||||
|
||||
|
|
@ -95,7 +84,7 @@ describe("GUI Test", () => {
|
|||
message: userMessage1,
|
||||
inputFieldIndex: 1,
|
||||
});
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, llmResponse1),
|
||||
);
|
||||
|
||||
|
|
@ -106,7 +95,7 @@ describe("GUI Test", () => {
|
|||
message: userMessage2,
|
||||
inputFieldIndex: 2,
|
||||
});
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, llmResponse2),
|
||||
);
|
||||
|
||||
|
|
@ -127,7 +116,7 @@ describe("GUI Test", () => {
|
|||
await TestUtils.expectNoElement(() =>
|
||||
GUISelectors.getThreadMessageByText(view, llmResponse2),
|
||||
);
|
||||
}).timeout(DEFAULT_TIMEOUT);
|
||||
}).timeout(DEFAULT_TIMEOUT.XL);
|
||||
|
||||
it("Can edit messages", async () => {
|
||||
const { userMessage: userMessage0, llmResponse: llmResponse0 } =
|
||||
|
|
@ -137,7 +126,7 @@ describe("GUI Test", () => {
|
|||
message: userMessage0,
|
||||
inputFieldIndex: 0,
|
||||
});
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, llmResponse0),
|
||||
);
|
||||
|
||||
|
|
@ -148,7 +137,7 @@ describe("GUI Test", () => {
|
|||
message: userMessage1,
|
||||
inputFieldIndex: 1,
|
||||
});
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, llmResponse1),
|
||||
);
|
||||
|
||||
|
|
@ -159,7 +148,7 @@ describe("GUI Test", () => {
|
|||
message: userMessage2,
|
||||
inputFieldIndex: 2,
|
||||
});
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, llmResponse2),
|
||||
);
|
||||
|
||||
|
|
@ -179,7 +168,7 @@ describe("GUI Test", () => {
|
|||
});
|
||||
await GUISelectors.getThreadMessageByText(view, llmResponse0);
|
||||
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, llmResponse3),
|
||||
);
|
||||
await Promise.all([
|
||||
|
|
@ -190,7 +179,7 @@ describe("GUI Test", () => {
|
|||
GUISelectors.getThreadMessageByText(view, llmResponse2),
|
||||
),
|
||||
]);
|
||||
}).timeout(DEFAULT_TIMEOUT);
|
||||
}).timeout(DEFAULT_TIMEOUT.XL);
|
||||
});
|
||||
|
||||
describe("Chat Paths", () => {
|
||||
|
|
@ -201,7 +190,7 @@ describe("GUI Test", () => {
|
|||
message: messagePair1.userMessage,
|
||||
inputFieldIndex: 0,
|
||||
});
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, messagePair1.llmResponse),
|
||||
);
|
||||
|
||||
|
|
@ -211,7 +200,7 @@ describe("GUI Test", () => {
|
|||
message: messagePair2.userMessage,
|
||||
inputFieldIndex: 1,
|
||||
});
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, messagePair2.llmResponse),
|
||||
);
|
||||
|
||||
|
|
@ -245,9 +234,9 @@ describe("GUI Test", () => {
|
|||
message: messagePair3.userMessage,
|
||||
inputFieldIndex: 2,
|
||||
});
|
||||
await TestUtils.waitForElement(() =>
|
||||
await TestUtils.waitForSuccess(() =>
|
||||
GUISelectors.getThreadMessageByText(view, messagePair3.llmResponse),
|
||||
);
|
||||
}).timeout(DEFAULT_TIMEOUT);
|
||||
}).timeout(DEFAULT_TIMEOUT.XL);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
50
extensions/vscode/e2e/tests/SSH.test.ts
Normal file
50
extensions/vscode/e2e/tests/SSH.test.ts
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
import {
|
||||
EditorView,
|
||||
TextEditor,
|
||||
InputBox,
|
||||
Workbench,
|
||||
Key,
|
||||
VSBrowser,
|
||||
} from "vscode-extension-tester";
|
||||
|
||||
import { DEFAULT_TIMEOUT } from "../constants";
|
||||
import { TestUtils } from "../TestUtils";
|
||||
import { SSHSelectors } from "../selectors/SSH.selectors";
|
||||
import { AutocompleteActions } from "../actions/Autocomplete.actions";
|
||||
|
||||
describe("SSH", function () {
|
||||
it("Should display completions", async () => {
|
||||
await TestUtils.waitForSuccess(async () => {
|
||||
await new Workbench().executeCommand(
|
||||
"Remote-SSH: Connect Current Window to Host...",
|
||||
);
|
||||
await (
|
||||
await InputBox.create(DEFAULT_TIMEOUT.MD)
|
||||
).selectQuickPick("ssh-test-container");
|
||||
});
|
||||
|
||||
await TestUtils.waitForSuccess(
|
||||
() => SSHSelectors.connectedToRemoteConfirmationMessage(),
|
||||
DEFAULT_TIMEOUT.XL,
|
||||
);
|
||||
|
||||
await TestUtils.waitForSuccess(async () => {
|
||||
await new Workbench().executeCommand("File: Open File...");
|
||||
const inputBox = await InputBox.create(DEFAULT_TIMEOUT.MD);
|
||||
await inputBox.setText("/home/ec2-user/test-folder/main.py");
|
||||
await inputBox.selectQuickPick("main.py");
|
||||
await inputBox.sendKeys(Key.ENTER);
|
||||
}, DEFAULT_TIMEOUT.XL);
|
||||
|
||||
const editor = await TestUtils.waitForSuccess(
|
||||
async () => (await new EditorView().openEditor("main.py")) as TextEditor,
|
||||
);
|
||||
|
||||
const text = await editor.getText();
|
||||
await editor.clearText();
|
||||
await AutocompleteActions.testCompletions(editor);
|
||||
await editor.setText(text);
|
||||
})
|
||||
.timeout(DEFAULT_TIMEOUT.XL)
|
||||
.retries(2);
|
||||
});
|
||||
3
extensions/vscode/e2e/tests/TODO.md
Normal file
3
extensions/vscode/e2e/tests/TODO.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
TODO testing scenarios
|
||||
|
||||
- Highlighting code and pressing CMD+L _before_ the GUI was first opened. The highlighted code should be included as chat input.
|
||||
29
extensions/vscode/package-lock.json
generated
29
extensions/vscode/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.9.243",
|
||||
"version": "0.9.244",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.9.243",
|
||||
"version": "0.9.244",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/fetch": "^1.0.3",
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
"core": "file:../../core",
|
||||
"cors": "^2.8.5",
|
||||
"dbinfoz": "^0.14.0",
|
||||
"diff": "^7.0.0",
|
||||
"downshift": "^7.6.0",
|
||||
"esbuild": "^0.17.19",
|
||||
"express": "^4.18.2",
|
||||
|
|
@ -103,6 +104,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",
|
||||
|
|
@ -4980,9 +4982,9 @@
|
|||
"integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw=="
|
||||
},
|
||||
"node_modules/diff": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz",
|
||||
"integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==",
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz",
|
||||
"integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==",
|
||||
"engines": {
|
||||
"node": ">=0.3.1"
|
||||
}
|
||||
|
|
@ -8857,6 +8859,15 @@
|
|||
"wrap-ansi": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mocha/node_modules/diff": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz",
|
||||
"integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/mocha/node_modules/minimatch": {
|
||||
"version": "5.1.6",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
|
||||
|
|
@ -13164,6 +13175,14 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/uvu/node_modules/diff": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz",
|
||||
"integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==",
|
||||
"engines": {
|
||||
"node": ">=0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/v8-to-istanbul": {
|
||||
"version": "9.3.0",
|
||||
"resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"author": "Continue Dev, Inc",
|
||||
"version": "0.9.243",
|
||||
"version": "0.9.245",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
@ -628,11 +628,13 @@
|
|||
"e2e:sign-vscode": "codesign --entitlements entitlements.plist --deep --force -s - './e2e/storage/Visual Studio Code.app'",
|
||||
"e2e:copy-vsix": "chmod +x ./e2e/get-latest-vsix.sh && bash ./e2e/get-latest-vsix.sh",
|
||||
"e2e:install-vsix": "extest install-vsix -f ./e2e/vsix/continue.vsix --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage",
|
||||
"e2e:install-extensions": "extest install-from-marketplace ms-vscode-remote.remote-ssh --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage && extest install-from-marketplace ms-vscode-remote.remote-containers --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage && extest install-from-marketplace ms-vscode-remote.remote-wsl --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage",
|
||||
"e2e:test": "extest run-tests './e2e/_output/tests/*.test.js' --code_settings settings.json --extensions_dir ./e2e/.test-extensions --storage ./e2e/storage",
|
||||
"e2e:clean": "rm -rf ./e2e/_output",
|
||||
"e2e:all": "npm run e2e:build && npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:sign-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test && npm run e2e:clean",
|
||||
"e2e:all": "npm run e2e:build && npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:sign-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:install-extensions && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test && npm run e2e:clean",
|
||||
"e2e:quick": "npm run e2e:compile && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test && npm run e2e:clean",
|
||||
"e2e:ci": "npm run e2e:compile && npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode && npm run e2e:copy-vsix && npm run e2e:install-vsix && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test"
|
||||
"e2e:ci:download": "npm run e2e:create-storage && npm run e2e:get-chromedriver && npm run e2e:get-vscode",
|
||||
"e2e:ci:run": "npm run e2e:compile && npm run e2e:copy-vsix && npm run e2e:install-vsix && npm run e2e:install-extensions && CONTINUE_GLOBAL_DIR=e2e/test-continue npm run e2e:test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.6.4",
|
||||
|
|
@ -678,6 +680,7 @@
|
|||
"core": "file:../../core",
|
||||
"cors": "^2.8.5",
|
||||
"dbinfoz": "^0.14.0",
|
||||
"diff": "^7.0.0",
|
||||
"downshift": "^7.6.0",
|
||||
"esbuild": "^0.17.19",
|
||||
"express": "^4.18.2",
|
||||
|
|
|
|||
|
|
@ -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`,
|
||||
|
|
|
|||
|
|
@ -480,7 +480,6 @@ class VsCodeIde implements IDE {
|
|||
const contents = new TextDecoder().decode(truncatedBytes);
|
||||
return contents;
|
||||
} catch (e) {
|
||||
console.warn("Error reading file", e);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import {
|
|||
import { ConfigHandler } from "core/config/ConfigHandler";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import * as vscode from "vscode";
|
||||
const Diff = require("diff");
|
||||
|
||||
import { showFreeTrialLoginMessage } from "../util/messages";
|
||||
import { VsCodeWebviewProtocol } from "../webviewProtocol";
|
||||
|
|
@ -22,6 +23,13 @@ import {
|
|||
import type { IDE } from "core";
|
||||
import type { TabAutocompleteModel } from "../util/loadAutocompleteModel";
|
||||
|
||||
interface DiffType {
|
||||
count: number;
|
||||
added: boolean;
|
||||
removed: boolean;
|
||||
value: string;
|
||||
}
|
||||
|
||||
interface VsCodeCompletionInput {
|
||||
document: vscode.TextDocument;
|
||||
position: vscode.Position;
|
||||
|
|
@ -105,6 +113,12 @@ export class ContinueCompletionProvider
|
|||
return null;
|
||||
}
|
||||
|
||||
// Don't autocomplete with multi-cursor
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
if (editor && editor.selections.length > 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// If the text at the range isn't a prefix of the intellisense text,
|
||||
// no completion will be displayed, regardless of what we return
|
||||
if (
|
||||
|
|
@ -190,12 +204,20 @@ export class ContinueCompletionProvider
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Manually pass file contents for unsaved, untitled files
|
||||
let filepath = document.uri.fsPath;
|
||||
if (document.isUntitled) {
|
||||
manuallyPassFileContents = document.getText();
|
||||
}
|
||||
|
||||
// Handle commit message input box
|
||||
let manuallyPassPrefix: string | undefined = undefined;
|
||||
|
||||
const input: AutocompleteInput = {
|
||||
isUntitledFile: document.isUntitled,
|
||||
completionId: uuidv4(),
|
||||
filepath: document.uri.fsPath,
|
||||
filepath,
|
||||
pos,
|
||||
recentlyEditedFiles: [],
|
||||
recentlyEditedRanges:
|
||||
|
|
@ -249,13 +271,67 @@ export class ContinueCompletionProvider
|
|||
|
||||
// Construct the range/text to show
|
||||
const startPos = selectedCompletionInfo?.range.start ?? position;
|
||||
const completionRange = new vscode.Range(
|
||||
startPos,
|
||||
startPos.translate(0, outcome.completion.length),
|
||||
);
|
||||
let range = new vscode.Range(startPos, startPos);
|
||||
let completionText = outcome.completion;
|
||||
const isSingleLineCompletion = outcome.completion.split("\n").length <= 1;
|
||||
|
||||
if (isSingleLineCompletion) {
|
||||
const lastLineOfCompletionText = completionText.split("\n").pop();
|
||||
const currentText = document
|
||||
.lineAt(startPos)
|
||||
.text.substring(startPos.character);
|
||||
const diffs: DiffType[] = Diff.diffWords(
|
||||
currentText,
|
||||
lastLineOfCompletionText,
|
||||
);
|
||||
|
||||
if (diffPatternMatches(diffs, ["+"])) {
|
||||
// Just insert, we're already at the end of the line
|
||||
} else if (
|
||||
diffPatternMatches(diffs, ["+", "="]) ||
|
||||
diffPatternMatches(diffs, ["+", "=", "+"])
|
||||
) {
|
||||
// The model repeated the text after the cursor to the end of the line
|
||||
range = new vscode.Range(
|
||||
startPos,
|
||||
document.lineAt(startPos).range.end,
|
||||
);
|
||||
} else if (
|
||||
diffPatternMatches(diffs, ["+", "-"]) ||
|
||||
diffPatternMatches(diffs, ["-", "+"])
|
||||
) {
|
||||
// We are midline and the model just inserted without repeating to the end of the line
|
||||
// We want to move the cursor to the end of the line
|
||||
// range = new vscode.Range(
|
||||
// startPos,
|
||||
// document.lineAt(startPos).range.end,
|
||||
// );
|
||||
// // Find the last removed part of the diff
|
||||
// const lastRemovedIndex = findLastIndex(
|
||||
// diffs,
|
||||
// (diff) => diff.removed === true,
|
||||
// );
|
||||
// const lastRemovedContent = diffs[lastRemovedIndex].value;
|
||||
// completionText += lastRemovedContent;
|
||||
} else {
|
||||
// Diff is too complicated, just insert the first added part of the diff
|
||||
// This is the safe way to ensure that it is displayed
|
||||
if (diffs[0]?.added) {
|
||||
completionText = diffs[0].value;
|
||||
} else {
|
||||
// If the first part of the diff isn't an insertion, then the model is
|
||||
// probably rewriting other parts of the line
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Extend the range to the end of the line for multiline completions
|
||||
range = new vscode.Range(startPos, document.lineAt(startPos).range.end);
|
||||
}
|
||||
|
||||
const completionItem = new vscode.InlineCompletionItem(
|
||||
outcome.completion,
|
||||
completionRange,
|
||||
completionText,
|
||||
range,
|
||||
{
|
||||
title: "Log Autocomplete Outcome",
|
||||
command: "continue.logAutocompleteOutcome",
|
||||
|
|
@ -294,3 +370,26 @@ export class ContinueCompletionProvider
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
type DiffPartType = "+" | "-" | "=";
|
||||
|
||||
function diffPatternMatches(
|
||||
diffs: DiffType[],
|
||||
pattern: DiffPartType[],
|
||||
): boolean {
|
||||
if (diffs.length !== pattern.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (let i = 0; i < diffs.length; i++) {
|
||||
const diff = diffs[i];
|
||||
const diffPartType: DiffPartType =
|
||||
!diff.added && !diff.removed ? "=" : diff.added ? "+" : "-";
|
||||
|
||||
if (diffPartType !== pattern[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -284,6 +284,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,
|
||||
|
|
@ -437,18 +459,23 @@ 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
|
||||
focusGUI();
|
||||
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) {
|
||||
|
|
@ -458,6 +485,7 @@ const getCommandsMap: (
|
|||
void sidebar.webviewProtocol?.request(
|
||||
"focusContinueInputWithNewSession",
|
||||
undefined,
|
||||
false,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -465,6 +493,7 @@ const getCommandsMap: (
|
|||
sidebar.webviewProtocol?.request(
|
||||
"focusContinueInputWithNewSession",
|
||||
undefined,
|
||||
false,
|
||||
);
|
||||
void addHighlightedCodeToContext(sidebar.webviewProtocol);
|
||||
}
|
||||
|
|
@ -723,9 +752,10 @@ const getCommandsMap: (
|
|||
"continue.applyCodeFromChat": () => {
|
||||
void sidebar.webviewProtocol.request("applyCodeFromChat", undefined);
|
||||
},
|
||||
"continue.toggleFullScreen": () => {
|
||||
"continue.toggleFullScreen": async () => {
|
||||
focusGUI();
|
||||
|
||||
const sessionId = await sidebar.webviewProtocol.request("getCurrentSessionId", undefined);
|
||||
// Check if full screen is already open by checking open tabs
|
||||
const fullScreenTab = getFullScreenTab();
|
||||
|
||||
|
|
@ -746,6 +776,7 @@ const getCommandsMap: (
|
|||
vscode.ViewColumn.One,
|
||||
{
|
||||
retainContextWhenHidden: true,
|
||||
enableScripts: true,
|
||||
},
|
||||
);
|
||||
fullScreenPanel = panel;
|
||||
|
|
@ -758,6 +789,13 @@ const getCommandsMap: (
|
|||
undefined,
|
||||
true,
|
||||
);
|
||||
|
||||
panel.onDidChangeViewState(() => {
|
||||
vscode.commands.executeCommand("continue.newSession");
|
||||
if(sessionId){
|
||||
vscode.commands.executeCommand("continue.focusContinueSessionId", sessionId);
|
||||
}
|
||||
});
|
||||
|
||||
// When panel closes, reset the webview and focus
|
||||
panel.onDidDispose(
|
||||
|
|
@ -770,6 +808,7 @@ const getCommandsMap: (
|
|||
);
|
||||
|
||||
vscode.commands.executeCommand("workbench.action.copyEditorToNewWindow");
|
||||
vscode.commands.executeCommand("workbench.action.closeAuxiliaryBar");
|
||||
},
|
||||
"continue.openConfig": () => {
|
||||
core.invoke("config/openProfile", {
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
@ -260,6 +264,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,45 +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.fsPath.endsWith(".continue/config.json") &&
|
||||
!document.uri.fsPath.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";
|
||||
|
|
|
|||
|
|
@ -118,11 +118,6 @@ export function registerAllCodeLensProviders(
|
|||
new providers.DiffViewerCodeLensProvider(diffManager),
|
||||
);
|
||||
|
||||
configPyCodeLensDisposable = registerCodeLensProvider(
|
||||
"*",
|
||||
new providers.ConfigPyCodeLensProvider(),
|
||||
);
|
||||
|
||||
registerQuickActionsProvider(config, context);
|
||||
|
||||
subscribeToVSCodeQuickActionsSettings(() =>
|
||||
|
|
@ -133,8 +128,5 @@ export function registerAllCodeLensProviders(
|
|||
context.subscriptions.push(suggestionsCodeLensDisposable);
|
||||
context.subscriptions.push(diffsCodeLensDisposable);
|
||||
|
||||
// was opening config UI from config.json. Not currently applicable.
|
||||
// context.subscriptions.push(configPyCodeLensDisposable);
|
||||
|
||||
return { verticalDiffCodeLens };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,24 +5,34 @@ import mergeJson from "core/util/merge";
|
|||
import { convertTheme } from "monaco-vscode-textmate-theme-converter/lib/cjs";
|
||||
import * as vscode from "vscode";
|
||||
|
||||
import { getExtensionUri } from "./vscode";
|
||||
/**
|
||||
* Strip comments from theme
|
||||
*/
|
||||
|
||||
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",
|
||||
};
|
||||
function stripInLineComment(line: string): string {
|
||||
let inString = false;
|
||||
let pCh = '';
|
||||
|
||||
for (let i = 0; i < line.length-1; i++) {
|
||||
const ch = line[i];
|
||||
const nCh = line[i + 1];
|
||||
|
||||
// If we're not in a string and we see '//' this is a comment.
|
||||
if (!inString && ch === '/' && nCh === '/') {
|
||||
// Stop processing this line from here.
|
||||
return line.substring(0, i);
|
||||
}
|
||||
|
||||
// Toggle inString state if we see a double quote not escaped by a backslash.
|
||||
if (ch === '"' && pCh !== '\\') {
|
||||
inString = !inString;
|
||||
}
|
||||
|
||||
pCh = ch;
|
||||
}
|
||||
|
||||
return line;
|
||||
}
|
||||
|
||||
function parseThemeString(themeString: string | undefined): any {
|
||||
themeString = themeString
|
||||
|
|
@ -30,12 +40,13 @@ function parseThemeString(themeString: string | undefined): any {
|
|||
.filter((line) => {
|
||||
return !line.trim().startsWith("//");
|
||||
})
|
||||
.map(stripInLineComment)
|
||||
.join("\n");
|
||||
return JSON.parse(themeString ?? "{}");
|
||||
}
|
||||
|
||||
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 +62,114 @@ 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:
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ export function History() {
|
|||
|
||||
const [searchTerm, setSearchTerm] = useState("");
|
||||
|
||||
const sessionTitle = useAppSelector((state) => state.session.title);
|
||||
|
||||
const minisearch = useRef<MiniSearch>(
|
||||
new MiniSearch({
|
||||
fields: ["title"],
|
||||
|
|
|
|||
|
|
@ -65,8 +65,6 @@ const Layout = () => {
|
|||
|
||||
const showDialog = useAppSelector((state) => state.ui.showDialog);
|
||||
|
||||
const isStreaming = useAppSelector((state) => state.session.isStreaming);
|
||||
|
||||
useWebviewListener(
|
||||
"openDialogMessage",
|
||||
async (message) => {
|
||||
|
|
|
|||
|
|
@ -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} />;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -137,6 +137,14 @@ function useSetup() {
|
|||
[history],
|
||||
);
|
||||
|
||||
useWebviewListener(
|
||||
"getCurrentSessionId",
|
||||
async () => {
|
||||
return sessionId
|
||||
},
|
||||
[sessionId],
|
||||
);
|
||||
|
||||
useWebviewListener("setInactive", async () => {
|
||||
dispatch(setInactive());
|
||||
});
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue