mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-19 10:02:04 +08:00
Merge branch 'dev' into feat/suggestions-after-plan-end
This commit is contained in:
@@ -334,6 +334,7 @@
|
||||
"opentui-spinner": "0.0.6",
|
||||
"partial-json": "0.1.7",
|
||||
"remeda": "catalog:",
|
||||
"simple-git": "3.31.1",
|
||||
"solid-js": "catalog:",
|
||||
"strip-ansi": "7.1.2",
|
||||
"tree-sitter-bash": "0.25.0",
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"nodeModules": {
|
||||
"x86_64-linux": "sha256-fj1ktaxzXPVZux/28NKWF9iMi//HBEO5rFivjpqugSI=",
|
||||
"aarch64-linux": "sha256-c/BBYlA3DsO9nfc5pEtD4P1uQuQvs8pZrwDj2eiliIE=",
|
||||
"aarch64-darwin": "sha256-pWJd/x5Yx7xP+kY0yrF1py3MiJZCs2gPp6Rwe/xCSzc=",
|
||||
"x86_64-darwin": "sha256-WgYhTWgGP/z14vA+eLnDwflWiKx6iDX9DUM1Bqw8CI0="
|
||||
"x86_64-linux": "sha256-BEhWiPWkXCUblpkXVAIDmWndNbuulgfaDRO80dvssPY=",
|
||||
"aarch64-linux": "sha256-8ttezrn/CuIJDoAS1SZvq0laoQR6kBcrvv615uCxCJg=",
|
||||
"aarch64-darwin": "sha256-krlzO1o/VVOC15hneG9W1dgp3Od96QFqZ0wKnjt89c4=",
|
||||
"x86_64-darwin": "sha256-WjIaEu3jIQTqdWLQ29nacIraxsxZp5YMvzYC0j+pBMY="
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,8 +132,7 @@ export const dict = {
|
||||
"provider.connect.oauth.code.invalid": "رمز التفويض غير صالح",
|
||||
"provider.connect.oauth.auto.visit.prefix": "قم بزيارة ",
|
||||
"provider.connect.oauth.auto.visit.link": "هذا الرابط",
|
||||
"provider.connect.oauth.auto.visit.suffix":
|
||||
" وأدخل الرمز أدناه لتوصيل حسابك واستخدام نماذج {{provider}} في Kilo.",
|
||||
"provider.connect.oauth.auto.visit.suffix": " وأدخل الرمز أدناه لتوصيل حسابك واستخدام نماذج {{provider}} في Kilo.",
|
||||
"provider.connect.oauth.auto.confirmationCode": "رمز التأكيد",
|
||||
"provider.connect.toast.connected.title": "تم توصيل {{provider}}",
|
||||
"provider.connect.toast.connected.description": "نماذج {{provider}} متاحة الآن للاستخدام.",
|
||||
|
||||
@@ -385,8 +385,7 @@ export const dict = {
|
||||
"toast.session.unshare.failed.description": "Une erreur s'est produite lors de l'annulation du partage de la session",
|
||||
"toast.session.listFailed.title": "Échec du chargement des sessions pour {{project}}",
|
||||
"toast.update.title": "Mise à jour disponible",
|
||||
"toast.update.description":
|
||||
"Une nouvelle version d'Kilo ({{version}}) est maintenant disponible pour installation.",
|
||||
"toast.update.description": "Une nouvelle version d'Kilo ({{version}}) est maintenant disponible pour installation.",
|
||||
"toast.update.action.installRestart": "Installer et redémarrer",
|
||||
"toast.update.action.notYet": "Pas encore",
|
||||
"error.page.title": "Quelque chose s'est mal passé",
|
||||
@@ -517,8 +516,7 @@ export const dict = {
|
||||
"sidebar.workspaces.enable": "Activer les espaces de travail",
|
||||
"sidebar.workspaces.disable": "Désactiver les espaces de travail",
|
||||
"sidebar.gettingStarted.title": "Commencer",
|
||||
"sidebar.gettingStarted.line1":
|
||||
"Kilo inclut des modèles gratuits pour que vous puissiez commencer immédiatement.",
|
||||
"sidebar.gettingStarted.line1": "Kilo inclut des modèles gratuits pour que vous puissiez commencer immédiatement.",
|
||||
"sidebar.gettingStarted.line2":
|
||||
"Connectez n'importe quel fournisseur pour utiliser des modèles, y compris Claude, GPT, Gemini etc.",
|
||||
"sidebar.project.recentSessions": "Sessions récentes",
|
||||
|
||||
@@ -144,8 +144,7 @@ export const dict = {
|
||||
"provider.connect.oauth.code.invalid": "รหัสการอนุญาตไม่ถูกต้อง",
|
||||
"provider.connect.oauth.auto.visit.prefix": "เยี่ยมชม ",
|
||||
"provider.connect.oauth.auto.visit.link": "ลิงก์นี้",
|
||||
"provider.connect.oauth.auto.visit.suffix":
|
||||
" และป้อนรหัสด้านล่างเพื่อเชื่อมต่อบัญชีและใช้โมเดล {{provider}} ใน Kilo",
|
||||
"provider.connect.oauth.auto.visit.suffix": " และป้อนรหัสด้านล่างเพื่อเชื่อมต่อบัญชีและใช้โมเดล {{provider}} ใน Kilo",
|
||||
"provider.connect.oauth.auto.confirmationCode": "รหัสยืนยัน",
|
||||
"provider.connect.toast.connected.title": "{{provider}} ที่เชื่อมต่อแล้ว",
|
||||
"provider.connect.toast.connected.description": "โมเดล {{provider}} พร้อมใช้งานแล้ว",
|
||||
|
||||
@@ -145,8 +145,7 @@ export const dict = {
|
||||
"provider.connect.oauth.code.invalid": "授權碼無效",
|
||||
"provider.connect.oauth.auto.visit.prefix": "造訪 ",
|
||||
"provider.connect.oauth.auto.visit.link": "此連結",
|
||||
"provider.connect.oauth.auto.visit.suffix":
|
||||
" 並輸入以下程式碼,以連線你的帳戶並在 Kilo 中使用 {{provider}} 模型。",
|
||||
"provider.connect.oauth.auto.visit.suffix": " 並輸入以下程式碼,以連線你的帳戶並在 Kilo 中使用 {{provider}} 模型。",
|
||||
"provider.connect.oauth.auto.confirmationCode": "確認碼",
|
||||
"provider.connect.toast.connected.title": "{{provider}} 已連線",
|
||||
"provider.connect.toast.connected.description": "現在可以使用 {{provider}} 模型了。",
|
||||
|
||||
@@ -32,9 +32,7 @@ export const ProjectIcon = (props: { project: LocalProject; class?: string; noti
|
||||
<div class="size-full rounded overflow-clip">
|
||||
<Avatar
|
||||
fallback={name()}
|
||||
src={
|
||||
props.project.id === KILO_PROJECT_ID ? "https://kilo.ai/favicon.svg" : props.project.icon?.override
|
||||
}
|
||||
src={props.project.id === KILO_PROJECT_ID ? "https://kilo.ai/favicon.svg" : props.project.icon?.override}
|
||||
{...getAvatarColors(props.project.icon?.color)}
|
||||
class="size-full rounded"
|
||||
classList={{ "badge-mask": unseenCount() > 0 && props.notify }}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"context7": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@upstash/context7-mcp"],
|
||||
"env": { "DEFAULT_MINIMUM_TOKENS": "" },
|
||||
"alwaysAllow": ["resolve-library-id", "query-docs"],
|
||||
"disabled": true
|
||||
}
|
||||
}
|
||||
"mcpServers": {
|
||||
"context7": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@upstash/context7-mcp"],
|
||||
"env": { "DEFAULT_MINIMUM_TOKENS": "" },
|
||||
"alwaysAllow": ["resolve-library-id", "query-docs"],
|
||||
"disabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,9 +72,9 @@ Use the Markdoc codicon tag format:
|
||||
|
||||
1. Create your page in the appropriate directory under `pages/`
|
||||
2. **Always update navigation**: Add the page to the corresponding navigation file in `lib/nav/`
|
||||
- Each section has its own nav file (e.g., `getting-started.ts`, `code-with-ai.ts`, `ai-providers.ts`)
|
||||
- Navigation structure is exported from `lib/nav/index.ts`
|
||||
- See `lib/types.ts` for the `NavSection` and `NavLink` interfaces
|
||||
- Each section has its own nav file (e.g., `getting-started.ts`, `code-with-ai.ts`, `ai-providers.ts`)
|
||||
- Navigation structure is exported from `lib/nav/index.ts`
|
||||
- See `lib/types.ts` for the `NavSection` and `NavLink` interfaces
|
||||
|
||||
### Removing or Moving Pages
|
||||
|
||||
@@ -82,13 +82,13 @@ Use the Markdoc codicon tag format:
|
||||
|
||||
1. Add a redirect entry to `previous-docs-redirects.js`
|
||||
2. Redirect format:
|
||||
```javascript
|
||||
{
|
||||
source: "/docs/old-path",
|
||||
destination: "/docs/new-path",
|
||||
basePath: false,
|
||||
permanent: true,
|
||||
}
|
||||
```
|
||||
```javascript
|
||||
{
|
||||
source: "/docs/old-path",
|
||||
destination: "/docs/new-path",
|
||||
basePath: false,
|
||||
permanent: true,
|
||||
}
|
||||
```
|
||||
3. Update the navigation file to remove or update the link
|
||||
4. Redirects are loaded in `next.config.js`
|
||||
|
||||
@@ -10,128 +10,126 @@ import { expect, describe, it } from "vitest"
|
||||
import redirects from "../previous-docs-redirects.js"
|
||||
|
||||
interface Redirect {
|
||||
source: string
|
||||
destination: string
|
||||
basePath?: boolean
|
||||
permanent?: boolean
|
||||
source: string
|
||||
destination: string
|
||||
basePath?: boolean
|
||||
permanent?: boolean
|
||||
}
|
||||
|
||||
describe("previous-docs-redirects", () => {
|
||||
describe("direct loop detection", () => {
|
||||
it("should not have any redirects where source equals destination", () => {
|
||||
const directLoops: Redirect[] = []
|
||||
describe("direct loop detection", () => {
|
||||
it("should not have any redirects where source equals destination", () => {
|
||||
const directLoops: Redirect[] = []
|
||||
|
||||
for (const redirect of redirects as Redirect[]) {
|
||||
if (redirect.source === redirect.destination) {
|
||||
directLoops.push(redirect)
|
||||
}
|
||||
}
|
||||
for (const redirect of redirects as Redirect[]) {
|
||||
if (redirect.source === redirect.destination) {
|
||||
directLoops.push(redirect)
|
||||
}
|
||||
}
|
||||
|
||||
if (directLoops.length > 0) {
|
||||
const loopDetails = directLoops.map((r) => ` - "${r.source}" redirects to itself`).join("\n")
|
||||
expect.fail(`Found ${directLoops.length} direct redirect loop(s):\n${loopDetails}`)
|
||||
}
|
||||
})
|
||||
})
|
||||
if (directLoops.length > 0) {
|
||||
const loopDetails = directLoops.map((r) => ` - "${r.source}" redirects to itself`).join("\n")
|
||||
expect.fail(`Found ${directLoops.length} direct redirect loop(s):\n${loopDetails}`)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
describe("indirect loop detection", () => {
|
||||
it("should not have any redirect chains that form a cycle", () => {
|
||||
// Build a map of source -> destination for quick lookup
|
||||
// Note: We only consider exact path matches, not wildcard patterns like :path*
|
||||
// Also skip direct loops (source === destination) as they're caught by the direct loop test
|
||||
const redirectMap = new Map<string, string>()
|
||||
describe("indirect loop detection", () => {
|
||||
it("should not have any redirect chains that form a cycle", () => {
|
||||
// Build a map of source -> destination for quick lookup
|
||||
// Note: We only consider exact path matches, not wildcard patterns like :path*
|
||||
// Also skip direct loops (source === destination) as they're caught by the direct loop test
|
||||
const redirectMap = new Map<string, string>()
|
||||
|
||||
for (const redirect of redirects as Redirect[]) {
|
||||
// Skip wildcard redirects as they don't form exact chains
|
||||
// Skip direct loops as they're caught by the direct loop test
|
||||
if (
|
||||
!redirect.source.includes(":") &&
|
||||
!redirect.source.includes("*") &&
|
||||
redirect.source !== redirect.destination
|
||||
) {
|
||||
redirectMap.set(redirect.source, redirect.destination)
|
||||
}
|
||||
}
|
||||
for (const redirect of redirects as Redirect[]) {
|
||||
// Skip wildcard redirects as they don't form exact chains
|
||||
// Skip direct loops as they're caught by the direct loop test
|
||||
if (
|
||||
!redirect.source.includes(":") &&
|
||||
!redirect.source.includes("*") &&
|
||||
redirect.source !== redirect.destination
|
||||
) {
|
||||
redirectMap.set(redirect.source, redirect.destination)
|
||||
}
|
||||
}
|
||||
|
||||
const cycles: string[][] = []
|
||||
const cycles: string[][] = []
|
||||
|
||||
/**
|
||||
* Detects if following redirects from a starting path leads back to any path in the chain.
|
||||
* Uses a visited set to track the current chain and detect cycles.
|
||||
*/
|
||||
function detectCycle(startPath: string): string[] | null {
|
||||
const visited = new Set<string>()
|
||||
const chain: string[] = [startPath]
|
||||
let currentPath = startPath
|
||||
/**
|
||||
* Detects if following redirects from a starting path leads back to any path in the chain.
|
||||
* Uses a visited set to track the current chain and detect cycles.
|
||||
*/
|
||||
function detectCycle(startPath: string): string[] | null {
|
||||
const visited = new Set<string>()
|
||||
const chain: string[] = [startPath]
|
||||
let currentPath = startPath
|
||||
|
||||
while (redirectMap.has(currentPath)) {
|
||||
const nextPath = redirectMap.get(currentPath)!
|
||||
while (redirectMap.has(currentPath)) {
|
||||
const nextPath = redirectMap.get(currentPath)!
|
||||
|
||||
if (visited.has(nextPath)) {
|
||||
// Found a cycle - return the chain from the cycle start
|
||||
const cycleStartIndex = chain.indexOf(nextPath)
|
||||
if (cycleStartIndex !== -1) {
|
||||
return [...chain.slice(cycleStartIndex), nextPath]
|
||||
}
|
||||
return null
|
||||
}
|
||||
if (visited.has(nextPath)) {
|
||||
// Found a cycle - return the chain from the cycle start
|
||||
const cycleStartIndex = chain.indexOf(nextPath)
|
||||
if (cycleStartIndex !== -1) {
|
||||
return [...chain.slice(cycleStartIndex), nextPath]
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
visited.add(currentPath)
|
||||
chain.push(nextPath)
|
||||
currentPath = nextPath
|
||||
}
|
||||
visited.add(currentPath)
|
||||
chain.push(nextPath)
|
||||
currentPath = nextPath
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
// Check each redirect source for potential cycles
|
||||
for (const source of redirectMap.keys()) {
|
||||
const cycle = detectCycle(source)
|
||||
if (cycle) {
|
||||
// Avoid duplicate cycle reports by checking if we've already found this cycle
|
||||
const cycleKey = [...cycle].sort().join(" -> ")
|
||||
const isDuplicate = cycles.some(
|
||||
(existingCycle) => [...existingCycle].sort().join(" -> ") === cycleKey,
|
||||
)
|
||||
if (!isDuplicate) {
|
||||
cycles.push(cycle)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check each redirect source for potential cycles
|
||||
for (const source of redirectMap.keys()) {
|
||||
const cycle = detectCycle(source)
|
||||
if (cycle) {
|
||||
// Avoid duplicate cycle reports by checking if we've already found this cycle
|
||||
const cycleKey = [...cycle].sort().join(" -> ")
|
||||
const isDuplicate = cycles.some((existingCycle) => [...existingCycle].sort().join(" -> ") === cycleKey)
|
||||
if (!isDuplicate) {
|
||||
cycles.push(cycle)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cycles.length > 0) {
|
||||
const cycleDetails = cycles.map((cycle) => ` - ${cycle.join(" → ")}`).join("\n")
|
||||
expect.fail(`Found ${cycles.length} indirect redirect cycle(s):\n${cycleDetails}`)
|
||||
}
|
||||
})
|
||||
})
|
||||
if (cycles.length > 0) {
|
||||
const cycleDetails = cycles.map((cycle) => ` - ${cycle.join(" → ")}`).join("\n")
|
||||
expect.fail(`Found ${cycles.length} indirect redirect cycle(s):\n${cycleDetails}`)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
describe("redirect structure validation", () => {
|
||||
it("should have valid redirect objects with required properties", () => {
|
||||
const invalidRedirects: { index: number; issues: string[] }[] = []
|
||||
describe("redirect structure validation", () => {
|
||||
it("should have valid redirect objects with required properties", () => {
|
||||
const invalidRedirects: { index: number; issues: string[] }[] = []
|
||||
|
||||
;(redirects as Redirect[]).forEach((redirect, index) => {
|
||||
const issues: string[] = []
|
||||
;(redirects as Redirect[]).forEach((redirect, index) => {
|
||||
const issues: string[] = []
|
||||
|
||||
if (typeof redirect.source !== "string" || redirect.source.trim() === "") {
|
||||
issues.push("missing or invalid 'source' property")
|
||||
}
|
||||
if (typeof redirect.source !== "string" || redirect.source.trim() === "") {
|
||||
issues.push("missing or invalid 'source' property")
|
||||
}
|
||||
|
||||
if (typeof redirect.destination !== "string" || redirect.destination.trim() === "") {
|
||||
issues.push("missing or invalid 'destination' property")
|
||||
}
|
||||
if (typeof redirect.destination !== "string" || redirect.destination.trim() === "") {
|
||||
issues.push("missing or invalid 'destination' property")
|
||||
}
|
||||
|
||||
if (issues.length > 0) {
|
||||
invalidRedirects.push({ index, issues })
|
||||
}
|
||||
})
|
||||
if (issues.length > 0) {
|
||||
invalidRedirects.push({ index, issues })
|
||||
}
|
||||
})
|
||||
|
||||
if (invalidRedirects.length > 0) {
|
||||
const details = invalidRedirects
|
||||
.map((r) => ` - Redirect at index ${r.index}: ${r.issues.join(", ")}`)
|
||||
.join("\n")
|
||||
expect.fail(`Found ${invalidRedirects.length} invalid redirect(s):\n${details}`)
|
||||
}
|
||||
})
|
||||
})
|
||||
if (invalidRedirects.length > 0) {
|
||||
const details = invalidRedirects
|
||||
.map((r) => ` - Redirect at index ${r.index}: ${r.issues.join(", ")}`)
|
||||
.join("\n")
|
||||
expect.fail(`Found ${invalidRedirects.length} invalid redirect(s):\n${details}`)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -3,113 +3,112 @@ import * as React from "react"
|
||||
type CalloutType = "generic" | "note" | "tip" | "info" | "warning" | "danger"
|
||||
|
||||
interface CalloutProps {
|
||||
type?: CalloutType
|
||||
title?: string
|
||||
collapsed?: boolean
|
||||
children: React.ReactNode
|
||||
type?: CalloutType
|
||||
title?: string
|
||||
collapsed?: boolean
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
const typeConfig: Record<
|
||||
CalloutType,
|
||||
{
|
||||
icon: string | null
|
||||
defaultTitle: string | null
|
||||
borderColor: string
|
||||
bgColor: string
|
||||
titleColor: string
|
||||
iconColor: string
|
||||
}
|
||||
CalloutType,
|
||||
{
|
||||
icon: string | null
|
||||
defaultTitle: string | null
|
||||
borderColor: string
|
||||
bgColor: string
|
||||
titleColor: string
|
||||
iconColor: string
|
||||
}
|
||||
> = {
|
||||
generic: {
|
||||
icon: null,
|
||||
defaultTitle: null,
|
||||
borderColor: "border-l-gray-300 dark:border-l-gray-600",
|
||||
bgColor: "bg-gray-50 dark:bg-gray-800/50",
|
||||
titleColor: "text-gray-700 dark:text-gray-300",
|
||||
iconColor: "text-gray-400",
|
||||
},
|
||||
note: {
|
||||
icon: "📝",
|
||||
defaultTitle: "Note",
|
||||
borderColor: "border-l-gray-500",
|
||||
bgColor: "bg-gray-50 dark:bg-gray-800/50",
|
||||
titleColor: "text-gray-700 dark:text-gray-300",
|
||||
iconColor: "text-gray-500",
|
||||
},
|
||||
tip: {
|
||||
icon: "💡",
|
||||
defaultTitle: "Tip",
|
||||
borderColor: "border-l-green-500",
|
||||
bgColor: "bg-green-50 dark:bg-green-900/20",
|
||||
titleColor: "text-green-700 dark:text-green-400",
|
||||
iconColor: "text-green-500",
|
||||
},
|
||||
info: {
|
||||
icon: "ℹ️",
|
||||
defaultTitle: "Info",
|
||||
borderColor: "border-l-blue-500",
|
||||
bgColor: "bg-blue-50 dark:bg-blue-900/20",
|
||||
titleColor: "text-blue-700 dark:text-blue-400",
|
||||
iconColor: "text-blue-500",
|
||||
},
|
||||
warning: {
|
||||
icon: "⚠️",
|
||||
defaultTitle: "Warning",
|
||||
borderColor: "border-l-yellow-500",
|
||||
bgColor: "bg-yellow-50 dark:bg-yellow-900/20",
|
||||
titleColor: "text-yellow-700 dark:text-yellow-400",
|
||||
iconColor: "text-yellow-500",
|
||||
},
|
||||
danger: {
|
||||
icon: "🚨",
|
||||
defaultTitle: "Danger",
|
||||
borderColor: "border-l-red-500",
|
||||
bgColor: "bg-red-50 dark:bg-red-900/20",
|
||||
titleColor: "text-red-700 dark:text-red-400",
|
||||
iconColor: "text-red-500",
|
||||
},
|
||||
generic: {
|
||||
icon: null,
|
||||
defaultTitle: null,
|
||||
borderColor: "border-l-gray-300 dark:border-l-gray-600",
|
||||
bgColor: "bg-gray-50 dark:bg-gray-800/50",
|
||||
titleColor: "text-gray-700 dark:text-gray-300",
|
||||
iconColor: "text-gray-400",
|
||||
},
|
||||
note: {
|
||||
icon: "📝",
|
||||
defaultTitle: "Note",
|
||||
borderColor: "border-l-gray-500",
|
||||
bgColor: "bg-gray-50 dark:bg-gray-800/50",
|
||||
titleColor: "text-gray-700 dark:text-gray-300",
|
||||
iconColor: "text-gray-500",
|
||||
},
|
||||
tip: {
|
||||
icon: "💡",
|
||||
defaultTitle: "Tip",
|
||||
borderColor: "border-l-green-500",
|
||||
bgColor: "bg-green-50 dark:bg-green-900/20",
|
||||
titleColor: "text-green-700 dark:text-green-400",
|
||||
iconColor: "text-green-500",
|
||||
},
|
||||
info: {
|
||||
icon: "ℹ️",
|
||||
defaultTitle: "Info",
|
||||
borderColor: "border-l-blue-500",
|
||||
bgColor: "bg-blue-50 dark:bg-blue-900/20",
|
||||
titleColor: "text-blue-700 dark:text-blue-400",
|
||||
iconColor: "text-blue-500",
|
||||
},
|
||||
warning: {
|
||||
icon: "⚠️",
|
||||
defaultTitle: "Warning",
|
||||
borderColor: "border-l-yellow-500",
|
||||
bgColor: "bg-yellow-50 dark:bg-yellow-900/20",
|
||||
titleColor: "text-yellow-700 dark:text-yellow-400",
|
||||
iconColor: "text-yellow-500",
|
||||
},
|
||||
danger: {
|
||||
icon: "🚨",
|
||||
defaultTitle: "Danger",
|
||||
borderColor: "border-l-red-500",
|
||||
bgColor: "bg-red-50 dark:bg-red-900/20",
|
||||
titleColor: "text-red-700 dark:text-red-400",
|
||||
iconColor: "text-red-500",
|
||||
},
|
||||
}
|
||||
|
||||
export function Callout({ type = "note", title, collapsed = false, children }: CalloutProps) {
|
||||
const [isExpanded, setIsExpanded] = React.useState(!collapsed)
|
||||
const config = typeConfig[type]
|
||||
const displayTitle = title ?? config.defaultTitle
|
||||
const showHeader = displayTitle || config.icon
|
||||
const [isExpanded, setIsExpanded] = React.useState(!collapsed)
|
||||
const config = typeConfig[type]
|
||||
const displayTitle = title ?? config.defaultTitle
|
||||
const showHeader = displayTitle || config.icon
|
||||
|
||||
// If collapsed prop is set, make the header clickable
|
||||
if (collapsed) {
|
||||
return (
|
||||
<div className={`my-4 border-l-4 ${config.borderColor} ${config.bgColor} rounded-r-lg p-4`}>
|
||||
{showHeader && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setIsExpanded(!isExpanded)}
|
||||
className={`flex items-center gap-2 font-semibold ${config.titleColor} w-full text-left cursor-pointer ${isExpanded ? "mb-2" : ""}`}
|
||||
aria-expanded={isExpanded}>
|
||||
<span
|
||||
className={`transition-transform duration-200 ${isExpanded ? "rotate-90" : ""}`}
|
||||
aria-hidden="true">
|
||||
▶
|
||||
</span>
|
||||
{config.icon && <span className={config.iconColor}>{config.icon}</span>}
|
||||
{displayTitle && <span className="uppercase text-sm tracking-wide">{displayTitle}</span>}
|
||||
</button>
|
||||
)}
|
||||
{isExpanded && <div className="text-gray-700 dark:text-gray-300 [&>p]:m-0">{children}</div>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
// If collapsed prop is set, make the header clickable
|
||||
if (collapsed) {
|
||||
return (
|
||||
<div className={`my-4 border-l-4 ${config.borderColor} ${config.bgColor} rounded-r-lg p-4`}>
|
||||
{showHeader && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setIsExpanded(!isExpanded)}
|
||||
className={`flex items-center gap-2 font-semibold ${config.titleColor} w-full text-left cursor-pointer ${isExpanded ? "mb-2" : ""}`}
|
||||
aria-expanded={isExpanded}
|
||||
>
|
||||
<span className={`transition-transform duration-200 ${isExpanded ? "rotate-90" : ""}`} aria-hidden="true">
|
||||
▶
|
||||
</span>
|
||||
{config.icon && <span className={config.iconColor}>{config.icon}</span>}
|
||||
{displayTitle && <span className="uppercase text-sm tracking-wide">{displayTitle}</span>}
|
||||
</button>
|
||||
)}
|
||||
{isExpanded && <div className="text-gray-700 dark:text-gray-300 [&>p]:m-0">{children}</div>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// Default non-collapsible behavior
|
||||
return (
|
||||
<div className={`my-4 border-l-4 ${config.borderColor} ${config.bgColor} rounded-r-lg p-4`}>
|
||||
{showHeader && (
|
||||
<div className={`flex items-center gap-2 font-semibold ${config.titleColor} mb-2`}>
|
||||
{config.icon && <span className={config.iconColor}>{config.icon}</span>}
|
||||
{displayTitle && <span className="uppercase text-sm tracking-wide">{displayTitle}</span>}
|
||||
</div>
|
||||
)}
|
||||
<div className="text-gray-700 dark:text-gray-300 [&>p]:m-0">{children}</div>
|
||||
</div>
|
||||
)
|
||||
// Default non-collapsible behavior
|
||||
return (
|
||||
<div className={`my-4 border-l-4 ${config.borderColor} ${config.bgColor} rounded-r-lg p-4`}>
|
||||
{showHeader && (
|
||||
<div className={`flex items-center gap-2 font-semibold ${config.titleColor} mb-2`}>
|
||||
{config.icon && <span className={config.iconColor}>{config.icon}</span>}
|
||||
{displayTitle && <span className="uppercase text-sm tracking-wide">{displayTitle}</span>}
|
||||
</div>
|
||||
)}
|
||||
<div className="text-gray-700 dark:text-gray-300 [&>p]:m-0">{children}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -4,102 +4,103 @@ import * as React from "react"
|
||||
import { Codicon } from "./Codicon"
|
||||
|
||||
export function CodeBlock({ children, "data-language": language }) {
|
||||
const ref = React.useRef(null)
|
||||
const timeoutRef = React.useRef(null)
|
||||
const [copied, setCopied] = React.useState(false)
|
||||
const ref = React.useRef(null)
|
||||
const timeoutRef = React.useRef(null)
|
||||
const [copied, setCopied] = React.useState(false)
|
||||
|
||||
React.useEffect(() => {
|
||||
if (ref.current) Prism.highlightElement(ref.current, false)
|
||||
}, [children])
|
||||
React.useEffect(() => {
|
||||
if (ref.current) Prism.highlightElement(ref.current, false)
|
||||
}, [children])
|
||||
|
||||
React.useEffect(() => {
|
||||
return () => {
|
||||
if (timeoutRef.current) {
|
||||
clearTimeout(timeoutRef.current)
|
||||
}
|
||||
}
|
||||
}, [])
|
||||
React.useEffect(() => {
|
||||
return () => {
|
||||
if (timeoutRef.current) {
|
||||
clearTimeout(timeoutRef.current)
|
||||
}
|
||||
}
|
||||
}, [])
|
||||
|
||||
const handleCopy = async () => {
|
||||
const code = ref.current?.textContent || ""
|
||||
try {
|
||||
await navigator.clipboard.writeText(code)
|
||||
setCopied(true)
|
||||
if (timeoutRef.current) {
|
||||
clearTimeout(timeoutRef.current)
|
||||
}
|
||||
timeoutRef.current = setTimeout(() => setCopied(false), 2000)
|
||||
} catch (err) {
|
||||
console.error("Failed to copy code:", err)
|
||||
}
|
||||
}
|
||||
const handleCopy = async () => {
|
||||
const code = ref.current?.textContent || ""
|
||||
try {
|
||||
await navigator.clipboard.writeText(code)
|
||||
setCopied(true)
|
||||
if (timeoutRef.current) {
|
||||
clearTimeout(timeoutRef.current)
|
||||
}
|
||||
timeoutRef.current = setTimeout(() => setCopied(false), 2000)
|
||||
} catch (err) {
|
||||
console.error("Failed to copy code:", err)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="code" aria-live="polite">
|
||||
<button
|
||||
type="button"
|
||||
className="copy-button"
|
||||
onClick={handleCopy}
|
||||
aria-label="Copy code to clipboard"
|
||||
title={copied ? "Copied!" : "Copy code"}>
|
||||
{copied ? <Codicon name="check" /> : <Codicon name="copy" />}
|
||||
</button>
|
||||
<pre ref={ref} className={`language-${language}`}>
|
||||
{children}
|
||||
</pre>
|
||||
<style jsx>
|
||||
{`
|
||||
.code {
|
||||
position: relative;
|
||||
}
|
||||
return (
|
||||
<div className="code" aria-live="polite">
|
||||
<button
|
||||
type="button"
|
||||
className="copy-button"
|
||||
onClick={handleCopy}
|
||||
aria-label="Copy code to clipboard"
|
||||
title={copied ? "Copied!" : "Copy code"}
|
||||
>
|
||||
{copied ? <Codicon name="check" /> : <Codicon name="copy" />}
|
||||
</button>
|
||||
<pre ref={ref} className={`language-${language}`}>
|
||||
{children}
|
||||
</pre>
|
||||
<style jsx>
|
||||
{`
|
||||
.code {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.copy-button {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
padding: 6px 8px;
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
border-radius: 4px;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s ease;
|
||||
z-index: 10;
|
||||
}
|
||||
.copy-button {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
padding: 6px 8px;
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
border-radius: 4px;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s ease;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.copy-button:hover {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
border-color: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.copy-button:hover {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
border-color: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
:global(.dark) .copy-button {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
:global(.dark) .copy-button {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border-color: rgba(255, 255, 255, 0.1);
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
:global(.dark) .copy-button:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
border-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
:global(.dark) .copy-button:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
border-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.copy-button:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
.copy-button:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
/* Override Prism styles */
|
||||
.code :global(pre[class*="language-"]) {
|
||||
text-shadow: none;
|
||||
border-radius: 4px;
|
||||
padding-right: 3.5rem;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
</div>
|
||||
)
|
||||
/* Override Prism styles */
|
||||
.code :global(pre[class*="language-"]) {
|
||||
text-shadow: none;
|
||||
border-radius: 4px;
|
||||
padding-right: 3.5rem;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -2,21 +2,21 @@ import React from "react"
|
||||
import "@vscode/codicons/dist/codicon.css"
|
||||
|
||||
interface CodiconProps {
|
||||
name: string
|
||||
size?: string
|
||||
className?: string
|
||||
name: string
|
||||
size?: string
|
||||
className?: string
|
||||
}
|
||||
|
||||
export function Codicon({ name, size = "1em", className = "" }: CodiconProps) {
|
||||
return (
|
||||
<i
|
||||
className={`codicon codicon-${name} ${className}`.trim()}
|
||||
style={{
|
||||
fontSize: size,
|
||||
verticalAlign: "middle",
|
||||
display: "inline",
|
||||
}}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
)
|
||||
return (
|
||||
<i
|
||||
className={`codicon codicon-${name} ${className}`.trim()}
|
||||
style={{
|
||||
fontSize: size,
|
||||
verticalAlign: "middle",
|
||||
display: "inline",
|
||||
}}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as React from "react"
|
||||
|
||||
export function Heading({ id = "", level = 1, children, className }) {
|
||||
return React.createElement(
|
||||
`h${level}`,
|
||||
{
|
||||
id,
|
||||
className: ["heading", className].filter(Boolean).join(" "),
|
||||
},
|
||||
children,
|
||||
)
|
||||
return React.createElement(
|
||||
`h${level}`,
|
||||
{
|
||||
id,
|
||||
className: ["heading", className].filter(Boolean).join(" "),
|
||||
},
|
||||
children,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
import React, { useEffect, useState } from "react"
|
||||
|
||||
interface IconProps {
|
||||
src: string
|
||||
srcDark?: string
|
||||
alt?: string
|
||||
size?: string
|
||||
src: string
|
||||
srcDark?: string
|
||||
alt?: string
|
||||
size?: string
|
||||
}
|
||||
|
||||
export function Icon({ src, srcDark, alt = "icon", size = "1.2em" }: IconProps) {
|
||||
const [isDark, setIsDark] = useState(false)
|
||||
const [isDark, setIsDark] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
// Check initial dark mode state
|
||||
const checkDarkMode = () => {
|
||||
setIsDark(document.documentElement.classList.contains("dark"))
|
||||
}
|
||||
useEffect(() => {
|
||||
// Check initial dark mode state
|
||||
const checkDarkMode = () => {
|
||||
setIsDark(document.documentElement.classList.contains("dark"))
|
||||
}
|
||||
|
||||
checkDarkMode()
|
||||
checkDarkMode()
|
||||
|
||||
// Watch for dark mode changes
|
||||
const observer = new MutationObserver((mutations) => {
|
||||
mutations.forEach((mutation) => {
|
||||
if (mutation.attributeName === "class") {
|
||||
checkDarkMode()
|
||||
}
|
||||
})
|
||||
})
|
||||
// Watch for dark mode changes
|
||||
const observer = new MutationObserver((mutations) => {
|
||||
mutations.forEach((mutation) => {
|
||||
if (mutation.attributeName === "class") {
|
||||
checkDarkMode()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
observer.observe(document.documentElement, { attributes: true })
|
||||
observer.observe(document.documentElement, { attributes: true })
|
||||
|
||||
return () => observer.disconnect()
|
||||
}, [])
|
||||
return () => observer.disconnect()
|
||||
}, [])
|
||||
|
||||
const imageSrc = isDark && srcDark ? srcDark : src
|
||||
const imageSrc = isDark && srcDark ? srcDark : src
|
||||
|
||||
return (
|
||||
<img
|
||||
src={imageSrc}
|
||||
alt={alt}
|
||||
style={{
|
||||
height: size,
|
||||
width: "auto",
|
||||
verticalAlign: "middle",
|
||||
display: "inline",
|
||||
}}
|
||||
/>
|
||||
)
|
||||
return (
|
||||
<img
|
||||
src={imageSrc}
|
||||
alt={alt}
|
||||
style={{
|
||||
height: size,
|
||||
width: "auto",
|
||||
verticalAlign: "middle",
|
||||
display: "inline",
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,58 +1,59 @@
|
||||
import React from "react"
|
||||
|
||||
interface ImageProps {
|
||||
src: string
|
||||
alt: string
|
||||
width?: string
|
||||
height?: string
|
||||
caption?: string
|
||||
src: string
|
||||
alt: string
|
||||
width?: string
|
||||
height?: string
|
||||
caption?: string
|
||||
}
|
||||
|
||||
// Helper to add 'px' to numeric values that don't have units
|
||||
function addPxIfNeeded(value: string): string {
|
||||
// If the value is purely numeric, add 'px'
|
||||
if (/^\d+(\.\d+)?$/.test(value)) {
|
||||
return `${value}px`
|
||||
}
|
||||
return value
|
||||
// If the value is purely numeric, add 'px'
|
||||
if (/^\d+(\.\d+)?$/.test(value)) {
|
||||
return `${value}px`
|
||||
}
|
||||
return value
|
||||
}
|
||||
|
||||
export function Image({ src, alt, width, height, caption }: ImageProps) {
|
||||
const imgStyle: React.CSSProperties = {
|
||||
maxWidth: "100%",
|
||||
height: "auto",
|
||||
}
|
||||
const imgStyle: React.CSSProperties = {
|
||||
maxWidth: "100%",
|
||||
height: "auto",
|
||||
}
|
||||
|
||||
if (width) imgStyle.width = addPxIfNeeded(width)
|
||||
if (height) imgStyle.height = addPxIfNeeded(height)
|
||||
if (width) imgStyle.width = addPxIfNeeded(width)
|
||||
if (height) imgStyle.height = addPxIfNeeded(height)
|
||||
|
||||
const figureStyle: React.CSSProperties = {
|
||||
margin: "1.5rem 0",
|
||||
maxWidth: "100%",
|
||||
overflow: "hidden",
|
||||
}
|
||||
const figureStyle: React.CSSProperties = {
|
||||
margin: "1.5rem 0",
|
||||
maxWidth: "100%",
|
||||
overflow: "hidden",
|
||||
}
|
||||
|
||||
// If width is specified, apply it to the figure to constrain caption width
|
||||
if (width) {
|
||||
figureStyle.width = addPxIfNeeded(width)
|
||||
figureStyle.maxWidth = "100%"
|
||||
}
|
||||
// If width is specified, apply it to the figure to constrain caption width
|
||||
if (width) {
|
||||
figureStyle.width = addPxIfNeeded(width)
|
||||
figureStyle.maxWidth = "100%"
|
||||
}
|
||||
|
||||
return (
|
||||
<figure style={figureStyle}>
|
||||
<img src={src} alt={alt} style={imgStyle} />
|
||||
{caption && (
|
||||
<figcaption
|
||||
style={{
|
||||
fontStyle: "italic",
|
||||
textAlign: "center",
|
||||
marginTop: "0.5rem",
|
||||
color: "var(--gray-600, #6b7280)",
|
||||
width: "100%",
|
||||
}}>
|
||||
{caption}
|
||||
</figcaption>
|
||||
)}
|
||||
</figure>
|
||||
)
|
||||
return (
|
||||
<figure style={figureStyle}>
|
||||
<img src={src} alt={alt} style={imgStyle} />
|
||||
{caption && (
|
||||
<figcaption
|
||||
style={{
|
||||
fontStyle: "italic",
|
||||
textAlign: "center",
|
||||
marginTop: "0.5rem",
|
||||
color: "var(--gray-600, #6b7280)",
|
||||
width: "100%",
|
||||
}}
|
||||
>
|
||||
{caption}
|
||||
</figcaption>
|
||||
)}
|
||||
</figure>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@ import React from "react"
|
||||
import { Icon } from "./Icon"
|
||||
|
||||
interface KiloCodeIconProps {
|
||||
size?: string
|
||||
size?: string
|
||||
}
|
||||
|
||||
export function KiloCodeIcon({ size = "1.2em" }: KiloCodeIconProps) {
|
||||
return <Icon src="/docs/img/kilo-v1.svg" srcDark="/docs/img/kilo-v1-white.svg" alt="Kilo Code Icon" size={size} />
|
||||
return <Icon src="/docs/img/kilo-v1.svg" srcDark="/docs/img/kilo-v1-white.svg" alt="Kilo Code Icon" size={size} />
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,66 +1,64 @@
|
||||
import React from "react"
|
||||
|
||||
interface TableProps {
|
||||
children: React.ReactNode
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
export function Table({ children }: TableProps) {
|
||||
return (
|
||||
<div className="overflow-x-auto my-6 border border-neutral-300 dark:border-neutral-700 rounded-lg">
|
||||
<table className="w-full border-collapse text-sm">{children}</table>
|
||||
</div>
|
||||
)
|
||||
return (
|
||||
<div className="overflow-x-auto my-6 border border-neutral-300 dark:border-neutral-700 rounded-lg">
|
||||
<table className="w-full border-collapse text-sm">{children}</table>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
interface THeadProps {
|
||||
children: React.ReactNode
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
export function THead({ children }: THeadProps) {
|
||||
return <thead className="bg-neutral-100 dark:bg-neutral-800/50">{children}</thead>
|
||||
return <thead className="bg-neutral-100 dark:bg-neutral-800/50">{children}</thead>
|
||||
}
|
||||
|
||||
interface TBodyProps {
|
||||
children: React.ReactNode
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
export function TBody({ children }: TBodyProps) {
|
||||
return <tbody className="bg-white dark:bg-neutral-900/50">{children}</tbody>
|
||||
return <tbody className="bg-white dark:bg-neutral-900/50">{children}</tbody>
|
||||
}
|
||||
|
||||
interface TrProps {
|
||||
children: React.ReactNode
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
export function Tr({ children }: TrProps) {
|
||||
return <tr className="border-b border-neutral-300 dark:border-neutral-700 last:border-b-0">{children}</tr>
|
||||
return <tr className="border-b border-neutral-300 dark:border-neutral-700 last:border-b-0">{children}</tr>
|
||||
}
|
||||
|
||||
interface ThProps {
|
||||
children: React.ReactNode
|
||||
width?: string
|
||||
children: React.ReactNode
|
||||
width?: string
|
||||
}
|
||||
|
||||
export function Th({ children, width }: ThProps) {
|
||||
return (
|
||||
<th
|
||||
className="px-4 py-2.5 text-left text-sm font-medium text-neutral-700 dark:text-neutral-300"
|
||||
style={{ width }}>
|
||||
{children}
|
||||
</th>
|
||||
)
|
||||
return (
|
||||
<th className="px-4 py-2.5 text-left text-sm font-medium text-neutral-700 dark:text-neutral-300" style={{ width }}>
|
||||
{children}
|
||||
</th>
|
||||
)
|
||||
}
|
||||
|
||||
interface TdProps {
|
||||
children: React.ReactNode
|
||||
colspan?: number
|
||||
rowspan?: number
|
||||
children: React.ReactNode
|
||||
colspan?: number
|
||||
rowspan?: number
|
||||
}
|
||||
|
||||
export function Td({ children, colspan, rowspan }: TdProps) {
|
||||
return (
|
||||
<td className="px-4 py-3 text-neutral-600 dark:text-neutral-400" colSpan={colspan} rowSpan={rowspan}>
|
||||
{children}
|
||||
</td>
|
||||
)
|
||||
return (
|
||||
<td className="px-4 py-3 text-neutral-600 dark:text-neutral-400" colSpan={colspan} rowSpan={rowspan}>
|
||||
{children}
|
||||
</td>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,43 +1,44 @@
|
||||
import React, { useState, Children, isValidElement, ReactNode, ReactElement } from "react"
|
||||
|
||||
interface TabProps {
|
||||
label: string
|
||||
children: ReactNode
|
||||
label: string
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
interface TabsProps {
|
||||
children: ReactNode
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
export function Tab({ children }: TabProps) {
|
||||
return <>{children}</>
|
||||
return <>{children}</>
|
||||
}
|
||||
|
||||
export function Tabs({ children }: TabsProps) {
|
||||
const [activeIndex, setActiveIndex] = useState(0)
|
||||
const [activeIndex, setActiveIndex] = useState(0)
|
||||
|
||||
const tabs = Children.toArray(children).filter(
|
||||
(child): child is ReactElement<TabProps> =>
|
||||
isValidElement(child) && (child.type === Tab || (child.props as any)?.label !== undefined),
|
||||
)
|
||||
const tabs = Children.toArray(children).filter(
|
||||
(child): child is ReactElement<TabProps> =>
|
||||
isValidElement(child) && (child.type === Tab || (child.props as any)?.label !== undefined),
|
||||
)
|
||||
|
||||
return (
|
||||
<div className="tabs-container my-6 border border-neutral-300 dark:border-neutral-700 rounded-lg overflow-hidden">
|
||||
<div className="tabs-header flex border-b border-neutral-300 dark:border-neutral-700 bg-neutral-100 dark:bg-neutral-800/50 overflow-x-auto">
|
||||
{tabs.map((tab, index) => (
|
||||
<button
|
||||
key={index}
|
||||
className={`px-2 py-2 text-xs sm:px-4 sm:py-2.5 sm:text-sm font-medium transition-colors whitespace-nowrap ${
|
||||
activeIndex === index
|
||||
? "bg-white dark:bg-neutral-900 text-yellow-800 dark:text-yellow-300 border-b-2 border-yellow-800 dark:border-yellow-300 -mb-[1px]"
|
||||
: "text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-neutral-200 hover:bg-neutral-200 dark:hover:bg-neutral-700/50"
|
||||
}`}
|
||||
onClick={() => setActiveIndex(index)}>
|
||||
{tab.props.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<div className="tabs-content p-3 sm:p-4 bg-white dark:bg-neutral-900/50">{tabs[activeIndex]}</div>
|
||||
</div>
|
||||
)
|
||||
return (
|
||||
<div className="tabs-container my-6 border border-neutral-300 dark:border-neutral-700 rounded-lg overflow-hidden">
|
||||
<div className="tabs-header flex border-b border-neutral-300 dark:border-neutral-700 bg-neutral-100 dark:bg-neutral-800/50 overflow-x-auto">
|
||||
{tabs.map((tab, index) => (
|
||||
<button
|
||||
key={index}
|
||||
className={`px-2 py-2 text-xs sm:px-4 sm:py-2.5 sm:text-sm font-medium transition-colors whitespace-nowrap ${
|
||||
activeIndex === index
|
||||
? "bg-white dark:bg-neutral-900 text-yellow-800 dark:text-yellow-300 border-b-2 border-yellow-800 dark:border-yellow-300 -mb-[1px]"
|
||||
: "text-neutral-600 dark:text-neutral-400 hover:text-neutral-900 dark:hover:text-neutral-200 hover:bg-neutral-200 dark:hover:bg-neutral-700/50"
|
||||
}`}
|
||||
onClick={() => setActiveIndex(index)}
|
||||
>
|
||||
{tab.props.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
<div className="tabs-content p-3 sm:p-4 bg-white dark:bg-neutral-900/50">{tabs[activeIndex]}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -3,115 +3,115 @@ import React, { useEffect, useState } from "react"
|
||||
type Theme = "light" | "dark" | "system"
|
||||
|
||||
export function ThemeToggle() {
|
||||
const [theme, setTheme] = useState<Theme>("system")
|
||||
const [mounted, setMounted] = useState(false)
|
||||
const [theme, setTheme] = useState<Theme>("system")
|
||||
const [mounted, setMounted] = useState(false)
|
||||
|
||||
// On mount, read the preference from localStorage or default to 'system'
|
||||
useEffect(() => {
|
||||
setMounted(true)
|
||||
const storedTheme = localStorage.getItem("theme") as Theme | null
|
||||
if (storedTheme) {
|
||||
setTheme(storedTheme)
|
||||
}
|
||||
}, [])
|
||||
// On mount, read the preference from localStorage or default to 'system'
|
||||
useEffect(() => {
|
||||
setMounted(true)
|
||||
const storedTheme = localStorage.getItem("theme") as Theme | null
|
||||
if (storedTheme) {
|
||||
setTheme(storedTheme)
|
||||
}
|
||||
}, [])
|
||||
|
||||
// Apply the theme to the document
|
||||
useEffect(() => {
|
||||
if (!mounted) return
|
||||
// Apply the theme to the document
|
||||
useEffect(() => {
|
||||
if (!mounted) return
|
||||
|
||||
const root = document.documentElement
|
||||
const root = document.documentElement
|
||||
|
||||
if (theme === "system") {
|
||||
localStorage.removeItem("theme")
|
||||
const systemDark = window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
root.classList.toggle("dark", systemDark)
|
||||
} else {
|
||||
localStorage.setItem("theme", theme)
|
||||
root.classList.toggle("dark", theme === "dark")
|
||||
}
|
||||
}, [theme, mounted])
|
||||
if (theme === "system") {
|
||||
localStorage.removeItem("theme")
|
||||
const systemDark = window.matchMedia("(prefers-color-scheme: dark)").matches
|
||||
root.classList.toggle("dark", systemDark)
|
||||
} else {
|
||||
localStorage.setItem("theme", theme)
|
||||
root.classList.toggle("dark", theme === "dark")
|
||||
}
|
||||
}, [theme, mounted])
|
||||
|
||||
// Listen for system preference changes
|
||||
useEffect(() => {
|
||||
if (!mounted) return
|
||||
// Listen for system preference changes
|
||||
useEffect(() => {
|
||||
if (!mounted) return
|
||||
|
||||
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)")
|
||||
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)")
|
||||
|
||||
const handleChange = (e: MediaQueryListEvent) => {
|
||||
if (theme === "system") {
|
||||
document.documentElement.classList.toggle("dark", e.matches)
|
||||
}
|
||||
}
|
||||
const handleChange = (e: MediaQueryListEvent) => {
|
||||
if (theme === "system") {
|
||||
document.documentElement.classList.toggle("dark", e.matches)
|
||||
}
|
||||
}
|
||||
|
||||
mediaQuery.addEventListener("change", handleChange)
|
||||
return () => mediaQuery.removeEventListener("change", handleChange)
|
||||
}, [theme, mounted])
|
||||
mediaQuery.addEventListener("change", handleChange)
|
||||
return () => mediaQuery.removeEventListener("change", handleChange)
|
||||
}, [theme, mounted])
|
||||
|
||||
const cycleTheme = () => {
|
||||
const themes: Theme[] = ["system", "light", "dark"]
|
||||
const currentIndex = themes.indexOf(theme)
|
||||
const nextIndex = (currentIndex + 1) % themes.length
|
||||
setTheme(themes[nextIndex])
|
||||
}
|
||||
const cycleTheme = () => {
|
||||
const themes: Theme[] = ["system", "light", "dark"]
|
||||
const currentIndex = themes.indexOf(theme)
|
||||
const nextIndex = (currentIndex + 1) % themes.length
|
||||
setTheme(themes[nextIndex])
|
||||
}
|
||||
|
||||
// Avoid hydration mismatch by not rendering until mounted
|
||||
if (!mounted) {
|
||||
return (
|
||||
<button className="theme-toggle" aria-label="Toggle theme" style={{ width: "32px", height: "32px" }}>
|
||||
<span style={{ opacity: 0 }}>🌙</span>
|
||||
</button>
|
||||
)
|
||||
}
|
||||
// Avoid hydration mismatch by not rendering until mounted
|
||||
if (!mounted) {
|
||||
return (
|
||||
<button className="theme-toggle" aria-label="Toggle theme" style={{ width: "32px", height: "32px" }}>
|
||||
<span style={{ opacity: 0 }}>🌙</span>
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
const getIcon = () => {
|
||||
if (theme === "system") {
|
||||
return "💻"
|
||||
}
|
||||
if (theme === "dark") {
|
||||
return "🌙"
|
||||
}
|
||||
return "☀️"
|
||||
}
|
||||
const getIcon = () => {
|
||||
if (theme === "system") {
|
||||
return "💻"
|
||||
}
|
||||
if (theme === "dark") {
|
||||
return "🌙"
|
||||
}
|
||||
return "☀️"
|
||||
}
|
||||
|
||||
const getLabel = () => {
|
||||
if (theme === "system") {
|
||||
return "Using system theme"
|
||||
}
|
||||
if (theme === "dark") {
|
||||
return "Dark mode"
|
||||
}
|
||||
return "Light mode"
|
||||
}
|
||||
const getLabel = () => {
|
||||
if (theme === "system") {
|
||||
return "Using system theme"
|
||||
}
|
||||
if (theme === "dark") {
|
||||
return "Dark mode"
|
||||
}
|
||||
return "Light mode"
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<button onClick={cycleTheme} className="theme-toggle" aria-label={getLabel()} title={getLabel()}>
|
||||
<span>{getIcon()}</span>
|
||||
</button>
|
||||
<style jsx>{`
|
||||
.theme-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
padding: 0;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 6px;
|
||||
background: var(--bg-secondary);
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
transition:
|
||||
background-color 0.2s ease,
|
||||
border-color 0.2s ease;
|
||||
}
|
||||
.theme-toggle:hover {
|
||||
background: var(--border-color);
|
||||
}
|
||||
.theme-toggle span {
|
||||
line-height: 1;
|
||||
}
|
||||
`}</style>
|
||||
</>
|
||||
)
|
||||
return (
|
||||
<>
|
||||
<button onClick={cycleTheme} className="theme-toggle" aria-label={getLabel()} title={getLabel()}>
|
||||
<span>{getIcon()}</span>
|
||||
</button>
|
||||
<style jsx>{`
|
||||
.theme-toggle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
padding: 0;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 6px;
|
||||
background: var(--bg-secondary);
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
transition:
|
||||
background-color 0.2s ease,
|
||||
border-color 0.2s ease;
|
||||
}
|
||||
.theme-toggle:hover {
|
||||
background: var(--border-color);
|
||||
}
|
||||
.theme-toggle span {
|
||||
line-height: 1;
|
||||
}
|
||||
`}</style>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,91 +1,95 @@
|
||||
import React from "react"
|
||||
|
||||
interface YouTubeProps {
|
||||
url: string
|
||||
title?: string
|
||||
caption?: string
|
||||
url: string
|
||||
title?: string
|
||||
caption?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* Extracts the YouTube video ID from various URL formats
|
||||
*/
|
||||
function extractVideoId(url: string): string | null {
|
||||
const patterns = [
|
||||
/(?:youtube\.com\/watch\?v=)([^&\s]+)/,
|
||||
/(?:youtube\.com\/embed\/)([^?\s]+)/,
|
||||
/(?:youtu\.be\/)([^?\s]+)/,
|
||||
/(?:youtube\.com\/v\/)([^?\s]+)/,
|
||||
]
|
||||
const patterns = [
|
||||
/(?:youtube\.com\/watch\?v=)([^&\s]+)/,
|
||||
/(?:youtube\.com\/embed\/)([^?\s]+)/,
|
||||
/(?:youtu\.be\/)([^?\s]+)/,
|
||||
/(?:youtube\.com\/v\/)([^?\s]+)/,
|
||||
]
|
||||
|
||||
for (const pattern of patterns) {
|
||||
const match = url.match(pattern)
|
||||
if (match) {
|
||||
return match[1]
|
||||
}
|
||||
}
|
||||
for (const pattern of patterns) {
|
||||
const match = url.match(pattern)
|
||||
if (match) {
|
||||
return match[1]
|
||||
}
|
||||
}
|
||||
|
||||
return null
|
||||
return null
|
||||
}
|
||||
|
||||
export function YouTube({ url, title = "YouTube video", caption }: YouTubeProps) {
|
||||
const videoId = extractVideoId(url)
|
||||
const videoId = extractVideoId(url)
|
||||
|
||||
if (!videoId) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
padding: "1rem",
|
||||
backgroundColor: "var(--red-100, #fee2e2)",
|
||||
color: "var(--red-700, #b91c1c)",
|
||||
borderRadius: "0.5rem",
|
||||
margin: "1.5rem 0",
|
||||
}}>
|
||||
Invalid YouTube URL: {url}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
if (!videoId) {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
padding: "1rem",
|
||||
backgroundColor: "var(--red-100, #fee2e2)",
|
||||
color: "var(--red-700, #b91c1c)",
|
||||
borderRadius: "0.5rem",
|
||||
margin: "1.5rem 0",
|
||||
}}
|
||||
>
|
||||
Invalid YouTube URL: {url}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
maxWidth: "640px",
|
||||
margin: "1.5rem 0",
|
||||
}}>
|
||||
<div
|
||||
style={{
|
||||
position: "relative",
|
||||
paddingBottom: "56.25%", // 16:9 aspect ratio
|
||||
height: 0,
|
||||
overflow: "hidden",
|
||||
borderRadius: "0.5rem",
|
||||
}}>
|
||||
<iframe
|
||||
src={`https://www.youtube.com/embed/${videoId}`}
|
||||
title={title}
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
border: "none",
|
||||
borderRadius: "0.5rem",
|
||||
}}
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
/>
|
||||
</div>
|
||||
{caption && (
|
||||
<figcaption
|
||||
style={{
|
||||
fontStyle: "italic",
|
||||
textAlign: "center",
|
||||
marginTop: "0.5rem",
|
||||
color: "var(--gray-600, #6b7280)",
|
||||
}}>
|
||||
{caption}
|
||||
</figcaption>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
maxWidth: "640px",
|
||||
margin: "1.5rem 0",
|
||||
}}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
position: "relative",
|
||||
paddingBottom: "56.25%", // 16:9 aspect ratio
|
||||
height: 0,
|
||||
overflow: "hidden",
|
||||
borderRadius: "0.5rem",
|
||||
}}
|
||||
>
|
||||
<iframe
|
||||
src={`https://www.youtube.com/embed/${videoId}`}
|
||||
title={title}
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: "100%",
|
||||
height: "100%",
|
||||
border: "none",
|
||||
borderRadius: "0.5rem",
|
||||
}}
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
/>
|
||||
</div>
|
||||
{caption && (
|
||||
<figcaption
|
||||
style={{
|
||||
fontStyle: "italic",
|
||||
textAlign: "center",
|
||||
marginTop: "0.5rem",
|
||||
color: "var(--gray-600, #6b7280)",
|
||||
}}
|
||||
>
|
||||
{caption}
|
||||
</figcaption>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -21,20 +21,20 @@ The Kilo Code dev container is pre-configured with named volumes to preserve you
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Your Project",
|
||||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
|
||||
"mounts": [
|
||||
{
|
||||
"source": "kilocode-global-storage",
|
||||
"target": "/root/.vscode-remote/data/User/globalStorage/kilocode.kilo-code",
|
||||
"type": "volume"
|
||||
},
|
||||
{
|
||||
"source": "kilocode-settings",
|
||||
"target": "/root/.vscode-remote/data/User/settings",
|
||||
"type": "volume"
|
||||
}
|
||||
]
|
||||
"name": "Your Project",
|
||||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
|
||||
"mounts": [
|
||||
{
|
||||
"source": "kilocode-global-storage",
|
||||
"target": "/root/.vscode-remote/data/User/globalStorage/kilocode.kilo-code",
|
||||
"type": "volume"
|
||||
},
|
||||
{
|
||||
"source": "kilocode-settings",
|
||||
"target": "/root/.vscode-remote/data/User/settings",
|
||||
"type": "volume"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
@@ -89,9 +89,9 @@ For advanced configurations, you can specify a custom storage path:
|
||||
```
|
||||
|
||||
2. Set the custom storage path in VS Code settings:
|
||||
- Open Settings (`Ctrl+,` or `Cmd+,`)
|
||||
- Search for "Kilo Code: Custom Storage Path"
|
||||
- Enter: `/home/vscode/kilocode-data`
|
||||
- Open Settings (`Ctrl+,` or `Cmd+,`)
|
||||
- Search for "Kilo Code: Custom Storage Path"
|
||||
- Enter: `/home/vscode/kilocode-data`
|
||||
|
||||
## Best Practices
|
||||
|
||||
|
||||
@@ -305,11 +305,11 @@ In-line ghost-text completions with tab to complete. Works alongside the agent m
|
||||
|
||||
1. Install Kilo in your primary IDE
|
||||
2. Try each mode with a small task:
|
||||
- **Code:** "Add a hello world endpoint"
|
||||
- **Ask:** "Explain what this file does"
|
||||
- **Debug:** "Why is this function returning undefined?"
|
||||
- **Architect:** "Design a logging system"
|
||||
- **Orchestrator:** "Build an app, end-to-end, that…"
|
||||
- **Code:** "Add a hello world endpoint"
|
||||
- **Ask:** "Explain what this file does"
|
||||
- **Debug:** "Why is this function returning undefined?"
|
||||
- **Architect:** "Design a logging system"
|
||||
- **Orchestrator:** "Build an app, end-to-end, that…"
|
||||
3. Try Cloud Agents at [app.kilo.ai](https://app.kilo.ai/)
|
||||
4. Install the Kilo CLI with `npm install -g @kilocode/cli`
|
||||
5. Enable Autocomplete for inline suggestions
|
||||
|
||||
@@ -1,85 +1,85 @@
|
||||
import { NavSection } from "../types"
|
||||
|
||||
export const AiProvidersNav: NavSection[] = [
|
||||
{
|
||||
title: "AI Providers",
|
||||
links: [
|
||||
{ href: "/ai-providers", children: "Overview" },
|
||||
{ href: "/ai-providers/kilocode", children: "Kilo Code (Default)" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "AI Labs",
|
||||
links: [
|
||||
{ href: "/ai-providers/anthropic", children: "Anthropic" },
|
||||
{ href: "/ai-providers/claude-code", children: "Claude Code" },
|
||||
{ href: "/ai-providers/openai", children: "OpenAI" },
|
||||
{
|
||||
href: "/ai-providers/openai-chatgpt-plus-pro",
|
||||
children: "ChatGPT Plus/Pro",
|
||||
},
|
||||
{ href: "/ai-providers/gemini", children: "Google Gemini" },
|
||||
{ href: "/ai-providers/mistral", children: "Mistral AI" },
|
||||
{ href: "/ai-providers/deepseek", children: "DeepSeek" },
|
||||
{ href: "/ai-providers/xai", children: "xAI (Grok)" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "AI Gateways",
|
||||
links: [
|
||||
{ href: "/ai-providers/openrouter", children: "OpenRouter" },
|
||||
{ href: "/ai-providers/glama", children: "Glama" },
|
||||
{ href: "/ai-providers/requesty", children: "Requesty" },
|
||||
{ href: "/ai-providers/unbound", children: "Unbound" },
|
||||
{
|
||||
href: "/ai-providers/vercel-ai-gateway",
|
||||
children: "Vercel AI Gateway",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Cloud Providers",
|
||||
links: [
|
||||
{ href: "/ai-providers/vertex", children: "Google Vertex AI" },
|
||||
{ href: "/ai-providers/bedrock", children: "AWS Bedrock" },
|
||||
{ href: "/ai-providers/groq", children: "Groq" },
|
||||
{ href: "/ai-providers/cerebras", children: "Cerebras" },
|
||||
{ href: "/ai-providers/fireworks", children: "Fireworks AI" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Local & Self-Hosted",
|
||||
links: [
|
||||
{ href: "/ai-providers/ollama", children: "Ollama" },
|
||||
{ href: "/ai-providers/lmstudio", children: "LM Studio" },
|
||||
{ href: "/ai-providers/vscode-lm", children: "VS Code LM API" },
|
||||
{
|
||||
href: "/ai-providers/openai-compatible",
|
||||
children: "OpenAI Compatible",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Other Providers",
|
||||
links: [
|
||||
{ href: "/ai-providers/chutes-ai", children: "Chutes AI" },
|
||||
{ href: "/ai-providers/inception", children: "Inception" },
|
||||
{ href: "/ai-providers/minimax", children: "MiniMax" },
|
||||
{ href: "/ai-providers/moonshot", children: "Moonshot" },
|
||||
{ href: "/ai-providers/ovhcloud", children: "OVHcloud" },
|
||||
{ href: "/ai-providers/sap-ai-core", children: "SAP AI Core" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Special Modes",
|
||||
links: [
|
||||
{ href: "/ai-providers/v0", children: "v0" },
|
||||
{ href: "/ai-providers/human-relay", children: "Human Relay" },
|
||||
{ href: "/ai-providers/synthetic", children: "Synthetic Provider" },
|
||||
{
|
||||
href: "/ai-providers/virtual-quota-fallback",
|
||||
children: "Virtual Quota Fallback",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "AI Providers",
|
||||
links: [
|
||||
{ href: "/ai-providers", children: "Overview" },
|
||||
{ href: "/ai-providers/kilocode", children: "Kilo Code (Default)" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "AI Labs",
|
||||
links: [
|
||||
{ href: "/ai-providers/anthropic", children: "Anthropic" },
|
||||
{ href: "/ai-providers/claude-code", children: "Claude Code" },
|
||||
{ href: "/ai-providers/openai", children: "OpenAI" },
|
||||
{
|
||||
href: "/ai-providers/openai-chatgpt-plus-pro",
|
||||
children: "ChatGPT Plus/Pro",
|
||||
},
|
||||
{ href: "/ai-providers/gemini", children: "Google Gemini" },
|
||||
{ href: "/ai-providers/mistral", children: "Mistral AI" },
|
||||
{ href: "/ai-providers/deepseek", children: "DeepSeek" },
|
||||
{ href: "/ai-providers/xai", children: "xAI (Grok)" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "AI Gateways",
|
||||
links: [
|
||||
{ href: "/ai-providers/openrouter", children: "OpenRouter" },
|
||||
{ href: "/ai-providers/glama", children: "Glama" },
|
||||
{ href: "/ai-providers/requesty", children: "Requesty" },
|
||||
{ href: "/ai-providers/unbound", children: "Unbound" },
|
||||
{
|
||||
href: "/ai-providers/vercel-ai-gateway",
|
||||
children: "Vercel AI Gateway",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Cloud Providers",
|
||||
links: [
|
||||
{ href: "/ai-providers/vertex", children: "Google Vertex AI" },
|
||||
{ href: "/ai-providers/bedrock", children: "AWS Bedrock" },
|
||||
{ href: "/ai-providers/groq", children: "Groq" },
|
||||
{ href: "/ai-providers/cerebras", children: "Cerebras" },
|
||||
{ href: "/ai-providers/fireworks", children: "Fireworks AI" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Local & Self-Hosted",
|
||||
links: [
|
||||
{ href: "/ai-providers/ollama", children: "Ollama" },
|
||||
{ href: "/ai-providers/lmstudio", children: "LM Studio" },
|
||||
{ href: "/ai-providers/vscode-lm", children: "VS Code LM API" },
|
||||
{
|
||||
href: "/ai-providers/openai-compatible",
|
||||
children: "OpenAI Compatible",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Other Providers",
|
||||
links: [
|
||||
{ href: "/ai-providers/chutes-ai", children: "Chutes AI" },
|
||||
{ href: "/ai-providers/inception", children: "Inception" },
|
||||
{ href: "/ai-providers/minimax", children: "MiniMax" },
|
||||
{ href: "/ai-providers/moonshot", children: "Moonshot" },
|
||||
{ href: "/ai-providers/ovhcloud", children: "OVHcloud" },
|
||||
{ href: "/ai-providers/sap-ai-core", children: "SAP AI Core" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Special Modes",
|
||||
links: [
|
||||
{ href: "/ai-providers/v0", children: "v0" },
|
||||
{ href: "/ai-providers/human-relay", children: "Human Relay" },
|
||||
{ href: "/ai-providers/synthetic", children: "Synthetic Provider" },
|
||||
{
|
||||
href: "/ai-providers/virtual-quota-fallback",
|
||||
children: "Virtual Quota Fallback",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,61 +1,61 @@
|
||||
import { NavSection } from "../types"
|
||||
|
||||
export const AutomateNav: NavSection[] = [
|
||||
{
|
||||
title: "Agents",
|
||||
links: [
|
||||
{ href: "/automate", children: "Overview" },
|
||||
{ href: "/automate/integrations", children: "Integrations" },
|
||||
{
|
||||
href: "/automate/code-reviews/overview",
|
||||
children: "Code Reviews",
|
||||
subLinks: [
|
||||
{ href: "/automate/code-reviews/overview", children: "Overview" },
|
||||
{ href: "/automate/code-reviews/github", children: "GitHub" },
|
||||
{ href: "/automate/code-reviews/gitlab", children: "GitLab" },
|
||||
],
|
||||
},
|
||||
{ href: "/automate/agent-manager", children: "Agent Manager" },
|
||||
{ href: "/automate/kiloclaw", children: "KiloClaw" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Extending Kilo",
|
||||
links: [
|
||||
{ href: "/automate/extending/local-models", children: "Local Models" },
|
||||
{
|
||||
href: "/automate/extending/shell-integration",
|
||||
children: "Shell Integration",
|
||||
},
|
||||
{
|
||||
href: "/automate/extending/auto-launch",
|
||||
children: "Auto-launch Configuration",
|
||||
},
|
||||
{
|
||||
href: "/automate/mcp/overview",
|
||||
children: "MCP",
|
||||
subLinks: [
|
||||
{ href: "/automate/mcp/overview", children: "MCP Overview" },
|
||||
{
|
||||
href: "/automate/mcp/using-in-kilo-code",
|
||||
children: "Using MCP in Kilo Code",
|
||||
},
|
||||
{ href: "/automate/mcp/using-in-cli", children: "Using MCP in CLI" },
|
||||
{ href: "/automate/mcp/what-is-mcp", children: "What is MCP" },
|
||||
{
|
||||
href: "/automate/mcp/server-transports",
|
||||
children: "Server Transports",
|
||||
},
|
||||
{ href: "/automate/mcp/mcp-vs-api", children: "MCP vs API" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Tools",
|
||||
links: [
|
||||
{ href: "/automate/how-tools-work", children: "How Tools Work" },
|
||||
{ href: "/automate/tools", children: "Tools Details" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Agents",
|
||||
links: [
|
||||
{ href: "/automate", children: "Overview" },
|
||||
{ href: "/automate/integrations", children: "Integrations" },
|
||||
{
|
||||
href: "/automate/code-reviews/overview",
|
||||
children: "Code Reviews",
|
||||
subLinks: [
|
||||
{ href: "/automate/code-reviews/overview", children: "Overview" },
|
||||
{ href: "/automate/code-reviews/github", children: "GitHub" },
|
||||
{ href: "/automate/code-reviews/gitlab", children: "GitLab" },
|
||||
],
|
||||
},
|
||||
{ href: "/automate/agent-manager", children: "Agent Manager" },
|
||||
{ href: "/automate/kiloclaw", children: "KiloClaw" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Extending Kilo",
|
||||
links: [
|
||||
{ href: "/automate/extending/local-models", children: "Local Models" },
|
||||
{
|
||||
href: "/automate/extending/shell-integration",
|
||||
children: "Shell Integration",
|
||||
},
|
||||
{
|
||||
href: "/automate/extending/auto-launch",
|
||||
children: "Auto-launch Configuration",
|
||||
},
|
||||
{
|
||||
href: "/automate/mcp/overview",
|
||||
children: "MCP",
|
||||
subLinks: [
|
||||
{ href: "/automate/mcp/overview", children: "MCP Overview" },
|
||||
{
|
||||
href: "/automate/mcp/using-in-kilo-code",
|
||||
children: "Using MCP in Kilo Code",
|
||||
},
|
||||
{ href: "/automate/mcp/using-in-cli", children: "Using MCP in CLI" },
|
||||
{ href: "/automate/mcp/what-is-mcp", children: "What is MCP" },
|
||||
{
|
||||
href: "/automate/mcp/server-transports",
|
||||
children: "Server Transports",
|
||||
},
|
||||
{ href: "/automate/mcp/mcp-vs-api", children: "MCP vs API" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Tools",
|
||||
links: [
|
||||
{ href: "/automate/how-tools-work", children: "How Tools Work" },
|
||||
{ href: "/automate/tools", children: "Tools Details" },
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,89 +1,89 @@
|
||||
import { NavSection } from "../types"
|
||||
|
||||
export const CodeWithAiNav: NavSection[] = [
|
||||
{
|
||||
title: "Platforms",
|
||||
links: [
|
||||
{ href: "/code-with-ai", children: "Overview" },
|
||||
{ href: "/code-with-ai/platforms/vscode", children: "VS Code Extension" },
|
||||
{
|
||||
href: "/code-with-ai/platforms/jetbrains",
|
||||
children: "JetBrains Extension",
|
||||
},
|
||||
{ href: "/code-with-ai/platforms/cli", children: "CLI" },
|
||||
{ href: "/code-with-ai/platforms/cloud-agent", children: "Cloud Agent" },
|
||||
{ href: "/code-with-ai/platforms/mobile", children: "Mobile Apps" },
|
||||
{ href: "/code-with-ai/platforms/slack", children: "Slack" },
|
||||
{ href: "/code-with-ai/app-builder", children: "App Builder" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Chat & Context",
|
||||
links: [
|
||||
{
|
||||
href: "/code-with-ai/agents/chat-interface",
|
||||
children: "Chat Interface",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/agents/context-mentions",
|
||||
children: "Context & Mentions",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/agents/model-selection",
|
||||
children: "Model Selection",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/agents/auto-model",
|
||||
children: "Auto Model",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/agents/free-and-budget-models",
|
||||
children: "Free & Budget Models",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/agents/using-modes",
|
||||
children: "Modes",
|
||||
subLinks: [
|
||||
{ href: "/code-with-ai/agents/using-modes", children: "Using Modes" },
|
||||
{
|
||||
href: "/code-with-ai/agents/orchestrator-mode",
|
||||
children: "Orchestrator Mode",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Productivity Tools",
|
||||
links: [
|
||||
{
|
||||
href: "/code-with-ai/features/autocomplete",
|
||||
children: "Autocomplete",
|
||||
subLinks: [{ href: "/code-with-ai/features/autocomplete/mistral-setup", children: "Mistral Setup" }],
|
||||
},
|
||||
{ href: "/code-with-ai/features/code-actions", children: "Code Actions" },
|
||||
{
|
||||
href: "/code-with-ai/features/enhance-prompt",
|
||||
children: "Enhance Prompt",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/features/git-commit-generation",
|
||||
children: "Git Commit Generation",
|
||||
},
|
||||
{ href: "/code-with-ai/features/speech-to-text", children: "Voice Transcription" },
|
||||
{
|
||||
href: "/code-with-ai/features/browser-use",
|
||||
children: "Agent Behavior",
|
||||
subLinks: [
|
||||
{ href: "/code-with-ai/features/browser-use", children: "Browser Use" },
|
||||
{ href: "/code-with-ai/features/fast-edits", children: "Fast Edits" },
|
||||
{
|
||||
href: "/code-with-ai/features/task-todo-list",
|
||||
children: "Task Todo List",
|
||||
},
|
||||
{ href: "/code-with-ai/features/checkpoints", children: "Checkpoints" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Platforms",
|
||||
links: [
|
||||
{ href: "/code-with-ai", children: "Overview" },
|
||||
{ href: "/code-with-ai/platforms/vscode", children: "VS Code Extension" },
|
||||
{
|
||||
href: "/code-with-ai/platforms/jetbrains",
|
||||
children: "JetBrains Extension",
|
||||
},
|
||||
{ href: "/code-with-ai/platforms/cli", children: "CLI" },
|
||||
{ href: "/code-with-ai/platforms/cloud-agent", children: "Cloud Agent" },
|
||||
{ href: "/code-with-ai/platforms/mobile", children: "Mobile Apps" },
|
||||
{ href: "/code-with-ai/platforms/slack", children: "Slack" },
|
||||
{ href: "/code-with-ai/app-builder", children: "App Builder" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Chat & Context",
|
||||
links: [
|
||||
{
|
||||
href: "/code-with-ai/agents/chat-interface",
|
||||
children: "Chat Interface",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/agents/context-mentions",
|
||||
children: "Context & Mentions",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/agents/model-selection",
|
||||
children: "Model Selection",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/agents/auto-model",
|
||||
children: "Auto Model",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/agents/free-and-budget-models",
|
||||
children: "Free & Budget Models",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/agents/using-modes",
|
||||
children: "Modes",
|
||||
subLinks: [
|
||||
{ href: "/code-with-ai/agents/using-modes", children: "Using Modes" },
|
||||
{
|
||||
href: "/code-with-ai/agents/orchestrator-mode",
|
||||
children: "Orchestrator Mode",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Productivity Tools",
|
||||
links: [
|
||||
{
|
||||
href: "/code-with-ai/features/autocomplete",
|
||||
children: "Autocomplete",
|
||||
subLinks: [{ href: "/code-with-ai/features/autocomplete/mistral-setup", children: "Mistral Setup" }],
|
||||
},
|
||||
{ href: "/code-with-ai/features/code-actions", children: "Code Actions" },
|
||||
{
|
||||
href: "/code-with-ai/features/enhance-prompt",
|
||||
children: "Enhance Prompt",
|
||||
},
|
||||
{
|
||||
href: "/code-with-ai/features/git-commit-generation",
|
||||
children: "Git Commit Generation",
|
||||
},
|
||||
{ href: "/code-with-ai/features/speech-to-text", children: "Voice Transcription" },
|
||||
{
|
||||
href: "/code-with-ai/features/browser-use",
|
||||
children: "Agent Behavior",
|
||||
subLinks: [
|
||||
{ href: "/code-with-ai/features/browser-use", children: "Browser Use" },
|
||||
{ href: "/code-with-ai/features/fast-edits", children: "Fast Edits" },
|
||||
{
|
||||
href: "/code-with-ai/features/task-todo-list",
|
||||
children: "Task Todo List",
|
||||
},
|
||||
{ href: "/code-with-ai/features/checkpoints", children: "Checkpoints" },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,66 +1,66 @@
|
||||
import { NavSection } from "../types"
|
||||
|
||||
export const CollaborateNav: NavSection[] = [
|
||||
{
|
||||
title: "Sharing",
|
||||
links: [
|
||||
{ href: "/collaborate", children: "Overview" },
|
||||
{ href: "/collaborate/sessions-sharing", children: "Sessions & Sharing" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Kilo for Teams",
|
||||
links: [
|
||||
{ href: "/collaborate/teams/about-plans", children: "About Plans" },
|
||||
{
|
||||
href: "/collaborate/teams/getting-started",
|
||||
children: "Getting Started with Teams",
|
||||
},
|
||||
{ href: "/collaborate/teams/dashboard", children: "Dashboard" },
|
||||
{
|
||||
href: "/collaborate/teams/team-management",
|
||||
children: "Team Management",
|
||||
},
|
||||
{
|
||||
href: "/collaborate/teams/custom-modes-org",
|
||||
children: "Custom Modes (Org)",
|
||||
},
|
||||
{ href: "/collaborate/teams/billing", children: "Billing" },
|
||||
{ href: "/collaborate/teams/analytics", children: "Analytics" },
|
||||
{
|
||||
href: "/collaborate/adoption-dashboard/overview",
|
||||
children: "AI Adoption Dashboard",
|
||||
subLinks: [
|
||||
{
|
||||
href: "/collaborate/adoption-dashboard/overview",
|
||||
children: "Overview",
|
||||
},
|
||||
{
|
||||
href: "/collaborate/adoption-dashboard/understanding-your-score",
|
||||
children: "Understanding Your Score",
|
||||
},
|
||||
{
|
||||
href: "/collaborate/adoption-dashboard/improving-your-score",
|
||||
children: "Improving Your Score",
|
||||
},
|
||||
{
|
||||
href: "/collaborate/adoption-dashboard/for-team-leads",
|
||||
children: "For Team Leads",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Enterprise",
|
||||
links: [
|
||||
{ href: "/collaborate/enterprise/sso", children: "SSO" },
|
||||
{
|
||||
href: "/collaborate/enterprise/model-access-controls",
|
||||
children: "Model Access Controls",
|
||||
},
|
||||
{ href: "/collaborate/enterprise/audit-logs", children: "Audit Logs" },
|
||||
{ href: "/collaborate/enterprise/migration", children: "Migration" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Sharing",
|
||||
links: [
|
||||
{ href: "/collaborate", children: "Overview" },
|
||||
{ href: "/collaborate/sessions-sharing", children: "Sessions & Sharing" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Kilo for Teams",
|
||||
links: [
|
||||
{ href: "/collaborate/teams/about-plans", children: "About Plans" },
|
||||
{
|
||||
href: "/collaborate/teams/getting-started",
|
||||
children: "Getting Started with Teams",
|
||||
},
|
||||
{ href: "/collaborate/teams/dashboard", children: "Dashboard" },
|
||||
{
|
||||
href: "/collaborate/teams/team-management",
|
||||
children: "Team Management",
|
||||
},
|
||||
{
|
||||
href: "/collaborate/teams/custom-modes-org",
|
||||
children: "Custom Modes (Org)",
|
||||
},
|
||||
{ href: "/collaborate/teams/billing", children: "Billing" },
|
||||
{ href: "/collaborate/teams/analytics", children: "Analytics" },
|
||||
{
|
||||
href: "/collaborate/adoption-dashboard/overview",
|
||||
children: "AI Adoption Dashboard",
|
||||
subLinks: [
|
||||
{
|
||||
href: "/collaborate/adoption-dashboard/overview",
|
||||
children: "Overview",
|
||||
},
|
||||
{
|
||||
href: "/collaborate/adoption-dashboard/understanding-your-score",
|
||||
children: "Understanding Your Score",
|
||||
},
|
||||
{
|
||||
href: "/collaborate/adoption-dashboard/improving-your-score",
|
||||
children: "Improving Your Score",
|
||||
},
|
||||
{
|
||||
href: "/collaborate/adoption-dashboard/for-team-leads",
|
||||
children: "For Team Leads",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Enterprise",
|
||||
links: [
|
||||
{ href: "/collaborate/enterprise/sso", children: "SSO" },
|
||||
{
|
||||
href: "/collaborate/enterprise/model-access-controls",
|
||||
children: "Model Access Controls",
|
||||
},
|
||||
{ href: "/collaborate/enterprise/audit-logs", children: "Audit Logs" },
|
||||
{ href: "/collaborate/enterprise/migration", children: "Migration" },
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,85 +1,85 @@
|
||||
import { NavSection } from "../types"
|
||||
|
||||
export const ContributingNav: NavSection[] = [
|
||||
{
|
||||
title: "Getting Started",
|
||||
links: [
|
||||
{ href: "/contributing", children: "Contributing Overview" },
|
||||
{
|
||||
href: "/contributing/development-environment",
|
||||
children: "Development Environment",
|
||||
},
|
||||
{
|
||||
href: "/contributing/ecosystem",
|
||||
children: "Ecosystem",
|
||||
},
|
||||
{
|
||||
href: "/contributing/cline-to-kilo-migration",
|
||||
children: "Cline to Kilo Migration",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Architecture",
|
||||
links: [
|
||||
{
|
||||
href: "/contributing/architecture",
|
||||
children: "Architecture Overview",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/features",
|
||||
children: "Features",
|
||||
subLinks: [
|
||||
{
|
||||
href: "/contributing/architecture/agent-observability",
|
||||
children: "Agent Observability",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/annual-billing",
|
||||
children: "Annual Billing",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/benchmarking",
|
||||
children: "Benchmarking",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/enterprise-mcp-controls",
|
||||
children: "Enterprise MCP Controls",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/mcp-oauth-authorization",
|
||||
children: "MCP OAuth Authorization",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/model-provider-blocklist",
|
||||
children: "Model/Provider Blocklist",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/onboarding-improvements",
|
||||
children: "Onboarding Improvements",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/organization-modes-library",
|
||||
children: "Organization Modes Library",
|
||||
},
|
||||
{
|
||||
href: "/deploy-secure/security-reviews",
|
||||
children: "Agentic Security Reviews",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/track-repo-url",
|
||||
children: "Track Repo URL",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/vercel-ai-gateway",
|
||||
children: "Vercel AI Gateway",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/voice-transcription",
|
||||
children: "Voice Transcription",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Getting Started",
|
||||
links: [
|
||||
{ href: "/contributing", children: "Contributing Overview" },
|
||||
{
|
||||
href: "/contributing/development-environment",
|
||||
children: "Development Environment",
|
||||
},
|
||||
{
|
||||
href: "/contributing/ecosystem",
|
||||
children: "Ecosystem",
|
||||
},
|
||||
{
|
||||
href: "/contributing/cline-to-kilo-migration",
|
||||
children: "Cline to Kilo Migration",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Architecture",
|
||||
links: [
|
||||
{
|
||||
href: "/contributing/architecture",
|
||||
children: "Architecture Overview",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/features",
|
||||
children: "Features",
|
||||
subLinks: [
|
||||
{
|
||||
href: "/contributing/architecture/agent-observability",
|
||||
children: "Agent Observability",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/annual-billing",
|
||||
children: "Annual Billing",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/benchmarking",
|
||||
children: "Benchmarking",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/enterprise-mcp-controls",
|
||||
children: "Enterprise MCP Controls",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/mcp-oauth-authorization",
|
||||
children: "MCP OAuth Authorization",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/model-provider-blocklist",
|
||||
children: "Model/Provider Blocklist",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/onboarding-improvements",
|
||||
children: "Onboarding Improvements",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/organization-modes-library",
|
||||
children: "Organization Modes Library",
|
||||
},
|
||||
{
|
||||
href: "/deploy-secure/security-reviews",
|
||||
children: "Agentic Security Reviews",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/track-repo-url",
|
||||
children: "Track Repo URL",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/vercel-ai-gateway",
|
||||
children: "Vercel AI Gateway",
|
||||
},
|
||||
{
|
||||
href: "/contributing/architecture/voice-transcription",
|
||||
children: "Voice Transcription",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
import { NavSection } from "../types"
|
||||
|
||||
export const CustomizeNav: NavSection[] = [
|
||||
{
|
||||
title: "Customization",
|
||||
links: [
|
||||
{ href: "/customize", children: "Overview" },
|
||||
{
|
||||
href: "/customize/custom-modes",
|
||||
children: "Custom Modes",
|
||||
},
|
||||
{
|
||||
href: "/customize/custom-rules",
|
||||
children: "Custom Rules",
|
||||
},
|
||||
{
|
||||
href: "/customize/custom-instructions",
|
||||
children: "Custom Instructions",
|
||||
},
|
||||
{ href: "/customize/agents-md", children: "agents.md" },
|
||||
{ href: "/customize/workflows", children: "Workflows" },
|
||||
{ href: "/customize/skills", children: "Skills" },
|
||||
{
|
||||
href: "/customize/prompt-engineering",
|
||||
children: "Prompt Engineering",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Context & Indexing",
|
||||
links: [
|
||||
{
|
||||
href: "/customize/context/codebase-indexing",
|
||||
children: "Codebase Indexing",
|
||||
},
|
||||
{
|
||||
href: "/customize/context/context-condensing",
|
||||
children: "Context Condensing",
|
||||
},
|
||||
{
|
||||
href: "/customize/context/kilocodeignore",
|
||||
children: ".kilocodeignore",
|
||||
},
|
||||
{ href: "/customize/context/memory-bank", children: "Memory Bank" },
|
||||
{
|
||||
href: "/customize/context/large-projects",
|
||||
children: "Large Projects",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Customization",
|
||||
links: [
|
||||
{ href: "/customize", children: "Overview" },
|
||||
{
|
||||
href: "/customize/custom-modes",
|
||||
children: "Custom Modes",
|
||||
},
|
||||
{
|
||||
href: "/customize/custom-rules",
|
||||
children: "Custom Rules",
|
||||
},
|
||||
{
|
||||
href: "/customize/custom-instructions",
|
||||
children: "Custom Instructions",
|
||||
},
|
||||
{ href: "/customize/agents-md", children: "agents.md" },
|
||||
{ href: "/customize/workflows", children: "Workflows" },
|
||||
{ href: "/customize/skills", children: "Skills" },
|
||||
{
|
||||
href: "/customize/prompt-engineering",
|
||||
children: "Prompt Engineering",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Context & Indexing",
|
||||
links: [
|
||||
{
|
||||
href: "/customize/context/codebase-indexing",
|
||||
children: "Codebase Indexing",
|
||||
},
|
||||
{
|
||||
href: "/customize/context/context-condensing",
|
||||
children: "Context Condensing",
|
||||
},
|
||||
{
|
||||
href: "/customize/context/kilocodeignore",
|
||||
children: ".kilocodeignore",
|
||||
},
|
||||
{ href: "/customize/context/memory-bank", children: "Memory Bank" },
|
||||
{
|
||||
href: "/customize/context/large-projects",
|
||||
children: "Large Projects",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { NavSection } from "../types"
|
||||
|
||||
export const DeploySecureNav: NavSection[] = [
|
||||
{
|
||||
title: "Deployment",
|
||||
links: [
|
||||
{ href: "/deploy-secure", children: "Overview" },
|
||||
{ href: "/deploy-secure/deploy", children: "Deploy" },
|
||||
{ href: "/deploy-secure/managed-indexing", children: "Managed Indexing" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Security",
|
||||
links: [{ href: "/deploy-secure/security-reviews", children: "Security Reviews" }],
|
||||
},
|
||||
{
|
||||
title: "Deployment",
|
||||
links: [
|
||||
{ href: "/deploy-secure", children: "Overview" },
|
||||
{ href: "/deploy-secure/deploy", children: "Deploy" },
|
||||
{ href: "/deploy-secure/managed-indexing", children: "Managed Indexing" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Security",
|
||||
links: [{ href: "/deploy-secure/security-reviews", children: "Security Reviews" }],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
import { NavSection } from "../types"
|
||||
|
||||
export const GatewayNav: NavSection[] = [
|
||||
{
|
||||
title: "Introduction",
|
||||
links: [
|
||||
{ href: "/gateway", children: "Overview" },
|
||||
{ href: "/gateway/quickstart", children: "Quickstart" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Configuration",
|
||||
links: [
|
||||
{ href: "/gateway/authentication", children: "Authentication" },
|
||||
{ href: "/gateway/models-and-providers", children: "Models & Providers" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Features",
|
||||
links: [
|
||||
{ href: "/gateway/streaming", children: "Streaming" },
|
||||
{ href: "/gateway/usage-and-billing", children: "Usage & Billing" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Reference",
|
||||
links: [
|
||||
{ href: "/gateway/api-reference", children: "API Reference" },
|
||||
{ href: "/gateway/sdks-and-frameworks", children: "SDKs & Frameworks" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Introduction",
|
||||
links: [
|
||||
{ href: "/gateway", children: "Overview" },
|
||||
{ href: "/gateway/quickstart", children: "Quickstart" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Configuration",
|
||||
links: [
|
||||
{ href: "/gateway/authentication", children: "Authentication" },
|
||||
{ href: "/gateway/models-and-providers", children: "Models & Providers" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Features",
|
||||
links: [
|
||||
{ href: "/gateway/streaming", children: "Streaming" },
|
||||
{ href: "/gateway/usage-and-billing", children: "Usage & Billing" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Reference",
|
||||
links: [
|
||||
{ href: "/gateway/api-reference", children: "API Reference" },
|
||||
{ href: "/gateway/sdks-and-frameworks", children: "SDKs & Frameworks" },
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,75 +1,75 @@
|
||||
import { NavSection } from "../types"
|
||||
|
||||
export const GettingStartedNav: NavSection[] = [
|
||||
{
|
||||
title: "Introduction",
|
||||
links: [
|
||||
{ href: "/getting-started", children: "Overview" },
|
||||
{ href: "/getting-started/installing", children: "Installation" },
|
||||
{ href: "/getting-started/quickstart", children: "Quickstart" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Configuration",
|
||||
links: [
|
||||
{
|
||||
href: "/getting-started/setup-authentication",
|
||||
children: "Setup & Authentication",
|
||||
},
|
||||
{
|
||||
href: "/getting-started/using-kilo-for-free",
|
||||
children: "Using Kilo for Free",
|
||||
},
|
||||
{
|
||||
href: "/getting-started/byok",
|
||||
children: "Bring Your Own Key (BYOK)",
|
||||
},
|
||||
{ href: "/ai-providers", children: "AI Providers" },
|
||||
{
|
||||
href: "/getting-started/settings",
|
||||
children: "Settings",
|
||||
subLinks: [
|
||||
{ href: "/getting-started/settings/auto-approving-actions", children: "Auto-Approving Actions" },
|
||||
{ href: "/getting-started/settings/auto-cleanup", children: "Auto Cleanup" },
|
||||
{ href: "/getting-started/settings/system-notifications", children: "System Notifications" },
|
||||
],
|
||||
},
|
||||
{ href: "/getting-started/adding-credits", children: "Adding Credits" },
|
||||
{ href: "/getting-started/rate-limits-and-costs", children: "Rate Limits and Costs" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Help",
|
||||
links: [
|
||||
{
|
||||
href: "/getting-started/faq",
|
||||
children: "FAQ",
|
||||
subLinks: [
|
||||
{ href: "/getting-started/faq/general", children: "General" },
|
||||
{ href: "/getting-started/faq/setup-and-installation", children: "Setup and Installation" },
|
||||
{ href: "/getting-started/faq/credits-and-billing", children: "Credits and Billing" },
|
||||
{ href: "/getting-started/faq/account-and-integration", children: "Account and Integration" },
|
||||
{ href: "/getting-started/faq/known-issues", children: "Known Issues" },
|
||||
],
|
||||
},
|
||||
{
|
||||
href: "/getting-started/migrating",
|
||||
children: "Migrating from Cursor",
|
||||
},
|
||||
{
|
||||
href: "/getting-started/troubleshooting",
|
||||
children: "Troubleshooting",
|
||||
subLinks: [
|
||||
{
|
||||
href: "/getting-started/troubleshooting/troubleshooting-extension",
|
||||
children: "Extension Troubleshooting",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
href: "/getting-started/using-docs-with-agents",
|
||||
children: "Using Docs with Agents",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Introduction",
|
||||
links: [
|
||||
{ href: "/getting-started", children: "Overview" },
|
||||
{ href: "/getting-started/installing", children: "Installation" },
|
||||
{ href: "/getting-started/quickstart", children: "Quickstart" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Configuration",
|
||||
links: [
|
||||
{
|
||||
href: "/getting-started/setup-authentication",
|
||||
children: "Setup & Authentication",
|
||||
},
|
||||
{
|
||||
href: "/getting-started/using-kilo-for-free",
|
||||
children: "Using Kilo for Free",
|
||||
},
|
||||
{
|
||||
href: "/getting-started/byok",
|
||||
children: "Bring Your Own Key (BYOK)",
|
||||
},
|
||||
{ href: "/ai-providers", children: "AI Providers" },
|
||||
{
|
||||
href: "/getting-started/settings",
|
||||
children: "Settings",
|
||||
subLinks: [
|
||||
{ href: "/getting-started/settings/auto-approving-actions", children: "Auto-Approving Actions" },
|
||||
{ href: "/getting-started/settings/auto-cleanup", children: "Auto Cleanup" },
|
||||
{ href: "/getting-started/settings/system-notifications", children: "System Notifications" },
|
||||
],
|
||||
},
|
||||
{ href: "/getting-started/adding-credits", children: "Adding Credits" },
|
||||
{ href: "/getting-started/rate-limits-and-costs", children: "Rate Limits and Costs" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Help",
|
||||
links: [
|
||||
{
|
||||
href: "/getting-started/faq",
|
||||
children: "FAQ",
|
||||
subLinks: [
|
||||
{ href: "/getting-started/faq/general", children: "General" },
|
||||
{ href: "/getting-started/faq/setup-and-installation", children: "Setup and Installation" },
|
||||
{ href: "/getting-started/faq/credits-and-billing", children: "Credits and Billing" },
|
||||
{ href: "/getting-started/faq/account-and-integration", children: "Account and Integration" },
|
||||
{ href: "/getting-started/faq/known-issues", children: "Known Issues" },
|
||||
],
|
||||
},
|
||||
{
|
||||
href: "/getting-started/migrating",
|
||||
children: "Migrating from Cursor",
|
||||
},
|
||||
{
|
||||
href: "/getting-started/troubleshooting",
|
||||
children: "Troubleshooting",
|
||||
subLinks: [
|
||||
{
|
||||
href: "/getting-started/troubleshooting/troubleshooting-extension",
|
||||
children: "Extension Troubleshooting",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
href: "/getting-started/using-docs-with-agents",
|
||||
children: "Using Docs with Agents",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -10,14 +10,14 @@ import { GettingStartedNav } from "./getting-started"
|
||||
import { ToolsNav } from "./tools"
|
||||
|
||||
export const Nav = {
|
||||
GettingStartedNav,
|
||||
CodeWithAiNav,
|
||||
CustomizeNav,
|
||||
CollaborateNav,
|
||||
AutomateNav,
|
||||
DeploySecureNav,
|
||||
ContributingNav,
|
||||
AiProvidersNav,
|
||||
GatewayNav,
|
||||
ToolsNav,
|
||||
GettingStartedNav,
|
||||
CodeWithAiNav,
|
||||
CustomizeNav,
|
||||
CollaborateNav,
|
||||
AutomateNav,
|
||||
DeploySecureNav,
|
||||
ContributingNav,
|
||||
AiProvidersNav,
|
||||
GatewayNav,
|
||||
ToolsNav,
|
||||
}
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
import { NavSection } from "../types"
|
||||
|
||||
export const ToolsNav: NavSection[] = [
|
||||
{
|
||||
title: "Tools",
|
||||
links: [{ href: "/automate/tools", children: "Overview" }],
|
||||
},
|
||||
{
|
||||
title: "Read Tools",
|
||||
links: [
|
||||
{ href: "/automate/tools/read-file", children: "read_file" },
|
||||
{ href: "/automate/tools/search-files", children: "search_files" },
|
||||
{ href: "/automate/tools/list-files", children: "list_files" },
|
||||
{ href: "/automate/tools/list-code-definition-names", children: "list_code_definition_names" },
|
||||
{ href: "/automate/tools/codebase-search", children: "codebase_search" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Edit Tools",
|
||||
links: [
|
||||
{ href: "/automate/tools/apply-diff", children: "apply_diff" },
|
||||
{ href: "/automate/tools/delete-file", children: "delete_file" },
|
||||
{ href: "/automate/tools/write-to-file", children: "write_to_file" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Browser Tools",
|
||||
links: [{ href: "/automate/tools/browser-action", children: "browser_action" }],
|
||||
},
|
||||
{
|
||||
title: "Command Tools",
|
||||
links: [{ href: "/automate/tools/execute-command", children: "execute_command" }],
|
||||
},
|
||||
{
|
||||
title: "MCP Tools",
|
||||
links: [
|
||||
{ href: "/automate/tools/use-mcp-tool", children: "use_mcp_tool" },
|
||||
{ href: "/automate/tools/access-mcp-resource", children: "access_mcp_resource" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Workflow Tools",
|
||||
links: [
|
||||
{ href: "/automate/tools/switch-mode", children: "switch_mode" },
|
||||
{ href: "/automate/tools/new-task", children: "new_task" },
|
||||
{ href: "/automate/tools/ask-followup-question", children: "ask_followup_question" },
|
||||
{ href: "/automate/tools/attempt-completion", children: "attempt_completion" },
|
||||
{ href: "/automate/tools/update-todo-list", children: "update_todo_list" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Tools",
|
||||
links: [{ href: "/automate/tools", children: "Overview" }],
|
||||
},
|
||||
{
|
||||
title: "Read Tools",
|
||||
links: [
|
||||
{ href: "/automate/tools/read-file", children: "read_file" },
|
||||
{ href: "/automate/tools/search-files", children: "search_files" },
|
||||
{ href: "/automate/tools/list-files", children: "list_files" },
|
||||
{ href: "/automate/tools/list-code-definition-names", children: "list_code_definition_names" },
|
||||
{ href: "/automate/tools/codebase-search", children: "codebase_search" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Edit Tools",
|
||||
links: [
|
||||
{ href: "/automate/tools/apply-diff", children: "apply_diff" },
|
||||
{ href: "/automate/tools/delete-file", children: "delete_file" },
|
||||
{ href: "/automate/tools/write-to-file", children: "write_to_file" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Browser Tools",
|
||||
links: [{ href: "/automate/tools/browser-action", children: "browser_action" }],
|
||||
},
|
||||
{
|
||||
title: "Command Tools",
|
||||
links: [{ href: "/automate/tools/execute-command", children: "execute_command" }],
|
||||
},
|
||||
{
|
||||
title: "MCP Tools",
|
||||
links: [
|
||||
{ href: "/automate/tools/use-mcp-tool", children: "use_mcp_tool" },
|
||||
{ href: "/automate/tools/access-mcp-resource", children: "access_mcp_resource" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Workflow Tools",
|
||||
links: [
|
||||
{ href: "/automate/tools/switch-mode", children: "switch_mode" },
|
||||
{ href: "/automate/tools/new-task", children: "new_task" },
|
||||
{ href: "/automate/tools/ask-followup-question", children: "ask_followup_question" },
|
||||
{ href: "/automate/tools/attempt-completion", children: "attempt_completion" },
|
||||
{ href: "/automate/tools/update-todo-list", children: "update_todo_list" },
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
export interface NavLink {
|
||||
href: string
|
||||
children: string
|
||||
subLinks?: NavLink[] // Optional nested links for second-level navigation
|
||||
href: string
|
||||
children: string
|
||||
subLinks?: NavLink[] // Optional nested links for second-level navigation
|
||||
}
|
||||
|
||||
export interface NavSection {
|
||||
title: string
|
||||
links: NavLink[]
|
||||
title: string
|
||||
links: NavLink[]
|
||||
}
|
||||
|
||||
export interface SectionNav {
|
||||
[key: string]: NavSection[]
|
||||
[key: string]: NavSection[]
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/* Use this file to export your Markdoc functions */
|
||||
|
||||
export const includes = {
|
||||
transform(parameters) {
|
||||
const [array, value] = Object.values(parameters)
|
||||
transform(parameters) {
|
||||
const [array, value] = Object.values(parameters)
|
||||
|
||||
return Array.isArray(array) ? array.includes(value) : false
|
||||
},
|
||||
return Array.isArray(array) ? array.includes(value) : false
|
||||
},
|
||||
}
|
||||
|
||||
export const upper = {
|
||||
transform(parameters) {
|
||||
const string = parameters[0]
|
||||
return typeof string === "string" ? string.toUpperCase() : string
|
||||
},
|
||||
transform(parameters) {
|
||||
const string = parameters[0]
|
||||
return typeof string === "string" ? string.toUpperCase() : string
|
||||
},
|
||||
}
|
||||
|
||||
@@ -2,6 +2,6 @@ import { nodes } from "@markdoc/markdoc"
|
||||
import { CodeBlock } from "../../components"
|
||||
|
||||
export const fence = {
|
||||
render: CodeBlock,
|
||||
attributes: nodes.fence.attributes,
|
||||
render: CodeBlock,
|
||||
attributes: nodes.fence.attributes,
|
||||
}
|
||||
|
||||
@@ -3,30 +3,30 @@ import { Tag } from "@markdoc/markdoc"
|
||||
import { Heading } from "../../components"
|
||||
|
||||
function generateID(children, attributes) {
|
||||
if (attributes.id && typeof attributes.id === "string") {
|
||||
return attributes.id
|
||||
}
|
||||
return children
|
||||
.filter((child) => typeof child === "string")
|
||||
.join(" ")
|
||||
.replace(/[?]/g, "")
|
||||
.replace(/\s+/g, "-")
|
||||
.toLowerCase()
|
||||
if (attributes.id && typeof attributes.id === "string") {
|
||||
return attributes.id
|
||||
}
|
||||
return children
|
||||
.filter((child) => typeof child === "string")
|
||||
.join(" ")
|
||||
.replace(/[?]/g, "")
|
||||
.replace(/\s+/g, "-")
|
||||
.toLowerCase()
|
||||
}
|
||||
|
||||
export const heading = {
|
||||
render: Heading,
|
||||
children: ["inline"],
|
||||
attributes: {
|
||||
id: { type: String },
|
||||
level: { type: Number, required: true, default: 1 },
|
||||
className: { type: String },
|
||||
},
|
||||
transform(node, config) {
|
||||
const attributes = node.transformAttributes(config)
|
||||
const children = node.transformChildren(config)
|
||||
const id = generateID(children, attributes)
|
||||
render: Heading,
|
||||
children: ["inline"],
|
||||
attributes: {
|
||||
id: { type: String },
|
||||
level: { type: Number, required: true, default: 1 },
|
||||
className: { type: String },
|
||||
},
|
||||
transform(node, config) {
|
||||
const attributes = node.transformAttributes(config)
|
||||
const children = node.transformChildren(config)
|
||||
const id = generateID(children, attributes)
|
||||
|
||||
return new Tag(this.render, { ...attributes, id }, children)
|
||||
},
|
||||
return new Tag(this.render, { ...attributes, id }, children)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -2,40 +2,40 @@ import { nodes } from "@markdoc/markdoc"
|
||||
import { Table, THead, TBody, Tr, Th, Td } from "../../components/Table"
|
||||
|
||||
export const table = {
|
||||
...nodes.table,
|
||||
render: Table,
|
||||
...nodes.table,
|
||||
render: Table,
|
||||
}
|
||||
|
||||
export const thead = {
|
||||
...nodes.thead,
|
||||
render: THead,
|
||||
...nodes.thead,
|
||||
render: THead,
|
||||
}
|
||||
|
||||
export const tbody = {
|
||||
...nodes.tbody,
|
||||
render: TBody,
|
||||
...nodes.tbody,
|
||||
render: TBody,
|
||||
}
|
||||
|
||||
export const tr = {
|
||||
...nodes.tr,
|
||||
render: Tr,
|
||||
...nodes.tr,
|
||||
render: Tr,
|
||||
}
|
||||
|
||||
export const th = {
|
||||
...nodes.th,
|
||||
render: Th,
|
||||
attributes: {
|
||||
...nodes.th.attributes,
|
||||
width: { type: String },
|
||||
},
|
||||
...nodes.th,
|
||||
render: Th,
|
||||
attributes: {
|
||||
...nodes.th.attributes,
|
||||
width: { type: String },
|
||||
},
|
||||
}
|
||||
|
||||
export const td = {
|
||||
...nodes.td,
|
||||
render: Td,
|
||||
attributes: {
|
||||
...nodes.td.attributes,
|
||||
colspan: { type: Number },
|
||||
rowspan: { type: Number },
|
||||
},
|
||||
...nodes.td,
|
||||
render: Td,
|
||||
attributes: {
|
||||
...nodes.td.attributes,
|
||||
colspan: { type: Number },
|
||||
rowspan: { type: Number },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,14 +5,13 @@ Kilo Code supports all JetBrains IDEs including IntelliJ IDEA, WebStorm, PyCharm
|
||||
Before installing the Kilo Code plugin, ensure you have:
|
||||
|
||||
1. **JetBrains Toolbox (Recommended):**
|
||||
|
||||
- Download from [https://www.jetbrains.com/toolbox-app/](https://www.jetbrains.com/toolbox-app/)
|
||||
- Toolbox is required for authentication callbacks to work properly
|
||||
- Without Toolbox, you'll need to manually configure API keys
|
||||
- Download from [https://www.jetbrains.com/toolbox-app/](https://www.jetbrains.com/toolbox-app/)
|
||||
- Toolbox is required for authentication callbacks to work properly
|
||||
- Without Toolbox, you'll need to manually configure API keys
|
||||
|
||||
2. **Node.js:**
|
||||
- Download LTS version from [https://nodejs.org/](https://nodejs.org/)
|
||||
- Required for the extension's backend services
|
||||
- Download LTS version from [https://nodejs.org/](https://nodejs.org/)
|
||||
- Required for the extension's backend services
|
||||
|
||||
### Install directly
|
||||
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
import { Callout } from "../../components"
|
||||
|
||||
export const callout = {
|
||||
render: Callout,
|
||||
children: ["paragraph", "tag", "list"],
|
||||
attributes: {
|
||||
title: {
|
||||
type: String,
|
||||
description: "Optional custom title for the callout",
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: "note",
|
||||
matches: ["generic", "note", "tip", "info", "warning", "danger"],
|
||||
description: "The type of callout: generic (no icon/title), note, tip, info, warning, or danger",
|
||||
},
|
||||
collapsed: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
description: "When true, the callout starts collapsed and can be expanded by clicking the header",
|
||||
},
|
||||
},
|
||||
render: Callout,
|
||||
children: ["paragraph", "tag", "list"],
|
||||
attributes: {
|
||||
title: {
|
||||
type: String,
|
||||
description: "Optional custom title for the callout",
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: "note",
|
||||
matches: ["generic", "note", "tip", "info", "warning", "danger"],
|
||||
description: "The type of callout: generic (no icon/title), note, tip, info, warning, or danger",
|
||||
},
|
||||
collapsed: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
description: "When true, the callout starts collapsed and can be expanded by clicking the header",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
import { Codicon } from "../../components"
|
||||
|
||||
export const codicon = {
|
||||
render: Codicon,
|
||||
selfClosing: true,
|
||||
attributes: {
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
description: "The name of the VS Code codicon (e.g., 'send', 'check', 'warning')",
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: "1em",
|
||||
description: "The size of the icon (CSS font-size value)",
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: "",
|
||||
description: "Additional CSS classes to apply to the icon",
|
||||
},
|
||||
},
|
||||
render: Codicon,
|
||||
selfClosing: true,
|
||||
attributes: {
|
||||
name: {
|
||||
type: String,
|
||||
required: true,
|
||||
description: "The name of the VS Code codicon (e.g., 'send', 'check', 'warning')",
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: "1em",
|
||||
description: "The size of the icon (CSS font-size value)",
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: "",
|
||||
description: "Additional CSS classes to apply to the icon",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
import { Icon } from "../../components"
|
||||
|
||||
export const icon = {
|
||||
render: Icon,
|
||||
selfClosing: true,
|
||||
attributes: {
|
||||
src: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
srcDark: {
|
||||
type: String,
|
||||
description: "Optional image source for dark mode. Falls back to src if not provided.",
|
||||
},
|
||||
alt: {
|
||||
type: String,
|
||||
default: "icon",
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: "1.2em",
|
||||
},
|
||||
},
|
||||
render: Icon,
|
||||
selfClosing: true,
|
||||
attributes: {
|
||||
src: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
srcDark: {
|
||||
type: String,
|
||||
description: "Optional image source for dark mode. Falls back to src if not provided.",
|
||||
},
|
||||
alt: {
|
||||
type: String,
|
||||
default: "icon",
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: "1.2em",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
import { Image } from "../../components"
|
||||
|
||||
export const image = {
|
||||
render: Image,
|
||||
selfClosing: true,
|
||||
attributes: {
|
||||
src: {
|
||||
type: String,
|
||||
required: true,
|
||||
description: "The image source URL",
|
||||
},
|
||||
alt: {
|
||||
type: String,
|
||||
required: true,
|
||||
description: "Alternative text for the image",
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
description: "Width of the image (e.g., '500px', '80%')",
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
description: "Height of the image (e.g., '300px', 'auto')",
|
||||
},
|
||||
caption: {
|
||||
type: String,
|
||||
description: "Optional caption displayed below the image",
|
||||
},
|
||||
},
|
||||
render: Image,
|
||||
selfClosing: true,
|
||||
attributes: {
|
||||
src: {
|
||||
type: String,
|
||||
required: true,
|
||||
description: "The image source URL",
|
||||
},
|
||||
alt: {
|
||||
type: String,
|
||||
required: true,
|
||||
description: "Alternative text for the image",
|
||||
},
|
||||
width: {
|
||||
type: String,
|
||||
description: "Width of the image (e.g., '500px', '80%')",
|
||||
},
|
||||
height: {
|
||||
type: String,
|
||||
description: "Height of the image (e.g., '300px', 'auto')",
|
||||
},
|
||||
caption: {
|
||||
type: String,
|
||||
description: "Optional caption displayed below the image",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { KiloCodeIcon } from "../../components"
|
||||
|
||||
export const kiloCodeIcon = {
|
||||
render: KiloCodeIcon,
|
||||
selfClosing: true,
|
||||
attributes: {
|
||||
size: {
|
||||
type: String,
|
||||
default: "1.2em",
|
||||
description: "Size of the icon (CSS height value)",
|
||||
},
|
||||
},
|
||||
render: KiloCodeIcon,
|
||||
selfClosing: true,
|
||||
attributes: {
|
||||
size: {
|
||||
type: String,
|
||||
default: "1.2em",
|
||||
description: "Size of the icon (CSS height value)",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import { Tabs, Tab } from "../../components"
|
||||
|
||||
export const tabs = {
|
||||
render: Tabs,
|
||||
children: ["tab"],
|
||||
attributes: {},
|
||||
render: Tabs,
|
||||
children: ["tab"],
|
||||
attributes: {},
|
||||
}
|
||||
|
||||
export const tab = {
|
||||
render: Tab,
|
||||
children: ["paragraph", "tag", "list", "fence", "heading"],
|
||||
attributes: {
|
||||
label: {
|
||||
type: String,
|
||||
required: true,
|
||||
description: "The label shown on the tab button",
|
||||
},
|
||||
},
|
||||
render: Tab,
|
||||
children: ["paragraph", "tag", "list", "fence", "heading"],
|
||||
attributes: {
|
||||
label: {
|
||||
type: String,
|
||||
required: true,
|
||||
description: "The label shown on the tab button",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
import { YouTube } from "../../components"
|
||||
|
||||
export const youtube = {
|
||||
render: YouTube,
|
||||
selfClosing: true,
|
||||
attributes: {
|
||||
url: {
|
||||
type: String,
|
||||
required: true,
|
||||
description: "The YouTube video URL",
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
description: "Accessible title for the video iframe",
|
||||
},
|
||||
caption: {
|
||||
type: String,
|
||||
description: "Optional caption to display below the video",
|
||||
},
|
||||
},
|
||||
render: YouTube,
|
||||
selfClosing: true,
|
||||
attributes: {
|
||||
url: {
|
||||
type: String,
|
||||
required: true,
|
||||
description: "The YouTube video URL",
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
description: "Accessible title for the video iframe",
|
||||
},
|
||||
caption: {
|
||||
type: String,
|
||||
description: "Optional caption to display below the video",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
+189
-189
@@ -3,226 +3,226 @@ import Link from "next/link"
|
||||
import Head from "next/head"
|
||||
|
||||
export default function Custom404() {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>404 - Page Not Found | Kilo Code Documentation</title>
|
||||
<meta name="description" content="The requested page could not be found." />
|
||||
</Head>
|
||||
<div className="not-found-page">
|
||||
<div className="not-found-container">
|
||||
{/* Terminal Window */}
|
||||
<div className="terminal-window">
|
||||
<div className="terminal-header">
|
||||
<div className="terminal-dots">
|
||||
<span className="dot red"></span>
|
||||
<span className="dot yellow"></span>
|
||||
<span className="dot green"></span>
|
||||
</div>
|
||||
<span className="terminal-title">terminal</span>
|
||||
</div>
|
||||
<div className="terminal-body">
|
||||
<div className="terminal-line">
|
||||
<span className="prompt">$</span>
|
||||
<span className="command"> GET /requested-path</span>
|
||||
</div>
|
||||
<div className="terminal-line error">
|
||||
<span className="error-text">Error 404: Page not found</span>
|
||||
</div>
|
||||
<div className="error-code">
|
||||
<div className="error-bar"></div>
|
||||
<span className="code-404">404</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>404 - Page Not Found | Kilo Code Documentation</title>
|
||||
<meta name="description" content="The requested page could not be found." />
|
||||
</Head>
|
||||
<div className="not-found-page">
|
||||
<div className="not-found-container">
|
||||
{/* Terminal Window */}
|
||||
<div className="terminal-window">
|
||||
<div className="terminal-header">
|
||||
<div className="terminal-dots">
|
||||
<span className="dot red"></span>
|
||||
<span className="dot yellow"></span>
|
||||
<span className="dot green"></span>
|
||||
</div>
|
||||
<span className="terminal-title">terminal</span>
|
||||
</div>
|
||||
<div className="terminal-body">
|
||||
<div className="terminal-line">
|
||||
<span className="prompt">$</span>
|
||||
<span className="command"> GET /requested-path</span>
|
||||
</div>
|
||||
<div className="terminal-line error">
|
||||
<span className="error-text">Error 404: Page not found</span>
|
||||
</div>
|
||||
<div className="error-code">
|
||||
<div className="error-bar"></div>
|
||||
<span className="code-404">404</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Message */}
|
||||
<div className="message-section">
|
||||
<h1 className="message-title">Page not found</h1>
|
||||
<p className="message-subtitle">The page you requested does not exist or has been moved.</p>
|
||||
</div>
|
||||
{/* Message */}
|
||||
<div className="message-section">
|
||||
<h1 className="message-title">Page not found</h1>
|
||||
<p className="message-subtitle">The page you requested does not exist or has been moved.</p>
|
||||
</div>
|
||||
|
||||
{/* Actions */}
|
||||
<div className="actions">
|
||||
<Link href="/" className="btn btn-primary">
|
||||
Return to Documentation
|
||||
</Link>
|
||||
<Link href="/getting-started" className="btn btn-secondary">
|
||||
Getting Started
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
{/* Actions */}
|
||||
<div className="actions">
|
||||
<Link href="/" className="btn btn-primary">
|
||||
Return to Documentation
|
||||
</Link>
|
||||
<Link href="/getting-started" className="btn btn-secondary">
|
||||
Getting Started
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style jsx>{`
|
||||
.not-found-page {
|
||||
min-height: calc(100vh - var(--top-nav-height));
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rem;
|
||||
background: var(--bg-color);
|
||||
}
|
||||
<style jsx>{`
|
||||
.not-found-page {
|
||||
min-height: calc(100vh - var(--top-nav-height));
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rem;
|
||||
background: var(--bg-color);
|
||||
}
|
||||
|
||||
.not-found-container {
|
||||
max-width: 600px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.not-found-container {
|
||||
max-width: 600px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Terminal Window */
|
||||
.terminal-window {
|
||||
background: #2d2d2d;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
/* Terminal Window */
|
||||
.terminal-window {
|
||||
background: #2d2d2d;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
|
||||
.terminal-header {
|
||||
background: #3d3d3d;
|
||||
padding: 0.75rem 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
.terminal-header {
|
||||
background: #3d3d3d;
|
||||
padding: 0.75rem 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.terminal-dots {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
.terminal-dots {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.dot {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.dot.red {
|
||||
background: #ff5f56;
|
||||
}
|
||||
.dot.red {
|
||||
background: #ff5f56;
|
||||
}
|
||||
|
||||
.dot.yellow {
|
||||
background: #ffbd2e;
|
||||
}
|
||||
.dot.yellow {
|
||||
background: #ffbd2e;
|
||||
}
|
||||
|
||||
.dot.green {
|
||||
background: #27ca40;
|
||||
}
|
||||
.dot.green {
|
||||
background: #27ca40;
|
||||
}
|
||||
|
||||
.terminal-title {
|
||||
color: #888;
|
||||
font-family: "JetBrains Mono", monospace;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.terminal-title {
|
||||
color: #888;
|
||||
font-family: "JetBrains Mono", monospace;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.terminal-body {
|
||||
padding: 1.5rem;
|
||||
text-align: left;
|
||||
}
|
||||
.terminal-body {
|
||||
padding: 1.5rem;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.terminal-line {
|
||||
font-family: "JetBrains Mono", monospace;
|
||||
font-size: 0.95rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.terminal-line {
|
||||
font-family: "JetBrains Mono", monospace;
|
||||
font-size: 0.95rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.prompt {
|
||||
color: #f8f674;
|
||||
}
|
||||
.prompt {
|
||||
color: #f8f674;
|
||||
}
|
||||
|
||||
.command {
|
||||
color: #a0a0a0;
|
||||
}
|
||||
.command {
|
||||
color: #a0a0a0;
|
||||
}
|
||||
|
||||
.terminal-line.error {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
.terminal-line.error {
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
|
||||
.error-text {
|
||||
color: #ff6b6b;
|
||||
}
|
||||
.error-text {
|
||||
color: #ff6b6b;
|
||||
}
|
||||
|
||||
.error-code {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 1rem;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
.error-code {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 1rem;
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
|
||||
.error-bar {
|
||||
width: 4px;
|
||||
height: 80px;
|
||||
background: #f8f674;
|
||||
margin-right: 1.5rem;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.error-bar {
|
||||
width: 4px;
|
||||
height: 80px;
|
||||
background: #f8f674;
|
||||
margin-right: 1.5rem;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.code-404 {
|
||||
font-family: "JetBrains Mono", monospace;
|
||||
font-size: 4.5rem;
|
||||
font-weight: 700;
|
||||
color: #f8f674;
|
||||
line-height: 1;
|
||||
}
|
||||
.code-404 {
|
||||
font-family: "JetBrains Mono", monospace;
|
||||
font-size: 4.5rem;
|
||||
font-weight: 700;
|
||||
color: #f8f674;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* Message Section */
|
||||
.message-section {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
/* Message Section */
|
||||
.message-section {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.message-title {
|
||||
font-family: "JetBrains Mono", monospace;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-header);
|
||||
margin: 0 0 0.75rem 0;
|
||||
}
|
||||
.message-title {
|
||||
font-family: "JetBrains Mono", monospace;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-header);
|
||||
margin: 0 0 0.75rem 0;
|
||||
}
|
||||
|
||||
.message-subtitle {
|
||||
color: var(--text-secondary);
|
||||
font-size: 1rem;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.message-subtitle {
|
||||
color: var(--text-secondary);
|
||||
font-size: 1rem;
|
||||
margin: 0;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* Actions */
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
/* Actions */
|
||||
.actions {
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* Mobile Responsive */
|
||||
@media (max-width: 600px) {
|
||||
.not-found-page {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
/* Mobile Responsive */
|
||||
@media (max-width: 600px) {
|
||||
.not-found-page {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.code-404 {
|
||||
font-size: 3.5rem;
|
||||
}
|
||||
.code-404 {
|
||||
font-size: 3.5rem;
|
||||
}
|
||||
|
||||
.error-bar {
|
||||
height: 60px;
|
||||
}
|
||||
.error-bar {
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.message-title {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
.message-title {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.actions {
|
||||
flex-direction: column;
|
||||
}
|
||||
.actions {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.actions :global(.btn) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
`}</style>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
.actions :global(.btn) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
`}</style>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
// This tells Next.js to use a different layout approach
|
||||
|
||||
@@ -14,9 +14,9 @@ Kilo Code supports accessing models through Amazon Bedrock, a fully managed serv
|
||||
- **Bedrock Access:** You must request and be granted access to Amazon Bedrock. See the [AWS Bedrock documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started.html) for details on requesting access.
|
||||
- **Model Access:** Within Bedrock, you need to request access to the specific models you want to use (e.g., Anthropic Claude).
|
||||
- **Install AWS CLI:** Use AWS CLI to configure your account for authentication
|
||||
```bash
|
||||
aws configure
|
||||
```
|
||||
```bash
|
||||
aws configure
|
||||
```
|
||||
|
||||
## Getting Credentials
|
||||
|
||||
@@ -38,12 +38,12 @@ You have three options for configuring AWS credentials:
|
||||
2. **Select Provider:** Choose "Bedrock" from the "API Provider" dropdown.
|
||||
3. **Select Authentication Method:**
|
||||
- **Bedrock API Key:**
|
||||
- Enter your Bedrock API key directly. This is the simplest setup option.
|
||||
- Enter your Bedrock API key directly. This is the simplest setup option.
|
||||
- **AWS Credentials:**
|
||||
- Enter your "AWS Access Key" and "AWS Secret Key."
|
||||
- (Optional) Enter your "AWS Session Token" if you're using temporary credentials.
|
||||
- Enter your "AWS Access Key" and "AWS Secret Key."
|
||||
- (Optional) Enter your "AWS Session Token" if you're using temporary credentials.
|
||||
- **AWS Profile:**
|
||||
- Enter your "AWS Profile" name (e.g., "default").
|
||||
- Enter your "AWS Profile" name (e.g., "default").
|
||||
4. **Select Region:** Choose the AWS region where your Bedrock service is available (e.g., "us-east-1").
|
||||
5. **(Optional) Cross-Region Inference:** Check "Use cross-region inference" if you want to access models in a region different from your configured AWS region.
|
||||
6. **Select Model:** Choose your desired model from the "Model" dropdown.
|
||||
|
||||
@@ -47,8 +47,8 @@ The specific models available depend on your Claude subscription and plan. See [
|
||||
- **Context Windows:** Claude models have large context windows, allowing you to include significant amounts of code and context in your prompts.
|
||||
- **Enhance Prompt Feature:** Full compatibility with Kilo Code's Enhance Prompt feature, allowing you to automatically improve and refine your prompts before sending them to Claude.
|
||||
- **Custom Paths:** If you installed Claude Code in a non-standard location, you can specify the full path in the settings. Examples:
|
||||
- Windows: `C:\tools\claude\claude.exe`
|
||||
- macOS/Linux: `/usr/local/bin/claude` or `~/bin/claude`
|
||||
- Windows: `C:\tools\claude\claude.exe`
|
||||
- macOS/Linux: `/usr/local/bin/claude` or `~/bin/claude`
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
||||
@@ -69,10 +69,10 @@ The `moonshotai/kimi-k2-instruct` model includes optimized configuration:
|
||||
- **Cost-Effective:** Competitive pricing for high-performance inference
|
||||
- **Rate Limits:** Be aware of API rate limits based on your Groq plan
|
||||
- **Model Selection:** Choose models based on your specific use case:
|
||||
- **Kimi K2**: Best for complex reasoning and multilingual tasks
|
||||
- **Llama 3.3 70B**: Excellent general-purpose performance
|
||||
- **Llama 3.1 8B Instant**: Fastest responses for simple tasks
|
||||
- **Mixtral**: Good balance of performance and efficiency
|
||||
- **Kimi K2**: Best for complex reasoning and multilingual tasks
|
||||
- **Llama 3.3 70B**: Excellent general-purpose performance
|
||||
- **Llama 3.1 8B Instant**: Fastest responses for simple tasks
|
||||
- **Mixtral**: Good balance of performance and efficiency
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ Kilo Code offers a streamlined registration that connects you directly to fronti
|
||||
1. **Start Registration:** Click "Try Kilo Code for Free" in the extension
|
||||
2. **Sign In:** Use your Google account to sign in at kilo.ai
|
||||
3. **Authorize VS Code:**
|
||||
- kilo.ai will prompt you to open Visual Studio Code
|
||||
- For web-based IDEs, you'll copy the API key manually instead
|
||||
- kilo.ai will prompt you to open Visual Studio Code
|
||||
- For web-based IDEs, you'll copy the API key manually instead
|
||||
4. **Complete Setup:** Allow VS Code to open the authorization URL when prompted
|
||||
|
||||
<!-- <img src="/img/setting-up/signupflow.gif" alt="Sign up and registration flow with Kilo Code" width="600" /> -->
|
||||
|
||||
@@ -12,7 +12,6 @@ Kilo Code supports running models locally using LM Studio. LM Studio provides a
|
||||
|
||||
1. **Download and Install LM Studio:** Download LM Studio from the [LM Studio website](https://lmstudio.ai/).
|
||||
2. **Download a Model:** Use the LM Studio interface to search for and download a model. Some recommended models include:
|
||||
|
||||
- CodeLlama models (e.g., `codellama:7b-code`, `codellama:13b-code`, `codellama:34b-code`)
|
||||
- Mistral models (e.g., `mistralai/Mistral-7B-Instruct-v0.1`)
|
||||
- DeepSeek Coder models (e.g., `deepseek-coder:6.7b-base`)
|
||||
|
||||
@@ -27,4 +27,4 @@ MiniMax is a global AI foundation model company focused on fast, cost-efficient
|
||||
- **Performance:** MiniMax M2.1 emphasizes fast inference, strong coding ability, and exceptional tool-calling performance.
|
||||
- **Context Window:** MiniMax models support ultra-long context windows suitable for large codebases and agent workflows.
|
||||
- **Pricing:** Pricing varies by model, with input costs ranging from $0.20 to $0.30 per million tokens and output costs from $1.10 to $2.20 per million tokens. Refer to the MiniMax documentation for the most current pricing information.
|
||||
- **MiniMax M2.1** is currently available for free exclusively for [Kilo for Slack](/docs/slack).
|
||||
- **MiniMax M2.1** is currently available for free exclusively for [Kilo for Slack](/docs/slack).
|
||||
|
||||
@@ -27,12 +27,12 @@ You'll find these settings in the Kilo Code settings panel (click the {% codicon
|
||||
- **API Key:** Enter your API key.
|
||||
- **Model:** Choose a model.
|
||||
- **Model Configuration:** This lets you customize advanced configuration for the model
|
||||
- Max Output Tokens
|
||||
- Context Window
|
||||
- Image Support
|
||||
- Computer Use
|
||||
- Input Price
|
||||
- Output Price
|
||||
- Max Output Tokens
|
||||
- Context Window
|
||||
- Image Support
|
||||
- Computer Use
|
||||
- Input Price
|
||||
- Output Price
|
||||
|
||||
### Full Endpoint URL Support
|
||||
|
||||
|
||||
@@ -20,19 +20,18 @@ Kilo Code supports accessing models through SAP AI Core, a service in the SAP Bu
|
||||
To use SAP AI Core with Kilo Code, you'll need to create a service key for your SAP AI Core service instance:
|
||||
|
||||
1. **In SAP BTP Cockpit:**
|
||||
|
||||
- Navigate to your subaccount
|
||||
- Go to "Services" → "Instances and Subscriptions"
|
||||
- Find your SAP AI Core service instance
|
||||
- Create a new service key
|
||||
- Navigate to your subaccount
|
||||
- Go to "Services" → "Instances and Subscriptions"
|
||||
- Find your SAP AI Core service instance
|
||||
- Create a new service key
|
||||
|
||||
2. **Service Key Information:**
|
||||
The service key will contain the following information you'll need:
|
||||
- **Client ID:** OAuth2 client identifier
|
||||
- **Client Secret:** OAuth2 client secret
|
||||
- **Auth URL:** OAuth2 authentication endpoint
|
||||
- **Base URL:** SAP AI Core API base URL
|
||||
- **Resource Group:** (Optional) Specify a resource group, defaults to "default"
|
||||
- **Client ID:** OAuth2 client identifier
|
||||
- **Client Secret:** OAuth2 client secret
|
||||
- **Auth URL:** OAuth2 authentication endpoint
|
||||
- **Base URL:** SAP AI Core API base URL
|
||||
- **Resource Group:** (Optional) Specify a resource group, defaults to "default"
|
||||
|
||||
## Operating Modes
|
||||
|
||||
@@ -81,14 +80,14 @@ The exact list of available models depends on your SAP AI Core configuration and
|
||||
1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel.
|
||||
2. **Select Provider:** Choose "SAP AI Core" from the "API Provider" dropdown.
|
||||
3. **Enter Credentials:**
|
||||
- **Client ID:** Enter your SAP AI Core OAuth2 client ID
|
||||
- **Client Secret:** Enter your SAP AI Core OAuth2 client secret
|
||||
- **Base URL:** Enter your SAP AI Core API base URL (e.g., `https://api.ai.ml.hana.ondemand.com`)
|
||||
- **Auth URL:** Enter your SAP AI Core OAuth2 auth URL (e.g., `https://your-subdomain.authentication.sap.hana.ondemand.com`)
|
||||
- **Resource Group:** (Optional) Enter your resource group name, defaults to "default"
|
||||
- **Client ID:** Enter your SAP AI Core OAuth2 client ID
|
||||
- **Client Secret:** Enter your SAP AI Core OAuth2 client secret
|
||||
- **Base URL:** Enter your SAP AI Core API base URL (e.g., `https://api.ai.ml.hana.ondemand.com`)
|
||||
- **Auth URL:** Enter your SAP AI Core OAuth2 auth URL (e.g., `https://your-subdomain.authentication.sap.hana.ondemand.com`)
|
||||
- **Resource Group:** (Optional) Enter your resource group name, defaults to "default"
|
||||
4. **Choose Operating Mode:**
|
||||
- **Orchestration Mode:** Check the "Use Orchestration" checkbox for broader model access
|
||||
- **Foundation Models Mode:** Leave unchecked to use foundation models with deployments
|
||||
- **Orchestration Mode:** Check the "Use Orchestration" checkbox for broader model access
|
||||
- **Foundation Models Mode:** Leave unchecked to use foundation models with deployments
|
||||
5. **Select Model:** Choose your desired model from the dropdown
|
||||
6. **Select Deployment:** (Foundation Models Mode only) Choose an active deployment for your selected model
|
||||
|
||||
@@ -115,27 +114,24 @@ When using Foundation Models mode:
|
||||
### Common Issues
|
||||
|
||||
1. **Authentication Failures:**
|
||||
|
||||
- Verify your Client ID and Client Secret are correct
|
||||
- Check that your Auth URL is properly formatted
|
||||
- Ensure your service key hasn't expired
|
||||
- Verify your Client ID and Client Secret are correct
|
||||
- Check that your Auth URL is properly formatted
|
||||
- Ensure your service key hasn't expired
|
||||
|
||||
2. **No Models Available:**
|
||||
|
||||
- Check that you have the necessary permissions in your resource group
|
||||
- Verify your Base URL is correct
|
||||
- In Foundation Models mode, ensure you have running deployments
|
||||
- Check that you have the necessary permissions in your resource group
|
||||
- Verify your Base URL is correct
|
||||
- In Foundation Models mode, ensure you have running deployments
|
||||
|
||||
3. **Deployment Issues:**
|
||||
|
||||
- Check that your deployments are in "RUNNING" status
|
||||
- Verify you're using the correct resource group
|
||||
- Review your SAP AI Core service configuration
|
||||
- Check that your deployments are in "RUNNING" status
|
||||
- Verify you're using the correct resource group
|
||||
- Review your SAP AI Core service configuration
|
||||
|
||||
4. **Model Access:**
|
||||
- In Foundation Models mode, **only OpenAI models** are currently supported
|
||||
- Switch to Orchestration mode for access to other providers
|
||||
- Ensure models meet the minimum requirements (32k context window, streaming support)
|
||||
- In Foundation Models mode, **only OpenAI models** are currently supported
|
||||
- Switch to Orchestration mode for access to other providers
|
||||
- Ensure models meet the minimum requirements (32k context window, streaming support)
|
||||
|
||||
## Getting Started
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@ To use v0 with Kilo Code, you'll need:
|
||||
Setting up v0 in Kilo Code is straightforward:
|
||||
|
||||
1. In Kilo Code settings (click the {% codicon name="gear" /%} icon):
|
||||
- Under **API Provider**, select: **OpenAI Compatible**
|
||||
- Set the **Base URL**: `https://api.v0.dev/v1`
|
||||
- Paste in your v0 API key
|
||||
- Set the **Model ID**: `v0-1.0-md`
|
||||
- Click **Verify** to confirm the connection
|
||||
- Under **API Provider**, select: **OpenAI Compatible**
|
||||
- Set the **Base URL**: `https://api.v0.dev/v1`
|
||||
- Paste in your v0 API key
|
||||
- Set the **Model ID**: `v0-1.0-md`
|
||||
- Click **Verify** to confirm the connection
|
||||
|
||||
<!-- <img src="/docs/img/providers/v0-setup.png" alt="v0 configuration in Kilo Code settings" width="600" /> -->
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
description: Configure the Vercel AI Gateway in Kilo Code to robustly access 100+ language models from various providers through a centralized interface.
|
||||
keywords:
|
||||
- kilo code
|
||||
- vercel ai gateway
|
||||
- ai provider
|
||||
- language models
|
||||
- api configuration
|
||||
- model selection
|
||||
- prompt caching
|
||||
- usage tracking
|
||||
- byok
|
||||
- kilo code
|
||||
- vercel ai gateway
|
||||
- ai provider
|
||||
- language models
|
||||
- api configuration
|
||||
- model selection
|
||||
- prompt caching
|
||||
- usage tracking
|
||||
- byok
|
||||
sidebar_label: Vercel AI Gateway
|
||||
---
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ Kilo Code supports accessing models through Google Cloud Platform's Vertex AI, a
|
||||
- **Project:** You need a GCP project with the Vertex AI API enabled.
|
||||
- **Model Access:** You must request and be granted access to the specific Claude models on Vertex AI you want to use. See the [Google Cloud documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude#before_you_begin) for instructions.
|
||||
- **Application Default Credentials (ADC):** Kilo Code uses Application Default Credentials to authenticate with Vertex AI. The easiest way to set this up is to:
|
||||
1. Install the Google Cloud CLI: [https://cloud.google.com/sdk/docs/install](https://cloud.google.com/sdk/docs/install)
|
||||
2. Authenticate using: `gcloud auth application-default login`
|
||||
1. Install the Google Cloud CLI: [https://cloud.google.com/sdk/docs/install](https://cloud.google.com/sdk/docs/install)
|
||||
2. Authenticate using: `gcloud auth application-default login`
|
||||
- **Service Account Key (Alternative):** Alternatively, you can authenticate using a Google Cloud Service Account key file. You'll need to generate this key in your GCP project. See the [Google Cloud documentation on creating service account keys](https://cloud.google.com/iam/docs/creating-managing-service-account-keys).
|
||||
|
||||
## Configuration in Kilo Code
|
||||
@@ -25,8 +25,8 @@ Kilo Code supports accessing models through Google Cloud Platform's Vertex AI, a
|
||||
3. **Configure Authentication:**
|
||||
- **If using Application Default Credentials (ADC):** No further action is needed here. ADC will be used automatically if configured correctly (see Prerequisites).
|
||||
- **If _not_ using ADC (Service Account Key):**
|
||||
- **Option A: Paste JSON Content:** Paste the entire content of your Service Account JSON key file into the **Google Cloud Credentials** field.
|
||||
- **Option B: Provide File Path:** Enter the absolute path to your downloaded Service Account JSON key file in the **Google Cloud Key File Path** field.
|
||||
- **Option A: Paste JSON Content:** Paste the entire content of your Service Account JSON key file into the **Google Cloud Credentials** field.
|
||||
- **Option B: Provide File Path:** Enter the absolute path to your downloaded Service Account JSON key file in the **Google Cloud Key File Path** field.
|
||||
4. **Enter Project ID:** Enter your Google Cloud Project ID.
|
||||
5. **Select Region:** Choose the region where your Vertex AI resources are located (e.g., `us-east5`).
|
||||
6. **Select Model:** Choose your desired model from the "Model" dropdown.
|
||||
|
||||
@@ -29,18 +29,15 @@ Before configuring this provider, you must have at least one other API provider
|
||||
<!-- <img src="/docs/img/providers/virtualQuotaSelectDropdown.png" alt="virtuaQuotaFallback dropdown selection in Kilo Code settings" width="600" /> -->
|
||||
|
||||
3. **Add a Provider Profile:**
|
||||
|
||||
- In the configuration panel, click the **"Add Profile"** button to create a new entry in the list.
|
||||
- Click the dropdown menu on the new entry to select one of your other pre-configured provider profiles (e.g., "OpenAI", "Chutes AI Free Tier").
|
||||
|
||||
4. **Set Usage Limits (Optional):**
|
||||
|
||||
- Once a profile is added, you can specify usage limits. If you leave these fields blank, no limit will be enforced for that specific metric.
|
||||
- **Tokens per minute/hour/day:** Limits usage based on the total number of tokens processed (input + output).
|
||||
- **Requests per minute/hour/day:** Limits the total number of API calls made.
|
||||
|
||||
5. **Order Your Providers:**
|
||||
|
||||
- The order of the profiles is crucial, as it defines the fallback priority. The provider at the top is used first.
|
||||
- Use the **up and down arrows** next to each profile to change its position in the list.
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ Kilo Code includes _experimental_ support for the [VS Code Language Model API](h
|
||||
|
||||
- **VS Code:** The Language Model API is available through VS Code (and is not currently supported by Cursor).
|
||||
- **A Language Model Provider Extension:** You need an extension that provides a language model. Examples include:
|
||||
- **GitHub Copilot:** If you have a Copilot subscription, the GitHub Copilot and GitHub Copilot Chat extensions can provide models.
|
||||
- **Other Extensions:** Search the VS Code Marketplace for extensions that mention "Language Model API" or "lm". There may be other experimental extensions available.
|
||||
- **GitHub Copilot:** If you have a Copilot subscription, the GitHub Copilot and GitHub Copilot Chat extensions can provide models.
|
||||
- **Other Extensions:** Search the VS Code Marketplace for extensions that mention "Language Model API" or "lm". There may be other experimental extensions available.
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -39,7 +39,7 @@ Kilo Code includes _experimental_ support for the [VS Code Language Model API](h
|
||||
## Troubleshooting
|
||||
|
||||
- **No Models Appear:**
|
||||
- Ensure you have VS Code installed.
|
||||
- Ensure you have a language model provider extension installed and enabled (e.g., GitHub Copilot, GitHub Copilot Chat).
|
||||
- If using Copilot, make sure that you have sent a Copilot Chat message using the model you would like to use.
|
||||
- Ensure you have VS Code installed.
|
||||
- Ensure you have a language model provider extension installed and enabled (e.g., GitHub Copilot, GitHub Copilot Chat).
|
||||
- If using Copilot, make sure that you have sent a Copilot Chat message using the model you would like to use.
|
||||
- **Unexpected Behavior:** If you encounter unexpected behavior, it's likely an issue with the underlying Language Model API or the provider extension. Consider reporting the issue to the provider extension's developers.
|
||||
|
||||
@@ -44,22 +44,22 @@ Use the standard OpenAI SDK with ZenMux's base URL:
|
||||
import OpenAI from "openai"
|
||||
|
||||
const openai = new OpenAI({
|
||||
baseURL: "https://zenmux.ai/api/v1",
|
||||
apiKey: "<ZENMUX_API_KEY>",
|
||||
baseURL: "https://zenmux.ai/api/v1",
|
||||
apiKey: "<ZENMUX_API_KEY>",
|
||||
})
|
||||
|
||||
async function main() {
|
||||
const completion = await openai.chat.completions.create({
|
||||
model: "openai/gpt-5",
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
content: "What is the meaning of life?",
|
||||
},
|
||||
],
|
||||
})
|
||||
const completion = await openai.chat.completions.create({
|
||||
model: "openai/gpt-5",
|
||||
messages: [
|
||||
{
|
||||
role: "user",
|
||||
content: "What is the meaning of life?",
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
console.log(completion.choices[0].message)
|
||||
console.log(completion.choices[0].message)
|
||||
}
|
||||
|
||||
main()
|
||||
@@ -74,19 +74,19 @@ import Anthropic from "@anthropic-ai/sdk"
|
||||
|
||||
// 1. Initialize the Anthropic client
|
||||
const anthropic = new Anthropic({
|
||||
// 2. Replace with the API key from your ZenMux console
|
||||
apiKey: "<YOUR ZENMUX_API_KEY>",
|
||||
// 3. Point the base URL to the ZenMux endpoint
|
||||
baseURL: "https://zenmux.ai/api/anthropic",
|
||||
// 2. Replace with the API key from your ZenMux console
|
||||
apiKey: "<YOUR ZENMUX_API_KEY>",
|
||||
// 3. Point the base URL to the ZenMux endpoint
|
||||
baseURL: "https://zenmux.ai/api/anthropic",
|
||||
})
|
||||
|
||||
async function main() {
|
||||
const msg = await anthropic.messages.create({
|
||||
model: "anthropic/claude-sonnet-4.5",
|
||||
max_tokens: 1024,
|
||||
messages: [{ role: "user", content: "Hello, Claude" }],
|
||||
})
|
||||
console.log(msg)
|
||||
const msg = await anthropic.messages.create({
|
||||
model: "anthropic/claude-sonnet-4.5",
|
||||
max_tokens: 1024,
|
||||
messages: [{ role: "user", content: "Hello, Claude" }],
|
||||
})
|
||||
console.log(msg)
|
||||
}
|
||||
|
||||
main()
|
||||
@@ -109,17 +109,17 @@ For Google models:
|
||||
const genai = require("@google/genai")
|
||||
|
||||
const client = new genai.GoogleGenAI({
|
||||
apiKey: "$ZENMUX_API_KEY",
|
||||
vertexai: true,
|
||||
httpOptions: {
|
||||
baseUrl: "https://zenmux.ai/api/vertex-ai",
|
||||
apiVersion: "v1",
|
||||
},
|
||||
apiKey: "$ZENMUX_API_KEY",
|
||||
vertexai: true,
|
||||
httpOptions: {
|
||||
baseUrl: "https://zenmux.ai/api/vertex-ai",
|
||||
apiVersion: "v1",
|
||||
},
|
||||
})
|
||||
|
||||
const response = await client.models.generateContent({
|
||||
model: "google/gemini-2.5-pro",
|
||||
contents: "How does AI work?",
|
||||
model: "google/gemini-2.5-pro",
|
||||
contents: "How does AI work?",
|
||||
})
|
||||
console.log(response)
|
||||
```
|
||||
|
||||
@@ -6,80 +6,80 @@ import path from "path"
|
||||
* Recursively finds all markdown files in a directory
|
||||
*/
|
||||
function findMarkdownFiles(dir: string, baseDir: string = dir): string[] {
|
||||
const files: string[] = []
|
||||
const entries = fs.readdirSync(dir, { withFileTypes: true })
|
||||
const files: string[] = []
|
||||
const entries = fs.readdirSync(dir, { withFileTypes: true })
|
||||
|
||||
for (const entry of entries) {
|
||||
const fullPath = path.join(dir, entry.name)
|
||||
for (const entry of entries) {
|
||||
const fullPath = path.join(dir, entry.name)
|
||||
|
||||
if (entry.isDirectory()) {
|
||||
// Skip api directory
|
||||
if (entry.name === "api") continue
|
||||
files.push(...findMarkdownFiles(fullPath, baseDir))
|
||||
} else if (entry.name.endsWith(".md")) {
|
||||
files.push(fullPath)
|
||||
}
|
||||
}
|
||||
if (entry.isDirectory()) {
|
||||
// Skip api directory
|
||||
if (entry.name === "api") continue
|
||||
files.push(...findMarkdownFiles(fullPath, baseDir))
|
||||
} else if (entry.name.endsWith(".md")) {
|
||||
files.push(fullPath)
|
||||
}
|
||||
}
|
||||
|
||||
return files
|
||||
return files
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a file path to a URL path
|
||||
*/
|
||||
function filePathToUrlPath(filePath: string, pagesDir: string): string {
|
||||
let relativePath = path.relative(pagesDir, filePath)
|
||||
// Remove .md extension
|
||||
relativePath = relativePath.replace(/\.md$/, "")
|
||||
// Handle index files
|
||||
relativePath = relativePath.replace(/\/index$/, "")
|
||||
// Convert to URL path
|
||||
return "/" + relativePath
|
||||
let relativePath = path.relative(pagesDir, filePath)
|
||||
// Remove .md extension
|
||||
relativePath = relativePath.replace(/\.md$/, "")
|
||||
// Handle index files
|
||||
relativePath = relativePath.replace(/\/index$/, "")
|
||||
// Convert to URL path
|
||||
return "/" + relativePath
|
||||
}
|
||||
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
if (req.method !== "GET") {
|
||||
return res.status(405).json({ error: "Method not allowed" })
|
||||
}
|
||||
if (req.method !== "GET") {
|
||||
return res.status(405).json({ error: "Method not allowed" })
|
||||
}
|
||||
|
||||
try {
|
||||
const pagesDir = path.join(process.cwd(), "pages")
|
||||
const markdownFiles = findMarkdownFiles(pagesDir)
|
||||
try {
|
||||
const pagesDir = path.join(process.cwd(), "pages")
|
||||
const markdownFiles = findMarkdownFiles(pagesDir)
|
||||
|
||||
// Sort files for consistent output
|
||||
markdownFiles.sort()
|
||||
// Sort files for consistent output
|
||||
markdownFiles.sort()
|
||||
|
||||
const sections: string[] = []
|
||||
const sections: string[] = []
|
||||
|
||||
// Add header
|
||||
sections.push("# Kilo Code Documentation")
|
||||
sections.push("")
|
||||
sections.push(
|
||||
"This file contains the complete documentation for Kilo Code, the leading open source agentic engineering platform.",
|
||||
)
|
||||
sections.push("")
|
||||
sections.push("---")
|
||||
sections.push("")
|
||||
// Add header
|
||||
sections.push("# Kilo Code Documentation")
|
||||
sections.push("")
|
||||
sections.push(
|
||||
"This file contains the complete documentation for Kilo Code, the leading open source agentic engineering platform.",
|
||||
)
|
||||
sections.push("")
|
||||
sections.push("---")
|
||||
sections.push("")
|
||||
|
||||
for (const filePath of markdownFiles) {
|
||||
const urlPath = filePathToUrlPath(filePath, pagesDir)
|
||||
const content = fs.readFileSync(filePath, "utf-8")
|
||||
for (const filePath of markdownFiles) {
|
||||
const urlPath = filePathToUrlPath(filePath, pagesDir)
|
||||
const content = fs.readFileSync(filePath, "utf-8")
|
||||
|
||||
sections.push(`## Source: ${urlPath}`)
|
||||
sections.push("")
|
||||
sections.push(content)
|
||||
sections.push("")
|
||||
sections.push("---")
|
||||
sections.push("")
|
||||
}
|
||||
sections.push(`## Source: ${urlPath}`)
|
||||
sections.push("")
|
||||
sections.push(content)
|
||||
sections.push("")
|
||||
sections.push("---")
|
||||
sections.push("")
|
||||
}
|
||||
|
||||
const output = sections.join("\n")
|
||||
const output = sections.join("\n")
|
||||
|
||||
res.setHeader("Content-Type", "text/plain; charset=utf-8")
|
||||
res.setHeader("Cache-Control", "public, max-age=3600") // Cache for 1 hour
|
||||
res.status(200).send(output)
|
||||
} catch (error) {
|
||||
console.error("Error generating llms.txt:", error)
|
||||
res.status(500).json({ error: "Internal server error" })
|
||||
}
|
||||
res.setHeader("Content-Type", "text/plain; charset=utf-8")
|
||||
res.setHeader("Cache-Control", "public, max-age=3600") // Cache for 1 hour
|
||||
res.status(200).send(output)
|
||||
} catch (error) {
|
||||
console.error("Error generating llms.txt:", error)
|
||||
res.status(500).json({ error: "Internal server error" })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,10 +31,10 @@ The panel opens as a webview and stays active across focus changes.
|
||||
|
||||
- Continue the conversation: Send a follow-up message to the running agent
|
||||
- Approvals: If the agent asks to use a tool, run a command, launch the browser, or connect to an MCP server, the UI shows an approval prompt
|
||||
- Approve or reject, optionally adding a short note
|
||||
- Approve or reject, optionally adding a short note
|
||||
- Cancel vs Stop
|
||||
- Cancel sends a structured cancel message to the running process (clean cooperative stop)
|
||||
- Stop force-terminates the underlying CLI process, updating status to “stopped”
|
||||
- Cancel sends a structured cancel message to the running process (clean cooperative stop)
|
||||
- Stop force-terminates the underlying CLI process, updating status to “stopped”
|
||||
|
||||
## Resuming an existing session
|
||||
|
||||
@@ -50,7 +50,7 @@ Parallel Mode runs the agent in an isolated Git worktree branch, keeping your ma
|
||||
|
||||
- Enable the "Parallel Mode" toggle before starting
|
||||
- The extension prevents using Parallel Mode inside an existing worktree
|
||||
- Open the main repository (where .git is a directory) to use this feature
|
||||
- Open the main repository (where .git is a directory) to use this feature
|
||||
|
||||
### Worktree Location
|
||||
|
||||
@@ -95,15 +95,14 @@ The Agent Manager requires proper authentication for full functionality, includi
|
||||
### Supported Authentication Methods
|
||||
|
||||
1. **Kilo Code Extension (Recommended)**
|
||||
|
||||
- Sign in through the extension settings
|
||||
- Provides seamless authentication for the Agent Manager
|
||||
- Enables session syncing and cloud features
|
||||
- Sign in through the extension settings
|
||||
- Provides seamless authentication for the Agent Manager
|
||||
- Enables session syncing and cloud features
|
||||
|
||||
2. **CLI with Kilo Code Provider**
|
||||
- Use the CLI configured with `kilocode` as the provider
|
||||
- Run `kilocode config` to set up authentication
|
||||
- See [CLI setup](/docs/cli) for details
|
||||
- Use the CLI configured with `kilocode` as the provider
|
||||
- Run `kilocode config` to set up authentication
|
||||
- See [CLI setup](/docs/cli) for details
|
||||
|
||||
### BYOK Limitations
|
||||
|
||||
@@ -123,7 +122,7 @@ When signed in (Kilo Cloud), the Agent Manager lists your recent cloud-synced se
|
||||
|
||||
- Up to 50 sessions are fetched
|
||||
- Sessions are filtered to the current repository via normalized Git remote URL
|
||||
- If the current workspace has no remote, only sessions without a git_url are shown
|
||||
- If the current workspace has no remote, only sessions without a git_url are shown
|
||||
- Selecting a remote session loads its message transcript
|
||||
- To continue the work locally, send a message — the Agent Manager will spawn a local process bound to that session
|
||||
|
||||
@@ -132,18 +131,18 @@ Message transcripts are fetched from a signed blob and exclude internal checkpoi
|
||||
## Troubleshooting
|
||||
|
||||
- CLI not found or outdated
|
||||
- Install/update the CLI: [CLI setup](/docs/cli)
|
||||
- If you see an "unknown option --json-io" error, update to the latest CLI
|
||||
- Install/update the CLI: [CLI setup](/docs/cli)
|
||||
- If you see an "unknown option --json-io" error, update to the latest CLI
|
||||
- "Please open a folder…" error
|
||||
- The Agent Manager requires a VS Code workspace folder
|
||||
- The Agent Manager requires a VS Code workspace folder
|
||||
- "Cannot use parallel mode from within a git worktree"
|
||||
- Open the main repository (where .git is a directory), not a worktree checkout
|
||||
- Open the main repository (where .git is a directory), not a worktree checkout
|
||||
- Remote sessions not visible
|
||||
- Ensure you're signed in and the repo's remote URL matches the sessions you expect to see
|
||||
- If using BYOK, session syncing is not available — switch to Kilo Code provider or sign in through the extension
|
||||
- Ensure you're signed in and the repo's remote URL matches the sessions you expect to see
|
||||
- If using BYOK, session syncing is not available — switch to Kilo Code provider or sign in through the extension
|
||||
- Authentication errors
|
||||
- Verify you're logged in via extension settings or using CLI with kilocode provider
|
||||
- BYOK configurations do not support Agent Manager authentication
|
||||
- Verify you're logged in via extension settings or using CLI with kilocode provider
|
||||
- BYOK configurations do not support Agent Manager authentication
|
||||
|
||||
## Related features
|
||||
|
||||
|
||||
@@ -18,13 +18,13 @@ Kilo's Code Reviews integrate with GitHub via a **GitHub App** to automatically
|
||||
### Step 1: Install the GitHub App
|
||||
|
||||
1. Go to the **Integrations** page:
|
||||
- **Personal**: [app.kilo.ai/integrations/github](https://app.kilo.ai/integrations/github)
|
||||
- **Organization**: Your organization → Integrations → GitHub
|
||||
- **Personal**: [app.kilo.ai/integrations/github](https://app.kilo.ai/integrations/github)
|
||||
- **Organization**: Your organization → Integrations → GitHub
|
||||
2. Click **Install GitHub App**
|
||||
3. Choose which GitHub account or organization to install the app on
|
||||
4. Select repository access:
|
||||
- **All repositories** — the app can access all current and future repos
|
||||
- **Only select repositories** — choose specific repos
|
||||
- **All repositories** — the app can access all current and future repos
|
||||
- **Only select repositories** — choose specific repos
|
||||
5. Click **Install**
|
||||
|
||||
The GitHub App requests the following permissions:
|
||||
@@ -39,16 +39,16 @@ The GitHub App requests the following permissions:
|
||||
### Step 2: Configure the Review Agent
|
||||
|
||||
1. Go to **Code Reviews**:
|
||||
- **Personal**: [app.kilo.ai/code-reviews](https://app.kilo.ai/code-reviews)
|
||||
- **Organization**: Your organization → Code Reviews
|
||||
- **Personal**: [app.kilo.ai/code-reviews](https://app.kilo.ai/code-reviews)
|
||||
- **Organization**: Your organization → Code Reviews
|
||||
2. Toggle **Enable AI Code Review** to on
|
||||
3. Configure your preferences:
|
||||
- **AI Model** — Select from available models (default: Claude Sonnet 4.5)
|
||||
- **Review Style** — Strict, Balanced, or Lenient
|
||||
- **Repository Selection** — All repositories or select specific ones
|
||||
- **Focus Areas** — Security, performance, bugs, style, testing, documentation
|
||||
- **Max Review Time** — 5 to 30 minutes
|
||||
- **Custom Instructions** — Add team-specific review guidelines
|
||||
- **AI Model** — Select from available models (default: Claude Sonnet 4.5)
|
||||
- **Review Style** — Strict, Balanced, or Lenient
|
||||
- **Repository Selection** — All repositories or select specific ones
|
||||
- **Focus Areas** — Security, performance, bugs, style, testing, documentation
|
||||
- **Max Review Time** — 5 to 30 minutes
|
||||
- **Custom Instructions** — Add team-specific review guidelines
|
||||
4. Click **Save Configuration**
|
||||
|
||||
### Step 3: Open a Pull Request
|
||||
@@ -71,9 +71,9 @@ When a review triggers:
|
||||
1. A 👀 reaction appears on the PR — this means Kilo is reviewing
|
||||
2. The AI model analyzes the diff and changed files
|
||||
3. The agent posts:
|
||||
- A **summary comment** with overall findings
|
||||
- **Inline comments** on specific lines with issues and suggestions
|
||||
- Severity tags (critical, warning, info)
|
||||
- A **summary comment** with overall findings
|
||||
- **Inline comments** on specific lines with issues and suggestions
|
||||
- Severity tags (critical, warning, info)
|
||||
|
||||
### When You Push New Commits
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ You can connect using **OAuth** or a **Personal Access Token (PAT)**. Choose the
|
||||
{% tab label="OAuth (GitLab.com)" %}
|
||||
|
||||
1. Go to the **Integrations** page:
|
||||
- **Personal**: [app.kilo.ai/integrations/gitlab](https://app.kilo.ai/integrations/gitlab)
|
||||
- **Organization**: Your organization → Integrations → GitLab
|
||||
- **Personal**: [app.kilo.ai/integrations/gitlab](https://app.kilo.ai/integrations/gitlab)
|
||||
- **Organization**: Your organization → Integrations → GitLab
|
||||
2. Click **Connect GitLab**
|
||||
3. Authorize the application on GitLab
|
||||
4. You'll be redirected back to Kilo with the connection active
|
||||
@@ -40,10 +40,10 @@ For self-hosted GitLab instances using OAuth, you need to register an OAuth appl
|
||||
|
||||
1. In your GitLab instance, go to **Admin Area → Applications** (or **User Settings → Applications**)
|
||||
2. Create a new application:
|
||||
- **Name**: `Kilo Code`
|
||||
- **Redirect URI**: `https://app.kilo.ai/api/integrations/gitlab/callback`
|
||||
- **Scopes**: `api`, `read_user`, `read_repository`, `write_repository`
|
||||
- **Confidential**: Yes
|
||||
- **Name**: `Kilo Code`
|
||||
- **Redirect URI**: `https://app.kilo.ai/api/integrations/gitlab/callback`
|
||||
- **Scopes**: `api`, `read_user`, `read_repository`, `write_repository`
|
||||
- **Confidential**: Yes
|
||||
3. Copy the **Application ID** and **Secret**
|
||||
4. In Kilo, go to the GitLab integration page
|
||||
5. Enter your **Instance URL**, **Client ID**, and **Client Secret**
|
||||
@@ -67,16 +67,16 @@ For self-hosted GitLab instances using OAuth, you need to register an OAuth appl
|
||||
### Step 2: Configure the Review Agent
|
||||
|
||||
1. Go to **Code Reviews**:
|
||||
- **Personal**: [app.kilo.ai/code-reviews](https://app.kilo.ai/code-reviews)
|
||||
- **Organization**: Your organization → Code Reviews
|
||||
- **Personal**: [app.kilo.ai/code-reviews](https://app.kilo.ai/code-reviews)
|
||||
- **Organization**: Your organization → Code Reviews
|
||||
2. Toggle **Enable AI Code Review** to on
|
||||
3. Configure your preferences:
|
||||
- **AI Model** — Select from available models (default: Claude Sonnet 4.5)
|
||||
- **Review Style** — Strict, Balanced, or Lenient
|
||||
- **Repository Selection** — All repositories or select specific ones
|
||||
- **Focus Areas** — Security, performance, bugs, style, testing, documentation
|
||||
- **Max Review Time** — 5 to 30 minutes
|
||||
- **Custom Instructions** — Add team-specific review guidelines
|
||||
- **AI Model** — Select from available models (default: Claude Sonnet 4.5)
|
||||
- **Review Style** — Strict, Balanced, or Lenient
|
||||
- **Repository Selection** — All repositories or select specific ones
|
||||
- **Focus Areas** — Security, performance, bugs, style, testing, documentation
|
||||
- **Max Review Time** — 5 to 30 minutes
|
||||
- **Custom Instructions** — Add team-specific review guidelines
|
||||
4. Click **Save Configuration**
|
||||
|
||||
When you select repositories, Kilo **automatically creates webhooks** on each project.
|
||||
@@ -101,9 +101,9 @@ When a review triggers:
|
||||
1. A 👀 reaction appears on the MR — this means Kilo is reviewing
|
||||
2. The AI model analyzes the diff and changed files
|
||||
3. The agent posts:
|
||||
- A **summary note** on the MR with overall findings
|
||||
- **Inline discussion comments** on specific lines with issues and suggestions
|
||||
- Severity tags (critical, warning, info)
|
||||
- A **summary note** on the MR with overall findings
|
||||
- **Inline discussion comments** on specific lines with issues and suggestions
|
||||
- Severity tags (critical, warning, info)
|
||||
|
||||
### When You Push New Commits
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ Before enabling Code Reviews:
|
||||
## Cost
|
||||
|
||||
- **Compute and review time are free during limited beta**
|
||||
- Feedback is welcome in the Code Reviews beta Discord channel:
|
||||
- [Kilo Discord](https://discord.gg/hZnd57qN)
|
||||
- Feedback is welcome in the Code Reviews beta Discord channel:
|
||||
- [Kilo Discord](https://discord.gg/hZnd57qN)
|
||||
- **Kilo Code credits are still used** when the agent performs model reasoning during a review.
|
||||
|
||||
## Getting Started
|
||||
@@ -77,10 +77,10 @@ When a pull request or merge request is opened or updated:
|
||||
2. The selected model analyzes all changes.
|
||||
3. The agent applies your chosen review style and focus areas.
|
||||
4. It generates a structured review with:
|
||||
- Inline comments
|
||||
- Summary findings
|
||||
- Suggested fixes
|
||||
- Risk and severity tagging
|
||||
- Inline comments
|
||||
- Summary findings
|
||||
- Suggested fixes
|
||||
- Risk and severity tagging
|
||||
5. Reviews respect the **maximum time limit** you set.
|
||||
6. Only repositories you’ve selected will trigger automatic analysis.
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ This happens seamlessly in the background, requiring no manual intervention.
|
||||
|
||||
```json
|
||||
{
|
||||
"prompt": "Your task description here",
|
||||
"profile": "Profile Name (optional)",
|
||||
"mode": "mode-name (optional)"
|
||||
"prompt": "Your task description here",
|
||||
"profile": "Profile Name (optional)",
|
||||
"mode": "mode-name (optional)"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -48,12 +48,12 @@ This happens seamlessly in the background, requiring no manual intervention.
|
||||
- **`profile`** (string): Name of an existing [API Configuration Profile](/docs/ai-providers) to use for this task. Must exactly match a profile name from your settings.
|
||||
|
||||
- **`mode`** (string): The Kilo Code mode to use for this task. Available modes:
|
||||
- `"code"` - General-purpose coding tasks
|
||||
- `"architect"` - Planning and technical design
|
||||
- `"ask"` - Questions and explanations
|
||||
- `"debug"` - Problem diagnosis and troubleshooting
|
||||
- `"test"` - Testing-focused workflows
|
||||
- Custom mode slugs (if you have [custom modes](/docs/customize/custom-modes))
|
||||
- `"code"` - General-purpose coding tasks
|
||||
- `"architect"` - Planning and technical design
|
||||
- `"ask"` - Questions and explanations
|
||||
- `"debug"` - Problem diagnosis and troubleshooting
|
||||
- `"test"` - Testing-focused workflows
|
||||
- Custom mode slugs (if you have [custom modes](/docs/customize/custom-modes))
|
||||
|
||||
## Example Configurations
|
||||
|
||||
@@ -61,7 +61,7 @@ This happens seamlessly in the background, requiring no manual intervention.
|
||||
|
||||
```json
|
||||
{
|
||||
"prompt": "Review this codebase and suggest improvements for performance and maintainability"
|
||||
"prompt": "Review this codebase and suggest improvements for performance and maintainability"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -69,8 +69,8 @@ This happens seamlessly in the background, requiring no manual intervention.
|
||||
|
||||
```json
|
||||
{
|
||||
"prompt": "Create comprehensive unit tests for all components in the src/ directory",
|
||||
"profile": "GPT-4 Turbo"
|
||||
"prompt": "Create comprehensive unit tests for all components in the src/ directory",
|
||||
"profile": "GPT-4 Turbo"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -78,9 +78,9 @@ This happens seamlessly in the background, requiring no manual intervention.
|
||||
|
||||
```json
|
||||
{
|
||||
"prompt": "Design a scalable microservices architecture for this e-commerce platform with focus on security and performance",
|
||||
"profile": "🎻 Sonnet 4",
|
||||
"mode": "architect"
|
||||
"prompt": "Design a scalable microservices architecture for this e-commerce platform with focus on security and performance",
|
||||
"profile": "🎻 Sonnet 4",
|
||||
"mode": "architect"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -88,9 +88,9 @@ This happens seamlessly in the background, requiring no manual intervention.
|
||||
|
||||
```json
|
||||
{
|
||||
"prompt": "Optimize this algorithm for better time complexity and explain your approach",
|
||||
"profile": "🧠 Qwen",
|
||||
"mode": "code"
|
||||
"prompt": "Optimize this algorithm for better time complexity and explain your approach",
|
||||
"profile": "🧠 Qwen",
|
||||
"mode": "code"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -54,13 +54,13 @@ Adds a small pause after running commands to help Kilo Code capture all output c
|
||||
|
||||
- **Default**: 0ms
|
||||
- **Common Values**:
|
||||
- 0ms: Works best for some users with newer VSCode versions
|
||||
- 50ms: Historical default, still effective for many users
|
||||
- 150ms: Recommended for PowerShell users
|
||||
- 0ms: Works best for some users with newer VSCode versions
|
||||
- 50ms: Historical default, still effective for many users
|
||||
- 150ms: Recommended for PowerShell users
|
||||
- **Note**: Different values may work better depending on your:
|
||||
- VSCode version
|
||||
- Shell customizations (oh-my-zsh, powerlevel10k, etc.)
|
||||
- Operating system and environment
|
||||
- VSCode version
|
||||
- Shell customizations (oh-my-zsh, powerlevel10k, etc.)
|
||||
- Operating system and environment
|
||||
|
||||
### Advanced Settings
|
||||
|
||||
@@ -246,6 +246,8 @@ If you use Fish in Cygwin, a minimal setup is usually enough:
|
||||
```fish
|
||||
string match -q "$TERM_PROGRAM" "vscode"; and . (code --locate-shell-integration-path fish)
|
||||
|
||||
```
|
||||
|
||||
2. Configure a terminal profile in VS Code that launches Fish (directly or via Cygwin bash).
|
||||
3. Restart VS Code and open a new terminal to verify integration.
|
||||
|
||||
@@ -258,24 +260,21 @@ If you use Fish in Cygwin, a minimal setup is usually enough:
|
||||
**Solutions**:
|
||||
|
||||
1. **Set Terminal Command Delay**:
|
||||
|
||||
- Set the Terminal Command Delay to 50ms in Kilo Code settings
|
||||
- Restart all terminals after changing this setting
|
||||
- This matches older default behavior and may resolve the issue; some users report 0ms works better depending on shell and environment. This is a workaround for upstream VS Code behavior.
|
||||
- Set the Terminal Command Delay to 50ms in Kilo Code settings
|
||||
- Restart all terminals after changing this setting
|
||||
- This matches older default behavior and may resolve the issue; some users report 0ms works better depending on shell and environment. This is a workaround for upstream VS Code behavior.
|
||||
|
||||
2. **Roll Back VS Code Version**:
|
||||
|
||||
- Download VS Code v1.98 from [VS Code Updates](https://code.visualstudio.com/updates/v1_98)
|
||||
- Replace your current VS Code installation
|
||||
- No backup of Kilo settings needed
|
||||
- Download VS Code v1.98 from [VS Code Updates](https://code.visualstudio.com/updates/v1_98)
|
||||
- Replace your current VS Code installation
|
||||
- No backup of Kilo settings needed
|
||||
|
||||
3. **WSL-Specific Workaround**:
|
||||
|
||||
- If using WSL, ensure you launch VSCode from within WSL using `code .`
|
||||
- If using WSL, ensure you launch VSCode from within WSL using `code .`
|
||||
|
||||
4. **ZSH Users**:
|
||||
- Try enabling some or all ZSH-related workarounds in Kilo Code settings
|
||||
- These settings can help regardless of your operating system
|
||||
- Try enabling some or all ZSH-related workarounds in Kilo Code settings
|
||||
- These settings can help regardless of your operating system
|
||||
|
||||
## Additional Known Issues
|
||||
|
||||
@@ -314,34 +313,32 @@ When shell integration issues occur, check the debug logs:
|
||||
2. Set "Show All Levels" to see all log messages
|
||||
3. Look for messages containing `[Terminal Process]`
|
||||
4. Check `preOutput` content in error messages:
|
||||
- Empty preOutput (`''`) means VS Code sent no data
|
||||
- This indicates a potential VS Code shell integration issue, or an upstream bug that is out of our control
|
||||
- The absence of shell integration markers may require adjusting settings to work around possible upstream bugs or local workstation configuration issues related to shell initialization and VS Code loading shell hooks
|
||||
- Empty preOutput (`''`) means VS Code sent no data
|
||||
- This indicates a potential VS Code shell integration issue, or an upstream bug that is out of our control
|
||||
- The absence of shell integration markers may require adjusting settings to work around possible upstream bugs or local workstation configuration issues related to shell initialization and VS Code loading shell hooks
|
||||
|
||||
### Using the VS Code Terminal Integration Test Extension
|
||||
|
||||
The [VS Code Terminal Integration Test Extension](https://github.com/KJ7LNW/vsce-test-terminal-integration) helps diagnose shell integration issues by testing different settings combinations:
|
||||
|
||||
1. **When Commands Stall**:
|
||||
|
||||
- If you see "command already running" warnings, click "Reset Stats" to reset the terminal state
|
||||
- These warnings indicate shell integration is not working
|
||||
- Try different settings combinations until you find one that works
|
||||
- If it really gets stuck, restart the extension by closing the window and pressing F5
|
||||
- If you see "command already running" warnings, click "Reset Stats" to reset the terminal state
|
||||
- These warnings indicate shell integration is not working
|
||||
- Try different settings combinations until you find one that works
|
||||
- If it really gets stuck, restart the extension by closing the window and pressing F5
|
||||
|
||||
2. **Testing Settings**:
|
||||
|
||||
- Systematically try different combinations of:
|
||||
- Terminal Command Delay
|
||||
- Shell Integration settings
|
||||
- Document which combinations succeed or fail
|
||||
- This helps identify patterns in shell integration issues
|
||||
- Systematically try different combinations of:
|
||||
- Terminal Command Delay
|
||||
- Shell Integration settings
|
||||
- Document which combinations succeed or fail
|
||||
- This helps identify patterns in shell integration issues
|
||||
|
||||
3. **Reporting Issues**:
|
||||
- Once you find a problematic configuration
|
||||
- Document the exact settings combination
|
||||
- Note your environment (OS, VS Code version, shell, and any shell prompt customization)
|
||||
- Open an issue with these details to help improve shell integration
|
||||
- Once you find a problematic configuration
|
||||
- Document the exact settings combination
|
||||
- Note your environment (OS, VS Code version, shell, and any shell prompt customization)
|
||||
- Open an issue with these details to help improve shell integration
|
||||
|
||||
## Support
|
||||
|
||||
|
||||
@@ -43,23 +43,23 @@ MCP enables an AI to discover and use tools at runtime:
|
||||
```json
|
||||
// AI discovers available tools
|
||||
{
|
||||
"tools": [
|
||||
{
|
||||
"name": "readFile",
|
||||
"description": "Reads content from a file",
|
||||
"parameters": {
|
||||
"path": { "type": "string", "description": "File path" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "createTicket",
|
||||
"description": "Creates a ticket in issue tracker",
|
||||
"parameters": {
|
||||
"title": { "type": "string" },
|
||||
"description": { "type": "string" }
|
||||
}
|
||||
}
|
||||
]
|
||||
"tools": [
|
||||
{
|
||||
"name": "readFile",
|
||||
"description": "Reads content from a file",
|
||||
"parameters": {
|
||||
"path": { "type": "string", "description": "File path" }
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "createTicket",
|
||||
"description": "Creates a ticket in issue tracker",
|
||||
"parameters": {
|
||||
"title": { "type": "string" },
|
||||
"description": { "type": "string" }
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ Server-Sent Events (SSE) transport runs on a remote server and communicates over
|
||||
2. This establishes a persistent connection where the server can push events to the client
|
||||
3. For client-to-server communication, the client makes HTTP POST requests to a separate endpoint
|
||||
4. Communication happens over two channels:
|
||||
- Event Stream (GET): Server-to-client updates
|
||||
- Message Endpoint (POST): Client-to-server requests
|
||||
- Event Stream (GET): Server-to-client updates
|
||||
- Message Endpoint (POST): Client-to-server requests
|
||||
|
||||
```
|
||||
Client Server
|
||||
@@ -116,7 +116,7 @@ const server = new Server({ name: "remote-server", version: "1.0.0" })
|
||||
const transport = new SSEServerTransport(server)
|
||||
app.use("/mcp", transport.requestHandler())
|
||||
app.listen(3000, () => {
|
||||
console.log("MCP server listening on port 3000")
|
||||
console.log("MCP server listening on port 3000")
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
@@ -22,17 +22,17 @@ Edit `~/.kilocode/cli/global/settings/mcp_settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"server-name": {
|
||||
"command": "node",
|
||||
"args": ["/path/to/server.js"],
|
||||
"env": {
|
||||
"API_KEY": "your_api_key"
|
||||
},
|
||||
"alwaysAllow": ["tool1", "tool2"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
"mcpServers": {
|
||||
"server-name": {
|
||||
"command": "node",
|
||||
"args": ["/path/to/server.js"],
|
||||
"env": {
|
||||
"API_KEY": "your_api_key"
|
||||
},
|
||||
"alwaysAllow": ["tool1", "tool2"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -42,13 +42,13 @@ Edit `~/.kilocode/cli/global/settings/mcp_settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"local-server": {
|
||||
"command": "node",
|
||||
"args": ["/path/to/server.js"],
|
||||
"env": {}
|
||||
}
|
||||
}
|
||||
"mcpServers": {
|
||||
"local-server": {
|
||||
"command": "node",
|
||||
"args": ["/path/to/server.js"],
|
||||
"env": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -56,15 +56,15 @@ Edit `~/.kilocode/cli/global/settings/mcp_settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"remote-server": {
|
||||
"type": "streamable-http",
|
||||
"url": "https://your-server.com/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer token"
|
||||
}
|
||||
}
|
||||
}
|
||||
"mcpServers": {
|
||||
"remote-server": {
|
||||
"type": "streamable-http",
|
||||
"url": "https://your-server.com/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer token"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -92,11 +92,11 @@ MCP auto-approval is controlled via CLI config (`kilocode config`):
|
||||
|
||||
```json
|
||||
{
|
||||
"autoApproval": {
|
||||
"mcp": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
"autoApproval": {
|
||||
"mcp": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ You can edit both global and project-level MCP configuration files directly from
|
||||
2. Click the `Agent Behaviour` tab on the left side
|
||||
3. Select the `MCP Servers` sub-tab
|
||||
4. Click the appropriate button:
|
||||
- **`Edit Global MCP`**: Opens the global `mcp_settings.json` file.
|
||||
- **`Edit Project MCP`**: Opens the project-specific `.kilocode/mcp.json` file. If this file doesn't exist, Kilo Code will create it for you.
|
||||
- **`Edit Global MCP`**: Opens the global `mcp_settings.json` file.
|
||||
- **`Edit Project MCP`**: Opens the project-specific `.kilocode/mcp.json` file. If this file doesn't exist, Kilo Code will create it for you.
|
||||
|
||||
{% image src="/docs/img/using-mcp-in-kilo-code/mcp-installed-config.png" alt="Edit Global MCP and Edit Project MCP buttons" width="600" caption="Edit Global MCP and Edit Project MCP buttons" /%}
|
||||
|
||||
@@ -35,17 +35,17 @@ Both files use a JSON format with a `mcpServers` object containing named server
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"server1": {
|
||||
"command": "python",
|
||||
"args": ["/path/to/server.py"],
|
||||
"env": {
|
||||
"API_KEY": "your_api_key"
|
||||
},
|
||||
"alwaysAllow": ["tool1", "tool2"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
"mcpServers": {
|
||||
"server1": {
|
||||
"command": "python",
|
||||
"args": ["/path/to/server.py"],
|
||||
"env": {
|
||||
"API_KEY": "your_api_key"
|
||||
},
|
||||
"alwaysAllow": ["tool1", "tool2"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -71,17 +71,17 @@ STDIO configuration example:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"local-server": {
|
||||
"command": "node",
|
||||
"args": ["/path/to/server.js"],
|
||||
"env": {
|
||||
"API_KEY": "your_api_key"
|
||||
},
|
||||
"alwaysAllow": ["tool1", "tool2"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
"mcpServers": {
|
||||
"local-server": {
|
||||
"command": "node",
|
||||
"args": ["/path/to/server.js"],
|
||||
"env": {
|
||||
"API_KEY": "your_api_key"
|
||||
},
|
||||
"alwaysAllow": ["tool1", "tool2"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -98,17 +98,17 @@ Streamable HTTP transport configuration example:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"remote-server": {
|
||||
"type": "streamable-http",
|
||||
"url": "https://your-server-url.com/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer your-token"
|
||||
},
|
||||
"alwaysAllow": ["tool3"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
"mcpServers": {
|
||||
"remote-server": {
|
||||
"type": "streamable-http",
|
||||
"url": "https://your-server-url.com/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer your-token"
|
||||
},
|
||||
"alwaysAllow": ["tool3"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -130,16 +130,16 @@ SSE configuration example:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"remote-server": {
|
||||
"url": "https://your-server-url.com/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer your-token"
|
||||
},
|
||||
"alwaysAllow": ["tool3"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
"mcpServers": {
|
||||
"remote-server": {
|
||||
"url": "https://your-server-url.com/mcp",
|
||||
"headers": {
|
||||
"Authorization": "Bearer your-token"
|
||||
},
|
||||
"alwaysAllow": ["tool3"],
|
||||
"disabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -219,12 +219,12 @@ When setting up MCP servers on Windows, you'll need to use the Windows Command P
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"puppeteer": {
|
||||
"command": "cmd",
|
||||
"args": ["/c", "npx", "-y", "@modelcontextprotocol/server-puppeteer"]
|
||||
}
|
||||
}
|
||||
"mcpServers": {
|
||||
"puppeteer": {
|
||||
"command": "cmd",
|
||||
"args": ["/c", "npx", "-y", "@modelcontextprotocol/server-puppeteer"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -241,12 +241,12 @@ For macOS or Linux, you would use a different configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"puppeteer": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
|
||||
}
|
||||
}
|
||||
"mcpServers": {
|
||||
"puppeteer": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -48,45 +48,41 @@ This tool connects to MCP servers and fetches data from their exposed resources.
|
||||
When the `access_mcp_resource` tool is invoked, it follows this process:
|
||||
|
||||
1. **Connection Validation**:
|
||||
|
||||
- Verifies that an MCP hub is available and initialized
|
||||
- Confirms the specified server exists in the connection list
|
||||
- Checks if the server is disabled (returns an error if it is)
|
||||
- Verifies that an MCP hub is available and initialized
|
||||
- Confirms the specified server exists in the connection list
|
||||
- Checks if the server is disabled (returns an error if it is)
|
||||
|
||||
2. **User Approval**:
|
||||
|
||||
- Presents the resource access request to the user for approval
|
||||
- Provides server name and resource URI for user verification
|
||||
- Proceeds only if the user approves the resource access
|
||||
- Presents the resource access request to the user for approval
|
||||
- Provides server name and resource URI for user verification
|
||||
- Proceeds only if the user approves the resource access
|
||||
|
||||
3. **Resource Request**:
|
||||
|
||||
- Uses the Model Context Protocol SDK to communicate with servers
|
||||
- Makes a `resources/read` request to the server through the MCP hub
|
||||
- Applies configured timeouts to prevent hanging on unresponsive servers
|
||||
- Uses the Model Context Protocol SDK to communicate with servers
|
||||
- Makes a `resources/read` request to the server through the MCP hub
|
||||
- Applies configured timeouts to prevent hanging on unresponsive servers
|
||||
|
||||
4. **Response Processing**:
|
||||
- Receives a structured response with metadata and content arrays
|
||||
- Processes text content for display to the user
|
||||
- Handles image data specially for appropriate display
|
||||
- Returns the processed resource data to Kilo Code for use in the current task
|
||||
- Receives a structured response with metadata and content arrays
|
||||
- Processes text content for display to the user
|
||||
- Handles image data specially for appropriate display
|
||||
- Returns the processed resource data to Kilo Code for use in the current task
|
||||
|
||||
## Resource Types
|
||||
|
||||
MCP servers can provide two main types of resources:
|
||||
|
||||
1. **Standard Resources**:
|
||||
|
||||
- Fixed resources with specific URIs
|
||||
- Defined name, description, and MIME type
|
||||
- Direct access without parameters
|
||||
- Typically represent static data or real-time information
|
||||
- Fixed resources with specific URIs
|
||||
- Defined name, description, and MIME type
|
||||
- Direct access without parameters
|
||||
- Typically represent static data or real-time information
|
||||
|
||||
2. **Resource Templates**:
|
||||
- Parameterized resources with placeholder values in URIs
|
||||
- Allow dynamic resource generation based on provided parameters
|
||||
- Can represent queries or filtered views of data
|
||||
- More flexible but require additional URI formatting
|
||||
- Parameterized resources with placeholder values in URIs
|
||||
- Allow dynamic resource generation based on provided parameters
|
||||
- Can represent queries or filtered views of data
|
||||
- More flexible but require additional URI formatting
|
||||
|
||||
## Examples When Used
|
||||
|
||||
|
||||
@@ -47,46 +47,43 @@ This tool creates a conversational interface between Kilo Code and the user, all
|
||||
When the `ask_followup_question` tool is invoked, it follows this process:
|
||||
|
||||
1. **Parameter Validation**: Validates the required `question` parameter and checks for optional suggestions
|
||||
|
||||
- Ensures question text is provided
|
||||
- Parses any suggested answers from the `follow_up` parameter using the `fast-xml-parser` library
|
||||
- Normalizes suggestions into an array format even if there's only one suggestion
|
||||
- Ensures question text is provided
|
||||
- Parses any suggested answers from the `follow_up` parameter using the `fast-xml-parser` library
|
||||
- Normalizes suggestions into an array format even if there's only one suggestion
|
||||
|
||||
2. **JSON Transformation**: Converts the XML structure into a standardized JSON format for UI display
|
||||
|
||||
```typescript
|
||||
{
|
||||
question: "User's question here",
|
||||
suggest: [
|
||||
{ answer: "Suggestion 1" },
|
||||
{ answer: "Suggestion 2" }
|
||||
]
|
||||
}
|
||||
```
|
||||
```typescript
|
||||
{
|
||||
question: "User's question here",
|
||||
suggest: [
|
||||
{ answer: "Suggestion 1" },
|
||||
{ answer: "Suggestion 2" }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
3. **UI Integration**:
|
||||
|
||||
- Passes the JSON structure to the UI layer via the `ask("followup", ...)` method
|
||||
- Displays selectable suggestion buttons to the user in the interface
|
||||
- Creates an interactive experience for selecting or typing a response
|
||||
- Passes the JSON structure to the UI layer via the `ask("followup", ...)` method
|
||||
- Displays selectable suggestion buttons to the user in the interface
|
||||
- Creates an interactive experience for selecting or typing a response
|
||||
|
||||
4. **Response Collection and Processing**:
|
||||
|
||||
- Captures user text input and any images included in the response
|
||||
- Wraps user responses in `<answer>` tags when returning to the assistant
|
||||
- Preserves any images included in the user's response
|
||||
- Maintains the conversational context by adding the response to the history
|
||||
- Resets the consecutive error counter when the tool is used successfully
|
||||
- Captures user text input and any images included in the response
|
||||
- Wraps user responses in `<answer>` tags when returning to the assistant
|
||||
- Preserves any images included in the user's response
|
||||
- Maintains the conversational context by adding the response to the history
|
||||
- Resets the consecutive error counter when the tool is used successfully
|
||||
|
||||
5. **Error Handling**:
|
||||
- Tracks consecutive mistakes using a counter
|
||||
- Resets the counter when the tool is used successfully
|
||||
- Provides specific error messages:
|
||||
- For missing parameters: "Missing required parameter 'question'"
|
||||
- For XML parsing: "Failed to parse operations: [error message]"
|
||||
- For invalid format: "Invalid operations xml format"
|
||||
- Contains safeguards to prevent tool execution when required parameters are missing
|
||||
- Increments consecutive mistake count when errors occur
|
||||
- Tracks consecutive mistakes using a counter
|
||||
- Resets the counter when the tool is used successfully
|
||||
- Provides specific error messages:
|
||||
- For missing parameters: "Missing required parameter 'question'"
|
||||
- For XML parsing: "Failed to parse operations: [error message]"
|
||||
- For invalid format: "Invalid operations xml format"
|
||||
- Contains safeguards to prevent tool execution when required parameters are missing
|
||||
- Increments consecutive mistake count when errors occur
|
||||
|
||||
## Workflow Sequence
|
||||
|
||||
@@ -99,9 +96,9 @@ The question-answer cycle follows this sequence:
|
||||
5. **UI Presentation**: Question and suggestions are displayed to the user as interactive elements
|
||||
6. **User Response**: The user selects a suggestion or provides a custom answer
|
||||
7. **Message Handling**: System handles both partial and complete messages
|
||||
- For streaming responses, processes chunks as they arrive
|
||||
- For complete messages, processes the entire response at once
|
||||
- Maintains state consistency regardless of message chunking
|
||||
- For streaming responses, processes chunks as they arrive
|
||||
- For complete messages, processes the entire response at once
|
||||
- Maintains state consistency regardless of message chunking
|
||||
8. **Response Processing**: System wraps the response in `<answer>` tags and preserves images
|
||||
9. **Context Integration**: Response is added to the conversation history
|
||||
10. **Task Continuation**: Kilo Code proceeds with the task using the new information
|
||||
|
||||
@@ -49,39 +49,34 @@ This tool marks the end of a task by presenting a final summary of what was acco
|
||||
When the `attempt_completion` tool is invoked, it follows this process:
|
||||
|
||||
1. **Safety Consideration** (guideline, not enforced):
|
||||
|
||||
- The AI is instructed to confirm previous tool uses were successful
|
||||
- This is a best practice rather than a programmatically enforced mechanism
|
||||
- The AI is instructed to confirm previous tool uses were successful
|
||||
- This is a best practice rather than a programmatically enforced mechanism
|
||||
|
||||
2. **Result Presentation**:
|
||||
|
||||
- Displays the completion message to the user in a special "completion_result" UI format
|
||||
- Removes XML closing tags from the result text using the `removeClosingTag` function
|
||||
- Presents the result differently than regular messages for visual distinction
|
||||
- Displays the completion message to the user in a special "completion_result" UI format
|
||||
- Removes XML closing tags from the result text using the `removeClosingTag` function
|
||||
- Presents the result differently than regular messages for visual distinction
|
||||
|
||||
3. **Command Execution** (if provided):
|
||||
|
||||
- Requests user approval before executing the command
|
||||
- Only executes if the user approves
|
||||
- Executes the command using the system's command execution functionality
|
||||
- Shows the result of the command to the user
|
||||
- Requests user approval before executing the command
|
||||
- Only executes if the user approves
|
||||
- Executes the command using the system's command execution functionality
|
||||
- Shows the result of the command to the user
|
||||
|
||||
4. **Feedback Collection**:
|
||||
|
||||
- Waits for user feedback on the completion result
|
||||
- Processes this feedback and returns it to the AI
|
||||
- Enables continued refinement based on user input
|
||||
- Waits for user feedback on the completion result
|
||||
- Processes this feedback and returns it to the AI
|
||||
- Enables continued refinement based on user input
|
||||
|
||||
5. **Task Completion and Continuation**:
|
||||
|
||||
- Signals the task as completed in the system
|
||||
- Captures telemetry data for the completed task
|
||||
- For subtasks, offers to finish the subtask and resume the parent task
|
||||
- Supports continued conversation through the feedback mechanism
|
||||
- Signals the task as completed in the system
|
||||
- Captures telemetry data for the completed task
|
||||
- For subtasks, offers to finish the subtask and resume the parent task
|
||||
- Supports continued conversation through the feedback mechanism
|
||||
|
||||
6. **Implementation Integration**:
|
||||
- Tool results are parsed through the system's parsing mechanism in `parse-assistant-message.ts`
|
||||
- The tool is part of the "ALWAYS_AVAILABLE_TOOLS" constant, making it available in all modes
|
||||
- Tool results are parsed through the system's parsing mechanism in `parse-assistant-message.ts`
|
||||
- The tool is part of the "ALWAYS_AVAILABLE_TOOLS" constant, making it available in all modes
|
||||
|
||||
## Result Formatting Guidelines
|
||||
|
||||
@@ -104,9 +99,9 @@ When including a command, follow these guidelines:
|
||||
- Choose commands that visually demonstrate the result
|
||||
- Prefer commands that show the user what was created or modified
|
||||
- Examples include:
|
||||
- `open index.html` to display a created website
|
||||
- `npm start` to launch a development server
|
||||
- `python app.py` to run a created application
|
||||
- `open index.html` to display a created website
|
||||
- `npm start` to launch a development server
|
||||
- `python app.py` to run a created application
|
||||
- Avoid commands that merely print text (like `echo` or `cat`)
|
||||
- Remember that commands require user approval before execution
|
||||
- Ensure the command is valid for the user's operating system
|
||||
|
||||
@@ -7,12 +7,12 @@ The `browser_action` tool enables web automation and interaction via a Puppeteer
|
||||
The tool accepts these parameters:
|
||||
|
||||
- `action` (required): The action to perform:
|
||||
- `launch`: Start a new browser session at a URL
|
||||
- `click`: Click at specific x,y coordinates
|
||||
- `type`: Type text via the keyboard
|
||||
- `scroll_down`: Scroll down one page height
|
||||
- `scroll_up`: Scroll up one page height
|
||||
- `close`: End the browser session
|
||||
- `launch`: Start a new browser session at a URL
|
||||
- `click`: Click at specific x,y coordinates
|
||||
- `type`: Type text via the keyboard
|
||||
- `scroll_down`: Scroll down one page height
|
||||
- `scroll_up`: Scroll up one page height
|
||||
- `close`: End the browser session
|
||||
- `url` (optional): The URL to navigate to when using the `launch` action
|
||||
- `coordinate` (optional): The x,y coordinates for the `click` action (e.g., "450,300")
|
||||
- `text` (optional): The text to type when using the `type` action
|
||||
@@ -77,28 +77,25 @@ The tool operates in two distinct modes:
|
||||
When the `browser_action` tool is invoked, it follows this process:
|
||||
|
||||
1. **Action Validation and Browser Management**:
|
||||
|
||||
- Validates the required parameters for the requested action
|
||||
- For `launch`: Initializes a browser session (either local Puppeteer instance or remote Chrome)
|
||||
- For interaction actions: Uses the existing browser session
|
||||
- For `close`: Terminates or disconnects from the browser appropriately
|
||||
- Validates the required parameters for the requested action
|
||||
- For `launch`: Initializes a browser session (either local Puppeteer instance or remote Chrome)
|
||||
- For interaction actions: Uses the existing browser session
|
||||
- For `close`: Terminates or disconnects from the browser appropriately
|
||||
|
||||
2. **Page Interaction and Stability**:
|
||||
|
||||
- Ensures pages are fully loaded using DOM stability detection via `waitTillHTMLStable` algorithm
|
||||
- Executes requested actions (navigation, clicking, typing, scrolling) with proper timing
|
||||
- Monitors network activity after clicks and waits for navigation when necessary
|
||||
- Ensures pages are fully loaded using DOM stability detection via `waitTillHTMLStable` algorithm
|
||||
- Executes requested actions (navigation, clicking, typing, scrolling) with proper timing
|
||||
- Monitors network activity after clicks and waits for navigation when necessary
|
||||
|
||||
3. **Visual Feedback**:
|
||||
|
||||
- Captures optimized screenshots using WebP format (with PNG fallback)
|
||||
- Records browser console logs for debugging purposes
|
||||
- Tracks mouse position and maintains paginated history of actions
|
||||
- Captures optimized screenshots using WebP format (with PNG fallback)
|
||||
- Records browser console logs for debugging purposes
|
||||
- Tracks mouse position and maintains paginated history of actions
|
||||
|
||||
4. **Session Management**:
|
||||
- Maintains browser state across multiple actions
|
||||
- Handles errors and automatically cleans up resources
|
||||
- Enforces proper workflow sequence (launch → interactions → close)
|
||||
- Maintains browser state across multiple actions
|
||||
- Handles errors and automatically cleans up resources
|
||||
- Enforces proper workflow sequence (launch → interactions → close)
|
||||
|
||||
## Workflow Sequence
|
||||
|
||||
|
||||
@@ -73,40 +73,35 @@ This tool is only available when the Codebase Indexing feature is properly confi
|
||||
When the `codebase_search` tool is invoked, it follows this process:
|
||||
|
||||
1. **Availability Validation**:
|
||||
|
||||
- Verifies that the CodeIndexManager is available and initialized
|
||||
- Confirms codebase indexing is enabled in settings
|
||||
- Checks that indexing is properly configured (API keys, Qdrant URL)
|
||||
- Validates the current index state allows searching
|
||||
- Verifies that the CodeIndexManager is available and initialized
|
||||
- Confirms codebase indexing is enabled in settings
|
||||
- Checks that indexing is properly configured (API keys, Qdrant URL)
|
||||
- Validates the current index state allows searching
|
||||
|
||||
2. **Query Processing**:
|
||||
|
||||
- Takes your natural language query and generates an embedding vector
|
||||
- Uses the same embedding provider configured for indexing (OpenAI or Ollama)
|
||||
- Converts the semantic meaning of your query into a mathematical representation
|
||||
- Takes your natural language query and generates an embedding vector
|
||||
- Uses the same embedding provider configured for indexing (OpenAI or Ollama)
|
||||
- Converts the semantic meaning of your query into a mathematical representation
|
||||
|
||||
3. **Vector Search Execution**:
|
||||
|
||||
- Searches the Qdrant vector database for similar code embeddings
|
||||
- Uses cosine similarity to find the most relevant code blocks
|
||||
- Applies the minimum similarity threshold (default: 0.4, configurable) to filter results
|
||||
- Limits results to 50 matches for optimal performance
|
||||
- Searches the Qdrant vector database for similar code embeddings
|
||||
- Uses cosine similarity to find the most relevant code blocks
|
||||
- Applies the minimum similarity threshold (default: 0.4, configurable) to filter results
|
||||
- Limits results to 50 matches for optimal performance
|
||||
|
||||
4. **Path Filtering** (if specified):
|
||||
|
||||
- Filters results to only include files within the specified directory path
|
||||
- Uses normalized path comparison for accurate filtering
|
||||
- Maintains relevance ranking within the filtered scope
|
||||
- Filters results to only include files within the specified directory path
|
||||
- Uses normalized path comparison for accurate filtering
|
||||
- Maintains relevance ranking within the filtered scope
|
||||
|
||||
5. **Result Processing and Formatting**:
|
||||
|
||||
- Converts absolute file paths to workspace-relative paths
|
||||
- Structures results with file paths, line ranges, similarity scores, and code content
|
||||
- Formats for both AI consumption and UI display with syntax highlighting
|
||||
- Converts absolute file paths to workspace-relative paths
|
||||
- Structures results with file paths, line ranges, similarity scores, and code content
|
||||
- Formats for both AI consumption and UI display with syntax highlighting
|
||||
|
||||
6. **Dual Output Format**:
|
||||
- **AI Output**: Structured text format with query, file paths, scores, and code chunks
|
||||
- **UI Output**: JSON format with syntax highlighting and navigation capabilities
|
||||
- **AI Output**: Structured text format with query, file paths, scores, and code chunks
|
||||
- **UI Output**: JSON format with syntax highlighting and navigation capabilities
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -54,62 +54,56 @@ This tool executes terminal commands directly on the user's system, enabling a w
|
||||
When the `execute_command` tool is invoked, it follows this process:
|
||||
|
||||
1. **Command Validation and Security Checks**:
|
||||
|
||||
- Parses the command using shell-quote to identify components
|
||||
- Validates against security restrictions (subshell usage, restricted files)
|
||||
- Checks against KiloCodeIgnore rules for file access permissions
|
||||
- Ensures the command meets system security requirements
|
||||
- Parses the command using shell-quote to identify components
|
||||
- Validates against security restrictions (subshell usage, restricted files)
|
||||
- Checks against KiloCodeIgnore rules for file access permissions
|
||||
- Ensures the command meets system security requirements
|
||||
|
||||
2. **Terminal Management**:
|
||||
|
||||
- Gets or creates a terminal through TerminalRegistry
|
||||
- Sets up the working directory context
|
||||
- Prepares event listeners for output capture
|
||||
- Shows the terminal for user visibility
|
||||
- Gets or creates a terminal through TerminalRegistry
|
||||
- Sets up the working directory context
|
||||
- Prepares event listeners for output capture
|
||||
- Shows the terminal for user visibility
|
||||
|
||||
3. **Command Execution and Monitoring**:
|
||||
|
||||
- Executes via VS Code's shellIntegration API
|
||||
- Captures output with escape sequence processing
|
||||
- Throttles output handling (100ms intervals)
|
||||
- Monitors for command completion or errors
|
||||
- Detects "hot" processes like compilers for special handling
|
||||
- Executes via VS Code's shellIntegration API
|
||||
- Captures output with escape sequence processing
|
||||
- Throttles output handling (100ms intervals)
|
||||
- Monitors for command completion or errors
|
||||
- Detects "hot" processes like compilers for special handling
|
||||
|
||||
4. **Result Processing**:
|
||||
- Strips ANSI/VS Code escape sequences for clean output
|
||||
- Interprets exit codes with detailed signal information
|
||||
- Updates working directory tracking if changed by command
|
||||
- Provides command status with appropriate context
|
||||
- Strips ANSI/VS Code escape sequences for clean output
|
||||
- Interprets exit codes with detailed signal information
|
||||
- Updates working directory tracking if changed by command
|
||||
- Provides command status with appropriate context
|
||||
|
||||
## Terminal Implementation Details
|
||||
|
||||
The tool uses a sophisticated terminal management system:
|
||||
|
||||
1. **First Priority: Terminal Reuse**
|
||||
|
||||
- The TerminalRegistry tries to reuse existing terminals when possible
|
||||
- This reduces proliferation of terminal instances and improves performance
|
||||
- Terminal state (working directory, history) is preserved across commands
|
||||
- The TerminalRegistry tries to reuse existing terminals when possible
|
||||
- This reduces proliferation of terminal instances and improves performance
|
||||
- Terminal state (working directory, history) is preserved across commands
|
||||
|
||||
2. **Second Priority: Security Validation**
|
||||
|
||||
- Commands are parsed using shell-quote for component analysis
|
||||
- Dangerous patterns like `$(...)` and backticks are blocked
|
||||
- Commands are checked against KiloCodeIgnore rules for file access control
|
||||
- A prefix-based allowlist system validates command patterns
|
||||
- Commands are parsed using shell-quote for component analysis
|
||||
- Dangerous patterns like `$(...)` and backticks are blocked
|
||||
- Commands are checked against KiloCodeIgnore rules for file access control
|
||||
- A prefix-based allowlist system validates command patterns
|
||||
|
||||
3. **Performance Optimizations**
|
||||
|
||||
- Output is processed in 100ms throttled intervals to prevent UI overload
|
||||
- Zero-copy buffer management uses index-based tracking for efficiency
|
||||
- Special handling for compilation and "hot" processes
|
||||
- Platform-specific optimizations for Windows PowerShell
|
||||
- Output is processed in 100ms throttled intervals to prevent UI overload
|
||||
- Zero-copy buffer management uses index-based tracking for efficiency
|
||||
- Special handling for compilation and "hot" processes
|
||||
- Platform-specific optimizations for Windows PowerShell
|
||||
|
||||
4. **Error and Signal Handling**
|
||||
- Exit codes are mapped to detailed signal information (SIGTERM, SIGKILL, etc.)
|
||||
- Core dump detection for critical failures
|
||||
- Working directory changes are tracked and handled automatically
|
||||
- Clean recovery from terminal disconnection scenarios
|
||||
- Exit codes are mapped to detailed signal information (SIGTERM, SIGKILL, etc.)
|
||||
- Core dump detection for critical failures
|
||||
- Working directory changes are tracked and handled automatically
|
||||
- Clean recovery from terminal disconnection scenarios
|
||||
|
||||
## Examples When Used
|
||||
|
||||
|
||||
@@ -87,21 +87,19 @@ These tools help manage the conversation and task flow:
|
||||
Tools are invoked under specific conditions:
|
||||
|
||||
1. **Direct Task Requirements**
|
||||
|
||||
- When specific actions are needed to complete a task as decided by the LLM
|
||||
- In response to user requests
|
||||
- During automated workflows
|
||||
- When specific actions are needed to complete a task as decided by the LLM
|
||||
- In response to user requests
|
||||
- During automated workflows
|
||||
|
||||
2. **Mode-Based Availability**
|
||||
|
||||
- Different modes enable different tool sets
|
||||
- Mode switches can trigger tool availability changes
|
||||
- Some tools are restricted to specific modes
|
||||
- Different modes enable different tool sets
|
||||
- Mode switches can trigger tool availability changes
|
||||
- Some tools are restricted to specific modes
|
||||
|
||||
3. **Context-Dependent Calls**
|
||||
- Based on the current state of the workspace
|
||||
- In response to system events
|
||||
- During error handling and recovery
|
||||
- Based on the current state of the workspace
|
||||
- In response to system events
|
||||
- During error handling and recovery
|
||||
|
||||
### Decision Process
|
||||
|
||||
@@ -109,65 +107,62 @@ The system uses a multi-step process to determine tool availability:
|
||||
|
||||
1. **Mode Validation**
|
||||
|
||||
```typescript
|
||||
isToolAllowedForMode(
|
||||
tool: string,
|
||||
modeSlug: string,
|
||||
customModes: ModeConfig[],
|
||||
toolRequirements?: Record<string, boolean>,
|
||||
toolParams?: Record<string, any>
|
||||
)
|
||||
```
|
||||
```typescript
|
||||
isToolAllowedForMode(
|
||||
tool: string,
|
||||
modeSlug: string,
|
||||
customModes: ModeConfig[],
|
||||
toolRequirements?: Record<string, boolean>,
|
||||
toolParams?: Record<string, any>
|
||||
)
|
||||
```
|
||||
|
||||
2. **Requirement Checking**
|
||||
|
||||
- System capability verification
|
||||
- Resource availability
|
||||
- Permission validation
|
||||
- System capability verification
|
||||
- Resource availability
|
||||
- Permission validation
|
||||
|
||||
3. **Parameter Validation**
|
||||
- Required parameter presence
|
||||
- Parameter type checking
|
||||
- Value validation
|
||||
- Required parameter presence
|
||||
- Parameter type checking
|
||||
- Value validation
|
||||
|
||||
## Technical Implementation
|
||||
|
||||
### Tool Call Processing
|
||||
|
||||
1. **Initialization**
|
||||
|
||||
- Tool name and parameters are validated
|
||||
- Mode compatibility is checked
|
||||
- Requirements are verified
|
||||
- Tool name and parameters are validated
|
||||
- Mode compatibility is checked
|
||||
- Requirements are verified
|
||||
|
||||
2. **Execution**
|
||||
|
||||
```typescript
|
||||
const toolCall = {
|
||||
type: "tool_call",
|
||||
name: chunk.name,
|
||||
arguments: chunk.input,
|
||||
callId: chunk.callId,
|
||||
}
|
||||
```
|
||||
```typescript
|
||||
const toolCall = {
|
||||
type: "tool_call",
|
||||
name: chunk.name,
|
||||
arguments: chunk.input,
|
||||
callId: chunk.callId,
|
||||
}
|
||||
```
|
||||
|
||||
3. **Result Handling**
|
||||
- Success/failure determination
|
||||
- Result formatting
|
||||
- Error handling
|
||||
- Success/failure determination
|
||||
- Result formatting
|
||||
- Error handling
|
||||
|
||||
### Security and Permissions
|
||||
|
||||
1. **Access Control**
|
||||
|
||||
- File system restrictions
|
||||
- Command execution limitations
|
||||
- Network access controls
|
||||
- File system restrictions
|
||||
- Command execution limitations
|
||||
- Network access controls
|
||||
|
||||
2. **Validation Layers**
|
||||
- Tool-specific validation
|
||||
- Mode-based restrictions
|
||||
- System-level checks
|
||||
- Tool-specific validation
|
||||
- Mode-based restrictions
|
||||
- System-level checks
|
||||
|
||||
## Mode Integration
|
||||
|
||||
@@ -183,92 +178,86 @@ Tools are made available based on the current mode:
|
||||
### Mode Switching
|
||||
|
||||
1. **Process**
|
||||
|
||||
- Current mode state preservation
|
||||
- Tool availability updates
|
||||
- Context switching
|
||||
- Current mode state preservation
|
||||
- Tool availability updates
|
||||
- Context switching
|
||||
|
||||
2. **Impact on Tools**
|
||||
- Tool set changes
|
||||
- Permission adjustments
|
||||
- Context preservation
|
||||
- Tool set changes
|
||||
- Permission adjustments
|
||||
- Context preservation
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Tool Usage Guidelines
|
||||
|
||||
1. **Efficiency**
|
||||
|
||||
- Use the most specific tool for the task
|
||||
- Avoid redundant tool calls
|
||||
- Batch operations when possible
|
||||
- Use the most specific tool for the task
|
||||
- Avoid redundant tool calls
|
||||
- Batch operations when possible
|
||||
|
||||
2. **Security**
|
||||
|
||||
- Validate inputs before tool calls
|
||||
- Use minimum required permissions
|
||||
- Follow security best practices
|
||||
- Validate inputs before tool calls
|
||||
- Use minimum required permissions
|
||||
- Follow security best practices
|
||||
|
||||
3. **Error Handling**
|
||||
- Implement proper error checking
|
||||
- Provide meaningful error messages
|
||||
- Handle failures gracefully
|
||||
- Implement proper error checking
|
||||
- Provide meaningful error messages
|
||||
- Handle failures gracefully
|
||||
|
||||
### Common Patterns
|
||||
|
||||
1. **Information Gathering**
|
||||
|
||||
```
|
||||
[ask_followup_question](/docs/features/tools/ask-followup-question) → [read_file](/docs/features/tools/read-file) → [search_files](/docs/features/tools/search-files)
|
||||
```
|
||||
```
|
||||
[ask_followup_question](/docs/features/tools/ask-followup-question) → [read_file](/docs/features/tools/read-file) → [search_files](/docs/features/tools/search-files)
|
||||
```
|
||||
|
||||
2. **Code Modification**
|
||||
|
||||
```
|
||||
[read_file](/docs/features/tools/read-file) → [apply_diff](/docs/features/tools/apply-diff) → [attempt_completion](/docs/features/tools/attempt-completion)
|
||||
```
|
||||
```
|
||||
[read_file](/docs/features/tools/read-file) → [apply_diff](/docs/features/tools/apply-diff) → [attempt_completion](/docs/features/tools/attempt-completion)
|
||||
```
|
||||
|
||||
3. **Task Management**
|
||||
|
||||
```
|
||||
[new_task](/docs/features/tools/new-task) → [switch_mode](/docs/features/tools/switch-mode) → [execute_command](/docs/features/tools/execute-command)
|
||||
```
|
||||
```
|
||||
[new_task](/docs/features/tools/new-task) → [switch_mode](/docs/features/tools/switch-mode) → [execute_command](/docs/features/tools/execute-command)
|
||||
```
|
||||
|
||||
4. **Progress Tracking**
|
||||
```
|
||||
[update_todo_list](/docs/features/tools/update-todo-list) → [execute_command](/docs/features/tools/execute-command) → [update_todo_list](/docs/features/tools/update-todo-list)
|
||||
```
|
||||
```
|
||||
[update_todo_list](/docs/features/tools/update-todo-list) → [execute_command](/docs/features/tools/execute-command) → [update_todo_list](/docs/features/tools/update-todo-list)
|
||||
```
|
||||
|
||||
## Error Handling and Recovery
|
||||
|
||||
### Error Types
|
||||
|
||||
1. **Tool-Specific Errors**
|
||||
|
||||
- Parameter validation failures
|
||||
- Execution errors
|
||||
- Resource access issues
|
||||
- Parameter validation failures
|
||||
- Execution errors
|
||||
- Resource access issues
|
||||
|
||||
2. **System Errors**
|
||||
|
||||
- Permission denied
|
||||
- Resource unavailable
|
||||
- Network failures
|
||||
- Permission denied
|
||||
- Resource unavailable
|
||||
- Network failures
|
||||
|
||||
3. **Context Errors**
|
||||
- Invalid mode for tool
|
||||
- Missing requirements
|
||||
- State inconsistencies
|
||||
- Invalid mode for tool
|
||||
- Missing requirements
|
||||
- State inconsistencies
|
||||
|
||||
### Recovery Strategies
|
||||
|
||||
1. **Automatic Recovery**
|
||||
|
||||
- Retry mechanisms
|
||||
- Fallback options
|
||||
- State restoration
|
||||
- Retry mechanisms
|
||||
- Fallback options
|
||||
- State restoration
|
||||
|
||||
2. **User Intervention**
|
||||
- Error notifications
|
||||
- Recovery suggestions
|
||||
- Manual intervention options
|
||||
- Error notifications
|
||||
- Recovery suggestions
|
||||
- Manual intervention options
|
||||
|
||||
@@ -55,9 +55,9 @@ When the `list_code_definition_names` tool is invoked, it follows this process:
|
||||
4. **File Filtering**: Limits processing to a maximum of 50 files
|
||||
5. **Language Detection**: Identifies file types based on extensions (.js, .jsx, .ts, .tsx, .py, .rs, .go, .cpp, .hpp, .c, .h, .cs, .rb, .java, .php, .swift, .kt, .kts)
|
||||
6. **Code Parsing**: Uses Tree-sitter to parse code and extract definitions through these steps:
|
||||
- Parsing file content into an Abstract Syntax Tree (AST)
|
||||
- Creating a query using a language-specific query string
|
||||
- Sorting the captures by their position in the file
|
||||
- Parsing file content into an Abstract Syntax Tree (AST)
|
||||
- Creating a query using a language-specific query string
|
||||
- Sorting the captures by their position in the file
|
||||
7. **Result Formatting**: Outputs definitions with line numbers and actual source code
|
||||
|
||||
## Output Format
|
||||
|
||||
@@ -50,19 +50,19 @@ When the `list_files` tool is invoked, it follows this process:
|
||||
2. **Path Resolution**: Resolves the relative path to an absolute path
|
||||
3. **Security Checks**: Prevents listing files in sensitive locations like root or home directories
|
||||
4. **Directory Scanning**:
|
||||
- For non-recursive mode: Lists only the top-level contents
|
||||
- For recursive mode: Traverses the directory structure level by level with a 10-second timeout
|
||||
- If timeout occurs, returns partial results collected up to that point
|
||||
- For non-recursive mode: Lists only the top-level contents
|
||||
- For recursive mode: Traverses the directory structure level by level with a 10-second timeout
|
||||
- If timeout occurs, returns partial results collected up to that point
|
||||
5. **Result Filtering**:
|
||||
- In recursive mode, skips common large directories like `node_modules`, `.git`, etc.
|
||||
- Respects `.gitignore` rules when in recursive mode
|
||||
- Handles `.kilocodeignore` patterns, either hiding files or marking them with a lock symbol
|
||||
- In recursive mode, skips common large directories like `node_modules`, `.git`, etc.
|
||||
- Respects `.gitignore` rules when in recursive mode
|
||||
- Handles `.kilocodeignore` patterns, either hiding files or marking them with a lock symbol
|
||||
6. **Formatting**:
|
||||
- Marks directories with a trailing slash (`/`)
|
||||
- Sorts results to show directories before their contents for logical hierarchy
|
||||
- Marks ignored files with a lock symbol (🔒) when `showKiloCodeIgnored` is enabled
|
||||
- Caps results at 200 files by default with a note about using subdirectories
|
||||
- Organizes results for readability
|
||||
- Marks directories with a trailing slash (`/`)
|
||||
- Sorts results to show directories before their contents for logical hierarchy
|
||||
- Marks ignored files with a lock symbol (🔒) when `showKiloCodeIgnored` is enabled
|
||||
- Caps results at 200 files by default with a note about using subdirectories
|
||||
- Organizes results for readability
|
||||
|
||||
## File Listing Format
|
||||
|
||||
|
||||
@@ -45,33 +45,29 @@ This tool creates a new task instance with a specified starting mode and initial
|
||||
When the `new_task` tool is invoked, it follows this process:
|
||||
|
||||
1. **Parameter Validation**:
|
||||
|
||||
- Validates the required `mode` and `message` parameters
|
||||
- Verifies that the requested mode exists in the system
|
||||
- Validates the required `mode` and `message` parameters
|
||||
- Verifies that the requested mode exists in the system
|
||||
|
||||
2. **Task Stack Management**:
|
||||
|
||||
- Maintains a task stack that tracks all active and paused tasks
|
||||
- Preserves the current mode for later resumption
|
||||
- Sets the parent task to paused state
|
||||
- Maintains a task stack that tracks all active and paused tasks
|
||||
- Preserves the current mode for later resumption
|
||||
- Sets the parent task to paused state
|
||||
|
||||
3. **Task Context Management**:
|
||||
|
||||
- Creates a new task context with the provided message
|
||||
- Assigns unique taskId and instanceId identifiers for state management
|
||||
- Captures telemetry data on tool usage and task lifecycles
|
||||
- Creates a new task context with the provided message
|
||||
- Assigns unique taskId and instanceId identifiers for state management
|
||||
- Captures telemetry data on tool usage and task lifecycles
|
||||
|
||||
4. **Mode Switching and Integration**:
|
||||
|
||||
- Switches to the specified mode with appropriate role and capabilities
|
||||
- Initializes the new task with the provided message
|
||||
- Integrates with VS Code's command palette and code actions
|
||||
- Switches to the specified mode with appropriate role and capabilities
|
||||
- Initializes the new task with the provided message
|
||||
- Integrates with VS Code's command palette and code actions
|
||||
|
||||
5. **Task Completion and Result Transfer**:
|
||||
- When subtask completes, result is passed back to parent task via `finishSubTask()`
|
||||
- Parent task resumes in its original mode
|
||||
- Task history and token usage metrics are updated
|
||||
- The `taskCompleted` event is emitted with performance data
|
||||
- When subtask completes, result is passed back to parent task via `finishSubTask()`
|
||||
- Parent task resumes in its original mode
|
||||
- Task history and token usage metrics are updated
|
||||
- The `taskCompleted` event is emitted with performance data
|
||||
|
||||
## Examples When Used
|
||||
|
||||
|
||||
@@ -45,38 +45,36 @@ When the `read_file` tool is invoked, it follows this process:
|
||||
1. **Parameter Validation**: Validates the required `path` parameter and optional parameters
|
||||
2. **Path Resolution**: Resolves the relative path to an absolute path
|
||||
3. **Reading Strategy Selection**:
|
||||
- The tool uses a strict priority hierarchy (explained in detail below)
|
||||
- It chooses between range reading, auto-truncation, or full file reading
|
||||
- The tool uses a strict priority hierarchy (explained in detail below)
|
||||
- It chooses between range reading, auto-truncation, or full file reading
|
||||
4. **Content Processing**:
|
||||
- Adds line numbers to the content (e.g., "1 | const x = 13") where `1 |` is the line number.
|
||||
- For truncated files, adds truncation notice and method definitions
|
||||
- For special formats (PDF, DOCX, IPYNB), extracts readable text
|
||||
- Adds line numbers to the content (e.g., "1 | const x = 13") where `1 |` is the line number.
|
||||
- For truncated files, adds truncation notice and method definitions
|
||||
- For special formats (PDF, DOCX, IPYNB), extracts readable text
|
||||
|
||||
## Reading Strategy Priority
|
||||
|
||||
The tool uses a clear decision hierarchy to determine how to read a file:
|
||||
|
||||
1. **First Priority: Explicit Line Range**
|
||||
|
||||
- If either `start_line` or `end_line` is provided, the tool always performs a range read
|
||||
- The implementation efficiently streams only the requested lines, making it suitable for processing large files
|
||||
- This takes precedence over all other options
|
||||
- If either `start_line` or `end_line` is provided, the tool always performs a range read
|
||||
- The implementation efficiently streams only the requested lines, making it suitable for processing large files
|
||||
- This takes precedence over all other options
|
||||
|
||||
2. **Second Priority: Auto-Truncation for Large Files**
|
||||
|
||||
- This only applies when ALL of these conditions are met:
|
||||
- Neither `start_line` nor `end_line` is specified
|
||||
- The `auto_truncate` parameter is set to `true`
|
||||
- The file is not a binary file
|
||||
- The file exceeds the configured line threshold (typically 500-1000 lines)
|
||||
- When auto-truncation activates, the tool:
|
||||
- Reads only the first portion of the file (determined by the maxReadFileLine setting)
|
||||
- Adds a truncation notice showing the number of lines displayed vs. total
|
||||
- Provides a summary of method definitions with their line ranges
|
||||
- This only applies when ALL of these conditions are met:
|
||||
- Neither `start_line` nor `end_line` is specified
|
||||
- The `auto_truncate` parameter is set to `true`
|
||||
- The file is not a binary file
|
||||
- The file exceeds the configured line threshold (typically 500-1000 lines)
|
||||
- When auto-truncation activates, the tool:
|
||||
- Reads only the first portion of the file (determined by the maxReadFileLine setting)
|
||||
- Adds a truncation notice showing the number of lines displayed vs. total
|
||||
- Provides a summary of method definitions with their line ranges
|
||||
|
||||
3. **Default Behavior: Read Entire File**
|
||||
- If neither of the above conditions are met, it reads the entire file content
|
||||
- For special formats like PDF, DOCX, and IPYNB, it uses specialized extractors
|
||||
- If neither of the above conditions are met, it reads the entire file content
|
||||
- For special formats like PDF, DOCX, and IPYNB, it uses specialized extractors
|
||||
|
||||
## Examples When Used
|
||||
|
||||
|
||||
@@ -48,16 +48,16 @@ When the `search_files` tool is invoked, it follows this process:
|
||||
1. **Parameter Validation**: Validates the required `path` and `regex` parameters
|
||||
2. **Path Resolution**: Resolves the relative path to an absolute path
|
||||
3. **Search Execution**:
|
||||
- Uses Ripgrep (rg) for high-performance text searching
|
||||
- Applies file pattern filtering if specified
|
||||
- Collects matches with surrounding context
|
||||
- Uses Ripgrep (rg) for high-performance text searching
|
||||
- Applies file pattern filtering if specified
|
||||
- Collects matches with surrounding context
|
||||
4. **Result Formatting**:
|
||||
- Formats results with file paths, line numbers, and context
|
||||
- Displays 1 line of context before and after each match
|
||||
- Structures output for easy readability
|
||||
- Limits results to a maximum of 300 matches with notification
|
||||
- Truncates lines longer than 500 characters
|
||||
- Merges nearby matches into contiguous blocks
|
||||
- Formats results with file paths, line numbers, and context
|
||||
- Displays 1 line of context before and after each match
|
||||
- Structures output for easy readability
|
||||
- Limits results to a maximum of 300 matches with notification
|
||||
- Truncates lines longer than 500 characters
|
||||
- Merges nearby matches into contiguous blocks
|
||||
|
||||
## Search Results Format
|
||||
|
||||
|
||||
@@ -46,28 +46,25 @@ This tool requests a mode change when the current task would be better handled b
|
||||
When the `switch_mode` tool is invoked, it follows this process:
|
||||
|
||||
1. **Request Validation**:
|
||||
|
||||
- Validates that the requested mode exists in the system
|
||||
- Checks that the `mode_slug` parameter is provided and valid
|
||||
- Verifies the user isn't already in the requested mode
|
||||
- Ensures the `reason` parameter (if provided) is properly formatted
|
||||
- Validates that the requested mode exists in the system
|
||||
- Checks that the `mode_slug` parameter is provided and valid
|
||||
- Verifies the user isn't already in the requested mode
|
||||
- Ensures the `reason` parameter (if provided) is properly formatted
|
||||
|
||||
2. **Mode Transition Preparation**:
|
||||
|
||||
- Packages the mode change request with the provided reason
|
||||
- Presents the change request to the user for approval
|
||||
- Packages the mode change request with the provided reason
|
||||
- Presents the change request to the user for approval
|
||||
|
||||
3. **Mode Activation (Upon User Approval)**:
|
||||
|
||||
- Updates the UI to reflect the new mode
|
||||
- Adjusts available tools based on the mode's tool group configuration
|
||||
- Applies the mode-specific prompt and behavior
|
||||
- Applies a 500ms delay to allow the change to take effect before executing next tool
|
||||
- Enforces any file restrictions specific to the mode
|
||||
- Updates the UI to reflect the new mode
|
||||
- Adjusts available tools based on the mode's tool group configuration
|
||||
- Applies the mode-specific prompt and behavior
|
||||
- Applies a 500ms delay to allow the change to take effect before executing next tool
|
||||
- Enforces any file restrictions specific to the mode
|
||||
|
||||
4. **Continuation**:
|
||||
- Proceeds with the task using the capabilities of the new mode
|
||||
- Retains relevant context from the previous interaction
|
||||
- Proceeds with the task using the capabilities of the new mode
|
||||
- Retains relevant context from the previous interaction
|
||||
|
||||
## Tool Group Association
|
||||
|
||||
|
||||
@@ -54,27 +54,24 @@ The tool uses three distinct status indicators:
|
||||
When the `update_todo_list` tool is invoked, it follows this process:
|
||||
|
||||
1. **Status Validation**:
|
||||
|
||||
- Parses the markdown checklist format
|
||||
- Validates status indicators are properly formatted
|
||||
- Ensures task descriptions are clear and actionable
|
||||
- Parses the markdown checklist format
|
||||
- Validates status indicators are properly formatted
|
||||
- Ensures task descriptions are clear and actionable
|
||||
|
||||
2. **List Replacement**:
|
||||
|
||||
- Completely replaces the existing TODO list
|
||||
- Preserves task order as specified in the update
|
||||
- Maintains task descriptions and status states
|
||||
- Completely replaces the existing TODO list
|
||||
- Preserves task order as specified in the update
|
||||
- Maintains task descriptions and status states
|
||||
|
||||
3. **Reminder Integration**:
|
||||
|
||||
- Integrates updated list with the reminder system
|
||||
- Displays current tasks in subsequent message headers
|
||||
- Provides persistent visibility of task progress
|
||||
- Integrates updated list with the reminder system
|
||||
- Displays current tasks in subsequent message headers
|
||||
- Provides persistent visibility of task progress
|
||||
|
||||
4. **Progress Tracking**:
|
||||
- Tracks completion status across multiple updates
|
||||
- Maintains task history for reference
|
||||
- Supports workflow continuation across sessions
|
||||
- Tracks completion status across multiple updates
|
||||
- Maintains task history for reference
|
||||
- Supports workflow continuation across sessions
|
||||
|
||||
## Best Practices
|
||||
|
||||
|
||||
@@ -59,36 +59,33 @@ MCP servers can be configured globally or at the project level:
|
||||
When the `use_mcp_tool` tool is invoked, it follows this process:
|
||||
|
||||
1. **Initialization and Validation**:
|
||||
|
||||
- The system verifies that the MCP hub is available
|
||||
- Confirms the specified server exists and is connected
|
||||
- Validates the requested tool exists on the server
|
||||
- Arguments are validated against the tool's schema definition
|
||||
- Timeout settings are extracted from server configuration (default: 60 seconds)
|
||||
- The system verifies that the MCP hub is available
|
||||
- Confirms the specified server exists and is connected
|
||||
- Validates the requested tool exists on the server
|
||||
- Arguments are validated against the tool's schema definition
|
||||
- Timeout settings are extracted from server configuration (default: 60 seconds)
|
||||
|
||||
2. **Execution and Communication**:
|
||||
|
||||
- The system selects the appropriate transport mechanism:
|
||||
- `StdioClientTransport`: For communicating with local processes via standard I/O
|
||||
- `SSEClientTransport`: For communicating with HTTP servers via Server-Sent Events
|
||||
- A request is sent with validated server name, tool name, and arguments
|
||||
- Communication uses the `@modelcontextprotocol/sdk` library for standardized interactions
|
||||
- Request execution is tracked with timeout handling to prevent hanging operations
|
||||
- The system selects the appropriate transport mechanism:
|
||||
- `StdioClientTransport`: For communicating with local processes via standard I/O
|
||||
- `SSEClientTransport`: For communicating with HTTP servers via Server-Sent Events
|
||||
- A request is sent with validated server name, tool name, and arguments
|
||||
- Communication uses the `@modelcontextprotocol/sdk` library for standardized interactions
|
||||
- Request execution is tracked with timeout handling to prevent hanging operations
|
||||
|
||||
3. **Response Processing**:
|
||||
|
||||
- Responses can include multiple content types:
|
||||
- Text content: Plain text responses
|
||||
- Image content: Binary image data with MIME type information
|
||||
- Resource references: URIs to access server resources (works with `access_mcp_resource`)
|
||||
- The system checks the `isError` flag to determine if error handling is needed
|
||||
- Results are formatted for display in the Kilo Code interface
|
||||
- Responses can include multiple content types:
|
||||
- Text content: Plain text responses
|
||||
- Image content: Binary image data with MIME type information
|
||||
- Resource references: URIs to access server resources (works with `access_mcp_resource`)
|
||||
- The system checks the `isError` flag to determine if error handling is needed
|
||||
- Results are formatted for display in the Kilo Code interface
|
||||
|
||||
4. **Resource and Error Handling**:
|
||||
- The system uses WeakRef patterns to prevent memory leaks
|
||||
- A consecutive mistake counter tracks and manages errors
|
||||
- File watchers monitor for server code changes and trigger automatic restarts
|
||||
- The security model requires approval for tool execution unless in the "always allow" list
|
||||
- The system uses WeakRef patterns to prevent memory leaks
|
||||
- A consecutive mistake counter tracks and manages errors
|
||||
- File watchers monitor for server code changes and trigger automatic restarts
|
||||
- The security model requires approval for tool execution unless in the "always allow" list
|
||||
|
||||
## Security and Permissions
|
||||
|
||||
|
||||
@@ -47,46 +47,41 @@ This tool writes content to a specified file, either creating a new file if it d
|
||||
When the `write_to_file` tool is invoked, it follows this process:
|
||||
|
||||
1. **Parameter Validation**: Validates the required parameters and permissions
|
||||
|
||||
- Checks that `path`, `content`, and `line_count` are provided
|
||||
- Validates the file is allowed (not restricted by `.kilocodeignore`)
|
||||
- Ensures the path is within the workspace boundaries
|
||||
- Tracks consecutive mistake counts for missing parameters
|
||||
- Shows specific error messages for each validation failure
|
||||
- Checks that `path`, `content`, and `line_count` are provided
|
||||
- Validates the file is allowed (not restricted by `.kilocodeignore`)
|
||||
- Ensures the path is within the workspace boundaries
|
||||
- Tracks consecutive mistake counts for missing parameters
|
||||
- Shows specific error messages for each validation failure
|
||||
|
||||
2. **Content Preprocessing**:
|
||||
|
||||
- Removes code block markers that might be added by AI models
|
||||
- Handles escaped HTML entities (specifically for non-Claude models)
|
||||
- Strips line numbers if accidentally included in content
|
||||
- Performs model-specific processing for different AI providers
|
||||
- Removes code block markers that might be added by AI models
|
||||
- Handles escaped HTML entities (specifically for non-Claude models)
|
||||
- Strips line numbers if accidentally included in content
|
||||
- Performs model-specific processing for different AI providers
|
||||
|
||||
3. **Diff View Generation**:
|
||||
|
||||
- Opens a diff view in the editor showing the proposed changes
|
||||
- Adds a 300ms delay to ensure UI responsiveness
|
||||
- Scrolls automatically to the first difference
|
||||
- Highlights changes for easy review
|
||||
- Opens a diff view in the editor showing the proposed changes
|
||||
- Adds a 300ms delay to ensure UI responsiveness
|
||||
- Scrolls automatically to the first difference
|
||||
- Highlights changes for easy review
|
||||
|
||||
4. **User Approval Process**:
|
||||
|
||||
- Waits for explicit user approval to proceed
|
||||
- Allows users to edit the content in the diff view
|
||||
- Captures any user edits for the final content
|
||||
- Provides option to reject changes entirely
|
||||
- Detects and incorporates user modifications into the final result
|
||||
- Waits for explicit user approval to proceed
|
||||
- Allows users to edit the content in the diff view
|
||||
- Captures any user edits for the final content
|
||||
- Provides option to reject changes entirely
|
||||
- Detects and incorporates user modifications into the final result
|
||||
|
||||
5. **Safety Validation**:
|
||||
|
||||
- Detects potential content truncation by comparing with provided line count
|
||||
- Shows warnings if content appears incomplete
|
||||
- Validates file path and access permissions
|
||||
- Specifically checks if files are outside the workspace with `isOutsideWorkspace` flag
|
||||
- Detects potential content truncation by comparing with provided line count
|
||||
- Shows warnings if content appears incomplete
|
||||
- Validates file path and access permissions
|
||||
- Specifically checks if files are outside the workspace with `isOutsideWorkspace` flag
|
||||
|
||||
6. **File Writing**:
|
||||
- Writes the approved content (with any user edits) to the file
|
||||
- Provides confirmation of successful write
|
||||
- Resets the consecutive mistakes counter on success
|
||||
- Writes the approved content (with any user edits) to the file
|
||||
- Provides confirmation of successful write
|
||||
- Resets the consecutive mistakes counter on success
|
||||
|
||||
## Examples When Used
|
||||
|
||||
|
||||
@@ -100,15 +100,14 @@ When Kilo Code needs more information to complete a task, it uses the [`ask_foll
|
||||
You have two options for using suggested responses:
|
||||
|
||||
1. **Direct Selection**:
|
||||
|
||||
- **Action**: Simply click the button containing the answer you want to provide
|
||||
- **Result**: The selected answer is immediately sent back to Kilo Code as your response. This is the quickest way to reply if one of the suggestions perfectly matches your intent.
|
||||
- **Action**: Simply click the button containing the answer you want to provide
|
||||
- **Result**: The selected answer is immediately sent back to Kilo Code as your response. This is the quickest way to reply if one of the suggestions perfectly matches your intent.
|
||||
|
||||
2. **Edit Before Sending**:
|
||||
- **Action**:
|
||||
- Hold down `Shift` and click the suggestion button
|
||||
- _Alternatively_, hover over the suggestion button and click the pencil icon ({% codicon name="edit" /%}) that appears
|
||||
- **Result**: The text of the suggestion is copied into the chat input box. You can then modify the text as needed before pressing Enter to send your customized response. This is useful when a suggestion is close but needs minor adjustments.
|
||||
- **Action**:
|
||||
- Hold down `Shift` and click the suggestion button
|
||||
- _Alternatively_, hover over the suggestion button and click the pencil icon ({% codicon name="edit" /%}) that appears
|
||||
- **Result**: The text of the suggestion is copied into the chat input box. You can then modify the text as needed before pressing Enter to send your customized response. This is useful when a suggestion is close but needs minor adjustments.
|
||||
|
||||
**Benefits:**
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ Orchestrator Mode (formerly known as Boomerang Tasks) allows you to break down c
|
||||
|
||||
- **Approval Required:** By default, you must approve the creation and completion of each subtask. This can be automated via the [Auto-Approving Actions](/docs/features/auto-approving-actions#subtasks) settings if desired.
|
||||
- **Context Isolation and Transfer:** Each subtask operates in complete isolation with its own conversation history. It does not automatically inherit the parent's context. Information must be explicitly passed:
|
||||
- **Down:** Via the initial instructions provided when the subtask is created.
|
||||
- **Up:** Via the final summary provided when the subtask finishes. Be mindful that only this summary returns to the parent.
|
||||
- **Down:** Via the initial instructions provided when the subtask is created.
|
||||
- **Up:** Via the final summary provided when the subtask finishes. Be mindful that only this summary returns to the parent.
|
||||
- **Navigation:** Kilo's interface helps you see the hierarchy of tasks (which task is the parent, which are children). You can typically navigate between active and paused tasks.
|
||||
|
||||
Orchestrator Mode provides a powerful way to manage complex development workflows directly within Kilo Code, leveraging specialized modes for maximum efficiency.
|
||||
|
||||
@@ -22,11 +22,11 @@ Four ways to switch modes:
|
||||
|
||||
1. **Dropdown menu:** Click the selector to the left of the chat input
|
||||
|
||||
{% image src="/docs/img/modes/modes.png" alt="Using the dropdown menu to switch modes" width="400" /%}
|
||||
{% image src="/docs/img/modes/modes.png" alt="Using the dropdown menu to switch modes" width="400" /%}
|
||||
|
||||
2. **Slash command:** Type `/architect`, `/ask`, `/debug`, or `/code` in the chat input to switch modes. Type `/newtask` to create a new task, or `/smol` to condense your context window.
|
||||
|
||||
{% image src="/docs/img/modes/modes-1.png" alt="Using slash commands to switch modes" width="400" /%}
|
||||
{% image src="/docs/img/modes/modes-1.png" alt="Using slash commands to switch modes" width="400" /%}
|
||||
|
||||
### Understanding /newtask vs /smol
|
||||
|
||||
@@ -39,15 +39,15 @@ Users often confuse `/newtask` and `/smol`. Here's the key difference:
|
||||
|
||||
3. **Toggle command/Keyboard shortcut:** Use the keyboard shortcut below, applicable to your operating system. Each press cycles through the available modes in sequence, wrapping back to the first mode after reaching the end.
|
||||
|
||||
| Operating System | Shortcut |
|
||||
| ---------------- | -------- |
|
||||
| macOS | ⌘ + . |
|
||||
| Windows | Ctrl + . |
|
||||
| Linux | Ctrl + . |
|
||||
| Operating System | Shortcut |
|
||||
| ---------------- | -------- |
|
||||
| macOS | ⌘ + . |
|
||||
| Windows | Ctrl + . |
|
||||
| Linux | Ctrl + . |
|
||||
|
||||
4. **Accept suggestions:** Click on mode switch suggestions that Kilo Code offers when appropriate
|
||||
|
||||
{% image src="/docs/img/modes/modes-2.png" alt="Accepting a mode switch suggestion from Kilo Code" width="400" /%}
|
||||
{% image src="/docs/img/modes/modes-2.png" alt="Accepting a mode switch suggestion from Kilo Code" width="400" /%}
|
||||
|
||||
## Built-in Modes
|
||||
|
||||
|
||||
@@ -41,14 +41,14 @@ Before using App Builder:
|
||||
1. Navigate to **[App Builder](https://app.kilo.ai/app-builder)** from your Kilo dashboard.
|
||||
2. Choose an **AI Model** for development (e.g., Grok Code Fast 1, Claude Sonnet 4.5, GPT-5.2).
|
||||
3. Describe your application in plain language:
|
||||
- What it should do
|
||||
- Key features and functionality
|
||||
- Design preferences or constraints
|
||||
- What it should do
|
||||
- Key features and functionality
|
||||
- Design preferences or constraints
|
||||
4. Watch the **live preview** update as the AI generates your app.
|
||||
5. Provide feedback to refine:
|
||||
- "Make the header sticky"
|
||||
- "Add a dark mode toggle"
|
||||
- "Connect this form to a database"
|
||||
- "Make the header sticky"
|
||||
- "Add a dark mode toggle"
|
||||
- "Connect this form to a database"
|
||||
6. When satisfied, click **Deploy** to push your app live.
|
||||
|
||||
---
|
||||
@@ -56,12 +56,11 @@ Before using App Builder:
|
||||
## How App Builder Works
|
||||
|
||||
- When you describe your application:
|
||||
|
||||
1. The AI model interprets your requirements and generates an initial implementation.
|
||||
2. Code is rendered in real-time in the live preview panel.
|
||||
3. You can interact with the preview as if it were the deployed app.
|
||||
4. Each refinement request triggers targeted updates to the codebase.
|
||||
5. The AI maintains context across your entire conversation for coherent iteration.
|
||||
1. The AI model interprets your requirements and generates an initial implementation.
|
||||
2. Code is rendered in real-time in the live preview panel.
|
||||
3. You can interact with the preview as if it were the deployed app.
|
||||
4. Each refinement request triggers targeted updates to the codebase.
|
||||
5. The AI maintains context across your entire conversation for coherent iteration.
|
||||
|
||||
- Deployment packages your application and provisions hosting automatically.
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ Kilo Code provides browser automation capabilities that let you interact with we
|
||||
Browser Use requires an advanced agentic model. It is typically most reliable with recent high-capability models (for example Claude Sonnet 4 class models).
|
||||
{% /callout %}
|
||||
|
||||
|
||||
## How Browser Use Works
|
||||
|
||||
By default, Kilo Code uses a built-in browser that:
|
||||
@@ -96,10 +95,10 @@ To change this setting:
|
||||
|
||||
1. Click the dropdown menu under "Viewport size" within your Browser / Computer Use settings
|
||||
2. Select one of the available options:
|
||||
- Large Desktop (1280x800)
|
||||
- Small Desktop (900x600) - Default
|
||||
- Tablet (768x1024)
|
||||
- Mobile (360x640)
|
||||
- Large Desktop (1280x800)
|
||||
- Small Desktop (900x600) - Default
|
||||
- Tablet (768x1024)
|
||||
- Mobile (360x640)
|
||||
3. Select your desired resolution.
|
||||
|
||||
### Screenshot Quality
|
||||
@@ -113,10 +112,9 @@ To change this setting:
|
||||
1. Adjust the slider under "Screenshot quality" within your Browser / Computer Use settings
|
||||
2. Set a value between 1-100% (default is 75%)
|
||||
3. Higher values provide clearer screenshots but increase token usage:
|
||||
|
||||
- 40-50%: Good for basic text-based websites
|
||||
- 60-70%: Balanced for most general browsing
|
||||
- 80%+: Use when fine visual details are critical
|
||||
- 40-50%: Good for basic text-based websites
|
||||
- 60-70%: Balanced for most general browsing
|
||||
- 80%+: Use when fine visual details are critical
|
||||
|
||||
### Remote Browser Connection
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ Access checkpoint settings in Kilo Code settings under the "Checkpoints" section
|
||||
1. Open Settings by clicking the gear icon {% codicon name="gear" /%} → Checkpoints
|
||||
2. Check or uncheck the "Enable automatic checkpoints" checkbox
|
||||
|
||||
{% image src="/docs/img/checkpoints/checkpoints.png" alt="Checkpoint settings in Kilo Code configuration" width="500" /%}
|
||||
{% image src="/docs/img/checkpoints/checkpoints.png" alt="Checkpoint settings in Kilo Code configuration" width="500" /%}
|
||||
|
||||
## How Checkpoints Work
|
||||
|
||||
@@ -67,14 +67,14 @@ To compare your current workspace with a previous checkpoint:
|
||||
1. Locate the checkpoint in your chat history
|
||||
2. Click the checkpoint's `View Differences` button
|
||||
|
||||
{% image src="/docs/img/checkpoints/checkpoints-6.png" alt="View Differences button interface" width="100" /%}
|
||||
{% image src="/docs/img/checkpoints/checkpoints-6.png" alt="View Differences button interface" width="100" /%}
|
||||
|
||||
3. Review the differences in the comparison view:
|
||||
- Added lines are highlighted in green
|
||||
- Removed lines are highlighted in red
|
||||
- Modified files are listed with detailed changes
|
||||
- Renamed and moved files are tracked with their path changes
|
||||
- New or deleted files are clearly marked
|
||||
- Added lines are highlighted in green
|
||||
- Removed lines are highlighted in red
|
||||
- Modified files are listed with detailed changes
|
||||
- Renamed and moved files are tracked with their path changes
|
||||
- New or deleted files are clearly marked
|
||||
|
||||
{% image src="/docs/img/checkpoints/checkpoints-3.png" alt="View differences option for checkpoints" width="800" /%}
|
||||
|
||||
@@ -87,12 +87,11 @@ To restore a project to a previous checkpoint state:
|
||||
{% image src="/docs/img/checkpoints/checkpoints-7.png" alt="Restore checkpoint button interface" width="100" /%}
|
||||
3. Choose one of these restoration options:
|
||||
|
||||
{% image src="/docs/img/checkpoints/checkpoints-4.png" alt="Restore checkpoint option" width="300" /%}
|
||||
{% image src="/docs/img/checkpoints/checkpoints-4.png" alt="Restore checkpoint option" width="300" /%}
|
||||
- **Restore Files Only** - Reverts only workspace files to checkpoint state without modifying conversation history. Ideal for comparing alternative implementations while maintaining chat context, allowing you to seamlessly switch between different project states. This option does not require confirmation and lets you quickly switch between different implementations.
|
||||
- **Restore Files & Task** - Reverts both workspace files AND removes all subsequent conversation messages. Use when you want to completely reset both your code and conversation back to the checkpoint's point in time. This option requires confirmation in a dialog as it cannot be undone.
|
||||
|
||||
- **Restore Files Only** - Reverts only workspace files to checkpoint state without modifying conversation history. Ideal for comparing alternative implementations while maintaining chat context, allowing you to seamlessly switch between different project states. This option does not require confirmation and lets you quickly switch between different implementations.
|
||||
- **Restore Files & Task** - Reverts both workspace files AND removes all subsequent conversation messages. Use when you want to completely reset both your code and conversation back to the checkpoint's point in time. This option requires confirmation in a dialog as it cannot be undone.
|
||||
|
||||
{% image src="/docs/img/checkpoints/checkpoints-9.png" alt="Confirmation dialog for restoring checkpoint with files & task" width="300" /%}
|
||||
{% image src="/docs/img/checkpoints/checkpoints-9.png" alt="Confirmation dialog for restoring checkpoint with files & task" width="300" /%}
|
||||
|
||||
### Limitations and Considerations
|
||||
|
||||
@@ -110,11 +109,10 @@ The checkpoint system consists of:
|
||||
1. **Shadow Git Repository**: A separate Git repository created specifically for checkpoint tracking that functions as the persistent storage mechanism for checkpoint state.
|
||||
|
||||
2. **Checkpoint Service**: Handles Git operations and state management through:
|
||||
|
||||
- Repository initialization
|
||||
- Checkpoint creation and storage
|
||||
- Diff computation
|
||||
- State restoration
|
||||
- Repository initialization
|
||||
- Checkpoint creation and storage
|
||||
- Diff computation
|
||||
- State restoration
|
||||
|
||||
3. **UI Components**: Interface elements displayed in the chat that enable interaction with checkpoints.
|
||||
|
||||
@@ -193,42 +191,40 @@ Checkpoints require Git to be installed on your system. The implementation uses
|
||||
|
||||
1. **Install with Homebrew (recommended)**:
|
||||
|
||||
```
|
||||
brew install git
|
||||
```
|
||||
```
|
||||
brew install git
|
||||
```
|
||||
|
||||
2. **Alternative: Install with Xcode Command Line Tools**:
|
||||
|
||||
```
|
||||
xcode-select --install
|
||||
```
|
||||
```
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
3. **Verify installation**:
|
||||
- Open Terminal
|
||||
- Type `git --version`
|
||||
- You should see a version number like `git version 2.40.0`
|
||||
- Open Terminal
|
||||
- Type `git --version`
|
||||
- You should see a version number like `git version 2.40.0`
|
||||
|
||||
### Windows
|
||||
|
||||
1. **Download Git for Windows**:
|
||||
|
||||
- Visit https://git-scm.com/download/win
|
||||
- The download should start automatically
|
||||
- Visit https://git-scm.com/download/win
|
||||
- The download should start automatically
|
||||
|
||||
2. **Run the installer**:
|
||||
|
||||
- Accept the license agreement
|
||||
- Choose installation location (default is recommended)
|
||||
- Select components (default options are typically sufficient)
|
||||
- Choose the default editor
|
||||
- Choose how to use Git from the command line (recommended: Git from the command line and also from 3rd-party software)
|
||||
- Configure line ending conversions (recommended: Checkout Windows-style, commit Unix-style)
|
||||
- Complete the installation
|
||||
- Accept the license agreement
|
||||
- Choose installation location (default is recommended)
|
||||
- Select components (default options are typically sufficient)
|
||||
- Choose the default editor
|
||||
- Choose how to use Git from the command line (recommended: Git from the command line and also from 3rd-party software)
|
||||
- Configure line ending conversions (recommended: Checkout Windows-style, commit Unix-style)
|
||||
- Complete the installation
|
||||
|
||||
3. **Verify installation**:
|
||||
- Open Command Prompt or PowerShell
|
||||
- Type `git --version`
|
||||
- You should see a version number like `git version 2.40.0.windows.1`
|
||||
- Open Command Prompt or PowerShell
|
||||
- Type `git --version`
|
||||
- You should see a version number like `git version 2.40.0.windows.1`
|
||||
|
||||
### Linux
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ Configuration is managed through:
|
||||
- `/connect` command for provider setup (interactive)
|
||||
- Config files in **`~/.config/kilo/`**: the CLI (Kilo CLI 1.0 from [Kilo-Org/kilo](https://github.com/Kilo-Org/kilo)) merges `config.json`, `opencode.json`, and `opencode.jsonc`. Use **`opencode.json`** (or `opencode.jsonc`) for provider, model, permission, and **MCP** settings. Restart the CLI after editing. See [Using MCP in the CLI](/automate/mcp/using-in-cli) for MCP config format.
|
||||
- `kilo auth` for credential management
|
||||
|
||||
|
||||
## Slash Commands
|
||||
|
||||
The CLI's interactive mode supports slash commands for common operations. The main commands are documented above in the [Interactive Slash Commands](#interactive-slash-commands) section.
|
||||
@@ -196,12 +196,12 @@ You can set permissions globally (with `*`), and override specific tools.
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://kilo.ai/config.json",
|
||||
"permission": {
|
||||
"*": "ask",
|
||||
"bash": "allow",
|
||||
"edit": "deny"
|
||||
}
|
||||
"$schema": "https://kilo.ai/config.json",
|
||||
"permission": {
|
||||
"*": "ask",
|
||||
"bash": "allow",
|
||||
"edit": "deny"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -209,8 +209,8 @@ You can also set all permissions at once:
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://kilo.ai/config.json",
|
||||
"permission": "allow"
|
||||
"$schema": "https://kilo.ai/config.json",
|
||||
"permission": "allow"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -220,20 +220,20 @@ For most permissions, you can use an object to apply different actions based on
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git *": "allow",
|
||||
"npm *": "allow",
|
||||
"rm *": "deny",
|
||||
"grep *": "allow"
|
||||
},
|
||||
"edit": {
|
||||
"*": "deny",
|
||||
"packages/web/src/content/docs/*.mdx": "allow"
|
||||
}
|
||||
}
|
||||
"$schema": "https://opencode.ai/config.json",
|
||||
"permission": {
|
||||
"bash": {
|
||||
"*": "ask",
|
||||
"git *": "allow",
|
||||
"npm *": "allow",
|
||||
"rm *": "deny",
|
||||
"grep *": "allow"
|
||||
},
|
||||
"edit": {
|
||||
"*": "deny",
|
||||
"packages/web/src/content/docs/*.mdx": "allow"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -261,12 +261,12 @@ Use `external_directory` to allow tool calls that touch paths outside the workin
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://kilo.ai/config.json",
|
||||
"permission": {
|
||||
"external_directory": {
|
||||
"~/projects/personal/**": "allow"
|
||||
}
|
||||
}
|
||||
"$schema": "https://kilo.ai/config.json",
|
||||
"permission": {
|
||||
"external_directory": {
|
||||
"~/projects/personal/**": "allow"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -274,15 +274,15 @@ Any directory allowed here inherits the same defaults as the current workspace.
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://kilo.ai/config.json",
|
||||
"permission": {
|
||||
"external_directory": {
|
||||
"~/projects/personal/**": "allow"
|
||||
},
|
||||
"edit": {
|
||||
"~/projects/personal/**": "deny"
|
||||
}
|
||||
}
|
||||
"$schema": "https://kilo.ai/config.json",
|
||||
"permission": {
|
||||
"external_directory": {
|
||||
"~/projects/personal/**": "allow"
|
||||
},
|
||||
"edit": {
|
||||
"~/projects/personal/**": "deny"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -294,10 +294,10 @@ The Kilo CLI is a fork of [OpenCode](https://opencode.ai) and supports the same
|
||||
|
||||
### Config File Location (Kilo CLI 1.0)
|
||||
|
||||
| Scope | Path |
|
||||
| ---------- | -------------------------------------------------------------------- |
|
||||
| **Global** | `~/.config/kilo/opencode.json` or `opencode.jsonc` (Windows: config dir may vary; same filenames) |
|
||||
| **Project**| `./opencode.json` or `./.opencode/` in project root |
|
||||
| Scope | Path |
|
||||
| ----------- | ------------------------------------------------------------------------------------------------- |
|
||||
| **Global** | `~/.config/kilo/opencode.json` or `opencode.jsonc` (Windows: config dir may vary; same filenames) |
|
||||
| **Project** | `./opencode.json` or `./.opencode/` in project root |
|
||||
|
||||
Project-level configuration takes precedence over global settings.
|
||||
|
||||
@@ -428,7 +428,7 @@ This instructs the AI to proceed without user input.
|
||||
# GitHub Actions example
|
||||
- name: Run Kilo Code
|
||||
run: |
|
||||
kilo run "Implement the new feature" --auto
|
||||
kilo run "Implement the new feature" --auto
|
||||
```
|
||||
|
||||
## Session Continuation
|
||||
|
||||
@@ -24,7 +24,7 @@ Before using Cloud Agents:
|
||||
## Cost
|
||||
|
||||
- **Compute is free during limited beta**
|
||||
- Please provide any feedback in our Cloud Agents beta Discord channel: [Kilo Discord](https://kilo.ai/discord)
|
||||
- Please provide any feedback in our Cloud Agents beta Discord channel: [Kilo Discord](https://kilo.ai/discord)
|
||||
- **Kilo Code credits are still used** when the agent performs work (model usage, operations, etc.).
|
||||
|
||||
## How to Use
|
||||
@@ -42,22 +42,20 @@ Your work is always pushed to GitHub, ensuring nothing is lost.
|
||||
- Python is not included in the base image, but `apt` is available so you can install it or other packages as needed.
|
||||
- All Cloud Agent chats share a **single container instance**, while each session gets its own workspace directory.
|
||||
- When a session begins:
|
||||
|
||||
1. Your repo is cloned
|
||||
2. A unique branch is created
|
||||
3. Your startup commands run
|
||||
4. Env vars are injected
|
||||
1. Your repo is cloned
|
||||
2. A unique branch is created
|
||||
3. Your startup commands run
|
||||
4. Env vars are injected
|
||||
|
||||
- After every message, the agent:
|
||||
|
||||
- Looks for file changes
|
||||
- Commits them
|
||||
- Pushes to the session’s branch
|
||||
- Looks for file changes
|
||||
- Commits them
|
||||
- Pushes to the session’s branch
|
||||
|
||||
- Containers are **ephemeral**:
|
||||
- Spindown occurs after inactivity
|
||||
- Expect slightly longer setup after idle periods
|
||||
- Inactive cloud agent sessions are deleted after **7 days** during the beta, expired sessions are still accessible via the CLI
|
||||
- Spindown occurs after inactivity
|
||||
- Expect slightly longer setup after idle periods
|
||||
- Inactive cloud agent sessions are deleted after **7 days** during the beta, expired sessions are still accessible via the CLI
|
||||
|
||||
## Agent Environment Profiles
|
||||
|
||||
@@ -83,9 +81,9 @@ You can customize each Cloud Agent session by also defining env vars and startup
|
||||
|
||||
- Commands run immediately after cloning the repo and checking out the session branch
|
||||
- Great for:
|
||||
- Installing dependencies
|
||||
- Bootstrapping tooling
|
||||
- Running setup scripts
|
||||
- Installing dependencies
|
||||
- Bootstrapping tooling
|
||||
- Running setup scripts
|
||||
|
||||
## Skills
|
||||
|
||||
|
||||
@@ -355,8 +355,8 @@ Kilo Code also supports mode-specific rules (`.kilocode/rules-{mode}/`), which C
|
||||
- **Discord:** Join our migration support channel
|
||||
- **Consultation:** Schedule free migration planning call
|
||||
- **Documentation:**
|
||||
- [Business migration guide](/docs/plans/migration) (this page)
|
||||
- [Technical migration guide](/docs/getting-started/migrating) (rules and configurations)
|
||||
- [Business migration guide](/docs/plans/migration) (this page)
|
||||
- [Technical migration guide](/docs/getting-started/migrating) (rules and configurations)
|
||||
|
||||
## Success Stories
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user