Merge branch 'main' into bdougie/docs-mintlify
This commit is contained in:
commit
dd35ee29a3
106 changed files with 549 additions and 235 deletions
|
|
@ -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<string> {
|
||||
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<Buffer> {
|
||||
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 = `<svg xmlns="http://www.w3.org/2000/svg" width="${dimensions.width}" height="${dimensions.height}">
|
||||
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${dimensions.width}" height="${dimensions.height}" shape-rendering="crispEdges">
|
||||
<style>
|
||||
:root {
|
||||
--purple: rgb(112, 114, 209);
|
||||
--green: rgb(136, 194, 163);
|
||||
--blue: rgb(107, 166, 205);
|
||||
}
|
||||
</style>
|
||||
<g>
|
||||
<rect width="${dimensions.width}" height="${dimensions.height}" fill="${backgroundColor}" stroke="${this.editorForeground}" stroke-width="1" />
|
||||
<rect x="0" y="0" rx="10" ry="10" width="${dimensions.width}" height="${dimensions.height}" fill="${this.editorBackground}" shape-rendering="crispEdges" />
|
||||
${lineBackgrounds}
|
||||
${guts}
|
||||
</g>
|
||||
</svg>`;
|
||||
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 `<tspan xml:space="preserve"${fill}>${escapeForSVG(content)}</tspan>`;
|
||||
})
|
||||
.join("");
|
||||
|
||||
const y = (index + 1) * lineHeight;
|
||||
return `<text x="0" y="${y}" font-family="${fontFamily}" font-size="${fontSize.toString()}" xml:space="preserve">${spans}</text>`;
|
||||
// Typography notes:
|
||||
// Each line of code is a <text> inside a <rect>.
|
||||
// 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 `<text x="0" y="${y}" font-family="${fontFamily}" font-size="${fontSize.toString()}" xml:space="preserve" dominant-baseline="central" shape-rendering="crispEdges">${spans}</text>`;
|
||||
});
|
||||
|
||||
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
|
||||
? `<path d="M ${0} ${y + lineHeight}
|
||||
L ${0} ${y + radius}
|
||||
Q ${0} ${y} ${radius} ${y}
|
||||
L ${dimensions.width - radius} ${y}
|
||||
Q ${dimensions.width} ${y} ${dimensions.width} ${y + radius}
|
||||
L ${dimensions.width} ${y + lineHeight}
|
||||
Z"
|
||||
fill="${bgColor}" />`
|
||||
: isLast
|
||||
? `<path d="M ${0} ${y}
|
||||
L ${0} ${y + lineHeight - radius}
|
||||
Q ${0} ${y + lineHeight} ${radius} ${y + lineHeight}
|
||||
L ${dimensions.width - radius} ${y + lineHeight}
|
||||
Q ${dimensions.width} ${y + lineHeight} ${dimensions.width} ${y + lineHeight - 10}
|
||||
L ${dimensions.width} ${y}
|
||||
Z"
|
||||
fill="${bgColor}" />`
|
||||
: `<rect x="0" y="${y}" rx="${radius}" ry="${radius}" width="100%" height="${lineHeight}" fill="${bgColor}" shape-rendering="crispEdges" />`;
|
||||
})
|
||||
.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<DataUri> {
|
||||
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")}`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -96,6 +96,10 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => 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;
|
||||
|
|
|
|||
89
core/package-lock.json
generated
89
core/package-lock.json
generated
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
|||

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

|
||||
|
||||
## 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.
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
@ -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.
|
||||
|
Before Width: | Height: | Size: 858 KiB After Width: | Height: | Size: 858 KiB |
|
|
@ -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 <kbd>ctrl</kbd> + <kbd>,</kbd> on Windows/Linux or <kbd>cmd</kbd> + <kbd>,</kbd> on macOS).
|
||||
|
|
@ -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.
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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).
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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`.
|
||||
|
|
|
|||
|
|
@ -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:**
|
||||
|
||||
|
|
|
|||
|
|
@ -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"],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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 === "/") {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue