diff --git a/core/codeRenderer/CodeRenderer.ts b/core/codeRenderer/CodeRenderer.ts index 3d4084f7a..576088ca2 100644 --- a/core/codeRenderer/CodeRenderer.ts +++ b/core/codeRenderer/CodeRenderer.ts @@ -8,8 +8,19 @@ * we rarely ever need syntax highlighting outside of * creating a render of it. */ +import { + transformerMetaHighlight, + transformerNotationDiff, + transformerNotationFocus, + transformerNotationHighlight, +} from "@shikijs/transformers"; import { JSDOM } from "jsdom"; -import { BundledTheme, codeToHtml, getSingletonHighlighter } from "shiki"; +import { + BundledLanguage, + BundledTheme, + getSingletonHighlighter, + Highlighter, +} from "shiki"; import { escapeForSVG, kebabOfStr } from "../util/text"; interface CodeRendererOptions { @@ -42,6 +53,8 @@ export class CodeRenderer { private currentTheme: string = "dark-plus"; private editorBackground: string = "#000000"; private editorForeground: string = "#FFFFFF"; + private editorLineHighlight: string = "#000000"; + private highlighter: Highlighter | null = null; private constructor() {} @@ -62,13 +75,17 @@ export class CodeRenderer { ? "dark-plus" : kebabOfStr(themeName); - const highlighter = await getSingletonHighlighter({ + this.highlighter = await getSingletonHighlighter({ + langs: ["typescript"], themes: [this.currentTheme], }); - const th = highlighter.getTheme(this.currentTheme); + const th = this.highlighter.getTheme(this.currentTheme); + this.editorBackground = th.bg; this.editorForeground = th.fg; + this.editorLineHighlight = + th.colors!["editor.lineHighlightBackground"] ?? "#000000"; } else { this.currentTheme = "dark-plus"; } @@ -148,10 +165,29 @@ export class CodeRenderer { async highlightCode( code: string, language: string = "javascript", + currLineOffsetFromTop: number, ): Promise { - return await codeToHtml(code, { + const annotatedCode = code + .split("\n") + .map((line, i) => + i === currLineOffsetFromTop + ? line + " \/\/ \[\!code highlight\]" + : line, + ) + .join("\n"); + + await this.highlighter!.loadLanguage(language as BundledLanguage); + + return this.highlighter!.codeToHtml(annotatedCode, { lang: language, theme: this.currentTheme, + transformers: [ + // transformerColorizedBrackets(), + transformerMetaHighlight(), + transformerNotationHighlight(), + transformerNotationDiff(), + transformerNotationFocus(), + ], }); } @@ -163,23 +199,40 @@ export class CodeRenderer { dimensions: Dimensions, lineHeight: number, options: ConversionOptions, + currLineOffsetFromTop: number, ): Promise { - const highlightedCodeHtml = await this.highlightCode(code, language); + const strokeWidth = 1; + const highlightedCodeHtml = await this.highlightCode( + code, + language, + currLineOffsetFromTop, + ); + // console.log(highlightedCodeHtml); - const guts = this.convertShikiHtmlToSvgGut( + const { guts, lineBackgrounds } = this.convertShikiHtmlToSvgGut( highlightedCodeHtml, fontSize, fontFamily, lineHeight, + dimensions, ); const backgroundColor = this.getBackgroundColor(highlightedCodeHtml); - const svg = ` + const svg = ` + - + + ${lineBackgrounds} ${guts} `; + console.log(svg); return Buffer.from(svg, "utf8"); } @@ -189,7 +242,8 @@ export class CodeRenderer { fontSize: number, fontFamily: string, lineHeight: number, - ): string { + dimensions: Dimensions, + ): { guts: string; lineBackgrounds: string } { const dom = new JSDOM(shikiHtml); const document = dom.window.document; @@ -204,19 +258,70 @@ export class CodeRenderer { const el = node as HTMLElement; const style = el.getAttribute("style") || ""; const colorMatch = style.match(/color:\s*(#[0-9a-fA-F]{6})/); - const fill = colorMatch ? ` fill="${colorMatch[1]}"` : ""; + const classes = el.getAttribute("class") || ""; + let fill = colorMatch ? ` fill="${colorMatch[1]}"` : ""; + if (classes.includes("highlighted")) { + fill = ` fill="${this.editorLineHighlight}"`; + } const content = el.textContent || ""; return `${escapeForSVG(content)}`; }) .join(""); - const y = (index + 1) * lineHeight; - return `${spans}`; + // Typography notes: + // Each line of code is a inside a . + // Math becomes interesting here; the y value is actually aligned to the topmost border. + // So y = 0 will have the rect be flush with the top border. + // More importantly, text will also be positioned that way. + // Since y = 0 is the axis the text will align itself to, the default settings will actually have the text sitting "on top of" the y = 0 axis, which effectively shifts them up. + // To prevent this, we want the alignment axis to be at the middle of each rect, and have the text align itself vertically to the center (skwered by the axis). + // The first step is to add lineHeight / 2 to move the axis down. + // The second step is to add 'dominant-baseline="central"' to vertically center the text. + // Note that we choose "central" over "middle". "middle" will center the text too perfectly, which is actually undesirable! + const y = index * lineHeight + lineHeight / 2; + return `${spans}`; }); - return ` - ${svgLines.join("\n")} - `.trim(); + const lineBackgrounds = lines + .map((line, index) => { + const classes = line?.getAttribute("class") || ""; + const bgColor = classes.includes("highlighted") + ? this.editorLineHighlight + : this.editorBackground; + const y = index * lineHeight; + const isFirst = index === 0; + const isLast = index === lines.length - 1; + const radius = 10; + // SVG notes: + // By default SVGs have anti-aliasing on. + // This is undesirable in our case because pixel-perfect alignment of these rectangles will introduce thin gaps. + // Turning it off with 'shape-rendering="crispEdges"' solves the issue. + return isFirst + ? `` + : isLast + ? `` + : ``; + }) + .join("\n"); + + return { + guts: svgLines.join("\n"), + lineBackgrounds, + }; } getBackgroundColor(shikiHtml: string): string { @@ -244,6 +349,7 @@ export class CodeRenderer { dimensions: Dimensions, lineHeight: number, options: ConversionOptions, + currLineOffsetFromTop: number, ): Promise { switch (options.imageType) { // case "png": @@ -265,6 +371,7 @@ export class CodeRenderer { dimensions, lineHeight, options, + currLineOffsetFromTop, ); return `data:image/svg+xml;base64,${svgBuffer.toString("base64")}`; } diff --git a/core/edit/streamDiffLines.ts b/core/edit/streamDiffLines.ts index 7cf1af2f7..c2cd32b0e 100644 --- a/core/edit/streamDiffLines.ts +++ b/core/edit/streamDiffLines.ts @@ -55,7 +55,11 @@ export async function* addIndentation( } function modelIsInept(model: string): boolean { - return !(model.includes("gpt") || model.includes("claude")); + return !( + model.includes("gpt") || + model.includes("claude") || + model.includes("nova") + ); } export async function* streamDiffLines({ diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index a13ffe8dc..9a3d37af9 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -237,6 +237,11 @@ function autodetectTemplateType(model: string): TemplateType | undefined { return "none"; } + // Nova Pro requests always sent through Converse API, so formatting not necessary + if (lower.includes("nova")) { + return "none"; + } + if (lower.includes("codestral")) { return "none"; } diff --git a/core/llm/autodetect.vitest.ts b/core/llm/autodetect.vitest.ts index c5cbf08fe..e9d7180ae 100644 --- a/core/llm/autodetect.vitest.ts +++ b/core/llm/autodetect.vitest.ts @@ -106,6 +106,19 @@ test("autodetectTemplateType returns 'none' for Codestral models", () => { expect(autodetectTemplateType("codestral-22b")).toBe("none"); }); +test("autodetectTemplateType returns 'none' for Nova models", () => { + expect(autodetectTemplateType("nova")).toBe("none"); + expect(autodetectTemplateType("Nova")).toBe("none"); + expect(autodetectTemplateType("nova-pro")).toBe("none"); + expect(autodetectTemplateType("nova-lite")).toBe("none"); + expect(autodetectTemplateType("nova-micro")).toBe("none"); + expect(autodetectTemplateType("nova-premier")).toBe("none"); + expect(autodetectTemplateType("amazon-nova-pro")).toBe("none"); + expect(autodetectTemplateType("amazon-nova-lite")).toBe("none"); + expect(autodetectTemplateType("amazon-nova-micro")).toBe("none"); + expect(autodetectTemplateType("amazon-nova-premier")).toBe("none"); +}); + test("autodetectTemplateType returns 'alpaca' for Alpaca and Wizard models", () => { expect(autodetectTemplateType("alpaca")).toBe("alpaca"); expect(autodetectTemplateType("Alpaca")).toBe("alpaca"); diff --git a/core/llm/toolSupport.ts b/core/llm/toolSupport.ts index b578569cb..9c3db3e74 100644 --- a/core/llm/toolSupport.ts +++ b/core/llm/toolSupport.ts @@ -96,6 +96,10 @@ export const PROVIDER_TOOL_SUPPORT: Record boolean> = "claude-3.7-sonnet", "claude-sonnet-4", "claude-opus-4", + "nova-lite", + "nova-pro", + "nova-micro", + "nova-premier", ].some((part) => model.toLowerCase().includes(part)) ) { return true; diff --git a/core/package-lock.json b/core/package-lock.json index a5b9cea03..dc7ec2d63 100644 --- a/core/package-lock.json +++ b/core/package-lock.json @@ -82,6 +82,8 @@ "@babel/preset-env": "^7.24.7", "@biomejs/biome": "1.6.4", "@google/generative-ai": "^0.11.4", + "@shikijs/colorized-brackets": "^3.7.0", + "@shikijs/transformers": "^3.7.0", "@types/diff": "^7.0.1", "@types/follow-redirects": "^1.14.4", "@types/jest": "^29.5.12", @@ -4752,66 +4754,87 @@ "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", "peer": true }, - "node_modules/@shikijs/core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.6.0.tgz", - "integrity": "sha512-9By7Xb3olEX0o6UeJyPLI1PE1scC4d3wcVepvtv2xbuN9/IThYN4Wcwh24rcFeASzPam11MCq8yQpwwzCgSBRw==", + "node_modules/@shikijs/colorized-brackets": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/colorized-brackets/-/colorized-brackets-3.7.0.tgz", + "integrity": "sha512-4tGMLMTqP7cw3AddjIjz7AlpPFuXpm2aDO25+uUHhGOVJvyDkm3a4cVb5W66QiBZFYsOyU6mx+lnsSimNTLsWQ==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.6.0", + "shiki": "3.7.0" + } + }, + "node_modules/@shikijs/core": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-3.7.0.tgz", + "integrity": "sha512-yilc0S9HvTPyahHpcum8eonYrQtmGTU0lbtwxhA6jHv4Bm1cAdlPFRCJX4AHebkCm75aKTjjRAW+DezqD1b/cg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "3.7.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.5" } }, "node_modules/@shikijs/engine-javascript": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.6.0.tgz", - "integrity": "sha512-7YnLhZG/TU05IHMG14QaLvTW/9WiK8SEYafceccHUSXs2Qr5vJibUwsDfXDLmRi0zHdzsxrGKpSX6hnqe0k8nA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-3.7.0.tgz", + "integrity": "sha512-0t17s03Cbv+ZcUvv+y33GtX75WBLQELgNdVghnsdhTgU3hVcWcMsoP6Lb0nDTl95ZJfbP1mVMO0p3byVh3uuzA==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.6.0", + "@shikijs/types": "3.7.0", "@shikijs/vscode-textmate": "^10.0.2", "oniguruma-to-es": "^4.3.3" } }, "node_modules/@shikijs/engine-oniguruma": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.6.0.tgz", - "integrity": "sha512-nmOhIZ9yT3Grd+2plmW/d8+vZ2pcQmo/UnVwXMUXAKTXdi+LK0S08Ancrz5tQQPkxvjBalpMW2aKvwXfelauvA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.7.0.tgz", + "integrity": "sha512-5BxcD6LjVWsGu4xyaBC5bu8LdNgPCVBnAkWTtOCs/CZxcB22L8rcoWfv7Hh/3WooVjBZmFtyxhgvkQFedPGnFw==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.6.0", + "@shikijs/types": "3.7.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "node_modules/@shikijs/langs": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.6.0.tgz", - "integrity": "sha512-IdZkQJaLBu1LCYCwkr30hNuSDfllOT8RWYVZK1tD2J03DkiagYKRxj/pDSl8Didml3xxuyzUjgtioInwEQM/TA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.7.0.tgz", + "integrity": "sha512-1zYtdfXLr9xDKLTGy5kb7O0zDQsxXiIsw1iIBcNOO8Yi5/Y1qDbJ+0VsFoqTlzdmneO8Ij35g7QKF8kcLyznCQ==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.6.0" + "@shikijs/types": "3.7.0" } }, "node_modules/@shikijs/themes": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.6.0.tgz", - "integrity": "sha512-Fq2j4nWr1DF4drvmhqKq8x5vVQ27VncF8XZMBuHuQMZvUSS3NBgpqfwz/FoGe36+W6PvniZ1yDlg2d4kmYDU6w==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.7.0.tgz", + "integrity": "sha512-VJx8497iZPy5zLiiCTSIaOChIcKQwR0FebwE9S3rcN0+J/GTWwQ1v/bqhTbpbY3zybPKeO8wdammqkpXc4NVjQ==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/types": "3.6.0" + "@shikijs/types": "3.7.0" + } + }, + "node_modules/@shikijs/transformers": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-3.7.0.tgz", + "integrity": "sha512-VplaqIMRNsNOorCXJHkbF5S0pT6xm8Z/s7w7OPZLohf8tR93XH0krvUafpNy/ozEylrWuShJF0+ftEB+wFRwGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/core": "3.7.0", + "@shikijs/types": "3.7.0" } }, "node_modules/@shikijs/types": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.6.0.tgz", - "integrity": "sha512-cLWFiToxYu0aAzJqhXTQsFiJRTFDAGl93IrMSBNaGSzs7ixkLfdG6pH11HipuWFGW5vyx4X47W8HDQ7eSrmBUg==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.7.0.tgz", + "integrity": "sha512-MGaLeaRlSWpnP0XSAum3kP3a8vtcTsITqoEPYdt3lQG3YCdQH4DnEhodkYcNMcU0uW0RffhoD1O3e0vG5eSBBg==", "dev": true, "license": "MIT", "dependencies": { @@ -16249,18 +16272,18 @@ } }, "node_modules/shiki": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.6.0.tgz", - "integrity": "sha512-tKn/Y0MGBTffQoklaATXmTqDU02zx8NYBGQ+F6gy87/YjKbizcLd+Cybh/0ZtOBX9r1NEnAy/GTRDKtOsc1L9w==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-3.7.0.tgz", + "integrity": "sha512-ZcI4UT9n6N2pDuM2n3Jbk0sR4Swzq43nLPgS/4h0E3B/NrFn2HKElrDtceSf8Zx/OWYOo7G1SAtBLypCp+YXqg==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/core": "3.6.0", - "@shikijs/engine-javascript": "3.6.0", - "@shikijs/engine-oniguruma": "3.6.0", - "@shikijs/langs": "3.6.0", - "@shikijs/themes": "3.6.0", - "@shikijs/types": "3.6.0", + "@shikijs/core": "3.7.0", + "@shikijs/engine-javascript": "3.7.0", + "@shikijs/engine-oniguruma": "3.7.0", + "@shikijs/langs": "3.7.0", + "@shikijs/themes": "3.7.0", + "@shikijs/types": "3.7.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } diff --git a/core/package.json b/core/package.json index fd1be11e0..9c9af5851 100644 --- a/core/package.json +++ b/core/package.json @@ -18,6 +18,8 @@ "@babel/preset-env": "^7.24.7", "@biomejs/biome": "1.6.4", "@google/generative-ai": "^0.11.4", + "@shikijs/colorized-brackets": "^3.7.0", + "@shikijs/transformers": "^3.7.0", "@types/diff": "^7.0.1", "@types/follow-redirects": "^1.14.4", "@types/jest": "^29.5.12", diff --git a/docs/docs/customization/00-overview.mdx b/docs/docs/customization/00-overview.mdx index 423901141..767709951 100644 --- a/docs/docs/customization/00-overview.mdx +++ b/docs/docs/customization/00-overview.mdx @@ -6,11 +6,11 @@ keywords: [customize, configure, config] Continue can be deeply customized. For example you might: -- **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](../advanced/model-providers/top-level/openai.mdx). -- **Select different models for specific tasks**. Different Continue features can use different models. We call these _model roles_. For example, you can use a different model for chat than you do for autocomplete. Learn more about [model roles](../advanced/model-roles/00-intro.mdx). -- **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](../advanced/custom-providers.mdx). -- **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](../advanced/deep-dives/slash-commands.mdx). -- **Call external tools and functions**. Unchain your LLM with the power of tools using [Agent](../features/agent/quick-start.mdx). Add custom tools using [MCP Servers](../advanced/deep-dives/mcp.mdx) +- **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/top-level/openai.mdx). +- **Select different models for specific tasks**. Different Continue features can use different models. We call these _model roles_. For example, you can use a different model for chat than you do for autocomplete. Learn more about [model roles](../customize/model-roles/00-intro.mdx). +- **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/custom-providers.mdx). +- **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/deep-dives/slash-commands.mdx). +- **Call external tools and functions**. Unchain your LLM with the power of tools using [Agent](../features/agent/quick-start.mdx). Add custom tools using [MCP Servers](../customize/deep-dives/mcp.mdx) Whatever you choose, you'll probably start by editing your Assistant. @@ -21,4 +21,4 @@ You can easily access your assistant configuration from the Continue Chat sideba ![configure an assistant](/img/configure-continue.png) - See [Editing Hub Assistants](../hub/assistants/edit-an-assistant.md) for more details on managing your hub assistant -- See the [Config Deep Dive](../advanced/deep-dives/configuration.md) for more details on configuring local assistants. +- See the [Config Deep Dive](../customize/deep-dives/configuration.md) for more details on configuring local assistants. diff --git a/docs/docs/customization/mcp-tools.mdx b/docs/docs/customization/mcp-tools.mdx index f9af25609..098835c59 100644 --- a/docs/docs/customization/mcp-tools.mdx +++ b/docs/docs/customization/mcp-tools.mdx @@ -18,7 +18,7 @@ Model Context Protocol servers provide specialized functionality: ## Learn More -Learn more in the [MCP deep dive](../advanced/deep-dives/mcp.mdx), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details. +Learn more in the [MCP deep dive](../customize/deep-dives/mcp.mdx), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details. description: Model Context Protocol servers provide specialized functionality keywords: [mcp, blocks, model context protocol, integrations, tools] sidebar_position: 4 @@ -37,4 +37,4 @@ Model Context Protocol servers provide specialized functionality: ## Learn More -Learn more in the [MCP deep dive](../advanced/deep-dives/mcp.mdx), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details. +Learn more in the [MCP deep dive](../customize/deep-dives/mcp.mdx), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details. diff --git a/docs/docs/customization/models.mdx b/docs/docs/customization/models.mdx index d612aea47..dac342360 100644 --- a/docs/docs/customization/models.mdx +++ b/docs/docs/customization/models.mdx @@ -8,17 +8,17 @@ sidebar_position: 1 These blocks form the foundation of the entire assistant experience, offering different specialized capabilities: -- **[Chat](../advanced/model-roles/chat.mdx)**: Power conversational interactions about code and provide detailed guidance -- **[Edit](../advanced/model-roles/edit.mdx)**: Handle complex code transformations and refactoring tasks -- **[Apply](../advanced/model-roles/apply.mdx)**: Execute targeted code modifications with high accuracy -- **[Autocomplete](../advanced/model-roles/autocomplete.md)**: Provide real-time suggestions as developers type -- **[Embedding](../advanced/model-roles/embeddings.mdx)**: Transform code into vector representations for semantic search -- **[Reranker](../advanced/model-roles/reranking.mdx)**: Improve search relevance by ordering results based on semantic meaning +- **[Chat](../customize/model-roles/chat.mdx)**: Power conversational interactions about code and provide detailed guidance +- **[Edit](../customize/model-roles/edit.mdx)**: Handle complex code transformations and refactoring tasks +- **[Apply](../customize/model-roles/apply.mdx)**: Execute targeted code modifications with high accuracy +- **[Autocomplete](../customize/model-roles/autocomplete.md)**: Provide real-time suggestions as developers type +- **[Embedding](../customize/model-roles/embeddings.mdx)**: Transform code into vector representations for semantic search +- **[Reranker](../customize/model-roles/reranking.mdx)**: Improve search relevance by ordering results based on semantic meaning ![Model Blocks Overview](/img/model-blocks-overview.png) ## Learn More -Continue supports [many model providers](../advanced/model-providers/top-level/openai.mdx), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have various roles like `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`. +Continue supports [many model providers](../customize/model-providers/top-level/openai.mdx), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have various roles like `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`. -Read more about roles [here](../advanced/model-roles/00-intro.mdx) and view [`models`](/reference#models) in the YAML Reference. +Read more about roles [here](../customize/model-roles/00-intro.mdx) and view [`models`](/reference#models) in the YAML Reference. diff --git a/docs/docs/customization/prompts.mdx b/docs/docs/customization/prompts.mdx index 38c359f78..ab27abcf8 100644 --- a/docs/docs/customization/prompts.mdx +++ b/docs/docs/customization/prompts.mdx @@ -18,4 +18,4 @@ These are the specialized instructions that shape how models respond: ## Learn More -Prompt blocks have the same syntax as [prompt files](../advanced/deep-dives/prompts.md). The `config.yaml` spec for `prompts` can be found [here](/reference#prompts). +Prompt blocks have the same syntax as [prompt files](../customize/deep-dives/prompts.md). The `config.yaml` spec for `prompts` can be found [here](/reference#prompts). diff --git a/docs/docs/customization/rules.mdx b/docs/docs/customization/rules.mdx index 28ffb2fcc..6181dcef4 100644 --- a/docs/docs/customization/rules.mdx +++ b/docs/docs/customization/rules.mdx @@ -22,4 +22,4 @@ Your assistant detects rule blocks and applies the specified rules while in [Age ## Learn More -Learn more in the [rules deep dive](../advanced/deep-dives/rules.mdx), and view [`rules`](/reference#rules) in the YAML Reference for more details. +Learn more in the [rules deep dive](../customize/deep-dives/rules.mdx), and view [`rules`](/reference#rules) in the YAML Reference for more details. diff --git a/docs/docs/advanced/00-overview.mdx b/docs/docs/customize/00-overview.mdx similarity index 100% rename from docs/docs/advanced/00-overview.mdx rename to docs/docs/customize/00-overview.mdx diff --git a/docs/docs/advanced/context/_category_.json b/docs/docs/customize/context/_category_.json similarity index 100% rename from docs/docs/advanced/context/_category_.json rename to docs/docs/customize/context/_category_.json diff --git a/docs/docs/advanced/context/codebase.mdx b/docs/docs/customize/context/codebase.mdx similarity index 100% rename from docs/docs/advanced/context/codebase.mdx rename to docs/docs/customize/context/codebase.mdx diff --git a/docs/docs/advanced/context/documentation.mdx b/docs/docs/customize/context/documentation.mdx similarity index 100% rename from docs/docs/advanced/context/documentation.mdx rename to docs/docs/customize/context/documentation.mdx diff --git a/docs/docs/advanced/custom-providers.mdx b/docs/docs/customize/custom-providers.mdx similarity index 100% rename from docs/docs/advanced/custom-providers.mdx rename to docs/docs/customize/custom-providers.mdx diff --git a/docs/docs/advanced/deep-dives/_apply.md b/docs/docs/customize/deep-dives/_apply.md similarity index 100% rename from docs/docs/advanced/deep-dives/_apply.md rename to docs/docs/customize/deep-dives/_apply.md diff --git a/docs/docs/advanced/deep-dives/_category_.json b/docs/docs/customize/deep-dives/_category_.json similarity index 100% rename from docs/docs/advanced/deep-dives/_category_.json rename to docs/docs/customize/deep-dives/_category_.json diff --git a/docs/docs/advanced/deep-dives/autocomplete.mdx b/docs/docs/customize/deep-dives/autocomplete.mdx similarity index 99% rename from docs/docs/advanced/deep-dives/autocomplete.mdx rename to docs/docs/customize/deep-dives/autocomplete.mdx index 488667dbe..9ecc14d96 100644 --- a/docs/docs/advanced/deep-dives/autocomplete.mdx +++ b/docs/docs/customize/deep-dives/autocomplete.mdx @@ -91,7 +91,7 @@ Explore autocomplete model configurations on [the hub](https://hub.continue.dev/ ### Autocomplete User Settings {/* - `Use autocomplete cache`: If on, caches completions */} -The following settings can be configured for autocompletion in the IDE extension [User Settings Page](./settings.md): +The following settings can be configured for autocompletion in the IDE extension [User Settings Page](../settings.md): - `Multiline Autocompletions`: Controls multiline completions for autocomplete. Can be set to `always`, `never`, or `auto`. Defaults to `auto` - `Disable autocomplete in files`: List of comma-separated glob pattern to disable autocomplete in matching files. E.g., "\_/.md, \*/.txt" diff --git a/docs/docs/advanced/deep-dives/configuration.md b/docs/docs/customize/deep-dives/configuration.md similarity index 100% rename from docs/docs/advanced/deep-dives/configuration.md rename to docs/docs/customize/deep-dives/configuration.md diff --git a/docs/docs/advanced/deep-dives/development-data.md b/docs/docs/customize/deep-dives/development-data.md similarity index 100% rename from docs/docs/advanced/deep-dives/development-data.md rename to docs/docs/customize/deep-dives/development-data.md diff --git a/docs/docs/advanced/deep-dives/mcp.mdx b/docs/docs/customize/deep-dives/mcp.mdx similarity index 100% rename from docs/docs/advanced/deep-dives/mcp.mdx rename to docs/docs/customize/deep-dives/mcp.mdx diff --git a/docs/docs/advanced/deep-dives/prompts.md b/docs/docs/customize/deep-dives/prompts.md similarity index 100% rename from docs/docs/advanced/deep-dives/prompts.md rename to docs/docs/customize/deep-dives/prompts.md diff --git a/docs/docs/advanced/deep-dives/rules.mdx b/docs/docs/customize/deep-dives/rules.mdx similarity index 100% rename from docs/docs/advanced/deep-dives/rules.mdx rename to docs/docs/customize/deep-dives/rules.mdx diff --git a/docs/docs/advanced/deep-dives/slash-commands.mdx b/docs/docs/customize/deep-dives/slash-commands.mdx similarity index 100% rename from docs/docs/advanced/deep-dives/slash-commands.mdx rename to docs/docs/customize/deep-dives/slash-commands.mdx diff --git a/docs/docs/advanced/deep-dives/vscode-actions.md b/docs/docs/customize/deep-dives/vscode-actions.md similarity index 100% rename from docs/docs/advanced/deep-dives/vscode-actions.md rename to docs/docs/customize/deep-dives/vscode-actions.md diff --git a/docs/docs/advanced/json-reference.md b/docs/docs/customize/json-reference.md similarity index 98% rename from docs/docs/advanced/json-reference.md rename to docs/docs/customize/json-reference.md index e65aeb387..ef145c845 100644 --- a/docs/docs/advanced/json-reference.md +++ b/docs/docs/customize/json-reference.md @@ -14,7 +14,7 @@ Below are details for each property that can be set in `config.json`. The config ### `models` -Your **chat** models are defined here, which are used for [Chat](/features/chat/how-it-works), [Edit](/features/edit/how-it-works) and [VS Code actions](/advanced/deep-dives/vscode-actions). +Your **chat** models are defined here, which are used for [Chat](/features/chat/how-it-works), [Edit](/features/edit/how-it-works) and [VS Code actions](/customize/deep-dives/vscode-actions). Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json. @@ -506,7 +506,7 @@ Example ### Fully deprecated settings -Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](/advanced/deep-dives/settings). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`. +Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](/customize/settings). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`. - `allowAnonymousTelemetry`: This value will be migrated to the safest merged value (`false` if either are `false`). - `promptPath`: This value will override during migration. @@ -527,4 +527,4 @@ Some deprecated `config.json` settings are no longer stored in config and have b - `displayRawMarkdown` - `showChatScrollbar` - See [User Settings Page](/advanced/deep-dives/settings) for more information about each option. + See [User Settings Page](/customize/settings) for more information about each option. diff --git a/docs/docs/advanced/model-providers/_category_.json b/docs/docs/customize/model-providers/_category_.json similarity index 100% rename from docs/docs/advanced/model-providers/_category_.json rename to docs/docs/customize/model-providers/_category_.json diff --git a/docs/docs/advanced/model-providers/assets/watsonx2.gif b/docs/docs/customize/model-providers/assets/watsonx2.gif similarity index 100% rename from docs/docs/advanced/model-providers/assets/watsonx2.gif rename to docs/docs/customize/model-providers/assets/watsonx2.gif diff --git a/docs/docs/advanced/model-providers/llamastack.mdx b/docs/docs/customize/model-providers/llamastack.mdx similarity index 100% rename from docs/docs/advanced/model-providers/llamastack.mdx rename to docs/docs/customize/model-providers/llamastack.mdx diff --git a/docs/docs/advanced/model-providers/more/SambaNova.mdx b/docs/docs/customize/model-providers/more/SambaNova.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/SambaNova.mdx rename to docs/docs/customize/model-providers/more/SambaNova.mdx diff --git a/docs/docs/advanced/model-providers/more/_category_.json b/docs/docs/customize/model-providers/more/_category_.json similarity index 100% rename from docs/docs/advanced/model-providers/more/_category_.json rename to docs/docs/customize/model-providers/more/_category_.json diff --git a/docs/docs/advanced/model-providers/more/asksage.mdx b/docs/docs/customize/model-providers/more/asksage.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/asksage.mdx rename to docs/docs/customize/model-providers/more/asksage.mdx diff --git a/docs/docs/advanced/model-providers/more/cerebras.mdx b/docs/docs/customize/model-providers/more/cerebras.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/cerebras.mdx rename to docs/docs/customize/model-providers/more/cerebras.mdx diff --git a/docs/docs/advanced/model-providers/more/cloudflare.mdx b/docs/docs/customize/model-providers/more/cloudflare.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/cloudflare.mdx rename to docs/docs/customize/model-providers/more/cloudflare.mdx diff --git a/docs/docs/advanced/model-providers/more/cohere.mdx b/docs/docs/customize/model-providers/more/cohere.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/cohere.mdx rename to docs/docs/customize/model-providers/more/cohere.mdx diff --git a/docs/docs/advanced/model-providers/more/deepinfra.mdx b/docs/docs/customize/model-providers/more/deepinfra.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/deepinfra.mdx rename to docs/docs/customize/model-providers/more/deepinfra.mdx diff --git a/docs/docs/advanced/model-providers/more/flowise.mdx b/docs/docs/customize/model-providers/more/flowise.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/flowise.mdx rename to docs/docs/customize/model-providers/more/flowise.mdx diff --git a/docs/docs/advanced/model-providers/more/function-network.mdx b/docs/docs/customize/model-providers/more/function-network.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/function-network.mdx rename to docs/docs/customize/model-providers/more/function-network.mdx diff --git a/docs/docs/advanced/model-providers/more/groq.mdx b/docs/docs/customize/model-providers/more/groq.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/groq.mdx rename to docs/docs/customize/model-providers/more/groq.mdx diff --git a/docs/docs/advanced/model-providers/more/huggingfaceinferenceapi.mdx b/docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/huggingfaceinferenceapi.mdx rename to docs/docs/customize/model-providers/more/huggingfaceinferenceapi.mdx diff --git a/docs/docs/advanced/model-providers/more/ipex_llm.mdx b/docs/docs/customize/model-providers/more/ipex_llm.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/ipex_llm.mdx rename to docs/docs/customize/model-providers/more/ipex_llm.mdx diff --git a/docs/docs/advanced/model-providers/more/kindo.mdx b/docs/docs/customize/model-providers/more/kindo.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/kindo.mdx rename to docs/docs/customize/model-providers/more/kindo.mdx diff --git a/docs/docs/advanced/model-providers/more/llamacpp.mdx b/docs/docs/customize/model-providers/more/llamacpp.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/llamacpp.mdx rename to docs/docs/customize/model-providers/more/llamacpp.mdx diff --git a/docs/docs/advanced/model-providers/more/llamafile.mdx b/docs/docs/customize/model-providers/more/llamafile.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/llamafile.mdx rename to docs/docs/customize/model-providers/more/llamafile.mdx diff --git a/docs/docs/advanced/model-providers/more/lmstudio.mdx b/docs/docs/customize/model-providers/more/lmstudio.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/lmstudio.mdx rename to docs/docs/customize/model-providers/more/lmstudio.mdx diff --git a/docs/docs/advanced/model-providers/more/moonshot.mdx b/docs/docs/customize/model-providers/more/moonshot.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/moonshot.mdx rename to docs/docs/customize/model-providers/more/moonshot.mdx diff --git a/docs/docs/advanced/model-providers/more/morph.mdx b/docs/docs/customize/model-providers/more/morph.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/morph.mdx rename to docs/docs/customize/model-providers/more/morph.mdx diff --git a/docs/docs/advanced/model-providers/more/msty.mdx b/docs/docs/customize/model-providers/more/msty.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/msty.mdx rename to docs/docs/customize/model-providers/more/msty.mdx diff --git a/docs/docs/advanced/model-providers/more/ncompass.mdx b/docs/docs/customize/model-providers/more/ncompass.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/ncompass.mdx rename to docs/docs/customize/model-providers/more/ncompass.mdx diff --git a/docs/docs/advanced/model-providers/more/nebius.mdx b/docs/docs/customize/model-providers/more/nebius.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/nebius.mdx rename to docs/docs/customize/model-providers/more/nebius.mdx diff --git a/docs/docs/advanced/model-providers/more/novita.mdx b/docs/docs/customize/model-providers/more/novita.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/novita.mdx rename to docs/docs/customize/model-providers/more/novita.mdx diff --git a/docs/docs/advanced/model-providers/more/nvidia.mdx b/docs/docs/customize/model-providers/more/nvidia.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/nvidia.mdx rename to docs/docs/customize/model-providers/more/nvidia.mdx diff --git a/docs/docs/advanced/model-providers/more/openrouter.mdx b/docs/docs/customize/model-providers/more/openrouter.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/openrouter.mdx rename to docs/docs/customize/model-providers/more/openrouter.mdx diff --git a/docs/docs/advanced/model-providers/more/openvino_model_server.mdx b/docs/docs/customize/model-providers/more/openvino_model_server.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/openvino_model_server.mdx rename to docs/docs/customize/model-providers/more/openvino_model_server.mdx diff --git a/docs/docs/advanced/model-providers/more/ovhcloud.mdx b/docs/docs/customize/model-providers/more/ovhcloud.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/ovhcloud.mdx rename to docs/docs/customize/model-providers/more/ovhcloud.mdx diff --git a/docs/docs/advanced/model-providers/more/relace.mdx b/docs/docs/customize/model-providers/more/relace.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/relace.mdx rename to docs/docs/customize/model-providers/more/relace.mdx diff --git a/docs/docs/advanced/model-providers/more/replicatellm.mdx b/docs/docs/customize/model-providers/more/replicatellm.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/replicatellm.mdx rename to docs/docs/customize/model-providers/more/replicatellm.mdx diff --git a/docs/docs/advanced/model-providers/more/sagemaker.mdx b/docs/docs/customize/model-providers/more/sagemaker.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/sagemaker.mdx rename to docs/docs/customize/model-providers/more/sagemaker.mdx diff --git a/docs/docs/advanced/model-providers/more/scaleway.mdx b/docs/docs/customize/model-providers/more/scaleway.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/scaleway.mdx rename to docs/docs/customize/model-providers/more/scaleway.mdx diff --git a/docs/docs/advanced/model-providers/more/siliconflow.mdx b/docs/docs/customize/model-providers/more/siliconflow.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/siliconflow.mdx rename to docs/docs/customize/model-providers/more/siliconflow.mdx diff --git a/docs/docs/advanced/model-providers/more/textgenwebui.mdx b/docs/docs/customize/model-providers/more/textgenwebui.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/textgenwebui.mdx rename to docs/docs/customize/model-providers/more/textgenwebui.mdx diff --git a/docs/docs/advanced/model-providers/more/together.mdx b/docs/docs/customize/model-providers/more/together.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/together.mdx rename to docs/docs/customize/model-providers/more/together.mdx diff --git a/docs/docs/advanced/model-providers/more/venice.md b/docs/docs/customize/model-providers/more/venice.md similarity index 100% rename from docs/docs/advanced/model-providers/more/venice.md rename to docs/docs/customize/model-providers/more/venice.md diff --git a/docs/docs/advanced/model-providers/more/vllm.mdx b/docs/docs/customize/model-providers/more/vllm.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/vllm.mdx rename to docs/docs/customize/model-providers/more/vllm.mdx diff --git a/docs/docs/advanced/model-providers/more/watsonx.mdx b/docs/docs/customize/model-providers/more/watsonx.mdx similarity index 100% rename from docs/docs/advanced/model-providers/more/watsonx.mdx rename to docs/docs/customize/model-providers/more/watsonx.mdx diff --git a/docs/docs/advanced/model-providers/top-level/_category_.json b/docs/docs/customize/model-providers/top-level/_category_.json similarity index 100% rename from docs/docs/advanced/model-providers/top-level/_category_.json rename to docs/docs/customize/model-providers/top-level/_category_.json diff --git a/docs/docs/advanced/model-providers/top-level/anthropic.mdx b/docs/docs/customize/model-providers/top-level/anthropic.mdx similarity index 100% rename from docs/docs/advanced/model-providers/top-level/anthropic.mdx rename to docs/docs/customize/model-providers/top-level/anthropic.mdx diff --git a/docs/docs/advanced/model-providers/top-level/azure.mdx b/docs/docs/customize/model-providers/top-level/azure.mdx similarity index 100% rename from docs/docs/advanced/model-providers/top-level/azure.mdx rename to docs/docs/customize/model-providers/top-level/azure.mdx diff --git a/docs/docs/advanced/model-providers/top-level/bedrock.mdx b/docs/docs/customize/model-providers/top-level/bedrock.mdx similarity index 100% rename from docs/docs/advanced/model-providers/top-level/bedrock.mdx rename to docs/docs/customize/model-providers/top-level/bedrock.mdx diff --git a/docs/docs/advanced/model-providers/top-level/deepseek.mdx b/docs/docs/customize/model-providers/top-level/deepseek.mdx similarity index 100% rename from docs/docs/advanced/model-providers/top-level/deepseek.mdx rename to docs/docs/customize/model-providers/top-level/deepseek.mdx diff --git a/docs/docs/advanced/model-providers/top-level/gemini.mdx b/docs/docs/customize/model-providers/top-level/gemini.mdx similarity index 100% rename from docs/docs/advanced/model-providers/top-level/gemini.mdx rename to docs/docs/customize/model-providers/top-level/gemini.mdx diff --git a/docs/docs/advanced/model-providers/top-level/inception.mdx b/docs/docs/customize/model-providers/top-level/inception.mdx similarity index 100% rename from docs/docs/advanced/model-providers/top-level/inception.mdx rename to docs/docs/customize/model-providers/top-level/inception.mdx diff --git a/docs/docs/advanced/model-providers/top-level/mistral.mdx b/docs/docs/customize/model-providers/top-level/mistral.mdx similarity index 100% rename from docs/docs/advanced/model-providers/top-level/mistral.mdx rename to docs/docs/customize/model-providers/top-level/mistral.mdx diff --git a/docs/docs/advanced/model-providers/top-level/ollama.mdx b/docs/docs/customize/model-providers/top-level/ollama.mdx similarity index 100% rename from docs/docs/advanced/model-providers/top-level/ollama.mdx rename to docs/docs/customize/model-providers/top-level/ollama.mdx diff --git a/docs/docs/advanced/model-providers/top-level/openai.mdx b/docs/docs/customize/model-providers/top-level/openai.mdx similarity index 100% rename from docs/docs/advanced/model-providers/top-level/openai.mdx rename to docs/docs/customize/model-providers/top-level/openai.mdx diff --git a/docs/docs/advanced/model-providers/top-level/vertexai.mdx b/docs/docs/customize/model-providers/top-level/vertexai.mdx similarity index 100% rename from docs/docs/advanced/model-providers/top-level/vertexai.mdx rename to docs/docs/customize/model-providers/top-level/vertexai.mdx diff --git a/docs/docs/advanced/model-providers/top-level/xAI.mdx b/docs/docs/customize/model-providers/top-level/xAI.mdx similarity index 100% rename from docs/docs/advanced/model-providers/top-level/xAI.mdx rename to docs/docs/customize/model-providers/top-level/xAI.mdx diff --git a/docs/docs/advanced/model-roles/00-intro.mdx b/docs/docs/customize/model-roles/00-intro.mdx similarity index 100% rename from docs/docs/advanced/model-roles/00-intro.mdx rename to docs/docs/customize/model-roles/00-intro.mdx diff --git a/docs/docs/advanced/model-roles/_category_.json b/docs/docs/customize/model-roles/_category_.json similarity index 100% rename from docs/docs/advanced/model-roles/_category_.json rename to docs/docs/customize/model-roles/_category_.json diff --git a/docs/docs/advanced/model-roles/apply.mdx b/docs/docs/customize/model-roles/apply.mdx similarity index 100% rename from docs/docs/advanced/model-roles/apply.mdx rename to docs/docs/customize/model-roles/apply.mdx diff --git a/docs/docs/advanced/model-roles/autocomplete.md b/docs/docs/customize/model-roles/autocomplete.md similarity index 100% rename from docs/docs/advanced/model-roles/autocomplete.md rename to docs/docs/customize/model-roles/autocomplete.md diff --git a/docs/docs/advanced/model-roles/chat.mdx b/docs/docs/customize/model-roles/chat.mdx similarity index 100% rename from docs/docs/advanced/model-roles/chat.mdx rename to docs/docs/customize/model-roles/chat.mdx diff --git a/docs/docs/advanced/model-roles/edit.mdx b/docs/docs/customize/model-roles/edit.mdx similarity index 100% rename from docs/docs/advanced/model-roles/edit.mdx rename to docs/docs/customize/model-roles/edit.mdx diff --git a/docs/docs/advanced/model-roles/embeddings.mdx b/docs/docs/customize/model-roles/embeddings.mdx similarity index 100% rename from docs/docs/advanced/model-roles/embeddings.mdx rename to docs/docs/customize/model-roles/embeddings.mdx diff --git a/docs/docs/advanced/model-roles/reranking.mdx b/docs/docs/customize/model-roles/reranking.mdx similarity index 100% rename from docs/docs/advanced/model-roles/reranking.mdx rename to docs/docs/customize/model-roles/reranking.mdx diff --git a/docs/docs/advanced/deep-dives/settings.md b/docs/docs/customize/settings.md similarity index 100% rename from docs/docs/advanced/deep-dives/settings.md rename to docs/docs/customize/settings.md diff --git a/docs/docs/advanced/telemetry.mdx b/docs/docs/customize/telemetry.mdx similarity index 96% rename from docs/docs/advanced/telemetry.mdx rename to docs/docs/customize/telemetry.mdx index aca00a5e4..73b6f5af4 100644 --- a/docs/docs/advanced/telemetry.mdx +++ b/docs/docs/customize/telemetry.mdx @@ -26,6 +26,6 @@ The following usage information is collected and reported: ## How to Opt Out -You can disable anonymous telemetry by visiting the [User Settings Page](./deep-dives/settings.md) and toggling "Allow Anonymous Telemetry" off. +You can disable anonymous telemetry by visiting the [User Settings Page](./settings.md) and toggling "Allow Anonymous Telemetry" off. Alternatively in VS Code, you can disable telemetry through your VS Code settings by unchecking the "Continue: Telemetry Enabled" box (this will override the Settings Page settings). VS Code settings can be accessed with `File` > `Preferences` > `Settings` (or use the keyboard shortcut ctrl + , on Windows/Linux or cmd + , on macOS). diff --git a/docs/docs/advanced/yaml-migration.mdx b/docs/docs/customize/yaml-migration.mdx similarity index 98% rename from docs/docs/advanced/yaml-migration.mdx rename to docs/docs/customize/yaml-migration.mdx index 69e27c409..5ffd50e7c 100644 --- a/docs/docs/advanced/yaml-migration.mdx +++ b/docs/docs/customize/yaml-migration.mdx @@ -328,7 +328,7 @@ mcpServers: ## Deprecated configuration options -Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](./deep-dives/settings.md) (Gear Icon). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`. +Some deprecated `config.json` settings are no longer stored in config and have been moved to be editable through the [User Settings Page](./settings.md) (Gear Icon). If found in `config.json`, they will be auto-migrated to User Settings and removed from `config.json`. See the [JSON Config Reference](/reference) for more information on fully deprecated options. diff --git a/docs/docs/features/agent/how-it-works.mdx b/docs/docs/features/agent/how-it-works.mdx index 31e0b1cc2..f8690f003 100644 --- a/docs/docs/features/agent/how-it-works.mdx +++ b/docs/docs/features/agent/how-it-works.mdx @@ -35,6 +35,6 @@ Continue includes several built-in tools which provide the model access to IDE f - **Run terminal command** (`run_terminal_command`): run a terminal command from the workspace root - **Search web** (`search_web`): Perform a web search to get top results - **View diff** (`view_diff`): View the current working git diff -- **View repo map** (`view_repo_map`): request a copy of the repository map—same as the [Repo Map Context Provider](../../advanced/custom-providers#repository-map) +- **View repo map** (`view_repo_map`): request a copy of the repository map—same as the [Repo Map Context Provider](../../customize/custom-providers#repository-map) - **View subdirectory** (`view_subdirectory`): request a copy of a repo map for a specific directory within the project - **Create Rule Block** (`create_rule_block`): creates a new rule block in `.continue/rules` based on the contents of the conversation diff --git a/docs/docs/features/autocomplete/how-it-works.mdx b/docs/docs/features/autocomplete/how-it-works.mdx index 8e313e7eb..45780cc5a 100644 --- a/docs/docs/features/autocomplete/how-it-works.mdx +++ b/docs/docs/features/autocomplete/how-it-works.mdx @@ -27,4 +27,4 @@ Language models aren't perfect, but can be made much closer by adjusting their o We will also occasionally entirely filter out responses if they are bad. This is often due to extreme repetition. -You can learn more about how it works in the [Autocomplete deep dive](../../advanced/deep-dives/autocomplete.mdx). +You can learn more about how it works in the [Autocomplete deep dive](../../customize/deep-dives/autocomplete.mdx). diff --git a/docs/docs/features/chat/how-it-works.mdx b/docs/docs/features/chat/how-it-works.mdx index 6b7b04520..90465799c 100644 --- a/docs/docs/features/chat/how-it-works.mdx +++ b/docs/docs/features/chat/how-it-works.mdx @@ -56,8 +56,8 @@ View the exact prompt sent to the AI model in the [prompt logs](/troubleshooting Learn more about how context providers work: -- [Codebase Context](../../advanced/context/codebase) -- [Documentation Context](../../advanced/context/documentation) +- [Codebase Context](../../customize/context/codebase) +- [Documentation Context](../../customize/context/documentation) --- diff --git a/docs/docs/guides/build-your-own-context-provider.mdx b/docs/docs/guides/build-your-own-context-provider.mdx index ba32eae0f..fe2169b69 100644 --- a/docs/docs/guides/build-your-own-context-provider.mdx +++ b/docs/docs/guides/build-your-own-context-provider.mdx @@ -60,7 +60,7 @@ The `"options"` property can be used to send additional parameters to your endpo ``` :::info -The following methods for creating custom context providers are deprecated. We recommend using HTTP context providers, [MCP Servers](../customization/mcp-tools.mdx), and [Prompts](../advanced/deep-dives/prompts.md) where possible. +The following methods for creating custom context providers are deprecated. We recommend using HTTP context providers, [MCP Servers](../customization/mcp-tools.mdx), and [Prompts](../customize/deep-dives/prompts.md) where possible. ::: ## Using CustomContextProvider diff --git a/docs/docs/guides/custom-code-rag.mdx b/docs/docs/guides/custom-code-rag.mdx index c5e53c045..2c2fcf252 100644 --- a/docs/docs/guides/custom-code-rag.mdx +++ b/docs/docs/guides/custom-code-rag.mdx @@ -8,7 +8,7 @@ import TabItem from "@theme/TabItem"; # Custom code RAG -While Continue comes with [@Codebase](../advanced/context/codebase.mdx) out of the box, you might wish to set up your own vector database and build a custom retrieval-augmented generation (RAG) system. This can allow you to access code that is not available locally, to index code a single time across all users, or to include custom logic. In this guide, we'll walk you through the steps it takes to build this. +While Continue comes with [@Codebase](../customize/context/codebase.mdx) out of the box, you might wish to set up your own vector database and build a custom retrieval-augmented generation (RAG) system. This can allow you to access code that is not available locally, to index code a single time across all users, or to include custom logic. In this guide, we'll walk you through the steps it takes to build this. ## Step 1: Choose an embeddings model diff --git a/docs/docs/guides/running-continue-without-internet.mdx b/docs/docs/guides/running-continue-without-internet.mdx index 0591373ed..1edea6a8e 100644 --- a/docs/docs/guides/running-continue-without-internet.mdx +++ b/docs/docs/guides/running-continue-without-internet.mdx @@ -7,6 +7,6 @@ keywords: [no internet, air-gapped, local model] Continue can be run even on an air-gapped computer if you use a local model. Only a few adjustments are required for this to work. 1. Download the latest .vsix file from the [Open VSX Registry](https://open-vsx.org/extension/Continue/continue) and [install it to VS Code](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix). -2. Open the [User Settings Page](../advanced/deep-dives/settings.md) and turn off "Allow Anonymous Telemetry". This will stop Continue from attempting requests to PostHog for [anonymous telemetry](../advanced/telemetry.mdx). -3. Also in `config.json`, set the default model to a local model. You can available options [here](../advanced/model-providers/top-level/openai.mdx). +2. Open the [User Settings Page](../customize/settings.md) and turn off "Allow Anonymous Telemetry". This will stop Continue from attempting requests to PostHog for [anonymous telemetry](../customize/telemetry.mdx). +3. Also in `config.json`, set the default model to a local model. You can available options [here](../customize/model-providers/top-level/openai.mdx). 4. Restart VS Code to ensure that the changes to `config.json` or `config.yaml` take effect. diff --git a/docs/docs/hub/blocks/block-types.md b/docs/docs/hub/blocks/block-types.md index 49181d975..89cccf41c 100644 --- a/docs/docs/hub/blocks/block-types.md +++ b/docs/docs/hub/blocks/block-types.md @@ -11,7 +11,7 @@ sidebar_label: Types Models are blocks that let you specify Large Language Models (LLMs) and other deep learning models to be used for various roles in the open-source IDE extension like Chat, Autocomplete, Edit, Embed, Rerank, etc. You can explore available models on [the hub](https://hub.continue.dev/explore/models). -Continue supports [many model providers](../../advanced/model-providers/top-level/openai.mdx), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have one or more of the following roles depending on its capabilities, including `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`. Read more about roles [here](../../advanced/model-roles/00-intro.mdx). View [`models`](/reference#models) in the YAML Reference for more details. +Continue supports [many model providers](../../customize/model-providers/top-level/openai.mdx), including Anthropic, OpenAI, Gemini, Ollama, Amazon Bedrock, Azure, xAI, DeepSeek, and more. Models can have one or more of the following roles depending on its capabilities, including `chat`, `edit`, `apply`, `autocomplete`, `embed`, and `rerank`. Read more about roles [here](../../customize/model-roles/00-intro.mdx). View [`models`](/reference#models) in the YAML Reference for more details. ## Context @@ -23,28 +23,28 @@ Learn more about context providers [here](/reference#context), and check out [th Docs are blocks that point to documentation sites, which will be indexed locally and then can be referenced as context using @Docs in Chat. [Explore docs](https://hub.continue.dev/explore/docs) on the hub. -Learn more in the [@Docs deep dive](../../advanced/context/documentation.mdx), and view [`docs`](/reference#docs) in the YAML Reference for more details. +Learn more in the [@Docs deep dive](../../customize/context/documentation.mdx), and view [`docs`](/reference#docs) in the YAML Reference for more details. ## MCP Servers Model Context Protocol (MCP) is a standard way of building and sharing tools for language models. MCP Servers can be defined in `mcpServers` blocks. [Explore MCP Servers](https://hub.continue.dev/explore/mcp) on the hub. -Learn more in the [MCP deep dive](../../advanced/deep-dives/mcp.mdx), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details. +Learn more in the [MCP deep dive](../../customize/deep-dives/mcp.mdx), and view [`mcpServers`](/reference#mcpservers) in the YAML Reference for more details. ## Rules Rules blocks are instructions that your custom AI code assistant will always keep in mind - the contents of rules are inserted into the system message for all Chat requests. [Explore rules](https://hub.continue.dev/explore/rules) on the hub. -Learn more in the [rules deep dive](../../advanced/deep-dives/rules.mdx), and view [`rules`](/reference#rules) in the YAML Reference for more details. +Learn more in the [rules deep dive](../../customize/deep-dives/rules.mdx), and view [`rules`](/reference#rules) in the YAML Reference for more details. ## Prompts Prompts blocks are pre-written, reusable prompts that can be referenced at any time during chat. They are especially useful as context for repetitive and/or complex tasks. [Explore prompts](https://hub.continue.dev/explore/prompts) on the hub. -Prompt blocks have the same syntax as [prompt files](../../advanced/deep-dives/prompts.md). The `config.yaml` spec for `prompts` can be found [here](/reference#prompts). +Prompt blocks have the same syntax as [prompt files](../../customize/deep-dives/prompts.md). The `config.yaml` spec for `prompts` can be found [here](/reference#prompts). ## Data -Data blocks allow you send your development data to custom destinations of your choice. Development data can be used for a variety of purposes, including analyzing usage, gathering insights, or fine-tuning models. You can read more about development data [here](../../advanced/deep-dives/development-data.md). Explore data block examples [here](https://hub.continue.dev/explore/data). +Data blocks allow you send your development data to custom destinations of your choice. Development data can be used for a variety of purposes, including analyzing usage, gathering insights, or fine-tuning models. You can read more about development data [here](../../customize/deep-dives/development-data.md). Explore data block examples [here](https://hub.continue.dev/explore/data). Data destinations are configured in the [`data`](/reference#data) section of `config.yaml`. diff --git a/docs/docs/reference.mdx b/docs/docs/reference.mdx index 72c84d792..8f9db1347 100644 --- a/docs/docs/reference.mdx +++ b/docs/docs/reference.mdx @@ -19,7 +19,7 @@ from [the Hub](https://hub.continue.dev/explore/assistants) or locally - in your workspace in a `/.continue/assistants` folder, with the same naming convention :::info -Config YAML replaces `config.json`, which is deprecated. View the **[Migration Guide](/advanced/yaml-migration)**. +Config YAML replaces `config.json`, which is deprecated. View the **[Migration Guide](/customize/yaml-migration)**. ::: An assistant is made up of: @@ -191,9 +191,9 @@ chat, editing, and summarizing. provider and model. Supported capabilities include `tool_use` and `image_input`. - `maxStopWords`: Maximum number of stop words allowed, to avoid API errors with extensive lists. - `promptTemplates`: Can be used to override the default prompt templates for different model roles. Valid values are - `chat`, [`edit`](/advanced/model-roles/edit#prompt-templating), [ - `apply`](/advanced/model-roles/apply#prompt-templating) and [ - `autocomplete`](/advanced/model-roles/autocomplete#prompt-templating). The `chat` property must be a + `chat`, [`edit`](/customize/model-roles/edit#prompt-templating), [ + `apply`](/customize/model-roles/apply#prompt-templating) and [ + `autocomplete`](/customize/model-roles/autocomplete#prompt-templating). The `chat` property must be a valid template name, such as `llama3` or `anthropic`. - `chatOptions`: If the model includes role `chat`, these settings apply for Chat and Agent mode: - `baseSystemMessage`: Can be used to override the default system prompt for **Chat** mode. @@ -263,7 +263,7 @@ models: The `context` section defines context providers, which supply additional information or context to the language models. Each context provider can be configured with specific parameters. -More information about usage/params for each context provider can be found [here](/advanced/custom-providers) +More information about usage/params for each context provider can be found [here](/customize/custom-providers) **Properties:** @@ -400,7 +400,7 @@ mcpServers: ### `data` -Destinations to which [development data](/advanced/deep-dives/development-data) will be sent. +Destinations to which [development data](/customize/deep-dives/development-data) will be sent. **Properties:** diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 2ce94b2c6..a48bd4707 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -254,28 +254,44 @@ const config = { from: ["/install/vscode", "/install/jetbrains"], }, { - to: "/advanced/deep-dives/settings", - from: "/customize/settings", + to: "/customize/settings", + from: [ + "/advanced/deep-dives/settings", + "/customize/deep-dives/settings", + ], }, { - to: "/advanced/model-roles/intro", - from: ["/customize/model-types", "/setup/overview"], + to: "/customize/model-roles/intro", + from: [ + "/customize/model-types", + "/setup/overview", + "/advanced/model-roles/intro", + ], }, { - to: "/advanced/model-roles/embeddings", - from: "/customize/model-types/embeddings", + to: "/customize/model-roles/embeddings", + from: [ + "/customize/model-types/embeddings", + "/advanced/model-roles/embeddings", + ], }, { - to: "/advanced/model-roles/autocomplete", - from: "/customize/model-types/autocomplete", + to: "/customize/model-roles/autocomplete", + from: [ + "/customize/model-types/autocomplete", + "/advanced/model-roles/autocomplete", + ], }, { - to: "/advanced/model-roles/chat", - from: "/customize/model-types/chat", + to: "/customize/model-roles/chat", + from: ["/customize/model-types/chat", "/advanced/model-roles/chat"], }, { - to: "/advanced/model-roles/reranking", - from: "/customize/model-types/reranking", + to: "/customize/model-roles/reranking", + from: [ + "/customize/model-types/reranking", + "/advanced/model-roles/reranking", + ], }, { to: "/getting-started/overview", @@ -288,31 +304,41 @@ const config = { ], }, { - to: "/advanced/model-providers/anthropic", - from: ["/setup/select-provider", "/setup/model-providers"], + to: "/customize/model-providers/anthropic", + from: [ + "/setup/select-provider", + "/setup/model-providers", + "/advanced/model-providers/anthropic", + ], }, { - to: "/advanced/context/codebase", + to: "/customize/context/codebase", from: [ "/walkthroughs/codebase-embeddings", "/features/codebase-embeddings", "/advanced/deep-dives/codebase", + "/advanced/context/codebase", ], }, { - to: "/advanced/deep-dives/autocomplete", + to: "/customize/deep-dives/autocomplete", from: [ "/walkthroughs/tab-autocomplete", "/features/tab-autocomplete", + "/advanced/deep-dives/autocomplete", ], }, { - to: "/advanced/deep-dives/prompts", - from: ["/walkthroughs/prompt-files", "/features/prompt-files"], + to: "/customize/deep-dives/prompts", + from: [ + "/walkthroughs/prompt-files", + "/features/prompt-files", + "/advanced/deep-dives/prompts", + ], }, // TODO - actions redirects { - to: "/advanced/deep-dives/slash-commands", + to: "/customize/deep-dives/slash-commands", from: [ "/actions/how-to-use-it", "/actions/how-to-customize", @@ -322,12 +348,16 @@ const config = { "/actions/how-it-works", "/customize/slash-commands", "/customization/slash-commands", + "/advanced/deep-dives/slash-commands", ], }, { - to: "/advanced/deep-dives/vscode-actions", - from: ["/walkthroughs/quick-actions"], + to: "/customize/deep-dives/vscode-actions", + from: [ + "/walkthroughs/quick-actions", + "/advanced/deep-dives/vscode-actions", + ], }, { to: "/reference", @@ -342,148 +372,235 @@ const config = { ], }, { - to: "/advanced/custom-providers", + to: "/customize/custom-providers", from: [ "/customization/context-providers", "/advanced/context-integration/custom-providers", "/advanced/context/custom-providers", + "/advanced/custom-providers", ], }, { - to: "/advanced/deep-dives/development-data", - from: ["/development-data", "/customize/development-data"], + to: "/customize/deep-dives/development-data", + from: [ + "/development-data", + "/customize/development-data", + "/advanced/deep-dives/development-data", + ], }, { - to: "/advanced/context/documentation", + to: "/customize/context/documentation", from: [ "/features/talk-to-your-docs", "/advanced/context-integration/documentation", "/advanced/deep-dives/docs", + "/advanced/context/documentation", ], }, { - to: "/advanced/model-providers/anthropic", - from: "/reference/Model Providers/anthropicllm", + to: "/customize/model-providers/anthropic", + from: ["/reference/Model Providers/anthropicllm"], }, { - to: "/advanced/model-providers/azure", - from: "/reference/Model Providers/azure", + to: "/customize/model-providers/azure", + from: [ + "/reference/Model Providers/azure", + "/advanced/model-providers/azure", + ], }, { - to: "/advanced/model-providers/bedrock", - from: "/reference/Model Providers/bedrock", + to: "/customize/model-providers/bedrock", + from: [ + "/reference/Model Providers/bedrock", + "/advanced/model-providers/bedrock", + ], }, { - to: "/advanced/model-providers/deepseek", - from: "/reference/Model Providers/deepseek", + to: "/customize/model-providers/deepseek", + from: [ + "/reference/Model Providers/deepseek", + "/advanced/model-providers/deepseek", + ], }, { - to: "/advanced/model-providers/anthropic", + to: "/customize/model-providers/anthropic", from: "/reference/Model Providers/freetrial", }, { - to: "/advanced/model-providers/gemini", - from: "/reference/Model Providers/geminiapi", + to: "/customize/model-providers/gemini", + from: [ + "/reference/Model Providers/geminiapi", + "/advanced/model-providers/gemini", + ], }, { - to: "/advanced/model-providers/mistral", - from: "/reference/Model Providers/mistral", + to: "/customize/model-providers/mistral", + from: [ + "/reference/Model Providers/mistral", + "/advanced/model-providers/mistral", + ], }, { - to: "/advanced/model-providers/ollama", - from: "/reference/Model Providers/ollama", + to: "/customize/model-providers/ollama", + from: [ + "/reference/Model Providers/ollama", + "/advanced/model-providers/ollama", + ], }, { - to: "/advanced/model-providers/openai", - from: "/reference/Model Providers/openai", + to: "/customize/model-providers/openai", + from: [ + "/reference/Model Providers/openai", + "/advanced/model-providers/openai", + ], }, { to: "/", from: "/intro", }, { - to: "/advanced/model-providers/more/cloudflare", - from: "/reference/Model Providers/cloudflare", + to: "/customize/model-providers/more/cloudflare", + from: [ + "/reference/Model Providers/cloudflare", + "/advanced/model-providers/more/cloudflare", + ], }, { - to: "/advanced/model-providers/more/cohere", - from: "/reference/Model Providers/cohere", + to: "/customize/model-providers/more/cohere", + from: [ + "/reference/Model Providers/cohere", + "/advanced/model-providers/more/cohere", + ], }, { - to: "/advanced/model-providers/more/deepinfra", - from: "/reference/Model Providers/deepinfra", + to: "/customize/model-providers/more/deepinfra", + from: [ + "/reference/Model Providers/deepinfra", + "/advanced/model-providers/more/deepinfra", + ], }, { - to: "/advanced/model-providers/more/flowise", - from: "/reference/Model Providers/flowise", + to: "/customize/model-providers/more/flowise", + from: [ + "/reference/Model Providers/flowise", + "/advanced/model-providers/more/flowise", + ], }, { - to: "/advanced/model-providers/llamastack", + to: "/customize/model-providers/llamastack", from: "/advanced/model-providers/more/llamastack", }, { - to: "/advanced/model-providers/more/huggingfaceinferenceapi", - from: "/reference/Model Providers/huggingfaceinferenceapi", + to: "/customize/model-providers/more/huggingfaceinferenceapi", + from: [ + "/reference/Model Providers/huggingfaceinferenceapi", + "/advanced/model-providers/more/huggingfaceinferenceapi", + ], }, { - to: "/advanced/model-providers/more/ipex_llm", - from: "/reference/Model Providers/ipex_llm", + to: "/customize/model-providers/more/ipex_llm", + from: [ + "/reference/Model Providers/ipex_llm", + "/advanced/model-providers/more/ipex_llm", + ], }, { - to: "/advanced/model-providers/more/kindo", - from: "/reference/Model Providers/kindo", + to: "/customize/model-providers/more/kindo", + from: [ + "/reference/Model Providers/kindo", + "/advanced/model-providers/more/kindo", + ], }, { - to: "/advanced/model-providers/more/llamacpp", - from: "/reference/Model Providers/llamacpp", + to: "/customize/model-providers/more/llamacpp", + from: [ + "/reference/Model Providers/llamacpp", + "/advanced/model-providers/more/llamacpp", + ], }, { - to: "/advanced/model-providers/more/llamafile", - from: "/reference/Model Providers/llamafile", + to: "/customize/model-providers/more/llamafile", + from: [ + "/reference/Model Providers/llamafile", + "/advanced/model-providers/more/llamafile", + ], }, { - to: "/advanced/model-providers/more/lmstudio", - from: "/reference/Model Providers/lmstudio", + to: "/customize/model-providers/more/lmstudio", + from: [ + "/reference/Model Providers/lmstudio", + "/advanced/model-providers/more/lmstudio", + ], }, { - to: "/advanced/model-providers/more/msty", - from: "/reference/Model Providers/msty", + to: "/customize/model-providers/more/msty", + from: [ + "/reference/Model Providers/msty", + "/advanced/model-providers/more/msty", + ], }, { - to: "/advanced/model-providers/more/openrouter", - from: "/reference/Model Providers/openrouter", + to: "/customize/model-providers/more/openrouter", + from: [ + "/reference/Model Providers/openrouter", + "/advanced/model-providers/more/openrouter", + ], }, { - to: "/advanced/model-providers/more/replicatellm", - from: "/reference/Model Providers/replicatellm", + to: "/customize/model-providers/more/replicatellm", + from: [ + "/reference/Model Providers/replicatellm", + "/advanced/model-providers/more/replicatellm", + ], }, { - to: "/advanced/model-providers/more/sagemaker", - from: "/reference/Model Providers/sagemaker", + to: "/customize/model-providers/more/sagemaker", + from: [ + "/reference/Model Providers/sagemaker", + "/advanced/model-providers/more/sagemaker", + ], }, { - to: "/advanced/model-providers/more/textgenwebui", - from: "/reference/Model Providers/textgenwebui", + to: "/customize/model-providers/more/textgenwebui", + from: [ + "/reference/Model Providers/textgenwebui", + "/advanced/model-providers/more/textgenwebui", + ], }, { - to: "/advanced/model-providers/more/together", - from: "/reference/Model Providers/together", + to: "/customize/model-providers/more/together", + from: [ + "/reference/Model Providers/together", + "/advanced/model-providers/more/together", + ], }, { - to: "/advanced/model-providers/more/novita", - from: "/reference/Model Providers/novita", + to: "/customize/model-providers/more/novita", + from: [ + "/reference/Model Providers/novita", + "/advanced/model-providers/more/novita", + ], }, { - to: "/advanced/model-providers/more/vllm", - from: "/reference/Model Providers/vllm", + to: "/customize/model-providers/more/vllm", + from: [ + "/reference/Model Providers/vllm", + "/advanced/model-providers/more/vllm", + ], }, { - to: "/advanced/model-providers/more/watsonx", - from: "/reference/Model Providers/watsonx", + to: "/customize/model-providers/more/watsonx", + from: [ + "/reference/Model Providers/watsonx", + "/advanced/model-providers/more/watsonx", + ], }, { - to: "/advanced/model-providers/more/nebius", - from: "/reference/Model Providers/nebius", + to: "/customize/model-providers/more/nebius", + from: [ + "/reference/Model Providers/nebius", + "/advanced/model-providers/more/nebius", + ], }, // Sidebar items that should route directly to a subpage { @@ -507,7 +624,7 @@ const config = { from: "/getting-started", }, { - to: "/advanced/deep-dives/prompts", + to: "/customize/deep-dives/prompts", from: "/customize/deep-dives/prompt-files", }, // Migrated from netlify.toml @@ -528,16 +645,16 @@ const config = { from: "/agent/how-it-works", }, { - to: "/advanced/telemetry", - from: "/telemetry", + to: "/customize/telemetry", + from: ["/telemetry", "/advanced/telemetry"], }, { - to: "/advanced/yaml-migration", - from: "/yaml-migration", + to: "/customize/yaml-migration", + from: ["/yaml-migration", "/advanced/yaml-migration"], }, { - to: "/advanced/json-reference", - from: "/json-reference", + to: "/customize/json-reference", + from: ["/json-reference", "/advanced/json-reference"], }, ], }, diff --git a/docs/plugins/custom-llms-txt.js b/docs/plugins/custom-llms-txt.js index 30762c9c1..9674bc8b7 100644 --- a/docs/plugins/custom-llms-txt.js +++ b/docs/plugins/custom-llms-txt.js @@ -28,7 +28,7 @@ module.exports = function customLLMsTxtPlugin(context, options) { Features: [], Guides: [], Customization: [], - Advanced: [], + Customize: [], Hub: [], }; @@ -73,8 +73,8 @@ module.exports = function customLLMsTxtPlugin(context, options) { sections["Guides"].push(docInfo); } else if (cleanPath.includes("customization")) { sections["Customization"].push(docInfo); - } else if (cleanPath.includes("advanced")) { - sections["Advanced"].push(docInfo); + } else if (cleanPath.includes("customize")) { + sections["Customize"].push(docInfo); } else if (cleanPath.includes("hub")) { sections["Hub"].push(docInfo); } else if (cleanPath === "" || cleanPath === "/") { diff --git a/docs/sidebars.js b/docs/sidebars.js index f225961f4..49748072c 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -47,11 +47,11 @@ const sidebars = { }, { type: "category", - label: "Advanced", + label: "Customize", items: [ { type: "autogenerated", - dirName: "advanced", + dirName: "customize", }, ], }, diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/error/ContinueErrorService.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/error/ContinueErrorService.kt index b1fdae571..21f920ef9 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/error/ContinueErrorService.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/error/ContinueErrorService.kt @@ -21,6 +21,7 @@ class ContinueErrorService { init { Sentry.init { config -> config.dsn = SENTRY_DSN + config.environment = recognizeEnvironment() config.isSendDefaultPii = false config.setTag("ide_version", ApplicationInfo.getInstance().build.asString()) config.setTag("jcef_supported", JBCefApp.isSupported().toString()) @@ -45,6 +46,12 @@ class ContinueErrorService { private const val PLUGIN_ID = "com.github.continuedev.continueintellijextension" private const val SENTRY_DSN = "https://fe99934dcdc537d84209893a3f96a196@o4505462064283648.ingest.us.sentry.io/4508184596054016" - } + private fun recognizeEnvironment() = + when { + System.getProperty("robot-server.port") != null -> "e2e" + System.getProperty("idea.is.internal").toBoolean() -> "dev" + else -> "production" + } + } } \ No newline at end of file diff --git a/extensions/vscode/src/activation/NextEditWindowManager.ts b/extensions/vscode/src/activation/NextEditWindowManager.ts index 86168fc32..f35ede049 100644 --- a/extensions/vscode/src/activation/NextEditWindowManager.ts +++ b/extensions/vscode/src/activation/NextEditWindowManager.ts @@ -23,14 +23,30 @@ export interface TextApplier { } const SVG_CONFIG = { - stroke: "#999998", + // stroke: "#999998", + stroke: "#666667", strokeWidth: 1, textColor: "#999998", - filter: "drop-shadow(0 2px 2px rgba(0,0,0,0.2))", + purple: "rgba(112, 114, 209)", + blue: "rgba(107, 166, 205)", + green: "rgba(136 194 163)", + // filter: "drop-shadow(0 2px 2px rgba(0,0,0,0.2))", + // filter: "drop-shadow(0 2px 2px rgba(255,255,255,0.2))", + // filter: + // "drop-shadow(0 2px 4px rgb(112, 114, 209)) drop-shadow(0 4px 8px rgb(136, 194, 163)) drop-shadow(0 6px 12px rgb(107, 166, 205));", + // filter: + // "drop-shadow(0 3px 6px rgba(112, 114, 209, 0.4)) drop-shadow(0 3px 6px rgba(136, 194, 163, 0.4)) drop-shadow(0 3px 6px rgba(107, 166, 205, 0.4));", + // filter: `drop-shadow(4px 4px 0px rgba(112, 114, 209, 0.4)) + // drop-shadow(8px 8px 0px rgba(107, 166, 205, 0.3)) + // drop-shadow(12px 12px 0px rgba(136, 194, 163, 0.2));`, + filter: `drop-shadow(4px 4px 0px rgba(112, 114, 209, 0.4)) + drop-shadow(-2px 4px 0px rgba(107, 166, 205, 0.3)) + drop-shadow(4px -2px 0px rgba(136, 194, 163, 0.2)) + drop-shadow(-2px -2px 0px rgba(112, 114, 209, 0.2));`, radius: 3, leftMargin: 40, defaultText: "", - lineSpacing: 1.2, // Line spacing multiplier + lineSpacing: 1.3, // Line spacing multiplier cursorOffset: 4, // Spaces to offset from cursor get fontSize() { @@ -244,6 +260,7 @@ export class NextEditWindowManager { editor: vscode.TextEditor, currCursorPos: vscode.Position, editableRegionStartLine: number, + oldEditRangeSlice: string, newEditRangeSlice: string, diffLines: DiffLine[], ) { @@ -278,7 +295,13 @@ export class NextEditWindowManager { ); // Create and apply decoration with the text. - await this.renderTooltip(editor, currCursorPos, newEditRangeSlice); + await this.renderTooltip( + editor, + currCursorPos, + oldEditRangeSlice, + newEditRangeSlice, + editableRegionStartLine, + ); // Reserve tab and esc to either accept or reject the displayed next edit contents. await NextEditWindowManager.reserveTabAndEsc(); @@ -507,6 +530,7 @@ export class NextEditWindowManager { */ private async createCodeRender( text: string, + currLineOffsetFromTop: number, ): Promise< | { uri: vscode.Uri; dimensions: { width: number; height: number } } | undefined @@ -529,6 +553,7 @@ export class NextEditWindowManager { { imageType: "svg", }, + currLineOffsetFromTop, ); return { @@ -547,9 +572,16 @@ export class NextEditWindowManager { * @returns The decoration. */ private async createCodeRenderDecoration( - code: string, + originalCode: string, + predictedCode: string, + position: vscode.Position, + editableRegionStartLine: number, ): Promise { - const uriAndDimensions = await this.createCodeRender(code); + const currLineOffsetFromTop = position.line - editableRegionStartLine; + const uriAndDimensions = await this.createCodeRender( + predictedCode, + currLineOffsetFromTop, + ); if (!uriAndDimensions) { return undefined; } @@ -558,38 +590,30 @@ export class NextEditWindowManager { const tipWidth = dimensions.width; const tipHeight = dimensions.height; + const offsetFromTop = + (position.line - editableRegionStartLine) * SVG_CONFIG.lineHeight; + + // Set the margin-left so that it's never covering code inside the editable region. + const marginLeft = + SVG_CONFIG.getTipWidth(originalCode) - + SVG_CONFIG.getTipWidth(originalCode.split("\n")[currLineOffsetFromTop]); + + console.log(marginLeft); + console.log(SVG_CONFIG.getTipWidth(originalCode)); + console.log( + SVG_CONFIG.getTipWidth(originalCode.split("\n")[currLineOffsetFromTop]), + ); + console.log(originalCode.split("\n")[currLineOffsetFromTop]); return vscode.window.createTextEditorDecorationType({ - after: { + before: { contentIconPath: uri, - // border: `;box-shadow: inset 0 0 0 ${SVG_CONFIG.strokeWidth}px ${SVG_CONFIG.stroke}, inset 0 0 0 ${tipHeight}px ${backgroundColour}; - // border-radius: ${SVG_CONFIG.radius}px; - // filter: ${SVG_CONFIG.filter}`, - // width: `${tipWidth}px`, - // height: `${tipHeight}px`, - // border: `transparent; position: absolute; z-index: 1000; - // box-shadow: inset 0 0 0 ${SVG_CONFIG.strokeWidth}px ${SVG_CONFIG.stroke}, - // inset 0 0 0 ${tipHeight}px ${backgroundColour}; - // border-radius: ${SVG_CONFIG.radius}px; - // filter: ${SVG_CONFIG.filter}; - // margin-left: ${SVG_CONFIG.cursorOffset * 8}px;`, - border: `transparent; position: absolute; z-index: 1000; - box-shadow: inset 0 0 0 ${SVG_CONFIG.strokeWidth}px ${SVG_CONFIG.stroke}, inset 0 0 0 ${tipHeight}px; - filter: ${SVG_CONFIG.filter}; - border-radius: ${SVG_CONFIG.radius}px; - margin-left: ${SVG_CONFIG.cursorOffset * 8}px;`, - // border: `solid 1px white; position: absolute; z-index: 1000; - // margin-left: ${SVG_CONFIG.cursorOffset * 8}px; - // margin-top: 0em;`, - // border: `solid 1px white; position: absolute; z-index: 1000; - // margin: 0em; padding: 0em; - // margin-left: ${SVG_CONFIG.cursorOffset * 8}px; - // margin-top: 0em;`, + border: `transparent; position: absolute; z-index: 2147483647; + filter: ${SVG_CONFIG.filter}; + margin-top: ${-1 * offsetFromTop}px; + margin-left: ${marginLeft}px;`, width: `${tipWidth}px`, height: `${tipHeight}px`, - // textDecoration: `none; transform: translateY(-100%);`, }, - // Set a negative margin to make the decoration float if it starts to displace text. - // Also use absolute positioning. rangeBehavior: vscode.DecorationRangeBehavior.ClosedClosed, }); } @@ -684,16 +708,23 @@ export class NextEditWindowManager { private async renderTooltip( editor: vscode.TextEditor, position: vscode.Position, - text: string, + originalCode: string, + predictedCode: string, + editableRegionStartLine: number, ) { console.log("renderTooltip"); // Capture document version to detect changes. const docVersion = editor.document.version; // Create a new decoration with the text. - const decoration = await this.createCodeRenderDecoration(text); + const decoration = await this.createCodeRenderDecoration( + originalCode, + predictedCode, + position, + editableRegionStartLine, + ); if (!decoration) { - console.error("Failed to create decoration for text:", text); + console.error("Failed to create decoration for text:", predictedCode); return; } diff --git a/extensions/vscode/src/autocomplete/completionProvider.ts b/extensions/vscode/src/autocomplete/completionProvider.ts index 3f3995878..88131a3e8 100644 --- a/extensions/vscode/src/autocomplete/completionProvider.ts +++ b/extensions/vscode/src/autocomplete/completionProvider.ts @@ -420,6 +420,7 @@ export class ContinueCompletionProvider editor, currCursorPos, editableRegionStartLine, + oldEditRangeSlice, newEditRangeSlice, diffLines, ); diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 700e5352e..09a3884b7 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -33,6 +33,7 @@ import { selectCurrentToolCallApplyState, } from "../../redux/selectors/selectCurrentToolCall"; import { + cancelToolCall, newSession, updateToolCallOutput, } from "../../redux/slices/sessionSlice"; @@ -108,7 +109,6 @@ export function Chat() { (state) => state.config.config.ui?.showChatScrollbar, ); const codeToEdit = useAppSelector((state) => state.editModeState.codeToEdit); - const toolCallState = useAppSelector(selectCurrentToolCall); const mode = useAppSelector((store) => store.session.mode); const isInEdit = useAppSelector((store) => store.session.isInEdit); @@ -147,6 +147,7 @@ export function Chat() { isStreaming, ); + const currentToolCallState = useAppSelector(selectCurrentToolCall); const currentToolCallApplyState = useAppSelector( selectCurrentToolCallApplyState, ); @@ -158,20 +159,19 @@ export function Chat() { index?: number, editorToClearOnSend?: Editor, ) => { - if (toolCallState?.status === "generated") { - return console.error( - "Cannot submit message while awaiting tool confirmation", + if (currentToolCallState) { + dispatch( + cancelToolCall({ + toolCallId: currentToolCallState.toolCallId, + }), ); } if ( currentToolCallApplyState && currentToolCallApplyState.status !== "closed" ) { - return console.error( - "Cannot submit message while awaiting tool call apply", - ); + ideMessenger.post("rejectDiff", currentToolCallApplyState); } - const model = isInEdit ? (selectedModels?.edit ?? selectedModels?.chat) : selectedModels?.chat; @@ -241,7 +241,7 @@ export function Chat() { mode, isInEdit, codeToEdit, - toolCallState, + currentToolCallState, currentToolCallApplyState, ], ); diff --git a/gui/src/pages/gui/ToolCallDiv/ToolCall.tsx b/gui/src/pages/gui/ToolCallDiv/ToolCall.tsx index 956ef791b..c0e6ddba8 100644 --- a/gui/src/pages/gui/ToolCallDiv/ToolCall.tsx +++ b/gui/src/pages/gui/ToolCallDiv/ToolCall.tsx @@ -27,7 +27,7 @@ export function ToolCallDisplay({ return ( <> -
+