merge azure changes
This commit is contained in:
commit
71dd486d76
40 changed files with 487 additions and 340 deletions
16
.github/workflows/jetbrains-release.yaml
vendored
16
.github/workflows/jetbrains-release.yaml
vendored
|
|
@ -6,11 +6,11 @@ name: JetBrains Release
|
|||
|
||||
on:
|
||||
release:
|
||||
types: [ prereleased ]
|
||||
types: [prereleased]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
publish_build:
|
||||
description: 'Whether or not to publish the built extension to the JetBrains marketplace'
|
||||
description: "Whether or not to publish the built extension to the JetBrains marketplace"
|
||||
required: true
|
||||
default: false
|
||||
|
||||
|
|
@ -241,6 +241,12 @@ jobs:
|
|||
name: continue-binary-win32-x64
|
||||
path: ./binary/bin/win32-x64/
|
||||
|
||||
- name: Upload artifact (win32-arm64)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: continue-binary-win32-arm64
|
||||
path: ./binary/bin/win32-arm64/
|
||||
|
||||
- name: Upload artifact (linux-arm64)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
|
@ -345,7 +351,7 @@ jobs:
|
|||
# Run tests and upload a code coverage report
|
||||
test:
|
||||
name: Test
|
||||
needs: [ build ]
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Check out current repository
|
||||
|
|
@ -387,7 +393,7 @@ jobs:
|
|||
inspectCode:
|
||||
if: false
|
||||
name: Inspect code
|
||||
needs: [ build ]
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
|
@ -422,7 +428,7 @@ jobs:
|
|||
verify:
|
||||
if: false
|
||||
name: Verify plugin
|
||||
needs: [ build ]
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Free GitHub Actions Environment Disk Space
|
||||
|
|
|
|||
2
.github/workflows/pr_checks.yaml
vendored
2
.github/workflows/pr_checks.yaml
vendored
|
|
@ -291,6 +291,8 @@ jobs:
|
|||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
|
||||
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
|
||||
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
|
||||
AZURE_FOUNDRY_API_KEY: ${{ secrets.AZURE_FOUNDRY_API_KEY }}
|
||||
|
||||
vscode-get-test-file-matrix:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ const targetToLanceDb = {
|
|||
"linux-arm64": "@lancedb/vectordb-linux-arm64-gnu",
|
||||
"linux-x64": "@lancedb/vectordb-linux-x64-gnu",
|
||||
"win32-x64": "@lancedb/vectordb-win32-x64-msvc",
|
||||
"win32-arm64": "@lancedb/vectordb-win32-x64-msvc", // they don't have a win32-arm64 build
|
||||
"win32-arm64": "@lancedb/vectordb-win32-arm64-msvc",
|
||||
};
|
||||
|
||||
async function installNodeModuleInTempDirAndCopyToCurrent(packageName, toCopy) {
|
||||
|
|
@ -248,9 +248,15 @@ async function installNodeModuleInTempDirAndCopyToCurrent(packageName, toCopy) {
|
|||
|
||||
// Download and unzip prebuilt sqlite3 binary for the target
|
||||
console.log("[info] Downloading node-sqlite3");
|
||||
const downloadUrl = `https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-${
|
||||
target === "win32-arm64" ? "win32-ia32" : target
|
||||
}.tar.gz`;
|
||||
|
||||
const downloadUrl =
|
||||
// node-sqlite3 doesn't have a pre-built binary for win32-arm64
|
||||
target === "win32-arm64"
|
||||
? "https://continue-server-binaries.s3.us-west-1.amazonaws.com/win32-arm64/node_sqlite3.tar.gz"
|
||||
: `https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-${
|
||||
target
|
||||
}.tar.gz`;
|
||||
|
||||
execCmdSync(`curl -L -o ${targetDir}/build.tar.gz ${downloadUrl}`);
|
||||
execCmdSync(`cd ${targetDir} && tar -xvzf build.tar.gz`);
|
||||
|
||||
|
|
|
|||
27
binary/package-lock.json
generated
27
binary/package-lock.json
generated
|
|
@ -48,11 +48,11 @@
|
|||
"@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.24",
|
||||
"@continuedev/config-yaml": "^1.0.26",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
"@modelcontextprotocol/sdk": "^1.0.0",
|
||||
"@modelcontextprotocol/sdk": "^1.4.1",
|
||||
"@mozilla/readability": "^0.5.0",
|
||||
"@octokit/rest": "^20.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||
|
|
@ -2556,9 +2556,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.6.8",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz",
|
||||
"integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==",
|
||||
"version": "1.7.9",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz",
|
||||
"integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.0",
|
||||
|
|
@ -3166,10 +3167,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
|
|
@ -5135,12 +5137,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/micromatch": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
|
||||
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
|
||||
"version": "4.0.8",
|
||||
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
||||
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"braces": "^3.0.2",
|
||||
"braces": "^3.0.3",
|
||||
"picomatch": "^2.3.1"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import { localPathToUri } from "../util/pathToUri.js";
|
|||
|
||||
import {
|
||||
LOCAL_ONBOARDING_CHAT_MODEL,
|
||||
ONBOARDING_LOCAL_MODEL_TITLE,
|
||||
LOCAL_ONBOARDING_PROVIDER_TITLE,
|
||||
} from "./onboarding.js";
|
||||
import ControlPlaneProfileLoader from "./profile/ControlPlaneProfileLoader.js";
|
||||
import LocalProfileLoader from "./profile/LocalProfileLoader.js";
|
||||
|
|
@ -401,7 +401,7 @@ export class ConfigHandler {
|
|||
const { config } = await this.loadConfig();
|
||||
const model = config?.models.find((m) => m.title === title);
|
||||
if (!model) {
|
||||
if (title === ONBOARDING_LOCAL_MODEL_TITLE) {
|
||||
if (title === LOCAL_ONBOARDING_PROVIDER_TITLE) {
|
||||
// Special case, make calls to Ollama before we have it in the config
|
||||
const ollama = new Ollama({
|
||||
model: LOCAL_ONBOARDING_CHAT_MODEL,
|
||||
|
|
|
|||
|
|
@ -3,10 +3,12 @@ import { SerializedContinueConfig } from "../";
|
|||
import { FREE_TRIAL_MODELS } from "./default";
|
||||
|
||||
export const TRIAL_FIM_MODEL = "codestral-latest";
|
||||
export const ONBOARDING_LOCAL_MODEL_TITLE = "Ollama";
|
||||
export const LOCAL_ONBOARDING_PROVIDER_TITLE = "Ollama";
|
||||
export const LOCAL_ONBOARDING_FIM_MODEL = "qwen2.5-coder:1.5b-base";
|
||||
export const LOCAL_ONBOARDING_FIM_TITLE = "Qwen2.5-Coder 1.5B";
|
||||
export const LOCAL_ONBOARDING_CHAT_MODEL = "llama3.1:8b";
|
||||
export const LOCAL_ONBOARDING_CHAT_TITLE = "Llama 3.1 8B";
|
||||
export const LOCAL_ONBOARDING_EMBEDDINGS_MODEL = "nomic-embed-text:latest";
|
||||
|
||||
/**
|
||||
* We set the "best" chat + autocopmlete models by default
|
||||
|
|
@ -35,13 +37,13 @@ export function setupLocalConfig(
|
|||
...config.models.filter((model) => model.provider !== "free-trial"),
|
||||
],
|
||||
tabAutocompleteModel: {
|
||||
title: "Qwen2.5-Coder 1.5B",
|
||||
title: LOCAL_ONBOARDING_FIM_TITLE,
|
||||
provider: "ollama",
|
||||
model: LOCAL_ONBOARDING_FIM_MODEL,
|
||||
},
|
||||
embeddingsProvider: {
|
||||
provider: "ollama",
|
||||
model: "nomic-embed-text",
|
||||
model: LOCAL_ONBOARDING_EMBEDDINGS_MODEL,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
@ -68,24 +70,3 @@ export function setupQuickstartConfig(
|
|||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function setupLocalConfigAfterFreeTrial(
|
||||
config: SerializedContinueConfig,
|
||||
): SerializedContinueConfig {
|
||||
return {
|
||||
...config,
|
||||
models: [
|
||||
{
|
||||
title: LOCAL_ONBOARDING_CHAT_TITLE,
|
||||
provider: "ollama",
|
||||
model: LOCAL_ONBOARDING_CHAT_MODEL,
|
||||
},
|
||||
{
|
||||
title: ONBOARDING_LOCAL_MODEL_TITLE,
|
||||
provider: "ollama",
|
||||
model: "AUTODETECT",
|
||||
},
|
||||
...config.models.filter((model) => model.provider !== "free-trial"),
|
||||
],
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,6 +166,24 @@ async function configYamlToContinueConfig(
|
|||
);
|
||||
continueConfig.tabAutocompleteModels?.push(...llms);
|
||||
}
|
||||
|
||||
if (
|
||||
model.roles?.includes("apply") &&
|
||||
!continueConfig.experimental?.modelRoles?.applyCodeBlock
|
||||
) {
|
||||
continueConfig.experimental ??= {};
|
||||
continueConfig.experimental!.modelRoles ??= {};
|
||||
continueConfig.experimental!.modelRoles!.applyCodeBlock = model.name;
|
||||
}
|
||||
|
||||
if (
|
||||
model.roles?.includes("edit") &&
|
||||
!continueConfig.experimental?.modelRoles?.inlineEdit
|
||||
) {
|
||||
continueConfig.experimental ??= {};
|
||||
continueConfig.experimental!.modelRoles ??= {};
|
||||
continueConfig.experimental!.modelRoles!.inlineEdit = model.name;
|
||||
}
|
||||
}
|
||||
|
||||
if (allowFreeTrial) {
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ async function modelConfigToBaseLLM(
|
|||
title: model.name,
|
||||
model: modelName,
|
||||
systemMessage,
|
||||
promptTemplates: model.promptTemplates,
|
||||
};
|
||||
|
||||
const llm = new cls(options);
|
||||
|
|
|
|||
17
core/core.ts
17
core/core.ts
|
|
@ -11,7 +11,6 @@ import { SYSTEM_PROMPT_DOT_FILE } from "./config/getSystemPromptDotFile";
|
|||
import {
|
||||
setupBestConfig,
|
||||
setupLocalConfig,
|
||||
setupLocalConfigAfterFreeTrial,
|
||||
setupQuickstartConfig,
|
||||
} from "./config/onboarding";
|
||||
import { addContextProvider, addModel, deleteModel } from "./config/util";
|
||||
|
|
@ -717,6 +716,8 @@ export class Core {
|
|||
llm,
|
||||
data.input,
|
||||
data.language,
|
||||
false,
|
||||
undefined,
|
||||
)) {
|
||||
if (abortedMessageIds.has(msg.messageId)) {
|
||||
abortedMessageIds.delete(msg.messageId);
|
||||
|
|
@ -748,10 +749,6 @@ export class Core {
|
|||
editConfigJsonCallback = setupQuickstartConfig;
|
||||
break;
|
||||
|
||||
case "LocalAfterFreeTrial":
|
||||
editConfigJsonCallback = setupLocalConfigAfterFreeTrial;
|
||||
break;
|
||||
|
||||
case "Best":
|
||||
editConfigJsonCallback = setupBestConfig;
|
||||
break;
|
||||
|
|
@ -855,12 +852,18 @@ export class Core {
|
|||
|
||||
on("files/created", async ({ data }) => {
|
||||
if (data?.uris?.length) {
|
||||
this.messenger.send("refreshSubmenuItems", {
|
||||
providers: ["file"],
|
||||
});
|
||||
await this.refreshCodebaseIndexFiles(data.uris);
|
||||
}
|
||||
});
|
||||
|
||||
on("files/deleted", async ({ data }) => {
|
||||
if (data?.uris?.length) {
|
||||
this.messenger.send("refreshSubmenuItems", {
|
||||
providers: ["file"],
|
||||
});
|
||||
await this.refreshCodebaseIndexFiles(data.uris);
|
||||
}
|
||||
});
|
||||
|
|
@ -913,7 +916,9 @@ export class Core {
|
|||
});
|
||||
|
||||
on("didChangeControlPlaneSessionInfo", async (msg) => {
|
||||
this.configHandler.updateControlPlaneSessionInfo(msg.data.sessionInfo);
|
||||
await this.configHandler.updateControlPlaneSessionInfo(
|
||||
msg.data.sessionInfo,
|
||||
);
|
||||
});
|
||||
on("auth/getAuthUrl", async (msg) => {
|
||||
const url = await getAuthUrlForTokenPage(ideSettingsPromise);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ export async function* streamDiffLines(
|
|||
llm: ILLM,
|
||||
input: string,
|
||||
language: string | undefined,
|
||||
onlyOneInsertion?: boolean,
|
||||
onlyOneInsertion: boolean,
|
||||
overridePrompt: ChatMessage[] | undefined,
|
||||
): AsyncGenerator<DiffLine> {
|
||||
void Telemetry.capture(
|
||||
"inlineEdit",
|
||||
|
|
@ -80,14 +81,9 @@ export async function* streamDiffLines(
|
|||
// Trim end of oldLines, otherwise we have trailing \r on every line for CRLF files
|
||||
oldLines = oldLines.map((line) => line.trimEnd());
|
||||
|
||||
const prompt = constructPrompt(
|
||||
prefix,
|
||||
highlighted,
|
||||
suffix,
|
||||
llm,
|
||||
input,
|
||||
language,
|
||||
);
|
||||
const prompt =
|
||||
overridePrompt ??
|
||||
constructPrompt(prefix, highlighted, suffix, llm, input, language);
|
||||
const inept = modelIsInept(llm.model);
|
||||
|
||||
const prediction: Prediction = {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ import {
|
|||
} from "./preIndexed";
|
||||
import preIndexedDocs from "./preIndexedDocs";
|
||||
import { ConfigResult } from "@continuedev/config-yaml";
|
||||
import { GlobalContext } from "../../util/GlobalContext";
|
||||
|
||||
// Purposefully lowercase because lancedb converts
|
||||
export interface LanceDbDocsRow {
|
||||
|
|
@ -210,11 +211,11 @@ export default class DocsService {
|
|||
if (isAborted) {
|
||||
return true;
|
||||
}
|
||||
// Handle indexing disabled change mid-indexing
|
||||
if (this.config.disableIndexing) {
|
||||
this.abort(startUrl);
|
||||
return true;
|
||||
}
|
||||
// // Handle indexing disabled change mid-indexing
|
||||
// if (this.config.disableIndexing) {
|
||||
// this.abort(startUrl);
|
||||
// return true;
|
||||
// }
|
||||
// Handle embeddings provider change mid-indexing
|
||||
if (this.config.embeddingsProvider.embeddingId !== startedWithEmbedder) {
|
||||
this.abort(startUrl);
|
||||
|
|
@ -276,9 +277,9 @@ export default class DocsService {
|
|||
const oldConfig = this.config;
|
||||
this.config = newConfig; // IMPORTANT - need to set up top, other methods below use this without passing it in
|
||||
|
||||
if (this.config.disableIndexing) {
|
||||
return;
|
||||
}
|
||||
// if (this.config.disableIndexing) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// No point in indexing if no docs context provider
|
||||
const hasDocsContextProvider = this.hasDocsContextProvider();
|
||||
|
|
@ -365,12 +366,12 @@ export default class DocsService {
|
|||
|
||||
async indexAndAdd(
|
||||
siteIndexingConfig: SiteIndexingConfig,
|
||||
reIndex: boolean = false,
|
||||
forceReindex: boolean = false,
|
||||
): Promise<void> {
|
||||
if (this.config.disableIndexing) {
|
||||
console.warn("Attempting to add/index docs when indexing is disabled");
|
||||
return;
|
||||
}
|
||||
// if (this.config.disableIndexing) {
|
||||
// console.warn("Attempting to add/index docs when indexing is disabled");
|
||||
// return;
|
||||
// }
|
||||
const { startUrl, useLocalCrawling, maxDepth } = siteIndexingConfig;
|
||||
|
||||
const { isPreindexed, provider } =
|
||||
|
|
@ -396,7 +397,7 @@ export default class DocsService {
|
|||
type: "docs",
|
||||
id: siteIndexingConfig.startUrl,
|
||||
embeddingsProviderId: provider.embeddingId,
|
||||
isReindexing: reIndex && indexExists,
|
||||
isReindexing: forceReindex && indexExists,
|
||||
title: siteIndexingConfig.title,
|
||||
debugInfo: `max depth: ${siteIndexingConfig.maxDepth}`,
|
||||
icon: siteIndexingConfig.faviconUrl,
|
||||
|
|
@ -405,7 +406,7 @@ export default class DocsService {
|
|||
|
||||
// Clear current indexes if reIndexing
|
||||
if (indexExists) {
|
||||
if (reIndex) {
|
||||
if (forceReindex) {
|
||||
await this.deleteIndexes(startUrl);
|
||||
} else {
|
||||
this.handleStatusUpdate({
|
||||
|
|
@ -419,6 +420,46 @@ export default class DocsService {
|
|||
}
|
||||
}
|
||||
|
||||
// If not force-reindexing and has failed with same config, don't reattempt
|
||||
if (!forceReindex) {
|
||||
const globalContext = new GlobalContext();
|
||||
const failedDocs = globalContext.get("failedDocs") ?? [];
|
||||
const hasFailed = failedDocs.find((d) =>
|
||||
this.siteIndexingConfigsAreEqual(siteIndexingConfig, d),
|
||||
);
|
||||
if (hasFailed) {
|
||||
console.log(
|
||||
`Not reattempting to index ${siteIndexingConfig.startUrl}, has already failed with same config`,
|
||||
);
|
||||
this.handleStatusUpdate({
|
||||
...fixedStatus,
|
||||
description: "Failed",
|
||||
status: "failed",
|
||||
progress: 1,
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
const markFailedInGlobalContext = () => {
|
||||
const globalContext = new GlobalContext();
|
||||
const failedDocs = globalContext.get("failedDocs") ?? [];
|
||||
const newFailedDocs = failedDocs.filter(
|
||||
(d) => !this.siteIndexingConfigsAreEqual(siteIndexingConfig, d),
|
||||
);
|
||||
newFailedDocs.push(siteIndexingConfig);
|
||||
globalContext.update("failedDocs", newFailedDocs);
|
||||
};
|
||||
|
||||
const removeFromFailedGlobalContext = () => {
|
||||
const globalContext = new GlobalContext();
|
||||
const failedDocs = globalContext.get("failedDocs") ?? [];
|
||||
const newFailedDocs = failedDocs.filter(
|
||||
(d) => !this.siteIndexingConfigsAreEqual(siteIndexingConfig, d),
|
||||
);
|
||||
globalContext.update("failedDocs", newFailedDocs);
|
||||
};
|
||||
|
||||
try {
|
||||
this.docsIndexingQueue.add(startUrl);
|
||||
|
||||
|
|
@ -552,6 +593,7 @@ export default class DocsService {
|
|||
|
||||
void this.ide.showToast("info", `Failed to index ${startUrl}`);
|
||||
this.docsIndexingQueue.delete(startUrl);
|
||||
markFailedInGlobalContext();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -569,7 +611,7 @@ export default class DocsService {
|
|||
});
|
||||
|
||||
// Delete indexed docs if re-indexing
|
||||
if (reIndex && indexExists) {
|
||||
if (forceReindex && indexExists) {
|
||||
console.log("Deleting old embeddings");
|
||||
await this.deleteIndexes(startUrl);
|
||||
}
|
||||
|
|
@ -610,6 +652,8 @@ export default class DocsService {
|
|||
this.messenger?.send("refreshSubmenuItems", {
|
||||
providers: ["docs"],
|
||||
});
|
||||
|
||||
removeFromFailedGlobalContext();
|
||||
} catch (e) {
|
||||
let description = `Error getting docs from: ${siteIndexingConfig.startUrl}`;
|
||||
if (e instanceof Error) {
|
||||
|
|
@ -617,7 +661,7 @@ export default class DocsService {
|
|||
e.message.includes("github.com") &&
|
||||
e.message.includes("rate limit")
|
||||
) {
|
||||
description = "Github rate limit exceeded";
|
||||
description = "Github rate limit exceeded"; // This text is used verbatim elsewhere
|
||||
}
|
||||
}
|
||||
console.error("Error indexing docs", e);
|
||||
|
|
@ -627,6 +671,7 @@ export default class DocsService {
|
|||
status: "failed",
|
||||
progress: 1,
|
||||
});
|
||||
markFailedInGlobalContext();
|
||||
} finally {
|
||||
this.docsIndexingQueue.delete(startUrl);
|
||||
}
|
||||
|
|
@ -908,10 +953,8 @@ export default class DocsService {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
const currentStatus = this.statuses.get(doc.startUrl);
|
||||
if (currentStatus?.status !== "failed") {
|
||||
newDocs.push(doc);
|
||||
}
|
||||
newDocs.push(doc);
|
||||
void Telemetry.capture("add_docs_config", { url: doc.startUrl });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -920,10 +963,6 @@ export default class DocsService {
|
|||
...newDocs.map((doc) => this.indexAndAdd(doc)),
|
||||
]);
|
||||
|
||||
for (const doc of newDocs) {
|
||||
void Telemetry.capture("add_docs_config", { url: doc.startUrl });
|
||||
}
|
||||
|
||||
for (const doc of deletedDocs) {
|
||||
await this.deleteIndexes(doc.startUrl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@ import * as dotenv from "dotenv";
|
|||
|
||||
import { AssistantChatMessage, CompletionOptions } from "..";
|
||||
|
||||
import { BaseLLM } from ".";
|
||||
import Anthropic from "./llms/Anthropic";
|
||||
import Azure from "./llms/Azure";
|
||||
import Gemini from "./llms/Gemini";
|
||||
import Mistral from "./llms/Mistral";
|
||||
import OpenAI from "./llms/OpenAI";
|
||||
|
||||
import { BaseLLM } from ".";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const COMPLETION_OPTIONS: Partial<CompletionOptions> = {
|
||||
|
|
@ -222,4 +224,25 @@ describe("LLM", () => {
|
|||
}),
|
||||
{ testFim: true, skip: false },
|
||||
);
|
||||
testLLM(
|
||||
new Azure({
|
||||
apiKey: process.env.AZURE_OPENAI_API_KEY,
|
||||
model: "gpt-4o",
|
||||
apiVersion: "2024-05-01-preview",
|
||||
apiBase: "https://continue-azure-openai-instance.openai.azure.com",
|
||||
deployment: "azure-openai-deployment",
|
||||
apiType: "azure-openai",
|
||||
}),
|
||||
{ testFim: false, skip: false, timeout: 20000 },
|
||||
);
|
||||
testLLM(
|
||||
new Azure({
|
||||
apiKey: process.env.AZURE_FOUNDRY_API_KEY,
|
||||
model: "codestral-latest",
|
||||
apiBase:
|
||||
"https://codestral-2501-continue-testing.eastus.models.ai.azure.com",
|
||||
apiType: "azure-foundry",
|
||||
}),
|
||||
{ testFim: false, skip: false, timeout: 20000 },
|
||||
);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ class Azure extends OpenAI {
|
|||
|
||||
static defaultOptions: Partial<LLMOptions> = {
|
||||
apiVersion: "2024-02-15-preview",
|
||||
apiType: "azure",
|
||||
apiType: "azure-openai",
|
||||
};
|
||||
|
||||
constructor(options: LLMOptions) {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ const CHAT_ONLY_MODELS = [
|
|||
"gpt-4o-mini",
|
||||
"o1-preview",
|
||||
"o1-mini",
|
||||
"o3-mini"
|
||||
"o3-mini",
|
||||
];
|
||||
|
||||
const formatMessageForO1 = (messages: ChatCompletionMessageParam[]) => {
|
||||
|
|
@ -206,18 +206,25 @@ class OpenAI extends BaseLLM {
|
|||
protected _getEndpoint(
|
||||
endpoint: "chat/completions" | "completions" | "models",
|
||||
) {
|
||||
if (this.apiType === "azure") {
|
||||
return new URL(
|
||||
`openai/deployments/${this.deployment}/${endpoint}?api-version=${this.apiVersion}`,
|
||||
this.apiBase,
|
||||
);
|
||||
}
|
||||
if (!this.apiBase) {
|
||||
throw new Error(
|
||||
"No API base URL provided. Please set the 'apiBase' option in config.json",
|
||||
);
|
||||
}
|
||||
|
||||
if (this.apiType?.includes("azure")) {
|
||||
// Default is `azure-openai`, but previously was `azure`
|
||||
const isAzureOpenAI =
|
||||
this.apiType === "azure-openai" || this.apiType === "azure";
|
||||
|
||||
const path = isAzureOpenAI
|
||||
? `openai/deployments/${this.deployment}/${endpoint}`
|
||||
: endpoint;
|
||||
|
||||
const version = this.apiVersion ? `?api-version=${this.apiVersion}` : "";
|
||||
return new URL(`${path}${version}`, this.apiBase);
|
||||
}
|
||||
|
||||
return new URL(endpoint, this.apiBase);
|
||||
}
|
||||
|
||||
|
|
@ -267,7 +274,7 @@ class OpenAI extends BaseLLM {
|
|||
body.max_completion_tokens = undefined;
|
||||
}
|
||||
|
||||
if (body.tools?.length) {
|
||||
if (body.tools?.length && !body.model?.startsWith("o3")) {
|
||||
// To ensure schema adherence: https://platform.openai.com/docs/guides/function-calling#parallel-function-calling-and-structured-outputs
|
||||
// In practice, setting this to true and asking for multiple tool calls
|
||||
// leads to "arguments" being something like '{"file": "test.ts"}{"file": "test.js"}'
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export const PROVIDER_TOOL_SUPPORT: Record<
|
|||
},
|
||||
openai: (model) => {
|
||||
// https://platform.openai.com/docs/guides/function-calling#models-supporting-function-calling
|
||||
if (model.toLowerCase().startsWith("gpt-4")) {
|
||||
if (model.toLowerCase().startsWith("gpt-4") || model.toLowerCase().startsWith("o3")) {
|
||||
return true;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
15
core/package-lock.json
generated
15
core/package-lock.json
generated
|
|
@ -13,7 +13,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.26",
|
||||
"@continuedev/config-yaml": "^1.0.28",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
@ -3038,9 +3038,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@continuedev/config-yaml": {
|
||||
"version": "1.0.26",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.26.tgz",
|
||||
"integrity": "sha512-Fxu59+AR4S6WaoyyGysiQWVwMvQQt+pR68P1mVQGstDw4YpIghFioK0m6jXrN9vw1fJTIr6tFtcA9N41xI5mDQ==",
|
||||
"version": "1.0.28",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.28.tgz",
|
||||
"integrity": "sha512-XTTRHeIYgLlwzPkub2jAPx4TqRf47g/TR2K9AIdZYQRNxYuHAeFRRqaIaAZPdykZATg30vdGQGGdssVr6IyCCg==",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
|
|
@ -15560,9 +15560,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.21.0.tgz",
|
||||
"integrity": "sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==",
|
||||
"version": "6.21.1",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz",
|
||||
"integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.17"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,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.26",
|
||||
"@continuedev/config-yaml": "^1.0.28",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
|
|||
|
|
@ -28,12 +28,7 @@ import type {
|
|||
ToolCall,
|
||||
} from "../";
|
||||
|
||||
export type OnboardingModes =
|
||||
| "Local"
|
||||
| "Best"
|
||||
| "Custom"
|
||||
| "Quickstart"
|
||||
| "LocalAfterFreeTrial";
|
||||
export type OnboardingModes = "Local" | "Best" | "Custom" | "Quickstart";
|
||||
|
||||
export interface ListHistoryOptions {
|
||||
offset?: number;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import {
|
|||
} from "../config/sharedConfig";
|
||||
|
||||
import { getGlobalContextFilePath } from "./paths";
|
||||
import { SiteIndexingConfig } from "..";
|
||||
|
||||
export type GlobalContextType = {
|
||||
indexingPaused: boolean;
|
||||
|
|
@ -27,6 +28,7 @@ export type GlobalContextType = {
|
|||
showConfigUpdateToast: boolean;
|
||||
isSupportedLanceDbCpuTarget: boolean;
|
||||
sharedConfig: SharedConfigSchema;
|
||||
failedDocs: SiteIndexingConfig[];
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ import TabItem from "@theme/TabItem";
|
|||
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 OpenAI model setup, see [Azure OpenAI Service configuration](#general-model-configuration).
|
||||
|
||||
For details on OpenAI model setup, see [Azure OpenAI Service configuration](#azure-openai-service-configuration).
|
||||
|
||||
:::
|
||||
|
||||
## Chat model
|
||||
|
|
@ -26,19 +28,22 @@ We recommend configuring **GPT-4o** as your chat model.
|
|||
apiBase: <YOUR_DEPLOYMENT_BASE>
|
||||
deployment: <YOUR_DEPLOYMENT_NAME>
|
||||
apiKey: ${{ secrets.AZURE_API_KEY }} # If you use subscription key, try using Azure gateway to rename it apiKey
|
||||
env:
|
||||
apiType: azure-foundry # Or "azure-openai" if using OpenAI models
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
```json title="config.json"
|
||||
"models": [{
|
||||
```json title="config.json"
|
||||
"models": [{
|
||||
"title": "GPT-4o",
|
||||
"provider": "azure",
|
||||
"model": "gpt-4o",
|
||||
"apiBase": "<YOUR_DEPLOYMENT_BASE>",
|
||||
"deployment": "<YOUR_DEPLOYMENT_NAME>",
|
||||
"apiKey": "<MY_API_KEY>" // If you use subscription key, try using Azure gateway to rename it apiKey
|
||||
}]
|
||||
```
|
||||
"apiKey": "<MY_API_KEY>", // If you use subscription key, try using Azure gateway to rename it apiKey
|
||||
"apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models
|
||||
}]
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
|
@ -77,23 +82,24 @@ We recommend configuring **text-embedding-3-large** as your embeddings model.
|
|||
```yaml title="Package or config.yaml"
|
||||
models:
|
||||
- name: Text Embedding-3 Large
|
||||
provider: openai
|
||||
provider: azure
|
||||
model: text-embedding-3-large
|
||||
apiBase: <YOUR_DEPLOYMENT_BASE>
|
||||
deployment: <YOUR_DEPLOYMENT_NAME>
|
||||
apiType: azure
|
||||
apiKey: ${{ secrets.AZURE_API_KEY }}
|
||||
env:
|
||||
apiType: azure
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
```json title="config.json"
|
||||
"embeddingsProvider": {
|
||||
"provider": "openai",
|
||||
"provider": "azure",
|
||||
"model": "text-embedding-3-large",
|
||||
"apiBase": "<YOUR_DEPLOYMENT_BASE>",
|
||||
"deployment": "<YOUR_DEPLOYMENT_NAME>",
|
||||
"apiType": "azure",
|
||||
"apiKey": "<MY_API_KEY>"
|
||||
"apiKey": "<AZURE_API_KEY>",
|
||||
"apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
|
|
@ -110,9 +116,7 @@ Azure OpenAI currently does not offer any reranking models.
|
|||
If you'd like to use OpenAI models but are concerned about privacy, you can use the Azure OpenAI service, which is GDPR and HIPAA compliant.
|
||||
|
||||
:::info[Getting access]
|
||||
You need to apply for access to the Azure OpenAI service. Response times are typically within a few days.
|
||||
|
||||
**[Click here to apply for access to the Azure OpenAI service](https://azure.microsoft.com/en-us/products/ai-services/openai-service)**
|
||||
[Click here](https://azure.microsoft.com/en-us/products/ai-services/openai-service) to apply for access to the Azure OpenAI service. Response times are typically within a few days.
|
||||
:::
|
||||
|
||||
## Azure OpenAI Service configuration
|
||||
|
|
@ -134,6 +138,8 @@ For example, a Target URI of `https://just-an-example.openai.azure.com/openai/de
|
|||
deployment: gpt-4o-july
|
||||
apiVersion: 2023-03-15-preview
|
||||
apiKey: ${{ secrets.AZURE_API_KEY }}
|
||||
env:
|
||||
apiType: azure-openai
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="json" label="JSON">
|
||||
|
|
@ -145,7 +151,8 @@ For example, a Target URI of `https://just-an-example.openai.azure.com/openai/de
|
|||
"apiBase": "https://just-an-example.openai.azure.com",
|
||||
"deployment": "gpt-4o-july",
|
||||
"apiVersion": "2023-03-15-preview",
|
||||
"apiKey": "<AZURE_API_KEY>"
|
||||
"apiKey": "<AZURE_API_KEY>",
|
||||
"apiType": "azure-openai"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
|
|
|
|||
|
|
@ -451,8 +451,8 @@ class CustomPanel(
|
|||
val rightButton =
|
||||
CustomButton("⏎ Enter") { onEnter() }
|
||||
.apply {
|
||||
background = JBColor(0x999998.toInt(), 0x999998.toInt())
|
||||
foreground = JBColor(0xF5F5F5.toInt(), 0xF5F5F5.toInt())
|
||||
background = globalScheme.defaultForeground
|
||||
foreground = globalScheme.defaultBackground
|
||||
border = EmptyBorder(2, 6, 2, 6)
|
||||
}
|
||||
|
||||
|
|
|
|||
56
extensions/vscode/package-lock.json
generated
56
extensions/vscode/package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "continue",
|
||||
"version": "0.9.261",
|
||||
"version": "0.9.262",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "continue",
|
||||
"version": "0.9.261",
|
||||
"version": "0.9.262",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/fetch": "^1.0.3",
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
"socket.io-client": "^4.7.2",
|
||||
"strip-ansi": "^7.1.0",
|
||||
"svg-builder": "^2.0.0",
|
||||
"systeminformation": "^5.22.10",
|
||||
"systeminformation": "^5.23.7",
|
||||
"tailwindcss": "^3.3.2",
|
||||
"undici": "^6.2.0",
|
||||
"uuid": "^9.0.1",
|
||||
|
|
@ -106,7 +106,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.26",
|
||||
"@continuedev/config-yaml": "^1.0.28",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
@ -5735,9 +5735,10 @@
|
|||
"integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw=="
|
||||
},
|
||||
"node_modules/express": {
|
||||
"version": "4.21.1",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz",
|
||||
"integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==",
|
||||
"version": "4.21.2",
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
|
||||
"integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"accepts": "~1.3.8",
|
||||
"array-flatten": "1.1.1",
|
||||
|
|
@ -5758,7 +5759,7 @@
|
|||
"methods": "~1.1.2",
|
||||
"on-finished": "2.4.1",
|
||||
"parseurl": "~1.3.3",
|
||||
"path-to-regexp": "0.1.10",
|
||||
"path-to-regexp": "0.1.12",
|
||||
"proxy-addr": "~2.0.7",
|
||||
"qs": "6.13.0",
|
||||
"range-parser": "~1.2.1",
|
||||
|
|
@ -5773,6 +5774,10 @@
|
|||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/express"
|
||||
}
|
||||
},
|
||||
"node_modules/express/node_modules/debug": {
|
||||
|
|
@ -9098,15 +9103,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.7",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
||||
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
|
||||
"version": "3.3.8",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
|
||||
"integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
|
|
@ -10059,9 +10065,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/path-to-regexp": {
|
||||
"version": "0.1.10",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz",
|
||||
"integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w=="
|
||||
"version": "0.1.12",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
||||
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/path-type": {
|
||||
"version": "4.0.0",
|
||||
|
|
@ -12168,9 +12175,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/systeminformation": {
|
||||
"version": "5.23.5",
|
||||
"resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.23.5.tgz",
|
||||
"integrity": "sha512-PEpJwhRYxZgBCAlWZhWIgfMTjXLqfcaZ1pJsJn9snWNfBW/Z1YQg1mbIUSWrEV3ErAHF7l/OoVLQeaZDlPzkpA==",
|
||||
"version": "5.25.11",
|
||||
"resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.25.11.tgz",
|
||||
"integrity": "sha512-jI01fn/t47rrLTQB0FTlMCC+5dYx8o0RRF+R4BPiUNsvg5OdY0s9DKMFmJGrx5SwMZQ4cag0Gl6v8oycso9b/g==",
|
||||
"license": "MIT",
|
||||
"os": [
|
||||
"darwin",
|
||||
"linux",
|
||||
|
|
@ -12911,9 +12919,10 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "6.20.1",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.20.1.tgz",
|
||||
"integrity": "sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==",
|
||||
"version": "6.21.1",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.21.1.tgz",
|
||||
"integrity": "sha512-q/1rj5D0/zayJB2FraXdaWxbhWiNKDvu8naDT2dl1yTlvJp4BLtOcp2a5BvgGNQpYYJzau7tf1WgKv3b+7mqpQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.17"
|
||||
}
|
||||
|
|
@ -13309,10 +13318,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "4.5.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz",
|
||||
"integrity": "sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ==",
|
||||
"version": "4.5.9",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.9.tgz",
|
||||
"integrity": "sha512-qK9W4xjgD3gXbC0NmdNFFnVFLMWSNiR3swj957yutwzzN16xF/E7nmtAyp1rT9hviDroQANjE4HK3H4WqWdFtw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.18.10",
|
||||
"postcss": "^8.4.27",
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"author": "Continue Dev, Inc",
|
||||
"version": "0.9.262",
|
||||
"version": "0.9.263",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
@ -711,7 +711,7 @@
|
|||
"socket.io-client": "^4.7.2",
|
||||
"strip-ansi": "^7.1.0",
|
||||
"svg-builder": "^2.0.0",
|
||||
"systeminformation": "^5.22.10",
|
||||
"systeminformation": "^5.23.7",
|
||||
"tailwindcss": "^3.3.2",
|
||||
"undici": "^6.2.0",
|
||||
"uuid": "^9.0.1",
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
const fs = require("fs");
|
||||
const ncp = require("ncp").ncp;
|
||||
const path = require("path");
|
||||
|
||||
const ncp = require("ncp").ncp;
|
||||
const { rimrafSync } = require("rimraf");
|
||||
|
||||
const {
|
||||
validateFilesPresent,
|
||||
execCmdSync,
|
||||
autodetectPlatformAndArch,
|
||||
} = require("../../../scripts/util/index");
|
||||
|
||||
const { copyConfigSchema } = require("./utils");
|
||||
|
||||
// Clear folders that will be packaged to ensure clean slate
|
||||
|
|
@ -46,6 +49,17 @@ console.log("[info] Using target: ", target);
|
|||
|
||||
const exe = os === "win32" ? ".exe" : "";
|
||||
|
||||
const isInGitHubAction = !!process.env.GITHUB_ACTIONS;
|
||||
|
||||
const isArmTarget =
|
||||
target === "darwin-arm64" ||
|
||||
target === "linux-arm64" ||
|
||||
target === "win32-arm64";
|
||||
|
||||
const isWinTarget = target?.startsWith("win");
|
||||
const isLinuxTarget = target?.startsWith("linux");
|
||||
const isMacTarget = target?.startsWith("darwin");
|
||||
|
||||
(async () => {
|
||||
console.log("[info] Packaging extension for target ", target);
|
||||
|
||||
|
|
@ -66,7 +80,7 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
execCmdSync("npm install");
|
||||
console.log("[info] npm install in gui completed");
|
||||
|
||||
if (ghAction()) {
|
||||
if (isInGitHubAction) {
|
||||
execCmdSync("npm run build");
|
||||
}
|
||||
|
||||
|
|
@ -222,7 +236,7 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
"../../../core/llm/llamaTokenizerWorkerPool.mjs",
|
||||
"../../../core/llm/llamaTokenizer.mjs",
|
||||
"../../../core/llm/tiktokenWorkerPool.mjs",
|
||||
"../../../core/util/start_ollama.sh"
|
||||
"../../../core/util/start_ollama.sh",
|
||||
];
|
||||
|
||||
for (const f of filesToCopy) {
|
||||
|
|
@ -262,22 +276,6 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
);
|
||||
});
|
||||
|
||||
function ghAction() {
|
||||
return !!process.env.GITHUB_ACTIONS;
|
||||
}
|
||||
|
||||
function isArm() {
|
||||
return (
|
||||
target === "darwin-arm64" ||
|
||||
target === "linux-arm64" ||
|
||||
target === "win32-arm64"
|
||||
);
|
||||
}
|
||||
|
||||
function isWin() {
|
||||
return target?.startsWith("win");
|
||||
}
|
||||
|
||||
async function installNodeModuleInTempDirAndCopyToCurrent(
|
||||
packageName,
|
||||
toCopy,
|
||||
|
|
@ -341,42 +339,40 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
}
|
||||
|
||||
// GitHub Actions doesn't support ARM, so we need to download pre-saved binaries
|
||||
if (ghAction() && isArm()) {
|
||||
// sqlite3
|
||||
if (!isWin()) {
|
||||
// Neither lancedb nor sqlite3 have pre-built windows arm64 binaries
|
||||
// 02/07/25 - the above comment is out of date, there is now support for ARM runners on GitHub Actions
|
||||
if (isInGitHubAction && isArmTarget) {
|
||||
// lancedb binary
|
||||
const packageToInstall = {
|
||||
"darwin-arm64": "@lancedb/vectordb-darwin-arm64",
|
||||
"linux-arm64": "@lancedb/vectordb-linux-arm64-gnu",
|
||||
"win32-arm64": "@lancedb/vectordb-win32-arm64-msvc",
|
||||
}[target];
|
||||
console.log(
|
||||
"[info] Downloading pre-built lancedb binary: " + packageToInstall,
|
||||
);
|
||||
|
||||
// lancedb binary
|
||||
const packageToInstall = {
|
||||
"darwin-arm64": "@lancedb/vectordb-darwin-arm64",
|
||||
"linux-arm64": "@lancedb/vectordb-linux-arm64-gnu",
|
||||
}[target];
|
||||
console.log(
|
||||
"[info] Downloading pre-built lancedb binary: " + packageToInstall,
|
||||
);
|
||||
await installNodeModuleInTempDirAndCopyToCurrent(
|
||||
packageToInstall,
|
||||
"@lancedb",
|
||||
);
|
||||
|
||||
await installNodeModuleInTempDirAndCopyToCurrent(
|
||||
packageToInstall,
|
||||
"@lancedb",
|
||||
);
|
||||
|
||||
// Replace the installed with pre-built
|
||||
console.log("[info] Downloading pre-built sqlite3 binary");
|
||||
rimrafSync("../../core/node_modules/sqlite3/build");
|
||||
const downloadUrl = {
|
||||
"darwin-arm64":
|
||||
"https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-darwin-arm64.tar.gz",
|
||||
"linux-arm64":
|
||||
"https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v3-linux-arm64.tar.gz",
|
||||
}[target];
|
||||
execCmdSync(
|
||||
`curl -L -o ../../core/node_modules/sqlite3/build.tar.gz ${downloadUrl}`,
|
||||
);
|
||||
execCmdSync(
|
||||
"cd ../../core/node_modules/sqlite3 && tar -xvzf build.tar.gz",
|
||||
);
|
||||
fs.unlinkSync("../../core/node_modules/sqlite3/build.tar.gz");
|
||||
}
|
||||
// Replace the installed with pre-built
|
||||
console.log("[info] Downloading pre-built sqlite3 binary");
|
||||
rimrafSync("../../core/node_modules/sqlite3/build");
|
||||
const downloadUrl = {
|
||||
"darwin-arm64":
|
||||
"https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v6-darwin-arm64.tar.gz",
|
||||
"linux-arm64":
|
||||
"https://github.com/TryGhost/node-sqlite3/releases/download/v5.1.7/sqlite3-v5.1.7-napi-v3-linux-arm64.tar.gz",
|
||||
// node-sqlite3 doesn't have a pre-built binary for win32-arm64
|
||||
"win32-arm64":
|
||||
"https://continue-server-binaries.s3.us-west-1.amazonaws.com/win32-arm64/node_sqlite3.tar.gz",
|
||||
}[target];
|
||||
execCmdSync(
|
||||
`curl -L -o ../../core/node_modules/sqlite3/build.tar.gz ${downloadUrl}`,
|
||||
);
|
||||
execCmdSync("cd ../../core/node_modules/sqlite3 && tar -xvzf build.tar.gz");
|
||||
fs.unlinkSync("../../core/node_modules/sqlite3/build.tar.gz");
|
||||
|
||||
// Download and unzip esbuild
|
||||
console.log("[info] Downloading pre-built esbuild binary");
|
||||
|
|
@ -483,9 +479,9 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
// onnx runtime bindngs
|
||||
`bin/napi-v3/${os}/${arch}/onnxruntime_binding.node`,
|
||||
`bin/napi-v3/${os}/${arch}/${
|
||||
os === "darwin"
|
||||
isMacTarget
|
||||
? "libonnxruntime.1.14.0.dylib"
|
||||
: os === "linux"
|
||||
: isLinuxTarget
|
||||
? "libonnxruntime.so.1.14.0"
|
||||
: "onnxruntime.dll"
|
||||
}`,
|
||||
|
|
@ -528,11 +524,7 @@ const exe = os === "win32" ? ".exe" : "";
|
|||
? "win32-x64/esbuild.exe"
|
||||
: `${target}/bin/esbuild`
|
||||
}`,
|
||||
`out/node_modules/@lancedb/vectordb-${
|
||||
os === "win32"
|
||||
? "win32-x64-msvc"
|
||||
: `${target}${os === "linux" ? "-gnu" : ""}`
|
||||
}/index.node`,
|
||||
`out/node_modules/@lancedb/vectordb-${target}${isWinTarget ? "-msvc" : ""}${isLinuxTarget ? "-gnu" : ""}/index.node`,
|
||||
`out/node_modules/esbuild/lib/main.js`,
|
||||
`out/node_modules/esbuild/bin/esbuild`,
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { DiffLine } from "core";
|
||||
import { ChatMessage, DiffLine } from "core";
|
||||
import { ConfigHandler } from "core/config/ConfigHandler";
|
||||
import { streamDiffLines } from "core/edit/streamDiffLines";
|
||||
import { pruneLinesFromBottom, pruneLinesFromTop } from "core/llm/countTokens";
|
||||
|
|
@ -272,6 +272,7 @@ export class VerticalDiffManager {
|
|||
onlyOneInsertion?: boolean,
|
||||
quickEdit?: string,
|
||||
range?: vscode.Range,
|
||||
newCode?: string,
|
||||
): Promise<string | undefined> {
|
||||
vscode.commands.executeCommand("setContext", "continue.diffVisible", true);
|
||||
|
||||
|
|
@ -386,6 +387,18 @@ export class VerticalDiffManager {
|
|||
llm.model,
|
||||
);
|
||||
|
||||
let overridePrompt: ChatMessage[] | undefined;
|
||||
if (llm.promptTemplates?.apply) {
|
||||
const rendered = llm.renderPromptTemplate(llm.promptTemplates.apply, [], {
|
||||
original_code: rangeContent,
|
||||
new_code: newCode ?? "",
|
||||
});
|
||||
overridePrompt =
|
||||
typeof rendered === "string"
|
||||
? [{ role: "user", content: rendered }]
|
||||
: rendered;
|
||||
}
|
||||
|
||||
if (editor.selection) {
|
||||
// Unselect the range
|
||||
editor.selection = new vscode.Selection(
|
||||
|
|
@ -413,7 +426,8 @@ export class VerticalDiffManager {
|
|||
llm,
|
||||
input,
|
||||
getMarkdownLanguageTagForFile(fileUri),
|
||||
onlyOneInsertion,
|
||||
!!onlyOneInsertion,
|
||||
overridePrompt,
|
||||
);
|
||||
|
||||
for await (const line of stream) {
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ export class VsCodeMessenger {
|
|||
undefined,
|
||||
undefined,
|
||||
rangeToApplyTo,
|
||||
data.text,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
61
gui/package-lock.json
generated
61
gui/package-lock.json
generated
|
|
@ -7,7 +7,7 @@
|
|||
"name": "gui",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.0.26",
|
||||
"@continuedev/config-yaml": "^1.0.28",
|
||||
"@headlessui/react": "^1.7.17",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@reduxjs/toolkit": "^2.3.0",
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
"redux-persist-transform-filter": "^0.0.22",
|
||||
"redux-thunk": "^3.1.0",
|
||||
"rehype-highlight": "^7.0.0",
|
||||
"rehype-katex": "^7.0.0",
|
||||
"rehype-katex": "^7.0.1",
|
||||
"rehype-wrap-all": "^1.1.0",
|
||||
"remark-math": "^6.0.0",
|
||||
"reselect": "^5.1.1",
|
||||
|
|
@ -108,7 +108,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.26",
|
||||
"@continuedev/config-yaml": "^1.0.28",
|
||||
"@continuedev/fetch": "^1.0.4",
|
||||
"@continuedev/llm-info": "^1.0.2",
|
||||
"@continuedev/openai-adapters": "^1.0.10",
|
||||
|
|
@ -556,9 +556,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@continuedev/config-yaml": {
|
||||
"version": "1.0.26",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.26.tgz",
|
||||
"integrity": "sha512-Fxu59+AR4S6WaoyyGysiQWVwMvQQt+pR68P1mVQGstDw4YpIghFioK0m6jXrN9vw1fJTIr6tFtcA9N41xI5mDQ==",
|
||||
"version": "1.0.28",
|
||||
"resolved": "https://registry.npmjs.org/@continuedev/config-yaml/-/config-yaml-1.0.28.tgz",
|
||||
"integrity": "sha512-XTTRHeIYgLlwzPkub2jAPx4TqRf47g/TR2K9AIdZYQRNxYuHAeFRRqaIaAZPdykZATg30vdGQGGdssVr6IyCCg==",
|
||||
"dependencies": {
|
||||
"@continuedev/config-types": "^1.0.14",
|
||||
"yaml": "^2.6.1",
|
||||
|
|
@ -3871,10 +3871,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/bin-version/node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
|
|
@ -5756,10 +5757,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/foreground-child/node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"path-key": "^3.1.0",
|
||||
"shebang-command": "^2.0.0",
|
||||
|
|
@ -7595,13 +7597,14 @@
|
|||
}
|
||||
},
|
||||
"node_modules/katex": {
|
||||
"version": "0.16.11",
|
||||
"resolved": "https://registry.npmjs.org/katex/-/katex-0.16.11.tgz",
|
||||
"integrity": "sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ==",
|
||||
"version": "0.16.21",
|
||||
"resolved": "https://registry.npmjs.org/katex/-/katex-0.16.21.tgz",
|
||||
"integrity": "sha512-XvqR7FgOHtWupfMiigNzmh+MgUVmDGU2kXZm899ZkPfcuoPuFxyHmXsgATDpFZDAXCI8tvinaVcDo8PIIJSo4A==",
|
||||
"funding": [
|
||||
"https://opencollective.com/katex",
|
||||
"https://github.com/sponsors/katex"
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"commander": "^8.3.0"
|
||||
},
|
||||
|
|
@ -8610,9 +8613,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.7",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
|
||||
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
|
||||
"version": "3.3.8",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz",
|
||||
"integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -8620,6 +8623,7 @@
|
|||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
|
|
@ -12198,10 +12202,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "4.5.5",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.5.tgz",
|
||||
"integrity": "sha512-ifW3Lb2sMdX+WU91s3R0FyQlAyLxOzCSCP37ujw0+r5POeHPwe6udWVIElKQq8gk3t7b8rkmvqC6IHBpCff4GQ==",
|
||||
"version": "4.5.9",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.9.tgz",
|
||||
"integrity": "sha512-qK9W4xjgD3gXbC0NmdNFFnVFLMWSNiR3swj957yutwzzN16xF/E7nmtAyp1rT9hviDroQANjE4HK3H4WqWdFtw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.18.10",
|
||||
"postcss": "^8.4.27",
|
||||
|
|
@ -12699,10 +12704,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vite-node/node_modules/vite": {
|
||||
"version": "5.4.9",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.9.tgz",
|
||||
"integrity": "sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==",
|
||||
"version": "5.4.14",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz",
|
||||
"integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.21.3",
|
||||
"postcss": "^8.4.43",
|
||||
|
|
@ -13274,10 +13280,11 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vitest/node_modules/vite": {
|
||||
"version": "5.4.9",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.9.tgz",
|
||||
"integrity": "sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==",
|
||||
"version": "5.4.14",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.14.tgz",
|
||||
"integrity": "sha512-EK5cY7Q1D8JNhSaPKVK4pwBFvaTmZxEnoKXLG/U9gmdDcihQGNzFlgIvaxezFR4glP1LsuiedwMBqCXH3wZccA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"esbuild": "^0.21.3",
|
||||
"postcss": "^8.4.43",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
"test:watch": "vitest"
|
||||
},
|
||||
"dependencies": {
|
||||
"@continuedev/config-yaml": "^1.0.26",
|
||||
"@continuedev/config-yaml": "^1.0.28",
|
||||
"@headlessui/react": "^1.7.17",
|
||||
"@heroicons/react": "^2.0.18",
|
||||
"@reduxjs/toolkit": "^2.3.0",
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
"redux-persist-transform-filter": "^0.0.22",
|
||||
"redux-thunk": "^3.1.0",
|
||||
"rehype-highlight": "^7.0.0",
|
||||
"rehype-katex": "^7.0.0",
|
||||
"rehype-katex": "^7.0.1",
|
||||
"rehype-wrap-all": "^1.1.0",
|
||||
"remark-math": "^6.0.0",
|
||||
"reselect": "^5.1.1",
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ interface OllamaCompletedStepProps {
|
|||
function OllamaCompletedStep({ text }: OllamaCompletedStepProps) {
|
||||
return (
|
||||
<div className="flex items-center justify-between">
|
||||
<p className="mr-1 w-3/4 truncate font-mono text-sm">{text}</p>
|
||||
<p className="lines mr-1 w-3/4 font-mono text-sm leading-none">{text}</p>
|
||||
<CheckCircleIcon width={24} height={24} className="text-emerald-600" />
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ function OllamaModelDownload({
|
|||
|
||||
return (
|
||||
<div className="flex flex-col">
|
||||
<p className="mb-2 text-lg font-bold leading-tight">{title}</p>
|
||||
<p className="mb-1 mt-4 text-base font-semibold sm:text-lg">{title}</p>
|
||||
{hasDownloaded ? (
|
||||
<OllamaCompletedStep text={command} />
|
||||
) : (
|
||||
<>
|
||||
<StyledActionButton data-tooltip-id={id} onClick={onClick}>
|
||||
<p className="truncate font-mono text-xs">{command}</p>
|
||||
<p className="lines m-0 px-0 py-2 font-mono text-xs">{command}</p>
|
||||
<CommandLineIcon width={24} height={24} />
|
||||
</StyledActionButton>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {
|
|||
ArrowPathIcon,
|
||||
ArrowTopRightOnSquareIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import { useState, useContext } from "react";
|
||||
import { useState, useContext, useEffect } from "react";
|
||||
import { IdeMessengerContext } from "../../../context/IdeMessenger";
|
||||
import { providers } from "../../../pages/AddNewModel/configs/providers";
|
||||
import { StyledActionButton } from "../..";
|
||||
|
|
@ -19,10 +19,15 @@ export function OllamaStatus({ isOllamaConnected }: OllamaStatusProps) {
|
|||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
|
||||
const [status, setStatus] = useState<OllamaConnectionStatuses>(
|
||||
isOllamaConnected
|
||||
? OllamaConnectionStatuses.Connected
|
||||
: OllamaConnectionStatuses.WaitingToDownload,
|
||||
OllamaConnectionStatuses.WaitingToDownload,
|
||||
);
|
||||
useEffect(() => {
|
||||
if (isOllamaConnected) {
|
||||
setStatus(OllamaConnectionStatuses.Connected);
|
||||
} else if (status !== OllamaConnectionStatuses.Downloading) {
|
||||
setStatus(OllamaConnectionStatuses.WaitingToDownload);
|
||||
}
|
||||
}, [status, isOllamaConnected]);
|
||||
|
||||
function onClickDownload() {
|
||||
ideMessenger.post("openUrl", downloadUrl);
|
||||
|
|
@ -33,14 +38,14 @@ export function OllamaStatus({ isOllamaConnected }: OllamaStatusProps) {
|
|||
case OllamaConnectionStatuses.WaitingToDownload:
|
||||
return (
|
||||
<StyledActionButton onClick={onClickDownload}>
|
||||
<p className="mr-1 text-sm underline">{downloadUrl}</p>
|
||||
<p className="lines lines-1 mr-1 text-sm underline">{downloadUrl}</p>
|
||||
<ArrowTopRightOnSquareIcon width={24} height={24} />
|
||||
</StyledActionButton>
|
||||
);
|
||||
case OllamaConnectionStatuses.Downloading:
|
||||
return (
|
||||
<div className="flex items-center justify-between">
|
||||
<p className="mr-1 w-3/4 font-mono text-sm">
|
||||
<p className="lines mr-1 w-3/4 font-mono text-sm">
|
||||
Checking for connection to Ollama at http://localhost:11434
|
||||
</p>
|
||||
<ArrowPathIcon className="animate-spin-slow mr-1 h-4 w-4" />
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export function PlatformOnboardingCard({ isDialog }: OnboardingCardProps) {
|
|||
isDialog={isDialog}
|
||||
/>
|
||||
) : (
|
||||
<div className="mt-4">
|
||||
<div className="mt-4 flex flex-col">
|
||||
<Alert type="info">
|
||||
By choosing this option, Continue will be configured by a local{" "}
|
||||
<code>config.yaml</code> file. If you're just looking to use
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import {
|
||||
LOCAL_ONBOARDING_CHAT_MODEL,
|
||||
LOCAL_ONBOARDING_CHAT_TITLE,
|
||||
LOCAL_ONBOARDING_EMBEDDINGS_MODEL,
|
||||
LOCAL_ONBOARDING_FIM_MODEL,
|
||||
ONBOARDING_LOCAL_MODEL_TITLE,
|
||||
LOCAL_ONBOARDING_PROVIDER_TITLE,
|
||||
} from "core/config/onboarding";
|
||||
import { useContext, useEffect, useState } from "react";
|
||||
import { useDispatch } from "react-redux";
|
||||
import { Button } from "../..";
|
||||
import { IdeMessengerContext } from "../../../context/IdeMessenger";
|
||||
import { hasPassedFTL } from "../../../util/freeTrial";
|
||||
import AddModelButtonSubtext from "../../AddModelButtonSubtext";
|
||||
import OllamaModelDownload from "../components/OllamaModelDownload";
|
||||
import { OllamaStatus } from "../components/OllamaStatus";
|
||||
|
|
@ -25,10 +25,7 @@ interface OnboardingLocalTabProps {
|
|||
function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) {
|
||||
const dispatch = useDispatch();
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
const { submitOnboarding } = useSubmitOnboarding(
|
||||
hasPassedFTL() ? "LocalAfterFreeTrial" : "Local",
|
||||
isDialog,
|
||||
);
|
||||
const { submitOnboarding } = useSubmitOnboarding("Local", isDialog);
|
||||
const [hasLoadedChatModel, setHasLoadedChatModel] = useState(false);
|
||||
const [downloadedOllamaModels, setDownloadedOllamaModels] = useState<
|
||||
string[]
|
||||
|
|
@ -37,17 +34,28 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) {
|
|||
const [isOllamaConnected, setIsOllamaConnected] = useState(false);
|
||||
|
||||
const hasDownloadedChatModel = Array.isArray(downloadedOllamaModels)
|
||||
? downloadedOllamaModels.some((ollamaModel) =>
|
||||
ollamaModel.startsWith(LOCAL_ONBOARDING_CHAT_MODEL),
|
||||
? downloadedOllamaModels.some(
|
||||
(ollamaModel) => ollamaModel === LOCAL_ONBOARDING_CHAT_MODEL,
|
||||
)
|
||||
: false;
|
||||
|
||||
const hasDownloadedAutocompleteModel = Array.isArray(downloadedOllamaModels)
|
||||
? downloadedOllamaModels.some((ollamaModel) =>
|
||||
ollamaModel.startsWith(LOCAL_ONBOARDING_CHAT_MODEL),
|
||||
? downloadedOllamaModels.some(
|
||||
(ollamaModel) => ollamaModel === LOCAL_ONBOARDING_FIM_MODEL,
|
||||
)
|
||||
: false;
|
||||
|
||||
const hasDownloadedEmbeddingsModel = Array.isArray(downloadedOllamaModels)
|
||||
? downloadedOllamaModels.some(
|
||||
(ollamaModel) => ollamaModel === LOCAL_ONBOARDING_EMBEDDINGS_MODEL,
|
||||
)
|
||||
: false;
|
||||
|
||||
const allDownloaded =
|
||||
hasDownloadedAutocompleteModel &&
|
||||
hasDownloadedChatModel &&
|
||||
hasDownloadedEmbeddingsModel;
|
||||
|
||||
/**
|
||||
* The first time we detect that a chat model has been loaded,
|
||||
* we send an empty request to load it
|
||||
|
|
@ -57,7 +65,7 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) {
|
|||
ideMessenger.post("llm/complete", {
|
||||
completionOptions: {},
|
||||
prompt: "",
|
||||
title: ONBOARDING_LOCAL_MODEL_TITLE,
|
||||
title: LOCAL_ONBOARDING_PROVIDER_TITLE,
|
||||
});
|
||||
|
||||
setHasLoadedChatModel(true);
|
||||
|
|
@ -68,18 +76,11 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) {
|
|||
const fetchDownloadedModels = async () => {
|
||||
try {
|
||||
const result = await ideMessenger.request("llm/listModels", {
|
||||
title: ONBOARDING_LOCAL_MODEL_TITLE,
|
||||
title: LOCAL_ONBOARDING_PROVIDER_TITLE,
|
||||
});
|
||||
if (result.status === "success") {
|
||||
// TODO - temporary fix, see notes
|
||||
// https://github.com/continuedev/continue/pull/3059
|
||||
if (Array.isArray(result.content)) {
|
||||
setDownloadedOllamaModels(result.content);
|
||||
setIsOllamaConnected(true);
|
||||
} else {
|
||||
setDownloadedOllamaModels([]);
|
||||
setIsOllamaConnected(false);
|
||||
}
|
||||
setDownloadedOllamaModels(result.content ?? []);
|
||||
setIsOllamaConnected(!!result.content);
|
||||
} else {
|
||||
throw new Error("Failed to fetch models");
|
||||
}
|
||||
|
|
@ -100,9 +101,9 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-2">
|
||||
<div className="mt-3 flex flex-col gap-1 px-2">
|
||||
<div className="flex flex-col">
|
||||
<p className="mb-2 text-lg font-bold leading-tight">Install Ollama</p>
|
||||
<p className="mb-0 text-lg font-bold leading-tight">Install Ollama</p>
|
||||
<OllamaStatus isOllamaConnected={isOllamaConnected} />
|
||||
</div>
|
||||
|
||||
|
|
@ -118,6 +119,12 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) {
|
|||
hasDownloaded={hasDownloadedAutocompleteModel}
|
||||
/>
|
||||
|
||||
<OllamaModelDownload
|
||||
title="Download Embeddings model"
|
||||
modelName={LOCAL_ONBOARDING_EMBEDDINGS_MODEL}
|
||||
hasDownloaded={hasDownloadedEmbeddingsModel}
|
||||
/>
|
||||
|
||||
<div className="mt-4 w-full">
|
||||
<Button
|
||||
onClick={() => {
|
||||
|
|
@ -137,7 +144,7 @@ function OnboardingLocalTab({ isDialog }: OnboardingLocalTabProps) {
|
|||
);
|
||||
}}
|
||||
className="w-full"
|
||||
disabled={!hasDownloadedChatModel}
|
||||
disabled={!allDownloaded}
|
||||
>
|
||||
Connect
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -127,25 +127,36 @@ function DocsDetailsDialog({ startUrl }: DocsDetailsDialogProps) {
|
|||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<Tooltip
|
||||
id={urlToolTipId}
|
||||
place="top"
|
||||
className="max-w-full"
|
||||
>
|
||||
{chunk.filepath}
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
id={contentToolTipId}
|
||||
place="top"
|
||||
className="max-h-[300px] max-w-[170px] overflow-y-auto"
|
||||
>
|
||||
{chunk.content}
|
||||
</Tooltip>
|
||||
</>
|
||||
);
|
||||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
{/* Rending tooltips here because div can't be child of tbody apparently */}
|
||||
{data.chunks.map((chunk, i) => {
|
||||
const contentToolTipId = `docs-content-peek-${i}`;
|
||||
const urlToolTipId = `docs-url-peek-${i}`;
|
||||
return (
|
||||
<>
|
||||
<Tooltip
|
||||
key={urlToolTipId}
|
||||
id={urlToolTipId}
|
||||
place="top"
|
||||
className="max-w-full"
|
||||
>
|
||||
{chunk.filepath}
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
key={contentToolTipId}
|
||||
id={contentToolTipId}
|
||||
place="top"
|
||||
className="max-h-[300px] max-w-[170px] overflow-y-auto"
|
||||
>
|
||||
{chunk.content}
|
||||
</Tooltip>
|
||||
</>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ import {
|
|||
PencilSquareIcon,
|
||||
XMarkIcon,
|
||||
} from "@heroicons/react/24/outline";
|
||||
import styled from "styled-components";
|
||||
import { defaultBorderRadius, lightGray, vscBackground } from "..";
|
||||
import { lightGray } from "..";
|
||||
import { getMetaKeyLabel, isJetBrains } from "../../util";
|
||||
import { useContext } from "react";
|
||||
import { IdeMessengerContext } from "../../context/IdeMessenger";
|
||||
|
|
@ -16,41 +15,27 @@ interface TutorialCardProps {
|
|||
onClose: () => void;
|
||||
}
|
||||
|
||||
const TutorialCardDiv = styled.div`
|
||||
border: 1px solid ${lightGray};
|
||||
border-radius: ${defaultBorderRadius};
|
||||
background-color: ${vscBackground};
|
||||
padding: 1rem 2.5rem 1rem 2rem;
|
||||
margin: 1rem;
|
||||
max-width: 28rem;
|
||||
position: relative;
|
||||
`;
|
||||
|
||||
const CloseButton = styled.button`
|
||||
border: none;
|
||||
background-color: ${vscBackground};
|
||||
color: ${lightGray};
|
||||
position: absolute;
|
||||
top: 0.4rem;
|
||||
right: 0.5rem;
|
||||
padding: 0.25rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
`;
|
||||
|
||||
export function TutorialCard({ onClose }: TutorialCardProps) {
|
||||
const ideMessenger = useContext(IdeMessengerContext);
|
||||
const jetbrains = isJetBrains();
|
||||
|
||||
return (
|
||||
<TutorialCardDiv data-testid={`tutorial-card`}>
|
||||
<CloseButton onClick={onClose}>
|
||||
<XMarkIcon className="h-5 w-5" />
|
||||
</CloseButton>
|
||||
<div
|
||||
className="border-0.5 border-lightGray bg-vsc-background m-1 max-w-96 rounded-md border-solid px-3 py-3 sm:px-5"
|
||||
data-testid={`tutorial-card`}
|
||||
>
|
||||
<div className="flex items-center justify-between">
|
||||
<h3 className="m-0 p-0"></h3>
|
||||
<div
|
||||
onClick={onClose}
|
||||
className="cursor-pointer items-center justify-center"
|
||||
>
|
||||
<XMarkIcon className="h-5 w-5" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul className="space-y-4 pl-0" style={{ color: lightGray }}>
|
||||
{!isJetBrains() && (
|
||||
{!jetbrains && (
|
||||
<li className="flex items-start">
|
||||
<ArrowRightStartOnRectangleIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
<span>
|
||||
|
|
@ -67,27 +52,36 @@ export function TutorialCard({ onClose }: TutorialCardProps) {
|
|||
</li>
|
||||
)}
|
||||
<li className="flex items-start">
|
||||
<PencilSquareIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
<div>
|
||||
<PencilSquareIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
</div>
|
||||
<span>
|
||||
Highlight code and press <kbd>{getMetaKeyLabel()}</kbd> + <kbd>I</kbd> to
|
||||
quickly make natural language edits
|
||||
Highlight code and press <kbd>{getMetaKeyLabel()}</kbd> +{" "}
|
||||
<kbd>I</kbd> to quickly make natural language edits
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex items-start">
|
||||
<ClipboardDocumentIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
<div>
|
||||
<ClipboardDocumentIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
</div>
|
||||
<span>
|
||||
Highlight code and press <kbd>{getMetaKeyLabel()}</kbd> + <kbd>L</kbd> to
|
||||
add it to the chat window
|
||||
Highlight code and press <kbd>{getMetaKeyLabel()}</kbd> +{" "}
|
||||
<kbd>{jetbrains ? "J" : "L"}</kbd> to add it to the chat window
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex items-start">
|
||||
<Cog6ToothIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
<div>
|
||||
<Cog6ToothIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
</div>
|
||||
<span>
|
||||
Click the gear icon in the bottom right to configure Continue
|
||||
Click the gear icon at the top of the chat window to configure
|
||||
Continue
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex items-start">
|
||||
<BookOpenIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
<div>
|
||||
<BookOpenIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
</div>
|
||||
<span>
|
||||
<a
|
||||
className="cursor-pointer text-inherit underline hover:text-inherit"
|
||||
|
|
@ -101,6 +95,6 @@ export function TutorialCard({ onClose }: TutorialCardProps) {
|
|||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</TutorialCardDiv>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,6 +252,7 @@ export const SubmenuContextProvidersProvider = ({
|
|||
abortControllers.get(description.title)?.abort();
|
||||
abortControllers.set(description.title, controller);
|
||||
providersLoading.add(description.title);
|
||||
|
||||
const result = await ideMessenger.request(
|
||||
"context/loadSubmenuItems",
|
||||
{
|
||||
|
|
@ -299,7 +300,7 @@ export const SubmenuContextProvidersProvider = ({
|
|||
setFallbackResults((prev) => ({
|
||||
...prev,
|
||||
file: deduplicateArray(
|
||||
[...lastOpenFilesRef.current, ...(prev.file ?? [])],
|
||||
[...lastOpenFilesRef.current, ...itemsWithProvider],
|
||||
(a, b) => a.id === b.id,
|
||||
),
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ export function ScopeSelect() {
|
|||
const orgId = newValue === USER_PROFILE_VAL ? null : newValue;
|
||||
dispatch(setOrgId(orgId));
|
||||
};
|
||||
|
||||
const CurScopeEntityFallBackIcon =
|
||||
value === "personal" ? UserCircleIcon : BuildingOfficeIcon;
|
||||
|
||||
const selectedDisplay =
|
||||
value === USER_PROFILE_VAL
|
||||
? { name: "Personal", iconUrl: null }
|
||||
|
|
@ -38,7 +42,7 @@ export function ScopeSelect() {
|
|||
{selectedDisplay?.iconUrl ? (
|
||||
<img src={selectedDisplay.iconUrl} alt="" className="h-5 w-5" />
|
||||
) : (
|
||||
<BuildingOfficeIcon className="h-5 w-5" />
|
||||
<CurScopeEntityFallBackIcon className="h-5 w-5" />
|
||||
)}
|
||||
<span className="truncate">
|
||||
{selectedDisplay?.name || "Select Organization"}
|
||||
|
|
|
|||
7
package-lock.json
generated
7
package-lock.json
generated
|
|
@ -625,10 +625,11 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"path-key": "^3.1.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@continuedev/config-yaml",
|
||||
"version": "1.0.26",
|
||||
"version": "1.0.28",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
|
|||
|
|
@ -42,6 +42,13 @@ export const completionOptionsSchema = z.object({
|
|||
});
|
||||
export type CompletionOptions = z.infer<typeof completionOptionsSchema>;
|
||||
|
||||
/** Prompt templates use Handlebars syntax */
|
||||
const promptTemplatesSchema = z.object({
|
||||
apply: z.string().optional(),
|
||||
edit: z.string().optional(),
|
||||
});
|
||||
export type PromptTemplates = z.infer<typeof promptTemplatesSchema>;
|
||||
|
||||
const baseModelFields = {
|
||||
name: z.string(),
|
||||
model: z.string(),
|
||||
|
|
@ -50,6 +57,7 @@ const baseModelFields = {
|
|||
roles: modelRolesSchema.array().optional(),
|
||||
defaultCompletionOptions: completionOptionsSchema.optional(),
|
||||
requestOptions: requestOptionsSchema.optional(),
|
||||
promptTemplates: promptTemplatesSchema.optional(),
|
||||
};
|
||||
|
||||
export const modelSchema = z.union([
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue