From f59a274d8a5d572a9ea6d2a7720ce0df44a74eff Mon Sep 17 00:00:00 2001 From: theQuert Date: Wed, 18 Mar 2026 12:04:01 +0800 Subject: [PATCH 01/81] feat: add Apertis provider to VS Code legacy migration mapping Move Apertis from UNSUPPORTED_PROVIDERS to PROVIDER_MAP with proper field mappings (apertisApiKey, apertisModelId, apertisBaseUrl) so legacy VS Code extension settings migrate correctly to the new CLI backend. --- .../kilo-vscode/src/legacy-migration/provider-mapping.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts b/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts index 817cdeb9775..53de6773af5 100644 --- a/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts +++ b/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts @@ -240,6 +240,13 @@ export const PROVIDER_MAP: Record = { key: "syntheticApiKey", name: "Synthetic", }, + apertis: { + id: "apertis", + key: "apertisApiKey", + name: "Apertis", + modelField: "apertisModelId", + urlField: "apertisBaseUrl", + }, } /** Providers that have no equivalent in the new CLI backend */ @@ -256,7 +263,6 @@ export const UNSUPPORTED_PROVIDERS = new Set([ "nano-gpt", "poe", "aihubmix", - "apertis", "zenmux", ]) From 714e1f5acc349f4fa36cdc4f4d6997dbbd1f3b92 Mon Sep 17 00:00:00 2001 From: Christiaan Arnoldus Date: Mon, 23 Mar 2026 12:00:30 +0100 Subject: [PATCH 02/81] Fix merge --- .../kilo-vscode/src/legacy-migration/provider-mapping.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts b/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts index 21bc0fd0a62..02c67a2357b 100644 --- a/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts +++ b/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts @@ -302,11 +302,6 @@ export const UNSUPPORTED_PROVIDERS = new Set([ "virtual-quota-fallback", "glama", "roo", - "nano-gpt", - "poe", - "aihubmix", - "zenmux", - "apertis", ]) /** Built-in default mode slugs that should not be migrated */ From b9fd360d925783b8124392dc0dc8d6e94183455e Mon Sep 17 00:00:00 2001 From: Mark IJbema Date: Mon, 23 Mar 2026 12:09:45 +0100 Subject: [PATCH 03/81] fix(vscode): remove beta label from welcome screen Remove the beta badge from the migration wizard's "What's New" screen, along with the associated CSS and i18n keys across all 17 locales. Closes #7182 --- .../src/components/migration/MigrationWizard.tsx | 5 +---- .../src/components/migration/migration.css | 12 ------------ packages/kilo-vscode/webview-ui/src/i18n/ar.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/br.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/bs.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/da.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/de.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/en.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/es.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/fr.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/ja.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/ko.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/nl.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/no.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/pl.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/ru.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/th.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/zh.ts | 1 - packages/kilo-vscode/webview-ui/src/i18n/zht.ts | 1 - 19 files changed, 1 insertion(+), 33 deletions(-) diff --git a/packages/kilo-vscode/webview-ui/src/components/migration/MigrationWizard.tsx b/packages/kilo-vscode/webview-ui/src/components/migration/MigrationWizard.tsx index 87a27fea7fb..1358048b543 100644 --- a/packages/kilo-vscode/webview-ui/src/components/migration/MigrationWizard.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/migration/MigrationWizard.tsx @@ -477,10 +477,7 @@ const MigrationWizard: Component = (props) => {
-

- {language.t("migration.whatsNew.title")}{" "} - {language.t("migration.whatsNew.badge")} -

+

{language.t("migration.whatsNew.title")}

{language.t("migration.whatsNew.subtitle")}

diff --git a/packages/kilo-vscode/webview-ui/src/components/migration/migration.css b/packages/kilo-vscode/webview-ui/src/components/migration/migration.css index 5a18f5f1477..e4440e06796 100644 --- a/packages/kilo-vscode/webview-ui/src/components/migration/migration.css +++ b/packages/kilo-vscode/webview-ui/src/components/migration/migration.css @@ -67,18 +67,6 @@ width: 100%; } -.migration-wizard__badge { - font-size: 11px; - font-weight: 600; - letter-spacing: 0.5px; - padding: 3px 9px; - border-radius: 6px; - background: color-mix(in srgb, var(--vscode-button-background) 15%, transparent); - color: var(--vscode-button-background); - vertical-align: middle; - text-transform: uppercase; -} - .migration-wizard__header p { font-size: 13px; color: var(--vscode-descriptionForeground); diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ar.ts b/packages/kilo-vscode/webview-ui/src/i18n/ar.ts index 243bce11b44..bd748c59563 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ar.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ar.ts @@ -1127,7 +1127,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "ما الجديد في Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "لقد أعدنا بناء الإضافة على أساس أسرع وأكثر كفاءة.", "migration.whatsNew.features.performance.title": "أداء أسرع للوكيل", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/br.ts b/packages/kilo-vscode/webview-ui/src/i18n/br.ts index f96f8903724..b45d6bda539 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/br.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/br.ts @@ -1150,7 +1150,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "O Que Há de Novo no Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "Reconstruímos a extensão sobre uma base mais rápida e eficiente.", "migration.whatsNew.features.performance.title": "Desempenho de Agente Mais Rápido", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/bs.ts b/packages/kilo-vscode/webview-ui/src/i18n/bs.ts index 8b42dea7a48..3b890673197 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/bs.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/bs.ts @@ -1149,7 +1149,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Šta je novo u Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "Ponovo smo izgradili ekstenziju na bržem i efikasnijem temelju.", "migration.whatsNew.features.performance.title": "Brže performanse agenta", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/da.ts b/packages/kilo-vscode/webview-ui/src/i18n/da.ts index 411a5b69802..1a97d97c7fa 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/da.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/da.ts @@ -1141,7 +1141,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Nyheder i Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "Vi har genopbygget udvidelsen på et hurtigere og mere effektivt fundament.", "migration.whatsNew.features.performance.title": "Hurtigere agentydelse", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/de.ts b/packages/kilo-vscode/webview-ui/src/i18n/de.ts index 4cc653db9b5..fe55ba18fd0 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/de.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/de.ts @@ -1162,7 +1162,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Neuigkeiten in Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "Wir haben die Erweiterung auf einer schnelleren, effizienteren Grundlage neu aufgebaut.", "migration.whatsNew.features.performance.title": "Schnellere Agentenleistung", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/en.ts b/packages/kilo-vscode/webview-ui/src/i18n/en.ts index 50f7404f527..f8f3ff5c907 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/en.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/en.ts @@ -1154,7 +1154,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "What's New in Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "We've rebuilt the extension on a faster, more efficient foundation.", "migration.whatsNew.features.performance.title": "Faster Agent Performance", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/es.ts b/packages/kilo-vscode/webview-ui/src/i18n/es.ts index 7e6f5e350ff..12835933b5a 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/es.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/es.ts @@ -1152,7 +1152,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Novedades en Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "Hemos reconstruido la extensión sobre una base más rápida y eficiente.", "migration.whatsNew.features.performance.title": "Rendimiento de agente más rápido", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/fr.ts b/packages/kilo-vscode/webview-ui/src/i18n/fr.ts index dca7e206262..e2c33aaf51e 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/fr.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/fr.ts @@ -1164,7 +1164,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Nouveautés de Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "Nous avons reconstruit l'extension sur une base plus rapide et plus efficace.", "migration.whatsNew.features.performance.title": "Performance accélérée de l'agent", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ja.ts b/packages/kilo-vscode/webview-ui/src/i18n/ja.ts index 3a24e4cbd49..fa1364c4c1d 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ja.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ja.ts @@ -1139,7 +1139,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Kilo Codeの新機能", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "より高速で効率的な基盤上に拡張機能を再構築しました。", "migration.whatsNew.features.performance.title": "高速なエージェントパフォーマンス", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ko.ts b/packages/kilo-vscode/webview-ui/src/i18n/ko.ts index b8517874f0b..a662c8d9a22 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ko.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ko.ts @@ -1130,7 +1130,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Kilo Code의 새로운 기능", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "더 빠르고 효율적인 기반 위에 확장 프로그램을 재구축했습니다.", "migration.whatsNew.features.performance.title": "더 빠른 에이전트 성능", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/nl.ts b/packages/kilo-vscode/webview-ui/src/i18n/nl.ts index 73605307b10..a214ee18010 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/nl.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/nl.ts @@ -1170,7 +1170,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Wat is er Nieuw in Kilo Code", - "migration.whatsNew.badge": "Bèta", "migration.whatsNew.subtitle": "We hebben de extensie opnieuw opgebouwd op een snellere, efficiëntere basis.", "migration.whatsNew.features.performance.title": "Snellere Agent Prestaties", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/no.ts b/packages/kilo-vscode/webview-ui/src/i18n/no.ts index aa4bbd50ed2..d359eca1d64 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/no.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/no.ts @@ -1142,7 +1142,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Hva er nytt i Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "Vi har bygget utvidelsen på nytt med et raskere og mer effektivt grunnlag.", "migration.whatsNew.features.performance.title": "Raskere agentytelse", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/pl.ts b/packages/kilo-vscode/webview-ui/src/i18n/pl.ts index c44109ed9f3..3b7ae37a87b 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/pl.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/pl.ts @@ -1147,7 +1147,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Co nowego w Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "Przebudowaliśmy rozszerzenie na szybszym i wydajniejszym fundamencie.", "migration.whatsNew.features.performance.title": "Szybsza wydajność agenta", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ru.ts b/packages/kilo-vscode/webview-ui/src/i18n/ru.ts index 854fdf704eb..7aae962324d 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ru.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ru.ts @@ -1146,7 +1146,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Что нового в Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "Мы перестроили расширение на более быстрой и эффективной основе.", "migration.whatsNew.features.performance.title": "Более быстрая работа агента", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/th.ts b/packages/kilo-vscode/webview-ui/src/i18n/th.ts index 4365eaffe02..a0ed2c579c4 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/th.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/th.ts @@ -1126,7 +1126,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "มีอะไรใหม่ใน Kilo Code", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "เราได้สร้างส่วนขยายใหม่บนรากฐานที่เร็วและมีประสิทธิภาพมากขึ้น", "migration.whatsNew.features.performance.title": "ประสิทธิภาพเอเจนต์ที่เร็วขึ้น", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/zh.ts b/packages/kilo-vscode/webview-ui/src/i18n/zh.ts index 9a1ec2d5b38..d8b0a452ba5 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/zh.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/zh.ts @@ -1111,7 +1111,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Kilo Code 新功能", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "我们在更快、更高效的基础上重新构建了扩展。", "migration.whatsNew.features.performance.title": "更快的智能体性能", "migration.whatsNew.features.performance.detail": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/zht.ts b/packages/kilo-vscode/webview-ui/src/i18n/zht.ts index 2cb4d97de5f..124a0a59670 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/zht.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/zht.ts @@ -1112,7 +1112,6 @@ export const dict = { // Screen 1 — What's New "migration.whatsNew.title": "Kilo Code 新功能", - "migration.whatsNew.badge": "Beta", "migration.whatsNew.subtitle": "我們在更快、更高效的基礎上重新建構了擴充功能。", "migration.whatsNew.features.performance.title": "更快的 Agent 效能", "migration.whatsNew.features.performance.detail": From 1a7b6f9fbcea0409ba20cafd940081234de27829 Mon Sep 17 00:00:00 2001 From: theQuert Date: Tue, 24 Mar 2026 00:23:20 +0800 Subject: [PATCH 04/81] feat: register Apertis as CLI provider with dynamic model fetching Add Apertis provider to the CLI backend so the migration mapping (id: "apertis") has a matching provider to consume the stored API key. - Inject apertis in ModelsDev.get() using @ai-sdk/openai-compatible - Add model fetching from api.apertis.ai/v1/models (OpenAI format) - Add auth resolution: Config > Auth store > APERTIS_API_KEY env var --- packages/opencode/src/provider/model-cache.ts | 90 +++++++++++++++++++ packages/opencode/src/provider/models.ts | 22 +++++ 2 files changed, 112 insertions(+) diff --git a/packages/opencode/src/provider/model-cache.ts b/packages/opencode/src/provider/model-cache.ts index 1d1a2d4e129..d902a40e881 100644 --- a/packages/opencode/src/provider/model-cache.ts +++ b/packages/opencode/src/provider/model-cache.ts @@ -164,11 +164,69 @@ export namespace ModelCache { return fetchKiloModels(options) } + // kilocode_change start + if (providerID === "apertis") { + return fetchApertisModels(options) + } + // kilocode_change end + // Other providers not implemented yet log.debug("provider not implemented", { providerID }) return {} } + // kilocode_change start + const APERTIS_BASE_URL = "https://api.apertis.ai/v1" + + async function fetchApertisModels(options: any): Promise> { + const baseURL = options.baseURL ?? APERTIS_BASE_URL + const apiKey = options.apiKey + + if (!apiKey) { + log.debug("no API key for apertis, skipping model fetch") + return {} + } + + const url = `${baseURL.replace(/\/+$/, "")}/models` + const response = await fetch(url, { + headers: { + Authorization: `Bearer ${apiKey}`, + }, + signal: AbortSignal.timeout(10_000), + }) + + if (!response.ok) { + log.error("apertis model fetch failed", { status: response.status }) + return {} + } + + const json = (await response.json()) as { data?: Array<{ id: string; owned_by?: string }> } + const models: Record = {} + + for (const model of json.data ?? []) { + models[model.id] = { + id: model.id, + name: model.id, + family: model.owned_by ?? "", + release_date: "", + attachment: false, + reasoning: false, + temperature: true, + tool_call: true, + cost: { input: 0, output: 0 }, + limit: { context: 128000, output: 4096 }, + options: {}, + modalities: { + input: ["text"], + output: ["text"], + }, + } + } + + return models + } + // kilocode_change end + /** * Get authentication options from multiple sources * Priority: Config > Auth > Env @@ -223,6 +281,38 @@ export namespace ModelCache { }) } + // kilocode_change start + if (providerID === "apertis") { + const config = await Config.get() + const providerConfig = config.provider?.[providerID] + if (providerConfig?.options?.apiKey) { + options.apiKey = providerConfig.options.apiKey + } + if (providerConfig?.options?.baseURL) { + options.baseURL = providerConfig.options.baseURL + } + + const auth = await Auth.get(providerID) + if (auth && auth.type === "api") { + options.apiKey = auth.key + } + + const env = Env.all() + if (env.APERTIS_API_KEY) { + options.apiKey = env.APERTIS_API_KEY + } + if (env.APERTIS_BASE_URL) { + options.baseURL = env.APERTIS_BASE_URL + } + + log.debug("apertis auth options resolved", { + providerID, + hasKey: !!options.apiKey, + hasBaseURL: !!options.baseURL, + }) + } + // kilocode_change end + return options } } diff --git a/packages/opencode/src/provider/models.ts b/packages/opencode/src/provider/models.ts index 2751547c675..3044d97f853 100644 --- a/packages/opencode/src/provider/models.ts +++ b/packages/opencode/src/provider/models.ts @@ -168,6 +168,28 @@ export namespace ModelsDev { } } + // Inject Apertis provider with dynamic model fetching + if (!providers["apertis"]) { + const apertisConfigObj = await Config.get() + const apertisConfig = apertisConfigObj.provider?.apertis?.options + const apertisBaseURL = apertisConfig?.baseURL ?? "https://api.apertis.ai/v1" + const apertisFetchOptions = { + ...(apertisConfig?.baseURL ? { baseURL: apertisConfig.baseURL } : {}), + } + const apertisModels = await ModelCache.fetch("apertis", apertisFetchOptions).catch(() => ({})) + providers["apertis"] = { + id: "apertis", + name: "Apertis", + env: ["APERTIS_API_KEY"], + api: apertisBaseURL, + npm: "@ai-sdk/openai-compatible", + models: apertisModels, + } + if (Object.keys(apertisModels).length === 0) { + ModelCache.refresh("apertis", apertisFetchOptions).catch(() => {}) + } + } + return providers // kilocode_change end } From 064a1f0fc6f8f7a0d9d850f44b6970258f65b790 Mon Sep 17 00:00:00 2001 From: Josh Lambert Date: Tue, 24 Mar 2026 05:08:17 -0400 Subject: [PATCH 05/81] docs(kilo-docs): add platform tabs to code-with-ai features pages Add VSCode (Pre-release) and CLI tabs to 7 features pages: - autocomplete/index.md: FIM with Codestral, snooze, Copilot detection - code-actions.md: Pre-release actions, terminal context menu, AM integration - git-commit-generation.md: SCM button via CLI backend - browser-use.md: Playwright MCP approach, browser settings per platform - checkpoints.md: Snapshot config, CLI revert/unrevert, per-file revert - platforms/vscode.md: Feature comparison between VSCode and Pre-release - platforms/cli.md: Fix stale MCP link, add platform:next frontmatter Part of the docs platform tabs effort (PR 4 of 8). Depends on #7497 for infrastructure. --- .../features/autocomplete/index.md | 42 ++++++++ .../code-with-ai/features/browser-use.md | 96 +++++++++++++++++++ .../code-with-ai/features/checkpoints.md | 64 ++++++++++++- .../code-with-ai/features/code-actions.md | 34 +++++++ .../features/git-commit-generation.md | 17 ++++ .../pages/code-with-ai/platforms/cli.md | 3 +- .../pages/code-with-ai/platforms/vscode.md | 54 +++++++++++ 7 files changed, 304 insertions(+), 6 deletions(-) diff --git a/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md b/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md index 311ae3e0b87..42c6ebb7afe 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md +++ b/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md @@ -7,6 +7,9 @@ description: "AI-powered code autocompletion in Kilo Code" Kilo Code's autocomplete feature provides intelligent code suggestions and completions while you're typing, helping you write code faster and more efficiently. It offers both automatic and manual triggering options. +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ## How Autocomplete Works Autocomplete analyzes your code context and provides: @@ -86,6 +89,45 @@ If using Cursor, go to **Settings** > **Cursor Settings** > **Tab**, and toggle {% image src="https://github.com/user-attachments/assets/fd2eeae2-f770-40ca-8a72-a9d5a1c17d47" alt="Disable Cursor autocomplete" width="800" caption="Disable Cursor autocomplete" /%} +{% /tab %} +{% tab label="VSCode" %} + +{% callout type="info" %} +Autocomplete is an **extension-only** feature. It is not available in the CLI/TUI. +{% /callout %} + +## How Autocomplete Works + +The new extension uses **Fill-in-the-Middle (FIM)** completion powered by Codestral (`mistralai/codestral-2508`). It analyzes the code before and after your cursor to generate contextually accurate inline suggestions. + +## Triggering Options + +### Auto-trigger + +Autocomplete is **enabled by default** and automatically shows inline suggestions as you type. Suggestions appear as ghost text that you can accept with `Tab`. + +### Trigger on keybinding (Cmd+L) + +Press `Cmd+L` (Mac) or `Ctrl+L` (Windows/Linux) to manually request a completion at your cursor position. + +## Status Bar + +The extension displays an **autocomplete status indicator** in the VS Code status bar, including: + +- Current autocomplete state (active/snoozed) +- Cumulative cost tracking for autocomplete requests + +### Snooze / Unsnooze + +You can temporarily disable autocomplete by clicking the status bar item to **snooze** it. Click again to **unsnooze** and re-enable suggestions. + +## Copilot Conflict Detection + +The new extension automatically detects if **GitHub Copilot** inline suggestions are enabled and warns you about potential conflicts. Disable Copilot's inline completions for the best experience with Kilo Code autocomplete. + +{% /tab %} +{% /tabs %} + ## Best Practices 1. **Balance speed and quality**: Faster models provide quicker suggestions but may be less accurate diff --git a/packages/kilo-docs/pages/code-with-ai/features/browser-use.md b/packages/kilo-docs/pages/code-with-ai/features/browser-use.md index 8255cf275b6..34e0c5d8fd1 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/browser-use.md +++ b/packages/kilo-docs/pages/code-with-ai/features/browser-use.md @@ -13,6 +13,9 @@ Browser Use requires an advanced agentic model. It is typically most reliable wi ## How Browser Use Works +{% tabs %} +{% tab label="VSCode (Legacy)" %} + By default, Kilo Code uses a built-in browser that: - Launches automatically when you ask Kilo to visit a website @@ -22,6 +25,35 @@ By default, Kilo Code uses a built-in browser that: All of this happens directly within VS Code, with no setup required. +{% /tab %} +{% tab label="VSCode & CLI" %} + +Kilo Code uses [Playwright](https://playwright.dev/) via MCP (`@playwright/mcp@latest`) for browser automation. The Playwright MCP server is registered dynamically as `kilo-playwright`. + +**In the VS Code extension**, browser automation is auto-configured: + +- Toggle it on from **Settings → Browser** tab +- Configure `browserAutomation.headless` and `browserAutomation.useSystemChrome` settings +- Playwright auto-downloads Chromium on first use + +**In CLI-only mode**, you need to manually add the MCP server to your `kilo.json` configuration: + +```json +{ + "mcp": { + "playwright": { + "type": "local", + "command": ["npx", "-y", "@playwright/mcp@latest"] + } + } +} +``` + +Once configured, Playwright downloads Chromium automatically on first use. + +{% /tab %} +{% /tabs %} + ## Using Browser Use A typical browser interaction follows this pattern: @@ -39,6 +71,9 @@ For example: ## How Browser Actions Work +{% tabs %} +{% tab label="VSCode (Legacy)" %} + The browser_action tool controls a browser instance that returns screenshots and console logs after each action, allowing you to see the results of interactions. Key characteristics: @@ -59,8 +94,38 @@ Key characteristics: | `scroll_up` | Scrolls up by one page | Returning to previous content | | `close` | Closes the browser | Ending a browser session | +{% /tab %} +{% tab label="VSCode & CLI" %} + +The Playwright MCP server provides a set of browser tools for interacting with web pages. These tools return screenshots and accessibility snapshots after each action. + +Key characteristics: + +- The browser launches automatically when a browser tool is invoked +- Multiple browser tools can be used in sequence +- Screenshots are captured after each action for visual feedback + +### Available Browser Tools + +| Tool | Description | When to Use | +| -------------------- | ----------------------------------- | ------------------------------------- | +| `browser_navigate` | Navigates to a URL | Opening a web page | +| `browser_click` | Clicks an element on the page | Interacting with buttons, links, etc. | +| `browser_type` | Types text into an input element | Filling forms, search boxes | +| `browser_screenshot` | Captures a screenshot of the page | Inspecting visual state | +| `browser_scroll` | Scrolls the page or a specific area | Viewing content above or below | +| `browser_hover` | Hovers over an element | Revealing tooltips or menus | +| `browser_select` | Selects an option from a dropdown | Choosing from select elements | +| `browser_drag` | Drags an element to a target | Drag-and-drop interactions | + +{% /tab %} +{% /tabs %} + ## Browser Use Settings +{% tabs %} +{% tab label="VSCode (Legacy)" %} + {% callout type="info" title="Default Browser Settings" %} - **Enable browser tool**: Enabled @@ -161,3 +226,34 @@ Connect to a visible Chrome window to observe Kilo's interactions in real-time: ```bash google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug --no-first-run ``` + +{% /tab %} +{% tab label="VSCode & CLI" %} + +### VS Code Extension Settings + +In the VS Code extension, browser automation settings are available under **Settings → Browser**: + +- **Enable browser automation**: Toggle to enable or disable Playwright browser automation +- **Headless mode** (`browserAutomation.headless`): Run the browser without a visible window (default: disabled) +- **Use system Chrome** (`browserAutomation.useSystemChrome`): Use your installed Chrome instead of the bundled Chromium + +### CLI Configuration + +In CLI-only mode, browser automation requires manual MCP configuration in your `kilo.json` file: + +```json +{ + "mcp": { + "playwright": { + "type": "local", + "command": ["npx", "-y", "@playwright/mcp@latest"] + } + } +} +``` + +No additional settings are needed — the Playwright MCP server manages the browser lifecycle automatically. Chromium is downloaded on first use. + +{% /tab %} +{% /tabs %} diff --git a/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md b/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md index 377f9dc108e..08c4abd7b79 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md +++ b/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md @@ -27,6 +27,9 @@ Checkpoints let you: ## Configuration Options +{% tabs %} +{% tab label="VSCode (Legacy)" %} + Access checkpoint settings in Kilo Code settings under the "Checkpoints" section: 1. Open Settings by clicking the gear icon {% codicon name="gear" /%} → Checkpoints @@ -34,6 +37,25 @@ Access checkpoint settings in Kilo Code settings under the "Checkpoints" section {% image src="/docs/img/checkpoints/checkpoints.png" alt="Checkpoint settings in Kilo Code configuration" width="500" /%} +{% /tab %} +{% tab label="VSCode & CLI" %} + +Checkpoints are controlled by the `snapshot` boolean: + +- **Settings UI**: Open Settings → Checkpoints tab and toggle the snapshot setting +- **Config file**: Set `"snapshot": true` or `"snapshot": false` in your `kilo.json` configuration file + +```json +{ + "snapshot": true +} +``` + +When enabled, the system automatically captures snapshots at each step of a task. + +{% /tab %} +{% /tabs %} + ## How Checkpoints Work Kilo Code captures snapshots of your project's state using a shadow Git repository, separate from your main version control system. These snapshots, called checkpoints, automatically record changes throughout your AI-assisted workflow—whenever tasks begin, files change, or commands run. @@ -48,6 +70,9 @@ Checkpoints are stored as Git commits in the shadow repository, capturing: ## Working with Checkpoints +{% tabs %} +{% tab label="VSCode (Legacy)" %} + Checkpoints are integrated directly into your workflow through the chat interface. Checkpoints appear directly in your chat history in two forms: @@ -93,12 +118,34 @@ To restore a project to a previous checkpoint state: {% image src="/docs/img/checkpoints/checkpoints-9.png" alt="Confirmation dialog for restoring checkpoint with files & task" width="300" /%} -### Limitations and Considerations +{% /tab %} +{% tab label="VSCode & CLI" %} -- **Scope**: Checkpoints only capture changes made during active Kilo Code tasks -- **External changes**: Modifications made outside of tasks (manual edits, other tools) aren't included -- **Large files**: Very large binary files may impact performance -- **Unsaved work**: Restoration will overwrite any unsaved changes in your workspace +Checkpoints are captured automatically at each step of a task. The system calls `Snapshot.track()` at `start-step` and `finish-step` events, recording Git tree objects via `git write-tree`. + +### CLI TUI + +In the CLI terminal interface, checkpoints appear as revert points in the conversation. You can revert to any point by selecting the corresponding message. + +### Reverting Changes + +The new platform provides flexible revert capabilities: + +- **Full revert**: Use `SessionRevert.revert({ sessionID, messageID, partID })` to revert your workspace to any point in the conversation +- **Undo a revert**: Use `unrevert()` to restore the state before the last revert +- **Per-file revert**: `Snapshot.revert(patches)` can revert individual files via `git checkout -- `, allowing you to selectively undo changes to specific files while keeping others + +### Viewing Differences + +The system provides detailed diff capabilities: + +- `Snapshot.diff()` returns per-file diffs showing what changed at each step +- `Snapshot.diffFull()` returns full before/after file content for detailed review + +In the **Agent Manager** (VS Code extension), these diffs are displayed in a dedicated `DiffPanel` and `FullScreenDiffView`, providing a visual interface for reviewing all file changes made during a session. + +{% /tab %} +{% /tabs %} ## Technical Implementation @@ -183,6 +230,13 @@ Checkpoints do not support nested Git repositories. The working directory must b Operations are queued to prevent concurrent Git operations that might corrupt repository state. This ensures that rapid checkpoint operations complete safely even when requested in quick succession. +### Limitations and Considerations + +- **Scope**: Checkpoints only capture changes made during active Kilo Code tasks +- **External changes**: Modifications made outside of tasks (manual edits, other tools) aren't included +- **Large files**: Very large binary files may impact performance +- **Unsaved work**: Restoration will overwrite any unsaved changes in your workspace + ## Git Installation Checkpoints require Git to be installed on your system. The implementation uses the `simple-git` library, which relies on Git command-line tools to create and manage shadow repositories. diff --git a/packages/kilo-docs/pages/code-with-ai/features/code-actions.md b/packages/kilo-docs/pages/code-with-ai/features/code-actions.md index c36e900e7f6..323b1fe7127 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/code-actions.md +++ b/packages/kilo-docs/pages/code-with-ai/features/code-actions.md @@ -7,6 +7,13 @@ description: "Quick code actions and refactoring with Kilo Code" Code Actions are a powerful feature of VS Code that provide quick fixes, refactorings, and other code-related suggestions directly within the editor. Kilo Code integrates with this system to offer AI-powered assistance for common coding tasks. +{% callout type="info" %} +Code Actions are a **VS Code extension feature** and are not available in the CLI/TUI. +{% /callout %} + +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ## What are Code Actions? Code Actions appear as a lightbulb icon (💡) in the editor gutter (the area to the left of the line numbers). They can also be accessed via the right-click context menu, or via keyboard shortcut. They are triggered when: @@ -90,4 +97,31 @@ You can customize the prompts used for each Code Action by modifying the "Suppor 3. **Edit the Prompts:** Modify the text in the text area for the prompt you want to customize. You can use placeholders like `${filePath}` and `${selectedText}` to include information about the current file and selection. 4. **Click "Done":** Save your changes. +{% /tab %} +{% tab label="VSCode" %} + +## Available Code Actions + +The new extension provides the same core code actions via the editor context menu and lightbulb: + +- **Add to Context:** Adds selected code (with file path and line numbers) to the active chat session. Keyboard shortcut: `Cmd+K Cmd+A` (Mac) or `Ctrl+K Ctrl+A` (Windows/Linux). +- **Explain Code:** Asks Kilo to explain the selected code. +- **Fix Code:** Asks Kilo to fix problems in the selected code. +- **Improve Code:** Asks Kilo to suggest improvements to the selected code. + +### Agent Manager Integration + +If the **Agent Manager** is active, code actions route to the current Agent Manager session rather than the sidebar chat. This allows code actions to work seamlessly within multi-session workflows. + +### Terminal Context Menu + +The new extension also adds code actions to the **terminal context menu**: + +- **Add Terminal Content:** Adds selected terminal output to the chat context. +- **Fix Command:** Asks Kilo to fix a failed terminal command. +- **Explain Command:** Asks Kilo to explain a terminal command or its output. + +{% /tab %} +{% /tabs %} + By using Kilo Code's Code Actions, you can quickly get AI-powered assistance directly within your coding workflow. This can save you time and help you write better code. diff --git a/packages/kilo-docs/pages/code-with-ai/features/git-commit-generation.md b/packages/kilo-docs/pages/code-with-ai/features/git-commit-generation.md index 31582101198..41fa60a17cd 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/git-commit-generation.md +++ b/packages/kilo-docs/pages/code-with-ai/features/git-commit-generation.md @@ -53,6 +53,9 @@ Common types include: ## Configuration +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ### Customizing the Commit Template You can customize how commit messages are generated by modifying the prompt template: @@ -81,6 +84,20 @@ You can configure which API profile to use for commit message generation: Consider creating a dedicated [API configuration profile](/docs/ai-providers) with a faster, more cost-effective model specifically for commit message generation. {% /callout %} +{% /tab %} +{% tab label="VSCode" %} + +The new extension provides the same **SCM button** in the VS Code Source Control panel. Clicking it generates a commit message using the CLI backend's `client.commitMessage.generate()` API. + +Configuration is handled through the extension's settings or the shared `kilo.json` config file. + +{% callout type="info" %} +Git commit message generation is a **VS Code extension feature**. It is not available in the CLI/TUI. +{% /callout %} + +{% /tab %} +{% /tabs %} + ## Best Practices ### Staging Strategy diff --git a/packages/kilo-docs/pages/code-with-ai/platforms/cli.md b/packages/kilo-docs/pages/code-with-ai/platforms/cli.md index 04d6ff8e2a8..f6e80b3e11d 100644 --- a/packages/kilo-docs/pages/code-with-ai/platforms/cli.md +++ b/packages/kilo-docs/pages/code-with-ai/platforms/cli.md @@ -1,6 +1,7 @@ --- title: "Kilo CLI" description: "Using Kilo Code from the command line" +platform: next --- {% callout type="warning" title="Version Notice" %} @@ -167,7 +168,7 @@ Review your code locally before pushing — catch issues early without waiting f Configuration is managed through: - `/connect` command for provider setup (interactive) -- Config files in **`~/.config/kilo/`**: the CLI (Kilo CLI 1.0 from [Kilo-Org/kilocode](https://github.com/Kilo-Org/kilocode)) 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](/docs/automate/mcp/using-in-cli) for MCP config format. +- Config files in **`~/.config/kilo/`**: the CLI (Kilo CLI 1.0 from [Kilo-Org/kilocode](https://github.com/Kilo-Org/kilocode)) 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 Kilo Code](/docs/automate/mcp/using-in-kilo-code) for MCP config format. - `kilo auth` for credential management ## Slash Commands diff --git a/packages/kilo-docs/pages/code-with-ai/platforms/vscode.md b/packages/kilo-docs/pages/code-with-ai/platforms/vscode.md index a06044fe304..8604b5f96f3 100644 --- a/packages/kilo-docs/pages/code-with-ai/platforms/vscode.md +++ b/packages/kilo-docs/pages/code-with-ai/platforms/vscode.md @@ -5,6 +5,60 @@ description: "Using Kilo Code in Visual Studio Code" # VS Code Extension +Kilo Code is available as two VS Code extensions: the **VSCode (Legacy)** extension and the current **VSCode** version built on the Kilo CLI core. + +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ## Installation {% partial file="install-vscode.md" /%} + +## Key Features + +- **Sidebar chat** — AI-powered chat panel in the VS Code activity bar +- **[Autocomplete](/docs/code-with-ai/features/autocomplete)** — Inline code completions as you type +- **[Code Actions](/docs/code-with-ai/features/code-actions)** — Explain, fix, and improve code from the editor context menu +- **[Modes](/docs/code-with-ai/agents/using-modes)** — Code, Ask, Architect, Debug, Orchestrator, and Review modes +- **[Custom Modes](/docs/customize/custom-modes)** — Define custom modes with `.kilocodemodes` YAML files +- **[MCP](/docs/automate/mcp/overview)** — Connect to MCP servers for extended capabilities +- **[Agent Manager](/docs/automate/agent-manager)** — Multi-session orchestration with git worktree isolation +- **[Git Commit Generation](/docs/code-with-ai/features/git-commit-generation)** — AI-powered commit messages from the Source Control panel +- **[Context Mentions](/docs/code-with-ai/agents/context-mentions)** — Reference files, URLs, diagnostics, and git changes with `@` +- **[Checkpoints](/docs/code-with-ai/features/checkpoints)** — Git-based snapshots for undo/redo + +{% /tab %} +{% tab label="VSCode" %} + +## Installation + +1. Open VS Code +2. Go to Extensions (`Ctrl+Shift+X` / `Cmd+Shift+X`) +3. Search for "Kilo Code" +4. Click the dropdown arrow next to **Install** and select **Install Pre-Release Version** + +The extension bundles its own CLI binary and spawns `kilo serve` as a background process. All communication happens over HTTP + SSE. + +## Key Features + +Key features include: + +- **SolidJS-based UI** — Rebuilt sidebar with a modern component architecture +- **[JSONC config files](/docs/getting-started/settings)** — Portable settings in `kilo.json` instead of VS Code settings +- **[Granular permissions](/docs/getting-started/settings/auto-approving-actions)** — Per-tool permission rules with glob patterns +- **[Agents](/docs/code-with-ai/agents/using-modes)** — Customizable agents (`.kilo/agents/*.md`) replacing the modes system +- **[Agent Manager](/docs/automate/agent-manager)** — Enhanced with diff panel, multi-model comparison, PR import, and code review annotations +- **[Autocomplete](/docs/code-with-ai/features/autocomplete)** — FIM-based with Codestral, status bar cost tracking +- **[Workflows](/docs/customize/workflows)** — Repeatable prompt templates as `.md` files +- **[Skills](/docs/customize/skills)** — Load specialized domain knowledge from SKILL.md files +- **[Custom Subagents](/docs/customize/custom-subagents)** — Define specialized sub-agents for the `task` tool +- **Open in Tab** — Pop the chat out into a full editor tab +- **Sub-Agent Viewer** — Read-only panels for viewing child agent sessions +- **Legacy Migration** — Automatic migration wizard for VSCode extension settings + +## Shared Settings + +The extension shares its configuration with the CLI. Settings in `~/.config/kilo/kilo.json` (global) and `./kilo.json` (project) apply to both the CLI and the extension. + +{% /tab %} +{% /tabs %} From f1b606a23c1c090447994ffb09b8ab4c34e1c846 Mon Sep 17 00:00:00 2001 From: Josh Lambert Date: Tue, 24 Mar 2026 05:18:39 -0400 Subject: [PATCH 06/81] docs(kilo-docs): add platform tabs to customize pages Add VSCode (Pre-release) and CLI tabs to 7 customize pages: - custom-modes.md: Agents system, .md frontmatter format, config file format, examples, migration, troubleshooting (massive - 597 lines added) - custom-rules.md: .kilo/rules/ directory, instructions config key - custom-instructions.md: Tabbed instruction methods per platform - agents-md.md: Updated for new agent file format - skills.md: SKILL.md files, skill loading from .kilo/skills/ - context/kilocodeignore.md: Tabbed ignore file configuration - context/context-condensing.md: Tabbed context management Critical fix applied: - Permission YAML format corrected from action-as-key (allow: '*.md') to pattern-as-key ('*.md': 'allow') matching the actual config schema in config.ts:713 (PermissionObject = z.record(string, PermissionAction)) Part of the docs platform tabs effort (PR 5 of 8). Depends on #7497 for infrastructure. --- packages/kilo-docs/lib/nav/customize.ts | 5 +- .../kilo-docs/pages/customize/agents-md.md | 40 +- .../customize/context/codebase-indexing.md | 1 + .../customize/context/context-condensing.md | 101 ++- .../pages/customize/context/kilocodeignore.md | 108 +++- .../pages/customize/context/large-projects.md | 1 + .../pages/customize/custom-instructions.md | 158 ++++- .../kilo-docs/pages/customize/custom-modes.md | 597 +++++++++++++++++- .../kilo-docs/pages/customize/custom-rules.md | 233 ++++++- .../pages/customize/custom-subagents.md | 1 + packages/kilo-docs/pages/customize/skills.md | 250 ++++++-- .../kilo-docs/pages/customize/workflows.md | 1 + 12 files changed, 1409 insertions(+), 87 deletions(-) diff --git a/packages/kilo-docs/lib/nav/customize.ts b/packages/kilo-docs/lib/nav/customize.ts index ca3760e1b5f..7687bad119f 100644 --- a/packages/kilo-docs/lib/nav/customize.ts +++ b/packages/kilo-docs/lib/nav/customize.ts @@ -20,9 +20,10 @@ export const CustomizeNav: NavSection[] = [ { href: "/customize/custom-subagents", children: "Custom Subagents", + platform: "new", }, { href: "/customize/agents-md", children: "agents.md" }, - { href: "/customize/workflows", children: "Workflows" }, + { href: "/customize/workflows", children: "Workflows", platform: "new" }, { href: "/customize/skills", children: "Skills" }, { href: "/customize/prompt-engineering", @@ -36,6 +37,7 @@ export const CustomizeNav: NavSection[] = [ { href: "/customize/context/codebase-indexing", children: "Codebase Indexing", + platform: "legacy", }, { href: "/customize/context/context-condensing", @@ -48,6 +50,7 @@ export const CustomizeNav: NavSection[] = [ { href: "/customize/context/large-projects", children: "Large Projects", + platform: "legacy", }, ], }, diff --git a/packages/kilo-docs/pages/customize/agents-md.md b/packages/kilo-docs/pages/customize/agents-md.md index d451b5e7a7d..ef47a81316a 100644 --- a/packages/kilo-docs/pages/customize/agents-md.md +++ b/packages/kilo-docs/pages/customize/agents-md.md @@ -18,7 +18,7 @@ If you'd like to migrate your memory bank content to AGENTS.md: 1. Examine the contents in `.kilocode/rules/memory-bank/` 2. Move that content into your project's `AGENTS.md` file (or ask Kilo to do it for you) -{% /callout %} + {% /callout %} ## What is AGENTS.md? @@ -138,6 +138,9 @@ When you start a task in Kilo Code: ### Interaction with Other Rules +{% tabs %} +{% tab label="VSCode (Legacy)" %} + AGENTS.md works alongside Kilo Code's other configuration systems: | Feature | Scope | Location | Purpose | Priority | @@ -148,9 +151,28 @@ AGENTS.md works alongside Kilo Code's other configuration systems: | **[Global Custom Rules](/docs/customize/custom-rules)** | Global | `~/.kilocode/rules/` | Global Kilo Code rules | 4 | | **[Custom Instructions](/docs/customize/custom-instructions)** | Global | IDE settings | Personal preferences across all projects | 5 (Lowest) | +{% /tab %} +{% tab label="VSCode & CLI" %} + +In the new platform, AGENTS.md is loaded alongside other instruction sources. The CLI also supports `.claude/` and `.agents/` directories for compatibility with other tools. + +| Source | Scope | Location | Priority | +| ------------------------------------------------ | --------- | ----------------------------------------- | ---------------- | +| **Agent prompt** | Per-agent | `agent..prompt` in config | 1 (Highest) | +| **[Instructions](/docs/customize/custom-rules)** | Project | `instructions` key in project `kilo.json` | 2 | +| **AGENTS.md** | Project | `AGENTS.md` at project root | 3 | +| **[Instructions](/docs/customize/custom-rules)** | Global | `instructions` key in global `kilo.json` | 4 | +| **[Skills](/docs/customize/skills)** | Both | `.kilo/skills/`, config `skills` key | Loaded on demand | + +{% /tab %} +{% /tabs %} + ### Enabling/Disabling AGENTS.md -AGENTS.md support is **enabled by default** in Kilo Code. To disable it, edit `settings.json`: +{% tabs %} +{% tab label="VSCode (Legacy)" %} + +AGENTS.md support is **enabled by default**. To disable it, edit `settings.json`: ```json { @@ -158,6 +180,20 @@ AGENTS.md support is **enabled by default** in Kilo Code. To disable it, edit `s } ``` +{% /tab %} +{% tab label="VSCode & CLI" %} + +AGENTS.md is loaded automatically. To disable external skill directories (`.claude/skills/`, `.agents/skills/`), set the environment variable: + +```bash +export KILO_DISABLE_EXTERNAL_SKILLS=true +``` + +AGENTS.md itself cannot be individually disabled — it is always loaded if present. To override its instructions, use higher-priority sources like the `instructions` config key or agent-specific prompts. + +{% /tab %} +{% /tabs %} + ## Related Features - **[Custom Rules](/docs/customize/custom-rules)** - Kilo Code-specific rules with more control diff --git a/packages/kilo-docs/pages/customize/context/codebase-indexing.md b/packages/kilo-docs/pages/customize/context/codebase-indexing.md index ff6e1312f01..3f38b01a76d 100644 --- a/packages/kilo-docs/pages/customize/context/codebase-indexing.md +++ b/packages/kilo-docs/pages/customize/context/codebase-indexing.md @@ -1,6 +1,7 @@ --- title: "Codebase Indexing" description: "Index your codebase for improved AI understanding" +platform: legacy --- # Codebase Indexing diff --git a/packages/kilo-docs/pages/customize/context/context-condensing.md b/packages/kilo-docs/pages/customize/context/context-condensing.md index 9ab1a2d2a8b..0dfa3136470 100644 --- a/packages/kilo-docs/pages/customize/context/context-condensing.md +++ b/packages/kilo-docs/pages/customize/context/context-condensing.md @@ -17,9 +17,12 @@ Every AI model has a maximum context window - a limit on how much text it can pr - Higher API costs due to increased token usage - Eventually hitting the context limit and being unable to continue +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ## The Solution: Intelligent Condensing -Context Condensing solves this problem by creating a concise summary of your conversation that captures: +**Context Condensing** solves this problem by creating a concise summary of your conversation that captures: - The original task or goal - Key decisions made during the session @@ -63,20 +66,6 @@ Context Condensing uses an AI model to generate summaries. You can configure whi You can configure context condensing thresholds and behavior on a per-profile basis, allowing different settings for different projects or use cases. -## Best Practices - -### When to Condense - -- **Long sessions**: If you've been working for an extended period on a complex task -- **Before major transitions**: When switching to a different aspect of your project -- **When prompted**: When Kilo Code suggests condensing due to context limits - -### Maintaining Context Quality - -- **Be specific in your initial task**: A clear task description helps create better summaries -- **Use AGENTS.md**: Combine with [AGENTS.md](/docs/customize/agents-md) for persistent project context that doesn't need to be condensed -- **Review the summary**: After condensing, the summary is visible in your chat history - ## Troubleshooting ### Context Condensing Error @@ -95,6 +84,88 @@ If the condensed summary doesn't capture important details: - Use clear, specific language when describing your tasks - Important context can be reinforced after condensing by reminding Kilo Code of key details +{% /tab %} +{% tab label="VSCode & CLI" %} + +## The Solution: Auto-Compaction + +The new platform uses a **Compaction** system to manage context automatically. When your conversation approaches the token limit, compaction kicks in and produces a structured summary that captures: + +- The overall goal of the session +- Key discoveries made along the way +- What has been accomplished so far +- Files that were modified + +This summary replaces the earlier conversation history, freeing up context window space while maintaining continuity in your work. + +## How Compaction Works + +### Automatic Compaction + +Compaction triggers automatically when the conversation reaches the `usableWindow` token threshold. The full conversation history is sent to a dedicated **compaction agent**, which produces a structured summary. This happens in the background without interrupting your workflow. + +### Context Pruning + +In addition to compaction, the system can **prune** old tool outputs to reclaim context space incrementally. Tool results older than a 40,000-token recency window are replaced with `"[Old tool result content cleared]"`. This is a lighter-weight mechanism that runs alongside full compaction. + +### Manual Compaction + +You can also trigger compaction manually: + +- **CLI TUI**: Press `c` to compact the current session +- **Extension Webview**: Send a `CompactRequest` message to trigger compaction + +{% callout type="info" %} +There is no `/condense` chat command on the new platform. Use the keybinding or message-based invocation instead. +{% /callout %} + +### The Compaction Process + +When compaction is triggered: + +1. **Threshold Check**: The system detects that context usage has reached the `usableWindow` limit +2. **Agent Summarization**: The full conversation history is sent to a dedicated compaction agent +3. **Structured Summary**: The agent produces a summary covering the goal, discoveries, accomplishments, and modified files +4. **Replacement**: The detailed history is replaced with the compacted summary +5. **Continuation**: You continue working with the freed-up context space + +## Configuration Options + +Compaction is configured in your `kilo.json` file: + +```jsonc +{ + "compaction": { + "auto": true, // Enable or disable automatic compaction + "reserved": 4096, // Number of tokens to reserve (keep free) after compaction + "prune": true, // Enable pruning of old tool outputs beyond the recency window + }, +} +``` + +| Option | Type | Description | +| --------------------- | ------- | ------------------------------------------------------------------------ | +| `compaction.auto` | boolean | Enable or disable automatic compaction when the context threshold is hit | +| `compaction.reserved` | number | Number of tokens to reserve after compaction | +| `compaction.prune` | boolean | Enable pruning of old tool outputs outside the 40K token recency window | + +{% /tab %} +{% /tabs %} + +## Best Practices + +### When to Condense + +- **Long sessions**: If you've been working for an extended period on a complex task +- **Before major transitions**: When switching to a different aspect of your project +- **When prompted**: When Kilo Code suggests condensing or compaction due to context limits + +### Maintaining Context Quality + +- **Be specific in your initial task**: A clear task description helps create better summaries +- **Use AGENTS.md**: Combine with [AGENTS.md](/docs/customize/agents-md) for persistent project context that doesn't need to be condensed +- **Review the summary**: After condensing or compaction, the summary is visible in your chat history + ## Related Features - [AGENTS.md](/docs/customize/agents-md) - Persistent context storage across sessions diff --git a/packages/kilo-docs/pages/customize/context/kilocodeignore.md b/packages/kilo-docs/pages/customize/context/kilocodeignore.md index c929aab46ff..5000534b31e 100644 --- a/packages/kilo-docs/pages/customize/context/kilocodeignore.md +++ b/packages/kilo-docs/pages/customize/context/kilocodeignore.md @@ -13,6 +13,9 @@ If no `.kilocodeignore` file exists, Kilo Code can access all files in the works ## Quick Start +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. Create a `.kilocodeignore` file at the root of your project. 2. Add patterns for files or folders you want Kilo Code to avoid. 3. Save the file. Kilo Code will pick up the changes automatically. @@ -34,6 +37,35 @@ coverage/ !secrets/README.md ``` +{% /tab %} +{% tab label="VSCode & CLI" %} + +The primary mechanism for controlling file access is the **permission system** in `kilo.json`. You define tool-level permissions with glob patterns: + +```json +{ + "permission": { + "read": { "*.env": "deny", "*": "allow" }, + "edit": { "dist/**": "deny", "*": "allow" } + } +} +``` + +If you have an existing `.kilocodeignore` file, it is still supported. The **IgnoreMigrator** automatically converts `.kilocodeignore` patterns into permission `deny` rules on `read` and `edit` tools, so your existing rules continue to work without manual changes. + +You can also exclude paths from the file watcher separately using `config.watcher.ignore`: + +```json +{ + "watcher": { + "ignore": ["tmp/**", "logs/**"] + } +} +``` + +{% /tab %} +{% /tabs %} + ## Pattern Rules `.kilocodeignore` follows the same rules as `.gitignore`: @@ -47,6 +79,9 @@ Patterns are evaluated relative to the workspace root. ## What It Affects +{% tabs %} +{% tab label="VSCode (Legacy)" %} + Kilo Code checks `.kilocodeignore` before accessing files in tools like: - [`read_file`](/docs/automate/tools/read-file) @@ -58,17 +93,82 @@ Kilo Code checks `.kilocodeignore` before accessing files in tools like: If a file is blocked, Kilo Code will return an "access denied" message and suggest updating your `.kilocodeignore` rules. -## Visibility in Lists +{% /tab %} +{% tab label="VSCode & CLI" %} + +File access is controlled through **permission-based access control**. Each tool (`read`, `edit`, `glob`, `grep`, `write`, `bash`, etc.) has its own permission rules evaluated against glob patterns. + +In addition to your explicit permission rules: + +- **Hardcoded directory ignores** — 27 directories are always skipped (e.g. `node_modules`, `.git`, `dist`, `build`, `.cache`, `__pycache__`, `vendor`, and others). +- **Hardcoded file pattern ignores** — 11 file patterns are always skipped (e.g. lock files, binary artifacts). +- **`.gitignore` and `.ignore` files** are also respected when listing and searching files. + +If a file is denied by a permission rule, the tool will report that access was blocked. + +{% /tab %} +{% /tabs %} + +## Configuration Details + +{% tabs %} +{% tab label="VSCode (Legacy)" %} + +### Visibility in Lists By default, ignored files are hidden from file lists. You can show them with a lock icon by enabling: Settings -> Context -> **Show .kilocodeignore'd files in lists and searches** +{% /tab %} +{% tab label="VSCode & CLI" %} + +### Permission Rules + +Permission rules are defined per-tool in `kilo.json`. Patterns are evaluated in order — the last matching rule wins: + +```json +{ + "permission": { + "read": { + "*.env": "deny", + "secrets/**": "deny", + "*": "allow" + }, + "edit": { + "dist/**": "deny", + "*.lock": "deny", + "*": "allow" + } + } +} +``` + +### Migrating from .kilocodeignore + +If you already have a `.kilocodeignore` file, you don't need to do anything — the IgnoreMigrator reads your existing patterns and applies them as `deny` rules on `read` and `edit` tools automatically. You can optionally move your rules into `kilo.json` for more granular control (e.g. denying edits but allowing reads). + +### File Watcher Exclusions + +The `config.watcher.ignore` setting controls which paths the file watcher skips. This is separate from tool permissions and only affects change detection: + +```json +{ + "watcher": { + "ignore": ["tmp/**", "logs/**", ".build/**"] + } +} +``` + +{% /tab %} +{% /tabs %} + ## Checkpoints vs .kilocodeignore -Checkpoint tracking is separate from file access rules. Files blocked by `.kilocodeignore` can still be checkpointed if they are not excluded by `.gitignore`. See the [Checkpoints](/docs/code-with-ai/features/checkpoints) documentation for details. +Checkpoint tracking is separate from file access rules. Files blocked by `.kilocodeignore` or permission rules can still be checkpointed if they are not excluded by `.gitignore`. See the [Checkpoints](/docs/code-with-ai/features/checkpoints) documentation for details. ## Troubleshooting -- **Kilo can't access a file you want:** Remove or narrow the matching rule in `.kilocodeignore`. -- **A file still appears in lists:** Check the setting that shows ignored files in lists and searches. +- **Kilo can't access a file you want:** Remove or narrow the matching rule in `.kilocodeignore` (classic) or adjust the permission rules in `kilo.json` (new extension & CLI). +- **A file still appears in lists:** In the classic extension, check the setting that shows ignored files in lists and searches. In the new extension & CLI, verify your permission and watcher ignore configuration. +- **`.kilocodeignore` patterns not working in the new platform:** Ensure the file is at the workspace root. The IgnoreMigrator reads it automatically — check that your patterns use valid `.gitignore` syntax. diff --git a/packages/kilo-docs/pages/customize/context/large-projects.md b/packages/kilo-docs/pages/customize/context/large-projects.md index a0aab196f0a..101fb1621b6 100644 --- a/packages/kilo-docs/pages/customize/context/large-projects.md +++ b/packages/kilo-docs/pages/customize/context/large-projects.md @@ -1,6 +1,7 @@ --- title: "Large Projects" description: "Best practices for using Kilo Code with large codebases" +platform: legacy --- # Working with Large Projects diff --git a/packages/kilo-docs/pages/customize/custom-instructions.md b/packages/kilo-docs/pages/customize/custom-instructions.md index b7ea7b7d8fb..4682608ba1b 100644 --- a/packages/kilo-docs/pages/customize/custom-instructions.md +++ b/packages/kilo-docs/pages/customize/custom-instructions.md @@ -5,18 +5,21 @@ description: "Provide custom instructions to guide Kilo Code" # Custom Instructions -Custom Instructions allow you to personalize how Kilo Code behaves, providing specific guidance that shapes responses, coding style, and decision-making processes. +Custom Instructions allow you to personalize how Kilo Code behaves, providing specific guidance that shapes responses, coding style, and decision-making processes. Both the **VSCode** and **VSCode & CLI** versions support custom instructions, though the mechanisms differ. ## What Are Custom Instructions? Custom Instructions define specific Extension behaviors, preferences, and constraints beyond Kilo's basic role definition. Examples include coding style, documentation standards, testing requirements, and workflow guidelines. +{% tabs %} +{% tab label="VSCode (Legacy)" %} + +## Setting Custom Instructions + {% callout type="info" title="Custom Instructions vs Rules" %} Custom Instructions are IDE-wide and are applied across all workspaces and maintain your preferences regardless of which project you're working on. Unlike Instructions, [Custom Rules](/docs/customize/custom-rules) are project specific and allow you to setup workspace-based ruleset. {% /callout %} -## Setting Custom Instructions - **How to set them:** {% image src="/docs/img/custom-instructions/custom-instructions.png" alt="Kilo Code Modes tab showing global custom instructions interface" width="600" caption="Kilo Code Modes tab showing global custom instructions interface" /%} @@ -37,8 +40,9 @@ Mode-specific instructions can be set using the Modes Tab * **Save Changes:** Click "Done" to save your changes {% callout type="info" title="Global Mode Rules" %} - If the mode itself is global (not workspace-specific), any custom instructions you set for it will also apply globally for that mode across all workspaces. - {% /callout %} + +If the mode itself is global (not workspace-specific), any custom instructions you set for it will also apply globally for that mode across all workspaces. +{% /callout %} ## Mode-Specific Instructions from Files @@ -51,6 +55,150 @@ For version-controlled mode instructions, use the mode rules file paths document Older naming like `.clinerules-{mode-slug}` is not the recommended path for current Kilo mode-specific instructions. {% /callout %} +{% /tab %} +{% tab label="VSCode" %} + +The new extension provides multiple layers of instruction configuration — from per-agent prompts in the Settings UI to auto-discovered files in your project and global config. + +## Per-Agent Prompts + +Each agent can have its own custom prompt configured through the settings UI: + +1. Open **Settings → Agent Behaviour → Agents** subtab +2. Select the agent you want to customize +3. Enter your instructions in the markdown text area under the agent's `prompt` field +4. Save your changes + +These prompts are injected into the agent's system prompt and apply across all sessions using that agent. + +## Instruction Files + +Kilo automatically discovers instruction files at your project root and in parent directories (via `findUp`). The following filenames are recognized: + +- **`AGENTS.md`** — The primary instruction file for Kilo +- **`CLAUDE.md`** — Also supported for compatibility +- **`CONTEXT.md`** — Additional project context + +Place any of these files at your project root to provide project-wide instructions to the agent. + +### Global Instructions + +For instructions that apply across all your projects, place an `AGENTS.md` file in your global config directory: + +- **Kilo:** `~/.config/kilo/AGENTS.md` +- **Claude-compatible:** `~/.claude/CLAUDE.md` + +Global instructions are loaded before project-level instructions and apply to every session. + +### Per-Directory Instructions + +You can place `AGENTS.md` files in any subdirectory of your project. These are loaded dynamically — when the agent's Read tool accesses a file in that directory, the corresponding `AGENTS.md` is discovered and its contents are injected into the conversation as `` tags. + +This is useful for providing context-specific guidance for different parts of a monorepo or project. + +## Additional Instruction Sources + +The `config.instructions` setting accepts an array of paths, globs, or URLs pointing to additional instruction files. You can manage these in **Settings → Agent Behaviour → Rules** subtab. + +```yaml +# Examples of instruction sources +instructions: + - ./docs/coding-standards.md + - ./teams/frontend-rules.md + - https://example.com/team-instructions.md +``` + +{% callout type="info" title="URL-Based Instructions" %} +URL-based instruction sources are fetched at session start with a 5-second timeout. If the URL is unreachable, the instruction source is silently skipped. +{% /callout %} + +## Legacy `.kilocoderules` Support + +If your project contains `.kilocoderules` files from the VSCode extension, these are still loaded via auto-migration. However, migrating to `AGENTS.md` is recommended for new projects. + +{% /tab %} +{% tab label="CLI" %} + +The CLI provides multiple layers of instruction configuration — from per-agent prompts in agent definition files to auto-discovered files in your project and global config. + +## Per-Agent Prompts + +Each agent can have its own custom prompt defined in its `.md` file (the markdown body) or via the `agent..prompt` key in `kilo.json`: + +```jsonc +// kilo.json +{ + "agent": { + "code": { + "prompt": "You are a Python specialist. Follow PEP8 strictly.", + }, + }, +} +``` + +Or as the markdown body in `.kilo/agents/code.md`: + +```markdown +--- +description: Python specialist +--- + +You are a Python specialist. Follow PEP8 strictly. +``` + +These prompts are injected into the agent's system prompt and apply across all sessions using that agent. + +## Instruction Files + +Kilo automatically discovers instruction files at your project root and in parent directories (via `findUp`). The following filenames are recognized: + +- **`AGENTS.md`** — The primary instruction file for Kilo +- **`CLAUDE.md`** — Also supported for compatibility +- **`CONTEXT.md`** — Additional project context + +Place any of these files at your project root to provide project-wide instructions to the agent. + +### Global Instructions + +For instructions that apply across all your projects, place an `AGENTS.md` file in your global config directory: + +- **Kilo:** `~/.config/kilo/AGENTS.md` +- **Claude-compatible:** `~/.claude/CLAUDE.md` + +Global instructions are loaded before project-level instructions and apply to every session. + +### Per-Directory Instructions + +You can place `AGENTS.md` files in any subdirectory of your project. These are loaded dynamically — when the agent's Read tool accesses a file in that directory, the corresponding `AGENTS.md` is discovered and its contents are injected into the conversation as `` tags. + +This is useful for providing context-specific guidance for different parts of a monorepo or project. + +## Additional Instruction Sources + +The `config.instructions` setting accepts an array of paths, globs, or URLs pointing to additional instruction files. Configure these in your `kilo.json`: + +```jsonc +// kilo.json +{ + "instructions": [ + "./docs/coding-standards.md", + "./teams/frontend-rules.md", + "https://example.com/team-instructions.md", + ], +} +``` + +{% callout type="info" title="URL-Based Instructions" %} +URL-based instruction sources are fetched at session start with a 5-second timeout. If the URL is unreachable, the instruction source is silently skipped. +{% /callout %} + +## Legacy `.kilocoderules` Support + +If your project contains `.kilocoderules` files from the VSCode extension, these are still loaded via auto-migration. However, migrating to `AGENTS.md` is recommended for new projects. + +{% /tab %} +{% /tabs %} + ## Related Features - [Custom Modes](/docs/customize/custom-modes) diff --git a/packages/kilo-docs/pages/customize/custom-modes.md b/packages/kilo-docs/pages/customize/custom-modes.md index 86bcc17a2c4..7713e4e2c39 100644 --- a/packages/kilo-docs/pages/customize/custom-modes.md +++ b/packages/kilo-docs/pages/customize/custom-modes.md @@ -7,10 +7,6 @@ description: "Create and configure custom modes in Kilo Code" Kilo Code allows you to create **custom modes** to tailor Kilo's behavior to specific tasks or workflows. Custom modes can be either **global** (available across all projects) or **project-specific** (defined within a single project). -## Sticky Models for Efficient Workflow - -Each mode—including custom ones—features **Sticky Models**. This means Kilo Code automatically remembers and selects the last model you used with a particular mode. This lets you assign different preferred models to different tasks without constant reconfiguration, as Kilo switches between models when you change modes. - ## Why Use Custom Modes? - **Specialization:** Create modes optimized for specific tasks, like "Documentation Writer," "Test Engineer," or "Refactoring Expert" @@ -18,6 +14,13 @@ Each mode—including custom ones—features **Sticky Models**. This means Kilo - **Experimentation:** Safely experiment with different prompts and configurations without affecting other modes - **Team Collaboration:** Share custom modes with your team to standardize workflows +{% tabs %} +{% tab label="VSCode (Legacy)" %} + +## Sticky Models for Efficient Workflow + +Each mode—including custom ones—features **Sticky Models**. This means Kilo Code automatically remembers and selects the last model you used with a particular mode. This lets you assign different preferred models to different tasks without constant reconfiguration, as Kilo switches between models when you change modes. + {% callout type="tip" %} **Keep custom modes on track:** Limit the types of files that they're allowed to edit using the `fileRegex` option in the `groups` configuration. This prevents modes from accidentally modifying files outside their intended scope. {% /callout %} @@ -135,8 +138,6 @@ If you see both YAML and JSON mode files, this is usually from legacy configurat YAML is now the preferred format for defining custom modes due to better readability, comment support, and cleaner multi-line strings. -### YAML Example - ```yaml customModes: - slug: docs-writer @@ -388,9 +389,456 @@ customModes: - command ``` +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +In the new extension, custom behavioral profiles are called **agents** instead of modes. Agents are defined as Markdown files with YAML frontmatter or as entries in the `agent` key of your config file. + +## What's Included in a Custom Agent? + +| Property | Description | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| **name** (filename) | The agent's identifier, derived from the `.md` filename (e.g., `docs-writer.md` creates an agent named `docs-writer`) | +| **description** | A short summary displayed in the agent picker and used by the orchestrator for delegation | +| **model** | Pin a specific model in `provider/model` format (e.g., `anthropic/claude-sonnet-4-20250514`) | +| **prompt** (markdown body) | The system prompt text — the markdown body of the file, injected into the agent's system prompt | +| **mode** | Role classification: `primary` (user-selectable), `subagent` (only invoked by other agents), or `all` (both) | +| **permission** | Per-agent permission overrides controlling which tools the agent can use (e.g., deny `edit`, `bash`) | +| **color** | Hex color (`#FF5733`) or theme keyword (`primary`, `accent`, `warning`, etc.) for the agent picker UI | +| **steps** | Maximum agentic iterations before forcing a text-only response | +| **temperature** / **top_p** | Sampling parameters for the agent's model | +| **variant** | Default model variant | +| **hidden** | If `true`, the agent is hidden from the UI (only meaningful for subagents) | +| **disable** | If `true`, removes the agent entirely | + +## Methods for Creating and Configuring Agents + +### 1. Ask Kilo! (Recommended) + +Ask Kilo to create an agent for you: + +``` +Create a new agent called "docs-writer" that can only read files and edit Markdown files. +``` + +Kilo will generate the agent definition and write it to `.kilo/agent/` in your project. + +### 2. Using the Settings UI + +You can manage agents through the **Settings → Agent Behaviour → Agents** subtab in the extension. This lets you view, create, and edit agent configurations — including the agent's prompt, model, permissions, and other properties. + +### 3. Markdown Files with YAML Frontmatter + +Create `.md` files in any of these directories: + +``` +.kilo/agents/my-agent.md +.kilo/agent/my-agent.md +.opencode/agents/my-agent.md +``` + +For global agents, place files in your global config directory: + +``` +~/.config/kilo/agent/my-agent.md +``` + +The **filename** (minus `.md`) becomes the agent name. Nested directories create namespaced names (e.g., `agents/backend/sql.md` becomes agent `backend/sql`). + +**Example agent file** (`.kilo/agents/docs-writer.md`): + +```markdown +--- +description: Specialized for writing and editing technical documentation +mode: primary +color: "#10B981" +permission: + edit: + "*.md": "allow" + "*": "deny" + bash: deny +--- + +You are a technical documentation specialist. Your expertise includes: + +- Writing clear, well-structured documentation +- Following markdown best practices +- Creating helpful code examples + +Focus on clarity and completeness. Only edit Markdown files. +``` + +### 4. Config File (`kilo.json`) + +Define agents under the `agent` key in your project's `kilo.json` (or `opencode.jsonc`): + +```jsonc +{ + "agent": { + "docs-writer": { + "description": "Specialized for writing and editing technical documentation", + "mode": "primary", + "color": "#10B981", + "prompt": "You are a technical documentation specialist...", + "permission": { + "edit": "deny", + "bash": "deny", + }, + }, + // Override a built-in agent + "code": { + "model": "anthropic/claude-sonnet-4-20250514", + "temperature": 0.3, + }, + }, +} +``` + +## Agent Property Reference + +### `mode` + +Controls where the agent appears: + +| Value | Behavior | +| ---------- | -------------------------------------------------------------------------------------- | +| `primary` | Shown in the agent picker — the user can select it directly | +| `subagent` | Only invokable by other agents via the `task` tool | +| `all` | Available both as a top-level pick and as a subagent (default for user-defined agents) | + +### `permission` + +An ordered set of rules controlling tool access. Permissions support three actions: `allow`, `deny`, and `ask` (prompt the user). You can use glob patterns to scope rules to specific files or commands: + +```yaml +permission: + edit: + "*.md": "allow" + "*": "deny" + bash: deny + read: allow +``` + +Known permission types include: `read`, `edit`, `bash`, `glob`, `grep`, `list`, `task`, `webfetch`, `websearch`, `codesearch`, `todowrite`, `todoread`, and more. + +### `model` + +Pin a specific model using the `provider/model` format: + +```yaml +model: anthropic/claude-sonnet-4-20250514 +``` + +### `steps` + +Limits the number of agentic iterations (tool call rounds) before the agent is forced to respond with text only. Useful for preventing runaway agents: + +```yaml +steps: 25 +``` + +## Configuration Precedence + +Agent configurations merge from lowest to highest priority: + +1. Built-in (native) agent defaults +2. Global config (`~/.config/kilo/kilo.json`) +3. Project config (`kilo.json` at project root) +4. `.kilo/` / `.opencode/` directory configs and agent `.md` files +5. Environment variable overrides (`KILO_CONFIG_CONTENT`) + +When the same agent name appears at multiple levels, properties are merged (not replaced wholesale), so you can override just a model or temperature without redefining the entire agent. + +## Overriding Built-in Agents + +Override any built-in agent (**code**, **plan**, **debug**, **ask**, **orchestrator**, **explore**, **general**) by defining an agent with the same name: + +```jsonc +// kilo.json — override the built-in "code" agent +{ + "agent": { + "code": { + "model": "openai/gpt-4o", + "temperature": 0.2, + "permission": { + "edit": { + "*.py": "allow", + "*": "deny", + }, + }, + }, + }, +} +``` + +Or as a `.md` file (`.kilo/agents/code.md`): + +```markdown +--- +model: openai/gpt-4o +temperature: 0.2 +permission: + edit: + "*.py": "allow" + "*": "deny" +--- + +You are a Python specialist. Only edit Python files. +``` + +## Migration from VSCode Extension Modes + +If you have existing `.kilocodemodes` or `custom_modes.yaml` files from the VSCode extension, the new extension automatically migrates them on startup. The migration converts: + +- `slug` to the agent name (key) +- `roleDefinition` + `customInstructions` to `prompt` +- `groups` (e.g., `["read", "edit", "browser"]`) to `permission` rules +- `whenToUse` / `description` to `description` +- Mode is set to `primary` + +Built-in mode slugs (`code`, `ask`, `debug`, `orchestrator`) are skipped since they have native agent equivalents. + +{% /tab %} +{% tab label="CLI" %} + +In the CLI, custom behavioral profiles are called **agents** instead of modes. Agents are defined as Markdown files with YAML frontmatter or as entries in the `agent` key of your config file. + +## What's Included in a Custom Agent? + +| Property | Description | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| **name** (filename) | The agent's identifier, derived from the `.md` filename (e.g., `docs-writer.md` creates an agent named `docs-writer`) | +| **description** | A short summary displayed in the agent picker and used by the orchestrator for delegation | +| **model** | Pin a specific model in `provider/model` format (e.g., `anthropic/claude-sonnet-4-20250514`) | +| **prompt** (markdown body) | The system prompt text — the markdown body of the file, injected into the agent's system prompt | +| **mode** | Role classification: `primary` (user-selectable), `subagent` (only invoked by other agents), or `all` (both) | +| **permission** | Per-agent permission overrides controlling which tools the agent can use (e.g., deny `edit`, `bash`) | +| **color** | Hex color (`#FF5733`) or theme keyword (`primary`, `accent`, `warning`, etc.) for the agent picker UI | +| **steps** | Maximum agentic iterations before forcing a text-only response | +| **temperature** / **top_p** | Sampling parameters for the agent's model | +| **variant** | Default model variant | +| **hidden** | If `true`, the agent is hidden from the UI (only meaningful for subagents) | +| **disable** | If `true`, removes the agent entirely | + +## Methods for Creating and Configuring Agents + +### 1. Ask Kilo! (Recommended) + +Ask Kilo to create an agent for you: + +``` +Create a new agent called "docs-writer" that can only read files and edit Markdown files. +``` + +Kilo will generate the agent definition and write it to `.kilo/agent/` in your project. + +### 2. Using `kilo agent create` + +The CLI provides an interactive command: + +```bash +kilo agent create +``` + +This walks you through selecting a description, mode, and tools, then uses an LLM to generate the agent's system prompt and writes a `.md` file with YAML frontmatter. + +### 3. Markdown Files with YAML Frontmatter + +Create `.md` files in any of these directories: + +``` +.kilo/agents/my-agent.md +.kilo/agent/my-agent.md +.opencode/agents/my-agent.md +``` + +For global agents, place files in your global config directory: + +``` +~/.config/kilo/agent/my-agent.md +``` + +The **filename** (minus `.md`) becomes the agent name. Nested directories create namespaced names (e.g., `agents/backend/sql.md` becomes agent `backend/sql`). + +**Example agent file** (`.kilo/agents/docs-writer.md`): + +```markdown +--- +description: Specialized for writing and editing technical documentation +mode: primary +color: "#10B981" +permission: + edit: + "*.md": "allow" + "*": "deny" + bash: deny +--- + +You are a technical documentation specialist. Your expertise includes: + +- Writing clear, well-structured documentation +- Following markdown best practices +- Creating helpful code examples + +Focus on clarity and completeness. Only edit Markdown files. +``` + +### 4. Config File (`kilo.json`) + +Define agents under the `agent` key in your project's `kilo.json` (or `opencode.jsonc`): + +```jsonc +{ + "agent": { + "docs-writer": { + "description": "Specialized for writing and editing technical documentation", + "mode": "primary", + "color": "#10B981", + "prompt": "You are a technical documentation specialist...", + "permission": { + "edit": "deny", + "bash": "deny", + }, + }, + // Override a built-in agent + "code": { + "model": "anthropic/claude-sonnet-4-20250514", + "temperature": 0.3, + }, + }, +} +``` + +## Agent Property Reference + +### `mode` + +Controls where the agent appears: + +| Value | Behavior | +| ---------- | -------------------------------------------------------------------------------------- | +| `primary` | Shown in the agent picker — the user can select it directly | +| `subagent` | Only invokable by other agents via the `task` tool | +| `all` | Available both as a top-level pick and as a subagent (default for user-defined agents) | + +### `permission` + +An ordered set of rules controlling tool access. Permissions support three actions: `allow`, `deny`, and `ask` (prompt the user). You can use glob patterns to scope rules to specific files or commands: + +```yaml +permission: + edit: + "*.md": "allow" + "*": "deny" + bash: deny + read: allow +``` + +Known permission types include: `read`, `edit`, `bash`, `glob`, `grep`, `list`, `task`, `webfetch`, `websearch`, `codesearch`, `todowrite`, `todoread`, and more. + +### `model` + +Pin a specific model using the `provider/model` format: + +```yaml +model: anthropic/claude-sonnet-4-20250514 +``` + +### `steps` + +Limits the number of agentic iterations (tool call rounds) before the agent is forced to respond with text only. Useful for preventing runaway agents: + +```yaml +steps: 25 +``` + +## Configuration Precedence + +Agent configurations merge from lowest to highest priority: + +1. Built-in (native) agent defaults +2. Global config (`~/.config/kilo/kilo.json`) +3. Project config (`kilo.json` at project root) +4. `.kilo/` / `.opencode/` directory configs and agent `.md` files +5. Environment variable overrides (`KILO_CONFIG_CONTENT`) + +When the same agent name appears at multiple levels, properties are merged (not replaced wholesale), so you can override just a model or temperature without redefining the entire agent. + +## Overriding Built-in Agents + +Override any built-in agent (**code**, **plan**, **debug**, **ask**, **orchestrator**, **explore**, **general**) by defining an agent with the same name: + +```jsonc +// kilo.json — override the built-in "code" agent +{ + "agent": { + "code": { + "model": "openai/gpt-4o", + "temperature": 0.2, + "permission": { + "edit": { + "*.py": "allow", + "*": "deny", + }, + }, + }, + }, +} +``` + +Or as a `.md` file (`.kilo/agents/code.md`): + +```markdown +--- +model: openai/gpt-4o +temperature: 0.2 +permission: + edit: + "*.py": "allow" + "*": "deny" +--- + +You are a Python specialist. Only edit Python files. +``` + +## Migration from VSCode Extension Modes + +If you have existing `.kilocodemodes` or `custom_modes.yaml` files from the VSCode extension, the CLI automatically migrates them on startup. The migration converts: + +- `slug` to the agent name (key) +- `roleDefinition` + `customInstructions` to `prompt` +- `groups` (e.g., `["read", "edit", "browser"]`) to `permission` rules +- `whenToUse` / `description` to `description` +- Mode is set to `primary` + +Built-in mode slugs (`code`, `ask`, `debug`, `orchestrator`) are skipped since they have native agent equivalents. + +{% /tab %} +{% /tabs %} + ## Understanding Regex in Custom Modes -Regular expressions (`fileRegex`) offer fine-grained control over file editing permissions. +{% tabs %} +{% tab label="VSCode (Legacy)" %} + +Regular expressions (`fileRegex`) in the **VSCode** version offer fine-grained control over file editing permissions within tool groups. + +{% /tab %} +{% tab label="VSCode & CLI" %} + +The new extension and CLI use **permission rules with glob patterns** instead of regex. Permissions are defined per-tool (e.g., `edit`, `bash`, `read`) and support `allow`, `deny`, and `ask` actions with glob matching: + +```yaml +permission: + edit: + "*.md": "allow" + "*": "deny" +``` + +The **VSCode** version's `fileRegex` approach is automatically converted to permission rules during migration. + +{% /tab %} +{% /tabs %} {% callout type="tip" %} @@ -445,6 +893,9 @@ When a mode attempts to edit a file that doesn't match its `fileRegex` pattern, ## Example Configurations +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ### Basic Documentation Writer (YAML) ```yaml @@ -498,8 +949,101 @@ customModes: - browser ``` +{% /tab %} +{% tab label="VSCode & CLI" %} + +### Basic Documentation Writer (`.kilo/agents/docs-writer.md`) + +```markdown +--- +description: Specialized for writing and editing technical documentation +mode: primary +color: "#10B981" +permission: + edit: + "*.md": "allow" + "*": "deny" + bash: deny +--- + +You are a technical writer specializing in clear documentation. +Focus on clear explanations and examples. +``` + +### Test Engineer (`.kilo/agents/test-engineer.md`) + +```markdown +--- +description: Focused on writing and maintaining test suites +mode: primary +color: "#F59E0B" +permission: + edit: + "*.{test,spec}.{js,ts}": "allow" + "*": "deny" +--- + +You are a test engineer focused on code quality. +Use for writing tests, debugging test failures, and improving test coverage. +``` + +### Security Reviewer (`.kilo/agents/security-review.md`) + +```markdown +--- +description: Read-only security analysis and vulnerability assessment +mode: primary +color: "#EF4444" +permission: + edit: deny + bash: deny +--- + +You are a security specialist reviewing code for vulnerabilities. + +Focus on: + +- Input validation issues +- Authentication and authorization flaws +- Data exposure risks +- Injection vulnerabilities +``` + +### Config File Example (`kilo.json`) + +```jsonc +{ + "agent": { + "docs-writer": { + "description": "Specialized for writing and editing technical documentation", + "mode": "primary", + "color": "#10B981", + "prompt": "You are a technical writer specializing in clear documentation.", + "permission": { + "edit": { "*.md": "allow", "*": "deny" }, + "bash": "deny", + }, + }, + "test-engineer": { + "description": "Focused on writing and maintaining test suites", + "mode": "primary", + "prompt": "You are a test engineer focused on code quality.", + "permission": { + "edit": { "*.{test,spec}.{js,ts}": "allow", "*": "deny" }, + }, + }, + }, +} +``` + +{% /tab %} +{% /tabs %} + ## Troubleshooting +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ### Common Issues - **Mode not appearing:** After creating or importing a mode, you may need to reload the VS Code window @@ -514,6 +1058,43 @@ customModes: - **Hyphens for List Items:** List items start with a hyphen and a space (e.g., `- read`) - **Validate Your YAML:** Use online YAML validators or your editor's built-in validation +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +### Common Issues + +- **Agent not appearing:** Ensure the `.md` file is in a recognized directory (`.kilo/agents/`, `.kilo/agent/`, `.opencode/agents/`). Check that the `mode` property is `primary` or `all` if you expect it in the agent picker. +- **Permission errors:** Permission rules are evaluated last-match-wins. If an agent can't use a tool you expect, check that an `allow` rule appears after any `deny` rules for that permission. +- **YAML frontmatter parse errors:** Ensure the frontmatter block starts and ends with `---` on its own line. Validate that YAML keys match expected property names (e.g., `top_p` not `topP`). +- **Agent overrides not working:** Config merges from global to project level. If a global config sets a property, your project config can override it, but both must use the same agent name. + +### Tips for Agent Definitions + +- **Keep prompts focused:** The markdown body is your system prompt — write it as if briefing a colleague +- **Use `mode: subagent`** for helper agents that shouldn't be directly selectable by users +- **Use the Settings UI** to view and edit agents through the **Settings → Agent Behaviour → Agents** subtab +- **Legacy modes are auto-migrated:** If you have `.kilocodemodes` files, they'll be converted on startup — no manual migration needed + +{% /tab %} +{% tab label="CLI" %} + +### Common Issues + +- **Agent not appearing:** Ensure the `.md` file is in a recognized directory (`.kilo/agents/`, `.kilo/agent/`, `.opencode/agents/`). Check that the `mode` property is `primary` or `all` if you expect it in the agent picker. +- **Permission errors:** Permission rules are evaluated last-match-wins. If an agent can't use a tool you expect, check that an `allow` rule appears after any `deny` rules for that permission. +- **YAML frontmatter parse errors:** Ensure the frontmatter block starts and ends with `---` on its own line. Validate that YAML keys match expected property names (e.g., `top_p` not `topP`). +- **Agent overrides not working:** Config merges from global to project level. If a global config sets a property, your project config can override it, but both must use the same agent name. + +### Tips for Agent Definitions + +- **Keep prompts focused:** The markdown body is your system prompt — write it as if briefing a colleague +- **Use `mode: subagent`** for helper agents that shouldn't be directly selectable by users +- **Test with `kilo agent create`** to see how the CLI generates agent definitions, then customize from there +- **Legacy modes are auto-migrated:** If you have `.kilocodemodes` files, they'll be converted on startup — no manual migration needed + +{% /tab %} +{% /tabs %} + ## Community Gallery -Ready to explore more? Check out the [Show and Tell](https://github.com/Kilo-Org/kilocode/discussions/categories/show-and-tell) to discover and share custom modes created by the community! +Ready to explore more? Check out the [Show and Tell](https://github.com/Kilo-Org/kilocode/discussions/categories/show-and-tell) to discover and share custom modes and agents created by the community! diff --git a/packages/kilo-docs/pages/customize/custom-rules.md b/packages/kilo-docs/pages/customize/custom-rules.md index ccecb0528ec..d89be15ed5e 100644 --- a/packages/kilo-docs/pages/customize/custom-rules.md +++ b/packages/kilo-docs/pages/customize/custom-rules.md @@ -26,12 +26,11 @@ Kilo Code supports two types of custom rules: - **Project Rules**: Apply only to the current project workspace - **Global Rules**: Apply across all projects and workspaces -{% callout type="note" title="UI Support" %} -The built-in rules management UI is available for general rules only. Mode-specific rules must be managed through the file system. -{% /callout %} - ## Rule Location +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ### Project Rules Custom rules are primarily loaded from the **`.kilocode/rules/` directory**. This is the recommended approach for organizing your project-specific rules. Each rule is typically placed in its own Markdown file with a descriptive name: @@ -59,8 +58,86 @@ Global rules are stored in your home directory and apply to all projects: │ └── documentation_style.md ``` +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +### Project Rules + +Project rules are configured via the `instructions` key in your project's `kilo.json` file. You can edit this file directly or use the **Settings** webview to manage the `instructions` configuration. Each entry points to a file path or glob pattern: + +```jsonc +// kilo.json +{ + "instructions": [".kilo/rules/formatting.md", ".kilo/rules/*.md"], +} +``` + +You can also place rule files in the **`.kilo/`** directory structure: + +``` +project/ +├── .kilo/ +│ ├── rules/ +│ │ ├── formatting.md +│ │ ├── restricted_files.md +│ │ └── naming_conventions.md +├── kilo.json +├── src/ +└── ... +``` + +### Global Rules + +Global rules are configured via the `instructions` key in your global `kilo.json` config file (typically at `~/.config/kilo/kilo.json`). + +{% callout type="note" title="Migration" %} +The new extension is backward compatible with `.kilocode/rules/` directories. Existing rules will continue to work, but migrating to `kilo.json` is recommended. +{% /callout %} + +{% /tab %} +{% tab label="CLI" %} + +### Project Rules + +Project rules are configured via the `instructions` key in your project's `kilo.json` file. Each entry points to a file path or glob pattern: + +```jsonc +// kilo.json +{ + "instructions": [".kilo/rules/formatting.md", ".kilo/rules/*.md"], +} +``` + +You can also place rule files in the **`.kilo/`** directory structure: + +``` +project/ +├── .kilo/ +│ ├── rules/ +│ │ ├── formatting.md +│ │ ├── restricted_files.md +│ │ └── naming_conventions.md +├── kilo.json +├── src/ +└── ... +``` + +### Global Rules + +Global rules are configured via the `instructions` key in your global `kilo.json` config file (typically at `~/.config/kilo/kilo.json`). + +{% callout type="note" title="Migration" %} +The CLI is backward compatible with `.kilocode/rules/` directories. Existing rules will continue to work, but migrating to `kilo.json` is recommended. +{% /callout %} + +{% /tab %} +{% /tabs %} + ## Managing Rules Through the UI +{% tabs %} +{% tab label="VSCode (Legacy)" %} + Kilo Code provides a built-in interface for managing your custom rules without manually editing files in the `.kilocode/rules/` directories. To access the UI, click on the icon in the **bottom right corner** of the Kilo Code window. You can access the rules management UI to: @@ -70,8 +147,58 @@ You can access the rules management UI to: - Create and edit rules directly in the interface - Organize rules by category and priority +{% callout type="note" title="UI Support" %} +The built-in rules management UI is available for general rules only. Mode-specific rules must be managed through the file system. +{% /callout %} + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +Rules are managed by editing the `instructions` array in your `kilo.json` config file. You can also use the **Settings** webview in VS Code to edit the configuration. + +- **Add a rule**: Add a file path or glob pattern to the `instructions` array +- **Remove a rule**: Remove the entry from the array +- **Disable a rule temporarily**: Comment out the line in `kilo.json` (JSONC supports `//` comments) + +```jsonc +// kilo.json +{ + "instructions": [ + ".kilo/rules/formatting.md", + // ".kilo/rules/experimental.md" -- temporarily disabled + ".kilo/rules/naming_conventions.md", + ], +} +``` + +{% /tab %} +{% tab label="CLI" %} + +Rules are managed by editing the `instructions` array in your `kilo.json` config file directly. + +- **Add a rule**: Add a file path or glob pattern to the `instructions` array +- **Remove a rule**: Remove the entry from the array +- **Disable a rule temporarily**: Comment out the line in `kilo.json` (JSONC supports `//` comments) + +```jsonc +// kilo.json +{ + "instructions": [ + ".kilo/rules/formatting.md", + // ".kilo/rules/experimental.md" -- temporarily disabled + ".kilo/rules/naming_conventions.md", + ], +} +``` + +{% /tab %} +{% /tabs %} + ## Rule Loading Order +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ### General Rules (Any Mode) Rules are loaded in the following priority order: @@ -86,21 +213,40 @@ Rules are loaded in the following priority order: When both global and project rules exist, they are combined with project rules taking precedence over global rules for conflicting directives. {% callout type="note" %} -We strongly recommend keeping your rules in the `.kilocode/rules/` folder as it provides better organization and is the preferred approach for future versions. The folder-based structure allows for more granular rule organization and clearer separation of concerns. The legacy file-based approach is maintained for backward compatibility but may be subject to change in future releases. +We strongly recommend keeping your rules in the `.kilocode/rules/` folder as it provides better organization and is the preferred approach for future versions. The legacy file-based approach is maintained for backward compatibility but may be subject to change in future releases. {% /callout %} ### Mode-Specific Rules -Additionally, the system supports mode-specific rules, which are loaded separately and have their own priority order: +The system also supports mode-specific rules with their own priority order: 1. First, it checks for `.kilocode/rules-${mode}/` directory 2. If that doesn't exist or is empty, it falls back to `.kilocoderules-${mode}` file (deprecated) -Currently, mode-specific rules are only supported at the project level. -When both generic rules and mode-specific rules exist, the mode-specific rules are given priority in the final output. +Mode-specific rules are only supported at the project level. When both generic and mode-specific rules exist, mode-specific rules take priority. + +{% /tab %} +{% tab label="VSCode & CLI" %} + +Rules are loaded in the order they appear in the `instructions` array in `kilo.json`: + +1. **Global instructions** from the global `kilo.json` config +2. **Project instructions** from the project's `kilo.json` + +Files matched by glob patterns are loaded in filesystem order. Project-level instructions take precedence over global instructions for conflicting directives. + +{% callout type="note" title="Backward Compatibility" %} +If `.kilocode/rules/` directories exist in your project, their contents are automatically included for backward compatibility. To fully migrate, move your rule files and reference them in `kilo.json`. +{% /callout %} + +{% /tab %} +{% /tabs %} ## Creating Custom Rules +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ### Using the UI Interface {% image src="/docs/img/custom-rules/rules-ui.png" alt="Rules tab in Kilo Code" width="400" /%} @@ -132,6 +278,47 @@ To create rules manually: Rules will be automatically applied to all future Kilo Code interactions. Any new changes will be applied immediately. +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +### Using the Settings UI or Config File + +1. Create a `kilo.json` file in your project root (if it doesn't exist) +2. Create a `.kilo/rules/` directory (or any directory you prefer) +3. Write your rule as a Markdown file in that directory +4. Add the file path or a glob pattern to the `instructions` array in `kilo.json` + +```jsonc +// kilo.json +{ + "instructions": [".kilo/rules/my-new-rule.md"], +} +``` + +Rules are applied on the next interaction. You can also edit `kilo.json` through the **Settings** webview in VS Code. + +{% /tab %} +{% tab label="CLI" %} + +### Using the Config File + +1. Create a `kilo.json` file in your project root (if it doesn't exist) +2. Create a `.kilo/rules/` directory (or any directory you prefer) +3. Write your rule as a Markdown file in that directory +4. Add the file path or a glob pattern to the `instructions` array in `kilo.json` + +```jsonc +// kilo.json +{ + "instructions": [".kilo/rules/my-new-rule.md"], +} +``` + +Rules are applied on the next interaction. + +{% /tab %} +{% /tabs %} + ## Example Rules ### Example 1: Table Formatting @@ -207,14 +394,30 @@ When working in team environments, placing `.kilocode/rules/codestyle.md` files If your custom rules aren't being properly followed: -1. **Check rule status in the UI**: Use the rules management interface to verify that your rules are active and properly loaded 1. **Verify rule formatting**: Ensure that your rules are properly formatted with clear Markdown structure -1. **Check rule locations**: Ensure that your rules are located in supported locations: - - Global rules: `~/.kilocode/rules/` directory - - Project rules: `.kilocode/rules/` directory - - Legacy files: `.kilocoderules`, `.roorules`, or `.clinerules` -1. **Rule specificity**: Verify that the rules are specific and unambiguous -1. **Restart VS Code**: Restart VS Code to ensure the rules are properly loaded +2. **Rule specificity**: Verify that the rules are specific and unambiguous +3. **Check rule locations**: + +{% tabs %} +{% tab label="VSCode (Legacy)" %} + +- **Check rule status in the UI**: Use the rules management interface to verify that your rules are active and properly loaded +- Ensure rules are in supported locations: + - Global rules: `~/.kilocode/rules/` directory + - Project rules: `.kilocode/rules/` directory + - Legacy files: `.kilocoderules`, `.roorules`, or `.clinerules` +- **Restart VS Code** to ensure the rules are properly loaded + +{% /tab %} +{% tab label="VSCode & CLI" %} + +- Verify that your `kilo.json` file is valid JSON (with comments) +- Ensure the `instructions` paths resolve to existing files +- Check that glob patterns match the intended files +- Run `kilo` to see if rules are loaded in the output + +{% /tab %} +{% /tabs %} ## Related Features diff --git a/packages/kilo-docs/pages/customize/custom-subagents.md b/packages/kilo-docs/pages/customize/custom-subagents.md index e97090c4a1e..7fa87c195af 100644 --- a/packages/kilo-docs/pages/customize/custom-subagents.md +++ b/packages/kilo-docs/pages/customize/custom-subagents.md @@ -1,6 +1,7 @@ --- title: "Custom Subagents" description: "Create and configure custom subagents in Kilo Code's CLI" +platform: new --- # Custom Subagents diff --git a/packages/kilo-docs/pages/customize/skills.md b/packages/kilo-docs/pages/customize/skills.md index 8f553d681ef..8d49fbb7e64 100644 --- a/packages/kilo-docs/pages/customize/skills.md +++ b/packages/kilo-docs/pages/customize/skills.md @@ -47,6 +47,9 @@ This means: Skills are loaded from multiple locations, allowing both personal skills and project-specific instructions. +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ### Global Skills (User-Level) Global skills are located in the `.kilocode` directory within your Home directory. @@ -84,9 +87,68 @@ your-project/ └── SKILL.md ``` +{% /tab %} +{% tab label="VSCode & CLI" %} + +### Global Skills (User-Level) + +Global skills are located in the `.kilo` directory within your Home directory: + +- Mac and Linux: `~/.kilo/skills/` +- Windows: `\Users\\.kilo\skills\` + +``` +~/.kilo/ +└── skills/ # Generic skills (all modes) + ├── my-skill/ + │ └── SKILL.md + └── another-skill/ + └── SKILL.md +``` + +### Project Skills (Workspace-Level) + +Located in `.kilo/skills/` within your project: + +``` +your-project/ +└── .kilo/ + └── skills/ # Generic skills for this project + └── project-conventions/ + └── SKILL.md +``` + +### Compatibility Directories + +For interoperability with other tools, the CLI also loads skills from: + +- `.claude/skills/` — Claude Code compatibility +- `.agents/skills/` — Open agent standard + +### Additional Skill Paths and Remote URLs + +You can configure extra skill locations and remote skill URLs in your `kilo.json` config (project or global): + +```jsonc +{ + "skills": { + "paths": ["/path/to/shared/skills"], + "urls": ["https://example.com/skills/my-skill/SKILL.md"], + }, +} +``` + +The `skills.paths` key accepts absolute paths to additional skill directories. The `skills.urls` key accepts URLs pointing to remote `SKILL.md` files that are fetched on demand. + +{% /tab %} +{% /tabs %} + ## Mode-Specific Skills -To create a skill that only appears in a specific mode: +{% tabs %} +{% tab label="VSCode (Legacy)" %} + +To create a skill that only appears in a specific mode, place it in a `skills-{mode-slug}` directory: ```bash # For Code mode only @@ -98,8 +160,21 @@ mkdir -p ~/.kilocode/skills-architect/microservices The directory naming pattern is `skills-{mode-slug}` where `{mode-slug}` matches the mode's identifier (e.g., `code`, `architect`, `ask`, `debug`). +{% /tab %} +{% tab label="VSCode & CLI" %} + +The new platform does not use mode-specific skill directories. All skills are loaded into a shared pool and the agent decides which skill to invoke based on the skill's `description` field and the current task context. + +If you need a skill to only apply in certain situations, write a clear and specific `description` in the SKILL.md frontmatter so the agent knows when to use it. + +{% /tab %} +{% /tabs %} + ## Priority and Overrides +{% tabs %} +{% tab label="VSCode (Legacy)" %} + When multiple skills share the same name, Kilo Code uses these priority rules: 1. **Project skills override global skills** - A project skill with the same name takes precedence @@ -111,8 +186,19 @@ This allows you to: - Override them per-project when needed - Customize behavior for specific modes +{% /tab %} +{% tab label="VSCode & CLI" %} + +When multiple skills share the same name, project-level skills (`.kilo/skills/`) take precedence over global skills (`~/.kilo/skills/`). Skills from compatibility directories (`.claude/skills/`, `.agents/skills/`) and additional configured paths are loaded alongside project and global skills. + +{% /tab %} +{% /tabs %} + ## When Skills Are Loaded +{% tabs %} +{% tab label="VSCode (Legacy)" %} + Skills are discovered when Kilo Code initializes: - When VSCode starts @@ -126,6 +212,19 @@ Skills directories are monitored for changes to `SKILL.md` files. However, the m You can symlink skills directories to share skills across machines or from a central repository. When using symlinks, the skill's `name` field must match the **symlink name**, not the target directory name. +{% /tab %} +{% tab label="VSCode & CLI" %} + +Skills are discovered when a session starts. The CLI scans all configured skill directories and reads metadata (name, description, file path) for each skill. + +- In the **CLI**: Skills are loaded when you start a new session or run `kilo run` +- In the **VS Code extension**: Skills are loaded when the extension connects to the CLI server + +Skills are re-scanned at the start of each new session. To pick up newly added or modified skills, start a new session. + +{% /tab %} +{% /tabs %} + ## SKILL.md Format The `SKILL.md` file uses YAML frontmatter followed by Markdown content containing the instructions: @@ -213,62 +312,101 @@ These additional files can be referenced from your skill's instructions, allowin ## Example: Creating a Skill +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. Create the skill directory: ```bash mkdir -p ~/.kilocode/skills/api-design ``` -2. Create `SKILL.md`: - - ```markdown - --- - name: api-design - description: REST API design best practices and conventions - --- - - # API Design Guidelines - - When designing REST APIs, follow these conventions: - - ## URL Structure - - - Use plural nouns for resources: `/users`, `/orders` - - Use kebab-case for multi-word resources: `/order-items` - - Nest related resources: `/users/{id}/orders` - - ## HTTP Methods - - - GET: Retrieve resources - - POST: Create new resources - - PUT: Replace entire resource - - PATCH: Partial update - - DELETE: Remove resource - - ## Response Codes - - - 200: Success - - 201: Created - - 400: Bad Request - - 404: Not Found - - 500: Server Error - ``` +2. Create `SKILL.md` (see content below) 3. Reload VSCode to load the skill 4. The skill will now be available in all modes +{% /tab %} +{% tab label="VSCode & CLI" %} + +1. Create the skill directory: + + ```bash + mkdir -p ~/.kilo/skills/api-design + ``` + +2. Create `SKILL.md` (see content below) + +3. Start a new session to pick up the skill + +{% /tab %} +{% /tabs %} + +Example `SKILL.md`: + +```markdown +--- +name: api-design +description: REST API design best practices and conventions +--- + +# API Design Guidelines + +When designing REST APIs, follow these conventions: + +## URL Structure + +- Use plural nouns for resources: `/users`, `/orders` +- Use kebab-case for multi-word resources: `/order-items` +- Nest related resources: `/users/{id}/orders` + +## HTTP Methods + +- GET: Retrieve resources +- POST: Create new resources +- PUT: Replace entire resource +- PATCH: Partial update +- DELETE: Remove resource + +## Response Codes + +- 200: Success +- 201: Created +- 400: Bad Request +- 404: Not Found +- 500: Server Error +``` + ## Finding Skills +{% tabs %} +{% tab label="VSCode (Legacy)" %} + You can discover and install community-created skills through: -- **Kilo Marketplace** - Browse skills directly in the Kilo Code extension via the Marketplace tab, or explore the [Kilo Marketplace repository](https://github.com/Kilo-Org/kilo-marketplace) on GitHub -- [Agent Skills Specification](https://agentskills.io/home) - The open specification that skills follow, enabling interoperability across different AI agents +- **Kilo Marketplace** — Browse skills directly in the Kilo Code extension via the Marketplace tab, or explore the [Kilo Marketplace repository](https://github.com/Kilo-Org/kilo-marketplace) on GitHub +- [Agent Skills Specification](https://agentskills.io/home) — The open specification that skills follow, enabling interoperability across different AI agents + +{% /tab %} +{% tab label="VSCode & CLI" %} + +The new platform does not have a marketplace UI yet. You can find and share skills through: + +- **[Kilo Marketplace repository](https://github.com/Kilo-Org/kilo-marketplace)** — Browse community skills on GitHub and manually download them into your skills directory +- **[Agent Skills Specification](https://agentskills.io/home)** — The open specification that skills follow, enabling interoperability across different AI agents +- **Remote URLs** — Use the `skills.urls` config key to load skills directly from URLs without manually downloading them + +{% /tab %} +{% /tabs %} ## Troubleshooting ### Skill Not Loading? +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Check the Output panel**: Open `View` → `Output` → Select "Kilo Code" from dropdown. Look for skill-related errors. 2. **Verify frontmatter**: Ensure `name` exactly matches the directory name and `description` is present. @@ -277,6 +415,20 @@ You can discover and install community-created skills through: 4. **Check file location**: Ensure `SKILL.md` is directly inside the skill directory, not nested further. +{% /tab %} +{% tab label="VSCode & CLI" %} + +1. **Verify frontmatter**: Ensure `name` exactly matches the directory name and `description` is present. + +2. **Start a new session**: Skills are scanned at session start. Begin a new session to pick up changes. + +3. **Check file location**: Ensure `SKILL.md` is directly inside the skill directory (e.g., `.kilo/skills/my-skill/SKILL.md`), not nested further. + +4. **Check config paths**: If using `skills.paths` or `skills.urls`, verify the paths and URLs are correct in your `kilo.json`. + +{% /tab %} +{% /tabs %} + ### Verifying a Skill is Available To confirm a skill is properly loaded and available to the agent, you can ask the agent directly. Simply send a message like: @@ -291,10 +443,21 @@ If the agent confirms the skill is available, you're ready to use it. If not, ch ### Checking if a Skill Was Used +{% tabs %} +{% tab label="VSCode (Legacy)" %} + To see if a skill was actually used during a conversation, look for a `read_file` tool call in the chat that targets a `SKILL.md` file. When the agent decides to use a skill, it reads the full skill file into context—this appears as a file read operation in the conversation. There's currently no dedicated UI indicator showing "Skill X was activated." The `read_file` call is the most reliable way to confirm a skill was used. +{% /tab %} +{% tab label="VSCode & CLI" %} + +When the agent uses a skill, it invokes the `skill` tool with the skill's name. Look for a `skill` tool call in the conversation to confirm a skill was loaded. The tool output includes the full skill content injected into context. + +{% /tab %} +{% /tabs %} + ### Common Errors | Error | Cause | Solution | @@ -307,6 +470,19 @@ There's currently no dedicated UI indicator showing "Skill X was activated." The Have you created a skill that others might find useful? Share it with the community by contributing to the [Kilo Marketplace](https://github.com/Kilo-Org/kilo-marketplace)! +{% tabs %} +{% tab label="VSCode (Legacy)" %} + +Skills submitted to the marketplace are browsable and installable directly from the Marketplace tab in the **VSCode** version. + +{% /tab %} +{% tab label="VSCode & CLI" %} + +While the new platform does not yet have a built-in marketplace UI, skills from the [Kilo Marketplace repository](https://github.com/Kilo-Org/kilo-marketplace) can be manually downloaded into your `.kilo/skills/` directory or loaded via `skills.urls` in config. + +{% /tab %} +{% /tabs %} + ### How to Submit Your Skill 1. **Prepare your skill**: Ensure your skill directory contains a valid `SKILL.md` file with proper frontmatter diff --git a/packages/kilo-docs/pages/customize/workflows.md b/packages/kilo-docs/pages/customize/workflows.md index c18a0030fb8..4b8fed926af 100644 --- a/packages/kilo-docs/pages/customize/workflows.md +++ b/packages/kilo-docs/pages/customize/workflows.md @@ -1,6 +1,7 @@ --- title: "Workflows" description: "Create automated workflows with Kilo Code" +platform: new --- # Workflows From 8304cf44dc082393f962ff30a5aa82fcb492584a Mon Sep 17 00:00:00 2001 From: Josh Lambert Date: Tue, 24 Mar 2026 05:29:32 -0400 Subject: [PATCH 07/81] docs(kilo-docs): add platform tabs to MCP and shell integration pages Add VSCode (Pre-release) and CLI tabs to 3 automate pages: - mcp/using-in-kilo-code.md: Tabbed config tables, CLI commands (including logout and debug), transport types, troubleshooting - extending/shell-integration.md: Platform-specific shell integration - automate/index.md: Fix stale link to deleted using-in-cli page MCP timeout correctly shown as 30000ms (verified against mcp/index.ts:29 DEFAULT_TIMEOUT = 30_000). Part of the docs platform tabs effort (PR 7 of 8). Depends on #7497 for infrastructure. --- packages/kilo-docs/lib/nav/automate.ts | 5 +- .../automate/extending/shell-integration.md | 77 +++++ packages/kilo-docs/pages/automate/index.md | 2 +- .../pages/automate/mcp/using-in-kilo-code.md | 319 +++++++++++++++--- 4 files changed, 362 insertions(+), 41 deletions(-) diff --git a/packages/kilo-docs/lib/nav/automate.ts b/packages/kilo-docs/lib/nav/automate.ts index e8ae1c02a8d..d4d9bb487e8 100644 --- a/packages/kilo-docs/lib/nav/automate.ts +++ b/packages/kilo-docs/lib/nav/automate.ts @@ -29,6 +29,7 @@ export const AutomateNav: NavSection[] = [ { href: "/automate/extending/auto-launch", children: "Auto-launch Configuration", + platform: "legacy", }, { href: "/automate/mcp/overview", @@ -53,8 +54,8 @@ export const AutomateNav: NavSection[] = [ { title: "Tools", links: [ - { href: "/automate/how-tools-work", children: "How Tools Work" }, - { href: "/automate/tools", children: "Tools Details" }, + { href: "/automate/how-tools-work", children: "How Tools Work", platform: "legacy" }, + { href: "/automate/tools", children: "Tools Details", platform: "legacy" }, ], }, ] diff --git a/packages/kilo-docs/pages/automate/extending/shell-integration.md b/packages/kilo-docs/pages/automate/extending/shell-integration.md index 5c7a88187ac..c88399a1f61 100644 --- a/packages/kilo-docs/pages/automate/extending/shell-integration.md +++ b/packages/kilo-docs/pages/automate/extending/shell-integration.md @@ -7,6 +7,9 @@ description: "Integrate Kilo Code with your shell environment" Terminal Shell Integration is a key feature that enables Kilo Code to execute commands in your terminal and intelligently process their output. This bidirectional communication between the AI and your development environment unlocks powerful automation capabilities. +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ## What is Shell Integration? Shell integration is automatically enabled in Kilo Code and connects directly to your terminal's command execution lifecycle without requiring any setup from you. This built-in feature allows Kilo Code to: @@ -340,6 +343,80 @@ The [VS Code Terminal Integration Test Extension](https://github.com/KJ7LNW/vsce - Note your environment (OS, VS Code version, shell, and any shell prompt customization) - Open an issue with these details to help improve shell integration +{% /tab %} +{% tab label="VSCode & CLI" %} + +## How Shell Execution Works + +The new CLI and extension take a fundamentally different approach to shell execution. Instead of relying on VS Code's terminal shell integration, the CLI spawns and manages shell processes directly using the `bash` tool. + +This means: + +- **No VS Code shell integration required** — the CLI handles shell execution independently +- **No shell integration setup or troubleshooting** — it works out of the box +- **Consistent behavior** across environments — the same shell execution logic runs whether you use the CLI directly or through the VS Code extension + +## The `bash` Tool + +The `bash` tool is the primary way the agent executes shell commands. It spawns a persistent shell session and runs commands within it. + +### Key Features + +- **Working directory control**: Use the `workdir` parameter to run commands in a specific directory, instead of `cd && ` patterns +- **Configurable timeout**: Set a per-command timeout in milliseconds (defaults to 2 minutes) +- **Real-time output streaming**: Command output is streamed back as it's produced +- **Process tree management**: The tool manages the full process tree, ensuring child processes are properly cleaned up + +### Security Analysis + +Commands are parsed using **Tree-sitter** before execution, enabling: + +- Path resolution to detect file access patterns +- External directory detection to flag commands that reach outside the project +- Structured analysis of command intent for safer auto-approval decisions + +### Shell Detection + +The CLI automatically detects the appropriate shell for your platform using `Shell.acceptable()`. This selects a compatible shell (bash, zsh, etc.) without requiring manual configuration. + +## Agent Manager Terminals (VS Code Extension) + +When using the Kilo Code VS Code extension with the Agent Manager, each agent session gets its own dedicated VS Code terminal. + +### Per-Session Terminals + +- Each session creates a terminal named **`Agent: {branch}`**, where `{branch}` is the git branch or worktree the session is working in +- The terminal's working directory is automatically set to the session's worktree directory +- Terminals are standard VS Code integrated terminals — you can interact with them directly + +### Keyboard Shortcuts + +| Shortcut | Action | +| --------------------------- | --------------------------------------- | +| Cmd+/ | Focus the session's terminal | +| Cmd+. | Return focus to the Agent Manager panel | + +### Terminal Context Menu Actions + +Right-click in an Agent Manager terminal to access these actions: + +- **Add Terminal Content to Context** — sends the terminal's visible output to the agent as context +- **Fix This Command** — asks the agent to diagnose and fix the last failed command +- **Explain This Command** — asks the agent to explain what a command does + +## Troubleshooting + +Shell execution in the new CLI is significantly simpler than the **VSCode** version's terminal integration. Most issues are resolved by ensuring: + +1. **A supported shell is installed**: bash or zsh on macOS/Linux, PowerShell on Windows +2. **The shell is on your PATH**: The CLI needs to find the shell binary +3. **File permissions are correct**: The CLI needs execute permission on the shell binary + +If commands fail to execute, check the CLI's log output for error details. The CLI logs the shell it detected and any errors during command execution. + +{% /tab %} +{% /tabs %} + ## Support If you've followed these steps and are still experiencing problems, please: diff --git a/packages/kilo-docs/pages/automate/index.md b/packages/kilo-docs/pages/automate/index.md index 453f0163c50..9616faf4a7e 100644 --- a/packages/kilo-docs/pages/automate/index.md +++ b/packages/kilo-docs/pages/automate/index.md @@ -36,7 +36,7 @@ Connect Kilo Code to external tools and services: - [**Using MCP in Kilo Code**](/docs/automate/mcp/using-in-kilo-code) — Configuration guide - [**STDIO & SSE Transports**](/docs/automate/mcp/server-transports) — Local and remote server options - [**MCP vs API**](/docs/automate/mcp/mcp-vs-api) — When to use MCP -- [**Using MCP in CLI**](/docs/automate/mcp/using-in-cli) — CLI-specific MCP setup +- [**Using MCP in Kilo Code**](/docs/automate/mcp/using-in-kilo-code) — Configure MCP servers ## Integrations diff --git a/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md b/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md index 43dd907c755..f0ef4d68a98 100644 --- a/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md +++ b/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md @@ -7,31 +7,46 @@ description: "How to use MCP servers in Kilo Code" Model Context Protocol (MCP) extends Kilo Code's capabilities by connecting to external tools and services. This guide covers everything you need to know about using MCP with Kilo Code. -{% youtube url="https://youtu.be/6O9RQoQRX8A" caption="Demostrating MCP installation in Kilo Code" /%} +{% youtube url="https://youtu.be/6O9RQoQRX8A" caption="Demonstrating MCP installation in Kilo Code" /%} ## Configuring MCP Servers -MCP server configurations can be managed at two levels: +MCP server configurations can be managed at two levels: **global** (applies across all workspaces) and **project-level** (specific to a single project). Project-level configuration takes precedence over global settings. -1. **Global Configuration**: Stored in the `mcp_settings.json` file, accessible via VS Code settings (see below). These settings apply across all your workspaces unless overridden by a project-level configuration. -2. **Project-level Configuration**: Defined in a `.kilocode/mcp.json` file within your project's root directory. This allows you to set up project-specific servers and share configurations with your team by committing the file to version control. Kilo Code automatically detects and loads this file if it exists. +{% tabs %} +{% tab label="VSCode (Legacy)" %} -**Precedence**: If a server name exists in both global and project configurations, the **project-level configuration takes precedence**. +| Scope | Path | Description | +| ----------- | -------------------- | --------------------------------------------------------------- | +| **Global** | `mcp_settings.json` | Accessible via VS Code settings. Applies across all workspaces. | +| **Project** | `.kilocode/mcp.json` | In your project root. Auto-detected by Kilo Code. | -### Editing MCP Settings Files +Project-level configs can be committed to version control to share with your team. -You can edit both global and project-level MCP configuration files directly from the Kilo Code settings. +{% /tab %} +{% tab label="VSCode" %} -1. Click the {% codicon name="gear" /%} icon in the top navigation of the Kilo Code pane to open `Settings`. -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. +In the VS Code extension, open **Settings → MCP** to add and manage MCP servers through the UI. Under the hood the extension reads the same config files as the CLI — see the **CLI** tab for file paths and format. -{% 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" /%} +{% /tab %} +{% tab label="CLI" %} -Both files use a JSON format with a `mcpServers` object containing named server configurations: +The CLI accepts several config filenames. The recommended file is `kilo.json`: + +| Scope | Recommended Path | Also supported | +| ----------- | ------------------------------------ | -------------------------------------------------------------- | +| **Global** | `~/.config/kilo/kilo.json` | `kilo.jsonc`, `opencode.json`, `opencode.jsonc`, `config.json` | +| **Project** | `./kilo.json` or `./.kilo/kilo.json` | `kilo.jsonc`, `opencode.jsonc`, `opencode.json` | + +{% /tab %} +{% /tabs %} + +## Configuration Format + +{% tabs %} +{% tab label="VSCode (Legacy)" %} + +Both global and project-level files use a JSON format with a `mcpServers` object containing named server configurations: ```json { @@ -51,6 +66,33 @@ Both files use a JSON format with a `mcpServers` object containing named server _Example of MCP Server config in Kilo Code (STDIO Transport)_ +{% /tab %} +{% tab label="VSCode" %} + +In the VS Code extension, open **Settings → MCP** and click **Add Server** to configure a new server through the UI. You can also edit the config files directly — see the **CLI** tab for the JSON format. + +{% /tab %} +{% tab label="CLI" %} + +Add MCP servers under the `mcp` key in your config file. Each server has a unique name that you can reference in prompts. + +```json +{ + "mcp": { + "my-server": { + "type": "local", + "command": ["npx", "-y", "my-mcp-command"], + "enabled": true + } + } +} +``` + +You can disable a server by setting `enabled` to `false` without removing it from your config. + +{% /tab %} +{% /tabs %} + ### Understanding Transport Types MCP supports three transport types for server communication: @@ -69,6 +111,9 @@ For more in-depth information about how STDIO transport works, see [STDIO Transp STDIO configuration example: +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ```json { "mcpServers": { @@ -85,6 +130,42 @@ STDIO configuration example: } ``` +{% /tab %} +{% tab label="VSCode" %} + +In the VS Code extension, open **Settings → MCP**, click **Add Server**, and choose **Local (stdio)**. Fill in the command, arguments, and optional environment variables through the UI. You can also edit the config files directly — see the **CLI** tab for the JSON format. + +{% /tab %} +{% tab label="CLI" %} + +```json +{ + "mcp": { + "my-local-server": { + "type": "local", + "command": ["npx", "-y", "my-mcp-command"], + "enabled": true, + "environment": { + "API_KEY": "your_api_key" + } + } + } +} +``` + +#### Local Server Options + +| Option | Type | Required | Description | +| ------------- | ------- | -------- | --------------------------------------------------------------------- | +| `type` | String | Yes | Must be `"local"`. | +| `command` | Array | Yes | Command and arguments to run the MCP server. | +| `environment` | Object | No | Environment variables to set when running the server. | +| `enabled` | Boolean | No | Enable or disable the MCP server on startup. | +| `timeout` | Number | No | Timeout in ms for fetching tools from the MCP server. Default: 30000. | + +{% /tab %} +{% /tabs %} + #### Streamable HTTP Transport Used for remote servers accessed over HTTP/HTTPS: @@ -94,7 +175,8 @@ Used for remote servers accessed over HTTP/HTTPS: - Requires network access - Allows centralized deployment and management -Streamable HTTP transport configuration example: +{% tabs %} +{% tab label="VSCode (Legacy)" %} ```json { @@ -112,7 +194,43 @@ Streamable HTTP transport configuration example: } ``` -#### SSE Transport +{% /tab %} +{% tab label="VSCode" %} + +In the VS Code extension, open **Settings → MCP**, click **Add Server**, and choose **Remote (HTTP)**. Enter the server URL and optional headers through the UI. You can also edit the config files directly — see the **CLI** tab for the JSON format. + +{% /tab %} +{% tab label="CLI" %} + +```json +{ + "mcp": { + "my-remote-server": { + "type": "remote", + "url": "https://my-mcp-server.com/mcp", + "enabled": true, + "headers": { + "Authorization": "Bearer MY_API_KEY" + } + } + } +} +``` + +#### Remote Server Options + +| Option | Type | Required | Description | +| --------- | ------- | -------- | --------------------------------------------------------------------- | +| `type` | String | Yes | Must be `"remote"`. | +| `url` | String | Yes | URL of the remote MCP server. | +| `enabled` | Boolean | No | Enable or disable the MCP server on startup. | +| `headers` | Object | No | HTTP headers to send with requests. | +| `timeout` | Number | No | Timeout in ms for fetching tools from the MCP server. Default: 30000. | + +{% /tab %} +{% /tabs %} + +### SSE Transport ⚠️ DEPRECATED: The SSE Transport has been deprecated as of MCP specification version 2025-03-26. Please use the HTTP Stream Transport instead, which implements the new Streamable HTTP transport specification. @@ -143,6 +261,24 @@ SSE configuration example: } ``` +## Managing MCP Servers + +{% tabs %} +{% tab label="VSCode (Legacy)" %} + +### Editing MCP Settings Files + +You can edit both global and project-level MCP configuration files directly from the Kilo Code settings. + +1. Click the {% codicon name="gear" /%} icon in the top navigation of the Kilo Code pane to open `Settings`. +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. + +{% 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" /%} + ### Deleting a Server 1. Press the {% codicon name="trash" /%} next to the MCP server you would like to delete @@ -178,41 +314,58 @@ MCP tool auto-approval works on a per-tool basis and is disabled by default. To When enabled, Kilo Code will automatically approve this specific tool without prompting. Note that the global "Use MCP servers" setting takes precedence - if it's disabled, no MCP tools will be auto-approved. -## Finding and Installing MCP Servers +{% /tab %} +{% tab label="VSCode" %} -Kilo Code does not come with any pre-installed MCP servers. You'll need to find and install them separately. +In the VS Code extension, manage MCP servers from **Settings → MCP**: -- **Community Repositories:** Check for community-maintained lists of MCP servers on GitHub -- **Ask Kilo Code:** You can ask Kilo Code to help you find or even create MCP servers -- **Build Your Own:** Create custom MCP servers using the SDK to extend Kilo Code with your own tools +- **Add a server**: Click **Add Server** and fill in the details +- **Enable/disable**: Toggle a server on or off without removing its configuration +- **Delete**: Remove a server from the list -For full SDK documentation, visit the [MCP GitHub repository](https://github.com/modelcontextprotocol/). +The extension also supports the `{env:VARIABLE_NAME}` syntax in config files to reference environment variables (see the **CLI** tab for details). -## Using MCP Tools in Your Workflow +{% /tab %} +{% tab label="CLI" %} -After configuring an MCP server, Kilo Code will automatically detect available tools and resources. To use them: +### CLI Commands -1. Type your request in the Kilo Code chat interface -2. Kilo Code will identify when an MCP tool can help with your task -3. Approve the tool use when prompted (or use auto-approval) +| Command | Description | +| ----------------- | ------------------------------- | +| `kilo mcp list` | List all configured MCP servers | +| `kilo mcp add` | Add an MCP server | +| `kilo mcp auth` | Authenticate with an MCP server | +| `kilo mcp logout` | Log out from an MCP server | +| `kilo mcp debug` | Debug an MCP server connection | -Example: "Analyze the performance of my API" might use an MCP tool that tests API endpoints. +Inside the interactive TUI, use the `/mcps` slash command to toggle MCP servers on or off. -## Troubleshooting MCP Servers +### Environment Variables -Common issues and solutions: +Use `{env:VARIABLE_NAME}` syntax in config files to reference environment variables: -- **Server Not Responding:** Check if the server process is running and verify network connectivity -- **Permission Errors:** Ensure proper API keys and credentials are configured in your `mcp_settings.json` (for global settings) or `.kilocode/mcp.json` (for project settings). -- **Tool Not Available:** Confirm the server is properly implementing the tool and it's not disabled in settings -- **Slow Performance:** Try adjusting the network timeout value for the specific MCP server +```json +{ + "mcp": { + "my-server": { + "type": "remote", + "url": "https://mcp.example.com/mcp", + "headers": { + "Authorization": "Bearer {env:MY_API_KEY}" + } + } + } +} +``` -{% callout type="tip" %} -**Reduce system prompt size:** If you're not using MCP, turn it off in Settings > Agent Behaviour > MCP Servers to significantly cut down the size of the system prompt and improve performance. -{% /callout %} +{% /tab %} +{% /tabs %} ## Platform-Specific MCP Configuration Examples +{% tabs %} +{% tab label="VSCode (Legacy)" %} + ### Windows Configuration Example When setting up MCP servers on Windows, you'll need to use the Windows Command Prompt (`cmd`) to execute commands. Here's an example of configuring a Puppeteer MCP server on Windows: @@ -253,3 +406,93 @@ For macOS or Linux, you would use a different configuration: {% /callout %} The same approach can be used for other MCP servers on Windows, adjusting the package name as needed for different server types. + +{% /tab %} +{% tab label="VSCode" %} + +In the VS Code extension, use **Settings → MCP → Add Server** to add any of the examples below through the UI. You can also edit the config files directly — see the **CLI** tab for the JSON format. + +{% /tab %} +{% tab label="CLI" %} + +### Figma Desktop + +Connect to the Figma Desktop app's MCP server: + +```json +{ + "mcp": { + "Figma Desktop": { + "type": "remote", + "url": "http://127.0.0.1:3845/mcp" + } + } +} +``` + +### Context7 + +Add the [Context7](https://github.com/upstash/context7) MCP server for documentation search: + +```json +{ + "mcp": { + "context7": { + "type": "remote", + "url": "https://mcp.context7.com/mcp" + } + } +} +``` + +### Everything Test Server + +Add the test MCP server for development: + +```json +{ + "mcp": { + "mcp_everything": { + "type": "local", + "command": ["npx", "-y", "@modelcontextprotocol/server-everything"] + } + } +} +``` + +{% /tab %} +{% /tabs %} + +## Finding and Installing MCP Servers + +Kilo Code does not come with any pre-installed MCP servers. You'll need to find and install them separately. + +- **Kilo Marketplace:** Browse community-contributed MCP server configurations and agent skills in the [Kilo Marketplace](https://github.com/Kilo-Org/kilo-marketplace). The marketplace includes ready-to-use configs for popular tools like Figma, Sentry, and more. +- **Community Repositories:** Check for community-maintained lists of MCP servers on GitHub +- **Ask Kilo Code:** You can ask Kilo Code to help you find or even create MCP servers +- **Build Your Own:** Create custom MCP servers using the SDK to extend Kilo Code with your own tools + +For full SDK documentation, visit the [MCP GitHub repository](https://github.com/modelcontextprotocol/). + +## Using MCP Tools in Your Workflow + +After configuring an MCP server, Kilo Code will automatically detect available tools and resources. To use them: + +1. Type your request in the Kilo Code chat interface +2. Kilo Code will identify when an MCP tool can help with your task +3. Approve the tool use when prompted (or use auto-approval) + +Example: "Analyze the performance of my API" might use an MCP tool that tests API endpoints. + +## Troubleshooting MCP Servers + +Common issues and solutions: + +- **Server Not Responding:** Check if the server process is running and verify network connectivity +- **Permission Errors:** Ensure proper API keys and credentials are configured in your `mcp_settings.json` (for global settings) or `.kilocode/mcp.json` (for project settings). +- **Tool Not Available:** Confirm the server is properly implementing the tool and it's not disabled in settings +- **Slow Performance:** Try adjusting the network timeout value for the specific MCP server + +{% callout type="tip" %} +**Reduce system prompt size:** If you're not using MCP, turn it off in Settings > Agent Behaviour > MCP Servers to significantly cut down the size of the system prompt and improve performance. +{% /callout %} From 6e602f4ad37f89e80ee8c08aa9e3ec7e0c846e1e Mon Sep 17 00:00:00 2001 From: Josh Lambert Date: Tue, 24 Mar 2026 05:35:14 -0400 Subject: [PATCH 08/81] docs(kilo-docs): add platform tabs to AI provider pages Add VSCode (Pre-release) and CLI tabs to all 30 AI provider pages: - index.md: Overview with platform-specific provider configuration - 29 individual provider pages: Each gets VSCode, Pre-release, and CLI configuration tabs with correct provider IDs and env vars Provider IDs verified against packages/opencode/src/provider/: - amazon-bedrock (not bedrock) - fireworks-ai (not fireworks) - chutes (not chutes-ai) - moonshotai (not moonshot) - vercel (not vercel-ai-gateway) Env vars verified: - AI_GATEWAY_API_KEY (not VERCEL_AI_GATEWAY_API_KEY) - OVHCLOUD_API_KEY (not OVH_AI_ENDPOINTS_ACCESS_TOKEN) - GOOGLE_CLOUD_LOCATION (not GOOGLE_CLOUD_REGION) - AICORE_SERVICE_KEY (not SAP_AI_CORE_*) Providers not available in CLI (glama, unbound) show warning callouts. Part of the docs platform tabs effort (PR 8 of 8). Depends on #7497 for infrastructure. --- .../kilo-docs/pages/ai-providers/anthropic.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/bedrock.md | 50 +++++++++++++++++ .../kilo-docs/pages/ai-providers/cerebras.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/chutes-ai.md | 44 +++++++++++++++ .../pages/ai-providers/claude-code.md | 49 +++++++++++++++++ .../kilo-docs/pages/ai-providers/deepseek.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/fireworks.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/gemini.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/glama.md | 20 +++++++ packages/kilo-docs/pages/ai-providers/groq.md | 54 ++++++++++++++----- .../kilo-docs/pages/ai-providers/inception.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/index.md | 6 +-- .../kilo-docs/pages/ai-providers/lmstudio.md | 38 +++++++++++++ .../kilo-docs/pages/ai-providers/minimax.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/mistral.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/moonshot.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/ollama.md | 38 +++++++++++++ .../ai-providers/openai-chatgpt-plus-pro.md | 40 ++++++++++++++ .../pages/ai-providers/openai-compatible.md | 45 ++++++++++++++++ .../kilo-docs/pages/ai-providers/openai.md | 44 +++++++++++++++ .../pages/ai-providers/openrouter.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/ovhcloud.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/requesty.md | 44 +++++++++++++++ .../pages/ai-providers/sap-ai-core.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/unbound.md | 20 +++++++ packages/kilo-docs/pages/ai-providers/v0.md | 45 ++++++++++++++++ .../pages/ai-providers/vercel-ai-gateway.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/vertex.md | 47 ++++++++++++++++ packages/kilo-docs/pages/ai-providers/xai.md | 44 +++++++++++++++ .../kilo-docs/pages/ai-providers/zenmux.md | 44 +++++++++++++++ 30 files changed, 1227 insertions(+), 17 deletions(-) diff --git a/packages/kilo-docs/pages/ai-providers/anthropic.md b/packages/kilo-docs/pages/ai-providers/anthropic.md index 80897edd3cc..767aed584cb 100644 --- a/packages/kilo-docs/pages/ai-providers/anthropic.md +++ b/packages/kilo-docs/pages/ai-providers/anthropic.md @@ -17,12 +17,56 @@ Anthropic is an AI safety and research company that builds reliable, interpretab ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Anthropic" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Anthropic API key into the "Anthropic API Key" field. 4. **Select Model:** Choose your desired Claude model from the "Model" dropdown. 5. **(Optional) Custom Base URL:** If you need to use a custom base URL for the Anthropic API, check "Use custom base URL" and enter the URL. Most people won't need to adjust this. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Anthropic and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export ANTHROPIC_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "anthropic": { + "env": ["ANTHROPIC_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "anthropic/claude-sonnet-4-20250514", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Prompt Caching:** Claude 3 models support [prompt caching](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching), which can significantly reduce costs and latency for repeated prompts. diff --git a/packages/kilo-docs/pages/ai-providers/bedrock.md b/packages/kilo-docs/pages/ai-providers/bedrock.md index ecdb8a6c86d..457955576e5 100644 --- a/packages/kilo-docs/pages/ai-providers/bedrock.md +++ b/packages/kilo-docs/pages/ai-providers/bedrock.md @@ -34,6 +34,9 @@ You have three options for configuring AWS credentials: ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Bedrock" from the "API Provider" dropdown. 3. **Select Authentication Method:** @@ -48,6 +51,53 @@ You have three options for configuring AWS credentials: 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. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add AWS Bedrock. The extension uses the AWS credentials chain for authentication — configure your AWS credentials using the AWS CLI or environment variables before adding the provider. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Bedrock uses the AWS credentials chain for authentication. Configure your AWS credentials using the AWS CLI or environment variables: + +**Environment variables:** + +```bash +export AWS_ACCESS_KEY_ID="your-access-key" +export AWS_SECRET_ACCESS_KEY="your-secret-key" +export AWS_REGION="us-east-1" +``` + +Or use an AWS profile: + +```bash +aws configure --profile bedrock +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "amazon-bedrock": {}, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "bedrock/anthropic.claude-sonnet-4-20250514-v1:0", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Permissions:** Ensure your IAM user or role has the necessary permissions to invoke Bedrock models. The `bedrock:InvokeModel` permission is required. diff --git a/packages/kilo-docs/pages/ai-providers/cerebras.md b/packages/kilo-docs/pages/ai-providers/cerebras.md index 7f965ece593..24c19bdc421 100644 --- a/packages/kilo-docs/pages/ai-providers/cerebras.md +++ b/packages/kilo-docs/pages/ai-providers/cerebras.md @@ -17,11 +17,55 @@ Cerebras is known for their ultra-fast AI inference powered by the Cerebras CS-3 ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Cerebras" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Cerebras API key into the "Cerebras API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Cerebras and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export CEREBRAS_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "cerebras": { + "env": ["CEREBRAS_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "cerebras/llama-4-scout-17b-16e-instruct", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Inference Speed:** Cerebras models deliver some of the fastest inference speeds available, reducing wait times during development. diff --git a/packages/kilo-docs/pages/ai-providers/chutes-ai.md b/packages/kilo-docs/pages/ai-providers/chutes-ai.md index d0a4a14f62f..b72af388f2a 100644 --- a/packages/kilo-docs/pages/ai-providers/chutes-ai.md +++ b/packages/kilo-docs/pages/ai-providers/chutes-ai.md @@ -20,11 +20,55 @@ Always refer to the official Chutes AI documentation or your dashboard for the m ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Chutes AI" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Chutes AI API key into the "Chutes AI API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Chutes AI and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export CHUTES_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "chutes": { + "env": ["CHUTES_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "chutes-ai/model-name", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Free Access:** Chutes AI provides free API access, making it an excellent option for experimentation and development without immediate costs. diff --git a/packages/kilo-docs/pages/ai-providers/claude-code.md b/packages/kilo-docs/pages/ai-providers/claude-code.md index 7cd5136a435..699a4af7f95 100644 --- a/packages/kilo-docs/pages/ai-providers/claude-code.md +++ b/packages/kilo-docs/pages/ai-providers/claude-code.md @@ -34,11 +34,60 @@ The specific models available depend on your Claude subscription and plan. See [ ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Claude Code" from the "API Provider" dropdown. 3. **Select Model:** Choose your desired Claude model from the "Model" dropdown. 4. **(Optional) Custom CLI Path:** If you installed Claude Code to a location other than the default `claude` command, enter the full path to your Claude executable in the "Claude Code Path" field. Most users won't need to change this. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab. Claude Code uses your existing Anthropic credentials from the `claude` CLI — make sure it is installed and authenticated before adding the provider. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Claude Code uses your existing Anthropic credentials (from the `claude` CLI). Make sure the Claude Code CLI is installed and authenticated: + +```bash +claude --version +claude auth login +``` + +If you have an `ANTHROPIC_API_KEY` environment variable set, the Claude CLI will use it automatically: + +```bash +export ANTHROPIC_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "anthropic": { + "env": ["ANTHROPIC_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "anthropic/claude-sonnet-4-20250514", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **No API Keys Required:** Claude Code uses your existing CLI authentication, so you don't need to manage separate API keys. diff --git a/packages/kilo-docs/pages/ai-providers/deepseek.md b/packages/kilo-docs/pages/ai-providers/deepseek.md index dea4ad27bf8..d70c070f3e8 100644 --- a/packages/kilo-docs/pages/ai-providers/deepseek.md +++ b/packages/kilo-docs/pages/ai-providers/deepseek.md @@ -17,11 +17,55 @@ Kilo Code supports accessing models through the DeepSeek API, including `deepsee ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "DeepSeek" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your DeepSeek API key into the "DeepSeek API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add DeepSeek and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export DEEPSEEK_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "deepseek": { + "env": ["DEEPSEEK_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "deepseek/deepseek-chat", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Pricing:** Refer to the [DeepSeek Pricing](https://api-docs.deepseek.com/quick_start/pricing/) page for details on model costs. diff --git a/packages/kilo-docs/pages/ai-providers/fireworks.md b/packages/kilo-docs/pages/ai-providers/fireworks.md index d89a0796df6..18f08ad7911 100644 --- a/packages/kilo-docs/pages/ai-providers/fireworks.md +++ b/packages/kilo-docs/pages/ai-providers/fireworks.md @@ -17,11 +17,55 @@ Fireworks AI is a high-performance platform for running AI models that offers fa ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Fireworks AI" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Fireworks AI API key into the "Fireworks AI API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Fireworks AI and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export FIREWORKS_AI_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "fireworks-ai": { + "env": ["FIREWORKS_AI_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "fireworks/accounts/fireworks/models/llama4-scout-instruct-basic", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Performance:** Fireworks AI is optimized for speed and offers excellent performance for both chat and completion tasks. diff --git a/packages/kilo-docs/pages/ai-providers/gemini.md b/packages/kilo-docs/pages/ai-providers/gemini.md index 4914f9ea7b6..3a0ffe09eec 100644 --- a/packages/kilo-docs/pages/ai-providers/gemini.md +++ b/packages/kilo-docs/pages/ai-providers/gemini.md @@ -17,11 +17,55 @@ Kilo Code supports Google's Gemini family of models through the Google AI Gemini ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Google Gemini" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Gemini API key into the "Gemini API Key" field. 4. **Select Model:** Choose your desired Gemini model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Google Gemini and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export GOOGLE_GENERATIVE_AI_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "google": { + "env": ["GOOGLE_GENERATIVE_AI_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "google/gemini-2.5-pro", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Pricing:** Gemini API usage is priced based on input and output tokens. Refer to the [Gemini pricing page](https://ai.google.dev/pricing) for detailed information. diff --git a/packages/kilo-docs/pages/ai-providers/glama.md b/packages/kilo-docs/pages/ai-providers/glama.md index bc50910b431..fb000fc64bb 100644 --- a/packages/kilo-docs/pages/ai-providers/glama.md +++ b/packages/kilo-docs/pages/ai-providers/glama.md @@ -26,11 +26,31 @@ Refer to the [Glama documentation](https://glama.ai/models) for the most up-to-d ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Glama" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Glama API key into the "Glama API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Glama and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +{% callout type="warning" %} +Glama is not yet available as a CLI provider. Check the [Kilo Code releases](https://github.com/Kilo-Org/kilocode/releases) for updates on provider support. +{% /callout %} + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Pricing:** Glama operates on a pay-per-use basis. Pricing varies depending on the model you choose. diff --git a/packages/kilo-docs/pages/ai-providers/groq.md b/packages/kilo-docs/pages/ai-providers/groq.md index 77bb3efadbc..58fcf4f1657 100644 --- a/packages/kilo-docs/pages/ai-providers/groq.md +++ b/packages/kilo-docs/pages/ai-providers/groq.md @@ -20,17 +20,54 @@ Kilo Code will attempt to fetch the list of available models from the Groq API. ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Groq" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Groq API key into the "Groq API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. -## Tips and Notes +{% /tab %} +{% tab label="VSCode" %} -- **High-Speed Inference:** Groq's LPUs provide exceptionally fast response times, making it ideal for interactive development workflows. -- **Token Limits:** Some models have specific `max_tokens` limits that are automatically handled by Kilo Code (e.g., the `moonshotai/kimi-k2-instruct` model). -- **Cost Efficiency:** Groq often provides competitive pricing for high-speed inference compared to other providers. -- **Model Selection:** Choose models based on your specific needs - larger models like `llama3-70b-8192` for complex reasoning tasks, or smaller models like `llama3-8b-8192` for faster, simpler operations. +Open **Settings** (gear icon) and go to the **Providers** tab to add Groq and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export GROQ_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "groq": { + "env": ["GROQ_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "groq/llama-3.3-70b-versatile", +} +``` + +{% /tab %} +{% /tabs %} ## Supported Models @@ -46,13 +83,6 @@ Kilo Code supports the following models through Groq: **Note:** Model availability may change. Refer to the [Groq documentation](https://console.groq.com/docs/models) for the latest model list and specifications. -## Configuration in Kilo Code - -1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. -2. **Select Provider:** Choose "Groq" from the "API Provider" dropdown. -3. **Enter API Key:** Paste your Groq API key into the "Groq API Key" field. -4. **Select Model:** Choose your desired model from the "Model" dropdown. - ## Model-Specific Features ### Kimi K2 Model diff --git a/packages/kilo-docs/pages/ai-providers/inception.md b/packages/kilo-docs/pages/ai-providers/inception.md index 6a8f302e391..8431a37fc6f 100644 --- a/packages/kilo-docs/pages/ai-providers/inception.md +++ b/packages/kilo-docs/pages/ai-providers/inception.md @@ -23,11 +23,55 @@ Refer to Inception's current website and developer documentation for the most up ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Inception" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Inception API key into the "Inception API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Inception and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export INCEPTION_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "inception": { + "env": ["INCEPTION_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "inception/mercury-coder-small-beta", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Enterprise Focus:** Inception is designed for production-grade AI applications with emphasis on reliability and consistency. diff --git a/packages/kilo-docs/pages/ai-providers/index.md b/packages/kilo-docs/pages/ai-providers/index.md index 4f75c4e985a..6981043e579 100644 --- a/packages/kilo-docs/pages/ai-providers/index.md +++ b/packages/kilo-docs/pages/ai-providers/index.md @@ -58,11 +58,7 @@ Route requests through unified APIs with additional features: - **Regional** - Better latency in certain locations {% callout type="note" %} -All API keys use VS Code's Secret Storage—never stored in plain text. -{% /callout %} - -{% callout type="warning" title="Time-to-first-byte timeout" %} -For all providers, there is a **five-minute timeout** on time to first token. This means if a provider does not begin streaming a response within five minutes of the request being sent, the request will be cancelled. This is a constraint of the Bun runtime and cannot be easily configured. +In the **VSCode (Legacy)** version, API keys use VS Code's Secret Storage. In the current **VSCode & CLI** version, keys are set via environment variables or referenced in `kilo.json` config files. See individual provider pages for setup instructions for each platform. {% /callout %} ## Next Steps diff --git a/packages/kilo-docs/pages/ai-providers/lmstudio.md b/packages/kilo-docs/pages/ai-providers/lmstudio.md index 13efa7b8361..e22058308b2 100644 --- a/packages/kilo-docs/pages/ai-providers/lmstudio.md +++ b/packages/kilo-docs/pages/ai-providers/lmstudio.md @@ -27,12 +27,50 @@ Kilo Code supports running models locally using LM Studio. LM Studio provides a ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "LM Studio" from the "API Provider" dropdown. 3. **Enter Model ID:** Enter the _file name_ of the model you loaded in LM Studio (e.g., `codellama-7b.Q4_0.gguf`). You can find this in the LM Studio "Local Server" tab. 4. **(Optional) Base URL:** By default, Kilo Code will connect to LM Studio at `http://localhost:1234`. If you've configured LM Studio to use a different address or port, enter the full URL here. 5. **(Optional) Timeout:** By default, API requests time out after 10 minutes. Local models can be slow, if you hit this timeout you can consider increasing it here: VS Code Extensions panel > Kilo Code gear menu > Settings > API Request Timeout. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add LM Studio. No API key is needed since LM Studio runs locally. You can configure the base URL if LM Studio is running on a different host or port. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +LM Studio runs locally, so no API key is needed. Configure the base URL if LM Studio is running on a different host or port: + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "lmstudio": { + "baseURL": "http://localhost:1234/v1", + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "lmstudio/codellama-7b", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Resource Requirements:** Running large language models locally can be resource-intensive. Make sure your computer meets the minimum requirements for the model you choose. diff --git a/packages/kilo-docs/pages/ai-providers/minimax.md b/packages/kilo-docs/pages/ai-providers/minimax.md index 4c6fd6adc5b..4f36072519f 100644 --- a/packages/kilo-docs/pages/ai-providers/minimax.md +++ b/packages/kilo-docs/pages/ai-providers/minimax.md @@ -17,11 +17,55 @@ MiniMax is a global AI foundation model company focused on fast, cost-efficient ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Navigate to **Providers**. Choose **MiniMax** from the API Provider dropdown. 3. **Enter API Key:** Paste your MiniMax API key into the MiniMax API Key field. 4. **Select Model:** Choose your desired MiniMax model from the Model dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add MiniMax and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export MINIMAX_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "minimax": { + "env": ["MINIMAX_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "minimax/MiniMax-M1", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Performance:** MiniMax M2.1 emphasizes fast inference, strong coding ability, and exceptional tool-calling performance. diff --git a/packages/kilo-docs/pages/ai-providers/mistral.md b/packages/kilo-docs/pages/ai-providers/mistral.md index 8a902adb401..e1ce39948b2 100644 --- a/packages/kilo-docs/pages/ai-providers/mistral.md +++ b/packages/kilo-docs/pages/ai-providers/mistral.md @@ -17,11 +17,55 @@ Kilo Code supports accessing models through the Mistral AI API, including both s ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Mistral" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Mistral API key into the "Mistral API Key" field if you're using a `mistral` model. If you intend to use `codestral-latest`, see the "Codestral" section below. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Mistral and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export MISTRAL_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "mistral": { + "env": ["MISTRAL_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "mistral/mistral-large-latest", +} +``` + +{% /tab %} +{% /tabs %} + ## Using Codestral [Codestral](https://docs.mistral.ai/capabilities/code_generation/) is a model specifically designed for code generation and interaction. diff --git a/packages/kilo-docs/pages/ai-providers/moonshot.md b/packages/kilo-docs/pages/ai-providers/moonshot.md index 44ee85619a1..c1b97cfe8d6 100644 --- a/packages/kilo-docs/pages/ai-providers/moonshot.md +++ b/packages/kilo-docs/pages/ai-providers/moonshot.md @@ -17,11 +17,55 @@ Moonshot.ai is a Chinese AI company known for their **Kimi** models featuring ul ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Moonshot.ai" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Moonshot.ai API key into the "Moonshot.ai API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Moonshot.ai and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export MOONSHOT_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "moonshotai": { + "env": ["MOONSHOT_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "moonshot/moonshot-v1-auto", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Ultra-Long Context:** Kimi models excel at handling large codebases and complex projects with their extended context windows. diff --git a/packages/kilo-docs/pages/ai-providers/ollama.md b/packages/kilo-docs/pages/ai-providers/ollama.md index d50417072ca..33f8199e24e 100644 --- a/packages/kilo-docs/pages/ai-providers/ollama.md +++ b/packages/kilo-docs/pages/ai-providers/ollama.md @@ -72,12 +72,50 @@ By default, API requests time out after 10 minutes. Local models can be slow, if ### Configure Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + - Open the Kilo Code panel ({% kiloCodeIcon size="1em" /%}). - Click the Settings gear icon ({% codicon name="gear" /%}). - Select "Ollama" as the API Provider. - Select the model configured in the previous step. - (Optional) You can configure the base URL if you're running Ollama on a different machine. The default is `http://localhost:11434`. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Ollama. No API key is needed since Ollama runs locally. You can configure the base URL if Ollama is running on a different host. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Ollama runs locally, so no API key is needed. Configure the base URL if Ollama is running on a different host: + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "ollama": { + "baseURL": "http://localhost:11434/v1", + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "ollama/qwen3-coder:30b", +} +``` + +{% /tab %} +{% /tabs %} + ## Further Reading Refer to the [Ollama documentation](https://ollama.com/docs) for more information on installing, configuring and using Ollama. diff --git a/packages/kilo-docs/pages/ai-providers/openai-chatgpt-plus-pro.md b/packages/kilo-docs/pages/ai-providers/openai-chatgpt-plus-pro.md index 2e2105f8367..4f24ddc2908 100644 --- a/packages/kilo-docs/pages/ai-providers/openai-chatgpt-plus-pro.md +++ b/packages/kilo-docs/pages/ai-providers/openai-chatgpt-plus-pro.md @@ -4,6 +4,9 @@ sidebar_label: ChatGPT Plus/Pro # Using ChatGPT Subscriptions With Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. Open Kilo Code settings (click the gear icon {% codicon name="gear" /%} in the Kilo Code panel). 2. In **API Provider**, select **OpenAI – ChatGPT Plus/Pro**. 3. Click **Sign in to OpenAI Codex**. @@ -11,6 +14,43 @@ sidebar_label: ChatGPT Plus/Pro 5. Back in Kilo Code settings, pick a model from the dropdown. 6. Save. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab. ChatGPT Plus/Pro uses OAuth authentication — follow the sign-in flow to connect your ChatGPT subscription. + +{% /tab %} +{% tab label="CLI" %} + +ChatGPT Plus/Pro uses OAuth authentication, which is only available in the VS Code extension. For the CLI, use the [OpenAI API provider](/docs/ai-providers/openai) with an API key instead: + +```bash +export OPENAI_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "openai": { + "env": ["OPENAI_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "openai/gpt-4.1", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Subscription Required:** You need an active ChatGPT Plus or Pro subscription. This provider won't work with free ChatGPT accounts. See [OpenAI's ChatGPT plans](https://openai.com/chatgpt/pricing) for more information. diff --git a/packages/kilo-docs/pages/ai-providers/openai-compatible.md b/packages/kilo-docs/pages/ai-providers/openai-compatible.md index f550cbab7cb..5e373573752 100644 --- a/packages/kilo-docs/pages/ai-providers/openai-compatible.md +++ b/packages/kilo-docs/pages/ai-providers/openai-compatible.md @@ -14,6 +14,9 @@ This document focuses on setting up providers _other than_ the official OpenAI A ## General Configuration +{% tabs %} +{% tab label="VSCode (Legacy)" %} + The key to using an OpenAI-compatible provider is to configure two main settings: 1. **Base URL:** This is the API endpoint for the provider. It will _not_ be `https://api.openai.com/v1` (that's for the official OpenAI API). @@ -34,6 +37,48 @@ You'll find these settings in the Kilo Code settings panel (click the {% codicon - Input Price - Output Price +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add an OpenAI Compatible provider. Enter your API key and the provider's base URL. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key and base URL as environment variables or configure them in your `kilo.json` config file: + +**Environment variable:** + +```bash +export OPENAI_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "openai-compatible": { + "env": ["OPENAI_API_KEY"], + "baseURL": "https://api.your-provider.com/v1", + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "openai-compatible/model-name", +} +``` + +{% /tab %} +{% /tabs %} + ### Full Endpoint URL Support Kilo Code supports full endpoint URLs in the Base URL field, providing greater flexibility for provider configuration: diff --git a/packages/kilo-docs/pages/ai-providers/openai.md b/packages/kilo-docs/pages/ai-providers/openai.md index 73dbb8904c7..4c5a379b539 100644 --- a/packages/kilo-docs/pages/ai-providers/openai.md +++ b/packages/kilo-docs/pages/ai-providers/openai.md @@ -17,11 +17,55 @@ Kilo Code supports accessing models directly through the official OpenAI API. ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "OpenAI" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your OpenAI API key into the "OpenAI API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add OpenAI and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export OPENAI_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "openai": { + "env": ["OPENAI_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "openai/gpt-4.1", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Pricing:** Refer to the [OpenAI Pricing](https://openai.com/pricing) page for details on model costs. diff --git a/packages/kilo-docs/pages/ai-providers/openrouter.md b/packages/kilo-docs/pages/ai-providers/openrouter.md index 84019fa69e9..bdcbbf1a528 100644 --- a/packages/kilo-docs/pages/ai-providers/openrouter.md +++ b/packages/kilo-docs/pages/ai-providers/openrouter.md @@ -16,12 +16,56 @@ OpenRouter is an AI platform that provides access to a wide variety of language ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "OpenRouter" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your OpenRouter API key into the "OpenRouter API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. 5. **(Optional) Custom Base URL:** If you need to use a custom base URL for the OpenRouter API, check "Use custom base URL" and enter the URL. Leave this blank for most users. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add OpenRouter and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export OPENROUTER_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "openrouter": { + "env": ["OPENROUTER_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "openrouter/anthropic/claude-sonnet-4-20250514", +} +``` + +{% /tab %} +{% /tabs %} + ## Supported Transforms OpenRouter provides an [optional "middle-out" message transform](https://openrouter.ai/docs/features/message-transforms) to help with prompts that exceed the maximum context size of a model. You can enable it by checking the "Compress prompts and message chains to the context size" box. diff --git a/packages/kilo-docs/pages/ai-providers/ovhcloud.md b/packages/kilo-docs/pages/ai-providers/ovhcloud.md index 344cb130e9b..7b9890a2598 100644 --- a/packages/kilo-docs/pages/ai-providers/ovhcloud.md +++ b/packages/kilo-docs/pages/ai-providers/ovhcloud.md @@ -24,7 +24,51 @@ You can report any bugs or feedbacks by chatting with us in our [Discord server] ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "OVHcloud AI Endpoints" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your AI Endpoints API key into the "OVHcloud AI Endpoints API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. + +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add OVHcloud AI Endpoints and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export OVHCLOUD_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "ovhcloud": { + "env": ["OVHCLOUD_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "ovhcloud/model-name", +} +``` + +{% /tab %} +{% /tabs %} diff --git a/packages/kilo-docs/pages/ai-providers/requesty.md b/packages/kilo-docs/pages/ai-providers/requesty.md index 6fc4a656d9a..fda3c5796e3 100644 --- a/packages/kilo-docs/pages/ai-providers/requesty.md +++ b/packages/kilo-docs/pages/ai-providers/requesty.md @@ -15,11 +15,55 @@ Kilo Code supports accessing models through the [Requesty](https://www.requesty. ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Requesty" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Requesty API key into the "Requesty API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Requesty and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export REQUESTY_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "requesty": { + "env": ["REQUESTY_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "requesty/anthropic/claude-sonnet-4-20250514", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Optimizations**: Requesty offers range of in-flight cost optimizations to lower your costs. diff --git a/packages/kilo-docs/pages/ai-providers/sap-ai-core.md b/packages/kilo-docs/pages/ai-providers/sap-ai-core.md index 6c110a58cc8..16dfec8bbdf 100644 --- a/packages/kilo-docs/pages/ai-providers/sap-ai-core.md +++ b/packages/kilo-docs/pages/ai-providers/sap-ai-core.md @@ -77,6 +77,9 @@ The exact list of available models depends on your SAP AI Core configuration and ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 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:** @@ -91,6 +94,47 @@ The exact list of available models depends on your SAP AI Core configuration and 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 +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add SAP AI Core. Enter your OAuth2 client credentials (Client ID, Client Secret, Base URL, and Auth URL) in the provider settings. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +SAP AI Core uses OAuth2 client credentials for authentication. Set the credentials as environment variables or in your config file: + +**Environment variables:** + +```bash +export AICORE_SERVICE_KEY='{"your": "service-key-json"}' +export AICORE_DEPLOYMENT_ID="your-deployment-id" +export AICORE_RESOURCE_GROUP="your-resource-group" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "sap-ai-core": {}, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "sap-ai-core/model-name", +} +``` + +{% /tab %} +{% /tabs %} + ## Deployments (Foundation Models Mode) When using Foundation Models mode: diff --git a/packages/kilo-docs/pages/ai-providers/unbound.md b/packages/kilo-docs/pages/ai-providers/unbound.md index 11e061a91ab..fd7f6fb6e27 100644 --- a/packages/kilo-docs/pages/ai-providers/unbound.md +++ b/packages/kilo-docs/pages/ai-providers/unbound.md @@ -20,11 +20,31 @@ Unbound allows you configure a list of supported models in your application, and ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Unbound" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Unbound API key into the "Unbound API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Unbound and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +{% callout type="warning" %} +Unbound is not yet available as a CLI provider. Check the [Kilo Code releases](https://github.com/Kilo-Org/kilocode/releases) for updates on provider support. +{% /callout %} + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Security Focus:** Unbound emphasizes security features for enterprise use. If your organization has strict security requirements for AI usage, Unbound might be a good option. diff --git a/packages/kilo-docs/pages/ai-providers/v0.md b/packages/kilo-docs/pages/ai-providers/v0.md index 5d8d0280bc3..2ba2ba4ac67 100644 --- a/packages/kilo-docs/pages/ai-providers/v0.md +++ b/packages/kilo-docs/pages/ai-providers/v0.md @@ -15,6 +15,9 @@ To use v0 with Kilo Code, you'll need: ## Configuration +{% tabs %} +{% tab label="VSCode (Legacy)" %} + Setting up v0 in Kilo Code is straightforward: 1. In Kilo Code settings (click the {% codicon name="gear" /%} icon): @@ -26,6 +29,48 @@ Setting up v0 in Kilo Code is straightforward: +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add an OpenAI Compatible provider. Set the base URL to `https://api.v0.dev/v1` and enter your v0 API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +v0 uses the OpenAI-compatible provider. Set the API key and base URL in your config: + +**Environment variable:** + +```bash +export OPENAI_API_KEY="your-v0-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "openai-compatible": { + "env": ["OPENAI_API_KEY"], + "baseURL": "https://api.v0.dev/v1", + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "openai-compatible/v0-1.0-md", +} +``` + +{% /tab %} +{% /tabs %} + ## Troubleshooting - **"Invalid API Key":** Double-check that you've entered the API key correctly. diff --git a/packages/kilo-docs/pages/ai-providers/vercel-ai-gateway.md b/packages/kilo-docs/pages/ai-providers/vercel-ai-gateway.md index 3147a1ac9a2..aba308e59e3 100644 --- a/packages/kilo-docs/pages/ai-providers/vercel-ai-gateway.md +++ b/packages/kilo-docs/pages/ai-providers/vercel-ai-gateway.md @@ -54,11 +54,55 @@ Check the model description in the dropdown for specific capabilities. ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "Vercel AI Gateway" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your Vercel AI Gateway API key into the "Vercel AI Gateway API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add Vercel AI Gateway and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export AI_GATEWAY_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "vercel": { + "env": ["AI_GATEWAY_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "vercel-ai-gateway/anthropic/claude-sonnet-4", +} +``` + +{% /tab %} +{% /tabs %} + --- ## Prompt Caching diff --git a/packages/kilo-docs/pages/ai-providers/vertex.md b/packages/kilo-docs/pages/ai-providers/vertex.md index 994a84b7b31..abbb56da3b8 100644 --- a/packages/kilo-docs/pages/ai-providers/vertex.md +++ b/packages/kilo-docs/pages/ai-providers/vertex.md @@ -20,6 +20,9 @@ Kilo Code supports accessing models through Google Cloud Platform's Vertex AI, a ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "GCP Vertex AI" from the "API Provider" dropdown. 3. **Configure Authentication:** @@ -31,6 +34,50 @@ Kilo Code supports accessing models through Google Cloud Platform's Vertex AI, a 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. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add GCP Vertex AI. The extension uses Google Application Default Credentials (ADC) for authentication — run `gcloud auth application-default login` before adding the provider. Set your project ID and region in the provider settings. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Vertex AI uses Google Application Default Credentials (ADC) for authentication. Set up ADC using the Google Cloud CLI: + +```bash +gcloud auth application-default login +``` + +Set your project and region as environment variables: + +```bash +export GOOGLE_CLOUD_PROJECT="your-project-id" +export GOOGLE_CLOUD_LOCATION="us-east5" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "google-vertex": {}, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "google-vertex/claude-sonnet-4@20250514", +} +``` + +{% /tab %} +{% /tabs %} + ## Tips and Notes - **Permissions:** Ensure your Google Cloud account has the necessary permissions to access Vertex AI and the specific models you want to use. diff --git a/packages/kilo-docs/pages/ai-providers/xai.md b/packages/kilo-docs/pages/ai-providers/xai.md index 309bd4f0c35..5435c6c7ecd 100644 --- a/packages/kilo-docs/pages/ai-providers/xai.md +++ b/packages/kilo-docs/pages/ai-providers/xai.md @@ -17,11 +17,55 @@ xAI is the company behind Grok, a large language model known for its conversatio ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon ({% codicon name="gear" /%}) in the Kilo Code panel. 2. **Select Provider:** Choose "xAI" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your xAI API key into the "xAI API Key" field. 4. **Select Model:** Choose your desired Grok model from the "Model" dropdown. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add xAI and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export XAI_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "xai": { + "env": ["XAI_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "xai/grok-3", +} +``` + +{% /tab %} +{% /tabs %} + ## Reasoning Capabilities Some models feature specialized reasoning capabilities, allowing them to "think before responding" - particularly useful for complex problem-solving tasks. diff --git a/packages/kilo-docs/pages/ai-providers/zenmux.md b/packages/kilo-docs/pages/ai-providers/zenmux.md index 1e646d1b258..de7985830eb 100644 --- a/packages/kilo-docs/pages/ai-providers/zenmux.md +++ b/packages/kilo-docs/pages/ai-providers/zenmux.md @@ -16,12 +16,56 @@ import Codicon from "@site/src/components/Codicon"; ## Configuration in Kilo Code +{% tabs %} +{% tab label="VSCode (Legacy)" %} + 1. **Open Kilo Code Settings:** Click the gear icon () in the Kilo Code panel. 2. **Select Provider:** Choose "ZenMux" from the "API Provider" dropdown. 3. **Enter API Key:** Paste your ZenMux API key into the "ZenMux API Key" field. 4. **Select Model:** Choose your desired model from the "Model" dropdown. 5. **(Optional) Custom Base URL:** If you need to use a custom base URL for the ZenMux API, check "Use custom base URL" and enter the URL. Leave this blank for most users. +{% /tab %} +{% tab label="VSCode" %} + +Open **Settings** (gear icon) and go to the **Providers** tab to add ZenMux and enter your API key. + +The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. + +{% /tab %} +{% tab label="CLI" %} + +Set the API key as an environment variable or configure it in your `kilo.json` config file: + +**Environment variable:** + +```bash +export ZENMUX_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "zenmux": { + "env": ["ZENMUX_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "zenmux/openai/gpt-5", +} +``` + +{% /tab %} +{% /tabs %} + ## Supported Models ZenMux supports a wide range of models from various providers: From 1bb6c6618c62f388d750c66e5759022367f07937 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 12:38:11 +0000 Subject: [PATCH 09/81] docs(kilo-docs): add 1Password integration documentation to KiloClaw Tools --- docs/kiloclaw/tools.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/kiloclaw/tools.md diff --git a/docs/kiloclaw/tools.md b/docs/kiloclaw/tools.md new file mode 100644 index 00000000000..207c4ea3e4a --- /dev/null +++ b/docs/kiloclaw/tools.md @@ -0,0 +1,33 @@ +# Tools + +## 1Password Integration for KiloClaw + +Connect your KiloClaw agent to 1Password to securely manage credentials and automate vault lookups without exposing sensitive keys in plain text. + +> ⚠️ **Warning:** This integration grants your agent read/write access to the vaults you specify. We strongly recommend creating a dedicated vault containing only the specific credentials your agent requires. + +### Setup Instructions + +#### 1. Create a Service Account + +Visit the [1Password Developer Portal](https://developer.1password.com/) and create a new Service Account. This provides the secure bridge between 1Password and KiloClaw. + +#### 2. Scope to a Dedicated Vault + +Grant the Service Account access to a specific "Agent" vault. Do not use your primary personal or team vault. Ensure only the necessary items (API keys, passwords, etc.) are stored here. + +#### 3. Copy the Token + +Copy the generated Service Account token (it will begin with `ops_`). Navigate to your **KiloClaw Settings** and paste this token into the **1Password configuration** field. + +#### 4. Save and Upgrade + +After saving the token, select **Upgrade to latest** (do not use **Redeploy**) to activate the integration. + +### Usage + +Once active, your agent can interact with the vault using the `op` CLI. Example command: + +```bash +op item get "My Login" +``` From 31a047ef9d98aab1d0e6daf94a4a1875e6865f57 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 12:43:52 +0000 Subject: [PATCH 10/81] docs(kilo-docs): add Brave Search and AgentCard integration sections to KiloClaw tools --- docs/kiloclaw/tools.md | 70 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/docs/kiloclaw/tools.md b/docs/kiloclaw/tools.md index 207c4ea3e4a..05de6c4650b 100644 --- a/docs/kiloclaw/tools.md +++ b/docs/kiloclaw/tools.md @@ -31,3 +31,73 @@ Once active, your agent can interact with the vault using the `op` CLI. Example ```bash op item get "My Login" ``` + +--- + +## Brave Search Integration + +Equip your KiloClaw agent with real-time web browsing capabilities by integrating the Brave Search API. This allows the agent to fetch up-to-date information, perform market research, and verify facts beyond its training data. + +### How to Generate a Brave Search API Key + +To get started, you will need to obtain a "BSA" (Brave Search API) key from the Brave developer portal. + +#### 1. Access the Brave Search Dashboard + +Go to [api.search.brave.com](https://api.search.brave.com) and sign in or create a developer account. + +#### 2. Choose a Subscription Plan + +Brave offers a **Free Tier** (limited queries per month) for testing and paid tiers for high-volume production use. Select the plan that fits your needs. + +#### 3. Create an API Key + +Once your account is active, navigate to the **API Keys** section and click **"Create New Key."** + +#### 4. Copy the Key + +Your key will typically begin with the prefix `BSA`. Copy this key immediately, as it may not be displayed again for security reasons. + +--- + +## AgentCard Integration + +Enable your KiloClaw agents to perform financial transactions by creating and managing virtual debit cards. This integration allows for automated purchasing and expense management within set limits. + +> ⚠️ **Important:** This tool permits your agent to spend real money. Use extreme caution with budget limits. AgentCard is currently in Beta; card issuance may be limited or waitlisted. + +### Setup Instructions + +#### 1. Create an AgentCard Account + +Install the AgentCard CLI and sign up via your terminal: + +```bash +agent-cards signup +``` + +#### 2. Add a Payment Method + +Link your funding source (via Stripe) to enable the creation of virtual cards: + +```bash +agent-cards payment-method +``` + +#### 3. Retrieve Your API Key + +Open your local configuration file located at `~/.agent-cards/config.json`. Copy the value assigned to the `jwt` key. + +#### 4. Configure KiloClaw + +1. Paste the **JWT** into the AgentCard setup field in your KiloClaw settings. +2. Click **Save**. +3. Use **Upgrade** (not Redeploy) to install the latest image and activate the feature. + +### Available Tools + +Once activated, your agent will have access to: + +- `create_card`: Generate a new virtual debit card. +- `list_cards`: View existing cards and their statuses. +- `check_balance`: Monitor available funds. From 60d2a8e19801abac7ceb3749ca1ba32e3b4fd75e Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 12:47:03 +0000 Subject: [PATCH 11/81] fix(kilo-docs): move KiloClaw tools page to correct directory and add nav entry Move docs/kiloclaw/tools.md to packages/kilo-docs/pages/kiloclaw/tools.mdx where published docs are sourced from, add frontmatter, and register the Tools page in the KiloClaw navigation config. --- packages/kilo-docs/lib/nav/kiloclaw.ts | 1 + .../tools.md => packages/kilo-docs/pages/kiloclaw/tools.mdx | 5 +++++ 2 files changed, 6 insertions(+) rename docs/kiloclaw/tools.md => packages/kilo-docs/pages/kiloclaw/tools.mdx (97%) diff --git a/packages/kilo-docs/lib/nav/kiloclaw.ts b/packages/kilo-docs/lib/nav/kiloclaw.ts index 50262d29f6f..37c673c7088 100644 --- a/packages/kilo-docs/lib/nav/kiloclaw.ts +++ b/packages/kilo-docs/lib/nav/kiloclaw.ts @@ -17,6 +17,7 @@ export const KiloClawNav: NavSection[] = [ { href: "/kiloclaw/development-tools/google", children: "Google Workspace" }, ], }, + { href: "/kiloclaw/tools", children: "Tools" }, { href: "/kiloclaw/version-pinning", children: "Version Pinning" }, { href: "/kiloclaw/troubleshooting", children: "Troubleshooting" }, { href: "/kiloclaw/pricing", children: "Pricing" }, diff --git a/docs/kiloclaw/tools.md b/packages/kilo-docs/pages/kiloclaw/tools.mdx similarity index 97% rename from docs/kiloclaw/tools.md rename to packages/kilo-docs/pages/kiloclaw/tools.mdx index 05de6c4650b..8fbd5ca0138 100644 --- a/docs/kiloclaw/tools.md +++ b/packages/kilo-docs/pages/kiloclaw/tools.mdx @@ -1,3 +1,8 @@ +--- +title: "Tools" +description: "Third-party tool integrations for your KiloClaw agent" +--- + # Tools ## 1Password Integration for KiloClaw From 61f3e8c5dbdb0c52c89b3a9da51c1cc5218cacc1 Mon Sep 17 00:00:00 2001 From: Ligia Zanchet Date: Wed, 25 Mar 2026 13:48:23 +0100 Subject: [PATCH 12/81] Apply suggestions from code review Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com> --- packages/kilo-docs/pages/kiloclaw/tools.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kilo-docs/pages/kiloclaw/tools.mdx b/packages/kilo-docs/pages/kiloclaw/tools.mdx index 8fbd5ca0138..495771f2713 100644 --- a/packages/kilo-docs/pages/kiloclaw/tools.mdx +++ b/packages/kilo-docs/pages/kiloclaw/tools.mdx @@ -27,7 +27,7 @@ Copy the generated Service Account token (it will begin with `ops_`). Navigate t #### 4. Save and Upgrade -After saving the token, select **Upgrade to latest** (do not use **Redeploy**) to activate the integration. +After saving the token, use **Redeploy** to apply the new secret. Only use **Upgrade & Redeploy** if you also need to move to the latest platform version. ### Usage From b53105a4eb85f5a278bdbaa56c52e2e72846d89d Mon Sep 17 00:00:00 2001 From: Ligia Zanchet Date: Wed, 25 Mar 2026 14:10:46 +0100 Subject: [PATCH 13/81] Update packages/kilo-docs/pages/kiloclaw/tools.mdx Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com> --- packages/kilo-docs/pages/kiloclaw/tools.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kilo-docs/pages/kiloclaw/tools.mdx b/packages/kilo-docs/pages/kiloclaw/tools.mdx index 495771f2713..7a9708ecf28 100644 --- a/packages/kilo-docs/pages/kiloclaw/tools.mdx +++ b/packages/kilo-docs/pages/kiloclaw/tools.mdx @@ -97,7 +97,7 @@ Open your local configuration file located at `~/.agent-cards/config.json`. Copy 1. Paste the **JWT** into the AgentCard setup field in your KiloClaw settings. 2. Click **Save**. -3. Use **Upgrade** (not Redeploy) to install the latest image and activate the feature. +3. Use **Redeploy** to apply the new secret. Only use **Upgrade & Redeploy** if you also need the latest platform version. ### Available Tools From cd02ad416deacc7131cdd5a51bdf17c74415e4dc Mon Sep 17 00:00:00 2001 From: Ligia Zanchet Date: Wed, 25 Mar 2026 17:20:39 +0100 Subject: [PATCH 14/81] docs: restructure KiloClaw nav with nested sub-pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Split tools.mdx → tools/{1password,brave-search,agentcard}.md - Split chat-platforms.md → chat-platforms/{telegram,discord,slack}.md - Split control-ui.md → control-ui/{overview,changing-models,exec-approvals,version-pinning}.md - Split troubleshooting.md → troubleshooting/{common-questions,gateway-process,architecture}.md - Add faq/{general,pricing}.md as new top-level FAQ section - Update lib/nav/kiloclaw.ts with subLinks for all nested sections - Remove standalone Version Pinning and Pricing nav entries - Fix 1Password section: rewrite as step-by-step guide - Fix Brave Search: remove incorrect free tier mention --- packages/kilo-docs/lib/nav/kiloclaw.ts | 51 +++++++++++++-- .../pages/kiloclaw/chat-platforms/discord.md | 61 ++++++++++++++++++ .../pages/kiloclaw/chat-platforms/slack.md | 55 ++++++++++++++++ .../pages/kiloclaw/chat-platforms/telegram.md | 24 +++++++ .../kiloclaw/control-ui/changing-models.md | 22 +++++++ .../kiloclaw/control-ui/exec-approvals.md | 64 +++++++++++++++++++ .../pages/kiloclaw/control-ui/overview.md | 32 ++++++++++ .../kiloclaw/control-ui/version-pinning.md | 47 ++++++++++++++ .../kilo-docs/pages/kiloclaw/faq/general.md | 27 ++++++++ .../kilo-docs/pages/kiloclaw/faq/pricing.md | 31 +++++++++ .../pages/kiloclaw/{tools.mdx => tools.md} | 45 ++++++------- .../pages/kiloclaw/tools/1password.md | 37 +++++++++++ .../pages/kiloclaw/tools/agentcard.md | 46 +++++++++++++ .../pages/kiloclaw/tools/brave-search.md | 28 ++++++++ .../kiloclaw/troubleshooting/architecture.md | 14 ++++ .../troubleshooting/common-questions.md | 48 ++++++++++++++ .../pages/kiloclaw/troubleshooting/faq.md | 27 ++++++++ .../troubleshooting/gateway-process.md | 15 +++++ 18 files changed, 646 insertions(+), 28 deletions(-) create mode 100644 packages/kilo-docs/pages/kiloclaw/chat-platforms/discord.md create mode 100644 packages/kilo-docs/pages/kiloclaw/chat-platforms/slack.md create mode 100644 packages/kilo-docs/pages/kiloclaw/chat-platforms/telegram.md create mode 100644 packages/kilo-docs/pages/kiloclaw/control-ui/changing-models.md create mode 100644 packages/kilo-docs/pages/kiloclaw/control-ui/exec-approvals.md create mode 100644 packages/kilo-docs/pages/kiloclaw/control-ui/overview.md create mode 100644 packages/kilo-docs/pages/kiloclaw/control-ui/version-pinning.md create mode 100644 packages/kilo-docs/pages/kiloclaw/faq/general.md create mode 100644 packages/kilo-docs/pages/kiloclaw/faq/pricing.md rename packages/kilo-docs/pages/kiloclaw/{tools.mdx => tools.md} (62%) create mode 100644 packages/kilo-docs/pages/kiloclaw/tools/1password.md create mode 100644 packages/kilo-docs/pages/kiloclaw/tools/agentcard.md create mode 100644 packages/kilo-docs/pages/kiloclaw/tools/brave-search.md create mode 100644 packages/kilo-docs/pages/kiloclaw/troubleshooting/architecture.md create mode 100644 packages/kilo-docs/pages/kiloclaw/troubleshooting/common-questions.md create mode 100644 packages/kilo-docs/pages/kiloclaw/troubleshooting/faq.md create mode 100644 packages/kilo-docs/pages/kiloclaw/troubleshooting/gateway-process.md diff --git a/packages/kilo-docs/lib/nav/kiloclaw.ts b/packages/kilo-docs/lib/nav/kiloclaw.ts index 37c673c7088..1aac3c672a8 100644 --- a/packages/kilo-docs/lib/nav/kiloclaw.ts +++ b/packages/kilo-docs/lib/nav/kiloclaw.ts @@ -7,8 +7,25 @@ export const KiloClawNav: NavSection[] = [ { href: "/kiloclaw/overview", children: "Overview" }, { href: "/kiloclaw/dashboard", children: "Dashboard" }, { href: "/kiloclaw/pre-installed-software", children: "Pre-installed Software" }, - { href: "/kiloclaw/control-ui", children: "Control UI" }, - { href: "/kiloclaw/chat-platforms", children: "Chat Platforms" }, + { + href: "/kiloclaw/control-ui/overview", + children: "Control UI", + subLinks: [ + { href: "/kiloclaw/control-ui/overview", children: "Overview" }, + { href: "/kiloclaw/control-ui/changing-models", children: "Changing Models" }, + { href: "/kiloclaw/control-ui/exec-approvals", children: "Exec Approvals" }, + { href: "/kiloclaw/control-ui/version-pinning", children: "Version Pinning" }, + ], + }, + { + href: "/kiloclaw/chat-platforms/telegram", + children: "Chat Platforms", + subLinks: [ + { href: "/kiloclaw/chat-platforms/telegram", children: "Telegram" }, + { href: "/kiloclaw/chat-platforms/discord", children: "Discord" }, + { href: "/kiloclaw/chat-platforms/slack", children: "Slack" }, + ], + }, { href: "/kiloclaw/development-tools/github", children: "Development Tools", @@ -17,10 +34,32 @@ export const KiloClawNav: NavSection[] = [ { href: "/kiloclaw/development-tools/google", children: "Google Workspace" }, ], }, - { href: "/kiloclaw/tools", children: "Tools" }, - { href: "/kiloclaw/version-pinning", children: "Version Pinning" }, - { href: "/kiloclaw/troubleshooting", children: "Troubleshooting" }, - { href: "/kiloclaw/pricing", children: "Pricing" }, + { + href: "/kiloclaw/tools/1password", + children: "Tools", + subLinks: [ + { href: "/kiloclaw/tools/1password", children: "1Password" }, + { href: "/kiloclaw/tools/brave-search", children: "Brave Search" }, + { href: "/kiloclaw/tools/agentcard", children: "AgentCard" }, + ], + }, + { + href: "/kiloclaw/troubleshooting/common-questions", + children: "Troubleshooting", + subLinks: [ + { href: "/kiloclaw/troubleshooting/common-questions", children: "Common Questions" }, + { href: "/kiloclaw/troubleshooting/gateway-process", children: "Gateway Process States" }, + { href: "/kiloclaw/troubleshooting/architecture", children: "Architecture Notes" }, + ], + }, + { + href: "/kiloclaw/faq/general", + children: "FAQ", + subLinks: [ + { href: "/kiloclaw/faq/general", children: "General" }, + { href: "/kiloclaw/faq/pricing", children: "Pricing" }, + ], + }, ], }, ] diff --git a/packages/kilo-docs/pages/kiloclaw/chat-platforms/discord.md b/packages/kilo-docs/pages/kiloclaw/chat-platforms/discord.md new file mode 100644 index 00000000000..9f36f74b03c --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/chat-platforms/discord.md @@ -0,0 +1,61 @@ +--- +title: "Discord" +description: "Connect your KiloClaw agent to Discord" +--- + +# Discord + +Connect your KiloClaw agent to Discord by creating a bot in the Discord Developer Portal and linking it to your KiloClaw dashboard. + +## Create an Application and Bot + +1. Go to the [Discord Developer Portal](https://discord.com/developers/applications) and log in +2. Click **New Application**, give it a name, and click **Create** +3. Click **Bot** on the left sidebar +4. Click **Add Bot** and confirm + +## Enable Privileged Intents + +On the **Bot** page, scroll down to **Privileged Gateway Intents** and enable: + +- **Message Content Intent** (required) +- **Server Members Intent** (recommended — needed for role allowlists and name matching) +- **Presence Intent** (optional) + +## Copy Your Bot Token + +1. Scroll back up on the **Bot** page and click **Reset Token** + +> 📝 **Note** +> Despite the name, this generates your first token — nothing is being "reset." + +2. Copy the token that appears and paste it into the **Discord Bot Token** field in your KiloClaw dashboard. + +{% image src="/docs/img/kiloclaw/discord.png" alt="Connect account screen" width="800" caption="Discord bot token entry" /%} + +Enter the token in the Settings tab and click **Save**. You can remove or replace a configured token at any time. + +## Generate an Invite URL and Add the Bot to Your Server + +1. Click **OAuth2** on the sidebar +2. Scroll down to **OAuth2 URL Generator** and enable: + - `bot` + - `applications.commands` +3. A **Bot Permissions** section will appear below. Enable: + - View Channels + - Send Messages + - Read Message History + - Embed Links + - Attach Files + - Add Reactions (optional) +4. Copy the generated URL at the bottom +5. Paste it into your browser, select your server, and click **Continue** +6. You should now see your bot in the Discord server + +## Start Chatting with the Bot + +1. Right-click on the Bot in Discord and click **Message** +2. DM the bot `/pair` +3. You should get a response back with a pairing code +4. Return to [app.kilocode.ai/claw](https://app.kilocode.ai/claw) and confirm the pairing code and approve +5. You should now be able to chat with the bot from Discord diff --git a/packages/kilo-docs/pages/kiloclaw/chat-platforms/slack.md b/packages/kilo-docs/pages/kiloclaw/chat-platforms/slack.md new file mode 100644 index 00000000000..08fbb66f7b6 --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/chat-platforms/slack.md @@ -0,0 +1,55 @@ +--- +title: "Slack" +description: "Connect your KiloClaw agent to Slack" +--- + +# Slack + +Connect your KiloClaw agent to Slack by creating a Slack app from the OpenClaw manifest and linking it to your KiloClaw dashboard. + +## Step 1: Create a Slack App from the OpenClaw Manifest + +1. Go to [Slack App Management](https://api.slack.com/apps) and click **Create New App** → **From a Manifest** +2. Copy the manifest from the [OpenClaw docs](https://docs.openclaw.ai/channels/slack#manifest-and-scope-checklist) +3. Paste the manifest JSON into Slack's manifest editor +4. Customize the manifest before creating: + - Rename the app to your preferred name wherever it appears + - Update the slash command if desired (e.g., `/kiloclaw`) +5. Click **Create** + +## Step 2: Generate Tokens + +You need two tokens from Slack: + +**App-Level Token** + +1. In your Slack app settings, scroll down to **App-Level Tokens** +2. Click **Generate Token** +3. Add the `connections:write` scope +4. Generate and copy the token (starts with `xapp-`) + +**Bot User OAuth Token** + +1. In the left sidebar, click **Install App** +2. Install the app to your workspace +3. Copy the **Bot User OAuth Token** (starts with `xoxb-`) + +## Step 3: Connect Slack to KiloClaw + +1. In the [KiloClaw UI](https://app.kilo.ai/claw), find the Slack integration section (may show "not configured") +2. Enter both tokens: + - The `xapp-` app-level token + - The `xoxb-` bot user OAuth token +3. Click **Save** +4. Scroll to the top of the KiloClaw UI and click **Redeploy**. Wait for the instance to come back up + +## Step 4: Pair Slack with KiloClaw + +1. In Slack, DM the app and type your slash command (e.g., `/claw`) followed by anything — this triggers the pairing flow + +> 📝 **Note** +> The slash command is whatever you defined in the manifest. Any text after the command will work to trigger pairing. + +2. The app will return a pairing code +3. Return to [app.kilocode.ai/claw](https://app.kilocode.ai/claw) and confirm the pairing code and approve +4. You should now be able to chat with the bot from Slack diff --git a/packages/kilo-docs/pages/kiloclaw/chat-platforms/telegram.md b/packages/kilo-docs/pages/kiloclaw/chat-platforms/telegram.md new file mode 100644 index 00000000000..8fd8d7b524d --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/chat-platforms/telegram.md @@ -0,0 +1,24 @@ +--- +title: "Telegram" +description: "Connect your KiloClaw agent to Telegram" +--- + +# Telegram + +Connect your KiloClaw agent to Telegram by creating a bot via BotFather and linking it to your KiloClaw dashboard. + +1. Open Telegram and search for [@BotFather](https://t.me/BotFather) +2. Send `/newbot` and follow the prompts to create your bot +3. Copy the **Bot Token** that BotFather gives you +4. Go to the **Settings** tab on your [KiloClaw dashboard](/docs/kiloclaw/dashboard) +5. Paste the token into the **Telegram Bot Token** field +6. Click **Save** +7. Redeploy your KiloClaw instance +8. Send a direct message to your bot in Telegram: `/start` + +{% image src="/docs/img/kiloclaw/telegram.png" alt="Connect account screen" width="800" caption="Telegram bot token entry" /%} + +You can remove or replace a configured token at any time. + +> ℹ️ **Info** +> Advanced settings such as DM policy, allow lists, and groups can be configured in the OpenClaw Control UI after connecting. diff --git a/packages/kilo-docs/pages/kiloclaw/control-ui/changing-models.md b/packages/kilo-docs/pages/kiloclaw/control-ui/changing-models.md new file mode 100644 index 00000000000..63c7fb77c62 --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/control-ui/changing-models.md @@ -0,0 +1,22 @@ +--- +title: "Changing Models" +description: "Browse and switch models from the Control UI chat" +--- + +# Changing Models + +The Control UI Chat tab doubles as a command line for model management. KiloClaw exposes 335+ models through the `kilocode` provider and you can browse and switch between them without leaving the chat. + +| Command | Description | +| ------------------------------------ | ------------------------------------------------------------------------------- | +| `/model status` | View the currently active model and provider | +| `/models kilocode` | Browse available models (paginated, 20 per page) | +| `/models kilocode ` | Jump to a specific page (e.g. `/models kilocode 2`) | +| `/model kilocode//` | Switch to a specific model (e.g. `/model kilocode/anthropic/claude-sonnet-4.6`) | +| `/models kilocode all` | List every available model at once | + +Each `/models` response includes helper text at the bottom with shortcuts for switching, paging, and listing all models. + +To change the default model for all new sessions, edit `agents.defaults.model.primary` in your `openclaw.json` via **Config** in the Control UI (or the [KiloClaw Dashboard](/docs/kiloclaw/dashboard#changing-the-model) for a quick dropdown pick). + +For the full list of providers, advanced configuration, and CLI commands, see the [OpenClaw Model Providers documentation](https://docs.openclaw.ai/providers). diff --git a/packages/kilo-docs/pages/kiloclaw/control-ui/exec-approvals.md b/packages/kilo-docs/pages/kiloclaw/control-ui/exec-approvals.md new file mode 100644 index 00000000000..1188f545c43 --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/control-ui/exec-approvals.md @@ -0,0 +1,64 @@ +--- +title: "Exec Approvals" +description: "Control which commands your KiloClaw agent can run on the host machine" +--- + +# Exec Approvals + +Exec approvals are the safety interlock that controls which commands your agent can run on the host machine (gateway or node). By default, **all host exec requests are denied** — you must explicitly allowlist the commands you want your agent to run independently. This prevents accidental execution of destructive commands. + +{% callout type="warning" %} +The default security policy is `deny`. You must configure an allowlist before your agent can execute any host commands. +{% /callout %} + +## How It Works + +Approvals are enforced locally on the execution host and sit on top of tool policy and elevated gating. The effective policy is always the **stricter** of `tools.exec.*` and the approvals defaults. Settings are stored in `~/.openclaw/exec-approvals.json` on the host. + +## Security Policies + +| Policy | Behavior | +| ----------- | ---------------------------------------------- | +| `deny` | Block all host exec requests (default) | +| `allowlist` | Allow only commands matching the allowlist | +| `full` | Allow everything (equivalent to elevated mode) | + +## Ask Behavior + +The `ask` setting controls when the user is prompted for approval: + +| Setting | Behavior | +| --------- | ------------------------------------------------------- | +| `off` | Never prompt | +| `on-miss` | Prompt only when the allowlist does not match (default) | +| `always` | Prompt on every command | + +If a prompt is required but no UI is reachable, the `askFallback` setting decides the outcome (`deny` by default). + +## Allowlists + +Allowlists are **per agent** — each agent has its own set of allowed command patterns. Patterns are case-insensitive globs that must resolve to binary paths (basename-only entries are ignored). + +Example patterns: + +``` +~/Projects/**/bin/rg +~/.local/bin/* +/opt/homebrew/bin/rg +``` + +Each entry tracks last-used metadata (timestamp, command, resolved path) so you can audit and keep the list tidy. + +## Approval Flow + +When a command requires approval, the gateway broadcasts the request to connected operator clients. The approval dialog shows the command, arguments, working directory, agent ID, and resolved path. You can: + +- **Allow once** — run the command now +- **Allow always** — add to the allowlist and run +- **Deny** — block the request + +Approval prompts can also be forwarded to chat channels (Slack, Telegram, Discord, etc.) and resolved with `/approve`. + +## Editing in the Control UI + +Navigate to **Nodes > Exec Approvals** in the Control UI to edit defaults, per-agent overrides, and allowlists. Select a scope (Defaults or a specific agent), adjust the policy, add or remove allowlist patterns, then save. diff --git a/packages/kilo-docs/pages/kiloclaw/control-ui/overview.md b/packages/kilo-docs/pages/kiloclaw/control-ui/overview.md new file mode 100644 index 00000000000..564e11364eb --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/control-ui/overview.md @@ -0,0 +1,32 @@ +--- +title: "Control UI Overview" +description: "Browser-based dashboard for managing your OpenClaw instance" +--- + +# OpenClaw Control UI + +The Control UI is a browser-based dashboard (built with Vite + Lit) served by the OpenClaw Gateway on the same port as the gateway itself (default: `http://localhost:18789/`). It connects via WebSocket and gives you real-time control over your agent, channels, sessions, and system configuration. For KiloClaw users, see [Accessing the Control UI](/docs/kiloclaw/dashboard#accessing-the-control-ui) to get started. + +## Features + +- **Chat** — Send messages, stream responses with live tool-call output, view history, and abort runs. +- **Channels** — View the status of connected messaging platforms, scan QR codes for login, and edit per-channel config. +- **Sessions** — List active sessions with thinking and verbose overrides. +- **Cron Jobs** — Create, edit, enable/disable, run, and view history of scheduled tasks. +- **Skills** — View status, enable/disable, install, and manage API keys for skills. +- **Nodes** — List paired devices and their capabilities. +- **Exec Approvals** — Edit gateway or node command allowlists. See [Exec Approvals](/docs/kiloclaw/control-ui/exec-approvals). +- **Config** — View and edit `openclaw.json` with schema-based form rendering and a raw JSON editor. +- **Logs** — Live tail of gateway logs with filtering and export. +- **Debug** — Status, health, model snapshots, event log, and manual RPC calls. +- **Update** — Run package updates and restart the gateway. + +For more details, please see the official [OpenClaw documentation](https://docs.openclaw.ai/web/control-ui). + +{% callout type="warning" %} +Do not use the **Update** feature in the Control UI to update KiloClaw. Use **Redeploy** from the [KiloClaw Dashboard](/docs/kiloclaw/dashboard#redeploy) instead. Updating via the Control UI will not apply the correct KiloClaw platform image and may break your instance. +{% /callout %} + +## Authentication + +Auth is handled via token or password on the WebSocket handshake. Remote connections require one-time device pairing — the pairing request appears on the [KiloClaw Dashboard](/docs/kiloclaw/dashboard#pairing-requests) or in the Control UI itself. diff --git a/packages/kilo-docs/pages/kiloclaw/control-ui/version-pinning.md b/packages/kilo-docs/pages/kiloclaw/control-ui/version-pinning.md new file mode 100644 index 00000000000..9905620b83a --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/control-ui/version-pinning.md @@ -0,0 +1,47 @@ +--- +title: "Version Pinning" +description: "Pin your KiloClaw instance to a specific OpenClaw version and variant" +--- + +# Version Pinning + +Version pinning lets you lock your KiloClaw instance to a specific OpenClaw version and variant. This gives you control over when your instance upgrades — it stays on the pinned version until you explicitly change it. + +## When to Use Version Pinning + +Version pinning is useful when: + +- A changelog entry is marked **Redeploy Required** and you're not ready to upgrade yet +- You're running a workflow that depends on specific OpenClaw behavior +- You want to test the impact of an upgrade before committing to it + +## How to Pin a Version + +1. Go to your [KiloClaw dashboard](https://app.kilo.ai/profile) +2. Open the **Settings** tab +3. Scroll to the **Version Pinning** section +4. Select a **version** and **variant** from the dropdowns +5. Click **Save** + +Your instance will stay on the selected version until you change or clear the pin. + +{% callout type="info" %} +After saving a version pin, you need to **Redeploy** for the change to take effect on your running instance. +{% /callout %} + +## Variants + +Each OpenClaw version is available in one or more variants. Variants may differ in included tools, default configuration, or base image. Select the variant that matches your use case, or use the default if unsure. + +## Clearing a Pin + +To return to automatic updates: + +1. Go to **Settings > Version Pinning** +2. Clear the version selection +3. Click **Save** +4. Use **Upgrade & Redeploy** from the dashboard to apply the latest platform version + +{% callout type="warning" %} +Clearing a pin and running **Upgrade & Redeploy** will update your instance to the latest supported platform version. Review the changelog before upgrading to check for breaking changes. +{% /callout %} diff --git a/packages/kilo-docs/pages/kiloclaw/faq/general.md b/packages/kilo-docs/pages/kiloclaw/faq/general.md new file mode 100644 index 00000000000..6a63a54d016 --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/faq/general.md @@ -0,0 +1,27 @@ +--- +title: "FAQ" +description: "Frequently asked questions about KiloClaw" +--- + +# FAQ + +## How can I change my model? + +You can change the model in two ways: + +- **From chat** — Type `/model` in the Chat window within the OpenClaw Control UI to switch models directly. +- **From the dashboard** — Go to [https://app.kilo.ai/claw](https://app.kilo.ai/claw), select the model you want, and click **Save**. No redeploy is needed. + +## Can I access the filesystem? + +You can access instance files in `/root/.openclaw/` directly from the [KiloClaw Dashboard](https://app.kilo.ai/claw). This is useful for examining or restoring config files. You can also interact with files through your OpenClaw agent using its built-in file tools. + +## Can I access my KiloClaw via SSH? + +For security reasons, SSH access is currently disabled for all KiloClaw instances. Our primary goal is to provide a secure environment for all users, and restricting direct SSH access is one of the many measures we take to ensure the platform remains safe and protected for everyone. + +## How can I update my OpenClaw? + +Do **not** click **Update Now** inside the OpenClaw Control UI — this is not supported for KiloClaw instances and may break your setup. + +Updates are managed by the KiloClaw platform team to ensure stability. When a new version is available, it will be announced in the **Changelog** on your dashboard. To apply the update, click **Upgrade & Redeploy** from the [KiloClaw Dashboard](/docs/kiloclaw/dashboard#redeploy). diff --git a/packages/kilo-docs/pages/kiloclaw/faq/pricing.md b/packages/kilo-docs/pages/kiloclaw/faq/pricing.md new file mode 100644 index 00000000000..e63d9aa99b2 --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/faq/pricing.md @@ -0,0 +1,31 @@ +--- +title: "Pricing" +description: "Pricing details for KiloClaw instances and model inference" +--- + +# Pricing + +KiloClaw uses Kilo Gateway credits by default — if you route requests through BYOK, model usage is billed directly by your provider instead. + +## Instance Hosting + +KiloClaw hosting is **free during the beta period**. Each user gets a dedicated machine (2 shared vCPUs, 3 GB RAM, 10 GB SSD) at no cost. + +> ℹ️ **Info** +> Beta pricing is subject to change. Paid hosting tiers may be introduced after the beta period ends. Any changes will be announced in advance. + +## Model Inference + +Model usage is charged against your [Gateway credit balance](/docs/gateway/usage-and-billing). Costs vary by model — premium models like Claude Opus or GPT-5.4-pro cost more per token than smaller models. + +## Free Models + +Several models are available at **no additional cost** to your Gateway balance. These are great for getting started or for tasks that don't need the most powerful models. + +To see which models are currently free, check the [Kilo Leaderboard](https://kilo.ai/leaderboard#all-models) — free models are marked accordingly. + +## Adding Credits + +You can add Gateway credits from your [Kilo account](https://app.kilo.ai). Credits are shared across all Kilo products (VSCode extension, CLI, Cloud Agents, and KiloClaw). + +See [Adding Credits](/docs/getting-started/adding-credits) and [Gateway Usage and Billing](/docs/gateway/usage-and-billing) for details. diff --git a/packages/kilo-docs/pages/kiloclaw/tools.mdx b/packages/kilo-docs/pages/kiloclaw/tools.md similarity index 62% rename from packages/kilo-docs/pages/kiloclaw/tools.mdx rename to packages/kilo-docs/pages/kiloclaw/tools.md index 7a9708ecf28..601e67e6dfd 100644 --- a/packages/kilo-docs/pages/kiloclaw/tools.mdx +++ b/packages/kilo-docs/pages/kiloclaw/tools.md @@ -5,37 +5,38 @@ description: "Third-party tool integrations for your KiloClaw agent" # Tools -## 1Password Integration for KiloClaw +## 1Password Integration Guide -Connect your KiloClaw agent to 1Password to securely manage credentials and automate vault lookups without exposing sensitive keys in plain text. +Connect your KiloClaw agent to 1Password to securely manage credentials. This allows your agent to fetch API keys or passwords without ever seeing them in plain text. -> ⚠️ **Warning:** This integration grants your agent read/write access to the vaults you specify. We strongly recommend creating a dedicated vault containing only the specific credentials your agent requires. +### Step 1: Create a Dedicated Vault -### Setup Instructions +For maximum security, do not give the bot access to your personal vault. -#### 1. Create a Service Account +1. Log in to your 1Password account. +2. Create a **New Vault** (e.g., name it `Kilo-Agent-Vault`). +3. Move only the specific items/keys you want the bot to use into this vault. -Visit the [1Password Developer Portal](https://developer.1password.com/) and create a new Service Account. This provides the secure bridge between 1Password and KiloClaw. +### Step 2: Generate a Service Account Token -#### 2. Scope to a Dedicated Vault +1. Go to the [1Password Developer Portal](https://developer.1password.com/). +2. Select **Service Accounts** and click **Create a Service Account**. +3. **Important:** When prompted for permissions, select only the dedicated vault you created in Step 1. +4. Copy the generated token (it will begin with `ops_`). -Grant the Service Account access to a specific "Agent" vault. Do not use your primary personal or team vault. Ensure only the necessary items (API keys, passwords, etc.) are stored here. +### Step 3: Configure KiloClaw -#### 3. Copy the Token +1. Navigate to your KiloClaw dashboard: [app.kilo.ai/claw](https://app.kilo.ai/claw). +2. Go to **Settings > Tools** (or **Edit Files**). +3. Paste your `ops_` token into the **1Password Setup** field. +4. Click **Save**. -Copy the generated Service Account token (it will begin with `ops_`). Navigate to your **KiloClaw Settings** and paste this token into the **1Password configuration** field. +### Step 4: Activate the Integration -#### 4. Save and Upgrade +To apply the changes and inject the 1Password CLI into your environment: -After saving the token, use **Redeploy** to apply the new secret. Only use **Upgrade & Redeploy** if you also need to move to the latest platform version. - -### Usage - -Once active, your agent can interact with the vault using the `op` CLI. Example command: - -```bash -op item get "My Login" -``` +1. Select **Upgrade to latest**. +2. Perform a **Redeploy** to restart the agent with the new permissions active. --- @@ -53,7 +54,7 @@ Go to [api.search.brave.com](https://api.search.brave.com) and sign in or create #### 2. Choose a Subscription Plan -Brave offers a **Free Tier** (limited queries per month) for testing and paid tiers for high-volume production use. Select the plan that fits your needs. +Brave Search API requires a paid subscription. Select the plan that fits your usage volume. #### 3. Create an API Key @@ -71,7 +72,7 @@ Enable your KiloClaw agents to perform financial transactions by creating and ma > ⚠️ **Important:** This tool permits your agent to spend real money. Use extreme caution with budget limits. AgentCard is currently in Beta; card issuance may be limited or waitlisted. -### Setup Instructions +### AgentCard Setup #### 1. Create an AgentCard Account diff --git a/packages/kilo-docs/pages/kiloclaw/tools/1password.md b/packages/kilo-docs/pages/kiloclaw/tools/1password.md new file mode 100644 index 00000000000..10868c41ef4 --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/tools/1password.md @@ -0,0 +1,37 @@ +--- +title: "1Password Integration" +description: "Connect your KiloClaw agent to 1Password to securely manage credentials" +--- + +# 1Password Integration Guide + +Connect your KiloClaw agent to 1Password to securely manage credentials. This allows your agent to fetch API keys or passwords without ever seeing them in plain text. + +## Step 1: Create a Dedicated Vault + +For maximum security, do not give the bot access to your personal vault. + +1. Log in to your 1Password account. +2. Create a **New Vault** (e.g., name it `Kilo-Agent-Vault`). +3. Move only the specific items/keys you want the bot to use into this vault. + +## Step 2: Generate a Service Account Token + +1. Go to the [1Password Developer Portal](https://developer.1password.com/). +2. Select **Service Accounts** and click **Create a Service Account**. +3. **Important:** When prompted for permissions, select only the dedicated vault you created in Step 1. +4. Copy the generated token (it will begin with `ops_`). + +## Step 3: Configure KiloClaw + +1. Navigate to your KiloClaw dashboard: [app.kilo.ai/claw](https://app.kilo.ai/claw). +2. Go to **Settings > Tools** (or **Edit Files**). +3. Paste your `ops_` token into the **1Password Setup** field. +4. Click **Save**. + +## Step 4: Activate the Integration + +To apply the changes and inject the 1Password CLI into your environment: + +1. Select **Upgrade to latest**. +2. Perform a **Redeploy** to restart the agent with the new permissions active. diff --git a/packages/kilo-docs/pages/kiloclaw/tools/agentcard.md b/packages/kilo-docs/pages/kiloclaw/tools/agentcard.md new file mode 100644 index 00000000000..9903871c8be --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/tools/agentcard.md @@ -0,0 +1,46 @@ +--- +title: "AgentCard Integration" +description: "Enable your KiloClaw agents to perform financial transactions with virtual debit cards" +--- + +# AgentCard Integration + +Enable your KiloClaw agents to perform financial transactions by creating and managing virtual debit cards. This integration allows for automated purchasing and expense management within set limits. + +> ⚠️ **Important:** This tool permits your agent to spend real money. Use extreme caution with budget limits. AgentCard is currently in Beta; card issuance may be limited or waitlisted. + +## AgentCard Setup + +### 1. Create an AgentCard Account + +Install the AgentCard CLI and sign up via your terminal: + +```bash +agent-cards signup +``` + +### 2. Add a Payment Method + +Link your funding source (via Stripe) to enable the creation of virtual cards: + +```bash +agent-cards payment-method +``` + +### 3. Retrieve Your API Key + +Open your local configuration file located at `~/.agent-cards/config.json`. Copy the value assigned to the `jwt` key. + +### 4. Configure KiloClaw + +1. Paste the **JWT** into the AgentCard setup field in your KiloClaw settings. +2. Click **Save**. +3. Use **Redeploy** to apply the new secret. Only use **Upgrade & Redeploy** if you also need the latest platform version. + +## Available Tools + +Once activated, your agent will have access to: + +- `create_card`: Generate a new virtual debit card. +- `list_cards`: View existing cards and their statuses. +- `check_balance`: Monitor available funds. diff --git a/packages/kilo-docs/pages/kiloclaw/tools/brave-search.md b/packages/kilo-docs/pages/kiloclaw/tools/brave-search.md new file mode 100644 index 00000000000..6d448c3dada --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/tools/brave-search.md @@ -0,0 +1,28 @@ +--- +title: "Brave Search Integration" +description: "Equip your KiloClaw agent with real-time web browsing via the Brave Search API" +--- + +# Brave Search Integration + +Equip your KiloClaw agent with real-time web browsing capabilities by integrating the Brave Search API. This allows the agent to fetch up-to-date information, perform market research, and verify facts beyond its training data. + +## How to Generate a Brave Search API Key + +To get started, you will need to obtain a "BSA" (Brave Search API) key from the Brave developer portal. + +### 1. Access the Brave Search Dashboard + +Go to [api.search.brave.com](https://api.search.brave.com) and sign in or create a developer account. + +### 2. Choose a Subscription Plan + +Brave Search API requires a paid subscription. Select the plan that fits your usage volume. + +### 3. Create an API Key + +Once your account is active, navigate to the **API Keys** section and click **"Create New Key."** + +### 4. Copy the Key + +Your key will typically begin with the prefix `BSA`. Copy this key immediately, as it may not be displayed again for security reasons. diff --git a/packages/kilo-docs/pages/kiloclaw/troubleshooting/architecture.md b/packages/kilo-docs/pages/kiloclaw/troubleshooting/architecture.md new file mode 100644 index 00000000000..2290fb1b9c2 --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/troubleshooting/architecture.md @@ -0,0 +1,14 @@ +--- +title: "Architecture Notes" +description: "How KiloClaw instances are structured" +--- + +# Architecture Notes + +For advanced users — how KiloClaw instances are structured: + +- **Dedicated machine** — Each user gets their own machine and persistent volume. There is no shared infrastructure between users. +- **Region-pinned storage** — Your persistent volume stays in the region where your instance was originally created. +- **Network isolation** — OpenClaw binds to loopback only; external traffic is proxied through a Kilo controller. +- **Per-user authentication** — The gateway token is derived per-user for authenticating requests to your machine. +- **Encryption at rest** — Sensitive data (API keys, channel tokens) is encrypted at rest in the machine configuration. diff --git a/packages/kilo-docs/pages/kiloclaw/troubleshooting/common-questions.md b/packages/kilo-docs/pages/kiloclaw/troubleshooting/common-questions.md new file mode 100644 index 00000000000..1c49d2a39df --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/troubleshooting/common-questions.md @@ -0,0 +1,48 @@ +--- +title: "Common Questions" +description: "Answers to common KiloClaw troubleshooting questions" +--- + +# Common Questions + +## OpenClaw Doctor + +OpenClaw Doctor is the recommended first step when something isn't working. It runs diagnostics on your instance and automatically fixes common configuration issues. + +To use it: + +1. Make sure your instance is running +2. Click **OpenClaw Doctor** on your [dashboard](/docs/kiloclaw/dashboard) +3. Watch the output as it runs — results appear in real time + +## Does Redeploy reset my instance? + +No. Redeploy does **not** delete your files, git repos, or cron jobs. It stops the machine, applies the latest platform image and your current configuration, and starts it again with the same persistent storage. Think of it as "update and restart." + +## When should I use Restart OpenClaw vs Redeploy? + +- **Restart OpenClaw** — Restarts just the OpenClaw process. The machine stays up. Use this for quick recovery from a process-level issue or when you want to apply openclaw config changes. +- **Redeploy** — Stops and restarts the entire machine with the latest image and config. Use this when the changelog shows a redeploy hint, or after changing channel tokens or secrets. + +## My bot isn't responding on Telegram/Discord/Slack + +1. Check that the channel token is configured in [Settings](/docs/kiloclaw/dashboard#channels) +2. Make sure you **Redeployed** or **Restarted OpenClaw** after saving tokens +3. Check for pending pairing requests — the user may need to be approved +4. Try running **OpenClaw Doctor** + +## Accessing and Restoring Config Files + +You can directly access the files in `/root/.openclaw/` on the [KiloClaw Dashboard](https://app.kilo.ai/claw) using the file browser of the edit files dialog. This can be a useful way to examine or update the config files (especially `openclaw.json`) if you run into an issue. There may also be backups in the form of `openclaw.bak` files that you can manually restore from if needed. + +## The gateway shows "Crashed" + +The OpenClaw process is automatically restarted when it crashes. Check the Gateway Process tab on your dashboard for the exit code and restart count. If it keeps crashing: + +1. Run **OpenClaw Doctor** +2. Try a **Redeploy** to apply the latest platform image +3. If the issue persists, join the [Kilo Discord](https://kilo.ai/discord) and share details in the KiloClaw channel + +## I changed the model but the agent is still using the old one + +After selecting a new model, click **Save & Provision** to apply it. This refreshes the API key and saves the new model. You may also need to **Restart OpenClaw** for the change to take full effect. diff --git a/packages/kilo-docs/pages/kiloclaw/troubleshooting/faq.md b/packages/kilo-docs/pages/kiloclaw/troubleshooting/faq.md new file mode 100644 index 00000000000..6a63a54d016 --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/troubleshooting/faq.md @@ -0,0 +1,27 @@ +--- +title: "FAQ" +description: "Frequently asked questions about KiloClaw" +--- + +# FAQ + +## How can I change my model? + +You can change the model in two ways: + +- **From chat** — Type `/model` in the Chat window within the OpenClaw Control UI to switch models directly. +- **From the dashboard** — Go to [https://app.kilo.ai/claw](https://app.kilo.ai/claw), select the model you want, and click **Save**. No redeploy is needed. + +## Can I access the filesystem? + +You can access instance files in `/root/.openclaw/` directly from the [KiloClaw Dashboard](https://app.kilo.ai/claw). This is useful for examining or restoring config files. You can also interact with files through your OpenClaw agent using its built-in file tools. + +## Can I access my KiloClaw via SSH? + +For security reasons, SSH access is currently disabled for all KiloClaw instances. Our primary goal is to provide a secure environment for all users, and restricting direct SSH access is one of the many measures we take to ensure the platform remains safe and protected for everyone. + +## How can I update my OpenClaw? + +Do **not** click **Update Now** inside the OpenClaw Control UI — this is not supported for KiloClaw instances and may break your setup. + +Updates are managed by the KiloClaw platform team to ensure stability. When a new version is available, it will be announced in the **Changelog** on your dashboard. To apply the update, click **Upgrade & Redeploy** from the [KiloClaw Dashboard](/docs/kiloclaw/dashboard#redeploy). diff --git a/packages/kilo-docs/pages/kiloclaw/troubleshooting/gateway-process.md b/packages/kilo-docs/pages/kiloclaw/troubleshooting/gateway-process.md new file mode 100644 index 00000000000..045139fa11c --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/troubleshooting/gateway-process.md @@ -0,0 +1,15 @@ +--- +title: "Gateway Process States" +description: "Understanding KiloClaw gateway process states" +--- + +# Gateway Process States + +The Gateway Process tab shows the current state of the OpenClaw process inside your machine: + +- **Running** — The process is up and handling requests +- **Stopped** — The process is not running +- **Starting** — The process is booting up +- **Stopping** — The process is shutting down gracefully +- **Crashed** — The process exited unexpectedly and will be automatically restarted +- **Shutting Down** — The process is stopping as part of a machine stop or redeploy From e198bfed1a29dd6453e99db51c5221eab87a3702 Mon Sep 17 00:00:00 2001 From: Ligia Zanchet Date: Wed, 25 Mar 2026 17:22:46 +0100 Subject: [PATCH 15/81] docs: remove AgentCard beta warning and clarify Brave Search has no free tier --- packages/kilo-docs/pages/kiloclaw/tools/agentcard.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/kilo-docs/pages/kiloclaw/tools/agentcard.md b/packages/kilo-docs/pages/kiloclaw/tools/agentcard.md index 9903871c8be..79a23bf4622 100644 --- a/packages/kilo-docs/pages/kiloclaw/tools/agentcard.md +++ b/packages/kilo-docs/pages/kiloclaw/tools/agentcard.md @@ -7,8 +7,6 @@ description: "Enable your KiloClaw agents to perform financial transactions with Enable your KiloClaw agents to perform financial transactions by creating and managing virtual debit cards. This integration allows for automated purchasing and expense management within set limits. -> ⚠️ **Important:** This tool permits your agent to spend real money. Use extreme caution with budget limits. AgentCard is currently in Beta; card issuance may be limited or waitlisted. - ## AgentCard Setup ### 1. Create an AgentCard Account From 02b5cea71221d1a5e35bfb39c1d254fb3d0126cf Mon Sep 17 00:00:00 2001 From: Alex Gold Date: Thu, 26 Mar 2026 10:29:14 -0400 Subject: [PATCH 16/81] AKG discord updates --- .../pages/kiloclaw/chat-platforms/discord.md | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/packages/kilo-docs/pages/kiloclaw/chat-platforms/discord.md b/packages/kilo-docs/pages/kiloclaw/chat-platforms/discord.md index 9f36f74b03c..219e6799c68 100644 --- a/packages/kilo-docs/pages/kiloclaw/chat-platforms/discord.md +++ b/packages/kilo-docs/pages/kiloclaw/chat-platforms/discord.md @@ -7,12 +7,14 @@ description: "Connect your KiloClaw agent to Discord" Connect your KiloClaw agent to Discord by creating a bot in the Discord Developer Portal and linking it to your KiloClaw dashboard. +## Prerequisites + +Make sure you have a Discord server ready to add the bot to. If you don't have one, open Discord, scroll to the bottom of your server list, click **+**, choose **Create My Own**, then **For me and my friends**, and give it a name. + ## Create an Application and Bot 1. Go to the [Discord Developer Portal](https://discord.com/developers/applications) and log in 2. Click **New Application**, give it a name, and click **Create** -3. Click **Bot** on the left sidebar -4. Click **Add Bot** and confirm ## Enable Privileged Intents @@ -22,19 +24,6 @@ On the **Bot** page, scroll down to **Privileged Gateway Intents** and enable: - **Server Members Intent** (recommended — needed for role allowlists and name matching) - **Presence Intent** (optional) -## Copy Your Bot Token - -1. Scroll back up on the **Bot** page and click **Reset Token** - -> 📝 **Note** -> Despite the name, this generates your first token — nothing is being "reset." - -2. Copy the token that appears and paste it into the **Discord Bot Token** field in your KiloClaw dashboard. - -{% image src="/docs/img/kiloclaw/discord.png" alt="Connect account screen" width="800" caption="Discord bot token entry" /%} - -Enter the token in the Settings tab and click **Save**. You can remove or replace a configured token at any time. - ## Generate an Invite URL and Add the Bot to Your Server 1. Click **OAuth2** on the sidebar @@ -52,10 +41,27 @@ Enter the token in the Settings tab and click **Save**. You can remove or replac 5. Paste it into your browser, select your server, and click **Continue** 6. You should now see your bot in the Discord server +## Copy Your Bot Token + +1. Go back to the **Bot** page on the left sidebar and click **Reset Token** + +> 📝 **Note** +> Despite the name, this generates your first token — nothing is being "reset." + +2. Copy the token that appears and paste it into the **Discord Bot Token** field in your KiloClaw dashboard. + +{% image src="/docs/img/kiloclaw/discord.png" alt="Connect account screen" width="800" caption="Discord bot token entry" /%} + +Enter the token in the Settings tab and click **Save**. You can remove or replace a configured token at any time. + +## Redeploy to Apply Changes + +After saving your token, click **Redeploy** (the yellow button at the top of the KiloClaw dashboard) to apply the changes. The server will restart in about 30–45 seconds. Wait for the redeploy to complete before pairing. + ## Start Chatting with the Bot 1. Right-click on the Bot in Discord and click **Message** 2. DM the bot `/pair` 3. You should get a response back with a pairing code -4. Return to [app.kilocode.ai/claw](https://app.kilocode.ai/claw) and confirm the pairing code and approve +4. Return to [app.kilo.ai/claw](https://app.kilo.ai/claw) and confirm the pairing code and approve 5. You should now be able to chat with the bot from Discord From 3494a56b27cfdc81e5f5ca6814aae18126fcdef2 Mon Sep 17 00:00:00 2001 From: Ligia Zanchet Date: Thu, 26 Mar 2026 15:38:33 +0100 Subject: [PATCH 17/81] docs: remove old flat pages superseded by nested sub-pages --- .../pages/kiloclaw/chat-platforms.md | 155 ------------------ .../kilo-docs/pages/kiloclaw/control-ui.md | 116 ------------- packages/kilo-docs/pages/kiloclaw/pricing.md | 37 ----- packages/kilo-docs/pages/kiloclaw/tools.md | 109 ------------ .../pages/kiloclaw/troubleshooting.md | 101 ------------ .../pages/kiloclaw/version-pinning.md | 53 ------ 6 files changed, 571 deletions(-) delete mode 100644 packages/kilo-docs/pages/kiloclaw/chat-platforms.md delete mode 100644 packages/kilo-docs/pages/kiloclaw/control-ui.md delete mode 100644 packages/kilo-docs/pages/kiloclaw/pricing.md delete mode 100644 packages/kilo-docs/pages/kiloclaw/tools.md delete mode 100644 packages/kilo-docs/pages/kiloclaw/troubleshooting.md delete mode 100644 packages/kilo-docs/pages/kiloclaw/version-pinning.md diff --git a/packages/kilo-docs/pages/kiloclaw/chat-platforms.md b/packages/kilo-docs/pages/kiloclaw/chat-platforms.md deleted file mode 100644 index 6767956eb36..00000000000 --- a/packages/kilo-docs/pages/kiloclaw/chat-platforms.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: "Connecting Chat Platforms" -description: "Connect your KiloClaw agent to Telegram, Discord, Slack, and more" ---- - -# Connecting Chat Platforms - -KiloClaw supports connecting your AI agent to Telegram, Discord, and Slack. You can configure channels from the **Settings** tab on your [KiloClaw dashboard](/docs/kiloclaw/dashboard#channels), or from the OpenClaw Control UI after accessing your instance. - -While the exact steps vary for configuring a chat platform (called a _channel_ by OpenClaw), the steps are to: - -1. Configure the channel -2. Redeploy the KiloClaw instance -3. Initiate the pairing in the chat app -4. Accept the pairing request in the [KiloClaw UI](https://app.kilo.ai/claw) - -Detailed instructions for supported chat apps are below. - -## Chat Apps (Channels) - -### Telegram - -1. Open Telegram and search for [@BotFather](https://t.me/BotFather) -2. Send `/newbot` and follow the prompts to create your bot -3. Copy the **Bot Token** that BotFather gives you -4. Go to the **Settings** tab on your [KiloClaw dashboard](/docs/kiloclaw/dashboard) -5. Paste the token into the **Telegram Bot Token** field -6. Click **Save** -7. Redeploy your KiloClaw instance -8. Send a direct message to your bot in Telegram: `/start` - -{% image src="/docs/img/kiloclaw/telegram.png" alt="Connect account screen" width="800" caption="Telegram bot token entry" /%} - -You can remove or replace a configured token at any time. - -> ℹ️ **Info** -> Advanced settings such as DM policy, allow lists, and groups can be configured in the OpenClaw Control UI after connecting. - -### Discord - -To connect Discord, you need a **Bot Token** from the [Discord Developer Portal](https://discord.com/developers/applications). - -#### Create an Application and Bot - -1. Go to the [Discord Developer Portal](https://discord.com/developers/applications) and log in -2. Click **New Application**, give it a name, and click **Create** -3. Click **Bot** on the left sidebar -4. Click **Add Bot** and confirm - -#### Enable Privileged Intents - -On the **Bot** page, scroll down to **Privileged Gateway Intents** and enable: - -- **Message Content Intent** (required) -- **Server Members Intent** (recommended — needed for role allowlists and name matching) -- **Presence Intent** (optional) - -#### Copy Your Bot Token - -1. Scroll back up on the **Bot** page and click **Reset Token** - -> 📝 **Note** -> Despite the name, this generates your first token — nothing is being "reset." - -2. Copy the token that appears and paste it into the **Discord Bot Token** field in your KiloClaw dashboard. - -{% image src="/docs/img/kiloclaw/discord.png" alt="Connect account screen" width="800" caption="Discord bot token entry" /%} - -Enter the token in the Settings tab and click **Save**. You can remove or replace a configured token at any time. - -#### Generate an Invite URL and Add the Bot to Your Server - -1. Click **OAuth2** on the sidebar -2. Scroll down to **OAuth2 URL Generator** and enable: - - `bot` - - `applications.commands` -3. A **Bot Permissions** section will appear below. Enable: - - View Channels - - Send Messages - - Read Message History - - Embed Links - - Attach Files - - Add Reactions (optional) -4. Copy the generated URL at the bottom -5. Paste it into your browser, select your server, and click **Continue** -6. You should now see your bot in the Discord server - -#### Start Chatting with the Bot - -1. Right-click on the Bot in Discord and click **Message** -2. DM the bot `/pair` -3. You should get a response back with a pairing code -4. Return to [app.kilocode.ai/claw](https://app.kilocode.ai/claw) and confirm the pairing code and approve -5. You should now be able to chat with the bot from Discord - -### Slack - -#### Step 1: Create a Slack App from the OpenClaw Manifest - -1. Go to [Slack App Management](https://api.slack.com/apps) and click **Create New App** → **From a Manifest** -2. Copy the manifest from the [OpenClaw docs](https://docs.openclaw.ai/channels/slack#manifest-and-scope-checklist) -3. Paste the manifest JSON into Slack's manifest editor -4. Customize the manifest before creating: - - Rename the app to your preferred name wherever it appears - - Update the slash command if desired (e.g., `/kiloclaw`) -5. Click **Create** - -#### Step 2: Generate Tokens - -You need two tokens from Slack: - -**App-Level Token** - -1. In your Slack app settings, scroll down to **App-Level Tokens** -2. Click **Generate Token** -3. Add the `connections:write` scope -4. Generate and copy the token (starts with `xapp-`) - -**Bot User OAuth Token** - -1. In the left sidebar, click **Install App** -2. Install the app to your workspace -3. Copy the **Bot User OAuth Token** (starts with `xoxb-`) - -#### Step 3: Connect Slack to KiloClaw - -1. In the [KiloClaw UI](https://app.kilo.ai/claw), find the Slack integration section (may show "not configured") -2. Enter both tokens: - - The `xapp-` app-level token - - The `xoxb-` bot user OAuth token -3. Click **Save** -4. Scroll to the top of the KiloClaw UI and click **Redeploy**. Wait for the instance to come back up - -#### Step 4: Pair Slack with KiloClaw - -1. In Slack, DM the app and type your slash command (e.g., `/claw`) followed by anything — this triggers the pairing flow - -> 📝 **Note** -> The slash command is whatever you defined in the manifest. Any text after the command will work to trigger pairing. - -2. The app will return a pairing code -3. Return to [app.kilocode.ai/claw](https://app.kilocode.ai/claw) and confirm the pairing code and approve -4. You should now be able to chat with the bot from Slack - -## Future Support - -Additional platforms (such as WhatsApp) are planned for future releases. For the latest on supported platforms, refer to the [OpenClaw documentation](https://docs.openclaw.ai). - -## Related - -- [KiloClaw Overview](/docs/kiloclaw/overview) -- [Dashboard Reference](/docs/kiloclaw/dashboard) -- [Troubleshooting](/docs/kiloclaw/troubleshooting) -- [KiloClaw Pricing](/docs/kiloclaw/pricing) -- [OpenClaw Documentation](https://docs.openclaw.ai) diff --git a/packages/kilo-docs/pages/kiloclaw/control-ui.md b/packages/kilo-docs/pages/kiloclaw/control-ui.md deleted file mode 100644 index 03aec4885ca..00000000000 --- a/packages/kilo-docs/pages/kiloclaw/control-ui.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -title: "OpenClaw Control UI" -description: "Browser-based dashboard for managing your OpenClaw instance" ---- - -# OpenClaw Control UI - -The Control UI is a browser-based dashboard (built with Vite + Lit) served by the OpenClaw Gateway on the same port as the gateway itself (default: `http://localhost:18789/`). It connects via WebSocket and gives you real-time control over your agent, channels, sessions, and system configuration. For KiloClaw users, see [Accessing the Control UI](/docs/kiloclaw/dashboard#accessing-the-control-ui) to get started. - -## Features - -- **Chat** — Send messages, stream responses with live tool-call output, view history, and abort runs. -- **Channels** — View the status of connected messaging platforms, scan QR codes for login, and edit per-channel config. -- **Sessions** — List active sessions with thinking and verbose overrides. -- **Cron Jobs** — Create, edit, enable/disable, run, and view history of scheduled tasks. -- **Skills** — View status, enable/disable, install, and manage API keys for skills. -- **Nodes** — List paired devices and their capabilities. -- **Exec Approvals** — Edit gateway or node command allowlists. See [Exec Approvals](#exec-approvals) below. -- **Config** — View and edit `openclaw.json` with schema-based form rendering and a raw JSON editor. -- **Logs** — Live tail of gateway logs with filtering and export. -- **Debug** — Status, health, model snapshots, event log, and manual RPC calls. -- **Update** — Run package updates and restart the gateway. - -For more details, please see the official [OpenClaw documentation](https://docs.openclaw.ai/web/control-ui). - -{% callout type="warning" %} -Do not use the **Update** feature in the Control UI to update KiloClaw. Use **Redeploy** from the [KiloClaw Dashboard](/docs/kiloclaw/dashboard#redeploy) instead. Updating via the Control UI will not apply the correct KiloClaw platform image and may break your instance. -{% /callout %} - -## Changing Models - -The Control UI Chat tab doubles as a command line for model management. KiloClaw exposes 335+ models through the `kilocode` provider and you can browse and switch between them without leaving the chat. - -| Command | Description | -| ------------------------------------ | ------------------------------------------------------------------------------- | -| `/model status` | View the currently active model and provider | -| `/models kilocode` | Browse available models (paginated, 20 per page) | -| `/models kilocode ` | Jump to a specific page (e.g. `/models kilocode 2`) | -| `/model kilocode//` | Switch to a specific model (e.g. `/model kilocode/anthropic/claude-sonnet-4.6`) | -| `/models kilocode all` | List every available model at once | - -Each `/models` response includes helper text at the bottom with shortcuts for switching, paging, and listing all models. - -To change the default model for all new sessions, edit `agents.defaults.model.primary` in your `openclaw.json` via **Config** in the Control UI (or the [KiloClaw Dashboard](/docs/kiloclaw/dashboard#changing-the-model) for a quick dropdown pick). - -For the full list of providers, advanced configuration, and CLI commands, see the [OpenClaw Model Providers documentation](https://docs.openclaw.ai/providers). - -## Authentication - -Auth is handled via token or password on the WebSocket handshake. Remote connections require one-time device pairing — the pairing request appears on the [KiloClaw Dashboard](/docs/kiloclaw/dashboard#pairing-requests) or in the Control UI itself. - -## Exec Approvals - -Exec approvals are the safety interlock that controls which commands your agent can run on the host machine (gateway or node). By default, **all host exec requests are denied** — you must explicitly allowlist the commands you want your agent to run independently. This prevents accidental execution of destructive commands. - -{% callout type="warning" %} -The default security policy is `deny`. You must configure an allowlist before your agent can execute any host commands. -{% /callout %} - -### How It Works - -Approvals are enforced locally on the execution host and sit on top of tool policy and elevated gating. The effective policy is always the **stricter** of `tools.exec.*` and the approvals defaults. Settings are stored in `~/.openclaw/exec-approvals.json` on the host. - -### Security Policies - -| Policy | Behavior | -| ----------- | ---------------------------------------------- | -| `deny` | Block all host exec requests (default) | -| `allowlist` | Allow only commands matching the allowlist | -| `full` | Allow everything (equivalent to elevated mode) | - -### Ask Behavior - -The `ask` setting controls when the user is prompted for approval: - -| Setting | Behavior | -| --------- | ------------------------------------------------------- | -| `off` | Never prompt | -| `on-miss` | Prompt only when the allowlist does not match (default) | -| `always` | Prompt on every command | - -If a prompt is required but no UI is reachable, the `askFallback` setting decides the outcome (`deny` by default). - -### Allowlists - -Allowlists are **per agent** — each agent has its own set of allowed command patterns. Patterns are case-insensitive globs that must resolve to binary paths (basename-only entries are ignored). - -Example patterns: - -``` -~/Projects/**/bin/rg -~/.local/bin/* -/opt/homebrew/bin/rg -``` - -Each entry tracks last-used metadata (timestamp, command, resolved path) so you can audit and keep the list tidy. - -### Approval Flow - -When a command requires approval, the gateway broadcasts the request to connected operator clients. The approval dialog shows the command, arguments, working directory, agent ID, and resolved path. You can: - -- **Allow once** — run the command now -- **Allow always** — add to the allowlist and run -- **Deny** — block the request - -Approval prompts can also be forwarded to chat channels (Slack, Telegram, Discord, etc.) and resolved with `/approve`. - -### Editing in the Control UI - -Navigate to **Nodes > Exec Approvals** in the Control UI to edit defaults, per-agent overrides, and allowlists. Select a scope (Defaults or a specific agent), adjust the policy, add or remove allowlist patterns, then save. - -## Related - -- [KiloClaw Dashboard](/docs/kiloclaw/dashboard) -- [KiloClaw Overview](/docs/kiloclaw/overview) -- [Connecting Chat Platforms](/docs/kiloclaw/chat-platforms) diff --git a/packages/kilo-docs/pages/kiloclaw/pricing.md b/packages/kilo-docs/pages/kiloclaw/pricing.md deleted file mode 100644 index 2d4be00d332..00000000000 --- a/packages/kilo-docs/pages/kiloclaw/pricing.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: "KiloClaw Pricing" -description: "Pricing details for KiloClaw instances and model inference" ---- - -# KiloClaw Pricing - -KiloClaw uses Kilo Gateway credits by default — if you route requests through BYOK, model usage is billed directly by your provider instead. - -### Instance Hosting - -KiloClaw hosting is **free during the beta period**. Each user gets a dedicated machine (2 shared vCPUs, 3 GB RAM, 10 GB SSD) at no cost. - -> ℹ️ **Info** -> Beta pricing is subject to change. Paid hosting tiers may be introduced after the beta period ends. Any changes will be announced in advance. - -### Model Inference - -Model usage is charged against your [Gateway credit balance](/docs/gateway/usage-and-billing). Costs vary by model — premium models like Claude Opus or GPT-5.4-pro cost more per token than smaller models. - -### Free Models - -Several models are available at **no additional cost** to your Gateway balance. These are great for getting started or for tasks that don't need the most powerful models. - -To see which models are currently free, check the [Kilo Leaderboard](https://kilo.ai/leaderboard#all-models) — free models are marked accordingly. - -### Adding Credits - -You can add Gateway credits from your [Kilo account](https://app.kilo.ai). Credits are shared across all Kilo products (VSCode extension, CLI, Cloud Agents, and KiloClaw). - -See [Adding Credits](/docs/getting-started/adding-credits) and [Gateway Usage and Billing](/docs/gateway/usage-and-billing) for details. - -## Related - -- [KiloClaw Overview](/docs/kiloclaw/overview) -- [Connecting Chat Platforms](/docs/kiloclaw/chat-platforms) -- [Gateway Usage and Billing](/docs/gateway/usage-and-billing) diff --git a/packages/kilo-docs/pages/kiloclaw/tools.md b/packages/kilo-docs/pages/kiloclaw/tools.md deleted file mode 100644 index 601e67e6dfd..00000000000 --- a/packages/kilo-docs/pages/kiloclaw/tools.md +++ /dev/null @@ -1,109 +0,0 @@ ---- -title: "Tools" -description: "Third-party tool integrations for your KiloClaw agent" ---- - -# Tools - -## 1Password Integration Guide - -Connect your KiloClaw agent to 1Password to securely manage credentials. This allows your agent to fetch API keys or passwords without ever seeing them in plain text. - -### Step 1: Create a Dedicated Vault - -For maximum security, do not give the bot access to your personal vault. - -1. Log in to your 1Password account. -2. Create a **New Vault** (e.g., name it `Kilo-Agent-Vault`). -3. Move only the specific items/keys you want the bot to use into this vault. - -### Step 2: Generate a Service Account Token - -1. Go to the [1Password Developer Portal](https://developer.1password.com/). -2. Select **Service Accounts** and click **Create a Service Account**. -3. **Important:** When prompted for permissions, select only the dedicated vault you created in Step 1. -4. Copy the generated token (it will begin with `ops_`). - -### Step 3: Configure KiloClaw - -1. Navigate to your KiloClaw dashboard: [app.kilo.ai/claw](https://app.kilo.ai/claw). -2. Go to **Settings > Tools** (or **Edit Files**). -3. Paste your `ops_` token into the **1Password Setup** field. -4. Click **Save**. - -### Step 4: Activate the Integration - -To apply the changes and inject the 1Password CLI into your environment: - -1. Select **Upgrade to latest**. -2. Perform a **Redeploy** to restart the agent with the new permissions active. - ---- - -## Brave Search Integration - -Equip your KiloClaw agent with real-time web browsing capabilities by integrating the Brave Search API. This allows the agent to fetch up-to-date information, perform market research, and verify facts beyond its training data. - -### How to Generate a Brave Search API Key - -To get started, you will need to obtain a "BSA" (Brave Search API) key from the Brave developer portal. - -#### 1. Access the Brave Search Dashboard - -Go to [api.search.brave.com](https://api.search.brave.com) and sign in or create a developer account. - -#### 2. Choose a Subscription Plan - -Brave Search API requires a paid subscription. Select the plan that fits your usage volume. - -#### 3. Create an API Key - -Once your account is active, navigate to the **API Keys** section and click **"Create New Key."** - -#### 4. Copy the Key - -Your key will typically begin with the prefix `BSA`. Copy this key immediately, as it may not be displayed again for security reasons. - ---- - -## AgentCard Integration - -Enable your KiloClaw agents to perform financial transactions by creating and managing virtual debit cards. This integration allows for automated purchasing and expense management within set limits. - -> ⚠️ **Important:** This tool permits your agent to spend real money. Use extreme caution with budget limits. AgentCard is currently in Beta; card issuance may be limited or waitlisted. - -### AgentCard Setup - -#### 1. Create an AgentCard Account - -Install the AgentCard CLI and sign up via your terminal: - -```bash -agent-cards signup -``` - -#### 2. Add a Payment Method - -Link your funding source (via Stripe) to enable the creation of virtual cards: - -```bash -agent-cards payment-method -``` - -#### 3. Retrieve Your API Key - -Open your local configuration file located at `~/.agent-cards/config.json`. Copy the value assigned to the `jwt` key. - -#### 4. Configure KiloClaw - -1. Paste the **JWT** into the AgentCard setup field in your KiloClaw settings. -2. Click **Save**. -3. Use **Redeploy** to apply the new secret. Only use **Upgrade & Redeploy** if you also need the latest platform version. - -### Available Tools - -Once activated, your agent will have access to: - -- `create_card`: Generate a new virtual debit card. -- `list_cards`: View existing cards and their statuses. -- `check_balance`: Monitor available funds. diff --git a/packages/kilo-docs/pages/kiloclaw/troubleshooting.md b/packages/kilo-docs/pages/kiloclaw/troubleshooting.md deleted file mode 100644 index c3f07a9f0a0..00000000000 --- a/packages/kilo-docs/pages/kiloclaw/troubleshooting.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -title: "Troubleshooting" -description: "Common issues, diagnostics, and FAQ for KiloClaw instances" ---- - -# Troubleshooting - -## OpenClaw Doctor - -OpenClaw Doctor is the recommended first step when something isn't working. It runs diagnostics on your instance and automatically fixes common configuration issues. - -To use it: - -1. Make sure your instance is running -2. Click **OpenClaw Doctor** on your [dashboard](/docs/kiloclaw/dashboard) -3. Watch the output as it runs — results appear in real time - -## Common Questions - -### Does Redeploy reset my instance? - -No. Redeploy does **not** delete your files, git repos, or cron jobs. It stops the machine, applies the latest platform image and your current configuration, and starts it again with the same persistent storage. Think of it as "update and restart." - -### When should I use Restart OpenClaw vs Redeploy? - -- **Restart OpenClaw** — Restarts just the OpenClaw process. The machine stays up. Use this for quick recovery from a process-level issue or when you want to apply openclaw config changes. -- **Redeploy** — Stops and restarts the entire machine with the latest image and config. Use this when the changelog shows a redeploy hint, or after changing channel tokens or secrets. - -### My bot isn't responding on Telegram/Discord/Slack - -1. Check that the channel token is configured in [Settings](/docs/kiloclaw/dashboard#channels) -2. Make sure you **Redeployed** or **Restarted OpenClaw** after saving tokens -3. Check for pending [pairing requests](/docs/kiloclaw/chat-platforms#pairing-requests) — the user may need to be approved -4. Try running **OpenClaw Doctor** - -### Accessing and Restoring Config Files - -You can directly access the files in /root/.openclaw/ on the [KiloClaw Dashboard](https://app.kilo.ai/claw) using the file browser of the edit files dialog. This can be a useful way to examine or update the config files (especially `openclaw.json`) if you run into an issue. There may also be backups in the form of `openclaw.bak` files that you can manually restore from if needed. - -### The gateway shows "Crashed" - -The OpenClaw process is automatically restarted when it crashes. Check the Gateway Process tab on your dashboard for the exit code and restart count. If it keeps crashing: - -1. Run **OpenClaw Doctor** -2. Try a **Redeploy** to apply the latest platform image -3. If the issue persists, join the [Kilo Discord](https://kilo.ai/discord) and share details in the KiloClaw channel - -### I changed the model but the agent is still using the old one - -After selecting a new model, click **Save & Provision** to apply it. This refreshes the API key and saves the new model. You may also need to **Restart OpenClaw** for the change to take full effect. - -## Gateway Process States - -The Gateway Process tab shows the current state of the OpenClaw process inside your machine: - -- **Running** — The process is up and handling requests -- **Stopped** — The process is not running -- **Starting** — The process is booting up -- **Stopping** — The process is shutting down gracefully -- **Crashed** — The process exited unexpectedly and will be automatically restarted -- **Shutting Down** — The process is stopping as part of a machine stop or redeploy - -## FAQ - -### How can I change my model? - -You can change the model in two ways: - -- **From chat** — Type `/model` in the Chat window within the OpenClaw Control UI to switch models directly. -- **From the dashboard** — Go to [https://app.kilo.ai/claw](https://app.kilo.ai/claw), select the model you want, and click **Save**. No redeploy is needed. - -### Can I access the filesystem? - -You can access instance files in `/root/.openclaw/` directly from the [KiloClaw Dashboard](https://app.kilo.ai/claw). This is useful for examining or restoring config files — see [Accessing and Restoring Config Files](#accessing-and-restoring-config-files) above. You can also interact with files through your OpenClaw agent using its built-in file tools. - -### Can I access my KiloClaw via SSH? - -For security reasons, SSH access is currently disabled for all KiloClaw instances. Our primary goal is to provide a secure environment for all users, and restricting direct SSH access is one of the many measures we take to ensure the platform remains safe and protected for everyone. - -### How can I update my OpenClaw? - -Do **not** click **Update Now** inside the OpenClaw Control UI — this is not supported for KiloClaw instances and may break your setup. - -Updates are managed by the KiloClaw platform team to ensure stability. When a new version is available, it will be announced in the **Changelog** on your dashboard. To apply the update, click **Upgrade & Redeploy** from the [KiloClaw Dashboard](/docs/kiloclaw/dashboard#redeploy). - -## Architecture Notes - -For advanced users — how KiloClaw instances are structured: - -- **Dedicated machine** — Each user gets their own machine and persistent volume. There is no shared infrastructure between users. -- **Region-pinned storage** — Your persistent volume stays in the region where your instance was originally created. -- **Network isolation** — OpenClaw binds to loopback only; external traffic is proxied through a Kilo controller. -- **Per-user authentication** — The gateway token is derived per-user for authenticating requests to your machine. -- **Encryption at rest** — Sensitive data (API keys, channel tokens) is encrypted at rest in the machine configuration. - -## Related - -- [KiloClaw Overview](/docs/kiloclaw/overview) -- [Dashboard Reference](/docs/kiloclaw/dashboard) -- [Connecting Chat Platforms](/docs/kiloclaw/chat-platforms) -- [KiloClaw Pricing](/docs/kiloclaw/pricing) diff --git a/packages/kilo-docs/pages/kiloclaw/version-pinning.md b/packages/kilo-docs/pages/kiloclaw/version-pinning.md deleted file mode 100644 index 5f2157e7629..00000000000 --- a/packages/kilo-docs/pages/kiloclaw/version-pinning.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: "Version Pinning" -description: "Pin your KiloClaw instance to a specific OpenClaw version and variant" ---- - -# Version Pinning - -Version pinning lets you lock your KiloClaw instance to a specific OpenClaw version and variant. This gives you control over when your instance upgrades — it stays on the pinned version until you explicitly change it. - -## When to Use Version Pinning - -Version pinning is useful when: - -- A changelog entry is marked **Redeploy Required** and you're not ready to upgrade yet -- You're running a workflow that depends on specific OpenClaw behavior -- You want to test the impact of an upgrade before committing to it - -## How to Pin a Version - -1. Go to your [KiloClaw dashboard](https://app.kilo.ai/profile) -2. Open the **Settings** tab -3. Scroll to the **Version Pinning** section -4. Select a **version** and **variant** from the dropdowns -5. Click **Save** - -Your instance will stay on the selected version until you change or clear the pin. - -{% callout type="info" %} -After saving a version pin, you need to **Redeploy** for the change to take effect on your running instance. -{% /callout %} - -## Variants - -Each OpenClaw version is available in one or more variants. Variants may differ in included tools, default configuration, or base image. Select the variant that matches your use case, or use the default if unsure. - -## Clearing a Pin - -To return to automatic updates: - -1. Go to **Settings > Version Pinning** -2. Clear the version selection -3. Click **Save** -4. Use **Upgrade & Redeploy** from the dashboard to apply the latest platform version - -{% callout type="warning" %} -Clearing a pin and running **Upgrade & Redeploy** will update your instance to the latest supported platform version. Review the changelog before upgrading to check for breaking changes. -{% /callout %} - -## Related - -- [Dashboard Reference](/docs/kiloclaw/dashboard) -- [KiloClaw Overview](/docs/kiloclaw/overview) -- [Troubleshooting](/docs/kiloclaw/troubleshooting) From 560b0a13ad5dc3dd35b2fbfe288be11bfe9c8fc2 Mon Sep 17 00:00:00 2001 From: Ligia Zanchet Date: Thu, 26 Mar 2026 15:41:02 +0100 Subject: [PATCH 18/81] docs: add overview index pages for Tools, Chat Platforms, and Development Tools --- packages/kilo-docs/lib/nav/kiloclaw.ts | 9 +++++--- .../pages/kiloclaw/chat-platforms/index.md | 21 +++++++++++++++++++ .../pages/kiloclaw/development-tools/index.md | 13 ++++++++++++ .../kilo-docs/pages/kiloclaw/tools/index.md | 14 +++++++++++++ 4 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 packages/kilo-docs/pages/kiloclaw/chat-platforms/index.md create mode 100644 packages/kilo-docs/pages/kiloclaw/development-tools/index.md create mode 100644 packages/kilo-docs/pages/kiloclaw/tools/index.md diff --git a/packages/kilo-docs/lib/nav/kiloclaw.ts b/packages/kilo-docs/lib/nav/kiloclaw.ts index 1aac3c672a8..90ee60a72dc 100644 --- a/packages/kilo-docs/lib/nav/kiloclaw.ts +++ b/packages/kilo-docs/lib/nav/kiloclaw.ts @@ -18,26 +18,29 @@ export const KiloClawNav: NavSection[] = [ ], }, { - href: "/kiloclaw/chat-platforms/telegram", + href: "/kiloclaw/chat-platforms", children: "Chat Platforms", subLinks: [ + { href: "/kiloclaw/chat-platforms", children: "Overview" }, { href: "/kiloclaw/chat-platforms/telegram", children: "Telegram" }, { href: "/kiloclaw/chat-platforms/discord", children: "Discord" }, { href: "/kiloclaw/chat-platforms/slack", children: "Slack" }, ], }, { - href: "/kiloclaw/development-tools/github", + href: "/kiloclaw/development-tools", children: "Development Tools", subLinks: [ + { href: "/kiloclaw/development-tools", children: "Overview" }, { href: "/kiloclaw/development-tools/github", children: "GitHub" }, { href: "/kiloclaw/development-tools/google", children: "Google Workspace" }, ], }, { - href: "/kiloclaw/tools/1password", + href: "/kiloclaw/tools", children: "Tools", subLinks: [ + { href: "/kiloclaw/tools", children: "Overview" }, { href: "/kiloclaw/tools/1password", children: "1Password" }, { href: "/kiloclaw/tools/brave-search", children: "Brave Search" }, { href: "/kiloclaw/tools/agentcard", children: "AgentCard" }, diff --git a/packages/kilo-docs/pages/kiloclaw/chat-platforms/index.md b/packages/kilo-docs/pages/kiloclaw/chat-platforms/index.md new file mode 100644 index 00000000000..69482f76a5c --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/chat-platforms/index.md @@ -0,0 +1,21 @@ +--- +title: "Chat Platforms" +description: "Connect your KiloClaw agent to Telegram, Discord, and Slack" +--- + +# Chat Platforms + +KiloClaw supports connecting your AI agent to messaging platforms so it can receive instructions and send responses directly in your chat apps. You can configure channels from the **Settings** tab on your [KiloClaw dashboard](/docs/kiloclaw/dashboard#channels), or from the OpenClaw Control UI after accessing your instance. + +The general steps to connect any chat platform are: + +1. Configure the channel token in Settings +2. Redeploy the KiloClaw instance +3. Initiate the pairing in the chat app +4. Accept the pairing request in the [KiloClaw UI](https://app.kilo.ai/claw) + +## Supported Platforms + +- [**Telegram**](/docs/kiloclaw/chat-platforms/telegram) — Connect via a BotFather bot token. +- [**Discord**](/docs/kiloclaw/chat-platforms/discord) — Connect via a Discord Developer Portal bot token. +- [**Slack**](/docs/kiloclaw/chat-platforms/slack) — Connect via a Slack app manifest with app-level and bot tokens. diff --git a/packages/kilo-docs/pages/kiloclaw/development-tools/index.md b/packages/kilo-docs/pages/kiloclaw/development-tools/index.md new file mode 100644 index 00000000000..a99a3d705de --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/development-tools/index.md @@ -0,0 +1,13 @@ +--- +title: "Development Tools" +description: "Connect your KiloClaw agent to development platforms like GitHub and Google Workspace" +--- + +# Development Tools + +KiloClaw supports integrations with popular development platforms, allowing your agent to interact with repositories, code reviews, calendars, documents, and more — all autonomously. + +## Available Integrations + +- [**GitHub**](/docs/kiloclaw/development-tools/github) — Clone repositories, push commits, open pull requests, and leave code reviews. +- [**Google Workspace**](/docs/kiloclaw/development-tools/google) — Access Gmail, Calendar, Drive, Docs, Sheets, Slides, Tasks, and more. diff --git a/packages/kilo-docs/pages/kiloclaw/tools/index.md b/packages/kilo-docs/pages/kiloclaw/tools/index.md new file mode 100644 index 00000000000..4a17e3289e7 --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/tools/index.md @@ -0,0 +1,14 @@ +--- +title: "Tools" +description: "Third-party tool integrations for your KiloClaw agent" +--- + +# Tools + +KiloClaw supports integrations with third-party tools that extend your agent's capabilities — from secure credential management to web search and financial transactions. + +## Available Integrations + +- [**1Password**](/docs/kiloclaw/tools/1password) — Securely manage credentials and let your agent fetch API keys or passwords without ever seeing them in plain text. +- [**Brave Search**](/docs/kiloclaw/tools/brave-search) — Equip your agent with real-time web browsing via the Brave Search API. +- [**AgentCard**](/docs/kiloclaw/tools/agentcard) — Enable your agent to perform financial transactions using virtual debit cards. From 1cf072d1d9230518bf1a1be23e6f8d0abe8355a3 Mon Sep 17 00:00:00 2001 From: Josh Lambert Date: Fri, 27 Mar 2026 00:37:17 -0400 Subject: [PATCH 19/81] docs(kilo-docs): fix tab order, split combined tabs, address review comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reorder all tabs to VSCode → CLI → VSCode (Legacy) across 7 files - Split 'VSCode & CLI' combined tabs into separate VSCode and CLI tabs in browser-use.md and checkpoints.md - autocomplete/index.md: add Cmd+L caveat (requires setting to enable), remove 'new extension' wording - cli.md: fix opencode.json → kilo.jsonc, platform: next → new, fix using-modes → using-agents link - vscode.md: fix kilo.json → kilo.jsonc, using-modes → using-agents link - git-commit-generation.md: fix kilo.json → kilo.jsonc --- .../features/autocomplete/index.md | 76 ++++---- .../code-with-ai/features/browser-use.md | 162 ++++++++++-------- .../code-with-ai/features/checkpoints.md | 91 ++++++---- .../code-with-ai/features/code-actions.md | 48 +++--- .../features/git-commit-generation.md | 22 +-- .../pages/code-with-ai/platforms/cli.md | 6 +- .../pages/code-with-ai/platforms/vscode.md | 46 ++--- 7 files changed, 248 insertions(+), 203 deletions(-) diff --git a/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md b/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md index 42c6ebb7afe..be5a983a472 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md +++ b/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md @@ -8,6 +8,46 @@ description: "AI-powered code autocompletion in Kilo Code" Kilo Code's autocomplete feature provides intelligent code suggestions and completions while you're typing, helping you write code faster and more efficiently. It offers both automatic and manual triggering options. {% tabs %} +{% tab label="VSCode" %} + +{% callout type="info" %} +Autocomplete is an **extension-only** feature. It is not available in the CLI/TUI. +{% /callout %} + +## How Autocomplete Works + +The extension uses **Fill-in-the-Middle (FIM)** completion powered by Codestral (`mistralai/codestral-2508`). It analyzes the code before and after your cursor to generate contextually accurate inline suggestions. + +## Triggering Options + +### Auto-trigger + +Autocomplete is **enabled by default** and automatically shows inline suggestions as you type. Suggestions appear as ghost text that you can accept with `Tab`. + +### Trigger on keybinding (Cmd+L) + +Press `Cmd+L` (Mac) or `Ctrl+L` (Windows/Linux) to manually request a completion at your cursor position. + +{% callout type="note" %} +This keybinding requires `kilo-code.new.autocomplete.enableSmartInlineTaskKeybinding` to be enabled in VS Code settings. It is **disabled by default**. +{% /callout %} + +## Status Bar + +The extension displays an **autocomplete status indicator** in the VS Code status bar, including: + +- Current autocomplete state (active/snoozed) +- Cumulative cost tracking for autocomplete requests + +### Snooze / Unsnooze + +You can temporarily disable autocomplete by clicking the status bar item to **snooze** it. Click again to **unsnooze** and re-enable suggestions. + +## Copilot Conflict Detection + +The extension automatically detects if **GitHub Copilot** inline suggestions are enabled and warns you about potential conflicts. Disable Copilot's inline completions for the best experience with Kilo Code autocomplete. + +{% /tab %} {% tab label="VSCode (Legacy)" %} ## How Autocomplete Works @@ -89,42 +129,6 @@ If using Cursor, go to **Settings** > **Cursor Settings** > **Tab**, and toggle {% image src="https://github.com/user-attachments/assets/fd2eeae2-f770-40ca-8a72-a9d5a1c17d47" alt="Disable Cursor autocomplete" width="800" caption="Disable Cursor autocomplete" /%} -{% /tab %} -{% tab label="VSCode" %} - -{% callout type="info" %} -Autocomplete is an **extension-only** feature. It is not available in the CLI/TUI. -{% /callout %} - -## How Autocomplete Works - -The new extension uses **Fill-in-the-Middle (FIM)** completion powered by Codestral (`mistralai/codestral-2508`). It analyzes the code before and after your cursor to generate contextually accurate inline suggestions. - -## Triggering Options - -### Auto-trigger - -Autocomplete is **enabled by default** and automatically shows inline suggestions as you type. Suggestions appear as ghost text that you can accept with `Tab`. - -### Trigger on keybinding (Cmd+L) - -Press `Cmd+L` (Mac) or `Ctrl+L` (Windows/Linux) to manually request a completion at your cursor position. - -## Status Bar - -The extension displays an **autocomplete status indicator** in the VS Code status bar, including: - -- Current autocomplete state (active/snoozed) -- Cumulative cost tracking for autocomplete requests - -### Snooze / Unsnooze - -You can temporarily disable autocomplete by clicking the status bar item to **snooze** it. Click again to **unsnooze** and re-enable suggestions. - -## Copilot Conflict Detection - -The new extension automatically detects if **GitHub Copilot** inline suggestions are enabled and warns you about potential conflicts. Disable Copilot's inline completions for the best experience with Kilo Code autocomplete. - {% /tab %} {% /tabs %} diff --git a/packages/kilo-docs/pages/code-with-ai/features/browser-use.md b/packages/kilo-docs/pages/code-with-ai/features/browser-use.md index 34e0c5d8fd1..a8c2a979a8a 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/browser-use.md +++ b/packages/kilo-docs/pages/code-with-ai/features/browser-use.md @@ -14,29 +14,20 @@ Browser Use requires an advanced agentic model. It is typically most reliable wi ## How Browser Use Works {% tabs %} -{% tab label="VSCode (Legacy)" %} - -By default, Kilo Code uses a built-in browser that: - -- Launches automatically when you ask Kilo to visit a website -- Captures screenshots of web pages -- Allows Kilo to interact with web elements -- Runs invisibly in the background - -All of this happens directly within VS Code, with no setup required. - -{% /tab %} -{% tab label="VSCode & CLI" %} +{% tab label="VSCode" %} Kilo Code uses [Playwright](https://playwright.dev/) via MCP (`@playwright/mcp@latest`) for browser automation. The Playwright MCP server is registered dynamically as `kilo-playwright`. -**In the VS Code extension**, browser automation is auto-configured: +Browser automation is auto-configured in the extension: - Toggle it on from **Settings → Browser** tab - Configure `browserAutomation.headless` and `browserAutomation.useSystemChrome` settings - Playwright auto-downloads Chromium on first use -**In CLI-only mode**, you need to manually add the MCP server to your `kilo.json` configuration: +{% /tab %} +{% tab label="CLI" %} + +Kilo Code uses [Playwright](https://playwright.dev/) via MCP (`@playwright/mcp@latest`) for browser automation. Add the MCP server to your `kilo.jsonc` configuration: ```json { @@ -49,7 +40,19 @@ Kilo Code uses [Playwright](https://playwright.dev/) via MCP (`@playwright/mcp@l } ``` -Once configured, Playwright downloads Chromium automatically on first use. +Playwright downloads Chromium automatically on first use. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +By default, Kilo Code uses a built-in browser that: + +- Launches automatically when you ask Kilo to visit a website +- Captures screenshots of web pages +- Allows Kilo to interact with web elements +- Runs invisibly in the background + +All of this happens directly within VS Code, with no setup required. {% /tab %} {% /tabs %} @@ -72,30 +75,7 @@ For example: ## How Browser Actions Work {% tabs %} -{% tab label="VSCode (Legacy)" %} - -The browser_action tool controls a browser instance that returns screenshots and console logs after each action, allowing you to see the results of interactions. - -Key characteristics: - -- Each browser session must start with `launch` and end with `close` -- Only one browser action can be used per message -- While the browser is active, no other tools can be used -- You must wait for the response (screenshot and logs) before performing the next action - -### Available Browser Actions - -| Action | Description | When to Use | -| ------------- | ------------------------------ | ------------------------------------- | -| `launch` | Opens a browser at a URL | Starting a new browser session | -| `click` | Clicks at specific coordinates | Interacting with buttons, links, etc. | -| `type` | Types text into active element | Filling forms, search boxes | -| `scroll_down` | Scrolls down by one page | Viewing content below the fold | -| `scroll_up` | Scrolls up by one page | Returning to previous content | -| `close` | Closes the browser | Ending a browser session | - -{% /tab %} -{% tab label="VSCode & CLI" %} +{% tab label="VSCode" %} The Playwright MCP server provides a set of browser tools for interacting with web pages. These tools return screenshots and accessibility snapshots after each action. @@ -118,12 +98,86 @@ Key characteristics: | `browser_select` | Selects an option from a dropdown | Choosing from select elements | | `browser_drag` | Drags an element to a target | Drag-and-drop interactions | +{% /tab %} +{% tab label="CLI" %} + +The Playwright MCP server provides a set of browser tools for interacting with web pages. These tools return screenshots and accessibility snapshots after each action. + +Key characteristics: + +- The browser launches automatically when a browser tool is invoked +- Multiple browser tools can be used in sequence +- Screenshots are captured after each action for visual feedback + +### Available Browser Tools + +| Tool | Description | When to Use | +| -------------------- | ----------------------------------- | ------------------------------------- | +| `browser_navigate` | Navigates to a URL | Opening a web page | +| `browser_click` | Clicks an element on the page | Interacting with buttons, links, etc. | +| `browser_type` | Types text into an input element | Filling forms, search boxes | +| `browser_screenshot` | Captures a screenshot of the page | Inspecting visual state | +| `browser_scroll` | Scrolls the page or a specific area | Viewing content above or below | +| `browser_hover` | Hovers over an element | Revealing tooltips or menus | +| `browser_select` | Selects an option from a dropdown | Choosing from select elements | +| `browser_drag` | Drags an element to a target | Drag-and-drop interactions | + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +The browser_action tool controls a browser instance that returns screenshots and console logs after each action, allowing you to see the results of interactions. + +Key characteristics: + +- Each browser session must start with `launch` and end with `close` +- Only one browser action can be used per message +- While the browser is active, no other tools can be used +- You must wait for the response (screenshot and logs) before performing the next action + +### Available Browser Actions + +| Action | Description | When to Use | +| ------------- | ------------------------------ | ------------------------------------- | +| `launch` | Opens a browser at a URL | Starting a new browser session | +| `click` | Clicks at specific coordinates | Interacting with buttons, links, etc. | +| `type` | Types text into active element | Filling forms, search boxes | +| `scroll_down` | Scrolls down by one page | Viewing content below the fold | +| `scroll_up` | Scrolls up by one page | Returning to previous content | +| `close` | Closes the browser | Ending a browser session | + {% /tab %} {% /tabs %} ## Browser Use Settings {% tabs %} +{% tab label="VSCode" %} + +Browser automation settings are available under **Settings → Browser**: + +- **Enable browser automation**: Toggle to enable or disable Playwright browser automation +- **Headless mode** (`browserAutomation.headless`): Run the browser without a visible window (default: disabled) +- **Use system Chrome** (`browserAutomation.useSystemChrome`): Use your installed Chrome instead of the bundled Chromium + +{% /tab %} +{% tab label="CLI" %} + +Browser automation requires manual MCP configuration in your `kilo.jsonc` file: + +```json +{ + "mcp": { + "playwright": { + "type": "local", + "command": ["npx", "-y", "@playwright/mcp@latest"] + } + } +} +``` + +No additional settings are needed — the Playwright MCP server manages the browser lifecycle automatically. Chromium is downloaded on first use. + +{% /tab %} {% tab label="VSCode (Legacy)" %} {% callout type="info" title="Default Browser Settings" %} @@ -227,33 +281,5 @@ Connect to a visible Chrome window to observe Kilo's interactions in real-time: google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug --no-first-run ``` -{% /tab %} -{% tab label="VSCode & CLI" %} - -### VS Code Extension Settings - -In the VS Code extension, browser automation settings are available under **Settings → Browser**: - -- **Enable browser automation**: Toggle to enable or disable Playwright browser automation -- **Headless mode** (`browserAutomation.headless`): Run the browser without a visible window (default: disabled) -- **Use system Chrome** (`browserAutomation.useSystemChrome`): Use your installed Chrome instead of the bundled Chromium - -### CLI Configuration - -In CLI-only mode, browser automation requires manual MCP configuration in your `kilo.json` file: - -```json -{ - "mcp": { - "playwright": { - "type": "local", - "command": ["npx", "-y", "@playwright/mcp@latest"] - } - } -} -``` - -No additional settings are needed — the Playwright MCP server manages the browser lifecycle automatically. Chromium is downloaded on first use. - {% /tab %} {% /tabs %} diff --git a/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md b/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md index 08c4abd7b79..1c84f5a1b10 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md +++ b/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md @@ -28,22 +28,12 @@ Checkpoints let you: ## Configuration Options {% tabs %} -{% tab label="VSCode (Legacy)" %} - -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" /%} - -{% /tab %} -{% tab label="VSCode & CLI" %} +{% tab label="VSCode" %} Checkpoints are controlled by the `snapshot` boolean: - **Settings UI**: Open Settings → Checkpoints tab and toggle the snapshot setting -- **Config file**: Set `"snapshot": true` or `"snapshot": false` in your `kilo.json` configuration file +- **Config file**: Set `"snapshot": true` or `"snapshot": false` in your `kilo.jsonc` configuration file ```json { @@ -53,6 +43,29 @@ Checkpoints are controlled by the `snapshot` boolean: When enabled, the system automatically captures snapshots at each step of a task. +{% /tab %} +{% tab label="CLI" %} + +Checkpoints are controlled by the `snapshot` boolean in your `kilo.jsonc` configuration file: + +```json +{ + "snapshot": true +} +``` + +When enabled, the system automatically captures snapshots at each step of a task. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +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" /%} + {% /tab %} {% /tabs %} @@ -71,6 +84,34 @@ Checkpoints are stored as Git commits in the shadow repository, capturing: ## Working with Checkpoints {% tabs %} +{% tab label="VSCode" %} + +Checkpoints are captured automatically at each step of a task, recording Git tree objects at each step. + +### Reverting Changes + +- **Full revert**: Revert your workspace to any point in the conversation +- **Undo a revert**: Restore the state before the last revert +- **Per-file revert**: Selectively undo changes to specific files while keeping others + +### Viewing Differences + +Diffs show per-file changes at each step. In the **Agent Manager**, these are displayed in a dedicated diff panel with full before/after file content. + +{% /tab %} +{% tab label="CLI" %} + +Checkpoints are captured automatically at each step of a task, recording Git tree objects at each step. + +In the CLI terminal interface, checkpoints appear as revert points in the conversation. You can revert to any point by selecting the corresponding message. + +### Reverting Changes + +- **Full revert**: Revert your workspace to any point in the conversation +- **Undo a revert**: Restore the state before the last revert +- **Per-file revert**: Selectively undo changes to specific files while keeping others + +{% /tab %} {% tab label="VSCode (Legacy)" %} Checkpoints are integrated directly into your workflow through the chat interface. @@ -118,32 +159,6 @@ To restore a project to a previous checkpoint state: {% image src="/docs/img/checkpoints/checkpoints-9.png" alt="Confirmation dialog for restoring checkpoint with files & task" width="300" /%} -{% /tab %} -{% tab label="VSCode & CLI" %} - -Checkpoints are captured automatically at each step of a task. The system calls `Snapshot.track()` at `start-step` and `finish-step` events, recording Git tree objects via `git write-tree`. - -### CLI TUI - -In the CLI terminal interface, checkpoints appear as revert points in the conversation. You can revert to any point by selecting the corresponding message. - -### Reverting Changes - -The new platform provides flexible revert capabilities: - -- **Full revert**: Use `SessionRevert.revert({ sessionID, messageID, partID })` to revert your workspace to any point in the conversation -- **Undo a revert**: Use `unrevert()` to restore the state before the last revert -- **Per-file revert**: `Snapshot.revert(patches)` can revert individual files via `git checkout -- `, allowing you to selectively undo changes to specific files while keeping others - -### Viewing Differences - -The system provides detailed diff capabilities: - -- `Snapshot.diff()` returns per-file diffs showing what changed at each step -- `Snapshot.diffFull()` returns full before/after file content for detailed review - -In the **Agent Manager** (VS Code extension), these diffs are displayed in a dedicated `DiffPanel` and `FullScreenDiffView`, providing a visual interface for reviewing all file changes made during a session. - {% /tab %} {% /tabs %} diff --git a/packages/kilo-docs/pages/code-with-ai/features/code-actions.md b/packages/kilo-docs/pages/code-with-ai/features/code-actions.md index 323b1fe7127..0cf1059a108 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/code-actions.md +++ b/packages/kilo-docs/pages/code-with-ai/features/code-actions.md @@ -12,6 +12,30 @@ Code Actions are a **VS Code extension feature** and are not available in the CL {% /callout %} {% tabs %} +{% tab label="VSCode" %} + +## Available Code Actions + +The extension provides code actions via the editor context menu and lightbulb: + +- **Add to Context:** Adds selected code (with file path and line numbers) to the active chat session. Keyboard shortcut: `Cmd+K Cmd+A` (Mac) or `Ctrl+K Ctrl+A` (Windows/Linux). +- **Explain Code:** Asks Kilo to explain the selected code. +- **Fix Code:** Asks Kilo to fix problems in the selected code. +- **Improve Code:** Asks Kilo to suggest improvements to the selected code. + +### Agent Manager Integration + +If the **Agent Manager** is active, code actions route to the current Agent Manager session rather than the sidebar chat. This allows code actions to work seamlessly within multi-session workflows. + +### Terminal Context Menu + +The extension also adds code actions to the **terminal context menu**: + +- **Add Terminal Content:** Adds selected terminal output to the chat context. +- **Fix Command:** Asks Kilo to fix a failed terminal command. +- **Explain Command:** Asks Kilo to explain a terminal command or its output. + +{% /tab %} {% tab label="VSCode (Legacy)" %} ## What are Code Actions? @@ -97,30 +121,6 @@ You can customize the prompts used for each Code Action by modifying the "Suppor 3. **Edit the Prompts:** Modify the text in the text area for the prompt you want to customize. You can use placeholders like `${filePath}` and `${selectedText}` to include information about the current file and selection. 4. **Click "Done":** Save your changes. -{% /tab %} -{% tab label="VSCode" %} - -## Available Code Actions - -The new extension provides the same core code actions via the editor context menu and lightbulb: - -- **Add to Context:** Adds selected code (with file path and line numbers) to the active chat session. Keyboard shortcut: `Cmd+K Cmd+A` (Mac) or `Ctrl+K Ctrl+A` (Windows/Linux). -- **Explain Code:** Asks Kilo to explain the selected code. -- **Fix Code:** Asks Kilo to fix problems in the selected code. -- **Improve Code:** Asks Kilo to suggest improvements to the selected code. - -### Agent Manager Integration - -If the **Agent Manager** is active, code actions route to the current Agent Manager session rather than the sidebar chat. This allows code actions to work seamlessly within multi-session workflows. - -### Terminal Context Menu - -The new extension also adds code actions to the **terminal context menu**: - -- **Add Terminal Content:** Adds selected terminal output to the chat context. -- **Fix Command:** Asks Kilo to fix a failed terminal command. -- **Explain Command:** Asks Kilo to explain a terminal command or its output. - {% /tab %} {% /tabs %} diff --git a/packages/kilo-docs/pages/code-with-ai/features/git-commit-generation.md b/packages/kilo-docs/pages/code-with-ai/features/git-commit-generation.md index 41fa60a17cd..6485311aa07 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/git-commit-generation.md +++ b/packages/kilo-docs/pages/code-with-ai/features/git-commit-generation.md @@ -54,6 +54,17 @@ Common types include: ## Configuration {% tabs %} +{% tab label="VSCode" %} + +The extension provides the same **SCM button** in the VS Code Source Control panel. Clicking it generates a commit message using the CLI backend's commit message generation API. + +Configuration is handled through the extension's settings or the shared `kilo.jsonc` config file. + +{% callout type="info" %} +Git commit message generation is a **VS Code extension feature**. It is not available in the CLI/TUI. +{% /callout %} + +{% /tab %} {% tab label="VSCode (Legacy)" %} ### Customizing the Commit Template @@ -84,17 +95,6 @@ You can configure which API profile to use for commit message generation: Consider creating a dedicated [API configuration profile](/docs/ai-providers) with a faster, more cost-effective model specifically for commit message generation. {% /callout %} -{% /tab %} -{% tab label="VSCode" %} - -The new extension provides the same **SCM button** in the VS Code Source Control panel. Clicking it generates a commit message using the CLI backend's `client.commitMessage.generate()` API. - -Configuration is handled through the extension's settings or the shared `kilo.json` config file. - -{% callout type="info" %} -Git commit message generation is a **VS Code extension feature**. It is not available in the CLI/TUI. -{% /callout %} - {% /tab %} {% /tabs %} diff --git a/packages/kilo-docs/pages/code-with-ai/platforms/cli.md b/packages/kilo-docs/pages/code-with-ai/platforms/cli.md index f6e80b3e11d..91b40871124 100644 --- a/packages/kilo-docs/pages/code-with-ai/platforms/cli.md +++ b/packages/kilo-docs/pages/code-with-ai/platforms/cli.md @@ -1,7 +1,7 @@ --- title: "Kilo CLI" description: "Using Kilo Code from the command line" -platform: next +platform: new --- {% callout type="warning" title="Version Notice" %} @@ -168,7 +168,7 @@ Review your code locally before pushing — catch issues early without waiting f Configuration is managed through: - `/connect` command for provider setup (interactive) -- Config files in **`~/.config/kilo/`**: the CLI (Kilo CLI 1.0 from [Kilo-Org/kilocode](https://github.com/Kilo-Org/kilocode)) 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 Kilo Code](/docs/automate/mcp/using-in-kilo-code) for MCP config format. +- Config files in **`~/.config/kilo/`**: use **`kilo.jsonc`** for provider, model, permission, and **MCP** settings. Restart the CLI after editing. See [Using MCP in Kilo Code](/docs/automate/mcp/using-in-kilo-code) for MCP config format. - `kilo auth` for credential management ## Slash Commands @@ -176,7 +176,7 @@ Configuration is managed through: 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. {% callout type="tip" %} -**Confused about /newtask vs /smol in the IDE?** See the [Using Modes](/docs/code-with-ai/agents/using-modes#understanding-newtask-vs-smol) documentation for details. +**Confused about /newtask vs /smol in the IDE?** See the [Using Agents](/docs/code-with-ai/agents/using-agents#understanding-newtask-vs-smol) documentation for details. {% /callout %} ## Permissions diff --git a/packages/kilo-docs/pages/code-with-ai/platforms/vscode.md b/packages/kilo-docs/pages/code-with-ai/platforms/vscode.md index 8604b5f96f3..2db22d89a61 100644 --- a/packages/kilo-docs/pages/code-with-ai/platforms/vscode.md +++ b/packages/kilo-docs/pages/code-with-ai/platforms/vscode.md @@ -8,26 +8,6 @@ description: "Using Kilo Code in Visual Studio Code" Kilo Code is available as two VS Code extensions: the **VSCode (Legacy)** extension and the current **VSCode** version built on the Kilo CLI core. {% tabs %} -{% tab label="VSCode (Legacy)" %} - -## Installation - -{% partial file="install-vscode.md" /%} - -## Key Features - -- **Sidebar chat** — AI-powered chat panel in the VS Code activity bar -- **[Autocomplete](/docs/code-with-ai/features/autocomplete)** — Inline code completions as you type -- **[Code Actions](/docs/code-with-ai/features/code-actions)** — Explain, fix, and improve code from the editor context menu -- **[Modes](/docs/code-with-ai/agents/using-modes)** — Code, Ask, Architect, Debug, Orchestrator, and Review modes -- **[Custom Modes](/docs/customize/custom-modes)** — Define custom modes with `.kilocodemodes` YAML files -- **[MCP](/docs/automate/mcp/overview)** — Connect to MCP servers for extended capabilities -- **[Agent Manager](/docs/automate/agent-manager)** — Multi-session orchestration with git worktree isolation -- **[Git Commit Generation](/docs/code-with-ai/features/git-commit-generation)** — AI-powered commit messages from the Source Control panel -- **[Context Mentions](/docs/code-with-ai/agents/context-mentions)** — Reference files, URLs, diagnostics, and git changes with `@` -- **[Checkpoints](/docs/code-with-ai/features/checkpoints)** — Git-based snapshots for undo/redo - -{% /tab %} {% tab label="VSCode" %} ## Installation @@ -44,9 +24,9 @@ The extension bundles its own CLI binary and spawns `kilo serve` as a background Key features include: - **SolidJS-based UI** — Rebuilt sidebar with a modern component architecture -- **[JSONC config files](/docs/getting-started/settings)** — Portable settings in `kilo.json` instead of VS Code settings +- **[JSONC config files](/docs/getting-started/settings)** — Portable settings in `kilo.jsonc` instead of VS Code settings - **[Granular permissions](/docs/getting-started/settings/auto-approving-actions)** — Per-tool permission rules with glob patterns -- **[Agents](/docs/code-with-ai/agents/using-modes)** — Customizable agents (`.kilo/agents/*.md`) replacing the modes system +- **[Agents](/docs/code-with-ai/agents/using-agents)** — Customizable agents (`.kilo/agents/*.md`) replacing the modes system - **[Agent Manager](/docs/automate/agent-manager)** — Enhanced with diff panel, multi-model comparison, PR import, and code review annotations - **[Autocomplete](/docs/code-with-ai/features/autocomplete)** — FIM-based with Codestral, status bar cost tracking - **[Workflows](/docs/customize/workflows)** — Repeatable prompt templates as `.md` files @@ -58,7 +38,27 @@ Key features include: ## Shared Settings -The extension shares its configuration with the CLI. Settings in `~/.config/kilo/kilo.json` (global) and `./kilo.json` (project) apply to both the CLI and the extension. +The extension shares its configuration with the CLI. Settings in `~/.config/kilo/kilo.jsonc` (global) and `./kilo.jsonc` (project) apply to both the CLI and the extension. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +## Installation + +{% partial file="install-vscode.md" /%} + +## Key Features + +- **Sidebar chat** — AI-powered chat panel in the VS Code activity bar +- **[Autocomplete](/docs/code-with-ai/features/autocomplete)** — Inline code completions as you type +- **[Code Actions](/docs/code-with-ai/features/code-actions)** — Explain, fix, and improve code from the editor context menu +- **[Agents](/docs/code-with-ai/agents/using-agents)** — Code, Ask, Architect, Debug, Orchestrator, and Review modes +- **[Custom Modes](/docs/customize/custom-modes)** — Define custom modes with `.kilocodemodes` YAML files +- **[MCP](/docs/automate/mcp/overview)** — Connect to MCP servers for extended capabilities +- **[Agent Manager](/docs/automate/agent-manager)** — Multi-session orchestration with git worktree isolation +- **[Git Commit Generation](/docs/code-with-ai/features/git-commit-generation)** — AI-powered commit messages from the Source Control panel +- **[Context Mentions](/docs/code-with-ai/agents/context-mentions)** — Reference files, URLs, diagnostics, and git changes with `@` +- **[Checkpoints](/docs/code-with-ai/features/checkpoints)** — Git-based snapshots for undo/redo {% /tab %} {% /tabs %} From 330b3a09445103ed5a0849233be8d8eec9e82378 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 09:43:28 +0000 Subject: [PATCH 20/81] chore: hide non-English localization files in GitHub PR diffs Mark all non-English i18n locale files as linguist-generated=true so they are collapsed by default in GitHub PR diffs, reducing noise when reviewing changes that touch translation files. --- .gitattributes | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitattributes b/.gitattributes index 453ae820fe8..a7f47424f98 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,13 @@ # Visual regression baseline snapshots packages/kilo-ui/tests/**/*.png filter=lfs diff=lfs merge=lfs -text packages/kilo-vscode/tests/**/*.png filter=lfs diff=lfs merge=lfs -text + +# Hide non-English localization files by default in GitHub PR diffs. +**/i18n/*.ts linguist-generated=true +**/i18n/en.ts linguist-generated=false +**/i18n/en*.ts linguist-generated=false +**/i18n/package-nls-en.ts linguist-generated=false +**/i18n/index.ts linguist-generated=false +**/i18n/parity.test.ts linguist-generated=false +packages/kilo-i18n/src/*.ts linguist-generated=true +packages/kilo-i18n/src/en.ts linguist-generated=false From b67e39186d0d4e9b1f6569675f5b2fe7772ef84e Mon Sep 17 00:00:00 2001 From: Ligia Zanchet Date: Fri, 27 Mar 2026 19:19:35 +0100 Subject: [PATCH 21/81] chore: trigger CI checks From 73d9fd63755049a9d838e84002b8310ce2605822 Mon Sep 17 00:00:00 2001 From: Josh Lambert Date: Sat, 28 Mar 2026 22:41:31 -0400 Subject: [PATCH 22/81] docs(kilo-docs): fix tabs, labels, and content in customize section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix mislabeled tabs: new extension content was labeled 'VSCode (Legacy)' in custom-modes.md (2 tabs) and custom-rules.md (3 tabs) - Split all 'VSCode & CLI' combined tabs into separate VSCode and CLI tabs across 7 files (18 combined tabs total) - Reorder all tabs to VSCode → CLI → VSCode (Legacy) - Fix migration skip list: add build and architect to match code - Fix docs-writer example: edit permission now allows *.md instead of denying all edits (matching the .md agent file example) - Fix skills.md: paths support ~/ and relative, name doesn't need to match directory name - Fix kilo.json → kilo.jsonc across all customize pages - Remove 'new extension' wording — just say 'the extension' - Update custom-subagents.md: remove broken new-task tool link, mark orchestrator as deprecated in Related section --- .../kilo-docs/pages/customize/agents-md.md | 72 +- .../customize/context/context-condensing.md | 195 ++- .../pages/customize/context/kilocodeignore.md | 185 ++- .../pages/customize/custom-instructions.md | 100 +- .../kilo-docs/pages/customize/custom-modes.md | 1123 +++++++++-------- .../kilo-docs/pages/customize/custom-rules.md | 366 +++--- .../pages/customize/custom-subagents.md | 9 +- packages/kilo-docs/pages/customize/skills.md | 354 ++++-- 8 files changed, 1409 insertions(+), 995 deletions(-) diff --git a/packages/kilo-docs/pages/customize/agents-md.md b/packages/kilo-docs/pages/customize/agents-md.md index ef47a81316a..a3d19b9b65a 100644 --- a/packages/kilo-docs/pages/customize/agents-md.md +++ b/packages/kilo-docs/pages/customize/agents-md.md @@ -139,6 +139,32 @@ When you start a task in Kilo Code: ### Interaction with Other Rules {% tabs %} +{% tab label="VSCode" %} + +In the new platform, AGENTS.md is loaded alongside other instruction sources. The CLI also supports `.claude/` and `.agents/` directories for compatibility with other tools. + +| Source | Scope | Location | Priority | +| ------------------------------------------------ | --------- | ------------------------------------------ | ---------------- | +| **Agent prompt** | Per-agent | `agent..prompt` in config | 1 (Highest) | +| **[Instructions](/docs/customize/custom-rules)** | Project | `instructions` key in project `kilo.jsonc` | 2 | +| **AGENTS.md** | Project | `AGENTS.md` at project root | 3 | +| **[Instructions](/docs/customize/custom-rules)** | Global | `instructions` key in global `kilo.jsonc` | 4 | +| **[Skills](/docs/customize/skills)** | Both | `.kilo/skills/`, config `skills` key | Loaded on demand | + +{% /tab %} +{% tab label="CLI" %} + +In the new platform, AGENTS.md is loaded alongside other instruction sources. The CLI also supports `.claude/` and `.agents/` directories for compatibility with other tools. + +| Source | Scope | Location | Priority | +| ------------------------------------------------ | --------- | ------------------------------------------ | ---------------- | +| **Agent prompt** | Per-agent | `agent..prompt` in config | 1 (Highest) | +| **[Instructions](/docs/customize/custom-rules)** | Project | `instructions` key in project `kilo.jsonc` | 2 | +| **AGENTS.md** | Project | `AGENTS.md` at project root | 3 | +| **[Instructions](/docs/customize/custom-rules)** | Global | `instructions` key in global `kilo.jsonc` | 4 | +| **[Skills](/docs/customize/skills)** | Both | `.kilo/skills/`, config `skills` key | Loaded on demand | + +{% /tab %} {% tab label="VSCode (Legacy)" %} AGENTS.md works alongside Kilo Code's other configuration systems: @@ -151,25 +177,34 @@ AGENTS.md works alongside Kilo Code's other configuration systems: | **[Global Custom Rules](/docs/customize/custom-rules)** | Global | `~/.kilocode/rules/` | Global Kilo Code rules | 4 | | **[Custom Instructions](/docs/customize/custom-instructions)** | Global | IDE settings | Personal preferences across all projects | 5 (Lowest) | -{% /tab %} -{% tab label="VSCode & CLI" %} - -In the new platform, AGENTS.md is loaded alongside other instruction sources. The CLI also supports `.claude/` and `.agents/` directories for compatibility with other tools. - -| Source | Scope | Location | Priority | -| ------------------------------------------------ | --------- | ----------------------------------------- | ---------------- | -| **Agent prompt** | Per-agent | `agent..prompt` in config | 1 (Highest) | -| **[Instructions](/docs/customize/custom-rules)** | Project | `instructions` key in project `kilo.json` | 2 | -| **AGENTS.md** | Project | `AGENTS.md` at project root | 3 | -| **[Instructions](/docs/customize/custom-rules)** | Global | `instructions` key in global `kilo.json` | 4 | -| **[Skills](/docs/customize/skills)** | Both | `.kilo/skills/`, config `skills` key | Loaded on demand | - {% /tab %} {% /tabs %} ### Enabling/Disabling AGENTS.md {% tabs %} +{% tab label="VSCode" %} + +AGENTS.md is loaded automatically. To disable external skill directories (`.claude/skills/`, `.agents/skills/`), set the environment variable: + +```bash +export KILO_DISABLE_EXTERNAL_SKILLS=true +``` + +AGENTS.md itself cannot be individually disabled — it is always loaded if present. To override its instructions, use higher-priority sources like the `instructions` config key or agent-specific prompts. + +{% /tab %} +{% tab label="CLI" %} + +AGENTS.md is loaded automatically. To disable external skill directories (`.claude/skills/`, `.agents/skills/`), set the environment variable: + +```bash +export KILO_DISABLE_EXTERNAL_SKILLS=true +``` + +AGENTS.md itself cannot be individually disabled — it is always loaded if present. To override its instructions, use higher-priority sources like the `instructions` config key or agent-specific prompts. + +{% /tab %} {% tab label="VSCode (Legacy)" %} AGENTS.md support is **enabled by default**. To disable it, edit `settings.json`: @@ -180,17 +215,6 @@ AGENTS.md support is **enabled by default**. To disable it, edit `settings.json` } ``` -{% /tab %} -{% tab label="VSCode & CLI" %} - -AGENTS.md is loaded automatically. To disable external skill directories (`.claude/skills/`, `.agents/skills/`), set the environment variable: - -```bash -export KILO_DISABLE_EXTERNAL_SKILLS=true -``` - -AGENTS.md itself cannot be individually disabled — it is always loaded if present. To override its instructions, use higher-priority sources like the `instructions` config key or agent-specific prompts. - {% /tab %} {% /tabs %} diff --git a/packages/kilo-docs/pages/customize/context/context-condensing.md b/packages/kilo-docs/pages/customize/context/context-condensing.md index 0dfa3136470..3d010446f35 100644 --- a/packages/kilo-docs/pages/customize/context/context-condensing.md +++ b/packages/kilo-docs/pages/customize/context/context-condensing.md @@ -18,6 +18,136 @@ Every AI model has a maximum context window - a limit on how much text it can pr - Eventually hitting the context limit and being unable to continue {% tabs %} +{% tab label="VSCode" %} + +## The Solution: Auto-Compaction + +The new platform uses a **Compaction** system to manage context automatically. When your conversation approaches the token limit, compaction kicks in and produces a structured summary that captures: + +- The overall goal of the session +- Key discoveries made along the way +- What has been accomplished so far +- Files that were modified + +This summary replaces the earlier conversation history, freeing up context window space while maintaining continuity in your work. + +## How Compaction Works + +### Automatic Compaction + +Compaction triggers automatically when the conversation reaches the `usableWindow` token threshold. The full conversation history is sent to a dedicated **compaction agent**, which produces a structured summary. This happens in the background without interrupting your workflow. + +### Context Pruning + +In addition to compaction, the system can **prune** old tool outputs to reclaim context space incrementally. Tool results older than a 40,000-token recency window are replaced with `"[Old tool result content cleared]"`. This is a lighter-weight mechanism that runs alongside full compaction. + +### Manual Compaction + +You can also trigger compaction manually: + +- **CLI TUI**: Press `c` to compact the current session +- **Extension Webview**: Send a `CompactRequest` message to trigger compaction + +{% callout type="info" %} +There is no `/condense` chat command on the new platform. Use the keybinding or message-based invocation instead. +{% /callout %} + +### The Compaction Process + +When compaction is triggered: + +1. **Threshold Check**: The system detects that context usage has reached the `usableWindow` limit +2. **Agent Summarization**: The full conversation history is sent to a dedicated compaction agent +3. **Structured Summary**: The agent produces a summary covering the goal, discoveries, accomplishments, and modified files +4. **Replacement**: The detailed history is replaced with the compacted summary +5. **Continuation**: You continue working with the freed-up context space + +## Configuration Options + +Compaction is configured in your `kilo.jsonc` file: + +```jsonc +{ + "compaction": { + "auto": true, // Enable or disable automatic compaction + "reserved": 4096, // Number of tokens to reserve (keep free) after compaction + "prune": true, // Enable pruning of old tool outputs beyond the recency window + }, +} +``` + +| Option | Type | Description | +| --------------------- | ------- | ------------------------------------------------------------------------ | +| `compaction.auto` | boolean | Enable or disable automatic compaction when the context threshold is hit | +| `compaction.reserved` | number | Number of tokens to reserve after compaction | +| `compaction.prune` | boolean | Enable pruning of old tool outputs outside the 40K token recency window | + +{% /tab %} +{% tab label="CLI" %} + +## The Solution: Auto-Compaction + +The new platform uses a **Compaction** system to manage context automatically. When your conversation approaches the token limit, compaction kicks in and produces a structured summary that captures: + +- The overall goal of the session +- Key discoveries made along the way +- What has been accomplished so far +- Files that were modified + +This summary replaces the earlier conversation history, freeing up context window space while maintaining continuity in your work. + +## How Compaction Works + +### Automatic Compaction + +Compaction triggers automatically when the conversation reaches the `usableWindow` token threshold. The full conversation history is sent to a dedicated **compaction agent**, which produces a structured summary. This happens in the background without interrupting your workflow. + +### Context Pruning + +In addition to compaction, the system can **prune** old tool outputs to reclaim context space incrementally. Tool results older than a 40,000-token recency window are replaced with `"[Old tool result content cleared]"`. This is a lighter-weight mechanism that runs alongside full compaction. + +### Manual Compaction + +You can also trigger compaction manually: + +- **CLI TUI**: Press `c` to compact the current session +- **Extension Webview**: Send a `CompactRequest` message to trigger compaction + +{% callout type="info" %} +There is no `/condense` chat command on the new platform. Use the keybinding or message-based invocation instead. +{% /callout %} + +### The Compaction Process + +When compaction is triggered: + +1. **Threshold Check**: The system detects that context usage has reached the `usableWindow` limit +2. **Agent Summarization**: The full conversation history is sent to a dedicated compaction agent +3. **Structured Summary**: The agent produces a summary covering the goal, discoveries, accomplishments, and modified files +4. **Replacement**: The detailed history is replaced with the compacted summary +5. **Continuation**: You continue working with the freed-up context space + +## Configuration Options + +Compaction is configured in your `kilo.jsonc` file: + +```jsonc +{ + "compaction": { + "auto": true, // Enable or disable automatic compaction + "reserved": 4096, // Number of tokens to reserve (keep free) after compaction + "prune": true, // Enable pruning of old tool outputs beyond the recency window + }, +} +``` + +| Option | Type | Description | +| --------------------- | ------- | ------------------------------------------------------------------------ | +| `compaction.auto` | boolean | Enable or disable automatic compaction when the context threshold is hit | +| `compaction.reserved` | number | Number of tokens to reserve after compaction | +| `compaction.prune` | boolean | Enable pruning of old tool outputs outside the 40K token recency window | + +{% /tab %} {% tab label="VSCode (Legacy)" %} ## The Solution: Intelligent Condensing @@ -84,71 +214,6 @@ If the condensed summary doesn't capture important details: - Use clear, specific language when describing your tasks - Important context can be reinforced after condensing by reminding Kilo Code of key details -{% /tab %} -{% tab label="VSCode & CLI" %} - -## The Solution: Auto-Compaction - -The new platform uses a **Compaction** system to manage context automatically. When your conversation approaches the token limit, compaction kicks in and produces a structured summary that captures: - -- The overall goal of the session -- Key discoveries made along the way -- What has been accomplished so far -- Files that were modified - -This summary replaces the earlier conversation history, freeing up context window space while maintaining continuity in your work. - -## How Compaction Works - -### Automatic Compaction - -Compaction triggers automatically when the conversation reaches the `usableWindow` token threshold. The full conversation history is sent to a dedicated **compaction agent**, which produces a structured summary. This happens in the background without interrupting your workflow. - -### Context Pruning - -In addition to compaction, the system can **prune** old tool outputs to reclaim context space incrementally. Tool results older than a 40,000-token recency window are replaced with `"[Old tool result content cleared]"`. This is a lighter-weight mechanism that runs alongside full compaction. - -### Manual Compaction - -You can also trigger compaction manually: - -- **CLI TUI**: Press `c` to compact the current session -- **Extension Webview**: Send a `CompactRequest` message to trigger compaction - -{% callout type="info" %} -There is no `/condense` chat command on the new platform. Use the keybinding or message-based invocation instead. -{% /callout %} - -### The Compaction Process - -When compaction is triggered: - -1. **Threshold Check**: The system detects that context usage has reached the `usableWindow` limit -2. **Agent Summarization**: The full conversation history is sent to a dedicated compaction agent -3. **Structured Summary**: The agent produces a summary covering the goal, discoveries, accomplishments, and modified files -4. **Replacement**: The detailed history is replaced with the compacted summary -5. **Continuation**: You continue working with the freed-up context space - -## Configuration Options - -Compaction is configured in your `kilo.json` file: - -```jsonc -{ - "compaction": { - "auto": true, // Enable or disable automatic compaction - "reserved": 4096, // Number of tokens to reserve (keep free) after compaction - "prune": true, // Enable pruning of old tool outputs beyond the recency window - }, -} -``` - -| Option | Type | Description | -| --------------------- | ------- | ------------------------------------------------------------------------ | -| `compaction.auto` | boolean | Enable or disable automatic compaction when the context threshold is hit | -| `compaction.reserved` | number | Number of tokens to reserve after compaction | -| `compaction.prune` | boolean | Enable pruning of old tool outputs outside the 40K token recency window | - {% /tab %} {% /tabs %} diff --git a/packages/kilo-docs/pages/customize/context/kilocodeignore.md b/packages/kilo-docs/pages/customize/context/kilocodeignore.md index 5000534b31e..b956db3bfb2 100644 --- a/packages/kilo-docs/pages/customize/context/kilocodeignore.md +++ b/packages/kilo-docs/pages/customize/context/kilocodeignore.md @@ -14,6 +14,58 @@ If no `.kilocodeignore` file exists, Kilo Code can access all files in the works ## Quick Start {% tabs %} +{% tab label="VSCode" %} + +The primary mechanism for controlling file access is the **permission system** in `kilo.jsonc`. You define tool-level permissions with glob patterns: + +```json +{ + "permission": { + "read": { "*.env": "deny", "*": "allow" }, + "edit": { "dist/**": "deny", "*": "allow" } + } +} +``` + +If you have an existing `.kilocodeignore` file, it is still supported. The **IgnoreMigrator** automatically converts `.kilocodeignore` patterns into permission `deny` rules on `read` and `edit` tools, so your existing rules continue to work without manual changes. + +You can also exclude paths from the file watcher separately using `config.watcher.ignore`: + +```json +{ + "watcher": { + "ignore": ["tmp/**", "logs/**"] + } +} +``` + +{% /tab %} +{% tab label="CLI" %} + +The primary mechanism for controlling file access is the **permission system** in `kilo.jsonc`. You define tool-level permissions with glob patterns: + +```json +{ + "permission": { + "read": { "*.env": "deny", "*": "allow" }, + "edit": { "dist/**": "deny", "*": "allow" } + } +} +``` + +If you have an existing `.kilocodeignore` file, it is still supported. The **IgnoreMigrator** automatically converts `.kilocodeignore` patterns into permission `deny` rules on `read` and `edit` tools, so your existing rules continue to work without manual changes. + +You can also exclude paths from the file watcher separately using `config.watcher.ignore`: + +```json +{ + "watcher": { + "ignore": ["tmp/**", "logs/**"] + } +} +``` + +{% /tab %} {% tab label="VSCode (Legacy)" %} 1. Create a `.kilocodeignore` file at the root of your project. @@ -37,32 +89,6 @@ coverage/ !secrets/README.md ``` -{% /tab %} -{% tab label="VSCode & CLI" %} - -The primary mechanism for controlling file access is the **permission system** in `kilo.json`. You define tool-level permissions with glob patterns: - -```json -{ - "permission": { - "read": { "*.env": "deny", "*": "allow" }, - "edit": { "dist/**": "deny", "*": "allow" } - } -} -``` - -If you have an existing `.kilocodeignore` file, it is still supported. The **IgnoreMigrator** automatically converts `.kilocodeignore` patterns into permission `deny` rules on `read` and `edit` tools, so your existing rules continue to work without manual changes. - -You can also exclude paths from the file watcher separately using `config.watcher.ignore`: - -```json -{ - "watcher": { - "ignore": ["tmp/**", "logs/**"] - } -} -``` - {% /tab %} {% /tabs %} @@ -80,6 +106,32 @@ Patterns are evaluated relative to the workspace root. ## What It Affects {% tabs %} +{% tab label="VSCode" %} + +File access is controlled through **permission-based access control**. Each tool (`read`, `edit`, `glob`, `grep`, `write`, `bash`, etc.) has its own permission rules evaluated against glob patterns. + +In addition to your explicit permission rules: + +- **Hardcoded directory ignores** — 27 directories are always skipped (e.g. `node_modules`, `.git`, `dist`, `build`, `.cache`, `__pycache__`, `vendor`, and others). +- **Hardcoded file pattern ignores** — 11 file patterns are always skipped (e.g. lock files, binary artifacts). +- **`.gitignore` and `.ignore` files** are also respected when listing and searching files. + +If a file is denied by a permission rule, the tool will report that access was blocked. + +{% /tab %} +{% tab label="CLI" %} + +File access is controlled through **permission-based access control**. Each tool (`read`, `edit`, `glob`, `grep`, `write`, `bash`, etc.) has its own permission rules evaluated against glob patterns. + +In addition to your explicit permission rules: + +- **Hardcoded directory ignores** — 27 directories are always skipped (e.g. `node_modules`, `.git`, `dist`, `build`, `.cache`, `__pycache__`, `vendor`, and others). +- **Hardcoded file pattern ignores** — 11 file patterns are always skipped (e.g. lock files, binary artifacts). +- **`.gitignore` and `.ignore` files** are also respected when listing and searching files. + +If a file is denied by a permission rule, the tool will report that access was blocked. + +{% /tab %} {% tab label="VSCode (Legacy)" %} Kilo Code checks `.kilocodeignore` before accessing files in tools like: @@ -93,39 +145,17 @@ Kilo Code checks `.kilocodeignore` before accessing files in tools like: If a file is blocked, Kilo Code will return an "access denied" message and suggest updating your `.kilocodeignore` rules. -{% /tab %} -{% tab label="VSCode & CLI" %} - -File access is controlled through **permission-based access control**. Each tool (`read`, `edit`, `glob`, `grep`, `write`, `bash`, etc.) has its own permission rules evaluated against glob patterns. - -In addition to your explicit permission rules: - -- **Hardcoded directory ignores** — 27 directories are always skipped (e.g. `node_modules`, `.git`, `dist`, `build`, `.cache`, `__pycache__`, `vendor`, and others). -- **Hardcoded file pattern ignores** — 11 file patterns are always skipped (e.g. lock files, binary artifacts). -- **`.gitignore` and `.ignore` files** are also respected when listing and searching files. - -If a file is denied by a permission rule, the tool will report that access was blocked. - {% /tab %} {% /tabs %} ## Configuration Details {% tabs %} -{% tab label="VSCode (Legacy)" %} - -### Visibility in Lists - -By default, ignored files are hidden from file lists. You can show them with a lock icon by enabling: - -Settings -> Context -> **Show .kilocodeignore'd files in lists and searches** - -{% /tab %} -{% tab label="VSCode & CLI" %} +{% tab label="VSCode" %} ### Permission Rules -Permission rules are defined per-tool in `kilo.json`. Patterns are evaluated in order — the last matching rule wins: +Permission rules are defined per-tool in `kilo.jsonc`. Patterns are evaluated in order — the last matching rule wins: ```json { @@ -146,7 +176,7 @@ Permission rules are defined per-tool in `kilo.json`. Patterns are evaluated in ### Migrating from .kilocodeignore -If you already have a `.kilocodeignore` file, you don't need to do anything — the IgnoreMigrator reads your existing patterns and applies them as `deny` rules on `read` and `edit` tools automatically. You can optionally move your rules into `kilo.json` for more granular control (e.g. denying edits but allowing reads). +If you already have a `.kilocodeignore` file, you don't need to do anything — the IgnoreMigrator reads your existing patterns and applies them as `deny` rules on `read` and `edit` tools automatically. You can optionally move your rules into `kilo.jsonc` for more granular control (e.g. denying edits but allowing reads). ### File Watcher Exclusions @@ -160,6 +190,55 @@ The `config.watcher.ignore` setting controls which paths the file watcher skips. } ``` +{% /tab %} +{% tab label="CLI" %} + +### Permission Rules + +Permission rules are defined per-tool in `kilo.jsonc`. Patterns are evaluated in order — the last matching rule wins: + +```json +{ + "permission": { + "read": { + "*.env": "deny", + "secrets/**": "deny", + "*": "allow" + }, + "edit": { + "dist/**": "deny", + "*.lock": "deny", + "*": "allow" + } + } +} +``` + +### Migrating from .kilocodeignore + +If you already have a `.kilocodeignore` file, you don't need to do anything — the IgnoreMigrator reads your existing patterns and applies them as `deny` rules on `read` and `edit` tools automatically. You can optionally move your rules into `kilo.jsonc` for more granular control (e.g. denying edits but allowing reads). + +### File Watcher Exclusions + +The `config.watcher.ignore` setting controls which paths the file watcher skips. This is separate from tool permissions and only affects change detection: + +```json +{ + "watcher": { + "ignore": ["tmp/**", "logs/**", ".build/**"] + } +} +``` + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +### Visibility in Lists + +By default, ignored files are hidden from file lists. You can show them with a lock icon by enabling: + +Settings -> Context -> **Show .kilocodeignore'd files in lists and searches** + {% /tab %} {% /tabs %} @@ -169,6 +248,6 @@ Checkpoint tracking is separate from file access rules. Files blocked by `.kiloc ## Troubleshooting -- **Kilo can't access a file you want:** Remove or narrow the matching rule in `.kilocodeignore` (classic) or adjust the permission rules in `kilo.json` (new extension & CLI). -- **A file still appears in lists:** In the classic extension, check the setting that shows ignored files in lists and searches. In the new extension & CLI, verify your permission and watcher ignore configuration. +- **Kilo can't access a file you want:** Remove or narrow the matching rule in `.kilocodeignore` (legacy) or adjust the permission rules in `kilo.jsonc` (VSCode extension & CLI). +- **A file still appears in lists:** In the legacy extension, check the setting that shows ignored files in lists and searches. In the extension & CLI, verify your permission and watcher ignore configuration. - **`.kilocodeignore` patterns not working in the new platform:** Ensure the file is at the workspace root. The IgnoreMigrator reads it automatically — check that your patterns use valid `.gitignore` syntax. diff --git a/packages/kilo-docs/pages/customize/custom-instructions.md b/packages/kilo-docs/pages/customize/custom-instructions.md index 4682608ba1b..88ec71ab616 100644 --- a/packages/kilo-docs/pages/customize/custom-instructions.md +++ b/packages/kilo-docs/pages/customize/custom-instructions.md @@ -5,60 +5,16 @@ description: "Provide custom instructions to guide Kilo Code" # Custom Instructions -Custom Instructions allow you to personalize how Kilo Code behaves, providing specific guidance that shapes responses, coding style, and decision-making processes. Both the **VSCode** and **VSCode & CLI** versions support custom instructions, though the mechanisms differ. +Custom Instructions allow you to personalize how Kilo Code behaves, providing specific guidance that shapes responses, coding style, and decision-making processes. Both the **VSCode** and **CLI** versions support custom instructions, though the mechanisms differ. ## What Are Custom Instructions? Custom Instructions define specific Extension behaviors, preferences, and constraints beyond Kilo's basic role definition. Examples include coding style, documentation standards, testing requirements, and workflow guidelines. {% tabs %} -{% tab label="VSCode (Legacy)" %} - -## Setting Custom Instructions - -{% callout type="info" title="Custom Instructions vs Rules" %} -Custom Instructions are IDE-wide and are applied across all workspaces and maintain your preferences regardless of which project you're working on. Unlike Instructions, [Custom Rules](/docs/customize/custom-rules) are project specific and allow you to setup workspace-based ruleset. -{% /callout %} - -**How to set them:** - -{% image src="/docs/img/custom-instructions/custom-instructions.png" alt="Kilo Code Modes tab showing global custom instructions interface" width="600" caption="Kilo Code Modes tab showing global custom instructions interface" /%} - -1. **Open Modes Tab:** Click the icon in the Kilo Code top menu bar -2. **Find Section:** Find the "Custom Instructions for All Modes" section -3. **Enter Instructions:** Enter your instructions in the text area -4. **Save Changes:** Click "Done" to save your changes - -#### Mode-Specific Instructions - -Mode-specific instructions can be set using the Modes Tab - - {% image src="/docs/img/custom-instructions/custom-instructions-3.png" alt="Kilo Code Modes tab showing mode-specific custom instructions interface" width="600" caption="Kilo Code Modes tab showing mode-specific custom instructions interface" /%} - * **Open Tab:** Click the icon in the Kilo Code top menu bar - * **Select Mode:** Under the Modes heading, click the button for the mode you want to customize - * **Enter Instructions:** Enter your instructions in the text area under "Mode-specific Custom Instructions (optional)" - * **Save Changes:** Click "Done" to save your changes - - {% callout type="info" title="Global Mode Rules" %} - -If the mode itself is global (not workspace-specific), any custom instructions you set for it will also apply globally for that mode across all workspaces. -{% /callout %} - -## Mode-Specific Instructions from Files - -For version-controlled mode instructions, use the mode rules file paths documented in [Custom Modes](/docs/customize/custom-modes#mode-specific-instructions-via-filesdirectories): - -- Preferred: `.kilo/rules-{mode-slug}/` (directory) -- Fallback: `.kilorules-{mode-slug}` (single file) - -{% callout type="info" title="Legacy Naming Note" %} -Older naming like `.clinerules-{mode-slug}` is not the recommended path for current Kilo mode-specific instructions. -{% /callout %} - -{% /tab %} {% tab label="VSCode" %} -The new extension provides multiple layers of instruction configuration — from per-agent prompts in the Settings UI to auto-discovered files in your project and global config. +The extension provides multiple layers of instruction configuration — from per-agent prompts in the Settings UI to auto-discovered files in your project and global config. ## Per-Agent Prompts @@ -123,10 +79,10 @@ The CLI provides multiple layers of instruction configuration — from per-agent ## Per-Agent Prompts -Each agent can have its own custom prompt defined in its `.md` file (the markdown body) or via the `agent..prompt` key in `kilo.json`: +Each agent can have its own custom prompt defined in its `.md` file (the markdown body) or via the `agent..prompt` key in `kilo.jsonc`: ```jsonc -// kilo.json +// kilo.jsonc { "agent": { "code": { @@ -175,10 +131,10 @@ This is useful for providing context-specific guidance for different parts of a ## Additional Instruction Sources -The `config.instructions` setting accepts an array of paths, globs, or URLs pointing to additional instruction files. Configure these in your `kilo.json`: +The `config.instructions` setting accepts an array of paths, globs, or URLs pointing to additional instruction files. Configure these in your `kilo.jsonc`: ```jsonc -// kilo.json +// kilo.jsonc { "instructions": [ "./docs/coding-standards.md", @@ -196,6 +152,50 @@ URL-based instruction sources are fetched at session start with a 5-second timeo If your project contains `.kilocoderules` files from the VSCode extension, these are still loaded via auto-migration. However, migrating to `AGENTS.md` is recommended for new projects. +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +## Setting Custom Instructions + +{% callout type="info" title="Custom Instructions vs Rules" %} +Custom Instructions are IDE-wide and are applied across all workspaces and maintain your preferences regardless of which project you're working on. Unlike Instructions, [Custom Rules](/docs/customize/custom-rules) are project specific and allow you to setup workspace-based ruleset. +{% /callout %} + +**How to set them:** + +{% image src="/docs/img/custom-instructions/custom-instructions.png" alt="Kilo Code Modes tab showing global custom instructions interface" width="600" caption="Kilo Code Modes tab showing global custom instructions interface" /%} + +1. **Open Modes Tab:** Click the icon in the Kilo Code top menu bar +2. **Find Section:** Find the "Custom Instructions for All Modes" section +3. **Enter Instructions:** Enter your instructions in the text area +4. **Save Changes:** Click "Done" to save your changes + +#### Mode-Specific Instructions + +Mode-specific instructions can be set using the Modes Tab + + {% image src="/docs/img/custom-instructions/custom-instructions-3.png" alt="Kilo Code Modes tab showing mode-specific custom instructions interface" width="600" caption="Kilo Code Modes tab showing mode-specific custom instructions interface" /%} + * **Open Tab:** Click the icon in the Kilo Code top menu bar + * **Select Mode:** Under the Modes heading, click the button for the mode you want to customize + * **Enter Instructions:** Enter your instructions in the text area under "Mode-specific Custom Instructions (optional)" + * **Save Changes:** Click "Done" to save your changes + + {% callout type="info" title="Global Mode Rules" %} + +If the mode itself is global (not workspace-specific), any custom instructions you set for it will also apply globally for that mode across all workspaces. +{% /callout %} + +## Mode-Specific Instructions from Files + +For version-controlled mode instructions, use the mode rules file paths documented in [Custom Modes](/docs/customize/custom-modes#mode-specific-instructions-via-filesdirectories): + +- Preferred: `.kilo/rules-{mode-slug}/` (directory) +- Fallback: `.kilorules-{mode-slug}` (single file) + +{% callout type="info" title="Legacy Naming Note" %} +Older naming like `.clinerules-{mode-slug}` is not the recommended path for current Kilo mode-specific instructions. +{% /callout %} + {% /tab %} {% /tabs %} diff --git a/packages/kilo-docs/pages/customize/custom-modes.md b/packages/kilo-docs/pages/customize/custom-modes.md index 7713e4e2c39..2b7ddcde043 100644 --- a/packages/kilo-docs/pages/customize/custom-modes.md +++ b/packages/kilo-docs/pages/customize/custom-modes.md @@ -15,6 +15,436 @@ Kilo Code allows you to create **custom modes** to tailor Kilo's behavior to spe - **Team Collaboration:** Share custom modes with your team to standardize workflows {% tabs %} +{% tab label="VSCode" %} + +In the VSCode extension and CLI, custom behavioral profiles are called **agents** instead of modes. Agents are defined as Markdown files with YAML frontmatter or as entries in the `agent` key of your config file. + +## What's Included in a Custom Agent? + +| Property | Description | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| **name** (filename) | The agent's identifier, derived from the `.md` filename (e.g., `docs-writer.md` creates an agent named `docs-writer`) | +| **description** | A short summary displayed in the agent picker and used by the orchestrator for delegation | +| **model** | Pin a specific model in `provider/model` format (e.g., `anthropic/claude-sonnet-4-20250514`) | +| **prompt** (markdown body) | The system prompt text — the markdown body of the file, injected into the agent's system prompt | +| **mode** | Role classification: `primary` (user-selectable), `subagent` (only invoked by other agents), or `all` (both) | +| **permission** | Per-agent permission overrides controlling which tools the agent can use (e.g., deny `edit`, `bash`) | +| **color** | Hex color (`#FF5733`) or theme keyword (`primary`, `accent`, `warning`, etc.) for the agent picker UI | +| **steps** | Maximum agentic iterations before forcing a text-only response | +| **temperature** / **top_p** | Sampling parameters for the agent's model | +| **variant** | Default model variant | +| **hidden** | If `true`, the agent is hidden from the UI (only meaningful for subagents) | +| **disable** | If `true`, removes the agent entirely | + +## Methods for Creating and Configuring Agents + +### 1. Ask Kilo! (Recommended) + +Ask Kilo to create an agent for you: + +``` +Create a new agent called "docs-writer" that can only read files and edit Markdown files. +``` + +Kilo will generate the agent definition and write it to `.kilo/agent/` in your project. + +### 2. Using the Settings UI + +You can manage agents through the **Settings → Agent Behaviour → Agents** subtab in the extension. This lets you view, create, and edit agent configurations — including the agent's prompt, model, permissions, and other properties. + +### 3. Markdown Files with YAML Frontmatter + +Create `.md` files in any of these directories: + +``` +.kilo/agents/my-agent.md +.kilo/agent/my-agent.md +.opencode/agents/my-agent.md +``` + +For global agents, place files in your global config directory: + +``` +~/.config/kilo/agent/my-agent.md +``` + +The **filename** (minus `.md`) becomes the agent name. Nested directories create namespaced names (e.g., `agents/backend/sql.md` becomes agent `backend/sql`). + +**Example agent file** (`.kilo/agents/docs-writer.md`): + +```markdown +--- +description: Specialized for writing and editing technical documentation +mode: primary +color: "#10B981" +permission: + edit: + "*.md": "allow" + "*": "deny" + bash: deny +--- + +You are a technical documentation specialist. Your expertise includes: + +- Writing clear, well-structured documentation +- Following markdown best practices +- Creating helpful code examples + +Focus on clarity and completeness. Only edit Markdown files. +``` + +### 4. Config File (`kilo.jsonc`) + +Define agents under the `agent` key in your project's `kilo.jsonc`: + +```jsonc +{ + "agent": { + "docs-writer": { + "description": "Specialized for writing and editing technical documentation", + "mode": "primary", + "color": "#10B981", + "prompt": "You are a technical documentation specialist...", + "permission": { + "edit": { + "*.md": "allow", + "*": "deny", + }, + "bash": "deny", + }, + }, + // Override a built-in agent + "code": { + "model": "anthropic/claude-sonnet-4-20250514", + "temperature": 0.3, + }, + }, +} +``` + +## Agent Property Reference + +### `mode` + +Controls where the agent appears: + +| Value | Behavior | +| ---------- | -------------------------------------------------------------------------------------- | +| `primary` | Shown in the agent picker — the user can select it directly | +| `subagent` | Only invokable by other agents via the `task` tool | +| `all` | Available both as a top-level pick and as a subagent (default for user-defined agents) | + +### `permission` + +An ordered set of rules controlling tool access. Permissions support three actions: `allow`, `deny`, and `ask` (prompt the user). You can use glob patterns to scope rules to specific files or commands: + +```yaml +permission: + edit: + "*.md": "allow" + "*": "deny" + bash: deny + read: allow +``` + +Known permission types include: `read`, `edit`, `bash`, `glob`, `grep`, `list`, `task`, `webfetch`, `websearch`, `codesearch`, `todowrite`, `todoread`, and more. + +### `model` + +Pin a specific model using the `provider/model` format: + +```yaml +model: anthropic/claude-sonnet-4-20250514 +``` + +### `steps` + +Limits the number of agentic iterations (tool call rounds) before the agent is forced to respond with text only. Useful for preventing runaway agents: + +```yaml +steps: 25 +``` + +## Configuration Precedence + +Agent configurations merge from lowest to highest priority: + +1. Built-in (native) agent defaults +2. Global config (`~/.config/kilo/kilo.jsonc`) +3. Project config (`kilo.jsonc` at project root) +4. `.kilo/` / `.opencode/` directory configs and agent `.md` files +5. Environment variable overrides (`KILO_CONFIG_CONTENT`) + +When the same agent name appears at multiple levels, properties are merged (not replaced wholesale), so you can override just a model or temperature without redefining the entire agent. + +## Overriding Built-in Agents + +Override any built-in agent (**code**, **plan**, **debug**, **ask**, **orchestrator**, **explore**, **general**) by defining an agent with the same name: + +```jsonc +// kilo.jsonc — override the built-in "code" agent +{ + "agent": { + "code": { + "model": "openai/gpt-4o", + "temperature": 0.2, + "permission": { + "edit": { + "*.py": "allow", + "*": "deny", + }, + }, + }, + }, +} +``` + +Or as a `.md` file (`.kilo/agents/code.md`): + +```markdown +--- +model: openai/gpt-4o +temperature: 0.2 +permission: + edit: + "*.py": "allow" + "*": "deny" +--- + +You are a Python specialist. Only edit Python files. +``` + +## Migration from VSCode Extension Modes + +If you have existing `.kilocodemodes` or `custom_modes.yaml` files from the VSCode extension, the extension automatically migrates them on startup. The migration converts: + +- `slug` to the agent name (key) +- `roleDefinition` + `customInstructions` to `prompt` +- `groups` (e.g., `["read", "edit", "browser"]`) to `permission` rules +- `whenToUse` / `description` to `description` +- Mode is set to `primary` + +Built-in mode slugs (`code`, `build`, `architect`, `ask`, `debug`, `orchestrator`) are skipped since they have native agent equivalents. + +{% /tab %} +{% tab label="CLI" %} + +In the CLI, custom behavioral profiles are called **agents** instead of modes. Agents are defined as Markdown files with YAML frontmatter or as entries in the `agent` key of your config file. + +## What's Included in a Custom Agent? + +| Property | Description | +| --------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| **name** (filename) | The agent's identifier, derived from the `.md` filename (e.g., `docs-writer.md` creates an agent named `docs-writer`) | +| **description** | A short summary displayed in the agent picker and used by the orchestrator for delegation | +| **model** | Pin a specific model in `provider/model` format (e.g., `anthropic/claude-sonnet-4-20250514`) | +| **prompt** (markdown body) | The system prompt text — the markdown body of the file, injected into the agent's system prompt | +| **mode** | Role classification: `primary` (user-selectable), `subagent` (only invoked by other agents), or `all` (both) | +| **permission** | Per-agent permission overrides controlling which tools the agent can use (e.g., deny `edit`, `bash`) | +| **color** | Hex color (`#FF5733`) or theme keyword (`primary`, `accent`, `warning`, etc.) for the agent picker UI | +| **steps** | Maximum agentic iterations before forcing a text-only response | +| **temperature** / **top_p** | Sampling parameters for the agent's model | +| **variant** | Default model variant | +| **hidden** | If `true`, the agent is hidden from the UI (only meaningful for subagents) | +| **disable** | If `true`, removes the agent entirely | + +## Methods for Creating and Configuring Agents + +### 1. Ask Kilo! (Recommended) + +Ask Kilo to create an agent for you: + +``` +Create a new agent called "docs-writer" that can only read files and edit Markdown files. +``` + +Kilo will generate the agent definition and write it to `.kilo/agent/` in your project. + +### 2. Using `kilo agent create` + +The CLI provides an interactive command: + +```bash +kilo agent create +``` + +This walks you through selecting a description, mode, and tools, then uses an LLM to generate the agent's system prompt and writes a `.md` file with YAML frontmatter. + +### 3. Markdown Files with YAML Frontmatter + +Create `.md` files in any of these directories: + +``` +.kilo/agents/my-agent.md +.kilo/agent/my-agent.md +.opencode/agents/my-agent.md +``` + +For global agents, place files in your global config directory: + +``` +~/.config/kilo/agent/my-agent.md +``` + +The **filename** (minus `.md`) becomes the agent name. Nested directories create namespaced names (e.g., `agents/backend/sql.md` becomes agent `backend/sql`). + +**Example agent file** (`.kilo/agents/docs-writer.md`): + +```markdown +--- +description: Specialized for writing and editing technical documentation +mode: primary +color: "#10B981" +permission: + edit: + "*.md": "allow" + "*": "deny" + bash: deny +--- + +You are a technical documentation specialist. Your expertise includes: + +- Writing clear, well-structured documentation +- Following markdown best practices +- Creating helpful code examples + +Focus on clarity and completeness. Only edit Markdown files. +``` + +### 4. Config File (`kilo.jsonc`) + +Define agents under the `agent` key in your project's `kilo.jsonc`: + +```jsonc +{ + "agent": { + "docs-writer": { + "description": "Specialized for writing and editing technical documentation", + "mode": "primary", + "color": "#10B981", + "prompt": "You are a technical documentation specialist...", + "permission": { + "edit": { + "*.md": "allow", + "*": "deny", + }, + "bash": "deny", + }, + }, + // Override a built-in agent + "code": { + "model": "anthropic/claude-sonnet-4-20250514", + "temperature": 0.3, + }, + }, +} +``` + +## Agent Property Reference + +### `mode` + +Controls where the agent appears: + +| Value | Behavior | +| ---------- | -------------------------------------------------------------------------------------- | +| `primary` | Shown in the agent picker — the user can select it directly | +| `subagent` | Only invokable by other agents via the `task` tool | +| `all` | Available both as a top-level pick and as a subagent (default for user-defined agents) | + +### `permission` + +An ordered set of rules controlling tool access. Permissions support three actions: `allow`, `deny`, and `ask` (prompt the user). You can use glob patterns to scope rules to specific files or commands: + +```yaml +permission: + edit: + "*.md": "allow" + "*": "deny" + bash: deny + read: allow +``` + +Known permission types include: `read`, `edit`, `bash`, `glob`, `grep`, `list`, `task`, `webfetch`, `websearch`, `codesearch`, `todowrite`, `todoread`, and more. + +### `model` + +Pin a specific model using the `provider/model` format: + +```yaml +model: anthropic/claude-sonnet-4-20250514 +``` + +### `steps` + +Limits the number of agentic iterations (tool call rounds) before the agent is forced to respond with text only. Useful for preventing runaway agents: + +```yaml +steps: 25 +``` + +## Configuration Precedence + +Agent configurations merge from lowest to highest priority: + +1. Built-in (native) agent defaults +2. Global config (`~/.config/kilo/kilo.jsonc`) +3. Project config (`kilo.jsonc` at project root) +4. `.kilo/` / `.opencode/` directory configs and agent `.md` files +5. Environment variable overrides (`KILO_CONFIG_CONTENT`) + +When the same agent name appears at multiple levels, properties are merged (not replaced wholesale), so you can override just a model or temperature without redefining the entire agent. + +## Overriding Built-in Agents + +Override any built-in agent (**code**, **plan**, **debug**, **ask**, **orchestrator**, **explore**, **general**) by defining an agent with the same name: + +```jsonc +// kilo.jsonc — override the built-in "code" agent +{ + "agent": { + "code": { + "model": "openai/gpt-4o", + "temperature": 0.2, + "permission": { + "edit": { + "*.py": "allow", + "*": "deny", + }, + }, + }, + }, +} +``` + +Or as a `.md` file (`.kilo/agents/code.md`): + +```markdown +--- +model: openai/gpt-4o +temperature: 0.2 +permission: + edit: + "*.py": "allow" + "*": "deny" +--- + +You are a Python specialist. Only edit Python files. +``` + +## Migration from VSCode Extension Modes + +If you have existing `.kilocodemodes` or `custom_modes.yaml` files from the VSCode extension, the CLI automatically migrates them on startup. The migration converts: + +- `slug` to the agent name (key) +- `roleDefinition` + `customInstructions` to `prompt` +- `groups` (e.g., `["read", "edit", "browser"]`) to `permission` rules +- `whenToUse` / `description` to `description` +- Mode is set to `primary` + +Built-in mode slugs (`code`, `build`, `architect`, `ask`, `debug`, `orchestrator`) are skipped since they have native agent equivalents. + +{% /tab %} {% tab label="VSCode (Legacy)" %} ## Sticky Models for Efficient Workflow @@ -389,444 +819,15 @@ customModes: - command ``` -{% /tab %} -{% tab label="VSCode (Legacy)" %} - -In the new extension, custom behavioral profiles are called **agents** instead of modes. Agents are defined as Markdown files with YAML frontmatter or as entries in the `agent` key of your config file. - -## What's Included in a Custom Agent? - -| Property | Description | -| --------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| **name** (filename) | The agent's identifier, derived from the `.md` filename (e.g., `docs-writer.md` creates an agent named `docs-writer`) | -| **description** | A short summary displayed in the agent picker and used by the orchestrator for delegation | -| **model** | Pin a specific model in `provider/model` format (e.g., `anthropic/claude-sonnet-4-20250514`) | -| **prompt** (markdown body) | The system prompt text — the markdown body of the file, injected into the agent's system prompt | -| **mode** | Role classification: `primary` (user-selectable), `subagent` (only invoked by other agents), or `all` (both) | -| **permission** | Per-agent permission overrides controlling which tools the agent can use (e.g., deny `edit`, `bash`) | -| **color** | Hex color (`#FF5733`) or theme keyword (`primary`, `accent`, `warning`, etc.) for the agent picker UI | -| **steps** | Maximum agentic iterations before forcing a text-only response | -| **temperature** / **top_p** | Sampling parameters for the agent's model | -| **variant** | Default model variant | -| **hidden** | If `true`, the agent is hidden from the UI (only meaningful for subagents) | -| **disable** | If `true`, removes the agent entirely | - -## Methods for Creating and Configuring Agents - -### 1. Ask Kilo! (Recommended) - -Ask Kilo to create an agent for you: - -``` -Create a new agent called "docs-writer" that can only read files and edit Markdown files. -``` - -Kilo will generate the agent definition and write it to `.kilo/agent/` in your project. - -### 2. Using the Settings UI - -You can manage agents through the **Settings → Agent Behaviour → Agents** subtab in the extension. This lets you view, create, and edit agent configurations — including the agent's prompt, model, permissions, and other properties. - -### 3. Markdown Files with YAML Frontmatter - -Create `.md` files in any of these directories: - -``` -.kilo/agents/my-agent.md -.kilo/agent/my-agent.md -.opencode/agents/my-agent.md -``` - -For global agents, place files in your global config directory: - -``` -~/.config/kilo/agent/my-agent.md -``` - -The **filename** (minus `.md`) becomes the agent name. Nested directories create namespaced names (e.g., `agents/backend/sql.md` becomes agent `backend/sql`). - -**Example agent file** (`.kilo/agents/docs-writer.md`): - -```markdown ---- -description: Specialized for writing and editing technical documentation -mode: primary -color: "#10B981" -permission: - edit: - "*.md": "allow" - "*": "deny" - bash: deny ---- - -You are a technical documentation specialist. Your expertise includes: - -- Writing clear, well-structured documentation -- Following markdown best practices -- Creating helpful code examples - -Focus on clarity and completeness. Only edit Markdown files. -``` - -### 4. Config File (`kilo.json`) - -Define agents under the `agent` key in your project's `kilo.json` (or `opencode.jsonc`): - -```jsonc -{ - "agent": { - "docs-writer": { - "description": "Specialized for writing and editing technical documentation", - "mode": "primary", - "color": "#10B981", - "prompt": "You are a technical documentation specialist...", - "permission": { - "edit": "deny", - "bash": "deny", - }, - }, - // Override a built-in agent - "code": { - "model": "anthropic/claude-sonnet-4-20250514", - "temperature": 0.3, - }, - }, -} -``` - -## Agent Property Reference - -### `mode` - -Controls where the agent appears: - -| Value | Behavior | -| ---------- | -------------------------------------------------------------------------------------- | -| `primary` | Shown in the agent picker — the user can select it directly | -| `subagent` | Only invokable by other agents via the `task` tool | -| `all` | Available both as a top-level pick and as a subagent (default for user-defined agents) | - -### `permission` - -An ordered set of rules controlling tool access. Permissions support three actions: `allow`, `deny`, and `ask` (prompt the user). You can use glob patterns to scope rules to specific files or commands: - -```yaml -permission: - edit: - "*.md": "allow" - "*": "deny" - bash: deny - read: allow -``` - -Known permission types include: `read`, `edit`, `bash`, `glob`, `grep`, `list`, `task`, `webfetch`, `websearch`, `codesearch`, `todowrite`, `todoread`, and more. - -### `model` - -Pin a specific model using the `provider/model` format: - -```yaml -model: anthropic/claude-sonnet-4-20250514 -``` - -### `steps` - -Limits the number of agentic iterations (tool call rounds) before the agent is forced to respond with text only. Useful for preventing runaway agents: - -```yaml -steps: 25 -``` - -## Configuration Precedence - -Agent configurations merge from lowest to highest priority: - -1. Built-in (native) agent defaults -2. Global config (`~/.config/kilo/kilo.json`) -3. Project config (`kilo.json` at project root) -4. `.kilo/` / `.opencode/` directory configs and agent `.md` files -5. Environment variable overrides (`KILO_CONFIG_CONTENT`) - -When the same agent name appears at multiple levels, properties are merged (not replaced wholesale), so you can override just a model or temperature without redefining the entire agent. - -## Overriding Built-in Agents - -Override any built-in agent (**code**, **plan**, **debug**, **ask**, **orchestrator**, **explore**, **general**) by defining an agent with the same name: - -```jsonc -// kilo.json — override the built-in "code" agent -{ - "agent": { - "code": { - "model": "openai/gpt-4o", - "temperature": 0.2, - "permission": { - "edit": { - "*.py": "allow", - "*": "deny", - }, - }, - }, - }, -} -``` - -Or as a `.md` file (`.kilo/agents/code.md`): - -```markdown ---- -model: openai/gpt-4o -temperature: 0.2 -permission: - edit: - "*.py": "allow" - "*": "deny" ---- - -You are a Python specialist. Only edit Python files. -``` - -## Migration from VSCode Extension Modes - -If you have existing `.kilocodemodes` or `custom_modes.yaml` files from the VSCode extension, the new extension automatically migrates them on startup. The migration converts: - -- `slug` to the agent name (key) -- `roleDefinition` + `customInstructions` to `prompt` -- `groups` (e.g., `["read", "edit", "browser"]`) to `permission` rules -- `whenToUse` / `description` to `description` -- Mode is set to `primary` - -Built-in mode slugs (`code`, `ask`, `debug`, `orchestrator`) are skipped since they have native agent equivalents. - -{% /tab %} -{% tab label="CLI" %} - -In the CLI, custom behavioral profiles are called **agents** instead of modes. Agents are defined as Markdown files with YAML frontmatter or as entries in the `agent` key of your config file. - -## What's Included in a Custom Agent? - -| Property | Description | -| --------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| **name** (filename) | The agent's identifier, derived from the `.md` filename (e.g., `docs-writer.md` creates an agent named `docs-writer`) | -| **description** | A short summary displayed in the agent picker and used by the orchestrator for delegation | -| **model** | Pin a specific model in `provider/model` format (e.g., `anthropic/claude-sonnet-4-20250514`) | -| **prompt** (markdown body) | The system prompt text — the markdown body of the file, injected into the agent's system prompt | -| **mode** | Role classification: `primary` (user-selectable), `subagent` (only invoked by other agents), or `all` (both) | -| **permission** | Per-agent permission overrides controlling which tools the agent can use (e.g., deny `edit`, `bash`) | -| **color** | Hex color (`#FF5733`) or theme keyword (`primary`, `accent`, `warning`, etc.) for the agent picker UI | -| **steps** | Maximum agentic iterations before forcing a text-only response | -| **temperature** / **top_p** | Sampling parameters for the agent's model | -| **variant** | Default model variant | -| **hidden** | If `true`, the agent is hidden from the UI (only meaningful for subagents) | -| **disable** | If `true`, removes the agent entirely | - -## Methods for Creating and Configuring Agents - -### 1. Ask Kilo! (Recommended) - -Ask Kilo to create an agent for you: - -``` -Create a new agent called "docs-writer" that can only read files and edit Markdown files. -``` - -Kilo will generate the agent definition and write it to `.kilo/agent/` in your project. - -### 2. Using `kilo agent create` - -The CLI provides an interactive command: - -```bash -kilo agent create -``` - -This walks you through selecting a description, mode, and tools, then uses an LLM to generate the agent's system prompt and writes a `.md` file with YAML frontmatter. - -### 3. Markdown Files with YAML Frontmatter - -Create `.md` files in any of these directories: - -``` -.kilo/agents/my-agent.md -.kilo/agent/my-agent.md -.opencode/agents/my-agent.md -``` - -For global agents, place files in your global config directory: - -``` -~/.config/kilo/agent/my-agent.md -``` - -The **filename** (minus `.md`) becomes the agent name. Nested directories create namespaced names (e.g., `agents/backend/sql.md` becomes agent `backend/sql`). - -**Example agent file** (`.kilo/agents/docs-writer.md`): - -```markdown ---- -description: Specialized for writing and editing technical documentation -mode: primary -color: "#10B981" -permission: - edit: - "*.md": "allow" - "*": "deny" - bash: deny ---- - -You are a technical documentation specialist. Your expertise includes: - -- Writing clear, well-structured documentation -- Following markdown best practices -- Creating helpful code examples - -Focus on clarity and completeness. Only edit Markdown files. -``` - -### 4. Config File (`kilo.json`) - -Define agents under the `agent` key in your project's `kilo.json` (or `opencode.jsonc`): - -```jsonc -{ - "agent": { - "docs-writer": { - "description": "Specialized for writing and editing technical documentation", - "mode": "primary", - "color": "#10B981", - "prompt": "You are a technical documentation specialist...", - "permission": { - "edit": "deny", - "bash": "deny", - }, - }, - // Override a built-in agent - "code": { - "model": "anthropic/claude-sonnet-4-20250514", - "temperature": 0.3, - }, - }, -} -``` - -## Agent Property Reference - -### `mode` - -Controls where the agent appears: - -| Value | Behavior | -| ---------- | -------------------------------------------------------------------------------------- | -| `primary` | Shown in the agent picker — the user can select it directly | -| `subagent` | Only invokable by other agents via the `task` tool | -| `all` | Available both as a top-level pick and as a subagent (default for user-defined agents) | - -### `permission` - -An ordered set of rules controlling tool access. Permissions support three actions: `allow`, `deny`, and `ask` (prompt the user). You can use glob patterns to scope rules to specific files or commands: - -```yaml -permission: - edit: - "*.md": "allow" - "*": "deny" - bash: deny - read: allow -``` - -Known permission types include: `read`, `edit`, `bash`, `glob`, `grep`, `list`, `task`, `webfetch`, `websearch`, `codesearch`, `todowrite`, `todoread`, and more. - -### `model` - -Pin a specific model using the `provider/model` format: - -```yaml -model: anthropic/claude-sonnet-4-20250514 -``` - -### `steps` - -Limits the number of agentic iterations (tool call rounds) before the agent is forced to respond with text only. Useful for preventing runaway agents: - -```yaml -steps: 25 -``` - -## Configuration Precedence - -Agent configurations merge from lowest to highest priority: - -1. Built-in (native) agent defaults -2. Global config (`~/.config/kilo/kilo.json`) -3. Project config (`kilo.json` at project root) -4. `.kilo/` / `.opencode/` directory configs and agent `.md` files -5. Environment variable overrides (`KILO_CONFIG_CONTENT`) - -When the same agent name appears at multiple levels, properties are merged (not replaced wholesale), so you can override just a model or temperature without redefining the entire agent. - -## Overriding Built-in Agents - -Override any built-in agent (**code**, **plan**, **debug**, **ask**, **orchestrator**, **explore**, **general**) by defining an agent with the same name: - -```jsonc -// kilo.json — override the built-in "code" agent -{ - "agent": { - "code": { - "model": "openai/gpt-4o", - "temperature": 0.2, - "permission": { - "edit": { - "*.py": "allow", - "*": "deny", - }, - }, - }, - }, -} -``` - -Or as a `.md` file (`.kilo/agents/code.md`): - -```markdown ---- -model: openai/gpt-4o -temperature: 0.2 -permission: - edit: - "*.py": "allow" - "*": "deny" ---- - -You are a Python specialist. Only edit Python files. -``` - -## Migration from VSCode Extension Modes - -If you have existing `.kilocodemodes` or `custom_modes.yaml` files from the VSCode extension, the CLI automatically migrates them on startup. The migration converts: - -- `slug` to the agent name (key) -- `roleDefinition` + `customInstructions` to `prompt` -- `groups` (e.g., `["read", "edit", "browser"]`) to `permission` rules -- `whenToUse` / `description` to `description` -- Mode is set to `primary` - -Built-in mode slugs (`code`, `ask`, `debug`, `orchestrator`) are skipped since they have native agent equivalents. - {% /tab %} {% /tabs %} ## Understanding Regex in Custom Modes {% tabs %} -{% tab label="VSCode (Legacy)" %} +{% tab label="VSCode" %} -Regular expressions (`fileRegex`) in the **VSCode** version offer fine-grained control over file editing permissions within tool groups. - -{% /tab %} -{% tab label="VSCode & CLI" %} - -The new extension and CLI use **permission rules with glob patterns** instead of regex. Permissions are defined per-tool (e.g., `edit`, `bash`, `read`) and support `allow`, `deny`, and `ask` actions with glob matching: +The extension uses **permission rules with glob patterns** instead of regex. Permissions are defined per-tool (e.g., `edit`, `bash`, `read`) and support `allow`, `deny`, and `ask` actions with glob matching: ```yaml permission: @@ -835,7 +836,26 @@ permission: "*": "deny" ``` -The **VSCode** version's `fileRegex` approach is automatically converted to permission rules during migration. +The **VSCode (Legacy)** version's `fileRegex` approach is automatically converted to permission rules during migration. + +{% /tab %} +{% tab label="CLI" %} + +The CLI uses **permission rules with glob patterns** instead of regex. Permissions are defined per-tool (e.g., `edit`, `bash`, `read`) and support `allow`, `deny`, and `ask` actions with glob matching: + +```yaml +permission: + edit: + "*.md": "allow" + "*": "deny" +``` + +The **VSCode (Legacy)** version's `fileRegex` approach is automatically converted to permission rules during migration. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +Regular expressions (`fileRegex`) in the **VSCode** version offer fine-grained control over file editing permissions within tool groups. {% /tab %} {% /tabs %} @@ -894,63 +914,7 @@ When a mode attempts to edit a file that doesn't match its `fileRegex` pattern, ## Example Configurations {% tabs %} -{% tab label="VSCode (Legacy)" %} - -### Basic Documentation Writer (YAML) - -```yaml -customModes: - - slug: docs-writer - name: 📝 Documentation Writer - description: Specialized for writing and editing technical documentation - roleDefinition: You are a technical writer specializing in clear documentation - groups: - - read - - - edit - - fileRegex: \.md$ - description: Markdown files only - customInstructions: Focus on clear explanations and examples -``` - -### Test Engineer with File Restrictions (YAML) - -```yaml -customModes: - - slug: test-engineer - name: 🧪 Test Engineer - description: Focused on writing and maintaining test suites - roleDefinition: You are a test engineer focused on code quality - whenToUse: Use for writing tests, debugging test failures, and improving test coverage - groups: - - read - - - edit - - fileRegex: \.(test|spec)\.(js|ts)$ - description: Test files only - - command -``` - -### Security Review Mode (YAML) - -```yaml -customModes: - - slug: security-review - name: 🔒 Security Reviewer - description: Read-only security analysis and vulnerability assessment - roleDefinition: You are a security specialist reviewing code for vulnerabilities - whenToUse: Use for security reviews and vulnerability assessments - customInstructions: |- - Focus on: - - Input validation issues - - Authentication and authorization flaws - - Data exposure risks - - Injection vulnerabilities - groups: - - read - - browser -``` - -{% /tab %} -{% tab label="VSCode & CLI" %} +{% tab label="VSCode" %} ### Basic Documentation Writer (`.kilo/agents/docs-writer.md`) @@ -1009,7 +973,7 @@ Focus on: - Injection vulnerabilities ``` -### Config File Example (`kilo.json`) +### Config File Example (`kilo.jsonc`) ```jsonc { @@ -1036,30 +1000,156 @@ Focus on: } ``` +{% /tab %} +{% tab label="CLI" %} + +### Basic Documentation Writer (`.kilo/agents/docs-writer.md`) + +```markdown +--- +description: Specialized for writing and editing technical documentation +mode: primary +color: "#10B981" +permission: + edit: + "*.md": "allow" + "*": "deny" + bash: deny +--- + +You are a technical writer specializing in clear documentation. +Focus on clear explanations and examples. +``` + +### Test Engineer (`.kilo/agents/test-engineer.md`) + +```markdown +--- +description: Focused on writing and maintaining test suites +mode: primary +color: "#F59E0B" +permission: + edit: + "*.{test,spec}.{js,ts}": "allow" + "*": "deny" +--- + +You are a test engineer focused on code quality. +Use for writing tests, debugging test failures, and improving test coverage. +``` + +### Security Reviewer (`.kilo/agents/security-review.md`) + +```markdown +--- +description: Read-only security analysis and vulnerability assessment +mode: primary +color: "#EF4444" +permission: + edit: deny + bash: deny +--- + +You are a security specialist reviewing code for vulnerabilities. + +Focus on: + +- Input validation issues +- Authentication and authorization flaws +- Data exposure risks +- Injection vulnerabilities +``` + +### Config File Example (`kilo.jsonc`) + +```jsonc +{ + "agent": { + "docs-writer": { + "description": "Specialized for writing and editing technical documentation", + "mode": "primary", + "color": "#10B981", + "prompt": "You are a technical writer specializing in clear documentation.", + "permission": { + "edit": { "*.md": "allow", "*": "deny" }, + "bash": "deny", + }, + }, + "test-engineer": { + "description": "Focused on writing and maintaining test suites", + "mode": "primary", + "prompt": "You are a test engineer focused on code quality.", + "permission": { + "edit": { "*.{test,spec}.{js,ts}": "allow", "*": "deny" }, + }, + }, + }, +} +``` + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +### Basic Documentation Writer (YAML) + +```yaml +customModes: + - slug: docs-writer + name: 📝 Documentation Writer + description: Specialized for writing and editing technical documentation + roleDefinition: You are a technical writer specializing in clear documentation + groups: + - read + - - edit + - fileRegex: \.md$ + description: Markdown files only + customInstructions: Focus on clear explanations and examples +``` + +### Test Engineer with File Restrictions (YAML) + +```yaml +customModes: + - slug: test-engineer + name: 🧪 Test Engineer + description: Focused on writing and maintaining test suites + roleDefinition: You are a test engineer focused on code quality + whenToUse: Use for writing tests, debugging test failures, and improving test coverage + groups: + - read + - - edit + - fileRegex: \.(test|spec)\.(js|ts)$ + description: Test files only + - command +``` + +### Security Review Mode (YAML) + +```yaml +customModes: + - slug: security-review + name: 🔒 Security Reviewer + description: Read-only security analysis and vulnerability assessment + roleDefinition: You are a security specialist reviewing code for vulnerabilities + whenToUse: Use for security reviews and vulnerability assessments + customInstructions: |- + Focus on: + - Input validation issues + - Authentication and authorization flaws + - Data exposure risks + - Injection vulnerabilities + groups: + - read + - browser +``` + {% /tab %} {% /tabs %} ## Troubleshooting {% tabs %} -{% tab label="VSCode (Legacy)" %} - -### Common Issues - -- **Mode not appearing:** After creating or importing a mode, you may need to reload the VS Code window -- **Invalid regex patterns:** Test your patterns using online regex testers before applying them -- **Precedence confusion:** Remember that project modes completely override global modes with the same slug -- **YAML syntax errors:** Use proper indentation (spaces, not tabs) and validate your YAML - -### Tips for Working with YAML - -- **Indentation is Key:** YAML uses indentation (spaces, not tabs) to define structure -- **Colons for Key-Value Pairs:** Keys must be followed by a colon and a space (e.g., `slug: my-mode`) -- **Hyphens for List Items:** List items start with a hyphen and a space (e.g., `- read`) -- **Validate Your YAML:** Use online YAML validators or your editor's built-in validation - -{% /tab %} -{% tab label="VSCode (Legacy)" %} +{% tab label="VSCode" %} ### Common Issues @@ -1092,6 +1182,23 @@ Focus on: - **Test with `kilo agent create`** to see how the CLI generates agent definitions, then customize from there - **Legacy modes are auto-migrated:** If you have `.kilocodemodes` files, they'll be converted on startup — no manual migration needed +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +### Common Issues + +- **Mode not appearing:** After creating or importing a mode, you may need to reload the VS Code window +- **Invalid regex patterns:** Test your patterns using online regex testers before applying them +- **Precedence confusion:** Remember that project modes completely override global modes with the same slug +- **YAML syntax errors:** Use proper indentation (spaces, not tabs) and validate your YAML + +### Tips for Working with YAML + +- **Indentation is Key:** YAML uses indentation (spaces, not tabs) to define structure +- **Colons for Key-Value Pairs:** Keys must be followed by a colon and a space (e.g., `slug: my-mode`) +- **Hyphens for List Items:** List items start with a hyphen and a space (e.g., `- read`) +- **Validate Your YAML:** Use online YAML validators or your editor's built-in validation + {% /tab %} {% /tabs %} diff --git a/packages/kilo-docs/pages/customize/custom-rules.md b/packages/kilo-docs/pages/customize/custom-rules.md index d89be15ed5e..5aa86a9a11b 100644 --- a/packages/kilo-docs/pages/customize/custom-rules.md +++ b/packages/kilo-docs/pages/customize/custom-rules.md @@ -29,6 +29,78 @@ Kilo Code supports two types of custom rules: ## Rule Location {% tabs %} +{% tab label="VSCode" %} + +### Project Rules + +Project rules are configured via the `instructions` key in your project's `kilo.jsonc` file. You can edit this file directly or use the **Settings** webview to manage the `instructions` configuration. Each entry points to a file path or glob pattern: + +```jsonc +// kilo.jsonc +{ + "instructions": [".kilo/rules/formatting.md", ".kilo/rules/*.md"], +} +``` + +You can also place rule files in the **`.kilo/`** directory structure: + +``` +project/ +├── .kilo/ +│ ├── rules/ +│ │ ├── formatting.md +│ │ ├── restricted_files.md +│ │ └── naming_conventions.md +├── kilo.json +├── src/ +└── ... +``` + +### Global Rules + +Global rules are configured via the `instructions` key in your global `kilo.jsonc` config file (typically at `~/.config/kilo/kilo.jsonc`). + +{% callout type="note" title="Migration" %} +The extension is backward compatible with `.kilocode/rules/` directories. Existing rules will continue to work, but migrating to `kilo.jsonc` is recommended. +{% /callout %} + +{% /tab %} +{% tab label="CLI" %} + +### Project Rules + +Project rules are configured via the `instructions` key in your project's `kilo.jsonc` file. Each entry points to a file path or glob pattern: + +```jsonc +// kilo.jsonc +{ + "instructions": [".kilo/rules/formatting.md", ".kilo/rules/*.md"], +} +``` + +You can also place rule files in the **`.kilo/`** directory structure: + +``` +project/ +├── .kilo/ +│ ├── rules/ +│ │ ├── formatting.md +│ │ ├── restricted_files.md +│ │ └── naming_conventions.md +├── kilo.json +├── src/ +└── ... +``` + +### Global Rules + +Global rules are configured via the `instructions` key in your global `kilo.jsonc` config file (typically at `~/.config/kilo/kilo.jsonc`). + +{% callout type="note" title="Migration" %} +The CLI is backward compatible with `.kilocode/rules/` directories. Existing rules will continue to work, but migrating to `kilo.jsonc` is recommended. +{% /callout %} + +{% /tab %} {% tab label="VSCode (Legacy)" %} ### Project Rules @@ -58,84 +130,52 @@ Global rules are stored in your home directory and apply to all projects: │ └── documentation_style.md ``` -{% /tab %} -{% tab label="VSCode (Legacy)" %} - -### Project Rules - -Project rules are configured via the `instructions` key in your project's `kilo.json` file. You can edit this file directly or use the **Settings** webview to manage the `instructions` configuration. Each entry points to a file path or glob pattern: - -```jsonc -// kilo.json -{ - "instructions": [".kilo/rules/formatting.md", ".kilo/rules/*.md"], -} -``` - -You can also place rule files in the **`.kilo/`** directory structure: - -``` -project/ -├── .kilo/ -│ ├── rules/ -│ │ ├── formatting.md -│ │ ├── restricted_files.md -│ │ └── naming_conventions.md -├── kilo.json -├── src/ -└── ... -``` - -### Global Rules - -Global rules are configured via the `instructions` key in your global `kilo.json` config file (typically at `~/.config/kilo/kilo.json`). - -{% callout type="note" title="Migration" %} -The new extension is backward compatible with `.kilocode/rules/` directories. Existing rules will continue to work, but migrating to `kilo.json` is recommended. -{% /callout %} - -{% /tab %} -{% tab label="CLI" %} - -### Project Rules - -Project rules are configured via the `instructions` key in your project's `kilo.json` file. Each entry points to a file path or glob pattern: - -```jsonc -// kilo.json -{ - "instructions": [".kilo/rules/formatting.md", ".kilo/rules/*.md"], -} -``` - -You can also place rule files in the **`.kilo/`** directory structure: - -``` -project/ -├── .kilo/ -│ ├── rules/ -│ │ ├── formatting.md -│ │ ├── restricted_files.md -│ │ └── naming_conventions.md -├── kilo.json -├── src/ -└── ... -``` - -### Global Rules - -Global rules are configured via the `instructions` key in your global `kilo.json` config file (typically at `~/.config/kilo/kilo.json`). - -{% callout type="note" title="Migration" %} -The CLI is backward compatible with `.kilocode/rules/` directories. Existing rules will continue to work, but migrating to `kilo.json` is recommended. -{% /callout %} - {% /tab %} {% /tabs %} ## Managing Rules Through the UI {% tabs %} +{% tab label="VSCode" %} + +Rules are managed by editing the `instructions` array in your `kilo.jsonc` config file. You can also use the **Settings** webview in VS Code to edit the configuration. + +- **Add a rule**: Add a file path or glob pattern to the `instructions` array +- **Remove a rule**: Remove the entry from the array +- **Disable a rule temporarily**: Comment out the line in `kilo.jsonc` (JSONC supports `//` comments) + +```jsonc +// kilo.jsonc +{ + "instructions": [ + ".kilo/rules/formatting.md", + // ".kilo/rules/experimental.md" -- temporarily disabled + ".kilo/rules/naming_conventions.md", + ], +} +``` + +{% /tab %} +{% tab label="CLI" %} + +Rules are managed by editing the `instructions` array in your `kilo.jsonc` config file directly. + +- **Add a rule**: Add a file path or glob pattern to the `instructions` array +- **Remove a rule**: Remove the entry from the array +- **Disable a rule temporarily**: Comment out the line in `kilo.jsonc` (JSONC supports `//` comments) + +```jsonc +// kilo.jsonc +{ + "instructions": [ + ".kilo/rules/formatting.md", + // ".kilo/rules/experimental.md" -- temporarily disabled + ".kilo/rules/naming_conventions.md", + ], +} +``` + +{% /tab %} {% tab label="VSCode (Legacy)" %} Kilo Code provides a built-in interface for managing your custom rules without manually editing files in the `.kilocode/rules/` directories. To access the UI, click on the icon in the **bottom right corner** of the Kilo Code window. @@ -151,52 +191,40 @@ You can access the rules management UI to: The built-in rules management UI is available for general rules only. Mode-specific rules must be managed through the file system. {% /callout %} -{% /tab %} -{% tab label="VSCode (Legacy)" %} - -Rules are managed by editing the `instructions` array in your `kilo.json` config file. You can also use the **Settings** webview in VS Code to edit the configuration. - -- **Add a rule**: Add a file path or glob pattern to the `instructions` array -- **Remove a rule**: Remove the entry from the array -- **Disable a rule temporarily**: Comment out the line in `kilo.json` (JSONC supports `//` comments) - -```jsonc -// kilo.json -{ - "instructions": [ - ".kilo/rules/formatting.md", - // ".kilo/rules/experimental.md" -- temporarily disabled - ".kilo/rules/naming_conventions.md", - ], -} -``` - -{% /tab %} -{% tab label="CLI" %} - -Rules are managed by editing the `instructions` array in your `kilo.json` config file directly. - -- **Add a rule**: Add a file path or glob pattern to the `instructions` array -- **Remove a rule**: Remove the entry from the array -- **Disable a rule temporarily**: Comment out the line in `kilo.json` (JSONC supports `//` comments) - -```jsonc -// kilo.json -{ - "instructions": [ - ".kilo/rules/formatting.md", - // ".kilo/rules/experimental.md" -- temporarily disabled - ".kilo/rules/naming_conventions.md", - ], -} -``` - {% /tab %} {% /tabs %} ## Rule Loading Order {% tabs %} +{% tab label="VSCode" %} + +Rules are loaded in the order they appear in the `instructions` array in `kilo.jsonc`: + +1. **Global instructions** from the global `kilo.jsonc` config +2. **Project instructions** from the project's `kilo.jsonc` + +Files matched by glob patterns are loaded in filesystem order. Project-level instructions take precedence over global instructions for conflicting directives. + +{% callout type="note" title="Backward Compatibility" %} +If `.kilocode/rules/` directories exist in your project, their contents are automatically included for backward compatibility. To fully migrate, move your rule files and reference them in `kilo.jsonc`. +{% /callout %} + +{% /tab %} +{% tab label="CLI" %} + +Rules are loaded in the order they appear in the `instructions` array in `kilo.jsonc`: + +1. **Global instructions** from the global `kilo.jsonc` config +2. **Project instructions** from the project's `kilo.jsonc` + +Files matched by glob patterns are loaded in filesystem order. Project-level instructions take precedence over global instructions for conflicting directives. + +{% callout type="note" title="Backward Compatibility" %} +If `.kilocode/rules/` directories exist in your project, their contents are automatically included for backward compatibility. To fully migrate, move your rule files and reference them in `kilo.jsonc`. +{% /callout %} + +{% /tab %} {% tab label="VSCode (Legacy)" %} ### General Rules (Any Mode) @@ -225,26 +253,50 @@ The system also supports mode-specific rules with their own priority order: Mode-specific rules are only supported at the project level. When both generic and mode-specific rules exist, mode-specific rules take priority. -{% /tab %} -{% tab label="VSCode & CLI" %} - -Rules are loaded in the order they appear in the `instructions` array in `kilo.json`: - -1. **Global instructions** from the global `kilo.json` config -2. **Project instructions** from the project's `kilo.json` - -Files matched by glob patterns are loaded in filesystem order. Project-level instructions take precedence over global instructions for conflicting directives. - -{% callout type="note" title="Backward Compatibility" %} -If `.kilocode/rules/` directories exist in your project, their contents are automatically included for backward compatibility. To fully migrate, move your rule files and reference them in `kilo.json`. -{% /callout %} - {% /tab %} {% /tabs %} ## Creating Custom Rules {% tabs %} +{% tab label="VSCode" %} + +### Using the Settings UI or Config File + +1. Create a `kilo.jsonc` file in your project root (if it doesn't exist) +2. Create a `.kilo/rules/` directory (or any directory you prefer) +3. Write your rule as a Markdown file in that directory +4. Add the file path or a glob pattern to the `instructions` array in `kilo.jsonc` + +```jsonc +// kilo.jsonc +{ + "instructions": [".kilo/rules/my-new-rule.md"], +} +``` + +Rules are applied on the next interaction. You can also edit `kilo.jsonc` through the **Settings** webview in VS Code. + +{% /tab %} +{% tab label="CLI" %} + +### Using the Config File + +1. Create a `kilo.jsonc` file in your project root (if it doesn't exist) +2. Create a `.kilo/rules/` directory (or any directory you prefer) +3. Write your rule as a Markdown file in that directory +4. Add the file path or a glob pattern to the `instructions` array in `kilo.jsonc` + +```jsonc +// kilo.jsonc +{ + "instructions": [".kilo/rules/my-new-rule.md"], +} +``` + +Rules are applied on the next interaction. + +{% /tab %} {% tab label="VSCode (Legacy)" %} ### Using the UI Interface @@ -278,44 +330,6 @@ To create rules manually: Rules will be automatically applied to all future Kilo Code interactions. Any new changes will be applied immediately. -{% /tab %} -{% tab label="VSCode (Legacy)" %} - -### Using the Settings UI or Config File - -1. Create a `kilo.json` file in your project root (if it doesn't exist) -2. Create a `.kilo/rules/` directory (or any directory you prefer) -3. Write your rule as a Markdown file in that directory -4. Add the file path or a glob pattern to the `instructions` array in `kilo.json` - -```jsonc -// kilo.json -{ - "instructions": [".kilo/rules/my-new-rule.md"], -} -``` - -Rules are applied on the next interaction. You can also edit `kilo.json` through the **Settings** webview in VS Code. - -{% /tab %} -{% tab label="CLI" %} - -### Using the Config File - -1. Create a `kilo.json` file in your project root (if it doesn't exist) -2. Create a `.kilo/rules/` directory (or any directory you prefer) -3. Write your rule as a Markdown file in that directory -4. Add the file path or a glob pattern to the `instructions` array in `kilo.json` - -```jsonc -// kilo.json -{ - "instructions": [".kilo/rules/my-new-rule.md"], -} -``` - -Rules are applied on the next interaction. - {% /tab %} {% /tabs %} @@ -399,6 +413,22 @@ If your custom rules aren't being properly followed: 3. **Check rule locations**: {% tabs %} +{% tab label="VSCode" %} + +- Verify that your `kilo.jsonc` file is valid JSON (with comments) +- Ensure the `instructions` paths resolve to existing files +- Check that glob patterns match the intended files +- Run `kilo` to see if rules are loaded in the output + +{% /tab %} +{% tab label="CLI" %} + +- Verify that your `kilo.jsonc` file is valid JSON (with comments) +- Ensure the `instructions` paths resolve to existing files +- Check that glob patterns match the intended files +- Run `kilo` to see if rules are loaded in the output + +{% /tab %} {% tab label="VSCode (Legacy)" %} - **Check rule status in the UI**: Use the rules management interface to verify that your rules are active and properly loaded @@ -408,14 +438,6 @@ If your custom rules aren't being properly followed: - Legacy files: `.kilocoderules`, `.roorules`, or `.clinerules` - **Restart VS Code** to ensure the rules are properly loaded -{% /tab %} -{% tab label="VSCode & CLI" %} - -- Verify that your `kilo.json` file is valid JSON (with comments) -- Ensure the `instructions` paths resolve to existing files -- Check that glob patterns match the intended files -- Run `kilo` to see if rules are loaded in the output - {% /tab %} {% /tabs %} diff --git a/packages/kilo-docs/pages/customize/custom-subagents.md b/packages/kilo-docs/pages/customize/custom-subagents.md index 7fa87c195af..e2c2dc6e379 100644 --- a/packages/kilo-docs/pages/customize/custom-subagents.md +++ b/packages/kilo-docs/pages/customize/custom-subagents.md @@ -9,7 +9,7 @@ platform: new Kilo Code's CLI supports **custom subagents** — specialized AI assistants that can be invoked by primary agents or manually via `@` mentions. Subagents run in their own isolated sessions with tailored prompts, models, tool access, and permissions, enabling you to build purpose-built workflows for tasks like code review, documentation, security audits, and more. {% callout type="info" %} -Custom subagents are currently configured through the config file (`kilo.json`) or via markdown agent files. UI-based configuration is not yet available. +Custom subagents are currently configured through the config file (`kilo.jsonc`) or via markdown agent files. UI-based configuration is not yet available. {% /callout %} ## What Are Subagents? @@ -48,7 +48,7 @@ There are two ways to define custom subagents: through JSON configuration or mar ### Method 1: JSON Configuration -Add agents to the `agent` section of your `kilo.json` config file. Any key that doesn't match a built-in agent name creates a new custom agent. +Add agents to the `agent` section of your `kilo.jsonc` config file. Any key that doesn't match a built-in agent name creates a new custom agent. ```json { @@ -247,7 +247,7 @@ Agent configurations are merged from multiple sources. Later sources override ea 1. **Built-in agent defaults** (native agents defined in the codebase) 2. **Global config** (`~/.config/kilo/config.json`) 3. **Global agent markdown files** (`~/.config/kilo/agents/*.md`) -4. **Project config** (`kilo.json` in the project root) +4. **Project config** (`kilo.jsonc` in the project root) 5. **Project agent markdown files** (`.kilo/agents/*.md`) When overriding a built-in agent, properties are merged — only the fields you specify are overridden. When creating a new custom agent, unspecified fields use sensible defaults (`mode: "all"`, full permissions inherited from global config). @@ -374,5 +374,4 @@ To disable a built-in agent entirely: - [Custom Modes](/docs/customize/custom-modes) — Create specialized primary agents with tool restrictions - [Custom Rules](/docs/customize/custom-rules) — Define rules that apply to specific file types or situations -- [Orchestrator Mode](/docs/code-with-ai/agents/orchestrator-mode) — Coordinate complex tasks by delegating to subagents -- [Task Tool](/docs/automate/tools/new-task) — The tool used to invoke subagents +- [Orchestrator Mode (Deprecated)](/docs/code-with-ai/agents/orchestrator-mode) — Legacy orchestration approach, now replaced by native subagent support diff --git a/packages/kilo-docs/pages/customize/skills.md b/packages/kilo-docs/pages/customize/skills.md index 8d49fbb7e64..cc180e4df6a 100644 --- a/packages/kilo-docs/pages/customize/skills.md +++ b/packages/kilo-docs/pages/customize/skills.md @@ -48,6 +48,112 @@ This means: Skills are loaded from multiple locations, allowing both personal skills and project-specific instructions. {% tabs %} +{% tab label="VSCode" %} + +### Global Skills (User-Level) + +Global skills are located in the `.kilo` directory within your Home directory: + +- Mac and Linux: `~/.kilo/skills/` +- Windows: `\Users\\.kilo\skills\` + +``` +~/.kilo/ +└── skills/ # Generic skills (all modes) + ├── my-skill/ + │ └── SKILL.md + └── another-skill/ + └── SKILL.md +``` + +### Project Skills (Workspace-Level) + +Located in `.kilo/skills/` within your project: + +``` +your-project/ +└── .kilo/ + └── skills/ # Generic skills for this project + └── project-conventions/ + └── SKILL.md +``` + +### Compatibility Directories + +For interoperability with other tools, the CLI also loads skills from: + +- `.claude/skills/` — Claude Code compatibility +- `.agents/skills/` — Open agent standard + +### Additional Skill Paths and Remote URLs + +You can configure extra skill locations and remote skill URLs in your `kilo.jsonc` config (project or global): + +```jsonc +{ + "skills": { + "paths": ["/path/to/shared/skills", "~/my-skills", "relative/skills"], + "urls": ["https://example.com/skills/my-skill/SKILL.md"], + }, +} +``` + +The `skills.paths` key accepts absolute paths, `~/` home-relative paths, or paths relative to the project root. The `skills.urls` key accepts URLs pointing to remote `SKILL.md` files that are fetched on demand. + +{% /tab %} +{% tab label="CLI" %} + +### Global Skills (User-Level) + +Global skills are located in the `.kilo` directory within your Home directory: + +- Mac and Linux: `~/.kilo/skills/` +- Windows: `\Users\\.kilo\skills\` + +``` +~/.kilo/ +└── skills/ # Generic skills (all modes) + ├── my-skill/ + │ └── SKILL.md + └── another-skill/ + └── SKILL.md +``` + +### Project Skills (Workspace-Level) + +Located in `.kilo/skills/` within your project: + +``` +your-project/ +└── .kilo/ + └── skills/ # Generic skills for this project + └── project-conventions/ + └── SKILL.md +``` + +### Compatibility Directories + +For interoperability with other tools, the CLI also loads skills from: + +- `.claude/skills/` — Claude Code compatibility +- `.agents/skills/` — Open agent standard + +### Additional Skill Paths and Remote URLs + +You can configure extra skill locations and remote skill URLs in your `kilo.jsonc` config (project or global): + +```jsonc +{ + "skills": { + "paths": ["/path/to/shared/skills", "~/my-skills", "relative/skills"], + "urls": ["https://example.com/skills/my-skill/SKILL.md"], + }, +} +``` + +The `skills.paths` key accepts absolute paths, `~/` home-relative paths, or paths relative to the project root. The `skills.urls` key accepts URLs pointing to remote `SKILL.md` files that are fetched on demand. + +{% /tab %} {% tab label="VSCode (Legacy)" %} ### Global Skills (User-Level) @@ -87,65 +193,26 @@ your-project/ └── SKILL.md ``` -{% /tab %} -{% tab label="VSCode & CLI" %} - -### Global Skills (User-Level) - -Global skills are located in the `.kilo` directory within your Home directory: - -- Mac and Linux: `~/.kilo/skills/` -- Windows: `\Users\\.kilo\skills\` - -``` -~/.kilo/ -└── skills/ # Generic skills (all modes) - ├── my-skill/ - │ └── SKILL.md - └── another-skill/ - └── SKILL.md -``` - -### Project Skills (Workspace-Level) - -Located in `.kilo/skills/` within your project: - -``` -your-project/ -└── .kilo/ - └── skills/ # Generic skills for this project - └── project-conventions/ - └── SKILL.md -``` - -### Compatibility Directories - -For interoperability with other tools, the CLI also loads skills from: - -- `.claude/skills/` — Claude Code compatibility -- `.agents/skills/` — Open agent standard - -### Additional Skill Paths and Remote URLs - -You can configure extra skill locations and remote skill URLs in your `kilo.json` config (project or global): - -```jsonc -{ - "skills": { - "paths": ["/path/to/shared/skills"], - "urls": ["https://example.com/skills/my-skill/SKILL.md"], - }, -} -``` - -The `skills.paths` key accepts absolute paths to additional skill directories. The `skills.urls` key accepts URLs pointing to remote `SKILL.md` files that are fetched on demand. - {% /tab %} {% /tabs %} ## Mode-Specific Skills {% tabs %} +{% tab label="VSCode" %} + +The new platform does not use mode-specific skill directories. All skills are loaded into a shared pool and the agent decides which skill to invoke based on the skill's `description` field and the current task context. + +If you need a skill to only apply in certain situations, write a clear and specific `description` in the SKILL.md frontmatter so the agent knows when to use it. + +{% /tab %} +{% tab label="CLI" %} + +The new platform does not use mode-specific skill directories. All skills are loaded into a shared pool and the agent decides which skill to invoke based on the skill's `description` field and the current task context. + +If you need a skill to only apply in certain situations, write a clear and specific `description` in the SKILL.md frontmatter so the agent knows when to use it. + +{% /tab %} {% tab label="VSCode (Legacy)" %} To create a skill that only appears in a specific mode, place it in a `skills-{mode-slug}` directory: @@ -160,19 +227,22 @@ mkdir -p ~/.kilocode/skills-architect/microservices The directory naming pattern is `skills-{mode-slug}` where `{mode-slug}` matches the mode's identifier (e.g., `code`, `architect`, `ask`, `debug`). -{% /tab %} -{% tab label="VSCode & CLI" %} - -The new platform does not use mode-specific skill directories. All skills are loaded into a shared pool and the agent decides which skill to invoke based on the skill's `description` field and the current task context. - -If you need a skill to only apply in certain situations, write a clear and specific `description` in the SKILL.md frontmatter so the agent knows when to use it. - {% /tab %} {% /tabs %} ## Priority and Overrides {% tabs %} +{% tab label="VSCode" %} + +When multiple skills share the same name, project-level skills (`.kilo/skills/`) take precedence over global skills (`~/.kilo/skills/`). Skills from compatibility directories (`.claude/skills/`, `.agents/skills/`) and additional configured paths are loaded alongside project and global skills. + +{% /tab %} +{% tab label="CLI" %} + +When multiple skills share the same name, project-level skills (`.kilo/skills/`) take precedence over global skills (`~/.kilo/skills/`). Skills from compatibility directories (`.claude/skills/`, `.agents/skills/`) and additional configured paths are loaded alongside project and global skills. + +{% /tab %} {% tab label="VSCode (Legacy)" %} When multiple skills share the same name, Kilo Code uses these priority rules: @@ -186,17 +256,32 @@ This allows you to: - Override them per-project when needed - Customize behavior for specific modes -{% /tab %} -{% tab label="VSCode & CLI" %} - -When multiple skills share the same name, project-level skills (`.kilo/skills/`) take precedence over global skills (`~/.kilo/skills/`). Skills from compatibility directories (`.claude/skills/`, `.agents/skills/`) and additional configured paths are loaded alongside project and global skills. - {% /tab %} {% /tabs %} ## When Skills Are Loaded {% tabs %} +{% tab label="VSCode" %} + +Skills are discovered when a session starts. The CLI scans all configured skill directories and reads metadata (name, description, file path) for each skill. + +- In the **CLI**: Skills are loaded when you start a new session or run `kilo run` +- In the **VS Code extension**: Skills are loaded when the extension connects to the CLI server + +Skills are re-scanned at the start of each new session. To pick up newly added or modified skills, start a new session. + +{% /tab %} +{% tab label="CLI" %} + +Skills are discovered when a session starts. The CLI scans all configured skill directories and reads metadata (name, description, file path) for each skill. + +- In the **CLI**: Skills are loaded when you start a new session or run `kilo run` +- In the **VS Code extension**: Skills are loaded when the extension connects to the CLI server + +Skills are re-scanned at the start of each new session. To pick up newly added or modified skills, start a new session. + +{% /tab %} {% tab label="VSCode (Legacy)" %} Skills are discovered when Kilo Code initializes: @@ -212,16 +297,6 @@ Skills directories are monitored for changes to `SKILL.md` files. However, the m You can symlink skills directories to share skills across machines or from a central repository. When using symlinks, the skill's `name` field must match the **symlink name**, not the target directory name. -{% /tab %} -{% tab label="VSCode & CLI" %} - -Skills are discovered when a session starts. The CLI scans all configured skill directories and reads metadata (name, description, file path) for each skill. - -- In the **CLI**: Skills are loaded when you start a new session or run `kilo run` -- In the **VS Code extension**: Skills are loaded when the extension connects to the CLI server - -Skills are re-scanned at the start of each new session. To pick up newly added or modified skills, start a new session. - {% /tab %} {% /tabs %} @@ -313,6 +388,32 @@ These additional files can be referenced from your skill's instructions, allowin ## Example: Creating a Skill {% tabs %} +{% tab label="VSCode" %} + +1. Create the skill directory: + + ```bash + mkdir -p ~/.kilo/skills/api-design + ``` + +2. Create `SKILL.md` (see content below) + +3. Start a new session to pick up the skill + +{% /tab %} +{% tab label="CLI" %} + +1. Create the skill directory: + + ```bash + mkdir -p ~/.kilo/skills/api-design + ``` + +2. Create `SKILL.md` (see content below) + +3. Start a new session to pick up the skill + +{% /tab %} {% tab label="VSCode (Legacy)" %} 1. Create the skill directory: @@ -327,19 +428,6 @@ These additional files can be referenced from your skill's instructions, allowin 4. The skill will now be available in all modes -{% /tab %} -{% tab label="VSCode & CLI" %} - -1. Create the skill directory: - - ```bash - mkdir -p ~/.kilo/skills/api-design - ``` - -2. Create `SKILL.md` (see content below) - -3. Start a new session to pick up the skill - {% /tab %} {% /tabs %} @@ -381,15 +469,7 @@ When designing REST APIs, follow these conventions: ## Finding Skills {% tabs %} -{% tab label="VSCode (Legacy)" %} - -You can discover and install community-created skills through: - -- **Kilo Marketplace** — Browse skills directly in the Kilo Code extension via the Marketplace tab, or explore the [Kilo Marketplace repository](https://github.com/Kilo-Org/kilo-marketplace) on GitHub -- [Agent Skills Specification](https://agentskills.io/home) — The open specification that skills follow, enabling interoperability across different AI agents - -{% /tab %} -{% tab label="VSCode & CLI" %} +{% tab label="VSCode" %} The new platform does not have a marketplace UI yet. You can find and share skills through: @@ -397,6 +477,23 @@ The new platform does not have a marketplace UI yet. You can find and share skil - **[Agent Skills Specification](https://agentskills.io/home)** — The open specification that skills follow, enabling interoperability across different AI agents - **Remote URLs** — Use the `skills.urls` config key to load skills directly from URLs without manually downloading them +{% /tab %} +{% tab label="CLI" %} + +The new platform does not have a marketplace UI yet. You can find and share skills through: + +- **[Kilo Marketplace repository](https://github.com/Kilo-Org/kilo-marketplace)** — Browse community skills on GitHub and manually download them into your skills directory +- **[Agent Skills Specification](https://agentskills.io/home)** — The open specification that skills follow, enabling interoperability across different AI agents +- **Remote URLs** — Use the `skills.urls` config key to load skills directly from URLs without manually downloading them + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +You can discover and install community-created skills through: + +- **Kilo Marketplace** — Browse skills directly in the Kilo Code extension via the Marketplace tab, or explore the [Kilo Marketplace repository](https://github.com/Kilo-Org/kilo-marketplace) on GitHub +- [Agent Skills Specification](https://agentskills.io/home) — The open specification that skills follow, enabling interoperability across different AI agents + {% /tab %} {% /tabs %} @@ -405,6 +502,28 @@ The new platform does not have a marketplace UI yet. You can find and share skil ### Skill Not Loading? {% tabs %} +{% tab label="VSCode" %} + +1. **Verify frontmatter**: Ensure `name` and `description` are present in the YAML frontmatter. The `name` does not need to match the directory name but should be unique across all loaded skills. + +2. **Start a new session**: Skills are scanned at session start. Begin a new session to pick up changes. + +3. **Check file location**: Ensure `SKILL.md` is directly inside the skill directory (e.g., `.kilo/skills/my-skill/SKILL.md`), not nested further. + +4. **Check config paths**: If using `skills.paths` or `skills.urls`, verify the paths and URLs are correct in your `kilo.jsonc`. + +{% /tab %} +{% tab label="CLI" %} + +1. **Verify frontmatter**: Ensure `name` and `description` are present in the YAML frontmatter. The `name` does not need to match the directory name but should be unique across all loaded skills. + +2. **Start a new session**: Skills are scanned at session start. Begin a new session to pick up changes. + +3. **Check file location**: Ensure `SKILL.md` is directly inside the skill directory (e.g., `.kilo/skills/my-skill/SKILL.md`), not nested further. + +4. **Check config paths**: If using `skills.paths` or `skills.urls`, verify the paths and URLs are correct in your `kilo.jsonc`. + +{% /tab %} {% tab label="VSCode (Legacy)" %} 1. **Check the Output panel**: Open `View` → `Output` → Select "Kilo Code" from dropdown. Look for skill-related errors. @@ -415,17 +534,6 @@ The new platform does not have a marketplace UI yet. You can find and share skil 4. **Check file location**: Ensure `SKILL.md` is directly inside the skill directory, not nested further. -{% /tab %} -{% tab label="VSCode & CLI" %} - -1. **Verify frontmatter**: Ensure `name` exactly matches the directory name and `description` is present. - -2. **Start a new session**: Skills are scanned at session start. Begin a new session to pick up changes. - -3. **Check file location**: Ensure `SKILL.md` is directly inside the skill directory (e.g., `.kilo/skills/my-skill/SKILL.md`), not nested further. - -4. **Check config paths**: If using `skills.paths` or `skills.urls`, verify the paths and URLs are correct in your `kilo.json`. - {% /tab %} {% /tabs %} @@ -444,17 +552,22 @@ If the agent confirms the skill is available, you're ready to use it. If not, ch ### Checking if a Skill Was Used {% tabs %} +{% tab label="VSCode" %} + +When the agent uses a skill, it invokes the `skill` tool with the skill's name. Look for a `skill` tool call in the conversation to confirm a skill was loaded. The tool output includes the full skill content injected into context. + +{% /tab %} +{% tab label="CLI" %} + +When the agent uses a skill, it invokes the `skill` tool with the skill's name. Look for a `skill` tool call in the conversation to confirm a skill was loaded. The tool output includes the full skill content injected into context. + +{% /tab %} {% tab label="VSCode (Legacy)" %} To see if a skill was actually used during a conversation, look for a `read_file` tool call in the chat that targets a `SKILL.md` file. When the agent decides to use a skill, it reads the full skill file into context—this appears as a file read operation in the conversation. There's currently no dedicated UI indicator showing "Skill X was activated." The `read_file` call is the most reliable way to confirm a skill was used. -{% /tab %} -{% tab label="VSCode & CLI" %} - -When the agent uses a skill, it invokes the `skill` tool with the skill's name. Look for a `skill` tool call in the conversation to confirm a skill was loaded. The tool output includes the full skill content injected into context. - {% /tab %} {% /tabs %} @@ -471,15 +584,20 @@ When the agent uses a skill, it invokes the `skill` tool with the skill's name. Have you created a skill that others might find useful? Share it with the community by contributing to the [Kilo Marketplace](https://github.com/Kilo-Org/kilo-marketplace)! {% tabs %} +{% tab label="VSCode" %} + +While the new platform does not yet have a built-in marketplace UI, skills from the [Kilo Marketplace repository](https://github.com/Kilo-Org/kilo-marketplace) can be manually downloaded into your `.kilo/skills/` directory or loaded via `skills.urls` in config. + +{% /tab %} +{% tab label="CLI" %} + +While the new platform does not yet have a built-in marketplace UI, skills from the [Kilo Marketplace repository](https://github.com/Kilo-Org/kilo-marketplace) can be manually downloaded into your `.kilo/skills/` directory or loaded via `skills.urls` in config. + +{% /tab %} {% tab label="VSCode (Legacy)" %} Skills submitted to the marketplace are browsable and installable directly from the Marketplace tab in the **VSCode** version. -{% /tab %} -{% tab label="VSCode & CLI" %} - -While the new platform does not yet have a built-in marketplace UI, skills from the [Kilo Marketplace repository](https://github.com/Kilo-Org/kilo-marketplace) can be manually downloaded into your `.kilo/skills/` directory or loaded via `skills.urls` in config. - {% /tab %} {% /tabs %} From 100a1fdd2c5939e01103681da24bf982efdae954 Mon Sep 17 00:00:00 2001 From: Aarav Sharma Date: Sun, 29 Mar 2026 08:45:36 -0600 Subject: [PATCH 23/81] fix(vscode): enable scrolling in local session history list The .session-list wrapper was missing flex: 1 and min-height: 0, causing the list to size to its content instead of being constrained by the parent flex container. Without a constrained height, the overflow-y: auto on the inner list-scroll element never triggered, making the session list unscrollable. The cloud session list already had these properties (.cloud-session-list). --- packages/kilo-vscode/webview-ui/src/styles/chat.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/kilo-vscode/webview-ui/src/styles/chat.css b/packages/kilo-vscode/webview-ui/src/styles/chat.css index 00f13417060..c27b21154f9 100644 --- a/packages/kilo-vscode/webview-ui/src/styles/chat.css +++ b/packages/kilo-vscode/webview-ui/src/styles/chat.css @@ -2200,6 +2200,14 @@ opacity: 0.7; } +/* Session List (inside History View) */ +.session-list { + display: flex; + flex-direction: column; + flex: 1; + min-height: 0; +} + /* Session List Items */ .session-list [data-slot="list-item-title"], .cloud-session-list [data-slot="list-item-title"] { From e9060468a1f1d11b06aa69e57645d3843c05edee Mon Sep 17 00:00:00 2001 From: Aarav Sharma Date: Sun, 29 Mar 2026 17:11:27 -0600 Subject: [PATCH 24/81] core: deprecate orchestrator agent with visual badge across UI Mark the orchestrator agent as deprecated so users see a warning badge in the mode switcher and agent settings, signaling they should migrate to other agent configurations for task delegation. --- packages/kilo-vscode/src/KiloProvider.ts | 1 + .../components/settings/AgentBehaviourTab.tsx | 14 ++++++++++++++ .../src/components/shared/ModeSwitcher.tsx | 19 ++++++++++++++++++- .../kilo-vscode/webview-ui/src/i18n/ar.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/br.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/bs.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/da.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/de.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/en.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/es.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/fr.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/ja.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/ko.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/nl.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/no.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/pl.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/ru.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/th.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/tr.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/zh.ts | 1 + .../kilo-vscode/webview-ui/src/i18n/zht.ts | 1 + .../webview-ui/src/types/messages.ts | 1 + packages/opencode/src/agent/agent.ts | 4 +++- .../cli/cmd/tui/component/dialog-agent.tsx | 3 ++- packages/sdk/js/src/v2/gen/types.gen.ts | 1 + packages/sdk/openapi.json | 3 +++ 26 files changed, 61 insertions(+), 3 deletions(-) diff --git a/packages/kilo-vscode/src/KiloProvider.ts b/packages/kilo-vscode/src/KiloProvider.ts index ba24906f0f9..9ce3ae749bf 100644 --- a/packages/kilo-vscode/src/KiloProvider.ts +++ b/packages/kilo-vscode/src/KiloProvider.ts @@ -1500,6 +1500,7 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper mode: a.mode, native: a.native, color: a.color, + deprecated: a.deprecated, })), defaultAgent, } diff --git a/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx b/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx index 9245f7bd014..ec039f1d37d 100644 --- a/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx @@ -342,6 +342,7 @@ const AgentBehaviourTab: Component = () => { const agentCfg = () => config().agent?.[name] ?? {} const disabled = () => agentCfg().disable ?? false const hidden = () => agentCfg().hidden ?? false + const deprecated = () => agent()?.deprecated ?? false return (
{ {language.t("settings.agentBehaviour.badge.disabled")} + + + {language.t("settings.agentBehaviour.badge.deprecated")} + +
= (props) => { const [open, setOpen] = createSignal(false) const [focused, setFocused] = createSignal(-1) + const language = useLanguage() let listRef: HTMLDivElement | undefined // Listen for slash command trigger @@ -132,7 +134,22 @@ export const ModeSwitcherBase: Component = (props) => { onClick={() => pick(agent.name)} onFocus={() => setFocused(i())} > - {formatAgentLabel(agent)} +
+ {formatAgentLabel(agent)} + + + {language.t("settings.agentBehaviour.badge.deprecated")} + + +
{agent.description} diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ar.ts b/packages/kilo-vscode/webview-ui/src/i18n/ar.ts index ac8b73e92e1..26a797b8ae7 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ar.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ar.ts @@ -1065,6 +1065,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "تعطيل هذا الوكيل بالكامل — لن يظهر في أي مكان", "settings.agentBehaviour.badge.hidden": "مخفي", "settings.agentBehaviour.badge.disabled": "معطل", + "settings.agentBehaviour.badge.deprecated": "مُهمَل", "settings.agentBehaviour.discoveredSkills": "المهارات المكتشفة", "settings.agentBehaviour.noSkillsFound": "لم يتم العثور على مهارات. أضف مسارات مجلدات أو عناوين URL أدناه لإتاحة المهارات.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/br.ts b/packages/kilo-vscode/webview-ui/src/i18n/br.ts index b2edcbca372..5c221c581a8 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/br.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/br.ts @@ -1083,6 +1083,7 @@ export const dict = { "Desativar completamente este agente — ele não aparecerá em nenhum lugar", "settings.agentBehaviour.badge.hidden": "oculto", "settings.agentBehaviour.badge.disabled": "desativado", + "settings.agentBehaviour.badge.deprecated": "Descontinuado", "settings.agentBehaviour.discoveredSkills": "Habilidades descobertas", "settings.agentBehaviour.noSkillsFound": "Nenhuma habilidade encontrada. Adicione caminhos de pastas ou URLs abaixo para disponibilizar habilidades.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/bs.ts b/packages/kilo-vscode/webview-ui/src/i18n/bs.ts index 2f989657a50..176a16e9255 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/bs.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/bs.ts @@ -1081,6 +1081,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "Potpuno onemogući ovog agenta — neće se pojaviti nigdje", "settings.agentBehaviour.badge.hidden": "skriveno", "settings.agentBehaviour.badge.disabled": "onemogućeno", + "settings.agentBehaviour.badge.deprecated": "Zastarjelo", "settings.agentBehaviour.discoveredSkills": "Otkrivene vještine", "settings.agentBehaviour.noSkillsFound": "Nisu pronađene vještine. Dodajte putanje mapa ili URL-ove ispod kako biste učinili vještine dostupnim.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/da.ts b/packages/kilo-vscode/webview-ui/src/i18n/da.ts index d0cc455b133..a1b480586d9 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/da.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/da.ts @@ -1075,6 +1075,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "Deaktiver denne agent fuldstændigt — den vises ingen steder", "settings.agentBehaviour.badge.hidden": "skjult", "settings.agentBehaviour.badge.disabled": "deaktiveret", + "settings.agentBehaviour.badge.deprecated": "Udfaset", "settings.agentBehaviour.discoveredSkills": "Opdagede skills", "settings.agentBehaviour.noSkillsFound": "Ingen skills fundet. Tilføj skill-mappestier eller URL'er nedenfor for at gøre skills tilgængelige.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/de.ts b/packages/kilo-vscode/webview-ui/src/i18n/de.ts index 8ff2588e346..db80f651478 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/de.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/de.ts @@ -1095,6 +1095,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "Diesen Agent vollständig deaktivieren — er wird nirgends angezeigt", "settings.agentBehaviour.badge.hidden": "versteckt", "settings.agentBehaviour.badge.disabled": "deaktiviert", + "settings.agentBehaviour.badge.deprecated": "Veraltet", "settings.agentBehaviour.discoveredSkills": "Erkannte Skills", "settings.agentBehaviour.noSkillsFound": "Keine Skills gefunden. Fügen Sie unten Skill-Ordnerpfade oder URLs hinzu, um Skills verfügbar zu machen.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/en.ts b/packages/kilo-vscode/webview-ui/src/i18n/en.ts index 213bded0966..60bfc371722 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/en.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/en.ts @@ -1077,6 +1077,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "Fully disable this agent — it will not appear anywhere", "settings.agentBehaviour.badge.hidden": "hidden", "settings.agentBehaviour.badge.disabled": "disabled", + "settings.agentBehaviour.badge.deprecated": "deprecated", "settings.agentBehaviour.discoveredSkills": "Discovered Skills", "settings.agentBehaviour.noSkillsFound": "No skills discovered. Add skill folder paths or URLs below to make skills available.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/es.ts b/packages/kilo-vscode/webview-ui/src/i18n/es.ts index 4302c5187b9..6d83e805e41 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/es.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/es.ts @@ -1086,6 +1086,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "Desactivar completamente este agente — no aparecerá en ningún lugar", "settings.agentBehaviour.badge.hidden": "oculto", "settings.agentBehaviour.badge.disabled": "desactivado", + "settings.agentBehaviour.badge.deprecated": "Obsoleto", "settings.agentBehaviour.discoveredSkills": "Habilidades descubiertas", "settings.agentBehaviour.noSkillsFound": "No se encontraron habilidades. Agregue rutas de carpetas o URLs abajo para hacer disponibles las habilidades.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/fr.ts b/packages/kilo-vscode/webview-ui/src/i18n/fr.ts index fb74537fbdb..c5f351ba1d6 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/fr.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/fr.ts @@ -1097,6 +1097,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "Désactiver complètement cet agent — il n'apparaîtra nulle part", "settings.agentBehaviour.badge.hidden": "masqué", "settings.agentBehaviour.badge.disabled": "désactivé", + "settings.agentBehaviour.badge.deprecated": "Déprécié", "settings.agentBehaviour.discoveredSkills": "Compétences découvertes", "settings.agentBehaviour.noSkillsFound": "Aucune compétence découverte. Ajoutez des chemins de dossiers ou des URLs ci-dessous pour rendre les compétences disponibles.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ja.ts b/packages/kilo-vscode/webview-ui/src/i18n/ja.ts index a8e298ef97e..028d0364c30 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ja.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ja.ts @@ -1075,6 +1075,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "このエージェントを完全に無効にする — どこにも表示されなくなります", "settings.agentBehaviour.badge.hidden": "非表示", "settings.agentBehaviour.badge.disabled": "無効", + "settings.agentBehaviour.badge.deprecated": "非推奨", "settings.agentBehaviour.discoveredSkills": "検出されたスキル", "settings.agentBehaviour.noSkillsFound": "スキルが見つかりません。スキルを利用可能にするには、以下にスキルフォルダパスまたはURLを追加してください。", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ko.ts b/packages/kilo-vscode/webview-ui/src/i18n/ko.ts index 31b562e318b..09c03950f3c 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ko.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ko.ts @@ -1072,6 +1072,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "이 에이전트를 완전히 비활성화 — 어디에도 표시되지 않습니다", "settings.agentBehaviour.badge.hidden": "숨김", "settings.agentBehaviour.badge.disabled": "비활성화됨", + "settings.agentBehaviour.badge.deprecated": "비권장", "settings.agentBehaviour.discoveredSkills": "검색된 스킬", "settings.agentBehaviour.noSkillsFound": "스킬을 찾을 수 없습니다. 스킬을 사용하려면 아래에 스킬 폴더 경로 또는 URL을 추가하세요.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/nl.ts b/packages/kilo-vscode/webview-ui/src/i18n/nl.ts index f7818d373f2..a4ae0ad6f45 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/nl.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/nl.ts @@ -1085,6 +1085,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "Schakel deze agent volledig uit — deze verschijnt nergens", "settings.agentBehaviour.badge.hidden": "verborgen", "settings.agentBehaviour.badge.disabled": "uitgeschakeld", + "settings.agentBehaviour.badge.deprecated": "Verouderd", "settings.agentBehaviour.discoveredSkills": "Ontdekte Skills", "settings.agentBehaviour.noSkillsFound": "Geen skills ontdekt. Voeg hieronder skill mappaden of URL's toe om skills beschikbaar te maken.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/no.ts b/packages/kilo-vscode/webview-ui/src/i18n/no.ts index 485a1d0b668..c1152d9ba34 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/no.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/no.ts @@ -1078,6 +1078,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "Deaktiver denne agenten fullstendig — den vises ikke noe sted", "settings.agentBehaviour.badge.hidden": "skjult", "settings.agentBehaviour.badge.disabled": "deaktivert", + "settings.agentBehaviour.badge.deprecated": "Utdatert", "settings.agentBehaviour.discoveredSkills": "Oppdagede ferdigheter", "settings.agentBehaviour.noSkillsFound": "Ingen ferdigheter funnet. Legg til ferdighetsmappestier eller URLer nedenfor for å gjøre ferdigheter tilgjengelige.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/pl.ts b/packages/kilo-vscode/webview-ui/src/i18n/pl.ts index 5db2913b2cf..9eaf50713cf 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/pl.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/pl.ts @@ -1079,6 +1079,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "Całkowicie wyłącz tego agenta — nie pojawi się nigdzie", "settings.agentBehaviour.badge.hidden": "ukryty", "settings.agentBehaviour.badge.disabled": "wyłączony", + "settings.agentBehaviour.badge.deprecated": "Przestarzały", "settings.agentBehaviour.discoveredSkills": "Wykryte umiejętności", "settings.agentBehaviour.noSkillsFound": "Nie znaleziono umiejętności. Dodaj ścieżki folderów lub adresy URL poniżej, aby udostępnić umiejętności.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ru.ts b/packages/kilo-vscode/webview-ui/src/i18n/ru.ts index c9b42fbe0a4..0a2ca396fd8 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ru.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ru.ts @@ -1081,6 +1081,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "Полностью отключить этого агента — он не будет отображаться нигде", "settings.agentBehaviour.badge.hidden": "скрытый", "settings.agentBehaviour.badge.disabled": "отключён", + "settings.agentBehaviour.badge.deprecated": "Устаревший", "settings.agentBehaviour.discoveredSkills": "Обнаруженные навыки", "settings.agentBehaviour.noSkillsFound": "Навыки не обнаружены. Добавьте пути к папкам навыков или URL-адреса ниже, чтобы сделать навыки доступными.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/th.ts b/packages/kilo-vscode/webview-ui/src/i18n/th.ts index 7d812f4fb1a..2b1be15ed01 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/th.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/th.ts @@ -1067,6 +1067,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "ปิดใช้งานเอเจนต์นี้อย่างสมบูรณ์ — จะไม่ปรากฏที่ใดเลย", "settings.agentBehaviour.badge.hidden": "ซ่อน", "settings.agentBehaviour.badge.disabled": "ปิดใช้งาน", + "settings.agentBehaviour.badge.deprecated": "เลิกใช้", "settings.agentBehaviour.discoveredSkills": "ทักษะที่ค้นพบ", "settings.agentBehaviour.noSkillsFound": "ไม่พบทักษะ เพิ่มเส้นทางโฟลเดอร์หรือ URL ด้านล่างเพื่อทำให้ทักษะพร้อมใช้งาน", "settings.agentBehaviour.availableModes": "โหมดกำหนดเองที่ใช้ได้", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/tr.ts b/packages/kilo-vscode/webview-ui/src/i18n/tr.ts index 07ffb9711bd..041985a6d51 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/tr.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/tr.ts @@ -1082,6 +1082,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "Bu ajanı tamamen devre dışı bırak — hiçbir yerde görünmeyecek", "settings.agentBehaviour.badge.hidden": "gizli", "settings.agentBehaviour.badge.disabled": "devre dışı", + "settings.agentBehaviour.badge.deprecated": "Kullanımdan kaldırılmış", "settings.agentBehaviour.discoveredSkills": "Keşfedilen Beceriler", "settings.agentBehaviour.noSkillsFound": "Keşfedilen beceri yok. Becerileri kullanılabilir kılmak için aşağıya beceri klasör yolları veya URL'ler ekleyin.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/zh.ts b/packages/kilo-vscode/webview-ui/src/i18n/zh.ts index ca2b27cb8ff..252e943497d 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/zh.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/zh.ts @@ -1057,6 +1057,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "完全禁用此智能体 — 它将不会出现在任何地方", "settings.agentBehaviour.badge.hidden": "隐藏", "settings.agentBehaviour.badge.disabled": "已禁用", + "settings.agentBehaviour.badge.deprecated": "弃用", "settings.agentBehaviour.discoveredSkills": "已发现的技能", "settings.agentBehaviour.noSkillsFound": "未发现任何技能。请在下方添加技能文件夹路径或 URL 以使技能可用。", "settings.agentBehaviour.availableModes": "可用自定义模式", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/zht.ts b/packages/kilo-vscode/webview-ui/src/i18n/zht.ts index 635328ba589..3a3eaf67e37 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/zht.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/zht.ts @@ -1059,6 +1059,7 @@ export const dict = { "settings.agentBehaviour.disable.description": "完全停用此 Agent — 它將不會出現在任何地方", "settings.agentBehaviour.badge.hidden": "隱藏", "settings.agentBehaviour.badge.disabled": "已停用", + "settings.agentBehaviour.badge.deprecated": "棄用", "settings.agentBehaviour.discoveredSkills": "已發現的 Skill", "settings.agentBehaviour.noSkillsFound": "未發現任何 Skill。請在下方新增 Skill 資料夾路徑或 URL 以使 Skill 可用。", "settings.agentBehaviour.availableModes": "可用自訂模式", diff --git a/packages/kilo-vscode/webview-ui/src/types/messages.ts b/packages/kilo-vscode/webview-ui/src/types/messages.ts index 63e633994e0..1734a94395d 100644 --- a/packages/kilo-vscode/webview-ui/src/types/messages.ts +++ b/packages/kilo-vscode/webview-ui/src/types/messages.ts @@ -219,6 +219,7 @@ export interface AgentInfo { mode: "subagent" | "primary" | "all" native?: boolean hidden?: boolean + deprecated?: boolean color?: string } diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index 16305db1286..7886a5ee534 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -37,6 +37,7 @@ export namespace Agent { mode: z.enum(["subagent", "primary", "all"]), native: z.boolean().optional(), hidden: z.boolean().optional(), + deprecated: z.boolean().optional(), topP: z.number().optional(), temperature: z.number().optional(), color: z.string().optional(), @@ -193,7 +194,7 @@ export namespace Agent { }, orchestrator: { name: "orchestrator", - description: "Coordinate complex tasks by delegating to specialized agents in parallel.", + description: "Deprecated. Coordinate complex tasks by delegating to specialized agents in parallel.", prompt: PROMPT_ORCHESTRATOR, options: {}, permission: PermissionNext.merge( @@ -226,6 +227,7 @@ export namespace Agent { ), mode: "primary", native: true, + deprecated: true, }, ask: { name: "ask", diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx index 24be2167d2b..6a8aa1f3f62 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx @@ -12,7 +12,8 @@ export function DialogAgent() { return { value: item.name, title: item.displayName ?? item.name, // kilocode_change - description: item.native ? "native" : item.description, + description: + [item.deprecated && "deprecated", item.native && "native"].filter(Boolean).join(", ") || item.description, } }), ) diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index af5ae1d6b6d..be71a41d7c8 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -1940,6 +1940,7 @@ export type Agent = { mode: "subagent" | "primary" | "all" native?: boolean hidden?: boolean + deprecated?: boolean topP?: number temperature?: number color?: string diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index 8393d52605d..3f4f142364e 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -14773,6 +14773,9 @@ "hidden": { "type": "boolean" }, + "deprecated": { + "type": "boolean" + }, "topP": { "type": "number" }, From 482bf89b6905c16ebc85bc53871b1884e00f4349 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 07:03:58 +0000 Subject: [PATCH 25/81] fix: add windowsHide:true to remaining spawn/exec calls to prevent CMD flash on Windows Previous fixes in #6813 and subsequent PRs added windowsHide:true to most spawn sites, but several call sites were missed or regressed: - SDK server.ts (v1 + v2): kilo serve and TUI spawn - ts-check.ts: Bun.spawn for tsc invocation - github.ts: exec for browser open - desktop-electron cli.ts: install script spawn and version check - desktop-electron ipc.ts: open-path execFile - desktop-electron apps.ts: wsl/where execFileSync calls Without windowsHide:true, each of these subprocess invocations causes a visible cmd.exe console window to briefly flash on Windows. Closes #7896 --- packages/desktop-electron/src/main/apps.ts | 6 +++--- packages/desktop-electron/src/main/cli.ts | 4 ++-- packages/desktop-electron/src/main/ipc.ts | 2 +- packages/opencode/src/cli/cmd/github.ts | 2 +- packages/opencode/src/kilocode/ts-check.ts | 1 + packages/sdk/js/src/server.ts | 2 ++ packages/sdk/js/src/v2/server.ts | 2 ++ 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/desktop-electron/src/main/apps.ts b/packages/desktop-electron/src/main/apps.ts index 2b460378948..16a0783067c 100644 --- a/packages/desktop-electron/src/main/apps.ts +++ b/packages/desktop-electron/src/main/apps.ts @@ -21,11 +21,11 @@ export function wslPath(path: string, mode: "windows" | "linux" | null): string if (path.startsWith("~")) { const suffix = path.slice(1) const cmd = `wslpath ${flag} \"$HOME${suffix.replace(/\"/g, '\\"')}\"` - const output = execFileSync("wsl", ["-e", "sh", "-lc", cmd]) + const output = execFileSync("wsl", ["-e", "sh", "-lc", cmd], { windowsHide: true }) return output.toString().trim() } - const output = execFileSync("wsl", ["-e", "wslpath", flag, path]) + const output = execFileSync("wsl", ["-e", "wslpath", flag, path], { windowsHide: true }) return output.toString().trim() } catch (error) { throw new Error(`Failed to run wslpath: ${String(error)}`) @@ -51,7 +51,7 @@ function checkMacosApp(appName: string) { function resolveWindowsAppPath(appName: string): string | null { let output: string try { - output = execFileSync("where", [appName]).toString() + output = execFileSync("where", [appName], { windowsHide: true }).toString() } catch { return null } diff --git a/packages/desktop-electron/src/main/cli.ts b/packages/desktop-electron/src/main/cli.ts index e338d39138e..4b2d9447175 100644 --- a/packages/desktop-electron/src/main/cli.ts +++ b/packages/desktop-electron/src/main/cli.ts @@ -84,7 +84,7 @@ export async function installCli(): Promise { writeFileSync(tempScript, script, "utf8") chmodSync(tempScript, 0o755) - const cmd = spawn(tempScript, ["--binary", sidecar], { stdio: "pipe" }) + const cmd = spawn(tempScript, ["--binary", sidecar], { stdio: "pipe", windowsHide: true }) return await new Promise((resolve, reject) => { cmd.on("exit", (code: number | null) => { try { @@ -107,7 +107,7 @@ export function syncCli() { let version = "" try { - version = execFileSync(installPath, ["--version"]).toString().trim() + version = execFileSync(installPath, ["--version"], { windowsHide: true }).toString().trim() } catch { return } diff --git a/packages/desktop-electron/src/main/ipc.ts b/packages/desktop-electron/src/main/ipc.ts index bbb5379bb7a..a27302e4b73 100644 --- a/packages/desktop-electron/src/main/ipc.ts +++ b/packages/desktop-electron/src/main/ipc.ts @@ -123,7 +123,7 @@ export function registerIpcHandlers(deps: Deps) { await new Promise((resolve, reject) => { const [cmd, args] = process.platform === "darwin" ? (["open", ["-a", app, path]] as const) : ([app, [path]] as const) - execFile(cmd, args, (err) => (err ? reject(err) : resolve())) + execFile(cmd, args, { windowsHide: true }, (err) => (err ? reject(err) : resolve())) }) }) diff --git a/packages/opencode/src/cli/cmd/github.ts b/packages/opencode/src/cli/cmd/github.ts index df03d61b91a..bc0d83e9532 100644 --- a/packages/opencode/src/cli/cmd/github.ts +++ b/packages/opencode/src/cli/cmd/github.ts @@ -330,7 +330,7 @@ export const GithubInstallCommand = cmd({ ? `start "" "${url}"` : `xdg-open "${url}"` - exec(command, (error) => { + exec(command, { windowsHide: true }, (error) => { if (error) { prompts.log.warn(`Could not open browser. Please visit: ${url}`) } diff --git a/packages/opencode/src/kilocode/ts-check.ts b/packages/opencode/src/kilocode/ts-check.ts index 449609df830..9deb9506929 100644 --- a/packages/opencode/src/kilocode/ts-check.ts +++ b/packages/opencode/src/kilocode/ts-check.ts @@ -29,6 +29,7 @@ export namespace TsCheck { cwd: root, stdout: "pipe", stderr: "pipe", + windowsHide: true, env: { ...process.env }, }) diff --git a/packages/sdk/js/src/server.ts b/packages/sdk/js/src/server.ts index f878f832f9f..bace9a3b05d 100644 --- a/packages/sdk/js/src/server.ts +++ b/packages/sdk/js/src/server.ts @@ -68,6 +68,7 @@ export async function createKiloServer(options?: ServerOptions) { const proc = spawn(`kilo`, args, { // kilocode_change end signal: options.signal, + windowsHide: true, env: { ...process.env, KILO_CONFIG_CONTENT: buildConfigEnv(options.config), // kilocode_change @@ -148,6 +149,7 @@ export function createKiloTui(options?: TuiOptions) { // kilocode_change end signal: options?.signal, stdio: "inherit", + windowsHide: true, env: { ...process.env, KILO_CONFIG_CONTENT: buildConfigEnv(options?.config), // kilocode_change diff --git a/packages/sdk/js/src/v2/server.ts b/packages/sdk/js/src/v2/server.ts index f878f832f9f..bace9a3b05d 100644 --- a/packages/sdk/js/src/v2/server.ts +++ b/packages/sdk/js/src/v2/server.ts @@ -68,6 +68,7 @@ export async function createKiloServer(options?: ServerOptions) { const proc = spawn(`kilo`, args, { // kilocode_change end signal: options.signal, + windowsHide: true, env: { ...process.env, KILO_CONFIG_CONTENT: buildConfigEnv(options.config), // kilocode_change @@ -148,6 +149,7 @@ export function createKiloTui(options?: TuiOptions) { // kilocode_change end signal: options?.signal, stdio: "inherit", + windowsHide: true, env: { ...process.env, KILO_CONFIG_CONTENT: buildConfigEnv(options?.config), // kilocode_change From 6e8da6ead4ca952a28d20729123ea99bcff5cbfa Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 07:48:34 +0000 Subject: [PATCH 26/81] revert: restore desktop-electron spawn calls to upstream state desktop-electron is not actively maintained and is synced from upstream. Reverting windowsHide changes in apps.ts, cli.ts, and ipc.ts to keep the diff from upstream minimal and avoid merge conflicts. --- packages/desktop-electron/src/main/apps.ts | 6 +++--- packages/desktop-electron/src/main/cli.ts | 4 ++-- packages/desktop-electron/src/main/ipc.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/desktop-electron/src/main/apps.ts b/packages/desktop-electron/src/main/apps.ts index 16a0783067c..2b460378948 100644 --- a/packages/desktop-electron/src/main/apps.ts +++ b/packages/desktop-electron/src/main/apps.ts @@ -21,11 +21,11 @@ export function wslPath(path: string, mode: "windows" | "linux" | null): string if (path.startsWith("~")) { const suffix = path.slice(1) const cmd = `wslpath ${flag} \"$HOME${suffix.replace(/\"/g, '\\"')}\"` - const output = execFileSync("wsl", ["-e", "sh", "-lc", cmd], { windowsHide: true }) + const output = execFileSync("wsl", ["-e", "sh", "-lc", cmd]) return output.toString().trim() } - const output = execFileSync("wsl", ["-e", "wslpath", flag, path], { windowsHide: true }) + const output = execFileSync("wsl", ["-e", "wslpath", flag, path]) return output.toString().trim() } catch (error) { throw new Error(`Failed to run wslpath: ${String(error)}`) @@ -51,7 +51,7 @@ function checkMacosApp(appName: string) { function resolveWindowsAppPath(appName: string): string | null { let output: string try { - output = execFileSync("where", [appName], { windowsHide: true }).toString() + output = execFileSync("where", [appName]).toString() } catch { return null } diff --git a/packages/desktop-electron/src/main/cli.ts b/packages/desktop-electron/src/main/cli.ts index 4b2d9447175..e338d39138e 100644 --- a/packages/desktop-electron/src/main/cli.ts +++ b/packages/desktop-electron/src/main/cli.ts @@ -84,7 +84,7 @@ export async function installCli(): Promise { writeFileSync(tempScript, script, "utf8") chmodSync(tempScript, 0o755) - const cmd = spawn(tempScript, ["--binary", sidecar], { stdio: "pipe", windowsHide: true }) + const cmd = spawn(tempScript, ["--binary", sidecar], { stdio: "pipe" }) return await new Promise((resolve, reject) => { cmd.on("exit", (code: number | null) => { try { @@ -107,7 +107,7 @@ export function syncCli() { let version = "" try { - version = execFileSync(installPath, ["--version"], { windowsHide: true }).toString().trim() + version = execFileSync(installPath, ["--version"]).toString().trim() } catch { return } diff --git a/packages/desktop-electron/src/main/ipc.ts b/packages/desktop-electron/src/main/ipc.ts index a27302e4b73..bbb5379bb7a 100644 --- a/packages/desktop-electron/src/main/ipc.ts +++ b/packages/desktop-electron/src/main/ipc.ts @@ -123,7 +123,7 @@ export function registerIpcHandlers(deps: Deps) { await new Promise((resolve, reject) => { const [cmd, args] = process.platform === "darwin" ? (["open", ["-a", app, path]] as const) : ([app, [path]] as const) - execFile(cmd, args, { windowsHide: true }, (err) => (err ? reject(err) : resolve())) + execFile(cmd, args, (err) => (err ? reject(err) : resolve())) }) }) From 4a6899fafd085134d1e5209c4cffd82feba8fa19 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 11:17:36 +0000 Subject: [PATCH 27/81] feat(vscode): add Browse Marketplace button to MCP settings Add a "Browse Marketplace" button to the MCP Servers subtab in Agent Behaviour settings, guiding users to discover and install MCPs from the marketplace rather than only configuring them manually. - Add button above the MCP server list that opens the Marketplace panel - Add openMarketplacePanel webview message type and handler - Add translations for all 18 supported languages --- packages/kilo-vscode/src/KiloProvider.ts | 3 +++ .../components/settings/AgentBehaviourTab.tsx | 16 ++++++++++++++++ packages/kilo-vscode/webview-ui/src/i18n/ar.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/br.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/bs.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/da.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/de.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/en.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/es.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/fr.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/ja.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/ko.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/nl.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/no.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/pl.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/ru.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/th.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/tr.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/zh.ts | 1 + packages/kilo-vscode/webview-ui/src/i18n/zht.ts | 1 + .../kilo-vscode/webview-ui/src/types/messages.ts | 5 +++++ 21 files changed, 42 insertions(+) diff --git a/packages/kilo-vscode/src/KiloProvider.ts b/packages/kilo-vscode/src/KiloProvider.ts index 8378c5629b8..bffed832744 100644 --- a/packages/kilo-vscode/src/KiloProvider.ts +++ b/packages/kilo-vscode/src/KiloProvider.ts @@ -575,6 +575,9 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper case "openSettingsPanel": vscode.commands.executeCommand("kilo-code.new.settingsButtonClicked", message.tab) break + case "openMarketplacePanel": + vscode.commands.executeCommand("kilo-code.new.marketplaceButtonClicked") + break case "openChanges": vscode.commands.executeCommand("kilo-code.new.showChanges") break diff --git a/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx b/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx index 181dd855cea..52357b9ee58 100644 --- a/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx @@ -11,6 +11,7 @@ import { Switch } from "@kilocode/kilo-ui/switch" import { useConfig } from "../../context/config" import { useSession } from "../../context/session" import { useLanguage } from "../../context/language" +import { useVSCode } from "../../context/vscode" import type { AgentInfo, SkillInfo } from "../../types/messages" import ModeEditView from "./ModeEditView" import ModeCreateView from "./ModeCreateView" @@ -49,6 +50,7 @@ const AgentBehaviourTab: Component = () => { const { config, updateConfig } = useConfig() const session = useSession() const dialog = useDialog() + const vscode = useVSCode() const [activeSubtab, setActiveSubtab] = createSignal("agents") const [newSkillPath, setNewSkillPath] = createSignal("") const [newSkillUrl, setNewSkillUrl] = createSignal("") @@ -517,8 +519,22 @@ const AgentBehaviourTab: Component = () => { ) } + const browse = () => vscode.postMessage({ type: "openMarketplacePanel" }) + return (
+
+ +
0} fallback={ diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ar.ts b/packages/kilo-vscode/webview-ui/src/i18n/ar.ts index 8ac9723457a..83240e59ea4 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ar.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ar.ts @@ -1136,6 +1136,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "الوسائط", "settings.agentBehaviour.mcpDetail.env": "البيئة", "settings.agentBehaviour.mcpDetail.disabled": "هذا الخادم معطّل.", + "settings.agentBehaviour.mcpBrowseMarketplace": "تصفح Marketplace", "settings.agentBehaviour.mcpEmpty": "لم يتم تهيئة خوادم MCP. أضف خوادم MCP في kilo.jsonc، أو اطلب من الوكيل إضافتها لك.", "settings.agentBehaviour.workflowsPlaceholder": "تُدار سير العمل عبر ملفات سير العمل في مساحة العمل.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/br.ts b/packages/kilo-vscode/webview-ui/src/i18n/br.ts index ae3354126f7..cc975752e65 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/br.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/br.ts @@ -1157,6 +1157,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "Argumentos", "settings.agentBehaviour.mcpDetail.env": "Ambiente", "settings.agentBehaviour.mcpDetail.disabled": "Este servidor está desativado.", + "settings.agentBehaviour.mcpBrowseMarketplace": "Explorar Marketplace", "settings.agentBehaviour.mcpEmpty": "Nenhum servidor MCP configurado. Adicione servidores MCP em kilo.jsonc ou peça ao agente para adicioná-los.", "settings.agentBehaviour.workflowsPlaceholder": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/bs.ts b/packages/kilo-vscode/webview-ui/src/i18n/bs.ts index d64c14baf07..666211c6a12 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/bs.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/bs.ts @@ -1153,6 +1153,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "Argumenti", "settings.agentBehaviour.mcpDetail.env": "Okruženje", "settings.agentBehaviour.mcpDetail.disabled": "Ovaj server je onemogućen.", + "settings.agentBehaviour.mcpBrowseMarketplace": "Pregledaj Marketplace", "settings.agentBehaviour.mcpEmpty": "Nema konfiguriranih MCP servera. Dodajte MCP servere u kilo.jsonc ili zamolite agenta da ih doda.", "settings.agentBehaviour.workflowsPlaceholder": "Tokovi rada se upravljaju putem datoteka tokova rada.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/da.ts b/packages/kilo-vscode/webview-ui/src/i18n/da.ts index a8eeecae1f4..949c5715424 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/da.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/da.ts @@ -1146,6 +1146,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "Argumenter", "settings.agentBehaviour.mcpDetail.env": "Miljø", "settings.agentBehaviour.mcpDetail.disabled": "Denne server er deaktiveret.", + "settings.agentBehaviour.mcpBrowseMarketplace": "Gennemse Marketplace", "settings.agentBehaviour.mcpEmpty": "Ingen MCP-servere konfigureret. Tilføj MCP-servere i kilo.jsonc, eller bed agenten om at tilføje dem.", "settings.agentBehaviour.workflowsPlaceholder": "Workflows administreres via workflow-filer i dit arbejdsområde.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/de.ts b/packages/kilo-vscode/webview-ui/src/i18n/de.ts index 8f7c6805178..ece4dbdc7a6 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/de.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/de.ts @@ -1169,6 +1169,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "Argumente", "settings.agentBehaviour.mcpDetail.env": "Umgebung", "settings.agentBehaviour.mcpDetail.disabled": "Dieser Server ist deaktiviert.", + "settings.agentBehaviour.mcpBrowseMarketplace": "Marketplace durchsuchen", "settings.agentBehaviour.mcpEmpty": "Keine MCP-Server konfiguriert. Fügen Sie MCP-Server in kilo.jsonc hinzu oder bitten Sie den Agenten, sie hinzuzufügen.", "settings.agentBehaviour.workflowsPlaceholder": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/en.ts b/packages/kilo-vscode/webview-ui/src/i18n/en.ts index fbb8f1191b9..0fe710232eb 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/en.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/en.ts @@ -1116,6 +1116,7 @@ export const dict = { "settings.agentBehaviour.addMcp.args.placeholder": "e.g.\n-y\n@modelcontextprotocol/server-filesystem\n/tmp", "settings.agentBehaviour.addMcp.url": "Server URL", "settings.agentBehaviour.addMcp.url.placeholder": "e.g. http://localhost:3000/sse", + "settings.agentBehaviour.mcpBrowseMarketplace": "Browse Marketplace", "settings.agentBehaviour.mcpEmpty": "No MCP servers configured. Add MCP servers in kilo.jsonc, or ask the agent to add them for you.", "settings.agentBehaviour.workflowsPlaceholder": "Workflows are managed via workflow files in your workspace.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/es.ts b/packages/kilo-vscode/webview-ui/src/i18n/es.ts index d83c3168d3e..42370d43476 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/es.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/es.ts @@ -1161,6 +1161,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "Argumentos", "settings.agentBehaviour.mcpDetail.env": "Entorno", "settings.agentBehaviour.mcpDetail.disabled": "Este servidor está deshabilitado.", + "settings.agentBehaviour.mcpBrowseMarketplace": "Explorar Marketplace", "settings.agentBehaviour.mcpEmpty": "No hay servidores MCP configurados. Añada servidores MCP en kilo.jsonc o pida al agente que los añada.", "settings.agentBehaviour.workflowsPlaceholder": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/fr.ts b/packages/kilo-vscode/webview-ui/src/i18n/fr.ts index 051bab83981..bc2413d7f58 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/fr.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/fr.ts @@ -1173,6 +1173,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "Arguments", "settings.agentBehaviour.mcpDetail.env": "Environnement", "settings.agentBehaviour.mcpDetail.disabled": "Ce serveur est désactivé.", + "settings.agentBehaviour.mcpBrowseMarketplace": "Parcourir le Marketplace", "settings.agentBehaviour.mcpEmpty": "Aucun serveur MCP configuré. Ajoutez des serveurs MCP dans kilo.jsonc ou demandez à l'agent de les ajouter.", "settings.agentBehaviour.workflowsPlaceholder": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ja.ts b/packages/kilo-vscode/webview-ui/src/i18n/ja.ts index f65245c19d9..b1e949f6d4f 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ja.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ja.ts @@ -1147,6 +1147,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "引数", "settings.agentBehaviour.mcpDetail.env": "環境", "settings.agentBehaviour.mcpDetail.disabled": "このサーバーは無効です。", + "settings.agentBehaviour.mcpBrowseMarketplace": "マーケットプレイスを閲覧", "settings.agentBehaviour.mcpEmpty": "MCPサーバーが設定されていません。kilo.jsoncでMCPサーバーを追加するか、エージェントに追加を依頼してください。", "settings.agentBehaviour.workflowsPlaceholder": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ko.ts b/packages/kilo-vscode/webview-ui/src/i18n/ko.ts index 4e9f93ba204..35dabf797ad 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ko.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ko.ts @@ -1141,6 +1141,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "인수", "settings.agentBehaviour.mcpDetail.env": "환경", "settings.agentBehaviour.mcpDetail.disabled": "이 서버는 비활성화되어 있습니다.", + "settings.agentBehaviour.mcpBrowseMarketplace": "마켓플레이스 둘러보기", "settings.agentBehaviour.mcpEmpty": "MCP 서버가 구성되지 않았습니다. kilo.jsonc에서 MCP 서버를 추가하거나 에이전트에게 추가를 요청하세요.", "settings.agentBehaviour.workflowsPlaceholder": "워크플로우는 워크스페이스의 워크플로우 파일을 통해 관리됩니다.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/nl.ts b/packages/kilo-vscode/webview-ui/src/i18n/nl.ts index 87cbe8ef733..3c5d0562fe1 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/nl.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/nl.ts @@ -1135,6 +1135,7 @@ export const dict = { "settings.agentBehaviour.addMcp.args.placeholder": "e.g.\n-y\n@modelcontextprotocol/server-filesystem\n/tmp", "settings.agentBehaviour.addMcp.url": "Server-URL", "settings.agentBehaviour.addMcp.url.placeholder": "e.g. http://localhost:3000/sse", + "settings.agentBehaviour.mcpBrowseMarketplace": "Bladeren door Marketplace", "settings.agentBehaviour.mcpEmpty": "Geen MCP-servers geconfigureerd. Voeg MCP-servers toe in kilo.jsonc of vraag de agent om ze toe te voegen.", "settings.agentBehaviour.workflowsPlaceholder": "Workflows worden beheerd via workflowbestanden in je workspace.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/no.ts b/packages/kilo-vscode/webview-ui/src/i18n/no.ts index ce43e675979..aa28b1c76a4 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/no.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/no.ts @@ -1149,6 +1149,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "Argumenter", "settings.agentBehaviour.mcpDetail.env": "Miljø", "settings.agentBehaviour.mcpDetail.disabled": "Denne serveren er deaktivert.", + "settings.agentBehaviour.mcpBrowseMarketplace": "Bla gjennom Marketplace", "settings.agentBehaviour.mcpEmpty": "Ingen MCP-servere konfigurert. Legg til MCP-servere i kilo.jsonc, eller be agenten om å legge dem til.", "settings.agentBehaviour.workflowsPlaceholder": "Arbeidsflyter administreres via arbeidsflytfiler i arbeidsområdet.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/pl.ts b/packages/kilo-vscode/webview-ui/src/i18n/pl.ts index 6d79e1c6205..3d57852a8e5 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/pl.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/pl.ts @@ -1153,6 +1153,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "Argumenty", "settings.agentBehaviour.mcpDetail.env": "Środowisko", "settings.agentBehaviour.mcpDetail.disabled": "Ten serwer jest wyłączony.", + "settings.agentBehaviour.mcpBrowseMarketplace": "Przeglądaj Marketplace", "settings.agentBehaviour.mcpEmpty": "Brak skonfigurowanych serwerów MCP. Dodaj serwery MCP w kilo.jsonc lub poproś agenta o ich dodanie.", "settings.agentBehaviour.workflowsPlaceholder": "Przepływy pracy zarządzane są za pomocą plików przepływów pracy.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ru.ts b/packages/kilo-vscode/webview-ui/src/i18n/ru.ts index 293dfb78577..c0ceeeb856a 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ru.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ru.ts @@ -1154,6 +1154,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "Аргументы", "settings.agentBehaviour.mcpDetail.env": "Окружение", "settings.agentBehaviour.mcpDetail.disabled": "Этот сервер отключён.", + "settings.agentBehaviour.mcpBrowseMarketplace": "Обзор Marketplace", "settings.agentBehaviour.mcpEmpty": "MCP-серверы не настроены. Добавьте MCP-серверы в kilo.jsonc или попросите агента добавить их.", "settings.agentBehaviour.workflowsPlaceholder": "Рабочие процессы управляются через файлы рабочих процессов.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/th.ts b/packages/kilo-vscode/webview-ui/src/i18n/th.ts index 4b826b3317a..e1fe89d4951 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/th.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/th.ts @@ -1137,6 +1137,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "อาร์กิวเมนต์", "settings.agentBehaviour.mcpDetail.env": "สภาพแวดล้อม", "settings.agentBehaviour.mcpDetail.disabled": "เซิร์ฟเวอร์นี้ถูกปิดใช้งาน", + "settings.agentBehaviour.mcpBrowseMarketplace": "เรียกดู Marketplace", "settings.agentBehaviour.mcpEmpty": "ไม่ได้กำหนดค่าเซิร์ฟเวอร์ MCP เพิ่มเซิร์ฟเวอร์ MCP ใน kilo.jsonc หรือขอให้เอเจนต์เพิ่มให้คุณ", "settings.agentBehaviour.workflowsPlaceholder": "เวิร์กโฟลว์จัดการผ่านไฟล์เวิร์กโฟลว์ในพื้นที่ทำงาน", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/tr.ts b/packages/kilo-vscode/webview-ui/src/i18n/tr.ts index ae0fe2fa314..7f2715f36dd 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/tr.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/tr.ts @@ -1131,6 +1131,7 @@ export const dict = { "settings.agentBehaviour.addMcp.args.placeholder": "e.g.\n-y\n@modelcontextprotocol/server-filesystem\n/tmp", "settings.agentBehaviour.addMcp.url": "Sunucu URL'si", "settings.agentBehaviour.addMcp.url.placeholder": "e.g. http://localhost:3000/sse", + "settings.agentBehaviour.mcpBrowseMarketplace": "Marketplace'e Göz At", "settings.agentBehaviour.mcpEmpty": "Yapılandırılmış MCP sunucusu yok. kilo.jsonc dosyasına MCP sunucuları ekleyin veya ajanın eklemesini isteyin.", "settings.agentBehaviour.workflowsPlaceholder": "İş akışları çalışma alanınızdaki iş akışı dosyaları ile yönetilir.", diff --git a/packages/kilo-vscode/webview-ui/src/i18n/zh.ts b/packages/kilo-vscode/webview-ui/src/i18n/zh.ts index 91e2e50edd7..c3f3ccd169c 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/zh.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/zh.ts @@ -1122,6 +1122,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "参数", "settings.agentBehaviour.mcpDetail.env": "环境", "settings.agentBehaviour.mcpDetail.disabled": "此服务器已禁用。", + "settings.agentBehaviour.mcpBrowseMarketplace": "浏览市场", "settings.agentBehaviour.mcpEmpty": "未配置 MCP 服务器。在 kilo.jsonc 中添加 MCP 服务器,或让代理为您添加。", "settings.agentBehaviour.workflowsPlaceholder": "工作流通过工作区中的工作流文件管理。", "settings.agentBehaviour.workflows.description": diff --git a/packages/kilo-vscode/webview-ui/src/i18n/zht.ts b/packages/kilo-vscode/webview-ui/src/i18n/zht.ts index 58cc5597892..bee77c353c2 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/zht.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/zht.ts @@ -1125,6 +1125,7 @@ export const dict = { "settings.agentBehaviour.mcpDetail.args": "引數", "settings.agentBehaviour.mcpDetail.env": "環境", "settings.agentBehaviour.mcpDetail.disabled": "此伺服器已停用。", + "settings.agentBehaviour.mcpBrowseMarketplace": "瀏覽市場", "settings.agentBehaviour.mcpEmpty": "未設定 MCP 伺服器。在 kilo.jsonc 中新增 MCP 伺服器,或請代理為您新增。", "settings.agentBehaviour.workflowsPlaceholder": "工作流程透過工作區中的工作流程檔案管理。", "settings.agentBehaviour.workflows.description": diff --git a/packages/kilo-vscode/webview-ui/src/types/messages.ts b/packages/kilo-vscode/webview-ui/src/types/messages.ts index 7e7f7e03777..2069404932b 100644 --- a/packages/kilo-vscode/webview-ui/src/types/messages.ts +++ b/packages/kilo-vscode/webview-ui/src/types/messages.ts @@ -1481,6 +1481,10 @@ export interface OpenSettingsPanelRequest { tab?: string } +export interface OpenMarketplacePanelRequest { + type: "openMarketplacePanel" +} + export interface RequestAgentsMessage { type: "requestAgents" } @@ -2020,6 +2024,7 @@ export type WebviewMessage = | RefreshProfileRequest | OpenExternalRequest | OpenSettingsPanelRequest + | OpenMarketplacePanelRequest | OpenFileRequest | CancelLoginRequest | SetOrganizationRequest From 25a8c9320e1800d5d6f4b6d0a9c92fd591b7db89 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 11:26:54 +0000 Subject: [PATCH 28/81] fix(vscode): preserve project directory when opening marketplace from settings Pass the current panel's project directory through to the marketplace panel so project-scoped MCP installs work correctly in multi-root workspaces. Without this, the marketplace panel would fall back to null project directory since there is no active text editor when clicking from a webview. --- packages/kilo-vscode/src/KiloProvider.ts | 2 +- packages/kilo-vscode/src/SettingsEditorProvider.ts | 4 ++-- packages/kilo-vscode/src/extension.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/kilo-vscode/src/KiloProvider.ts b/packages/kilo-vscode/src/KiloProvider.ts index bffed832744..af04b501103 100644 --- a/packages/kilo-vscode/src/KiloProvider.ts +++ b/packages/kilo-vscode/src/KiloProvider.ts @@ -576,7 +576,7 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper vscode.commands.executeCommand("kilo-code.new.settingsButtonClicked", message.tab) break case "openMarketplacePanel": - vscode.commands.executeCommand("kilo-code.new.marketplaceButtonClicked") + vscode.commands.executeCommand("kilo-code.new.marketplaceButtonClicked", this.projectDirectory) break case "openChanges": vscode.commands.executeCommand("kilo-code.new.showChanges") diff --git a/packages/kilo-vscode/src/SettingsEditorProvider.ts b/packages/kilo-vscode/src/SettingsEditorProvider.ts index afaa819944b..922754e319f 100644 --- a/packages/kilo-vscode/src/SettingsEditorProvider.ts +++ b/packages/kilo-vscode/src/SettingsEditorProvider.ts @@ -51,10 +51,10 @@ export class SettingsEditorProvider implements vscode.Disposable { return view } - openPanel(view: PanelView, tab?: string): void { + openPanel(view: PanelView, tab?: string, directory?: string | null): void { if (tab) this.tabs.set(view, tab) - const projectDirectory = this.getProjectDirectory() + const projectDirectory = directory ?? this.getProjectDirectory() const existing = this.panels.get(view) if (existing) { this.providers.get(view)?.setProjectDirectory(projectDirectory) diff --git a/packages/kilo-vscode/src/extension.ts b/packages/kilo-vscode/src/extension.ts index f38b53b3c78..56d8124d8f6 100644 --- a/packages/kilo-vscode/src/extension.ts +++ b/packages/kilo-vscode/src/extension.ts @@ -160,8 +160,8 @@ export function activate(context: vscode.ExtensionContext) { vscode.commands.registerCommand("kilo-code.new.agentManagerOpen", () => { agentManagerProvider.openPanel() }), - vscode.commands.registerCommand("kilo-code.new.marketplaceButtonClicked", () => { - settingsEditorProvider.openPanel("marketplace") + vscode.commands.registerCommand("kilo-code.new.marketplaceButtonClicked", (directory?: string) => { + settingsEditorProvider.openPanel("marketplace", undefined, directory) }), vscode.commands.registerCommand("kilo-code.new.historyButtonClicked", () => { provider.postMessage({ type: "action", action: "historyButtonClicked" }) From ad8681e96f40bbd547bba70dfc5a962b55f6a661 Mon Sep 17 00:00:00 2001 From: Mark IJbema Date: Mon, 30 Mar 2026 13:48:42 +0200 Subject: [PATCH 29/81] feat(vscode): add Browse Marketplace button to agents and skills tabs Add the Browse Marketplace button to the Agents and Skills subtabs in Agent Behaviour settings, matching the existing button in the MCP Servers subtab. This lets users discover marketplace items from any of the three configuration tabs. - Agents tab: added as a ghost button in the header row alongside Import and Create Mode buttons - Skills tab: added as a secondary button at the top-right, matching the MCP tab layout - Extracted the browse handler to the component scope for reuse --- .../components/settings/AgentBehaviourTab.tsx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx b/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx index 52357b9ee58..859eee8d15b 100644 --- a/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx @@ -55,6 +55,7 @@ const AgentBehaviourTab: Component = () => { const [newSkillPath, setNewSkillPath] = createSignal("") const [newSkillUrl, setNewSkillUrl] = createSignal("") const [newInstruction, setNewInstruction] = createSignal("") + const browse = () => vscode.postMessage({ type: "openMarketplacePanel" }) // Agent view state const [agentView, setAgentView] = createSignal("list") @@ -303,6 +304,9 @@ const AgentBehaviourTab: Component = () => { + @@ -519,8 +523,6 @@ const AgentBehaviourTab: Component = () => { ) } - const browse = () => vscode.postMessage({ type: "openMarketplacePanel" }) - return (
{ const renderSkillsSubtab = () => (
+
+ +
{/* Discovered skills */}

{language.t("settings.agentBehaviour.discoveredSkills")} From ad816eee2a248b3f08bef478895a6c9959cfc8de Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 30 Mar 2026 11:50:48 +0000 Subject: [PATCH 30/81] chore: update kilo-vscode visual regression baselines --- .../settings/agent-behaviour-agents-chromium-linux.png | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kilo-vscode/tests/visual-regression.spec.ts-snapshots/settings/agent-behaviour-agents-chromium-linux.png b/packages/kilo-vscode/tests/visual-regression.spec.ts-snapshots/settings/agent-behaviour-agents-chromium-linux.png index b4a57e37a4a..795674c1ad6 100644 --- a/packages/kilo-vscode/tests/visual-regression.spec.ts-snapshots/settings/agent-behaviour-agents-chromium-linux.png +++ b/packages/kilo-vscode/tests/visual-regression.spec.ts-snapshots/settings/agent-behaviour-agents-chromium-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:41df17f60c5361a230839c07a9bd29d9dbf645a9750db6fa00e37c0bd06eff11 -size 25424 +oid sha256:8e9f04f72f6227b08bff321ab4af7a794fa754dc58bd504eb88259cd244ba51b +size 27146 From 15ac71c5f07676583db7f3015fabdeb970ce635f Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Mon, 30 Mar 2026 15:02:23 +0300 Subject: [PATCH 31/81] feat(cli): add read-only bash commands to Ask agent Define a readOnlyBash allowlist with deny-by-default semantics so the Ask agent can run safe information-gathering commands (ls, cat, grep, git log, find, jq, etc.) while blocking all write operations. Git write subcommands (commit, push, merge, reset, etc.) are explicitly denied. gh commands require user approval. --- packages/opencode/src/agent/agent.ts | 65 ++++++++++++++++++++++ packages/opencode/src/agent/prompt/ask.txt | 3 +- 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index 16305db1286..c5eef1a51ab 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -111,6 +111,70 @@ export namespace Agent { "gunzip *": "allow", } // kilocode_change end + + // kilocode_change start — read-only bash commands for the ask agent. + // Unlike the default bash allowlist, unknown commands are DENIED (not "ask") + // because the ask agent must never modify the filesystem. + const readOnlyBash: Record = { + "*": "deny", + // read-only / informational + "cat *": "allow", + "head *": "allow", + "tail *": "allow", + "less *": "allow", + "ls *": "allow", + "tree *": "allow", + "pwd *": "allow", + "echo *": "allow", + "wc *": "allow", + "which *": "allow", + "type *": "allow", + "file *": "allow", + "diff *": "allow", + "du *": "allow", + "df *": "allow", + "date *": "allow", + "uname *": "allow", + "whoami *": "allow", + "printenv *": "allow", + "man *": "allow", + // file discovery + "find *": "allow", + // text processing (stdout only, no file modification) + "grep *": "allow", + "rg *": "allow", + "ag *": "allow", + "sort *": "allow", + "uniq *": "allow", + "cut *": "allow", + "tr *": "allow", + "jq *": "allow", + // git — allow read operations, deny all write operations + "git *": "allow", + "git add *": "deny", + "git commit *": "deny", + "git push *": "deny", + "git merge *": "deny", + "git rebase *": "deny", + "git cherry-pick *": "deny", + "git reset *": "deny", + "git checkout *": "deny", + "git switch *": "deny", + "git stash *": "deny", + "git tag *": "deny", + "git am *": "deny", + "git apply *": "deny", + "git remote set-url *": "deny", + "git remote add *": "deny", + "git remote remove *": "deny", + "git clean *": "deny", + "git mv *": "deny", + "git rm *": "deny", + // gh — require user approval since commands vary widely + "gh *": "ask", + } + // kilocode_change end + const defaults = PermissionNext.fromConfig({ "*": "allow", bash, // kilocode_change @@ -237,6 +301,7 @@ export namespace Agent { user, // kilocode_change: user before ask-specific so ask's deny+allowlist wins PermissionNext.fromConfig({ "*": "deny", + bash: readOnlyBash, read: { "*": "allow", "*.env": "ask", diff --git a/packages/opencode/src/agent/prompt/ask.txt b/packages/opencode/src/agent/prompt/ask.txt index 32f9e74e3ef..28e9a04e98c 100644 --- a/packages/opencode/src/agent/prompt/ask.txt +++ b/packages/opencode/src/agent/prompt/ask.txt @@ -4,5 +4,6 @@ Guidelines: - Answer questions thoroughly with clear explanations and relevant examples - Analyze code, explain concepts, and provide recommendations without making changes - Use Mermaid diagrams when they help clarify your response -- Do not edit files or execute commands; this agent is read-only +- You may run read-only bash commands (ls, cat, grep, git log, git diff, find, etc.) to gather information +- You must NOT modify files, run write commands, or execute code — this agent is read-only - If a question requires implementation, suggest switching to a different agent From 2cdf6b61c7441089678897dea181878b2cd716be Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 30 Mar 2026 14:02:57 +0200 Subject: [PATCH 32/81] perf(cli): cache MCP listTools results to avoid redundant RPCs per loop step (#7922) MCP.tools() called client.listTools() for every connected server on every agent loop iteration. With multiple servers this added hundreds of milliseconds of overhead per step (measured ~300-750ms for remote servers like Vercel). Cache listTools results in a module-level Map and return them on subsequent calls. The cache is invalidated on: - ToolListChangedNotification from the MCP server - Server add/connect/disconnect - Instance dispose (config change, project switch, shutdown) --- packages/opencode/src/mcp/index.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/opencode/src/mcp/index.ts b/packages/opencode/src/mcp/index.ts index 9ffbce1a0ba..a828bdaa59d 100644 --- a/packages/opencode/src/mcp/index.ts +++ b/packages/opencode/src/mcp/index.ts @@ -121,6 +121,7 @@ export namespace MCP { function registerNotificationHandlers(client: MCPClient, serverName: string) { client.setNotificationHandler(ToolListChangedNotificationSchema, async () => { log.info("tools list changed notification received", { server: serverName }) + ;(await state()).toolsCache.delete(serverName) // kilocode_change Bus.publish(ToolsChanged, { server: serverName }) }) } @@ -224,6 +225,7 @@ export namespace MCP { return { status, clients, + toolsCache: new Map(), // kilocode_change — per-server listTools cache } }, async (state) => { @@ -302,6 +304,7 @@ export namespace MCP { export async function add(name: string, mcp: Config.Mcp) { const s = await state() + s.toolsCache.delete(name) // kilocode_change const result = await create(name, mcp) if (!result) { const status = { @@ -559,6 +562,7 @@ export namespace MCP { } export async function connect(name: string) { + ;(await state()).toolsCache.delete(name) // kilocode_change const cfg = await Config.get() const config = cfg.mcp ?? {} const mcp = config[name] @@ -599,6 +603,7 @@ export namespace MCP { export async function disconnect(name: string) { const s = await state() + s.toolsCache.delete(name) // kilocode_change const client = s.clients[name] if (client) { await client.close().catch((error) => { @@ -623,6 +628,12 @@ export namespace MCP { const toolsResults = await Promise.all( connectedClients.map(async ([clientName, client]) => { + // kilocode_change start — use cached listTools when available + const cached = s.toolsCache.get(clientName) + if (cached) { + return { clientName, client, toolsResult: { tools: cached } } + } + // kilocode_change end const toolsResult = await client.listTools().catch((e) => { log.error("failed to get tools", { clientName, error: e.message }) const failedStatus = { @@ -633,6 +644,7 @@ export namespace MCP { delete s.clients[clientName] return undefined }) + if (toolsResult) s.toolsCache.set(clientName, toolsResult.tools) // kilocode_change return { clientName, client, toolsResult } }), ) From 1d7bc418418c6440d71a04c1e492f9d44d3e5483 Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Mon, 30 Mar 2026 15:03:40 +0300 Subject: [PATCH 33/81] feat(cli): add MCP tool support to Ask agent Dynamically build per-server permission rules from cfg.mcp at agent init time using the same sanitization as mcp/index.ts. MCP tools get "ask" permission so every call requires user approval. Rules are spread after "*": "deny" to override via findLast() semantics. --- packages/opencode/src/agent/agent.ts | 9 +++++++++ packages/opencode/src/agent/prompt/ask.txt | 1 + 2 files changed, 10 insertions(+) diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index c5eef1a51ab..5590cc8abc4 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -173,6 +173,14 @@ export namespace Agent { // gh — require user approval since commands vary widely "gh *": "ask", } + + // kilocode_change start — allow MCP tools in ask agent with user approval. + // Generates per-server wildcard rules that override "*": "deny". + const mcpRules: Record = {} + for (const key of Object.keys(cfg.mcp ?? {})) { + const sanitized = key.replace(/[^a-zA-Z0-9_-]/g, "_") + mcpRules[sanitized + "_*"] = "ask" + } // kilocode_change end const defaults = PermissionNext.fromConfig({ @@ -319,6 +327,7 @@ export namespace Agent { external_directory: { [Truncate.GLOB]: "allow", }, + ...mcpRules, }), ), mode: "primary", diff --git a/packages/opencode/src/agent/prompt/ask.txt b/packages/opencode/src/agent/prompt/ask.txt index 28e9a04e98c..e324b0df985 100644 --- a/packages/opencode/src/agent/prompt/ask.txt +++ b/packages/opencode/src/agent/prompt/ask.txt @@ -6,4 +6,5 @@ Guidelines: - Use Mermaid diagrams when they help clarify your response - You may run read-only bash commands (ls, cat, grep, git log, git diff, find, etc.) to gather information - You must NOT modify files, run write commands, or execute code — this agent is read-only +- MCP tools are available if configured — each call requires user approval - If a question requires implementation, suggest switching to a different agent From 75dacd050da01658859b4e1e62f4d1be150e8edf Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 30 Mar 2026 14:04:41 +0200 Subject: [PATCH 34/81] fix(agent-manager): add retries to worktree cleanup for macOS .app bundles (#7921) --- .../kilo-vscode/src/agent-manager/WorktreeManager.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/kilo-vscode/src/agent-manager/WorktreeManager.ts b/packages/kilo-vscode/src/agent-manager/WorktreeManager.ts index a95226ffdab..899d7471c94 100644 --- a/packages/kilo-vscode/src/agent-manager/WorktreeManager.ts +++ b/packages/kilo-vscode/src/agent-manager/WorktreeManager.ts @@ -10,8 +10,6 @@ import * as path from "path" import * as fs from "fs" import { randomUUID } from "crypto" import simpleGit, { type SimpleGit } from "simple-git" - -const TEMP_PREFIX = ".kilo-delete-" import { generateBranchName, sanitizeBranchName } from "./branch-name" import type { GitOps } from "./GitOps" import { execWithShellEnv } from "./shell-env" @@ -29,6 +27,9 @@ import { type BranchListItem, } from "./git-import" +const TEMP_PREFIX = ".kilo-delete-" +const RM_OPTS: fs.RmOptions = { recursive: true, force: true, maxRetries: 3, retryDelay: 200 } + interface WorktreeInfo { branch: string path: string @@ -388,7 +389,7 @@ export class WorktreeManager { if (branch) await this.deleteBranch(branch) // 4. Background delete — fire-and-forget, cross-platform - fs.promises.rm(temp, { recursive: true, force: true }).catch((err) => { + fs.promises.rm(temp, RM_OPTS).catch((err) => { this.log(`Background cleanup failed for ${temp}: ${err}`) }) } @@ -411,7 +412,7 @@ export class WorktreeManager { for (const e of entries) { if (e.isDirectory() && e.name.startsWith(TEMP_PREFIX)) { const stale = path.join(this.dir, e.name) - fs.promises.rm(stale, { recursive: true, force: true }).catch((err) => { + fs.promises.rm(stale, RM_OPTS).catch((err) => { this.log(`Failed to clean orphaned temp dir ${stale}: ${err}`) }) } From e64aba0b239bccd457e191c47d59926e1d28599c Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Mon, 30 Mar 2026 15:06:36 +0300 Subject: [PATCH 35/81] test(cli): add Ask agent permission tests Verify readOnlyBash allowlist, git write denials, gh ask rules, disabled() behavior for edit/task/bash tools, and dynamic MCP permission generation with server name sanitization. --- .../kilocode/ask-agent-permissions.test.ts | 300 ++++++++++++++++++ 1 file changed, 300 insertions(+) create mode 100644 packages/opencode/test/kilocode/ask-agent-permissions.test.ts diff --git a/packages/opencode/test/kilocode/ask-agent-permissions.test.ts b/packages/opencode/test/kilocode/ask-agent-permissions.test.ts new file mode 100644 index 00000000000..a727b014a00 --- /dev/null +++ b/packages/opencode/test/kilocode/ask-agent-permissions.test.ts @@ -0,0 +1,300 @@ +import { test, expect, describe } from "bun:test" +import { PermissionNext } from "../../src/permission/next" + +// Reconstruct the Ask agent's readOnlyBash allowlist (mirrors agent.ts) +const readOnlyBash: Record = { + "*": "deny", + "cat *": "allow", + "head *": "allow", + "tail *": "allow", + "less *": "allow", + "ls *": "allow", + "tree *": "allow", + "pwd *": "allow", + "echo *": "allow", + "wc *": "allow", + "which *": "allow", + "type *": "allow", + "file *": "allow", + "diff *": "allow", + "du *": "allow", + "df *": "allow", + "date *": "allow", + "uname *": "allow", + "whoami *": "allow", + "printenv *": "allow", + "man *": "allow", + "find *": "allow", + "grep *": "allow", + "rg *": "allow", + "ag *": "allow", + "sort *": "allow", + "uniq *": "allow", + "cut *": "allow", + "tr *": "allow", + "jq *": "allow", + "git *": "allow", + "git add *": "deny", + "git commit *": "deny", + "git push *": "deny", + "git merge *": "deny", + "git rebase *": "deny", + "git cherry-pick *": "deny", + "git reset *": "deny", + "git checkout *": "deny", + "git switch *": "deny", + "git stash *": "deny", + "git tag *": "deny", + "git am *": "deny", + "git apply *": "deny", + "git remote set-url *": "deny", + "git remote add *": "deny", + "git remote remove *": "deny", + "git clean *": "deny", + "git mv *": "deny", + "git rm *": "deny", + "gh *": "ask", +} + +/** Build the Ask agent ruleset without MCP servers */ +function askRuleset() { + return PermissionNext.fromConfig({ + "*": "deny", + bash: readOnlyBash, + read: { + "*": "allow", + "*.env": "ask", + "*.env.*": "ask", + "*.env.example": "allow", + }, + grep: "allow", + glob: "allow", + list: "allow", + question: "allow", + webfetch: "allow", + websearch: "allow", + codesearch: "allow", + codebase_search: "allow", + }) +} + +/** Build the Ask agent ruleset WITH MCP servers */ +function askRulesetWithMcp(servers: string[]) { + const mcpRules: Record = {} + for (const key of servers) { + const sanitized = key.replace(/[^a-zA-Z0-9_-]/g, "_") + mcpRules[sanitized + "_*"] = "ask" + } + return PermissionNext.fromConfig({ + "*": "deny", + bash: readOnlyBash, + read: { + "*": "allow", + "*.env": "ask", + "*.env.*": "ask", + "*.env.example": "allow", + }, + grep: "allow", + glob: "allow", + list: "allow", + question: "allow", + webfetch: "allow", + websearch: "allow", + codesearch: "allow", + codebase_search: "allow", + ...mcpRules, + }) +} + +describe("Ask agent bash permissions", () => { + const ruleset = askRuleset() + + describe("allowed read-only commands", () => { + const allowed: [string, string][] = [ + ["cat", "cat README.md"], + ["ls", "ls -la"], + ["grep", "grep -r TODO src/"], + ["rg", "rg pattern"], + ["find", "find . -name '*.ts'"], + ["jq", "jq '.name' package.json"], + ["head", "head -n 10 file.txt"], + ["tail", "tail -f log.txt"], + ["wc", "wc -l src/index.ts"], + ["diff", "diff a.txt b.txt"], + ["sort", "sort names.txt"], + ["tree", "tree src/"], + ["echo", "echo hello"], + ["pwd", "pwd"], + ["date", "date"], + ["whoami", "whoami"], + ] + + for (const [name, cmd] of allowed) { + test(`${name}: "${cmd}" → allow`, () => { + const result = PermissionNext.evaluate("bash", cmd, ruleset) + expect(result.action).toBe("allow") + }) + } + }) + + describe("allowed git read commands", () => { + const allowed = [ + "git log --oneline -10", + "git diff HEAD~1", + "git show HEAD:src/index.ts", + "git status", + "git branch -a", + "git log --graph", + "git blame src/index.ts", + "git rev-parse HEAD", + ] + + for (const cmd of allowed) { + test(`"${cmd}" → allow`, () => { + const result = PermissionNext.evaluate("bash", cmd, ruleset) + expect(result.action).toBe("allow") + }) + } + }) + + describe("denied git write commands", () => { + const denied = [ + "git commit -m 'test'", + "git push origin main", + "git merge feature", + "git rebase main", + "git reset --hard HEAD~1", + "git checkout -b new-branch", + "git switch main", + "git stash", + "git tag v1.0", + "git cherry-pick abc123", + "git am patch.diff", + "git apply changes.patch", + "git clean -fd", + "git mv old.ts new.ts", + "git rm file.ts", + "git add .", + "git remote add origin url", + "git remote remove upstream", + "git remote set-url origin url", + ] + + for (const cmd of denied) { + test(`"${cmd}" → deny`, () => { + const result = PermissionNext.evaluate("bash", cmd, ruleset) + expect(result.action).toBe("deny") + }) + } + }) + + describe("denied write/execute commands", () => { + const denied = [ + "touch newfile.ts", + "mkdir src/new", + "cp a.ts b.ts", + "mv old.ts new.ts", + "tsc --noEmit", + "tar xzf archive.tar.gz", + "npm install", + "python3 script.py", + "rm -rf /", + "node server.js", + "bun run dev", + "curl http://example.com", + ] + + for (const cmd of denied) { + test(`"${cmd}" → deny`, () => { + const result = PermissionNext.evaluate("bash", cmd, ruleset) + expect(result.action).toBe("deny") + }) + } + }) + + test("gh commands → ask", () => { + expect(PermissionNext.evaluate("bash", "gh pr view 123", ruleset).action).toBe("ask") + expect(PermissionNext.evaluate("bash", "gh issue list", ruleset).action).toBe("ask") + expect(PermissionNext.evaluate("bash", "gh api repos/org/repo", ruleset).action).toBe("ask") + }) +}) + +describe("Ask agent tool disabled checks", () => { + const ruleset = askRuleset() + + test("bash tool is NOT disabled (has specific allow rules after deny)", () => { + const result = PermissionNext.disabled(["bash"], ruleset) + expect(result.has("bash")).toBe(false) + }) + + test("allowed tools are not disabled", () => { + const tools = ["read", "grep", "glob", "list", "question", "webfetch", "websearch", "codesearch", "codebase_search"] + const result = PermissionNext.disabled(tools, ruleset) + for (const tool of tools) { + expect(result.has(tool)).toBe(false) + } + }) + + test("edit tools are disabled", () => { + const tools = ["edit", "write", "patch", "multiedit"] + const result = PermissionNext.disabled(tools, ruleset) + for (const tool of tools) { + expect(result.has(tool)).toBe(true) + } + }) + + test("task tool is disabled", () => { + const result = PermissionNext.disabled(["task"], ruleset) + expect(result.has("task")).toBe(true) + }) + + test("todowrite and todoread are disabled", () => { + const result = PermissionNext.disabled(["todowrite", "todoread"], ruleset) + expect(result.has("todowrite")).toBe(true) + expect(result.has("todoread")).toBe(true) + }) +}) + +describe("Ask agent MCP permissions", () => { + test("MCP tools not disabled when servers configured", () => { + const ruleset = askRulesetWithMcp(["my-server", "another_server"]) + const result = PermissionNext.disabled(["my-server_sometool", "another_server_listthing"], ruleset) + expect(result.has("my-server_sometool")).toBe(false) + expect(result.has("another_server_listthing")).toBe(false) + }) + + test("MCP tools evaluate to ask", () => { + const ruleset = askRulesetWithMcp(["my-server"]) + const result = PermissionNext.evaluate("my-server_read_file", "*", ruleset) + expect(result.action).toBe("ask") + }) + + test("MCP tools disabled without server config", () => { + const ruleset = askRuleset() + const result = PermissionNext.disabled(["my-server_sometool"], ruleset) + expect(result.has("my-server_sometool")).toBe(true) + }) + + test("server names with special characters are sanitized", () => { + const ruleset = askRulesetWithMcp(["my.special server!"]) + // "my.special server!" → "my_special_server_" + const result = PermissionNext.disabled(["my_special_server__sometool"], ruleset) + expect(result.has("my_special_server__sometool")).toBe(false) + + const eval_ = PermissionNext.evaluate("my_special_server__sometool", "*", ruleset) + expect(eval_.action).toBe("ask") + }) + + test("MCP rules don't interfere with built-in tool permissions", () => { + const ruleset = askRulesetWithMcp(["server1"]) + // Built-in tools should still work normally + expect(PermissionNext.evaluate("read", "src/index.ts", ruleset).action).toBe("allow") + expect(PermissionNext.evaluate("bash", "ls -la", ruleset).action).toBe("allow") + expect(PermissionNext.evaluate("bash", "git commit -m test", ruleset).action).toBe("deny") + + // Edit tools should still be disabled + const disabled = PermissionNext.disabled(["edit", "write"], ruleset) + expect(disabled.has("edit")).toBe(true) + expect(disabled.has("write")).toBe(true) + }) +}) From 19467461dec3f3320456a22a2c8872f95500a6ac Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 30 Mar 2026 14:16:27 +0200 Subject: [PATCH 36/81] perf(agent-manager): extend slimPart to strip heavy tool metadata for faster session switching (#7927) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend slim-metadata.ts to handle apply_patch, multiedit, write, and bash tools in addition to edit. Previously only edit tool parts had their heavy metadata stripped before IPC serialization. apply_patch parts carried full file before/after contents per file, write parts carried the entire written file, and bash parts carried up to 30KB of output — all serialized on every session switch. This reduces session-switch time by ~2x for sessions with many tool calls. --- .../src/kilo-provider/slim-metadata.ts | 183 ++++++++++++++---- 1 file changed, 149 insertions(+), 34 deletions(-) diff --git a/packages/kilo-vscode/src/kilo-provider/slim-metadata.ts b/packages/kilo-vscode/src/kilo-provider/slim-metadata.ts index d81b70045d4..3ec760d7c4a 100644 --- a/packages/kilo-vscode/src/kilo-provider/slim-metadata.ts +++ b/packages/kilo-vscode/src/kilo-provider/slim-metadata.ts @@ -1,54 +1,169 @@ /** - * Pure data-transform helpers that strip heavy edit-tool metadata from + * Pure data-transform helpers that strip heavy tool metadata from * message parts before sending them to the webview via postMessage. * + * The webview communicates with the extension over VS Code's IPC bridge. + * Every message is JSON-serialised → deserialised on each side. Tool parts + * from edit, apply_patch, multiedit and write often carry full file contents + * (before/after snapshots, patch text, written content). Sending those on + * every session switch makes serialisation the dominant bottleneck. + * + * This module strips fields the webview never (or rarely) needs while keeping + * everything required to render collapsed tool-part headers and diagnostics. + * * No vscode dependency — safe to unit-test in isolation. */ -/** Strip a filediff down to path + addition/deletion counts. */ -function slimEditMeta(meta: unknown): Record | undefined { - if (!meta || typeof meta !== "object") return undefined +// Max chars to keep for truncated output fields (bash metadata.output etc.) +const OUTPUT_CAP = 4000 - const obj = meta as Record - const filediff = obj.filediff - if (!filediff || typeof filediff !== "object") return undefined +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- - const diff = filediff as Record - const file = typeof diff.file === "string" ? diff.file : undefined - const additions = typeof diff.additions === "number" ? diff.additions : 0 - const deletions = typeof diff.deletions === "number" ? diff.deletions : 0 - - const result: Record = { - filediff: { - ...(file ? { file } : {}), - additions, - deletions, - }, - } - // Preserve diagnostics so post-edit LSP errors still render - if (obj.diagnostics) result.diagnostics = obj.diagnostics - return result +function isObj(v: unknown): v is Record { + return !!v && typeof v === "object" && !Array.isArray(v) } -/** Strip heavy metadata from a single edit tool part; pass-through for everything else. */ +/** Truncate a string value to cap, appending a marker when trimmed. */ +function cap(v: unknown, limit = OUTPUT_CAP): string | undefined { + if (typeof v !== "string") return undefined + if (v.length <= limit) return v + return v.slice(0, limit) + `\n… (truncated, ${v.length - limit} chars omitted)` +} + +// --------------------------------------------------------------------------- +// Per-tool slimmers +// --------------------------------------------------------------------------- + +/** edit: strip filediff.before/after (webview falls back to input.oldString/newString). */ +function slimEdit(state: Record): Record { + const next = { ...state } + const meta = state.metadata + if (!isObj(meta)) { + delete next.metadata + return next + } + + const result: Record = {} + const fd = meta.filediff + if (isObj(fd)) { + result.filediff = { + ...(typeof fd.file === "string" ? { file: fd.file } : {}), + additions: typeof fd.additions === "number" ? fd.additions : 0, + deletions: typeof fd.deletions === "number" ? fd.deletions : 0, + } + } + if (meta.diagnostics) result.diagnostics = meta.diagnostics + next.metadata = result + return next +} + +/** apply_patch: strip files[].before/after/diff + input.patchText. */ +function slimPatch(state: Record): Record { + const next = { ...state } + const meta = state.metadata + if (isObj(meta) && Array.isArray(meta.files)) { + next.metadata = { + ...meta, + files: (meta.files as Record[]).map((f) => ({ + filePath: f.filePath, + relativePath: f.relativePath, + type: f.type, + additions: f.additions, + deletions: f.deletions, + movePath: f.movePath, + })), + } + if (isObj(meta) && meta.diagnostics) { + ;(next.metadata as Record).diagnostics = meta.diagnostics + } + } + // Strip the full patch text from input — only keep files count for title + const input = state.input + if (isObj(input) && typeof input.patchText === "string") { + next.input = { ...input, patchText: undefined } + } + return next +} + +/** multiedit: strip nested results (each is a full edit metadata object). */ +function slimMultiedit(state: Record): Record { + const next = { ...state } + const meta = state.metadata + if (isObj(meta) && Array.isArray(meta.results)) { + next.metadata = { + ...meta, + results: (meta.results as Record[]).map((r) => { + const slim: Record = {} + if (r.diagnostics) slim.diagnostics = r.diagnostics + const fd = r.filediff + if (isObj(fd)) { + slim.filediff = { + ...(typeof fd.file === "string" ? { file: fd.file } : {}), + additions: typeof fd.additions === "number" ? fd.additions : 0, + deletions: typeof fd.deletions === "number" ? fd.deletions : 0, + } + } + return slim + }), + } + } + return next +} + +/** write: strip input.content (entire file). Keep filePath + diagnostics. */ +function slimWrite(state: Record): Record { + const next = { ...state } + const input = state.input + if (isObj(input) && typeof input.content === "string") { + next.input = { ...input, content: undefined } + } + return next +} + +/** bash: truncate metadata.output (up to 30KB) and state.output (up to 50KB). */ +function slimBash(state: Record): Record { + const next = { ...state } + const meta = state.metadata + if (isObj(meta) && typeof meta.output === "string" && meta.output.length > OUTPUT_CAP) { + next.metadata = { ...meta, output: cap(meta.output) } + } + if (typeof state.output === "string" && (state.output as string).length > OUTPUT_CAP) { + next.output = cap(state.output) + } + return next +} + +// --------------------------------------------------------------------------- +// Public API +// --------------------------------------------------------------------------- + +const slimmers: Record) => Record> = { + edit: slimEdit, + apply_patch: slimPatch, + multiedit: slimMultiedit, + write: slimWrite, + bash: slimBash, +} + +/** Strip heavy metadata from a single tool part; pass-through for non-tool parts. */ export function slimPart(part: T): T { if (!part || typeof part !== "object") return part const obj = part as Record - if (obj.type !== "tool" || obj.tool !== "edit") return part + if (obj.type !== "tool") return part + + const tool = obj.tool + if (typeof tool !== "string") return part + + const fn = slimmers[tool] + if (!fn) return part const state = obj.state - if (!state || typeof state !== "object") return part + if (!isObj(state)) return part - const next = { ...(state as Record) } - const meta = slimEditMeta(next.metadata) - if (meta) next.metadata = meta - else delete next.metadata - - return { - ...obj, - state: next, - } as T + return { ...obj, state: fn(state) } as T } /** Slim every part in an array. */ From a68cf47dacc02c3f91574c76f886feb543d198ee Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Mon, 30 Mar 2026 15:21:55 +0300 Subject: [PATCH 37/81] fix(cli): remove find from Ask allowlist, add git write denials find has -exec/-execdir/-delete flags that execute arbitrary commands or delete files, bypassing the prefix-based permission check. Also add missing git write subcommand denials: config, clone, pull, init, worktree, submodule, revert, bisect, filter-branch, fetch, restore. --- packages/opencode/src/agent/agent.ts | 13 ++++++++-- packages/opencode/src/agent/prompt/ask.txt | 2 +- .../kilocode/ask-agent-permissions.test.ts | 25 +++++++++++++++++-- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index 5590cc8abc4..fc99fd690ee 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -138,8 +138,6 @@ export namespace Agent { "whoami *": "allow", "printenv *": "allow", "man *": "allow", - // file discovery - "find *": "allow", // text processing (stdout only, no file modification) "grep *": "allow", "rg *": "allow", @@ -170,6 +168,17 @@ export namespace Agent { "git clean *": "deny", "git mv *": "deny", "git rm *": "deny", + "git config *": "deny", + "git clone *": "deny", + "git pull *": "deny", + "git init *": "deny", + "git worktree *": "deny", + "git submodule *": "deny", + "git revert *": "deny", + "git bisect *": "deny", + "git filter-branch *": "deny", + "git fetch *": "deny", + "git restore *": "deny", // gh — require user approval since commands vary widely "gh *": "ask", } diff --git a/packages/opencode/src/agent/prompt/ask.txt b/packages/opencode/src/agent/prompt/ask.txt index e324b0df985..40b5f9cf4aa 100644 --- a/packages/opencode/src/agent/prompt/ask.txt +++ b/packages/opencode/src/agent/prompt/ask.txt @@ -4,7 +4,7 @@ Guidelines: - Answer questions thoroughly with clear explanations and relevant examples - Analyze code, explain concepts, and provide recommendations without making changes - Use Mermaid diagrams when they help clarify your response -- You may run read-only bash commands (ls, cat, grep, git log, git diff, find, etc.) to gather information +- You may run read-only bash commands (ls, cat, grep, git log, git diff, etc.) to gather information - You must NOT modify files, run write commands, or execute code — this agent is read-only - MCP tools are available if configured — each call requires user approval - If a question requires implementation, suggest switching to a different agent diff --git a/packages/opencode/test/kilocode/ask-agent-permissions.test.ts b/packages/opencode/test/kilocode/ask-agent-permissions.test.ts index a727b014a00..50c31b1d116 100644 --- a/packages/opencode/test/kilocode/ask-agent-permissions.test.ts +++ b/packages/opencode/test/kilocode/ask-agent-permissions.test.ts @@ -24,7 +24,6 @@ const readOnlyBash: Record = { "whoami *": "allow", "printenv *": "allow", "man *": "allow", - "find *": "allow", "grep *": "allow", "rg *": "allow", "ag *": "allow", @@ -53,6 +52,17 @@ const readOnlyBash: Record = { "git clean *": "deny", "git mv *": "deny", "git rm *": "deny", + "git config *": "deny", + "git clone *": "deny", + "git pull *": "deny", + "git init *": "deny", + "git worktree *": "deny", + "git submodule *": "deny", + "git revert *": "deny", + "git bisect *": "deny", + "git filter-branch *": "deny", + "git fetch *": "deny", + "git restore *": "deny", "gh *": "ask", } @@ -115,7 +125,6 @@ describe("Ask agent bash permissions", () => { ["ls", "ls -la"], ["grep", "grep -r TODO src/"], ["rg", "rg pattern"], - ["find", "find . -name '*.ts'"], ["jq", "jq '.name' package.json"], ["head", "head -n 10 file.txt"], ["tail", "tail -f log.txt"], @@ -178,6 +187,17 @@ describe("Ask agent bash permissions", () => { "git remote add origin url", "git remote remove upstream", "git remote set-url origin url", + "git config user.name test", + "git clone https://example.com/repo", + "git pull origin main", + "git init", + "git worktree add ../branch", + "git submodule update --init", + "git revert HEAD", + "git bisect start", + "git filter-branch --all", + "git fetch origin", + "git restore src/index.ts", ] for (const cmd of denied) { @@ -190,6 +210,7 @@ describe("Ask agent bash permissions", () => { describe("denied write/execute commands", () => { const denied = [ + "find . -exec rm {} \\;", "touch newfile.ts", "mkdir src/new", "cp a.ts b.ts", From 6fadd9de994d22e3ee4ca706952b636447c658d1 Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Mon, 30 Mar 2026 15:31:47 +0300 Subject: [PATCH 38/81] fix(cli): user denies override MCP ask rules Re-apply user deny rules after the ask-specific config so explicit user denies for MCP servers are not overridden by the generated mcpRules 'ask' defaults. --- packages/opencode/src/agent/agent.ts | 1 + .../kilocode/ask-agent-permissions.test.ts | 55 ++++++++++++------- 2 files changed, 35 insertions(+), 21 deletions(-) diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index fc99fd690ee..5b1cb2bdcb1 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -338,6 +338,7 @@ export namespace Agent { }, ...mcpRules, }), + user.filter((r) => r.action === "deny"), // kilocode_change: re-apply user denies so explicit MCP blocks win over mcpRules ), mode: "primary", native: true, diff --git a/packages/opencode/test/kilocode/ask-agent-permissions.test.ts b/packages/opencode/test/kilocode/ask-agent-permissions.test.ts index 50c31b1d116..31bd7f3d796 100644 --- a/packages/opencode/test/kilocode/ask-agent-permissions.test.ts +++ b/packages/opencode/test/kilocode/ask-agent-permissions.test.ts @@ -88,32 +88,37 @@ function askRuleset() { }) } -/** Build the Ask agent ruleset WITH MCP servers */ -function askRulesetWithMcp(servers: string[]) { +/** Build the Ask agent ruleset WITH MCP servers and optional user config */ +function askRulesetWithMcp(servers: string[], user: PermissionNext.Ruleset = []) { const mcpRules: Record = {} for (const key of servers) { const sanitized = key.replace(/[^a-zA-Z0-9_-]/g, "_") mcpRules[sanitized + "_*"] = "ask" } - return PermissionNext.fromConfig({ - "*": "deny", - bash: readOnlyBash, - read: { - "*": "allow", - "*.env": "ask", - "*.env.*": "ask", - "*.env.example": "allow", - }, - grep: "allow", - glob: "allow", - list: "allow", - question: "allow", - webfetch: "allow", - websearch: "allow", - codesearch: "allow", - codebase_search: "allow", - ...mcpRules, - }) + // Mirrors agent.ts merge order: user, ask-specific (with mcpRules), user denies last + return PermissionNext.merge( + user, + PermissionNext.fromConfig({ + "*": "deny", + bash: readOnlyBash, + read: { + "*": "allow", + "*.env": "ask", + "*.env.*": "ask", + "*.env.example": "allow", + }, + grep: "allow", + glob: "allow", + list: "allow", + question: "allow", + webfetch: "allow", + websearch: "allow", + codesearch: "allow", + codebase_search: "allow", + ...mcpRules, + }), + user.filter((r) => r.action === "deny"), + ) } describe("Ask agent bash permissions", () => { @@ -318,4 +323,12 @@ describe("Ask agent MCP permissions", () => { expect(disabled.has("edit")).toBe(true) expect(disabled.has("write")).toBe(true) }) + + test("user config deny overrides MCP ask rules", () => { + const deny = PermissionNext.fromConfig({ "my-server_*": "deny" }) + const ruleset = askRulesetWithMcp(["my-server"], deny) + // User explicitly denied this server — should stay denied + const result = PermissionNext.disabled(["my-server_sometool"], ruleset) + expect(result.has("my-server_sometool")).toBe(true) + }) }) From 7376d2131a50e2b1d524892821a67590d4fe8de7 Mon Sep 17 00:00:00 2001 From: nivin karthick <107146054+so-nerdyy@users.noreply.github.com> Date: Mon, 30 Mar 2026 07:49:29 -0500 Subject: [PATCH 39/81] fix: preserve separator style when migrating .kilocode to .kilo paths (#7562) * fix: preserve separator style when migrating .kilocode to .kilo paths Fixes path corruption on Windows when stored paths used Unix slashes. Previously forced OS separator which created mixed-separator paths like: /repo\.kilo\worktrees/fix Now preserves original separator style from stored path. Closes: [issue reference if any] * test: update Windows test to match separator-preserving migration The test previously used path.sep which doesn't match the new behavior of preserving the separator style from the stored path. --------- Co-authored-by: marius-kilocode --- .../kilo-vscode/src/agent-manager/WorktreeStateManager.ts | 7 +++++-- .../kilo-vscode/tests/unit/worktree-state-manager.test.ts | 5 ++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/kilo-vscode/src/agent-manager/WorktreeStateManager.ts b/packages/kilo-vscode/src/agent-manager/WorktreeStateManager.ts index 695af8899b3..6dbaee91edb 100644 --- a/packages/kilo-vscode/src/agent-manager/WorktreeStateManager.ts +++ b/packages/kilo-vscode/src/agent-manager/WorktreeStateManager.ts @@ -318,8 +318,11 @@ export class WorktreeStateManager { this.reviewDiffStyle = "unified" for (const [id, wt] of Object.entries(data.worktrees ?? {})) { - // Rewrite stale .kilocode/ paths (handles both Unix / and Windows \ separators) - const fixed = wt.path?.replace(/[/\\]\.kilocode[/\\]/g, `${path.sep}.kilo${path.sep}`) ?? wt.path + // Rewrite stale .kilocode paths while preserving the separator style already stored. + const fixed = + wt.path?.replace(/([/\\])\.kilocode([/\\])/g, (_match, leadingSep, trailingSep) => { + return `${leadingSep}.kilo${trailingSep}` + }) ?? wt.path this.worktrees.set(id, { id, ...wt, path: fixed }) } for (const [id, s] of Object.entries(data.sessions ?? {})) { diff --git a/packages/kilo-vscode/tests/unit/worktree-state-manager.test.ts b/packages/kilo-vscode/tests/unit/worktree-state-manager.test.ts index 8e0a18a7066..5b0c2af1be2 100644 --- a/packages/kilo-vscode/tests/unit/worktree-state-manager.test.ts +++ b/packages/kilo-vscode/tests/unit/worktree-state-manager.test.ts @@ -548,9 +548,8 @@ describe("WorktreeStateManager", () => { await manager.load() - // path.sep is / on unix, \ on windows — the rewrite uses path.sep - const expected = `C:${path.sep}.kilo${path.sep}worktrees\\fix` - expect(manager.getWorktrees()[0].path).toBe(expected) + // Separator style from the stored path is preserved (backslashes stay as backslashes) + expect(manager.getWorktrees()[0].path).toBe("C:\\.kilo\\worktrees\\fix") }) }) }) From 5385dab21ae94af384af8c5fde99b806be7f9f97 Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 30 Mar 2026 14:59:04 +0200 Subject: [PATCH 40/81] fix(vscode): prevent spinner from disappearing during webview recreation (#7931) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When VS Code recreates a sidebar webview (e.g. switching panels and back), syncWebviewState re-seeds session statuses via HTTP. The reconciliation logic was resetting busy sessions to idle when they were absent from the HTTP response, causing a brief spinner gap before the next SSE event restored the busy state. Only reconcile (reset missing busy→idle) on the very first seed before any SSE events have populated the status map. After that, live SSE events are authoritative. Also adds defensive SSE improvements matching the app's behavior: - Disable SDK internal retry loop (sseMaxRetryAttempts: 1) - Filter AbortErrors in onSseError callback and catch block --- packages/kilo-vscode/src/KiloProvider.ts | 15 ++++-- .../services/cli-backend/sdk-sse-adapter.ts | 15 +++++- packages/kilo-vscode/src/session-status.ts | 18 +++++-- .../tests/unit/session-status.test.ts | 48 +++++++++++++++++++ 4 files changed, 88 insertions(+), 8 deletions(-) diff --git a/packages/kilo-vscode/src/KiloProvider.ts b/packages/kilo-vscode/src/KiloProvider.ts index af04b501103..8f72a833dd4 100644 --- a/packages/kilo-vscode/src/KiloProvider.ts +++ b/packages/kilo-vscode/src/KiloProvider.ts @@ -281,7 +281,12 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper // Seed session status map so the Settings panel knows about already-running sessions. // Must run after webview is ready (postMessage is a no-op before that). - void this.seedSessionStatusMap() + // Only reconcile (reset missing busy→idle) when the map is empty, i.e. + // on the very first seed before any real-time SSE events have arrived. + // On SSE reconnects or webview recreations the live SSE data is + // authoritative and reconciliation risks race-resetting busy sessions. + const reconcile = this.sessionStatusMap.size === 0 + void this.seedSessionStatusMap(reconcile) } // legacy-migration start @@ -1828,11 +1833,15 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper * Seed sessionStatusMap with current session statuses on connect. * Without this, the Settings panel (which has no tracked sessions) would see * busyCount() = 0 for sessions that were already running before it opened. + * + * @param reconcile When true, reset locally-busy sessions absent from the + * server response to idle (crash recovery). Set to false on SSE reconnects + * to avoid a race where a brief HTTP fetch gap causes the spinner to vanish. */ - private async seedSessionStatusMap(): Promise { + private async seedSessionStatusMap(reconcile = true): Promise { if (!this.client || this.connectionState !== "connected") return const dir = this.getWorkspaceDirectory() - await seedSessionStatuses(this.client, dir, this.sessionStatusMap, (msg) => this.postMessage(msg)) + await seedSessionStatuses(this.client, dir, this.sessionStatusMap, (msg) => this.postMessage(msg), reconcile) } /** diff --git a/packages/kilo-vscode/src/services/cli-backend/sdk-sse-adapter.ts b/packages/kilo-vscode/src/services/cli-backend/sdk-sse-adapter.ts index 260ca663262..0021e4e7a9a 100644 --- a/packages/kilo-vscode/src/services/cli-backend/sdk-sse-adapter.ts +++ b/packages/kilo-vscode/src/services/cli-backend/sdk-sse-adapter.ts @@ -143,10 +143,20 @@ export class SdkSSEAdapter { console.log("[Kilo New] SSE: 🎬 Calling SDK global.event()...") const events = await this.client.global.event({ signal: attempt.signal, + // Disable SDK-internal retries — consumeLoop handles reconnection + // with its own outer while-loop. Without this the SDK's infinite + // retry loop with exponential backoff runs in parallel, causing + // duplicate connections and "error" state flicker. + sseMaxRetryAttempts: 1, onSseError: (error) => { if (signal.aborted) { return } + // Filter AbortErrors — they are expected during heartbeat timeout + // or manual reconnect() calls, not real connection failures. + if (error instanceof DOMException && error.name === "AbortError") { + return + } console.error("[Kilo New] SSE: ❌ SDK SSE error callback:", error) this.notifyError(error instanceof Error ? error : new Error(String(error))) }, @@ -171,7 +181,10 @@ export class SdkSSEAdapter { console.log("[Kilo New] SSE: 📭 Stream ended normally") } catch (error) { - if (!signal.aborted) { + // Suppress AbortErrors — they are expected when the heartbeat timer + // or reconnect() aborts the per-attempt controller. + const aborted = signal.aborted || (error instanceof DOMException && error.name === "AbortError") + if (!aborted) { console.error("[Kilo New] SSE: ❌ Stream error:", error) this.notifyError(error instanceof Error ? error : new Error(String(error))) } diff --git a/packages/kilo-vscode/src/session-status.ts b/packages/kilo-vscode/src/session-status.ts index de476537f31..e596603e704 100644 --- a/packages/kilo-vscode/src/session-status.ts +++ b/packages/kilo-vscode/src/session-status.ts @@ -16,12 +16,18 @@ export function getBusySessionCount(map: Map): nu * Fetch all current session statuses and seed the provided map + webview. * Called on connect so the Settings panel knows about already-running sessions * without waiting for the next session.status SSE event. + * + * When `reconcile` is true (default: first seed), locally-busy sessions absent + * from the server response are reset to idle — covering server crash/restart. + * On SSE reconnects set `reconcile: false` to avoid a race where the HTTP + * fetch briefly returns stale data and the spinner disappears mid-stream. */ export async function seedSessionStatuses( client: KiloClient, dir: string, map: Map, post: (msg: unknown) => void, + reconcile = true, ): Promise { try { const result = await client.session.status({ directory: dir }) @@ -41,10 +47,14 @@ export async function seedSessionStatuses( // Reconcile: any locally non-idle session absent from the server response // means the server lost its in-memory state (crash/restart). Reset to idle. - for (const [sid, status] of map) { - if (status !== "idle" && !active[sid]) { - map.set(sid, "idle") - post({ type: "sessionStatus", sessionID: sid, status: "idle" }) + // Skipped on SSE reconnects — the real-time SSE events are authoritative + // for status transitions and the brief HTTP fetch can race with them. + if (reconcile) { + for (const [sid, status] of map) { + if (status !== "idle" && !active[sid]) { + map.set(sid, "idle") + post({ type: "sessionStatus", sessionID: sid, status: "idle" }) + } } } } catch (error) { diff --git a/packages/kilo-vscode/tests/unit/session-status.test.ts b/packages/kilo-vscode/tests/unit/session-status.test.ts index 2b9355c99fb..62478587521 100644 --- a/packages/kilo-vscode/tests/unit/session-status.test.ts +++ b/packages/kilo-vscode/tests/unit/session-status.test.ts @@ -147,6 +147,54 @@ describe("seedSessionStatuses", () => { expect(map.get("s1")).toBe("busy") expect(msgs).toEqual([]) }) + + // ---- reconcile=false (SSE reconnect) ---- + + it("skips reconciliation when reconcile=false", async () => { + const client = createClient({ data: {} }) + const map = new Map([["s1", "busy"]]) + const { msgs, post } = collect() + + await seedSessionStatuses(client, "/repo", map, post, false) + + // Session stays busy — reconciliation skipped on SSE reconnect + expect(map.get("s1")).toBe("busy") + expect(msgs).toEqual([]) + }) + + it("still seeds server entries when reconcile=false", async () => { + const client = createClient({ + data: { s1: { type: "busy" }, s2: { type: "retry", attempt: 1, message: "err", next: 1000 } }, + }) + const map = new Map() + const { msgs, post } = collect() + + await seedSessionStatuses(client, "/repo", map, post, false) + + expect(map.get("s1")).toBe("busy") + expect(map.get("s2")).toBe("retry") + expect(msgs).toEqual([ + { type: "sessionStatus", sessionID: "s1", status: "busy" }, + { type: "sessionStatus", sessionID: "s2", status: "retry", attempt: 1, message: "err", next: 1000 }, + ]) + }) + + it("does not reset stale entries when reconcile=false but updates confirmed ones", async () => { + const client = createClient({ data: { confirmed: { type: "busy" } } }) + const map = new Map([ + ["stale", "busy"], + ["confirmed", "retry"], + ]) + const { msgs, post } = collect() + + await seedSessionStatuses(client, "/repo", map, post, false) + + // stale: stays busy (no reconciliation) + expect(map.get("stale")).toBe("busy") + // confirmed: updated to busy from server + expect(map.get("confirmed")).toBe("busy") + expect(msgs).toEqual([{ type: "sessionStatus", sessionID: "confirmed", status: "busy" }]) + }) }) // --------------------------------------------------------------------------- From ca92e63b0f3efa3ee12666084e011c3b7dd9e982 Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Mon, 30 Mar 2026 16:28:53 +0300 Subject: [PATCH 41/81] fix(cli): use allowlist for read-only git cmds --- packages/opencode/src/agent/agent.ts | 52 +++++++++++----------------- 1 file changed, 20 insertions(+), 32 deletions(-) diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index 5b1cb2bdcb1..175de2079f3 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -147,38 +147,26 @@ export namespace Agent { "cut *": "allow", "tr *": "allow", "jq *": "allow", - // git — allow read operations, deny all write operations - "git *": "allow", - "git add *": "deny", - "git commit *": "deny", - "git push *": "deny", - "git merge *": "deny", - "git rebase *": "deny", - "git cherry-pick *": "deny", - "git reset *": "deny", - "git checkout *": "deny", - "git switch *": "deny", - "git stash *": "deny", - "git tag *": "deny", - "git am *": "deny", - "git apply *": "deny", - "git remote set-url *": "deny", - "git remote add *": "deny", - "git remote remove *": "deny", - "git clean *": "deny", - "git mv *": "deny", - "git rm *": "deny", - "git config *": "deny", - "git clone *": "deny", - "git pull *": "deny", - "git init *": "deny", - "git worktree *": "deny", - "git submodule *": "deny", - "git revert *": "deny", - "git bisect *": "deny", - "git filter-branch *": "deny", - "git fetch *": "deny", - "git restore *": "deny", + // git — allowlist of read-only subcommands, deny everything else + "git *": "deny", + "git log *": "allow", + "git show *": "allow", + "git diff *": "allow", + "git status *": "allow", + "git branch *": "allow", + "git blame *": "allow", + "git rev-parse *": "allow", + "git rev-list *": "allow", + "git ls-files *": "allow", + "git ls-tree *": "allow", + "git ls-remote *": "allow", + "git shortlog *": "allow", + "git describe *": "allow", + "git cat-file *": "allow", + "git name-rev *": "allow", + "git remote *": "allow", + "git tag *": "allow", + "git stash list *": "allow", // gh — require user approval since commands vary widely "gh *": "ask", } From b007fa2d92f52637d4d82044c9d2e8fc449c88c0 Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Mon, 30 Mar 2026 16:39:13 +0300 Subject: [PATCH 42/81] fix(cli): restrict git branch/tag/remote to read-only flags --- packages/opencode/src/agent/agent.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index 175de2079f3..833aea650c5 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -153,7 +153,6 @@ export namespace Agent { "git show *": "allow", "git diff *": "allow", "git status *": "allow", - "git branch *": "allow", "git blame *": "allow", "git rev-parse *": "allow", "git rev-list *": "allow", @@ -164,9 +163,12 @@ export namespace Agent { "git describe *": "allow", "git cat-file *": "allow", "git name-rev *": "allow", - "git remote *": "allow", - "git tag *": "allow", "git stash list *": "allow", + "git tag -l *": "allow", + "git branch -l *": "allow", + "git branch -a *": "allow", + "git branch -r *": "allow", + "git remote -v *": "allow", // gh — require user approval since commands vary widely "gh *": "ask", } From 657296a08b268d9a6a7209cdc4d98543eda9572f Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Mon, 30 Mar 2026 16:39:48 +0300 Subject: [PATCH 43/81] fix(cli): clarify read-only wording in ask prompt --- packages/opencode/src/agent/prompt/ask.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/agent/prompt/ask.txt b/packages/opencode/src/agent/prompt/ask.txt index 40b5f9cf4aa..fc96b149ab1 100644 --- a/packages/opencode/src/agent/prompt/ask.txt +++ b/packages/opencode/src/agent/prompt/ask.txt @@ -5,6 +5,6 @@ Guidelines: - Analyze code, explain concepts, and provide recommendations without making changes - Use Mermaid diagrams when they help clarify your response - You may run read-only bash commands (ls, cat, grep, git log, git diff, etc.) to gather information -- You must NOT modify files, run write commands, or execute code — this agent is read-only +- You must NOT modify files, run write commands, or execute code — you are read-only - MCP tools are available if configured — each call requires user approval - If a question requires implementation, suggest switching to a different agent From a5c3a9567810268246608cea394ec343202104e3 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 13:46:10 +0000 Subject: [PATCH 44/81] feat(vscode): center profile screen with max-width --- .../webview-ui/src/components/profile/ProfileView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kilo-vscode/webview-ui/src/components/profile/ProfileView.tsx b/packages/kilo-vscode/webview-ui/src/components/profile/ProfileView.tsx index f1f29cade1b..56a0cecb27f 100644 --- a/packages/kilo-vscode/webview-ui/src/components/profile/ProfileView.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/profile/ProfileView.tsx @@ -110,7 +110,7 @@ const ProfileView: Component = (props) => { >

{language.t("profile.title")}

-
+
Date: Mon, 30 Mar 2026 13:53:19 +0000 Subject: [PATCH 45/81] fix(vscode): add box-sizing border-box to prevent overflow on narrow panels --- .../webview-ui/src/components/profile/ProfileView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/kilo-vscode/webview-ui/src/components/profile/ProfileView.tsx b/packages/kilo-vscode/webview-ui/src/components/profile/ProfileView.tsx index 56a0cecb27f..83f55ca0fbf 100644 --- a/packages/kilo-vscode/webview-ui/src/components/profile/ProfileView.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/profile/ProfileView.tsx @@ -110,7 +110,9 @@ const ProfileView: Component = (props) => { >

{language.t("profile.title")}

-
+
Date: Mon, 30 Mar 2026 13:56:56 +0000 Subject: [PATCH 46/81] docs: remove cline-to-kilo-migration page and add redirect --- packages/kilo-docs/lib/nav/contributing.ts | 4 - .../contributing/cline-to-kilo-migration.md | 180 ------------------ packages/kilo-docs/previous-docs-redirects.js | 6 + 3 files changed, 6 insertions(+), 184 deletions(-) delete mode 100644 packages/kilo-docs/pages/contributing/cline-to-kilo-migration.md diff --git a/packages/kilo-docs/lib/nav/contributing.ts b/packages/kilo-docs/lib/nav/contributing.ts index e02eb80fdaa..34fb344f30f 100644 --- a/packages/kilo-docs/lib/nav/contributing.ts +++ b/packages/kilo-docs/lib/nav/contributing.ts @@ -13,10 +13,6 @@ export const ContributingNav: NavSection[] = [ href: "/contributing/ecosystem", children: "Ecosystem", }, - { - href: "/contributing/cline-to-kilo-migration", - children: "Cline to Kilo Migration", - }, ], }, { diff --git a/packages/kilo-docs/pages/contributing/cline-to-kilo-migration.md b/packages/kilo-docs/pages/contributing/cline-to-kilo-migration.md deleted file mode 100644 index 4e4d399fc7f..00000000000 --- a/packages/kilo-docs/pages/contributing/cline-to-kilo-migration.md +++ /dev/null @@ -1,180 +0,0 @@ ---- -title: "Cline to Kilo: Contributor Migration Guide" -description: "A guide for Cline contributors who want to start contributing to Kilo Code" ---- - -# Cline to Kilo: Contributor Migration Guide - -If you've been contributing to Cline and you're ready to bring those skills over to Kilo Code, you're in the right place. This guide will walk you through what's different, what's the same, and how to get up and running as a Kilo contributor. - -The good news: if you've been contributing to Cline, you already have most of the skills you need. The workflows are similar, but there are some differences worth knowing about before you dive in. - -## The Quick Version - -| What You Know from Cline | What's Different in Kilo | -| -------------------------------------------- | ------------------------ | -| `npm run install:all` | `pnpm install` | -| `npm run protos` required before first build | Not required | -| F5 to launch dev extension | Same — F5 to launch | -| Changesets for versioning | Same — `pnpm changeset` | - -## Setting Up Your Environment - -### What Stays the Same - -- Git, Node.js (v20.18.1+), and VS Code are still your core tools -- F5 still launches the extension in debug mode -- The project structure follows similar patterns (`src/`, `webview-ui/`, `e2e/`) - -### What's Changed - -**Package Manager: pnpm instead of npm** - -Kilo uses pnpm for dependency management. If you don't have it installed: - -```bash -npm install -g pnpm -``` - -Then instead of: - -```bash -# Cline -npm run install:all -``` - -You'll run: - -```bash -# Kilo -pnpm install -``` - -This single command handles everything — the main extension, webview UI, and e2e tests. - -**No Protocol Buffer Generation** - -In Cline, you needed to run `npm run protos` before your first build. Kilo doesn't require this step. Just install dependencies and you're ready to go. - -**Building the Extension** - -```bash -pnpm build -``` - -This builds the webview UI, compiles TypeScript, bundles everything, and drops a `.vsix` file in `bin/`. - -## Development Workflow Differences - -### Hot Reloading - -Kilo has improved hot reloading in development mode: - -- **Webview UI changes:** Apply immediately without restart (same as Cline) -- **Core extension changes:** In dev mode (`NODE_ENV="development"`), Kilo automatically triggers `workbench.action.reloadWindow` — no manual debugger restarts needed - -In Cline, you had to manually stop debugging, kill background tasks, and restart. Kilo handles this for you during development. - -**Note:** Production builds still require the manual stop/restart cycle. - -### Git Hooks - -Kilo uses Husky for git hooks, which run automatically: - -**Pre-commit:** - -- Blocks commits directly to main -- Runs type generation (`pnpm generate-types`) -- Checks for type file changes -- Runs lint-staged - -**Pre-push:** - -- Blocks pushes directly to main -- Compiles the project -- Reminds you to create a changeset if needed - -These hooks catch issues early. If a commit or push fails, check the hook output for details. - -## Testing - -### Running Tests - -```bash -# All tests -pnpm test - -# Extension tests only -pnpm test:extension - -# Webview tests only -pnpm test:webview - -# E2E / Integration tests -pnpm test:integration -``` - -### E2E Test Setup - -For integration tests, create a `.env.local` file in the project root: - -``` -OPENROUTER_API_KEY=sk-or-v1-... -``` - -Check `e2e/VSCODE_INTEGRATION_TESTS.md` for full details. - -## Contributing Code - -### Creating a Pull Request - -The changeset workflow is identical to Cline: - -```bash -pnpm changeset -``` - -Choose your version bump: - -- **major** — breaking changes -- **minor** — new features -- **patch** — bug fixes - -Commit the generated `.changeset` file with your changes. - -### Code Quality Checks - -```bash -pnpm lint # ESLint -pnpm check-types # TypeScript type checking -``` - -## What's New in Kilo - -Beyond the workflow changes, Kilo has expanded significantly as a platform. As a contributor, you might find opportunities to work on: - -- **Multiple interfaces:** VS Code, JetBrains, CLI, and web (Cloud Agents, App Builder) -- **Specialized Agent modes:** Code, Ask, Debug, Architect, Orchestrator -- **Custom Modes:** A system for creating and sharing specialized agent configurations -- **Platform features:** Sessions, Parallel Agents, Deploy, Code Reviews, Managed Indexing -- **Kilo Marketplace:** A community-driven repository where you can contribute Skills (modular workflows), MCP Servers (tool integrations), and Modes (custom agent behaviors) - -Check the [Architecture Overview](architecture) to understand how these pieces fit together. - -## Getting Help - -- **Discord:** Real-time support from the community -- **GitHub Discussions:** For questions and feature ideas -- **Reddit:** Community discussions - -## TL;DR Checklist - -- ✅ Install pnpm globally -- ✅ Fork and clone the Kilo repo -- ✅ Run `pnpm install` (not `npm run install:all`) -- ✅ Skip the protos step — it's not needed -- ✅ Press F5 to launch the dev extension -- ✅ Create a changeset before your PR (`pnpm changeset`) -- ✅ Let the git hooks do their thing - -Welcome to Kilo. We're glad you're here. diff --git a/packages/kilo-docs/previous-docs-redirects.js b/packages/kilo-docs/previous-docs-redirects.js index 0b163d427ae..c6d3804f430 100644 --- a/packages/kilo-docs/previous-docs-redirects.js +++ b/packages/kilo-docs/previous-docs-redirects.js @@ -1,4 +1,10 @@ module.exports = [ + { + source: "/docs/contributing/cline-to-kilo-migration", + destination: "/docs/contributing", + basePath: false, + permanent: true, + }, { source: "/docs/contributing/architecture/model-provider-blocklist", destination: "/docs/collaborate/enterprise/model-access-controls", From af6328aeccb9a0f9029d9a90f1340b31461ca45e Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 13:58:12 +0000 Subject: [PATCH 47/81] fix: update Kilo-Org/kilo references to Kilo-Org/kilocode --- .opencode/command/issues.md | 2 +- packages/kilo-docs/pages/contributing/index.md | 2 +- script/upstream/transforms/transform-take-theirs.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.opencode/command/issues.md b/.opencode/command/issues.md index d1e37d4a7df..224f22e3035 100644 --- a/.opencode/command/issues.md +++ b/.opencode/command/issues.md @@ -3,7 +3,7 @@ description: "find issue(s) on github" model: opencode/claude-haiku-4-5 --- -Search through existing issues in Kilo-Org/kilo using the gh cli to find issues matching this query: +Search through existing issues in Kilo-Org/kilocode using the gh cli to find issues matching this query: $ARGUMENTS diff --git a/packages/kilo-docs/pages/contributing/index.md b/packages/kilo-docs/pages/contributing/index.md index ba8960f7be3..1b8fa9e8604 100644 --- a/packages/kilo-docs/pages/contributing/index.md +++ b/packages/kilo-docs/pages/contributing/index.md @@ -6,7 +6,7 @@ description: "Contribute to Kilo Code" # Contributing Overview {% callout type="info" %} -**New versions of the VS Code extension and CLI are being developed in [Kilo-Org/Kilo](https://github.com/Kilo-Org/Kilo)** (extension at `packages/kilo-vscode`, CLI at `packages/opencode`). If you're looking to contribute to the extension or CLI, please head over to that repository. +**New versions of the VS Code extension and CLI are being developed in [Kilo-Org/kilocode](https://github.com/Kilo-Org/kilocode)** (extension at `packages/kilo-vscode`, CLI at `packages/opencode`). If you're looking to contribute to the extension or CLI, please head over to that repository. {% /callout %} Kilo Code is an open-source project that welcomes contributions from developers of all skill levels. This guide will help you get started with contributing to Kilo Code, whether you're fixing bugs, adding features, improving documentation, or sharing custom modes. diff --git a/script/upstream/transforms/transform-take-theirs.ts b/script/upstream/transforms/transform-take-theirs.ts index 0420d5074f3..0fd39f9c41a 100644 --- a/script/upstream/transforms/transform-take-theirs.ts +++ b/script/upstream/transforms/transform-take-theirs.ts @@ -45,7 +45,7 @@ const BRANDING_REPLACEMENTS: BrandingReplacement[] = [ }, { pattern: /anomalyco\/opencode/g, - replacement: "Kilo-Org/kilo", + replacement: "Kilo-Org/kilocode", description: "GitHub repo reference", }, From 598a2656b7b2f68b7c15c5bb55d5f21b971ded06 Mon Sep 17 00:00:00 2001 From: Mark IJbema Date: Mon, 30 Mar 2026 16:07:56 +0200 Subject: [PATCH 48/81] fix(vscode): track leading-edge FIM requests as pending to enable reuse The leading-edge (first) call in debouncedFetchAndCacheSuggestion was not added to pendingRequests, making it invisible to findCoveringPendingRequest. When a user typed quickly while a leading-edge FIM request was still in-flight, subsequent calls could not reuse it and would create new debounced requests instead. Now the leading-edge request is tracked with a .finally() cleanup, so subsequent keystrokes that extend the prefix can piggyback on the in-flight request instead of issuing a redundant FIM call. --- .../AutocompleteInlineCompletionProvider.ts | 12 ++++- ...tocompleteInlineCompletionProvider.test.ts | 51 +++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteInlineCompletionProvider.ts b/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteInlineCompletionProvider.ts index 73fe0cdf10c..3783decc361 100644 --- a/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteInlineCompletionProvider.ts +++ b/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteInlineCompletionProvider.ts @@ -500,9 +500,19 @@ export class AutocompleteInlineCompletionProvider implements vscode.InlineComple } // If this is the first call (no pending debounce), execute immediately + // but still track it as a pending request so subsequent calls can reuse it if (this.isFirstCall && this.debounceTimer === null) { this.isFirstCall = false - return this.fetchAndCacheSuggestion(prompt, prefix, suffix, languageId) + const leading: PendingRequest = { + prefix, + suffix, + promise: null!, + } + leading.promise = this.fetchAndCacheSuggestion(prompt, prefix, suffix, languageId).finally(() => { + this.removePendingRequest(leading) + }) + this.pendingRequests.push(leading) + return leading.promise } // Clear any existing timer (reset the debounce) diff --git a/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/__tests__/AutocompleteInlineCompletionProvider.test.ts b/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/__tests__/AutocompleteInlineCompletionProvider.test.ts index 77a9297f640..65d709f7232 100644 --- a/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/__tests__/AutocompleteInlineCompletionProvider.test.ts +++ b/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/__tests__/AutocompleteInlineCompletionProvider.test.ts @@ -1973,6 +1973,57 @@ describe("AutocompleteInlineCompletionProvider", () => { expect(callCount).toBe(1) }) + it("should reuse slow leading-edge request when user types forward before it completes", async () => { + // Mock the model with a slow response that takes 500ms + let callCount = 0 + let resolvers: Array<() => void> = [] + vi.mocked(mockModel.generateFimResponse).mockImplementation(async (_prefix, _suffix, onChunk) => { + callCount++ + // Simulate a slow FIM response — wait for manual resolution + await new Promise((resolve) => { + resolvers.push(resolve) + }) + if (onChunk) { + onChunk("console.log('test');") + } + return { + cost: 0.01, + inputTokens: 100, + outputTokens: 50, + cacheWriteTokens: 0, + cacheReadTokens: 0, + } + }) + + // First request: leading edge fires immediately for "const x = 1" + const doc1 = new MockTextDocument(vscode.Uri.file("/test.ts"), "const x = 1\nconst y = 2") + const pos1 = new vscode.Position(0, 11) + const promise1 = provider.provideInlineCompletionItems(doc1, pos1, mockContext, mockToken) + + // Leading edge should have started the request immediately + expect(callCount).toBe(1) + + // User types "c" while the leading-edge request is still in-flight + const doc2 = new MockTextDocument(vscode.Uri.file("/test.ts"), "const x = 1c\nconst y = 2") + const pos2 = new vscode.Position(0, 12) + const promise2 = provider.provideInlineCompletionItems(doc2, pos2, mockContext, mockToken) + + // The second request should NOT have triggered a new FIM call — + // it should reuse the leading-edge pending request since the prefix + // extends and the suffix is unchanged + expect(callCount).toBe(1) + + // Now resolve the FIM response + resolvers[0]() + await vi.advanceTimersByTimeAsync(500) + + await promise1 + await promise2 + + // Only one FIM request should have been made total + expect(callCount).toBe(1) + }) + it("should NOT reuse pending request when suffix changes", async () => { // Mock the model to track call count let callCount = 0 From 6a6372f100e7fcb42ef498ecc34cbc7a4b29eaf5 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 13:59:09 +0000 Subject: [PATCH 49/81] docs: add Secondary Side Bar tip to VSCode tab in chat-interface --- .../kilo-docs/pages/code-with-ai/agents/chat-interface.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/kilo-docs/pages/code-with-ai/agents/chat-interface.md b/packages/kilo-docs/pages/code-with-ai/agents/chat-interface.md index 490a1aa978b..7ae2bc19c1d 100644 --- a/packages/kilo-docs/pages/code-with-ai/agents/chat-interface.md +++ b/packages/kilo-docs/pages/code-with-ai/agents/chat-interface.md @@ -188,6 +188,12 @@ This feature streamlines the interaction when Kilo Code requires clarification, **Pop out to an editor tab.** If the sidebar feels cramped, pop the chat into a full editor tab for more room. {% /callout %} +{% callout type="tip" %} +**Move Kilo Code to the Secondary Side Bar** for a better layout. Right-click on the Kilo Code icon in the Activity Bar and select **Move To → Secondary Side Bar**. This lets you see the Explorer, Search, Source Control, etc. alongside Kilo Code. + +{% image src="/docs/img/move-to-secondary.png" alt="Move to Secondary Side Bar" width="600" caption="Move Kilo Code to the Secondary Side Bar for better workspace organization" /%} +{% /callout %} + {% /tab %} {% tab label="CLI" %} From 81222b1474bf845402ecc4878cbc896646d3c02d Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 30 Mar 2026 16:10:00 +0200 Subject: [PATCH 50/81] fix(vscode): enable sub-agent open-in-tab button in Agent Manager (#7937) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The button was hidden in the Agent Manager since the feature was new. The message routing already works — AgentManagerProvider passes openSubAgentViewer through to KiloProvider which opens the panel. --- .../webview-ui/src/components/chat/TaskToolExpanded.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/kilo-vscode/webview-ui/src/components/chat/TaskToolExpanded.tsx b/packages/kilo-vscode/webview-ui/src/components/chat/TaskToolExpanded.tsx index 1ac0d388f64..e9cfd8b3078 100644 --- a/packages/kilo-vscode/webview-ui/src/components/chat/TaskToolExpanded.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/chat/TaskToolExpanded.tsx @@ -17,7 +17,6 @@ import { useI18n } from "@kilocode/kilo-ui/context/i18n" import { createAutoScroll } from "@kilocode/kilo-ui/hooks" import { useSession } from "../../context/session" import { useVSCode } from "../../context/vscode" -import { useWorktreeMode } from "../../context/worktree-mode" import type { ToolPart, Message as SDKMessage } from "@kilocode/sdk/v2" /** Collect all tool parts from all assistant messages in a given session. */ @@ -41,9 +40,6 @@ const TaskToolRenderer: Component = (props) => { const i18n = useI18n() const session = useSession() const vscode = useVSCode() - const worktreeMode = useWorktreeMode() - // Hide the open-in-tab button inside the Agent Manager - const inAgentManager = worktreeMode !== undefined const childSessionId = () => props.metadata.sessionId as string | undefined @@ -97,7 +93,7 @@ const TaskToolRenderer: Component = (props) => {
- + Date: Mon, 30 Mar 2026 14:11:04 +0000 Subject: [PATCH 51/81] fix(kilo-docs): fix broken kiloclaw links for pricing and version-pinning --- packages/kilo-docs/pages/kiloclaw/dashboard.md | 4 ++-- packages/kilo-docs/pages/kiloclaw/overview.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/kilo-docs/pages/kiloclaw/dashboard.md b/packages/kilo-docs/pages/kiloclaw/dashboard.md index 9e75225fdd0..ae04957539f 100644 --- a/packages/kilo-docs/pages/kiloclaw/dashboard.md +++ b/packages/kilo-docs/pages/kiloclaw/dashboard.md @@ -100,7 +100,7 @@ You can pin your instance to a specific OpenClaw version and variant from the Se Select a version and variant from the dropdowns and click **Save**. To return to automatic updates, clear the version pin and save. -See [Version Pinning](/docs/kiloclaw/version-pinning) for details. +See [Version Pinning](/docs/kiloclaw/control-ui/version-pinning) for details. ### Version Status Indicators @@ -199,4 +199,4 @@ These are the beta specifications for machines and subject to change without not - [OpenClaw Control UI](/docs/kiloclaw/control-ui) - [Connecting Chat Platforms](/docs/kiloclaw/chat-platforms) - [Troubleshooting](/docs/kiloclaw/troubleshooting) -- [KiloClaw Pricing](/docs/kiloclaw/pricing) +- [KiloClaw Pricing](/docs/kiloclaw/faq/pricing) diff --git a/packages/kilo-docs/pages/kiloclaw/overview.md b/packages/kilo-docs/pages/kiloclaw/overview.md index 713fa0e6cb3..40624dd2f6c 100644 --- a/packages/kilo-docs/pages/kiloclaw/overview.md +++ b/packages/kilo-docs/pages/kiloclaw/overview.md @@ -96,7 +96,7 @@ For more information on use cases: - [Dashboard Reference](/docs/kiloclaw/dashboard) - [Connecting Chat Platforms](/docs/kiloclaw/chat-platforms) - [Troubleshooting](/docs/kiloclaw/troubleshooting) -- [KiloClaw Pricing](/docs/kiloclaw/pricing) +- [KiloClaw Pricing](/docs/kiloclaw/faq/pricing) - [Gateway Usage and Billing](/docs/gateway/usage-and-billing) - [Agent Manager](/docs/automate/agent-manager) - [OpenClaw Documentation](https://docs.openclaw.ai) From bfb80d1918484ef61401d89996522d91c0e14f81 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 14:16:34 +0000 Subject: [PATCH 52/81] docs: update legacy-only pages with VSCode/VSCode (Legacy) tabs for new CLI extension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds VSCode tabs to 10 documentation pages that previously described only the legacy extension's behaviour. Each affected page now uses the same VSCode / VSCode (Legacy) tab pattern used elsewhere in the docs. Pages updated: - automate/how-tools-work: new tool names (read/glob/grep/edit/bash/task…) - automate/tools/index: new tool groups and names for the CLI-based extension - automate/mcp/using-in-kilo-code: new config format (opencode.json mcp key) - customize/custom-rules: new instructions[] config, .kilo/ directories - customize/custom-modes: new agent Markdown file format in .kilo/agents/ - customize/custom-instructions: config-file based instructions, no Modes Tab - customize/workflows: slash commands in .kilo/commands/, /name syntax - code-with-ai/features/checkpoints: snapshot: true config, revert UI - automate/agent-manager: full new Agent Manager feature set documented - getting-started/settings: fix Experimental tab (extension does expose toggles) Closes #7938 --- .../kilo-docs/pages/automate/agent-manager.md | 111 ++++++++++- .../pages/automate/how-tools-work.md | 84 +++++++++ .../pages/automate/mcp/using-in-kilo-code.md | 176 +++++++++++++++++- .../kilo-docs/pages/automate/tools/index.md | 76 ++++++++ .../code-with-ai/features/checkpoints.md | 89 +++++++-- .../pages/customize/custom-instructions.md | 50 +++++ .../kilo-docs/pages/customize/custom-modes.md | 65 ++++++- .../kilo-docs/pages/customize/custom-rules.md | 118 ++++++++++-- .../kilo-docs/pages/customize/workflows.md | 95 +++++++++- .../pages/getting-started/settings/index.md | 25 ++- 10 files changed, 847 insertions(+), 42 deletions(-) diff --git a/packages/kilo-docs/pages/automate/agent-manager.md b/packages/kilo-docs/pages/automate/agent-manager.md index 5f47025343d..17162a67172 100644 --- a/packages/kilo-docs/pages/automate/agent-manager.md +++ b/packages/kilo-docs/pages/automate/agent-manager.md @@ -5,6 +5,108 @@ description: "Manage and orchestrate multiple AI agents" # Agent Manager +The Agent Manager is a control panel for running and orchestrating multiple Kilo Code agents, with support for parallel worktree-isolated sessions. + +{% tabs %} +{% tab label="VSCode" %} + +The Agent Manager is a **full-panel editor tab** built directly into the extension. All sessions share the single `kilo serve` backend process. It supports: + +- Multiple parallel sessions, each in its own git worktree +- A diff/review panel showing changes vs. the parent branch +- Dedicated VS Code integrated terminals per session +- Setup scripts and `.env` auto-copy on worktree creation +- Session import from existing branches, external worktrees, or GitHub PR URLs +- "Continue in Worktree" to promote a sidebar session to the Agent Manager + +## Opening the Agent Manager + +- Keyboard shortcut: `Cmd+Shift+M` (macOS) / `Ctrl+Shift+M` (Windows/Linux) +- Command Palette: "Kilo Code: Open Agent Manager" +- Click the Agent Manager icon in the sidebar toolbar + +The panel opens as an editor tab and stays active across focus changes. + +## Working with Worktrees + +Each Agent Manager session runs in an isolated git worktree on a separate branch, keeping your main branch clean. + +### Creating a New Worktree Session + +1. Click **New Worktree** or press `Cmd+Shift+W` to create a new worktree +2. Enter a branch name (or let Kilo generate one) +3. Type your first message to start the agent + +A new git worktree is created from your current branch. The agent works in isolation — your main branch is unaffected. + +### Multi-Version Mode + +You can run up to 4 parallel implementations of the same prompt across separate worktrees: + +1. Click the multi-version button and enter a prompt +2. Optionally assign different models to each version +3. Kilo creates one worktree + session per version and runs them in parallel + +### Importing Existing Work + +- **From a branch:** Import an existing git branch as a worktree +- **From a GitHub PR URL:** Paste a PR URL to import it as a worktree +- **From an external worktree:** Import a worktree that already exists on disk +- **Continue in Worktree:** From the sidebar chat, promote the current session to a new Agent Manager worktree + +## Sending Messages, Approvals, and Control + +- **Continue the conversation:** Send a follow-up message to the running agent +- **Approvals:** The Permission Dock shows tool approval prompts — approve once, approve always, or deny +- **Cancel:** Sends a cooperative stop signal to the agent +- **Stop:** Force-terminates the session and marks it as stopped + +## Diff / Review Panel + +Press `Cmd+Alt+D` to toggle the diff panel. It shows a live-updating diff between the worktree and its parent branch. + +- Select files and click **Apply to Main Branch** to merge changes +- Conflicts are surfaced with a resolution dialog +- Supports unified and split diff views + +## Terminals + +Each session has a dedicated integrated terminal. Press `Cmd+Alt+T` to focus the terminal for the active session. + +## Setup Scripts + +Place an executable script at `.kilo/setup-script` in your project root. It runs automatically whenever a new worktree is created (useful for `npm install`, env setup, etc.). `.env` files are also auto-copied from the main repo. + +## Session State and Persistence + +Agent Manager state is persisted in `.kilo/agent-manager.json`. Sessions, worktrees, and their order are restored on reload. + +## Keyboard Shortcuts (Agent Manager Panel) + +| Shortcut | Action | +| ----------------- | --------------------------------- | +| `Cmd+Shift+M` | Open Agent Manager | +| `Cmd+Shift+W` | New worktree | +| `Cmd+Shift+O` | Import/open worktree | +| `Cmd+Shift+X` | Close current worktree | +| `Cmd+N` | New tab (session) in worktree | +| `Cmd+W` | Close current tab | +| `Cmd+Alt+[` / `]` | Previous / next worktree | +| `Cmd+Alt+,` / `.` | Previous / next tab in worktree | +| `Cmd+Alt+T` | Show terminal for current session | +| `Cmd+Alt+D` | Toggle diff panel | +| `Cmd+Alt+?` | Show keyboard shortcuts | +| `Cmd+1` … `Cmd+9` | Jump to worktree/session by index | + +## Troubleshooting + +- **"Please open a folder…" error** — 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 +- **Worktree creation fails** — ensure Git is installed and the workspace is a valid git repository + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + The Agent Manager is a dedicated control panel for running and supervising Kilo Code agents as interactive CLI processes. It supports: - Local sessions @@ -22,7 +124,7 @@ This page reflects the actual implementation in the extension. ## Opening the Agent Manager -- Command Palette: “Kilo Code: Open Agent Manager” +- Command Palette: "Kilo Code: Open Agent Manager" - Or use the title/menu entry if available in your Kilo Code UI The panel opens as a webview and stays active across focus changes. @@ -34,13 +136,13 @@ The panel opens as a webview and stays active across focus changes. - 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” + - Stop force-terminates the underlying CLI process, updating status to "stopped" ## Resuming an existing session You can continue a session later (local or remote): -- If a session is not currently running, the Agent Manager will spawn a new CLI process attached to that session’s ID +- If a session is not currently running, the Agent Manager will spawn a new CLI process attached to that session's ID - Labels from the original session are preserved whenever possible - Your first follow-up message becomes the continuation input @@ -144,6 +246,9 @@ Message transcripts are fetched from a signed blob and exclude internal checkpoi - Verify you're logged in via extension settings or using CLI with kilocode provider - BYOK configurations do not support Agent Manager authentication +{% /tab %} +{% /tabs %} + ## Related features - [Sessions](/docs/collaborate/sessions-sharing) diff --git a/packages/kilo-docs/pages/automate/how-tools-work.md b/packages/kilo-docs/pages/automate/how-tools-work.md index ea7d88abe47..6cc0d01be56 100644 --- a/packages/kilo-docs/pages/automate/how-tools-work.md +++ b/packages/kilo-docs/pages/automate/how-tools-work.md @@ -18,6 +18,20 @@ Describe what you want to accomplish in natural language, and Kilo Code will: ## Tool Categories +{% tabs %} +{% tab label="VSCode" %} + +| Category | Purpose | Tool Names | +| :------- | :----------------------------------------- | :----------------------------------------------------------- | +| Read | Access file content and code structure | `read`, `glob`, `grep` | +| Edit | Create or modify files and code | `edit`, `multiedit`, `write`, `apply_patch` | +| Execute | Run commands and perform system operations | `bash` | +| Web | Fetch and search web content | `webfetch`, `websearch`, `codesearch` | +| Workflow | Manage task flow and sub-agents | `question`, `task`, `todowrite`, `todoread`, `plan`, `skill` | + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + | Category | Purpose | Tool Names | | :------- | :----------------------------------------- | :----------------------------------------------------------------------- | | Read | Access file content and code structure | `read_file`, `search_files`, `list_files`, `list_code_definition_names` | @@ -26,10 +40,29 @@ Describe what you want to accomplish in natural language, and Kilo Code will: | Browser | Interact with web content | `browser_action` | | Workflow | Manage task flow and context | `ask_followup_question`, `attempt_completion`, `switch_mode`, `new_task` | +{% /tab %} +{% /tabs %} + ## Example: Using Tools Here's how a typical tool interaction works: +{% tabs %} +{% tab label="VSCode" %} + +{% callout type="info" title="Tool Approval UI" %} +When a tool is proposed, you'll see an approval prompt in the **Permission Dock** at the bottom of the chat. You can approve once, approve always (saves to config), or deny. +{% /callout %} + +**User:** Create a file named `greeting.js` that logs a greeting message + +**Kilo Code:** (Proposes the `write` tool) + +The extension shows the file path and proposed content for review. Click **Approve** to execute or **Deny** to cancel. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + {% callout type="info" title="Tool Approval UI" %} When a tool is proposed, you'll see Save and Reject buttons along with an optional Auto-approve checkbox for trusted operations. {% /callout %} @@ -56,8 +89,27 @@ greet('World'); **Kilo Code:** (Confirms file creation) +{% /tab %} +{% /tabs %} + ## Tool Safety and Approval +{% tabs %} +{% tab label="VSCode" %} + +Every tool use requires your explicit approval via the **Permission Dock** floating UI in the chat panel. For each tool call you can: + +- **Approve** — execute the tool once +- **Approve Always** — add this tool/pattern to your config so future calls are auto-approved +- **Deny** — decline the proposed tool call + +You can also toggle **Auto-approve** for all tools for the current session using `Ctrl+Alt+A` / `Cmd+Alt+A`. + +This safety mechanism ensures you maintain control over which files are modified, what commands are executed, and how your codebase is changed. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + Every tool use requires your explicit approval. When Kilo proposes a tool, you'll see: - A "Save" button to approve and execute the tool @@ -66,8 +118,37 @@ Every tool use requires your explicit approval. When Kilo proposes a tool, you'l This safety mechanism ensures you maintain control over which files are modified, what commands are executed, and how your codebase is changed. Always review tool proposals carefully before saving them. +{% /tab %} +{% /tabs %} + ## Core Tools Reference +{% tabs %} +{% tab label="VSCode" %} + +| Tool Name | Description | Category | +| :------------ | :----------------------------------------------------- | :------- | +| `read` | Reads file contents with line numbers | Read | +| `glob` | Finds files by glob pattern | Read | +| `grep` | Searches file contents with regex | Read | +| `edit` | Makes precise text replacements in a file | Edit | +| `multiedit` | Multiple edits in a single call | Edit | +| `write` | Creates new files or overwrites existing ones | Edit | +| `apply_patch` | Applies unified diffs (used with certain models) | Edit | +| `bash` | Runs shell commands | Execute | +| `webfetch` | Fetches a URL | Web | +| `websearch` | Searches the web (Kilo/OpenRouter users) | Web | +| `codesearch` | Semantic code search (Kilo/OpenRouter users) | Web | +| `question` | Asks you a clarifying question with selectable options | Workflow | +| `task` | Spawns a sub-agent session | Workflow | +| `todowrite` | Creates and updates a session TODO list | Workflow | +| `todoread` | Reads the current session TODO list | Workflow | +| `plan` | Enters structured planning mode | Workflow | +| `skill` | Invokes a reusable skill (Markdown instruction module) | Workflow | + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + | Tool Name | Description | Category | | :--------------------------- | :-------------------------------------------------- | :------- | | `read_file` | Reads the content of a file with line numbers | Read | @@ -84,6 +165,9 @@ This safety mechanism ensures you maintain control over which files are modified | `switch_mode` | Changes to a different operational mode | Workflow | | `new_task` | Creates a new subtask with a specific starting mode | Workflow | +{% /tab %} +{% /tabs %} + ## Learn More About Tools For more detailed information about each tool, including complete parameter references and advanced usage patterns, see the [Tool Use Overview](/docs/automate/tools) documentation. diff --git a/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md b/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md index 43dd907c755..219fc8cc364 100644 --- a/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md +++ b/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md @@ -11,10 +11,75 @@ Model Context Protocol (MCP) extends Kilo Code's capabilities by connecting to e ## Configuring MCP Servers +{% tabs %} +{% tab label="VSCode" %} + +MCP server configurations are stored inside the main Kilo config file. There are two levels: + +1. **Global Configuration**: `~/.config/kilo/opencode.json` — applies to all projects. +2. **Project-level Configuration**: `kilo.json` or `.kilo/kilo.jsonc` in your project root. + +**Precedence**: Project-level configuration takes precedence over global configuration. + +### Editing MCP Settings + +You can edit MCP settings from the Kilo Code settings UI: + +1. Click the {% codicon name="gear" /%} icon in the sidebar toolbar to open Settings. +2. Click the `Agent Behaviour` tab on the left side. +3. Select the `MCP Servers` sub-tab. + +From here you can add, edit, enable/disable, and delete MCP servers. Changes are written directly to the appropriate config file. + +### Config Format + +MCP servers are configured under the `mcp` key in `opencode.json` / `kilo.jsonc`: + +**Local (STDIO) server:** + +```json +{ + "mcp": { + "my-local-server": { + "type": "local", + "command": ["node", "/path/to/server.js"], + "environment": { + "API_KEY": "your_api_key" + }, + "enabled": true, + "timeout": 10000 + } + } +} +``` + +**Remote (HTTP/SSE) server:** + +```json +{ + "mcp": { + "my-remote-server": { + "type": "remote", + "url": "https://your-server-url.com/mcp", + "headers": { + "Authorization": "Bearer your-token" + }, + "enabled": true, + "timeout": 15000 + } + } +} +``` + +Remote servers support OAuth 2.0 authentication. If the server supports it, Kilo Code will automatically start the OAuth flow when you connect. You can also disable OAuth with `"oauth": false`. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + MCP server configurations can be managed at two levels: -1. **Global Configuration**: Stored in the `mcp_settings.json` file, accessible via VS Code settings (see below). These settings apply across all your workspaces unless overridden by a project-level configuration. -2. **Project-level Configuration**: Defined in a `.kilocode/mcp.json` file within your project's root directory. This allows you to set up project-specific servers and share configurations with your team by committing the file to version control. Kilo Code automatically detects and loads this file if it exists. +1. **Global Configuration**: Stored in the `mcp_settings.json` file, accessible via VS Code settings (see below). These settings apply across all your workspaces unless overridden by a project-level configuration. +2. **Project-level Configuration**: Defined in a `.kilocode/mcp.json` file within your project's root directory. This allows you to set up project-specific servers and share configurations with your team by committing the file to version control. Kilo Code automatically detects and loads this file if it exists. **Precedence**: If a server name exists in both global and project configurations, the **project-level configuration takes precedence**. @@ -51,7 +116,39 @@ Both files use a JSON format with a `mcpServers` object containing named server _Example of MCP Server config in Kilo Code (STDIO Transport)_ -### Understanding Transport Types +{% /tab %} +{% /tabs %} + +## Understanding Transport Types + +{% tabs %} +{% tab label="VSCode" %} + +MCP supports two transport types: + +#### Local (STDIO) Transport + +Used for servers running on your machine as a child process: + +- Communicates via standard input/output streams +- Lower latency (no network overhead) +- Better security (no network exposure) + +#### Remote (HTTP/SSE) Transport + +Used for servers accessed over HTTP/HTTPS: + +- Can be hosted on a different machine +- Supports multiple client connections +- Requires network access +- Supports OAuth 2.0 authentication + +Kilo Code tries `StreamableHTTP` first, then falls back to `SSE` transport automatically for remote servers. + +For more details, see [STDIO & SSE Transports](server-transports). + +{% /tab %} +{% tab label="VSCode (Legacy)" %} MCP supports three transport types for server communication: @@ -143,6 +240,9 @@ SSE configuration example: } ``` +{% /tab %} +{% /tabs %} + ### Deleting a Server 1. Press the {% codicon name="trash" /%} next to the MCP server you would like to delete @@ -160,14 +260,43 @@ SSE configuration example: ### Network Timeout +{% tabs %} +{% tab label="VSCode" %} + +Set the `timeout` field (in milliseconds) in the server's config entry. The default is 10 seconds for local servers and 15 seconds for remote servers. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + To set the maximum time to wait for a response after a tool call to the MCP server: 1. Click the `Network Timeout` pulldown at the bottom of the individual MCP server's config box and change the time. Default is 1 minute but it can be set between 30 seconds and 5 minutes. {% image src="/docs/img/using-mcp-in-kilo-code/using-mcp-in-kilo-code-6.png" alt="Network Timeout pulldown" width="400" caption="Network Timeout pulldown" /%} +{% /tab %} +{% /tabs %} + ### Auto Approve Tools +{% tabs %} +{% tab label="VSCode" %} + +Tool permissions in the new extension are managed through the permission system. In your config file, set a tool's permission to `"allow"` to auto-approve it: + +```json +{ + "permission": { + "bash": "allow" + } +} +``` + +You can also approve individual MCP tool calls as "always allow" directly from the Permission Dock in the chat UI. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + MCP tool auto-approval works on a per-tool basis and is disabled by default. To configure auto-approval: 1. First enable the global "Use MCP servers" auto-approval option in [auto-approving-actions](/docs/getting-started/settings/auto-approving-actions) @@ -178,10 +307,14 @@ MCP tool auto-approval works on a per-tool basis and is disabled by default. To When enabled, Kilo Code will automatically approve this specific tool without prompting. Note that the global "Use MCP servers" setting takes precedence - if it's disabled, no MCP tools will be auto-approved. +{% /tab %} +{% /tabs %} + ## Finding and Installing MCP Servers Kilo Code does not come with any pre-installed MCP servers. You'll need to find and install them separately. +- **Kilo Marketplace:** Browse and install MCP servers directly from the Marketplace tab in the extension sidebar - **Community Repositories:** Check for community-maintained lists of MCP servers on GitHub - **Ask Kilo Code:** You can ask Kilo Code to help you find or even create MCP servers - **Build Your Own:** Create custom MCP servers using the SDK to extend Kilo Code with your own tools @@ -202,11 +335,25 @@ Example: "Analyze the performance of my API" might use an MCP tool that tests AP Common issues and solutions: +{% tabs %} +{% tab label="VSCode" %} + +- **Server Not Responding:** Check if the server process is running and verify network connectivity. Review server status in Settings > Agent Behaviour > MCP Servers. +- **`needs_auth` status:** For remote servers with OAuth, the extension will show a notification to start the auth flow. Click it to authenticate. +- **`failed` status:** Check the CLI output for error details. Ensure commands and paths are correct. +- **Tool Not Available:** Confirm the server is properly implementing the tool and it's not disabled in settings. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + - **Server Not Responding:** Check if the server process is running and verify network connectivity - **Permission Errors:** Ensure proper API keys and credentials are configured in your `mcp_settings.json` (for global settings) or `.kilocode/mcp.json` (for project settings). - **Tool Not Available:** Confirm the server is properly implementing the tool and it's not disabled in settings - **Slow Performance:** Try adjusting the network timeout value for the specific MCP server +{% /tab %} +{% /tabs %} + {% callout type="tip" %} **Reduce system prompt size:** If you're not using MCP, turn it off in Settings > Agent Behaviour > MCP Servers to significantly cut down the size of the system prompt and improve performance. {% /callout %} @@ -215,6 +362,26 @@ Common issues and solutions: ### Windows Configuration Example +{% tabs %} +{% tab label="VSCode" %} + +When setting up local MCP servers on Windows, use the full `cmd` invocation in the `command` array: + +```json +{ + "mcp": { + "puppeteer": { + "type": "local", + "command": ["cmd", "/c", "npx", "-y", "@modelcontextprotocol/server-puppeteer"], + "enabled": true + } + } +} +``` + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + When setting up MCP servers on Windows, you'll need to use the Windows Command Prompt (`cmd`) to execute commands. Here's an example of configuring a Puppeteer MCP server on Windows: ```json @@ -252,4 +419,7 @@ For macOS or Linux, you would use a different configuration: {% /callout %} +{% /tab %} +{% /tabs %} + The same approach can be used for other MCP servers on Windows, adjusting the package name as needed for different server types. diff --git a/packages/kilo-docs/pages/automate/tools/index.md b/packages/kilo-docs/pages/automate/tools/index.md index ac473fefdc0..4a441515cc9 100644 --- a/packages/kilo-docs/pages/automate/tools/index.md +++ b/packages/kilo-docs/pages/automate/tools/index.md @@ -11,6 +11,79 @@ Kilo Code implements a sophisticated tool system that allows AI models to intera ### Tool Groups +{% tabs %} +{% tab label="VSCode" %} + +Tools are organized into logical groups based on their functionality: + +| Category | Purpose | Tools | Common Use | +| ------------------ | --------------------------------- | ------------------------------------------------------------ | --------------------------------------- | +| **Read Group** | File system reading and searching | `read`, `glob`, `grep` | Code exploration and analysis | +| **Edit Group** | File system modifications | `edit`, `multiedit`, `write`, `apply_patch` | Code changes and file manipulation | +| **Execute Group** | Shell command execution | `bash` | Running scripts, building projects | +| **Web Group** | Fetch and search web content | `webfetch`, `websearch`, `codesearch` | Research, documentation lookup | +| **MCP Group** | External tool integration | MCP server tools (namespaced as `{server}_{tool}`) | Specialized functionality via MCP | +| **Workflow Group** | Sub-agents and task management | `question`, `task`, `todowrite`, `todoread`, `plan`, `skill` | Context switching and task organization | + +### Always Available Tools + +Certain tools are accessible regardless of the current agent: + +- `question`: Ask the user a clarifying question with selectable options +- `task`: Spawn a sub-agent session +- `todowrite` / `todoread`: Manage session task lists + +## Available Tools + +### Read Tools + +These tools help Kilo Code understand your code and project: + +- `read` - Reads file contents with line numbers +- `glob` - Finds files matching a glob pattern +- `grep` - Searches file contents with regex + +### Edit Tools + +These tools help Kilo Code make changes to your code: + +- `edit` - Makes precise text replacements in a file +- `multiedit` - Multiple edits in a single call +- `write` - Creates new files or fully overwrites existing ones +- `apply_patch` - Applies unified diffs (used with certain models) + +### Execute Tools + +These tools help Kilo Code run commands: + +- `bash` - Runs shell commands with configurable timeout and working directory + +### Web Tools + +These tools help Kilo Code access web content: + +- `webfetch` - Fetches a URL and returns the content +- `websearch` - Searches the web (available to Kilo/OpenRouter users) +- `codesearch` - Semantic code search (available to Kilo/OpenRouter users) + +### MCP Tools + +MCP server tools are automatically available when an MCP server is connected. Tool names are namespaced as `{server}_{tool}`. See [MCP Overview](/docs/automate/mcp/overview) for details. + +### Workflow Tools + +These tools help manage the conversation and task flow: + +- `question` - Asks you a clarifying question with selectable options +- `task` - Spawns a sub-agent (child session) +- `todowrite` - Creates and updates a session TODO list +- `todoread` - Reads the current session TODO list +- `plan` - Enters structured planning mode +- `skill` - Invokes a reusable skill (Markdown instruction module) + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + Tools are organized into logical groups based on their functionality: | Category | Purpose | Tools | Common Use | @@ -80,6 +153,9 @@ These tools help manage the conversation and task flow: - [new_task](/docs/automate/tools/new-task) - Creates a new subtask - [update_todo_list](/docs/automate/tools/update-todo-list) - Tracks task progress with step-by-step checklists +{% /tab %} +{% /tabs %} + ## Tool Calling Mechanism ### When Tools Are Called diff --git a/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md b/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md index 377f9dc108e..ed6747482a7 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md +++ b/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md @@ -14,6 +14,52 @@ Checkpoints let you: - Compare different implementation approaches - Revert to previous project states without losing work +## Configuration Options + +{% tabs %} +{% tab label="VSCode" %} + +Checkpoints (called **snapshots** in the new extension) are configured via the `snapshot` key in your config file (`kilo.json` or `~/.config/kilo/opencode.json`): + +```json +{ + "snapshot": true +} +``` + +You can also toggle this in Settings: + +1. Open Settings by clicking the gear icon {% codicon name="gear" /%} +2. Go to the `Checkpoints` tab +3. Toggle the snapshot setting + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + +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" /%} + +{% /tab %} +{% /tabs %} + +## How Checkpoints Work + +{% tabs %} +{% tab label="VSCode" %} + +The new extension uses **git-based snapshots** of your working directory. Snapshots are taken before and after agent edits. They integrate with your existing Git repository — no separate shadow repository is created. + +**Reverting changes:** + +You can revert any message's changes from the chat. A **Revert Banner** appears at the top of the chat when the session is in a reverted state, making it clear that you are viewing an earlier state. Use the banner to unrevert and return to the latest state. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + {% callout type="info" title="Important Notes" %} - **Checkpoints are enabled by default.** @@ -25,17 +71,6 @@ Checkpoints let you: {% /callout %} -## Configuration Options - -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" /%} - -## How Checkpoints Work - Kilo Code captures snapshots of your project's state using a shadow Git repository, separate from your main version control system. These snapshots, called checkpoints, automatically record changes throughout your AI-assisted workflow—whenever tasks begin, files change, or commands run. Checkpoints are stored as Git commits in the shadow repository, capturing: @@ -46,8 +81,24 @@ Checkpoints are stored as Git commits in the shadow repository, capturing: - Renamed files - Binary file changes +{% /tab %} +{% /tabs %} + ## Working with Checkpoints +{% tabs %} +{% tab label="VSCode" %} + +Checkpoints are integrated directly into your workflow through the chat interface. Each message that caused file changes shows a diff summary. You can: + +- Click the diff badge on a message to open the **Diff Viewer** and review what changed +- Click **Revert** on any message to restore the workspace to its state before that message + +A **Revert Banner** is shown at the top of the chat whenever you are in a reverted state, with an option to return to the current state. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + Checkpoints are integrated directly into your workflow through the chat interface. Checkpoints appear directly in your chat history in two forms: @@ -93,6 +144,9 @@ To restore a project to a previous checkpoint state: {% image src="/docs/img/checkpoints/checkpoints-9.png" alt="Confirmation dialog for restoring checkpoint with files & task" width="300" /%} +{% /tab %} +{% /tabs %} + ### Limitations and Considerations - **Scope**: Checkpoints only capture changes made during active Kilo Code tasks @@ -102,6 +156,14 @@ To restore a project to a previous checkpoint state: ## Technical Implementation +{% tabs %} +{% tab label="VSCode" %} + +The new extension uses the underlying Git repository in your workspace to create snapshot commits. No shadow repository is used. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + ### Checkpoint Architecture The checkpoint system consists of: @@ -183,9 +245,12 @@ Checkpoints do not support nested Git repositories. The working directory must b Operations are queued to prevent concurrent Git operations that might corrupt repository state. This ensures that rapid checkpoint operations complete safely even when requested in quick succession. +{% /tab %} +{% /tabs %} + ## Git Installation -Checkpoints require Git to be installed on your system. The implementation uses the `simple-git` library, which relies on Git command-line tools to create and manage shadow repositories. +Checkpoints require Git to be installed on your system. ### macOS diff --git a/packages/kilo-docs/pages/customize/custom-instructions.md b/packages/kilo-docs/pages/customize/custom-instructions.md index b7ea7b7d8fb..a0b80d5b312 100644 --- a/packages/kilo-docs/pages/customize/custom-instructions.md +++ b/packages/kilo-docs/pages/customize/custom-instructions.md @@ -17,6 +17,40 @@ Custom Instructions are IDE-wide and are applied across all workspaces and maint ## Setting Custom Instructions +{% tabs %} +{% tab label="VSCode" %} + +In the new extension, global and agent-specific instructions are managed through config files and agent Markdown files rather than a UI text area. + +**Global instructions** (applied to all agents) — add an `instructions` array to your global config (`~/.config/kilo/opencode.json`): + +```json +{ + "instructions": ["~/.config/kilo/global-rules.md"] +} +``` + +**Agent-specific instructions** — include them directly in the agent's Markdown file body (`.kilo/agents/my-agent.md`): + +```markdown +--- +model: anthropic/claude-3-5-sonnet-20241022 +--- + +You are a test engineer focused on code quality. +Always write tests in the describe/it style. +Include meaningful test descriptions. +``` + +You can also manage instruction file references from: + +1. Click the {% codicon name="gear" /%} icon in the sidebar toolbar to open Settings. +2. Click `Agent Behaviour` → `Rules` sub-tab. +3. Add or remove instruction file paths. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + **How to set them:** {% image src="/docs/img/custom-instructions/custom-instructions.png" alt="Kilo Code Modes tab showing global custom instructions interface" width="600" caption="Kilo Code Modes tab showing global custom instructions interface" /%} @@ -40,8 +74,21 @@ Mode-specific instructions can be set using the Modes Tab If the mode itself is global (not workspace-specific), any custom instructions you set for it will also apply globally for that mode across all workspaces. {% /callout %} +{% /tab %} +{% /tabs %} + ## Mode-Specific Instructions from Files +{% tabs %} +{% tab label="VSCode" %} + +Agent-specific instructions are written directly in the agent Markdown file body (`.kilo/agents/{agent-name}.md`). The file content after the YAML frontmatter is used as the agent's system prompt. + +For version-controlled per-agent instructions, simply commit the `.kilo/agents/` directory. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + For version-controlled mode instructions, use the mode rules file paths documented in [Custom Modes](/docs/customize/custom-modes#mode-specific-instructions-via-filesdirectories): - Preferred: `.kilo/rules-{mode-slug}/` (directory) @@ -51,6 +98,9 @@ For version-controlled mode instructions, use the mode rules file paths document Older naming like `.clinerules-{mode-slug}` is not the recommended path for current Kilo mode-specific instructions. {% /callout %} +{% /tab %} +{% /tabs %} + ## Related Features - [Custom Modes](/docs/customize/custom-modes) diff --git a/packages/kilo-docs/pages/customize/custom-modes.md b/packages/kilo-docs/pages/customize/custom-modes.md index 86bcc17a2c4..0b15fc87b12 100644 --- a/packages/kilo-docs/pages/customize/custom-modes.md +++ b/packages/kilo-docs/pages/customize/custom-modes.md @@ -5,7 +5,11 @@ description: "Create and configure custom modes in Kilo Code" # Custom Modes -Kilo Code allows you to create **custom modes** to tailor Kilo's behavior to specific tasks or workflows. Custom modes can be either **global** (available across all projects) or **project-specific** (defined within a single project). +Kilo Code allows you to create **custom modes** (also called **agents**) to tailor Kilo's behavior to specific tasks or workflows. Custom modes can be either **global** (available across all projects) or **project-specific** (defined within a single project). + +{% callout type="info" %} +The current VS Code extension (built on the Kilo CLI) uses **agent Markdown files** to define custom modes. The legacy extension used `custom_modes.yaml` / `.kilocodemodes`. See the tabs below for the relevant approach. +{% /callout %} ## Sticky Models for Efficient Workflow @@ -89,10 +93,56 @@ When importing modes, you can change the slug in the exported YAML file before i ## Methods for Creating and Configuring Custom Modes +{% tabs %} +{% tab label="VSCode" %} + +Custom agents are defined as Markdown files with optional YAML frontmatter. You can place them in: + +- **Project agents:** `.kilo/agents/*.md` (or `.opencode/agents/*.md`) +- **Global agents:** `~/.config/kilo/agents/*.md` + +### Agent File Format + +```markdown +--- +model: anthropic/claude-3-5-sonnet-20241022 +description: A specialized agent for writing documentation +mode: primary +--- + +You are a technical writer specializing in clear, concise documentation. +Focus on clarity, completeness, and consistent formatting. +``` + +**YAML frontmatter fields:** + +| Field | Description | +| ------------- | ----------------------------------------------------------------------------- | +| `model` | Override the default model for this agent | +| `description` | Short description shown in the agent selector | +| `mode` | `"primary"` (user-selectable), `"subagent"` (invoked by AI only), or `"all"` | +| `permission` | Tool permission overrides (same format as the global `permission` config key) | +| `temperature` | Model temperature override | +| `top_p` | Model top_p override | + +The filename (without `.md`) becomes the agent's slug and display name. + +### Installing via Marketplace + +You can also install community-contributed agents from the **Marketplace** tab in the extension sidebar. + +### Ask Kilo! (Recommended) + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + You can create and configure custom modes in several ways: ### 1. Ask Kilo! (Recommended) +{% /tab %} +{% /tabs %} + You can quickly create a basic custom mode by asking Kilo Code to do it for you. For example: ``` @@ -117,7 +167,15 @@ _The custom mode creation interface showing fields for name, slug, description, The interface provides fields for Name, Slug, Description, Save Location, Role Definition, When to Use (optional), Available Tools, and Custom Instructions. After filling these, click the "Create Mode" button. Kilo Code will save the new mode in YAML format. -### 3. Manual Configuration (YAML & JSON) +### 3. Manual Configuration + +{% tabs %} +{% tab label="VSCode" %} + +Create or edit agent Markdown files directly in `.kilo/agents/` (project) or `~/.config/kilo/agents/` (global). See the file format above. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} You can directly edit the configuration files to create or modify custom modes. This method offers the most control over all properties. Kilo Code now supports both YAML (preferred) and JSON formats. @@ -125,6 +183,9 @@ You can directly edit the configuration files to create or modify custom modes. - **Project Modes:** Edit `.kilocodemodes` in your project root (YAML preferred; JSON still supported for compatibility). - **Open from UI:** Open the Modes area, click next to Global or Project Modes, then choose **Edit Global Modes** or **Edit Project Modes**. +{% /tab %} +{% /tabs %} + These files define an array/list of custom modes. {% callout type="info" title="Why JSON Files May Still Exist" %} diff --git a/packages/kilo-docs/pages/customize/custom-rules.md b/packages/kilo-docs/pages/customize/custom-rules.md index ccecb0528ec..f4d74f96a78 100644 --- a/packages/kilo-docs/pages/customize/custom-rules.md +++ b/packages/kilo-docs/pages/customize/custom-rules.md @@ -9,7 +9,7 @@ Custom rules provide a powerful way to define project-specific and global behavi ## Overview -Custom rules allow you to create text-based instructions that all AI models will follow when interacting with your project. These rules act as guardrails and conventions that are consistently respected across all interactions with your codebase. Rules can be managed through both the file system and the built-in UI interface. +Custom rules allow you to create text-based instructions that all AI models will follow when interacting with your project. These rules act as guardrails and conventions that are consistently respected across all interactions with your codebase. ## Rule Format @@ -19,20 +19,59 @@ Custom rules can be written in plain text, but Markdown format is recommended fo - Use lists (`-`, `*`) to enumerate specific items or constraints - Use code blocks (` `) to include code examples when needed -## Rule Types +## Rule Location and Setup -Kilo Code supports two types of custom rules: +{% tabs %} +{% tab label="VSCode" %} -- **Project Rules**: Apply only to the current project workspace -- **Global Rules**: Apply across all projects and workspaces +Rules (called "instructions" in the new extension) are Markdown files referenced in your config. You can point to any Markdown file — `AGENTS.md`, `CLAUDE.md`, `.kilo/rules.md`, or any path you choose. -{% callout type="note" title="UI Support" %} -The built-in rules management UI is available for general rules only. Mode-specific rules must be managed through the file system. +### Project Instructions + +Add an `instructions` array to your project config (`kilo.json` or `.kilo/kilo.jsonc`): + +```json +{ + "instructions": ["./AGENTS.md", "./.kilo/rules.md"] +} +``` + +### Global Instructions + +Add the same `instructions` key to your global config (`~/.config/kilo/opencode.json`): + +```json +{ + "instructions": ["~/.config/kilo/rules.md"] +} +``` + +### Managing Instructions through the UI + +You can also manage instructions from the Settings UI: + +1. Click the {% codicon name="gear" /%} icon in the sidebar toolbar to open Settings. +2. Click the `Agent Behaviour` tab. +3. Select the `Rules` sub-tab. +4. Add, edit, or remove instruction file paths from here. + +### File Structure Example + +``` +project/ +├── AGENTS.md # auto-detected by the agent +├── kilo.json # references rules files +├── .kilo/ +│ └── rules.md # project-specific rules +└── src/ +``` + +{% callout type="tip" title="Pro Tip: File-Based Team Standards" %} +Committing your rules Markdown files (e.g. `AGENTS.md` or `.kilo/rules.md`) to version control ensures consistent agent behavior across your entire development team. {% /callout %} -## Rule Location - -### Project Rules +{% /tab %} +{% tab label="VSCode (Legacy)" %} Custom rules are primarily loaded from the **`.kilocode/rules/` directory**. This is the recommended approach for organizing your project-specific rules. Each rule is typically placed in its own Markdown file with a descriptive name: @@ -59,7 +98,7 @@ Global rules are stored in your home directory and apply to all projects: │ └── documentation_style.md ``` -## Managing Rules Through the UI +### Managing Rules Through the UI Kilo Code provides a built-in interface for managing your custom rules without manually editing files in the `.kilocode/rules/` directories. To access the UI, click on the icon in the **bottom right corner** of the Kilo Code window. @@ -70,9 +109,27 @@ You can access the rules management UI to: - Create and edit rules directly in the interface - Organize rules by category and priority +{% /tab %} +{% /tabs %} + +## Rule Types + +Kilo Code supports two types of custom rules: + +- **Project Rules**: Apply only to the current project workspace +- **Global Rules**: Apply across all projects and workspaces + ## Rule Loading Order -### General Rules (Any Mode) +{% tabs %} +{% tab label="VSCode" %} + +Instructions are loaded in the order specified in the `instructions` array in the config. The config precedence system applies (project config overrides global config). + +Files listed in `AGENTS.md`, `.kilo/AGENTS.md`, or `.opencode/AGENTS.md` at the project root are automatically detected without needing to list them explicitly. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} Rules are loaded in the following priority order: @@ -99,8 +156,23 @@ Additionally, the system supports mode-specific rules, which are loaded separate Currently, mode-specific rules are only supported at the project level. When both generic rules and mode-specific rules exist, the mode-specific rules are given priority in the final output. +{% /tab %} +{% /tabs %} + ## Creating Custom Rules +{% tabs %} +{% tab label="VSCode" %} + +1. Create a Markdown file (e.g. `.kilo/rules.md`) in your project +2. Add it to your `instructions` array in `kilo.json` or `.kilo/kilo.jsonc` +3. Write your rules using Markdown formatting + +Rules are applied automatically on the next session start. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + ### Using the UI Interface {% image src="/docs/img/custom-rules/rules-ui.png" alt="Rules tab in Kilo Code" width="400" /%} @@ -132,6 +204,9 @@ To create rules manually: Rules will be automatically applied to all future Kilo Code interactions. Any new changes will be applied immediately. +{% /tab %} +{% /tabs %} + ## Example Rules ### Example 1: Table Formatting @@ -192,10 +267,6 @@ Custom rules can be applied to a wide variety of scenarios: - **Keep It Simple**: Rules should be concise and easy to understand - **Update Regularly**: Review and update rules as project requirements change -{% callout type="tip" title="Pro Tip: File-Based Team Standards" %} -When working in team environments, placing `.kilocode/rules/codestyle.md` files under version control allows you to standardize Kilo's behavior across your entire development team. This ensures consistent code style, documentation practices, and development workflows for everyone on the project. -{% /callout %} - ## Limitations - Rules are applied on a best-effort basis by the AI models @@ -205,6 +276,18 @@ When working in team environments, placing `.kilocode/rules/codestyle.md` files ## Troubleshooting +{% tabs %} +{% tab label="VSCode" %} + +If your rules aren't being followed: + +1. **Check the `instructions` array** in your config to ensure the file path is correct. +2. **Verify Markdown formatting**: Ensure the file is valid Markdown. +3. **Restart the session**: Start a new chat session to pick up config changes. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + If your custom rules aren't being properly followed: 1. **Check rule status in the UI**: Use the rules management interface to verify that your rules are active and properly loaded @@ -216,6 +299,9 @@ If your custom rules aren't being properly followed: 1. **Rule specificity**: Verify that the rules are specific and unambiguous 1. **Restart VS Code**: Restart VS Code to ensure the rules are properly loaded +{% /tab %} +{% /tabs %} + ## Related Features - [Custom Modes](/docs/customize/custom-modes) diff --git a/packages/kilo-docs/pages/customize/workflows.md b/packages/kilo-docs/pages/customize/workflows.md index 302891b32a4..c5a64f2bf0d 100644 --- a/packages/kilo-docs/pages/customize/workflows.md +++ b/packages/kilo-docs/pages/customize/workflows.md @@ -5,12 +5,59 @@ description: "Create automated workflows with Kilo Code" # Workflows -Workflows automate repetitive tasks by defining step-by-step instructions for Kilo Code to execute. Invoke any workflow by typing `/[workflow-name.md]` in the chat. +Workflows (also called **slash commands** in the new extension) automate repetitive tasks by defining step-by-step instructions for Kilo Code to execute. {% image src="/docs/img/slash-commands/workflows.png" alt="Workflows tab in Kilo Code" width="600" caption="Workflows tab in Kilo Code" /%} ## Creating Workflows +{% tabs %} +{% tab label="VSCode" %} + +Workflows are Markdown files stored as **slash commands** in `.kilo/commands/`: + +- **Global commands**: `~/.config/kilo/commands/` (available in all projects) +- **Project commands**: `[project]/.kilo/commands/` (project-specific) + +### Basic Setup + +1. Create a `.md` file with step-by-step instructions +2. Save it in your commands directory +3. Type `/command-name` in the chat (just the filename without `.md` extension) to execute + +For example, a file at `.kilo/commands/submit-pr.md` is invoked with `/submit-pr`. + +### Optional Frontmatter + +Command files can include YAML frontmatter: + +```markdown +--- +description: Submit a pull request with checks +agent: code +--- + +You are helping submit a pull request... +``` + +| Field | Description | +| ------------- | --------------------------------------------- | +| `description` | Shown in the command picker | +| `agent` | Which agent to use when invoking this command | +| `model` | Model override for this command | +| `subtask` | When `true`, runs as a sub-agent session | + +### Workflow Capabilities + +Workflows can leverage all built-in tools: `read`, `glob`, `grep`, `edit`, `write`, `bash`, `webfetch`, and MCP server tools. + +### Migration from Legacy Workflows + +The new extension automatically migrates legacy workflows from `.kilocode/workflows/` to the new command format on startup. You can also manually move files and remove the `.md` extension from invocations. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + Workflows are markdown files stored in `.kilocode/workflows/`: - **Global workflows**: `~/.kilocode/workflows/` (available in all projects) @@ -31,6 +78,9 @@ Workflows can leverage: - [MCP integrations](/docs/automate/mcp/overview): Slack, databases, APIs - [Agent switching](/docs/code-with-ai/agents/using-agents): [`new_task()`](/docs/automate/tools/new-task) for specialized contexts +{% /tab %} +{% /tabs %} + ## Common Workflow Patterns **Release Management** @@ -64,7 +114,38 @@ Workflows can leverage: ## Example: PR Submission Workflow -Let's walk through creating a workflow for submitting a pull request. This workflow handles the entire process from code review to deployment notification. +Let's walk through creating a workflow for submitting a pull request. + +{% tabs %} +{% tab label="VSCode" %} + +Create a file called `submit-pr.md` in your `.kilo/commands` directory: + +```markdown +--- +description: Submit a pull request with full checks +--- + +# Submit PR Workflow + +You are helping submit a pull request. Follow these steps: + +1. First, use `grep` to check for any TODO comments or console.log statements that shouldn't be committed +2. Run tests using `bash` with `npm test` or the appropriate test command +3. If tests pass, stage and commit changes with a descriptive commit message +4. Push the branch and create a pull request using `bash` with `gh pr create` +5. Use `question` to get the PR title and description from the user + +Parameters needed (ask if not provided): + +- Branch name +- Reviewers to assign +``` + +Trigger this workflow by typing `/submit-pr` in the chat. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} Create a file called `submit-pr.md` in your `.kilocode/workflows` directory: @@ -85,12 +166,16 @@ Parameters needed (ask if not provided): - Reviewers to assign ``` -Now you can trigger this workflow by typing `/submit-pr.md` in the chat. Kilo Code will: +Trigger this workflow by typing `/submit-pr.md` in the chat. + +{% /tab %} +{% /tabs %} + +Kilo Code will: - Scan your code for common issues before committing - Run your test suite to catch problems early - Handle the Git operations and PR creation -- Notify your team automatically - Set up follow-up tasks for deployment -This saves you from manually running the same 7-step process every time you want to submit code for review. +This saves you from manually running the same steps every time you want to submit code for review. diff --git a/packages/kilo-docs/pages/getting-started/settings/index.md b/packages/kilo-docs/pages/getting-started/settings/index.md index 00e1cc30a2a..97e7045ee29 100644 --- a/packages/kilo-docs/pages/getting-started/settings/index.md +++ b/packages/kilo-docs/pages/getting-started/settings/index.md @@ -140,7 +140,30 @@ Use this option only if you are certain you want to remove all Kilo Code data or {% tabs %} {% tab label="VSCode" %} -The extension does not currently expose the same experimental feature toggles as the **VSCode (Legacy)** version. Advanced options are configured via the JSONC config files that the Settings webview reads and writes. Refer to the auto-generated `$schema` in your `kilo.jsonc` for the full list of available options. +The new extension exposes experimental features via the **Experimental** tab in Settings (click the gear icon {% codicon name="gear" /%} → Experimental). + +Available experimental toggles include: + +- **Share mode** — `manual`, `auto`, or `disabled` session sharing +- **LSP integration** — expose language server diagnostics to the agent +- **Paste summary** — summarize large clipboard pastes before including them +- **Batch tool** — allow the agent to batch multiple tool calls in one step +- **Codebase search** — semantic search across your codebase + +Advanced options not exposed in the UI can be configured via the `experimental` key in `kilo.jsonc`: + +```json +{ + "experimental": { + "codebase_search": true, + "batch_tool": false, + "disable_paste_summary": false, + "mcp_timeout": 30000 + } +} +``` + +Refer to the auto-generated `$schema` in your `kilo.jsonc` for the full list of available options. {% /tab %} {% tab label="CLI" %} From df4a0bd9cfb0654e249b9f504a96e2115a113118 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 14:24:26 +0000 Subject: [PATCH 53/81] docs: document default tool permissions and remove Cmd+Alt+A shortcut mention --- .../pages/automate/how-tools-work.md | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/packages/kilo-docs/pages/automate/how-tools-work.md b/packages/kilo-docs/pages/automate/how-tools-work.md index 6cc0d01be56..5086fdb075d 100644 --- a/packages/kilo-docs/pages/automate/how-tools-work.md +++ b/packages/kilo-docs/pages/automate/how-tools-work.md @@ -97,13 +97,41 @@ greet('World'); {% tabs %} {% tab label="VSCode" %} -Every tool use requires your explicit approval via the **Permission Dock** floating UI in the chat panel. For each tool call you can: +Every tool use is subject to a permission check. The default action for any tool with no matching rule in your config is **`ask`** — meaning Kilo will pause and prompt you before executing it. -- **Approve** — execute the tool once -- **Approve Always** — add this tool/pattern to your config so future calls are auto-approved -- **Deny** — decline the proposed tool call +**Default permissions by tool:** -You can also toggle **Auto-approve** for all tools for the current session using `Ctrl+Alt+A` / `Cmd+Alt+A`. +| Tool(s) | Default | +| :------------------------------------------- | :----------------------------------------------- | +| `read`, `glob`, `grep`, `list` | `ask` | +| `edit`, `write`, `multiedit`, `apply_patch` | `ask` | +| `bash` | `ask` (per-command) | +| `external_directory` | `ask` (when accessing paths outside the project) | +| `task` | `ask` | +| `webfetch`, `websearch`, `codesearch` | `ask` | +| `todowrite`, `todoread`, `question`, `skill` | `ask` | + +No tools are auto-approved out of the box. You must explicitly grant `allow` in your config, or approve them at runtime. + +**At runtime**, the **Permission Dock** floating UI in the chat panel shows each pending approval. For each tool call you can: + +- **Approve once** — execute this call only +- **Approve always** — save an `allow` rule to your config so future matching calls are auto-approved +- **Deny** — cancel the tool call + +To pre-configure permissions in your config file: + +```json +{ + "permission": { + "read": "allow", + "glob": "allow", + "grep": "allow", + "edit": "ask", + "bash": "ask" + } +} +``` This safety mechanism ensures you maintain control over which files are modified, what commands are executed, and how your codebase is changed. From 01b04a3d965d364f2c5debc5f2f7a7559a905e36 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 14:30:48 +0000 Subject: [PATCH 54/81] docs: fix tools overview and MCP page for new extension - tools/index: add browser group with kilo-playwright_* tool names - tools/index: add Browser Tools section documenting Playwright MCP tools - mcp/using-in-kilo-code: reference kilo.jsonc only, not opencode.json - mcp/using-in-kilo-code: fix auto-approve section to use correct MCP permission keys ({server}_{tool} pattern), not bash permissions --- .../pages/automate/mcp/using-in-kilo-code.md | 17 ++++++++++------- .../kilo-docs/pages/automate/tools/index.md | 13 +++++++++++++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md b/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md index 219fc8cc364..bd216a894e1 100644 --- a/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md +++ b/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md @@ -16,8 +16,8 @@ Model Context Protocol (MCP) extends Kilo Code's capabilities by connecting to e MCP server configurations are stored inside the main Kilo config file. There are two levels: -1. **Global Configuration**: `~/.config/kilo/opencode.json` — applies to all projects. -2. **Project-level Configuration**: `kilo.json` or `.kilo/kilo.jsonc` in your project root. +1. **Global Configuration**: `~/.config/kilo/kilo.jsonc` — applies to all projects. +2. **Project-level Configuration**: `kilo.jsonc` in your project root, or `.kilo/kilo.jsonc` for a cleaner setup. **Precedence**: Project-level configuration takes precedence over global configuration. @@ -33,7 +33,7 @@ From here you can add, edit, enable/disable, and delete MCP servers. Changes are ### Config Format -MCP servers are configured under the `mcp` key in `opencode.json` / `kilo.jsonc`: +MCP servers are configured under the `mcp` key in `kilo.jsonc`: **Local (STDIO) server:** @@ -282,18 +282,21 @@ To set the maximum time to wait for a response after a tool call to the MCP serv {% tabs %} {% tab label="VSCode" %} -Tool permissions in the new extension are managed through the permission system. In your config file, set a tool's permission to `"allow"` to auto-approve it: +MCP tool calls use the same permission system as built-in tools. Each MCP tool's permission key is its namespaced name: `{server}_{tool}` (e.g. `my_server_do_something`). + +**At runtime:** When an MCP tool is called, the Permission Dock shows an approval prompt. Click **Approve Always** to save an allow rule to your config so future calls to that tool are auto-approved. + +**In your config file:** Add the tool name (or a wildcard pattern) to the `permission` key in `kilo.jsonc`: ```json { "permission": { - "bash": "allow" + "my_server_do_something": "allow", + "my_server_*": "allow" } } ``` -You can also approve individual MCP tool calls as "always allow" directly from the Permission Dock in the chat UI. - {% /tab %} {% tab label="VSCode (Legacy)" %} diff --git a/packages/kilo-docs/pages/automate/tools/index.md b/packages/kilo-docs/pages/automate/tools/index.md index 4a441515cc9..9949a96321d 100644 --- a/packages/kilo-docs/pages/automate/tools/index.md +++ b/packages/kilo-docs/pages/automate/tools/index.md @@ -22,6 +22,7 @@ Tools are organized into logical groups based on their functionality: | **Edit Group** | File system modifications | `edit`, `multiedit`, `write`, `apply_patch` | Code changes and file manipulation | | **Execute Group** | Shell command execution | `bash` | Running scripts, building projects | | **Web Group** | Fetch and search web content | `webfetch`, `websearch`, `codesearch` | Research, documentation lookup | +| **Browser Group** | Web browser automation | `kilo-playwright_*` (via built-in Playwright MCP) | Browser testing and interaction | | **MCP Group** | External tool integration | MCP server tools (namespaced as `{server}_{tool}`) | Specialized functionality via MCP | | **Workflow Group** | Sub-agents and task management | `question`, `task`, `todowrite`, `todoread`, `plan`, `skill` | Context switching and task organization | @@ -66,6 +67,18 @@ These tools help Kilo Code access web content: - `websearch` - Searches the web (available to Kilo/OpenRouter users) - `codesearch` - Semantic code search (available to Kilo/OpenRouter users) +### Browser Tools + +The VS Code extension has a built-in browser automation tool powered by [Playwright MCP](https://www.npmjs.com/package/@playwright/mcp). Enable it in Settings → Browser Automation. When enabled, it registers an MCP server named `kilo-playwright` and exposes tools such as: + +- `kilo-playwright_browser_navigate` - Navigate to a URL +- `kilo-playwright_browser_click` - Click an element +- `kilo-playwright_browser_type` - Type text into an element +- `kilo-playwright_browser_screenshot` - Capture a screenshot +- `kilo-playwright_browser_snapshot` - Capture an accessibility snapshot + +These follow the same permission model as all MCP tools (see below). + ### MCP Tools MCP server tools are automatically available when an MCP server is connected. Tool names are namespaced as `{server}_{tool}`. See [MCP Overview](/docs/automate/mcp/overview) for details. From f0a9742c8b22432ff24f16c91db34f27a7275ddc Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 14:34:11 +0000 Subject: [PATCH 55/81] docs: fix custom-modes tab structure - move all legacy YAML content into Legacy tab --- .../kilo-docs/pages/customize/custom-modes.md | 27 +++++++++---------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/packages/kilo-docs/pages/customize/custom-modes.md b/packages/kilo-docs/pages/customize/custom-modes.md index 0b15fc87b12..871917b9ec9 100644 --- a/packages/kilo-docs/pages/customize/custom-modes.md +++ b/packages/kilo-docs/pages/customize/custom-modes.md @@ -133,6 +133,14 @@ You can also install community-contributed agents from the **Marketplace** tab i ### Ask Kilo! (Recommended) +You can also have Kilo create an agent file for you. For example: + +``` +Create a new agent called "Documentation Writer". It should only be able to read files and write Markdown files. +``` + +Kilo will create the appropriate `.kilo/agents/docs-writer.md` file with the right frontmatter. + {% /tab %} {% tab label="VSCode (Legacy)" %} @@ -140,9 +148,6 @@ You can create and configure custom modes in several ways: ### 1. Ask Kilo! (Recommended) -{% /tab %} -{% /tabs %} - You can quickly create a basic custom mode by asking Kilo Code to do it for you. For example: ``` @@ -167,15 +172,7 @@ _The custom mode creation interface showing fields for name, slug, description, The interface provides fields for Name, Slug, Description, Save Location, Role Definition, When to Use (optional), Available Tools, and Custom Instructions. After filling these, click the "Create Mode" button. Kilo Code will save the new mode in YAML format. -### 3. Manual Configuration - -{% tabs %} -{% tab label="VSCode" %} - -Create or edit agent Markdown files directly in `.kilo/agents/` (project) or `~/.config/kilo/agents/` (global). See the file format above. - -{% /tab %} -{% tab label="VSCode (Legacy)" %} +### 3. Manual Configuration (YAML & JSON) You can directly edit the configuration files to create or modify custom modes. This method offers the most control over all properties. Kilo Code now supports both YAML (preferred) and JSON formats. @@ -183,9 +180,6 @@ You can directly edit the configuration files to create or modify custom modes. - **Project Modes:** Edit `.kilocodemodes` in your project root (YAML preferred; JSON still supported for compatibility). - **Open from UI:** Open the Modes area, click next to Global or Project Modes, then choose **Edit Global Modes** or **Edit Project Modes**. -{% /tab %} -{% /tabs %} - These files define an array/list of custom modes. {% callout type="info" title="Why JSON Files May Still Exist" %} @@ -575,6 +569,9 @@ customModes: - **Hyphens for List Items:** List items start with a hyphen and a space (e.g., `- read`) - **Validate Your YAML:** Use online YAML validators or your editor's built-in validation +{% /tab %} +{% /tabs %} + ## Community Gallery Ready to explore more? Check out the [Show and Tell](https://github.com/Kilo-Org/kilocode/discussions/categories/show-and-tell) to discover and share custom modes created by the community! From 23c7d053f289cbe7f5f27af3b497f382e02e83ca Mon Sep 17 00:00:00 2001 From: Evgeny Shurakov Date: Mon, 30 Mar 2026 16:39:33 +0200 Subject: [PATCH 56/81] feat(cli): add WebSocket activity watchdog with heartbeat_ack support Add an inactivity watchdog to RemoteWS that force-closes and reconnects the WebSocket when no inbound messages arrive within a configurable timeout window (default 30s). Introduce a heartbeat_ack inbound message type so the server can respond to heartbeat pings, resetting the activity timer. --- .../src/kilo-sessions/remote-protocol.ts | 7 +- .../opencode/src/kilo-sessions/remote-ws.ts | 30 +++++++ .../kilo-sessions/remote-protocol.test.ts | 18 +++++ .../test/kilo-sessions/remote-ws.test.ts | 80 +++++++++++++++++++ 4 files changed, 134 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/kilo-sessions/remote-protocol.ts b/packages/opencode/src/kilo-sessions/remote-protocol.ts index ed8e19348e5..6500319fa81 100644 --- a/packages/opencode/src/kilo-sessions/remote-protocol.ts +++ b/packages/opencode/src/kilo-sessions/remote-protocol.ts @@ -71,7 +71,12 @@ export namespace RemoteProtocol { }) export type System = z.infer - export const Inbound = z.discriminatedUnion("type", [Subscribe, Unsubscribe, Command, System]) + export const HeartbeatAck = z.object({ + type: z.literal("heartbeat_ack"), + }) + export type HeartbeatAck = z.infer + + export const Inbound = z.discriminatedUnion("type", [Subscribe, Unsubscribe, Command, System, HeartbeatAck]) export type Inbound = z.infer /** Lightweight schema for diagnostic logging before full parse. */ diff --git a/packages/opencode/src/kilo-sessions/remote-ws.ts b/packages/opencode/src/kilo-sessions/remote-ws.ts index 88a1f2f36db..0232ec27785 100644 --- a/packages/opencode/src/kilo-sessions/remote-ws.ts +++ b/packages/opencode/src/kilo-sessions/remote-ws.ts @@ -18,6 +18,8 @@ export namespace RemoteWS { withContext?: (fn: () => R) => Promise | R /** Called when the server permanently closes the connection (e.g. auth failure, conflict) */ onClose?: (code: number, reason: string) => void + /** Inactivity timeout in ms — force-close if no inbound message within this window */ + timeout?: number } export type Connection = { @@ -56,6 +58,29 @@ export namespace RemoteWS { beat = undefined } + let activity = Date.now() + let watchdog: Timer | undefined + const timeout = options.timeout ?? 30_000 + + function startWatchdog() { + stopWatchdog() + watchdog = setInterval( + () => { + if (Date.now() - activity > timeout) { + options.log.warn("remote-ws activity timeout, forcing reconnect") + stopWatchdog() + ws?.close(4000, "activity timeout") + } + }, + Math.min(interval, timeout), + ) + } + + function stopWatchdog() { + if (watchdog) clearInterval(watchdog) + watchdog = undefined + } + async function open() { if (closed) return const token = await options.getToken() @@ -73,10 +98,13 @@ export namespace RemoteWS { backoff = 1000 for (const msg of buffer) ws!.send(msg) buffer.length = 0 + activity = Date.now() startHeartbeat() + startWatchdog() } ws.onmessage = (event) => { + activity = Date.now() const raw = String(event.data) let json: unknown try { @@ -99,6 +127,7 @@ export namespace RemoteWS { options.log.info("remote-ws closed", { code: event.code, reason: event.reason }) ws = undefined stopHeartbeat() + stopWatchdog() if (event.code === 4401 || event.code === 4403 || event.code === 4409) { options.log.warn("remote-ws closed permanently", { code: event.code, @@ -134,6 +163,7 @@ export namespace RemoteWS { function close() { closed = true stopHeartbeat() + stopWatchdog() if (timer) clearTimeout(timer) if (ws) ws.close() } diff --git a/packages/opencode/test/kilo-sessions/remote-protocol.test.ts b/packages/opencode/test/kilo-sessions/remote-protocol.test.ts index f61f3f40886..354662dae5e 100644 --- a/packages/opencode/test/kilo-sessions/remote-protocol.test.ts +++ b/packages/opencode/test/kilo-sessions/remote-protocol.test.ts @@ -237,4 +237,22 @@ describe("RemoteProtocol", () => { const result = RemoteProtocol.SessionInfo.safeParse({ id: "x" }) expect(result.success).toBe(false) }) + + test("valid heartbeat_ack parses", () => { + const msg = { type: "heartbeat_ack" } + const result = RemoteProtocol.HeartbeatAck.safeParse(msg) + expect(result.success).toBe(true) + if (result.success) { + expect(result.data.type).toBe("heartbeat_ack") + } + }) + + test("inbound union picks heartbeat_ack", () => { + const msg = { type: "heartbeat_ack" } + const result = RemoteProtocol.Inbound.safeParse(msg) + expect(result.success).toBe(true) + if (result.success) { + expect(result.data.type).toBe("heartbeat_ack") + } + }) }) diff --git a/packages/opencode/test/kilo-sessions/remote-ws.test.ts b/packages/opencode/test/kilo-sessions/remote-ws.test.ts index f6c1a83cdf1..7fe6152b23a 100644 --- a/packages/opencode/test/kilo-sessions/remote-ws.test.ts +++ b/packages/opencode/test/kilo-sessions/remote-ws.test.ts @@ -284,4 +284,84 @@ describe("RemoteWS", () => { expect(server.clients.length).toBe(0) expect(server.messages.length).toBe(0) }) + + test("force-reconnects on activity timeout", async () => { + server = createServer() + const ws1 = server.waitForConnect() + + conn = RemoteWS.connect({ + url: server.url, + getToken: async () => "tok", + getSessions: () => [], + log: nolog(), + heartbeat: 60_000, + timeout: 200, + }) + + await ws1 + await settled() + expect(conn.connected).toBe(true) + + // Don't send any server messages — timeout should fire + const ws2 = server.waitForConnect() + await Bun.sleep(450) + + // Should have reconnected + await ws2 + await settled() + expect(conn.connected).toBe(true) + }) + + test("resets activity timer on incoming messages", async () => { + server = createServer() + const ws1p = server.waitForConnect() + + conn = RemoteWS.connect({ + url: server.url, + getToken: async () => "tok", + getSessions: () => [], + log: nolog(), + heartbeat: 60_000, + timeout: 300, + }) + + const ws1 = await ws1p + await settled() + + // Send server messages at 100ms intervals — each resets the timer + for (let i = 0; i < 4; i++) { + await Bun.sleep(100) + ws1.send(JSON.stringify({ type: "subscribe", sessionId: `s${i}` })) + } + + await settled() + // Connection should still be alive — activity kept resetting the timer + expect(conn.connected).toBe(true) + expect(server.clients.length).toBe(1) + }) + + test("activity timeout uses custom timeout option", async () => { + server = createServer() + const ws1 = server.waitForConnect() + + conn = RemoteWS.connect({ + url: server.url, + getToken: async () => "tok", + getSessions: () => [], + log: nolog(), + heartbeat: 60_000, + timeout: 100, + }) + + await ws1 + await settled() + + // With 100ms timeout, should reconnect faster than default 30s + const ws2 = server.waitForConnect() + await Bun.sleep(250) + + await ws2 + await settled() + expect(conn.connected).toBe(true) + }) }) From afcf766c9efce47ddc18fd80bc78bfc27877c05e Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 14:41:36 +0000 Subject: [PATCH 57/81] docs: replace opencode.json with kilo.jsonc in VS Code pages; fix custom-instructions nested tabs; remove codebase search from experimental --- .../code-with-ai/features/checkpoints.md | 2 +- .../pages/customize/custom-instructions.md | 23 +++++++------------ .../kilo-docs/pages/customize/custom-rules.md | 2 +- .../pages/getting-started/settings/index.md | 1 - 4 files changed, 10 insertions(+), 18 deletions(-) diff --git a/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md b/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md index ed6747482a7..67da805952d 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md +++ b/packages/kilo-docs/pages/code-with-ai/features/checkpoints.md @@ -19,7 +19,7 @@ Checkpoints let you: {% tabs %} {% tab label="VSCode" %} -Checkpoints (called **snapshots** in the new extension) are configured via the `snapshot` key in your config file (`kilo.json` or `~/.config/kilo/opencode.json`): +Checkpoints (called **snapshots** in the new extension) are configured via the `snapshot` key in your config file (`kilo.jsonc` or `~/.config/kilo/kilo.jsonc`): ```json { diff --git a/packages/kilo-docs/pages/customize/custom-instructions.md b/packages/kilo-docs/pages/customize/custom-instructions.md index a0b80d5b312..d5fcad5d9ae 100644 --- a/packages/kilo-docs/pages/customize/custom-instructions.md +++ b/packages/kilo-docs/pages/customize/custom-instructions.md @@ -22,7 +22,7 @@ Custom Instructions are IDE-wide and are applied across all workspaces and maint In the new extension, global and agent-specific instructions are managed through config files and agent Markdown files rather than a UI text area. -**Global instructions** (applied to all agents) — add an `instructions` array to your global config (`~/.config/kilo/opencode.json`): +**Global instructions** (applied to all agents) — add an `instructions` array to your global config (`~/.config/kilo/kilo.jsonc`): ```json { @@ -48,6 +48,12 @@ You can also manage instruction file references from: 2. Click `Agent Behaviour` → `Rules` sub-tab. 3. Add or remove instruction file paths. +### Agent-Specific Instructions + +Agent-specific instructions are written directly in the agent Markdown file body (`.kilo/agents/{agent-name}.md`). The file content after the YAML frontmatter is used as the agent's system prompt. + +For version-controlled per-agent instructions, simply commit the `.kilo/agents/` directory. + {% /tab %} {% tab label="VSCode (Legacy)" %} @@ -74,20 +80,7 @@ Mode-specific instructions can be set using the Modes Tab If the mode itself is global (not workspace-specific), any custom instructions you set for it will also apply globally for that mode across all workspaces. {% /callout %} -{% /tab %} -{% /tabs %} - -## Mode-Specific Instructions from Files - -{% tabs %} -{% tab label="VSCode" %} - -Agent-specific instructions are written directly in the agent Markdown file body (`.kilo/agents/{agent-name}.md`). The file content after the YAML frontmatter is used as the agent's system prompt. - -For version-controlled per-agent instructions, simply commit the `.kilo/agents/` directory. - -{% /tab %} -{% tab label="VSCode (Legacy)" %} +#### Mode-Specific Instructions from Files For version-controlled mode instructions, use the mode rules file paths documented in [Custom Modes](/docs/customize/custom-modes#mode-specific-instructions-via-filesdirectories): diff --git a/packages/kilo-docs/pages/customize/custom-rules.md b/packages/kilo-docs/pages/customize/custom-rules.md index f4d74f96a78..04c8da1841f 100644 --- a/packages/kilo-docs/pages/customize/custom-rules.md +++ b/packages/kilo-docs/pages/customize/custom-rules.md @@ -38,7 +38,7 @@ Add an `instructions` array to your project config (`kilo.json` or `.kilo/kilo.j ### Global Instructions -Add the same `instructions` key to your global config (`~/.config/kilo/opencode.json`): +Add the same `instructions` key to your global config (`~/.config/kilo/kilo.jsonc`): ```json { diff --git a/packages/kilo-docs/pages/getting-started/settings/index.md b/packages/kilo-docs/pages/getting-started/settings/index.md index 97e7045ee29..acd1bd43ff6 100644 --- a/packages/kilo-docs/pages/getting-started/settings/index.md +++ b/packages/kilo-docs/pages/getting-started/settings/index.md @@ -148,7 +148,6 @@ Available experimental toggles include: - **LSP integration** — expose language server diagnostics to the agent - **Paste summary** — summarize large clipboard pastes before including them - **Batch tool** — allow the agent to batch multiple tool calls in one step -- **Codebase search** — semantic search across your codebase Advanced options not exposed in the UI can be configured via the `experimental` key in `kilo.jsonc`: From 14438b993665bebaf7770591c423c72b908aa9e7 Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Mon, 30 Mar 2026 18:01:12 +0300 Subject: [PATCH 58/81] fix(cli): use git branch --list instead of -l --- packages/opencode/src/agent/agent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index 833aea650c5..7e33ab303d7 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -165,7 +165,7 @@ export namespace Agent { "git name-rev *": "allow", "git stash list *": "allow", "git tag -l *": "allow", - "git branch -l *": "allow", + "git branch --list *": "allow", "git branch -a *": "allow", "git branch -r *": "allow", "git remote -v *": "allow", From 455f4c23b45fb8872f03dbbf6e5772b9d5545305 Mon Sep 17 00:00:00 2001 From: Mark IJbema Date: Mon, 30 Mar 2026 17:31:21 +0200 Subject: [PATCH 59/81] =?UTF-8?q?fix(vscode):=20address=20review=20comment?= =?UTF-8?q?s=20=E2=80=94=20assign=20promise=20directly,=20remove=20stale?= =?UTF-8?q?=20pending=20requests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Assign promise directly in leading-edge PendingRequest instead of null! (addresses chrarnoldus's review comment) - Remove stale pending requests when clearTimeout cancels a debounce timer, preventing never-resolving promises from lingering in the list (addresses kilo-code-bot's WARNING about stale pending requests) - Clear pending state in dispose() for completeness --- .../AutocompleteInlineCompletionProvider.ts | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteInlineCompletionProvider.ts b/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteInlineCompletionProvider.ts index 3783decc361..93ef16b749e 100644 --- a/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteInlineCompletionProvider.ts +++ b/packages/kilo-vscode/src/services/autocomplete/classic-auto-complete/AutocompleteInlineCompletionProvider.ts @@ -126,6 +126,8 @@ export class AutocompleteInlineCompletionProvider implements vscode.InlineComple private recentlyVisitedRangesService: RecentlyVisitedRangesService private recentlyEditedTracker: RecentlyEditedTracker private debounceTimer: NodeJS.Timeout | null = null + /** The pending request associated with the current debounce timer (if any) */ + private debouncedPendingRequest: PendingRequest | null = null private isFirstCall: boolean = true private ignoreController: Promise /** Abort controller for the current in-flight FIM request */ @@ -297,6 +299,8 @@ export class AutocompleteInlineCompletionProvider implements vscode.InlineComple clearTimeout(this.debounceTimer) this.debounceTimer = null } + this.debouncedPendingRequest = null + this.pendingRequests.length = 0 this.fimAbortController?.abort() this.fimAbortController = null this.telemetry?.dispose() @@ -503,21 +507,22 @@ export class AutocompleteInlineCompletionProvider implements vscode.InlineComple // but still track it as a pending request so subsequent calls can reuse it if (this.isFirstCall && this.debounceTimer === null) { this.isFirstCall = false - const leading: PendingRequest = { - prefix, - suffix, - promise: null!, - } - leading.promise = this.fetchAndCacheSuggestion(prompt, prefix, suffix, languageId).finally(() => { - this.removePendingRequest(leading) - }) + const promise = this.fetchAndCacheSuggestion(prompt, prefix, suffix, languageId) + const leading: PendingRequest = { prefix, suffix, promise } + promise.finally(() => this.removePendingRequest(leading)) this.pendingRequests.push(leading) - return leading.promise + return promise } - // Clear any existing timer (reset the debounce) + // Clear any existing timer and remove the stale pending request it belongs to. + // The cancelled timer's callback will never fire, so the pending entry would + // otherwise linger with a never-resolving promise. if (this.debounceTimer !== null) { clearTimeout(this.debounceTimer) + if (this.debouncedPendingRequest) { + this.removePendingRequest(this.debouncedPendingRequest) + this.debouncedPendingRequest = null + } } // Create the pending request object first so we can reference it in the cleanup @@ -530,6 +535,7 @@ export class AutocompleteInlineCompletionProvider implements vscode.InlineComple const requestPromise = new Promise((resolve) => { this.debounceTimer = setTimeout(async () => { this.debounceTimer = null + this.debouncedPendingRequest = null this.isFirstCall = true // Reset for next sequence await this.fetchAndCacheSuggestion(prompt, prefix, suffix, languageId) // Remove this request from pending when done @@ -541,6 +547,9 @@ export class AutocompleteInlineCompletionProvider implements vscode.InlineComple // Complete the pending request object pendingRequest.promise = requestPromise + // Track so we can remove it if the timer is cleared by a subsequent call + this.debouncedPendingRequest = pendingRequest + // Add to the list of pending requests this.pendingRequests.push(pendingRequest) From 614d830e6f8db1ca0a9d4a8680c4ca33b0e5a250 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 15:35:01 +0000 Subject: [PATCH 60/81] docs: fix provider IDs and env vars in ai-provider pages --- packages/kilo-docs/pages/ai-providers/bedrock.md | 2 +- packages/kilo-docs/pages/ai-providers/chutes-ai.md | 2 +- packages/kilo-docs/pages/ai-providers/claude-code.md | 6 +++--- packages/kilo-docs/pages/ai-providers/fireworks.md | 6 +++--- packages/kilo-docs/pages/ai-providers/moonshot.md | 2 +- packages/kilo-docs/pages/ai-providers/vercel-ai-gateway.md | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/kilo-docs/pages/ai-providers/bedrock.md b/packages/kilo-docs/pages/ai-providers/bedrock.md index 457955576e5..64f4bb7aea2 100644 --- a/packages/kilo-docs/pages/ai-providers/bedrock.md +++ b/packages/kilo-docs/pages/ai-providers/bedrock.md @@ -91,7 +91,7 @@ Then set your default model: ```jsonc { - "model": "bedrock/anthropic.claude-sonnet-4-20250514-v1:0", + "model": "amazon-bedrock/anthropic.claude-sonnet-4-20250514-v1:0", } ``` diff --git a/packages/kilo-docs/pages/ai-providers/chutes-ai.md b/packages/kilo-docs/pages/ai-providers/chutes-ai.md index b72af388f2a..348b3b84feb 100644 --- a/packages/kilo-docs/pages/ai-providers/chutes-ai.md +++ b/packages/kilo-docs/pages/ai-providers/chutes-ai.md @@ -62,7 +62,7 @@ Then set your default model: ```jsonc { - "model": "chutes-ai/model-name", + "model": "chutes/model-name", } ``` diff --git a/packages/kilo-docs/pages/ai-providers/claude-code.md b/packages/kilo-docs/pages/ai-providers/claude-code.md index 699a4af7f95..239e3d779ca 100644 --- a/packages/kilo-docs/pages/ai-providers/claude-code.md +++ b/packages/kilo-docs/pages/ai-providers/claude-code.md @@ -45,9 +45,9 @@ The specific models available depend on your Claude subscription and plan. See [ {% /tab %} {% tab label="VSCode" %} -Open **Settings** (gear icon) and go to the **Providers** tab. Claude Code uses your existing Anthropic credentials from the `claude` CLI — make sure it is installed and authenticated before adding the provider. - -The extension stores this in your `kilo.json` config file. You can also edit the config file directly — see the **CLI** tab for the file format. +{% callout type="warning" %} +Claude Code credentials no longer work in Kilo Code. Please use the [Anthropic provider](/docs/ai-providers/anthropic) with an API key instead. +{% /callout %} {% /tab %} {% tab label="CLI" %} diff --git a/packages/kilo-docs/pages/ai-providers/fireworks.md b/packages/kilo-docs/pages/ai-providers/fireworks.md index 18f08ad7911..f354b533760 100644 --- a/packages/kilo-docs/pages/ai-providers/fireworks.md +++ b/packages/kilo-docs/pages/ai-providers/fireworks.md @@ -40,7 +40,7 @@ Set the API key as an environment variable or configure it in your `kilo.json` c **Environment variable:** ```bash -export FIREWORKS_AI_API_KEY="your-api-key" +export FIREWORKS_API_KEY="your-api-key" ``` **Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): @@ -49,7 +49,7 @@ export FIREWORKS_AI_API_KEY="your-api-key" { "provider": { "fireworks-ai": { - "env": ["FIREWORKS_AI_API_KEY"], + "env": ["FIREWORKS_API_KEY"], }, }, } @@ -59,7 +59,7 @@ Then set your default model: ```jsonc { - "model": "fireworks/accounts/fireworks/models/llama4-scout-instruct-basic", + "model": "fireworks-ai/accounts/fireworks/models/llama4-scout-instruct-basic", } ``` diff --git a/packages/kilo-docs/pages/ai-providers/moonshot.md b/packages/kilo-docs/pages/ai-providers/moonshot.md index c1b97cfe8d6..7b92cf10287 100644 --- a/packages/kilo-docs/pages/ai-providers/moonshot.md +++ b/packages/kilo-docs/pages/ai-providers/moonshot.md @@ -59,7 +59,7 @@ Then set your default model: ```jsonc { - "model": "moonshot/moonshot-v1-auto", + "model": "moonshotai/moonshot-v1-auto", } ``` diff --git a/packages/kilo-docs/pages/ai-providers/vercel-ai-gateway.md b/packages/kilo-docs/pages/ai-providers/vercel-ai-gateway.md index aba308e59e3..bbfd9ccf991 100644 --- a/packages/kilo-docs/pages/ai-providers/vercel-ai-gateway.md +++ b/packages/kilo-docs/pages/ai-providers/vercel-ai-gateway.md @@ -96,7 +96,7 @@ Then set your default model: ```jsonc { - "model": "vercel-ai-gateway/anthropic/claude-sonnet-4", + "model": "vercel/anthropic/claude-sonnet-4", } ``` From 0ac666b17415ea4b54ee581f7d3a0fc231946eb6 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:00:30 +0000 Subject: [PATCH 61/81] docs(code-with-ai): move autocomplete note from VSCode tab to CLI tab adjusts the extension-only autocomplete note for CLI/TUI availability moves the info from the VSCode tab to the CLI tab for consistency --- .../pages/code-with-ai/features/autocomplete/index.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md b/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md index be5a983a472..6fecef62164 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md +++ b/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md @@ -10,10 +10,6 @@ Kilo Code's autocomplete feature provides intelligent code suggestions and compl {% tabs %} {% tab label="VSCode" %} -{% callout type="info" %} -Autocomplete is an **extension-only** feature. It is not available in the CLI/TUI. -{% /callout %} - ## How Autocomplete Works The extension uses **Fill-in-the-Middle (FIM)** completion powered by Codestral (`mistralai/codestral-2508`). It analyzes the code before and after your cursor to generate contextually accurate inline suggestions. @@ -47,6 +43,13 @@ You can temporarily disable autocomplete by clicking the status bar item to **sn The extension automatically detects if **GitHub Copilot** inline suggestions are enabled and warns you about potential conflicts. Disable Copilot's inline completions for the best experience with Kilo Code autocomplete. +{% /tab %} +{% tab label="CLI" %} + +{% callout type="info" %} +Autocomplete is an **extension-only** feature. It is not available in the CLI/TUI. +{% /callout %} + {% /tab %} {% tab label="VSCode (Legacy)" %} From 3d0f851809f270fa1be204526a8e6b7e0753ac6b Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:03:39 +0000 Subject: [PATCH 62/81] wip --- .../code-with-ai/features/browser-use.md | 32 +++---------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/packages/kilo-docs/pages/code-with-ai/features/browser-use.md b/packages/kilo-docs/pages/code-with-ai/features/browser-use.md index a8c2a979a8a..b5889112898 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/browser-use.md +++ b/packages/kilo-docs/pages/code-with-ai/features/browser-use.md @@ -27,20 +27,7 @@ Browser automation is auto-configured in the extension: {% /tab %} {% tab label="CLI" %} -Kilo Code uses [Playwright](https://playwright.dev/) via MCP (`@playwright/mcp@latest`) for browser automation. Add the MCP server to your `kilo.jsonc` configuration: - -```json -{ - "mcp": { - "playwright": { - "type": "local", - "command": ["npx", "-y", "@playwright/mcp@latest"] - } - } -} -``` - -Playwright downloads Chromium automatically on first use. +Browser automation is built into Kilo and requires no manual setup. Enable it from **Settings → Browser** and Kilo handles the rest automatically. {% /tab %} {% tab label="VSCode (Legacy)" %} @@ -162,20 +149,11 @@ Browser automation settings are available under **Settings → Browser**: {% /tab %} {% tab label="CLI" %} -Browser automation requires manual MCP configuration in your `kilo.jsonc` file: +Browser automation settings are available under **Settings → Browser**: -```json -{ - "mcp": { - "playwright": { - "type": "local", - "command": ["npx", "-y", "@playwright/mcp@latest"] - } - } -} -``` - -No additional settings are needed — the Playwright MCP server manages the browser lifecycle automatically. Chromium is downloaded on first use. +- **Enable browser automation**: Toggle to enable or disable browser automation +- **Headless mode**: Run the browser without a visible window (default: disabled) +- **Use system Chrome**: Use your installed Chrome instead of the bundled browser {% /tab %} {% tab label="VSCode (Legacy)" %} From 36a6b3f309fcb9a91c9c0e63c4bb19911f9ddf9b Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:05:43 +0000 Subject: [PATCH 63/81] docs(code-with-ai): update browser-use docs to describe built-in browser automation rewrite VSCode tab to describe built-in browser automation remove Playwright MCP references and auto-download details update CLI tab to describe natural-language driven browser actions adjust key characteristics to generic terms: enable, headless, system Chrome --- .../code-with-ai/features/browser-use.md | 35 +++---------------- 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/packages/kilo-docs/pages/code-with-ai/features/browser-use.md b/packages/kilo-docs/pages/code-with-ai/features/browser-use.md index b5889112898..077278a66bb 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/browser-use.md +++ b/packages/kilo-docs/pages/code-with-ai/features/browser-use.md @@ -16,13 +16,7 @@ Browser Use requires an advanced agentic model. It is typically most reliable wi {% tabs %} {% tab label="VSCode" %} -Kilo Code uses [Playwright](https://playwright.dev/) via MCP (`@playwright/mcp@latest`) for browser automation. The Playwright MCP server is registered dynamically as `kilo-playwright`. - -Browser automation is auto-configured in the extension: - -- Toggle it on from **Settings → Browser** tab -- Configure `browserAutomation.headless` and `browserAutomation.useSystemChrome` settings -- Playwright auto-downloads Chromium on first use +Browser automation is built into the extension and requires no manual setup. Enable it from **Settings → Browser** and Kilo handles the rest automatically. {% /tab %} {% tab label="CLI" %} @@ -64,26 +58,7 @@ For example: {% tabs %} {% tab label="VSCode" %} -The Playwright MCP server provides a set of browser tools for interacting with web pages. These tools return screenshots and accessibility snapshots after each action. - -Key characteristics: - -- The browser launches automatically when a browser tool is invoked -- Multiple browser tools can be used in sequence -- Screenshots are captured after each action for visual feedback - -### Available Browser Tools - -| Tool | Description | When to Use | -| -------------------- | ----------------------------------- | ------------------------------------- | -| `browser_navigate` | Navigates to a URL | Opening a web page | -| `browser_click` | Clicks an element on the page | Interacting with buttons, links, etc. | -| `browser_type` | Types text into an input element | Filling forms, search boxes | -| `browser_screenshot` | Captures a screenshot of the page | Inspecting visual state | -| `browser_scroll` | Scrolls the page or a specific area | Viewing content above or below | -| `browser_hover` | Hovers over an element | Revealing tooltips or menus | -| `browser_select` | Selects an option from a dropdown | Choosing from select elements | -| `browser_drag` | Drags an element to a target | Drag-and-drop interactions | +Kilo launches a browser automatically when asked and returns screenshots after each action so you can see what's happening. It can navigate to URLs, click elements, fill in forms, scroll, hover, select from dropdowns, and drag and drop — all driven by natural language instructions in chat. {% /tab %} {% tab label="CLI" %} @@ -142,9 +117,9 @@ Key characteristics: Browser automation settings are available under **Settings → Browser**: -- **Enable browser automation**: Toggle to enable or disable Playwright browser automation -- **Headless mode** (`browserAutomation.headless`): Run the browser without a visible window (default: disabled) -- **Use system Chrome** (`browserAutomation.useSystemChrome`): Use your installed Chrome instead of the bundled Chromium +- **Enable browser automation**: Toggle to enable or disable browser automation +- **Headless mode**: Run the browser without a visible window (default: disabled) +- **Use system Chrome**: Use your installed Chrome instead of the bundled browser {% /tab %} {% tab label="CLI" %} From 87e2a583ed40630e11107cd3cefd965693cdddb8 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:07:08 +0000 Subject: [PATCH 64/81] docs(kilo-docs): fix inaccuracies flagged in PR review comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix instruction load order: project instructions load before global - Fix setting key: 'config.instructions' → top-level 'instructions' in kilo.jsonc - Fix legacy mode-specific rule filename: .kilorules-{mode} → .kilocoderules-{mode}, clarify .clinerules-{mode} is not supported - Fix agent config precedence: project config (step 3) loads before global agent markdown files (step 4) - Fix watcher setting key: config.watcher.ignore → watcher.ignore (4 occurrences) --- .../pages/customize/context/kilocodeignore.md | 8 ++++---- .../kilo-docs/pages/customize/custom-instructions.md | 12 ++++++------ .../kilo-docs/pages/customize/custom-subagents.md | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/kilo-docs/pages/customize/context/kilocodeignore.md b/packages/kilo-docs/pages/customize/context/kilocodeignore.md index b956db3bfb2..25e979374c2 100644 --- a/packages/kilo-docs/pages/customize/context/kilocodeignore.md +++ b/packages/kilo-docs/pages/customize/context/kilocodeignore.md @@ -29,7 +29,7 @@ The primary mechanism for controlling file access is the **permission system** i If you have an existing `.kilocodeignore` file, it is still supported. The **IgnoreMigrator** automatically converts `.kilocodeignore` patterns into permission `deny` rules on `read` and `edit` tools, so your existing rules continue to work without manual changes. -You can also exclude paths from the file watcher separately using `config.watcher.ignore`: +You can also exclude paths from the file watcher separately using `watcher.ignore`: ```json { @@ -55,7 +55,7 @@ The primary mechanism for controlling file access is the **permission system** i If you have an existing `.kilocodeignore` file, it is still supported. The **IgnoreMigrator** automatically converts `.kilocodeignore` patterns into permission `deny` rules on `read` and `edit` tools, so your existing rules continue to work without manual changes. -You can also exclude paths from the file watcher separately using `config.watcher.ignore`: +You can also exclude paths from the file watcher separately using `watcher.ignore`: ```json { @@ -180,7 +180,7 @@ If you already have a `.kilocodeignore` file, you don't need to do anything — ### File Watcher Exclusions -The `config.watcher.ignore` setting controls which paths the file watcher skips. This is separate from tool permissions and only affects change detection: +The `watcher.ignore` setting controls which paths the file watcher skips. This is separate from tool permissions and only affects change detection: ```json { @@ -220,7 +220,7 @@ If you already have a `.kilocodeignore` file, you don't need to do anything — ### File Watcher Exclusions -The `config.watcher.ignore` setting controls which paths the file watcher skips. This is separate from tool permissions and only affects change detection: +The `watcher.ignore` setting controls which paths the file watcher skips. This is separate from tool permissions and only affects change detection: ```json { diff --git a/packages/kilo-docs/pages/customize/custom-instructions.md b/packages/kilo-docs/pages/customize/custom-instructions.md index 24c4e744326..c46dda3120e 100644 --- a/packages/kilo-docs/pages/customize/custom-instructions.md +++ b/packages/kilo-docs/pages/customize/custom-instructions.md @@ -44,7 +44,7 @@ For instructions that apply across all your projects, place an `AGENTS.md` file - **Kilo:** `~/.config/kilo/AGENTS.md` - **Claude-compatible:** `~/.claude/CLAUDE.md` -Global instructions are loaded before project-level instructions and apply to every session. +Project-level instructions are loaded before global instructions and apply to every session. ### Per-Directory Instructions @@ -54,7 +54,7 @@ This is useful for providing context-specific guidance for different parts of a ## Additional Instruction Sources -The `config.instructions` setting accepts an array of paths, globs, or URLs pointing to additional instruction files. You can manage these in **Settings → Agent Behaviour → Rules** subtab. +The `instructions` key in `kilo.jsonc` accepts an array of paths, globs, or URLs pointing to additional instruction files. You can manage these in **Settings → Agent Behaviour → Rules** subtab. ```yaml # Examples of instruction sources @@ -121,7 +121,7 @@ For instructions that apply across all your projects, place an `AGENTS.md` file - **Kilo:** `~/.config/kilo/AGENTS.md` - **Claude-compatible:** `~/.claude/CLAUDE.md` -Global instructions are loaded before project-level instructions and apply to every session. +Project-level instructions are loaded before global instructions and apply to every session. ### Per-Directory Instructions @@ -131,7 +131,7 @@ This is useful for providing context-specific guidance for different parts of a ## Additional Instruction Sources -The `config.instructions` setting accepts an array of paths, globs, or URLs pointing to additional instruction files. Configure these in your `kilo.jsonc`: +The `instructions` key in `kilo.jsonc` accepts an array of paths, globs, or URLs pointing to additional instruction files. Configure these in your `kilo.jsonc`: ```jsonc // kilo.jsonc @@ -190,10 +190,10 @@ If the mode itself is global (not workspace-specific), any custom instructions y For version-controlled mode instructions, use the mode rules file paths documented in [Custom Modes](/docs/customize/custom-modes#mode-specific-instructions-via-filesdirectories): - Preferred: `.kilo/rules-{mode-slug}/` (directory) -- Fallback: `.kilorules-{mode-slug}` (single file) +- Fallback: `.kilocoderules-{mode-slug}` (single file) {% callout type="info" title="Legacy Naming Note" %} -Older naming like `.clinerules-{mode-slug}` is not the recommended path for current Kilo mode-specific instructions. +Only `.kilocoderules-{mode-slug}` is recognized as the legacy fallback. Older naming like `.clinerules-{mode-slug}` is not supported. {% /callout %} {% /tab %} diff --git a/packages/kilo-docs/pages/customize/custom-subagents.md b/packages/kilo-docs/pages/customize/custom-subagents.md index b6d7051994e..ed4b3340a40 100644 --- a/packages/kilo-docs/pages/customize/custom-subagents.md +++ b/packages/kilo-docs/pages/customize/custom-subagents.md @@ -246,8 +246,8 @@ Agent configurations are merged from multiple sources. Later sources override ea 1. **Built-in agent defaults** (native agents defined in the codebase) 2. **Global config** (`~/.config/kilo/config.json`) -3. **Global agent markdown files** (`~/.config/kilo/agents/*.md`) -4. **Project config** (`kilo.jsonc` in the project root) +3. **Project config** (`kilo.jsonc` in the project root) +4. **Global agent markdown files** (`~/.config/kilo/agents/*.md`) 5. **Project agent markdown files** (`.kilo/agents/*.md`) When overriding a built-in agent, properties are merged — only the fields you specify are overridden. When creating a new custom agent, unspecified fields use sensible defaults (`mode: "all"`, full permissions inherited from global config). From 8c646b6f236baa561bef0172faa841c52d13241e Mon Sep 17 00:00:00 2001 From: Josh Lambert Date: Mon, 30 Mar 2026 12:07:55 -0400 Subject: [PATCH 65/81] =?UTF-8?q?docs(kilo-docs):=20clarify=20migration=20?= =?UTF-8?q?skip=20list=20=E2=80=94=20these=20are=20legacy=20modes,=20not?= =?UTF-8?q?=20CLI=20agents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build and architect are default legacy extension modes that map to the CLI's code and plan agents respectively. They aren't built-in CLI agents themselves. --- packages/kilo-docs/pages/customize/custom-modes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kilo-docs/pages/customize/custom-modes.md b/packages/kilo-docs/pages/customize/custom-modes.md index 73fcf24f8aa..f75a4a6b9c6 100644 --- a/packages/kilo-docs/pages/customize/custom-modes.md +++ b/packages/kilo-docs/pages/customize/custom-modes.md @@ -228,7 +228,7 @@ If you have existing `.kilocodemodes` or `custom_modes.yaml` files from the VSCo - `whenToUse` / `description` to `description` - Mode is set to `primary` -Built-in mode slugs (`code`, `build`, `architect`, `ask`, `debug`, `orchestrator`) are skipped since they have native agent equivalents. +Default legacy mode slugs (`code`, `build`, `architect`, `ask`, `debug`, `orchestrator`) are skipped during migration since they map to built-in agents (`build` → `code`, `architect` → `plan`). {% /tab %} {% tab label="CLI" %} @@ -446,7 +446,7 @@ If you have existing `.kilocodemodes` or `custom_modes.yaml` files from the VSCo - `whenToUse` / `description` to `description` - Mode is set to `primary` -Built-in mode slugs (`code`, `build`, `architect`, `ask`, `debug`, `orchestrator`) are skipped since they have native agent equivalents. +Default legacy mode slugs (`code`, `build`, `architect`, `ask`, `debug`, `orchestrator`) are skipped during migration since they map to built-in agents (`build` → `code`, `architect` → `plan`). {% /tab %} {% tab label="VSCode (Legacy)" %} From 9b3f50a8cbe7ff380dac5b4301e5374161f28255 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:42:47 +0000 Subject: [PATCH 66/81] docs(code-with-ai): remove CLI tab and its info callout in autocomplete docs --- .../pages/code-with-ai/features/autocomplete/index.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md b/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md index 6fecef62164..d26c1d6f086 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md +++ b/packages/kilo-docs/pages/code-with-ai/features/autocomplete/index.md @@ -43,13 +43,6 @@ You can temporarily disable autocomplete by clicking the status bar item to **sn The extension automatically detects if **GitHub Copilot** inline suggestions are enabled and warns you about potential conflicts. Disable Copilot's inline completions for the best experience with Kilo Code autocomplete. -{% /tab %} -{% tab label="CLI" %} - -{% callout type="info" %} -Autocomplete is an **extension-only** feature. It is not available in the CLI/TUI. -{% /callout %} - {% /tab %} {% tab label="VSCode (Legacy)" %} From d9c7abd31f3f17081e86f6abfbff32e6a45cc9a9 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:45:52 +0000 Subject: [PATCH 67/81] docs(code-with-ai): add Playwright config snippet and CLI browser notes - add Playwright config snippet to the CLI tab in browser-use.md - update CLI notes to reflect Playwright manages the browser lifecycle - update Use system Chrome text to clarify default and disable behavior --- .../code-with-ai/features/browser-use.md | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/packages/kilo-docs/pages/code-with-ai/features/browser-use.md b/packages/kilo-docs/pages/code-with-ai/features/browser-use.md index 077278a66bb..40d29c18728 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/browser-use.md +++ b/packages/kilo-docs/pages/code-with-ai/features/browser-use.md @@ -21,7 +21,20 @@ Browser automation is built into the extension and requires no manual setup. Ena {% /tab %} {% tab label="CLI" %} -Browser automation is built into Kilo and requires no manual setup. Enable it from **Settings → Browser** and Kilo handles the rest automatically. +Kilo Code uses [Playwright](https://playwright.dev/) for browser automation. Add it to your `kilo.jsonc` configuration: + +```json +{ + "mcp": { + "playwright": { + "type": "local", + "command": ["npx", "-y", "@playwright/mcp@latest"] + } + } +} +``` + +Playwright downloads Chromium automatically on first use. {% /tab %} {% tab label="VSCode (Legacy)" %} @@ -119,16 +132,12 @@ Browser automation settings are available under **Settings → Browser**: - **Enable browser automation**: Toggle to enable or disable browser automation - **Headless mode**: Run the browser without a visible window (default: disabled) -- **Use system Chrome**: Use your installed Chrome instead of the bundled browser +- **Use system Chrome**: Enabled by default — uses your installed Chrome. Disable to have Playwright download and use Chromium instead. {% /tab %} {% tab label="CLI" %} -Browser automation settings are available under **Settings → Browser**: - -- **Enable browser automation**: Toggle to enable or disable browser automation -- **Headless mode**: Run the browser without a visible window (default: disabled) -- **Use system Chrome**: Use your installed Chrome instead of the bundled browser +Browser automation is configured in your `kilo.jsonc` file. No additional settings are required — Playwright manages the browser lifecycle automatically. {% /tab %} {% tab label="VSCode (Legacy)" %} From 03691ebe4e4c736d3472b44b9c4ad74cae780fb6 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:50:24 +0000 Subject: [PATCH 68/81] fix(cli): restore directory tree in system prompt Remove accidental `&& false` that was introduced in upstream commit 351ddeed91 ("Permission rework #6319") which disabled the filetree from being included in the system prompt for git projects. Upstream issue: https://github.com/anomalyco/opencode/issues/19263 --- packages/opencode/src/session/system.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/session/system.ts b/packages/opencode/src/session/system.ts index 1550d03398b..9fce29731c3 100644 --- a/packages/opencode/src/session/system.ts +++ b/packages/opencode/src/session/system.ts @@ -74,7 +74,7 @@ export namespace SystemPrompt { ``, ``, ` ${ - project.vcs === "git" && false + project.vcs === "git" ? await Ripgrep.tree({ cwd: Instance.directory, limit: 50, From 76d8415ff1669be2ece3e46cf5731f7930b82310 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:57:55 +0000 Subject: [PATCH 69/81] docs(kilo-docs): fix issues flagged by kilo-code-bot review --- .../pages/automate/extending/shell-integration.md | 8 ++++---- packages/kilo-docs/pages/automate/index.md | 1 - .../kilo-docs/pages/automate/mcp/using-in-kilo-code.md | 8 ++++++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/kilo-docs/pages/automate/extending/shell-integration.md b/packages/kilo-docs/pages/automate/extending/shell-integration.md index c88399a1f61..4f1e3312846 100644 --- a/packages/kilo-docs/pages/automate/extending/shell-integration.md +++ b/packages/kilo-docs/pages/automate/extending/shell-integration.md @@ -391,10 +391,10 @@ When using the Kilo Code VS Code extension with the Agent Manager, each agent se ### Keyboard Shortcuts -| Shortcut | Action | -| --------------------------- | --------------------------------------- | -| Cmd+/ | Focus the session's terminal | -| Cmd+. | Return focus to the Agent Manager panel | +| Shortcut | Action | +| --------------------------- | ---------------------------- | +| Cmd+/ | Focus the session's terminal | +| Cmd+. | Cycle agent mode | ### Terminal Context Menu Actions diff --git a/packages/kilo-docs/pages/automate/index.md b/packages/kilo-docs/pages/automate/index.md index 9616faf4a7e..d71a6dce541 100644 --- a/packages/kilo-docs/pages/automate/index.md +++ b/packages/kilo-docs/pages/automate/index.md @@ -36,7 +36,6 @@ Connect Kilo Code to external tools and services: - [**Using MCP in Kilo Code**](/docs/automate/mcp/using-in-kilo-code) — Configuration guide - [**STDIO & SSE Transports**](/docs/automate/mcp/server-transports) — Local and remote server options - [**MCP vs API**](/docs/automate/mcp/mcp-vs-api) — When to use MCP -- [**Using MCP in Kilo Code**](/docs/automate/mcp/using-in-kilo-code) — Configure MCP servers ## Integrations diff --git a/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md b/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md index b89df65d57a..72f9994d1db 100644 --- a/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md +++ b/packages/kilo-docs/pages/automate/mcp/using-in-kilo-code.md @@ -615,6 +615,14 @@ Example: "Analyze the performance of my API" might use an MCP tool that tests AP - **Tool Not Available:** Confirm the server is properly implementing the tool and it's not disabled in settings - **Slow Performance:** Try adjusting the network timeout value for the specific MCP server +{% /tab %} +{% tab label="CLI" %} + +- **Server Not Responding:** Check if the server process is running. Use `kilo mcp debug ` to inspect the connection. +- **Permission Errors:** Ensure API keys and credentials are set in your `kilo.jsonc` config or via `{env:VARIABLE_NAME}` references. +- **Tool Not Available:** Confirm the server is properly implementing the tool and it is not disabled (`"enabled": false`) in your config. +- **Slow Performance:** Increase the `timeout` value for the specific MCP server in your config. + {% /tab %} {% /tabs %} From 5d9ea38171d3a38fce7ca628589899e659f5d530 Mon Sep 17 00:00:00 2001 From: Evgeny Shurakov Date: Mon, 30 Mar 2026 21:30:40 +0200 Subject: [PATCH 70/81] feat(cli): add remote_control config to auto-enable remote session relay Add a `remote_control` boolean config field so users can enable remote session relay by default without the KILO_REMOTE env var or /remote command. --- packages/opencode/src/config/config.ts | 4 ++++ packages/opencode/src/kilo-sessions/kilo-sessions.ts | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index eff231452e0..5b3e3b28de4 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -1159,6 +1159,10 @@ export namespace Config { .boolean() .optional() .describe("@deprecated Use 'share' field instead. Share newly created sessions automatically"), + remote_control: z // kilocode_change + .boolean() + .optional() + .describe("Enable remote control of sessions via Kilo Cloud. Equivalent to running /remote on startup."), autoupdate: z .union([z.boolean(), z.literal("notify")]) .optional() diff --git a/packages/opencode/src/kilo-sessions/kilo-sessions.ts b/packages/opencode/src/kilo-sessions/kilo-sessions.ts index 28c1f4f94e7..2a586ad43f7 100644 --- a/packages/opencode/src/kilo-sessions/kilo-sessions.ts +++ b/packages/opencode/src/kilo-sessions/kilo-sessions.ts @@ -10,6 +10,7 @@ import { clearInFlightCache, withInFlightCache } from "@/kilo-sessions/inflight- import type * as SDK from "@kilocode/sdk/v2" import z from "zod" import { KILO_API_BASE } from "@kilocode/kilo-gateway" +import { Config } from "@/config/config" import { Instance } from "@/project/instance" import { Vcs } from "@/project/vcs" import simpleGit from "simple-git" @@ -205,7 +206,9 @@ export namespace KiloSessions { await ingest.sync(evt.properties.sessionID, [{ type: "session_close", data: { reason: evt.properties.reason } }]) }) - if (remoteEnabled) enableRemote().catch((err) => log.warn("remote not enabled", { error: String(err) })) + const cfg = await Config.get() + if (remoteEnabled || cfg.remote_control) + enableRemote().catch((err) => log.warn("remote not enabled", { error: String(err) })) Bus.subscribe(Bus.InstanceDisposed, () => disableRemote()) } From 8c6d4481171637ce639aff7cd0c8f1f34a7efa79 Mon Sep 17 00:00:00 2001 From: Evgeny Shurakov Date: Mon, 30 Mar 2026 22:11:35 +0200 Subject: [PATCH 71/81] fix(cli): read remote_control from global config only --- packages/opencode/src/kilo-sessions/kilo-sessions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/kilo-sessions/kilo-sessions.ts b/packages/opencode/src/kilo-sessions/kilo-sessions.ts index 2a586ad43f7..76249cf9d5f 100644 --- a/packages/opencode/src/kilo-sessions/kilo-sessions.ts +++ b/packages/opencode/src/kilo-sessions/kilo-sessions.ts @@ -206,7 +206,7 @@ export namespace KiloSessions { await ingest.sync(evt.properties.sessionID, [{ type: "session_close", data: { reason: evt.properties.reason } }]) }) - const cfg = await Config.get() + const cfg = await Config.getGlobal() if (remoteEnabled || cfg.remote_control) enableRemote().catch((err) => log.warn("remote not enabled", { error: String(err) })) Bus.subscribe(Bus.InstanceDisposed, () => disableRemote()) From 12d292ec08d8a1c412cb50f59882ab07cbf22b34 Mon Sep 17 00:00:00 2001 From: Aarav Sharma Date: Mon, 30 Mar 2026 16:50:38 -0600 Subject: [PATCH 72/81] fix: propagate deprecated field in agent merge and show description in dialog --- packages/opencode/src/agent/agent.ts | 1 + packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index 7886a5ee534..3e790f5b31c 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -383,6 +383,7 @@ export namespace Agent { item.mode = value.mode ?? item.mode item.color = value.color ?? item.color item.hidden = value.hidden ?? item.hidden + item.deprecated = value.deprecated ?? item.deprecated item.name = value.name ?? item.name item.steps = value.steps ?? item.steps item.options = mergeDeep(item.options, value.options ?? {}) diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx index 6a8aa1f3f62..68ea2f4c432 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx @@ -13,7 +13,8 @@ export function DialogAgent() { value: item.name, title: item.displayName ?? item.name, // kilocode_change description: - [item.deprecated && "deprecated", item.native && "native"].filter(Boolean).join(", ") || item.description, + [item.deprecated && "deprecated", item.native && "native", item.description].filter(Boolean).join(", ") || + undefined, } }), ) From c4732a6c8c850b5dc9a68c74887e0e53cee015ab Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Tue, 31 Mar 2026 09:02:11 +0300 Subject: [PATCH 73/81] fix(cli): restore agent picker labels --- packages/opencode/src/agent/agent.ts | 2 +- packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index 5773244ba45..8bfbe786a21 100644 --- a/packages/opencode/src/agent/agent.ts +++ b/packages/opencode/src/agent/agent.ts @@ -265,7 +265,7 @@ export namespace Agent { }, orchestrator: { name: "orchestrator", - description: "Deprecated. Coordinate complex tasks by delegating to specialized agents in parallel.", + description: "Coordinate complex tasks by delegating to specialized agents in parallel.", prompt: PROMPT_ORCHESTRATOR, options: {}, permission: PermissionNext.merge( diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx index 68ea2f4c432..6a8aa1f3f62 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-agent.tsx @@ -13,8 +13,7 @@ export function DialogAgent() { value: item.name, title: item.displayName ?? item.name, // kilocode_change description: - [item.deprecated && "deprecated", item.native && "native", item.description].filter(Boolean).join(", ") || - undefined, + [item.deprecated && "deprecated", item.native && "native"].filter(Boolean).join(", ") || item.description, } }), ) From 3558f5e84b143343864b1b9c9955b947d8a7dc29 Mon Sep 17 00:00:00 2001 From: "kiloconnect[bot]" <240665456+kiloconnect[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 07:47:59 +0000 Subject: [PATCH 74/81] fix(vscode): show friendly model name in notification "Try model" button Replace static "Try model" text with "Try " using the model catalog display name. The i18n template now uses {{model}} interpolation across all 18 locales. --- .../src/components/chat/KiloNotifications.tsx | 11 ++++++++++- packages/kilo-vscode/webview-ui/src/i18n/ar.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/br.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/bs.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/da.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/de.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/en.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/es.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/fr.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/ja.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/ko.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/nl.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/no.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/pl.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/ru.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/th.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/tr.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/zh.ts | 2 +- packages/kilo-vscode/webview-ui/src/i18n/zht.ts | 2 +- 19 files changed, 28 insertions(+), 19 deletions(-) diff --git a/packages/kilo-vscode/webview-ui/src/components/chat/KiloNotifications.tsx b/packages/kilo-vscode/webview-ui/src/components/chat/KiloNotifications.tsx index 7beffc2fc00..db18bcce517 100644 --- a/packages/kilo-vscode/webview-ui/src/components/chat/KiloNotifications.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/chat/KiloNotifications.tsx @@ -6,6 +6,7 @@ import { useProvider } from "../../context/provider" import { useLanguage } from "../../context/language" import { KILO_PROVIDER_ID } from "../../../../src/shared/provider-model" import { TelemetryEventName } from "../../../../src/services/telemetry/types" +import { sanitizeName, stripSubProviderPrefix } from "../shared/model-selector-utils" export const KiloNotifications: Component = () => { const { filteredNotifications, dismiss } = useNotifications() @@ -61,6 +62,14 @@ export const KiloNotifications: Component = () => { return true }) + const suggestedName = createMemo(() => { + const suggestion = suggestedModel() + if (!suggestion) return undefined + const model = provider.findModel(suggestion) + if (!model?.name) return undefined + return stripSubProviderPrefix(sanitizeName(model.name)) + }) + const handleTryModel = () => { const suggestion = suggestedModel() if (!suggestion) return @@ -88,7 +97,7 @@ export const KiloNotifications: Component = () => {