diff --git a/.gitattributes b/.gitattributes index 453ae820fe8..d351e0fc83e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,6 @@ +# Enforce LF line endings for all text files +* text=auto eol=lf + # Git LFS tracking for binary/media files *.gif filter=lfs diff=lfs merge=lfs -text *.mp4 filter=lfs diff=lfs merge=lfs -text @@ -5,3 +8,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 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/bun.lock b/bun.lock index db7e3082de2..533df254384 100644 --- a/bun.lock +++ b/bun.lock @@ -27,7 +27,7 @@ }, "packages/app": { "name": "@opencode-ai/app", - "version": "7.1.9", + "version": "7.1.11", "dependencies": { "@kilocode/kilo-i18n": "workspace:*", "@kilocode/kilo-ui": "workspace:*", @@ -79,7 +79,7 @@ }, "packages/desktop": { "name": "@opencode-ai/desktop", - "version": "7.1.9", + "version": "7.1.11", "dependencies": { "@opencode-ai/app": "workspace:*", "@opencode-ai/ui": "workspace:*", @@ -112,7 +112,7 @@ }, "packages/desktop-electron": { "name": "@opencode-ai/desktop-electron", - "version": "7.1.9", + "version": "7.1.11", "dependencies": { "@opencode-ai/app": "workspace:*", "@opencode-ai/ui": "workspace:*", @@ -142,7 +142,7 @@ }, "packages/kilo-docs": { "name": "@kilocode/kilo-docs", - "version": "7.1.9", + "version": "7.1.11", "dependencies": { "@docsearch/css": "^4", "@docsearch/js": "^4", @@ -171,7 +171,7 @@ }, "packages/kilo-gateway": { "name": "@kilocode/kilo-gateway", - "version": "7.1.9", + "version": "7.1.11", "dependencies": { "@ai-sdk/anthropic": "2.0.65", "@ai-sdk/openai": "2.0.101", @@ -206,7 +206,7 @@ }, "packages/kilo-i18n": { "name": "@kilocode/kilo-i18n", - "version": "7.1.9", + "version": "7.1.11", "devDependencies": { "@tsconfig/node22": "catalog:", "@types/bun": "catalog:", @@ -216,7 +216,7 @@ }, "packages/kilo-telemetry": { "name": "@kilocode/kilo-telemetry", - "version": "7.1.9", + "version": "7.1.11", "dependencies": { "@kilocode/kilo-gateway": "workspace:*", "@opentelemetry/api": "1.9.0", @@ -236,7 +236,7 @@ }, "packages/kilo-ui": { "name": "@kilocode/kilo-ui", - "version": "7.1.9", + "version": "7.1.11", "dependencies": { "@kobalte/core": "0.13.11", "@opencode-ai/util": "workspace:*", @@ -271,7 +271,7 @@ }, "packages/kilo-vscode": { "name": "kilo-code", - "version": "7.1.9", + "version": "7.1.11", "dependencies": { "@anthropic-ai/sdk": "^0.39.0", "@kilocode/kilo-i18n": "workspace:*", @@ -324,7 +324,7 @@ }, "packages/opencode": { "name": "@kilocode/cli", - "version": "7.1.9", + "version": "7.1.11", "bin": { "kilo": "./bin/kilo", "kilocode": "./bin/kilo", @@ -446,7 +446,7 @@ }, "packages/plugin": { "name": "@kilocode/plugin", - "version": "7.1.9", + "version": "7.1.11", "dependencies": { "@kilocode/sdk": "workspace:*", "zod": "catalog:", @@ -460,14 +460,14 @@ }, "packages/script": { "name": "@opencode-ai/script", - "version": "7.1.9", + "version": "7.1.11", "devDependencies": { "@types/bun": "catalog:", }, }, "packages/sdk/js": { "name": "@kilocode/sdk", - "version": "7.1.9", + "version": "7.1.11", "devDependencies": { "@hey-api/openapi-ts": "0.90.10", "@tsconfig/node22": "catalog:", @@ -478,7 +478,7 @@ }, "packages/storybook": { "name": "@opencode-ai/storybook", - "version": "7.1.9", + "version": "7.1.11", "devDependencies": { "@opencode-ai/ui": "workspace:*", "@solidjs/meta": "catalog:", @@ -501,7 +501,7 @@ }, "packages/ui": { "name": "@opencode-ai/ui", - "version": "7.1.9", + "version": "7.1.11", "dependencies": { "@kilocode/sdk": "workspace:*", "@kobalte/core": "catalog:", @@ -548,7 +548,7 @@ }, "packages/util": { "name": "@opencode-ai/util", - "version": "7.1.9", + "version": "7.1.11", "dependencies": { "zod": "catalog:", }, diff --git a/package.json b/package.json index 0ecf83a3c63..c2ac3d84d61 100644 --- a/package.json +++ b/package.json @@ -112,6 +112,6 @@ "@openrouter/ai-sdk-provider@1.5.4": "patches/@openrouter%2Fai-sdk-provider@1.5.4.patch", "ghostty-web@0.3.0": "patches/ghostty-web@0.3.0.patch" }, - "version": "7.1.9", + "version": "7.1.11", "peerDependencies": {} } diff --git a/packages/app/package.json b/packages/app/package.json index 3a55c236177..44dc2a05125 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/app", - "version": "7.1.9", + "version": "7.1.11", "description": "", "type": "module", "exports": { diff --git a/packages/desktop-electron/package.json b/packages/desktop-electron/package.json index 37f65e4056d..445b83336a3 100644 --- a/packages/desktop-electron/package.json +++ b/packages/desktop-electron/package.json @@ -1,7 +1,7 @@ { "name": "@opencode-ai/desktop-electron", "private": true, - "version": "7.1.9", + "version": "7.1.11", "type": "module", "license": "MIT", "homepage": "https://opencode.ai", diff --git a/packages/desktop/package.json b/packages/desktop/package.json index 50cb18b9d5c..75eec5cdc73 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,7 +1,7 @@ { "name": "@opencode-ai/desktop", "private": true, - "version": "7.1.9", + "version": "7.1.11", "type": "module", "license": "MIT", "scripts": { diff --git a/packages/extensions/zed/extension.toml b/packages/extensions/zed/extension.toml index bee5ee99c13..12b55abae7e 100644 --- a/packages/extensions/zed/extension.toml +++ b/packages/extensions/zed/extension.toml @@ -1,7 +1,7 @@ id = "kilo" name = "Kilo" description = "The open source coding agent." -version = "7.1.9" +version = "7.1.11" schema_version = 1 authors = ["Anomaly"] repository = "https://github.com/Kilo-Org/kilocode" @@ -11,26 +11,26 @@ name = "Kilo" icon = "./icons/opencode.svg" [agent_servers.opencode.targets.darwin-aarch64] -archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.9/opencode-darwin-arm64.zip" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.11/opencode-darwin-arm64.zip" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.darwin-x86_64] -archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.9/opencode-darwin-x64.zip" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.11/opencode-darwin-x64.zip" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.linux-aarch64] -archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.9/opencode-linux-arm64.tar.gz" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.11/opencode-linux-arm64.tar.gz" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.linux-x86_64] -archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.9/opencode-linux-x64.tar.gz" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.11/opencode-linux-x64.tar.gz" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.windows-x86_64] -archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.9/opencode-windows-x64.zip" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.11/opencode-windows-x64.zip" cmd = "./opencode.exe" args = ["acp"] 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/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/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/lib/nav/kiloclaw.ts b/packages/kilo-docs/lib/nav/kiloclaw.ts index 50262d29f6f..90ee60a72dc 100644 --- a/packages/kilo-docs/lib/nav/kiloclaw.ts +++ b/packages/kilo-docs/lib/nav/kiloclaw.ts @@ -7,19 +7,62 @@ 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/development-tools/github", + 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", + 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", 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/version-pinning", children: "Version Pinning" }, - { href: "/kiloclaw/troubleshooting", children: "Troubleshooting" }, - { href: "/kiloclaw/pricing", children: "Pricing" }, + { + 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" }, + ], + }, + { + 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/package.json b/packages/kilo-docs/package.json index 6a7d7ebc766..32f86b32191 100644 --- a/packages/kilo-docs/package.json +++ b/packages/kilo-docs/package.json @@ -1,6 +1,6 @@ { "name": "@kilocode/kilo-docs", - "version": "7.1.9", + "version": "7.1.11", "private": true, "scripts": { "dev": "next dev --webpack --port 3002", 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..64f4bb7aea2 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": "amazon-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..348b3b84feb 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/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..239e3d779ca 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" %} + +{% 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" %} + +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..f354b533760 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_API_KEY="your-api-key" +``` + +**Config file** (`~/.config/kilo/kilo.json` or `./kilo.json`): + +```jsonc +{ + "provider": { + "fireworks-ai": { + "env": ["FIREWORKS_API_KEY"], + }, + }, +} +``` + +Then set your default model: + +```jsonc +{ + "model": "fireworks-ai/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..7b92cf10287 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": "moonshotai/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..bbfd9ccf991 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/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: 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/extending/shell-integration.md b/packages/kilo-docs/pages/automate/extending/shell-integration.md index 5c7a88187ac..4f1e3312846 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+. | Cycle agent mode | + +### 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/how-tools-work.md b/packages/kilo-docs/pages/automate/how-tools-work.md index ea7d88abe47..5086fdb075d 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,55 @@ greet('World'); **Kilo Code:** (Confirms file creation) +{% /tab %} +{% /tabs %} + ## Tool Safety and Approval +{% tabs %} +{% tab label="VSCode" %} + +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. + +**Default permissions by tool:** + +| 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. + +{% /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 +146,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 +193,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/index.md b/packages/kilo-docs/pages/automate/index.md index 453f0163c50..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 CLI**](/docs/automate/mcp/using-in-cli) — CLI-specific MCP setup ## 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..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 @@ -7,31 +7,103 @@ 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: +{% tabs %} +{% tab label="VSCode" %} -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. +MCP server configurations are stored inside the main Kilo config file. There are two levels: -**Precedence**: If a server name exists in both global and project configurations, the **project-level configuration takes precedence**. +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. -### Editing MCP Settings Files +**Precedence**: Project-level configuration takes precedence over global configuration. -You can edit both global and project-level MCP configuration files directly from the Kilo Code settings. +### Editing MCP 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. +You can edit MCP settings from the Kilo Code settings UI: -{% 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" /%} +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. -Both files use a JSON format with a `mcpServers` object containing named server configurations: +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 `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: **global** (applies across all workspaces) and **project-level** (specific to a single project). Project-level configuration takes precedence over global settings. + +| 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. | + +Project-level configs can be committed to version control to share with your team. + +{% /tab %} +{% tab label="CLI" %} + +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,11 +123,43 @@ 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 %} +{% tab label="VSCode" %} -MCP supports three transport types for server communication: +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. -#### STDIO Transport +{% /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 two main transport types: + +- **Local (STDIO)**: Servers run as a child process on your machine, communicating over stdin/stdout. +- **Remote (HTTP/SSE)**: Servers hosted over HTTP/HTTPS. Kilo Code tries `StreamableHTTP` first, then falls back to `SSE` automatically. + +For more details, see [STDIO & SSE Transports](server-transports). + +### STDIO Transport Used for local servers running on your machine: @@ -69,6 +173,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,7 +192,43 @@ STDIO configuration example: } ``` -#### Streamable HTTP Transport +{% /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 +237,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 +256,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 +323,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 @@ -158,16 +356,95 @@ SSE configuration example: 1. Press the {% codicon name="activate" /%} toggle switch next to the MCP server to enable/disable it +{% /tab %} +{% tab label="VSCode" %} + +In the VS Code extension, manage MCP servers from **Settings → MCP**: + +- **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 + +The extension also supports the `{env:VARIABLE_NAME}` syntax in config files to reference environment variables (see the **CLI** tab for details). + +{% /tab %} +{% tab label="CLI" %} + +### CLI Commands + +| 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 | + +Inside the interactive TUI, use the `/mcps` slash command to toggle MCP servers on or off. + +### Environment Variables + +Use `{env:VARIABLE_NAME}` syntax in config files to reference environment variables: + +```json +{ + "mcp": { + "my-server": { + "type": "remote", + "url": "https://mcp.example.com/mcp", + "headers": { + "Authorization": "Bearer {env:MY_API_KEY}" + } + } + } +} +``` + +{% /tab %} +{% /tabs %} + ### 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" %} + +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": { + "my_server_do_something": "allow", + "my_server_*": "allow" + } +} +``` + +{% /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,41 +455,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. -## 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. - -- **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 %} +{% /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: @@ -252,4 +502,130 @@ For macOS or Linux, you would use a different configuration: {% /callout %} +{% /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" %} + +### Windows + +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 + } + } +} +``` + The same approach can be used for other MCP servers on Windows, adjusting the package name as needed for different server types. + +### 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 + +{% 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 %} +{% 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 %} + +{% 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 %} diff --git a/packages/kilo-docs/pages/automate/tools/index.md b/packages/kilo-docs/pages/automate/tools/index.md index ac473fefdc0..9949a96321d 100644 --- a/packages/kilo-docs/pages/automate/tools/index.md +++ b/packages/kilo-docs/pages/automate/tools/index.md @@ -11,6 +11,92 @@ 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 | +| **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 | + +### 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) + +### 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. + +### 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 +166,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/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" %} 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..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 @@ -7,6 +7,45 @@ 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" %} + +## 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 Autocomplete analyzes your code context and provides: @@ -86,6 +125,9 @@ 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 %} +{% /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..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 @@ -13,6 +13,32 @@ Browser Use requires an advanced agentic model. It is typically most reliable wi ## How Browser Use Works +{% tabs %} +{% tab label="VSCode" %} + +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" %} + +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)" %} + By default, Kilo Code uses a built-in browser that: - Launches automatically when you ask Kilo to visit a website @@ -22,6 +48,9 @@ By default, Kilo Code uses a built-in browser that: All of this happens directly within VS Code, with no setup required. +{% /tab %} +{% /tabs %} + ## Using Browser Use A typical browser interaction follows this pattern: @@ -39,6 +68,38 @@ For example: ## How Browser Actions Work +{% tabs %} +{% tab label="VSCode" %} + +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" %} + +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: @@ -59,8 +120,28 @@ Key characteristics: | `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 browser automation +- **Headless mode**: Run the browser without a visible window (default: disabled) +- **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 is configured in your `kilo.jsonc` file. No additional settings are required — Playwright manages the browser lifecycle automatically. + +{% /tab %} +{% tab label="VSCode (Legacy)" %} + {% callout type="info" title="Default Browser Settings" %} - **Enable browser tool**: Enabled @@ -161,3 +242,6 @@ 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 %} +{% /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..f928aef3899 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,65 @@ 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.jsonc` or `~/.config/kilo/kilo.jsonc`): + +```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="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 %} + +## 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 +84,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 +94,35 @@ 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="CLI" %} + +Checkpoints are captured automatically at each step of a task. 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. Checkpoints appear directly in your chat history in two forms: @@ -93,6 +168,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 +180,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 +269,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/code-with-ai/features/code-actions.md b/packages/kilo-docs/pages/code-with-ai/features/code-actions.md index c36e900e7f6..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 @@ -7,6 +7,37 @@ 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" %} + +## 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? 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 +121,7 @@ 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 %} +{% /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..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 @@ -53,6 +53,20 @@ 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 You can customize how commit messages are generated by modifying the prompt template: @@ -81,6 +95,9 @@ 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 %} +{% /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 40b2255c678..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,6 +1,7 @@ --- title: "Kilo CLI" description: "Using Kilo Code from the command line" +platform: new --- {% 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/`**: 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 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..2db22d89a61 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" %} + +## 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.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-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 +- **[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.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 %} 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/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/packages/kilo-docs/pages/customize/agents-md.md b/packages/kilo-docs/pages/customize/agents-md.md index d451b5e7a7d..a3d19b9b65a 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,35 @@ 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: | Feature | Scope | Location | Purpose | Priority | @@ -148,9 +177,37 @@ 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 %} +{% /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" %} + +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`: ```json { @@ -158,6 +215,9 @@ AGENTS.md support is **enabled by default** in Kilo Code. To disable it, edit `s } ``` +{% /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..3d010446f35 100644 --- a/packages/kilo-docs/pages/customize/context/context-condensing.md +++ b/packages/kilo-docs/pages/customize/context/context-condensing.md @@ -17,9 +17,142 @@ 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" %} + +## 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 -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 +196,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 +214,23 @@ 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 %} +{% /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..25e979374c2 100644 --- a/packages/kilo-docs/pages/customize/context/kilocodeignore.md +++ b/packages/kilo-docs/pages/customize/context/kilocodeignore.md @@ -13,6 +13,61 @@ 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 `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 `watcher.ignore`: + +```json +{ + "watcher": { + "ignore": ["tmp/**", "logs/**"] + } +} +``` + +{% /tab %} +{% 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 +89,9 @@ coverage/ !secrets/README.md ``` +{% /tab %} +{% /tabs %} + ## Pattern Rules `.kilocodeignore` follows the same rules as `.gitignore`: @@ -47,6 +105,35 @@ 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: - [`read_file`](/docs/automate/tools/read-file) @@ -58,17 +145,109 @@ 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 %} +{% /tabs %} + +## Configuration Details + +{% tabs %} +{% tab label="VSCode" %} + +### 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 `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="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 `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 %} + ## 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` (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/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..c46dda3120e 100644 --- a/packages/kilo-docs/pages/customize/custom-instructions.md +++ b/packages/kilo-docs/pages/customize/custom-instructions.md @@ -5,18 +5,162 @@ 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 **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" %} + +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 + +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` + +Project-level instructions are loaded before global 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 `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 +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.jsonc`: + +```jsonc +// kilo.jsonc +{ + "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` + +Project-level instructions are loaded before global 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 `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 +{ + "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="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,20 +181,24 @@ 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 %} -## Mode-Specific Instructions from Files +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) +- 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 %} +{% /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..f75a4a6b9c6 100644 --- a/packages/kilo-docs/pages/customize/custom-modes.md +++ b/packages/kilo-docs/pages/customize/custom-modes.md @@ -5,11 +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). -## 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="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 %} ## Why Use Custom Modes? @@ -18,6 +18,443 @@ 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" %} + +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` + +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" %} + +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` + +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)" %} + +## 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 %} @@ -89,6 +526,57 @@ 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) + +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)" %} + You can create and configure custom modes in several ways: ### 1. Ask Kilo! (Recommended) @@ -135,8 +623,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 +874,46 @@ customModes: - command ``` +{% /tab %} +{% /tabs %} + ## Understanding Regex in Custom Modes -Regular expressions (`fileRegex`) offer fine-grained control over file editing permissions. +{% tabs %} +{% tab label="VSCode" %} + +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: + edit: + "*.md": "allow" + "*": "deny" +``` + +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 %} {% callout type="tip" %} @@ -445,6 +968,183 @@ When a mode attempts to edit a file that doesn't match its `fileRegex` pattern, ## Example Configurations +{% tabs %} +{% tab label="VSCode" %} + +### 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="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 @@ -498,8 +1198,48 @@ customModes: - browser ``` +{% /tab %} +{% /tabs %} + ## Troubleshooting +{% tabs %} +{% tab label="VSCode" %} + +### 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 %} +{% 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 +1254,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! +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..eb3c7fea120 100644 --- a/packages/kilo-docs/pages/customize/custom-rules.md +++ b/packages/kilo-docs/pages/customize/custom-rules.md @@ -26,11 +26,82 @@ 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. +## 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 %} -## Rule Location +{% /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 @@ -59,8 +130,54 @@ Global rules are stored in your home directory and apply to all projects: │ └── documentation_style.md ``` +{% /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. You can access the rules management UI to: @@ -70,8 +187,46 @@ 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 %} +{% /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) Rules are loaded in the following priority order: @@ -86,21 +241,64 @@ 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 %} +{% /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 {% image src="/docs/img/custom-rules/rules-ui.png" alt="Rules tab in Kilo Code" width="400" /%} @@ -132,6 +330,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 +393,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,16 +402,41 @@ 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="CLI" %} + +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 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**: + - **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 %} +{% /tabs %} ## Related Features diff --git a/packages/kilo-docs/pages/customize/custom-subagents.md b/packages/kilo-docs/pages/customize/custom-subagents.md index 2feeb175a66..ed4b3340a40 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 @@ -8,7 +9,7 @@ description: "Create and configure custom subagents in Kilo Code's CLI" 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? @@ -47,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 { @@ -245,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.json` 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). diff --git a/packages/kilo-docs/pages/customize/skills.md b/packages/kilo-docs/pages/customize/skills.md index 8f553d681ef..cc180e4df6a 100644 --- a/packages/kilo-docs/pages/customize/skills.md +++ b/packages/kilo-docs/pages/customize/skills.md @@ -47,6 +47,115 @@ 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) Global skills are located in the `.kilocode` directory within your Home directory. @@ -84,9 +193,29 @@ your-project/ └── SKILL.md ``` +{% /tab %} +{% /tabs %} + ## Mode-Specific Skills -To create a skill that only appears in a specific mode: +{% 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: ```bash # For Code mode only @@ -98,8 +227,24 @@ 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 %} +{% /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: 1. **Project skills override global skills** - A project skill with the same name takes precedence @@ -111,8 +256,34 @@ This allows you to: - Override them per-project when needed - Customize behavior for specific modes +{% /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: - When VSCode starts @@ -126,6 +297,9 @@ 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 %} +{% /tabs %} + ## SKILL.md Format The `SKILL.md` file uses YAML frontmatter followed by Markdown content containing the instructions: @@ -213,62 +387,145 @@ 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: ```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 %} +{% /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" %} + +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="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 +- **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 %} ## Troubleshooting ### 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. 2. **Verify frontmatter**: Ensure `name` exactly matches the directory name and `description` is present. @@ -277,6 +534,9 @@ 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 %} +{% /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 +551,26 @@ 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 %} +{% /tabs %} + ### Common Errors | Error | Cause | Solution | @@ -307,6 +583,24 @@ 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" %} + +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 %} +{% /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 302891b32a4..50ea192b3b6 100644 --- a/packages/kilo-docs/pages/customize/workflows.md +++ b/packages/kilo-docs/pages/customize/workflows.md @@ -1,16 +1,64 @@ --- title: "Workflows" description: "Create automated workflows with Kilo Code" +platform: new --- # 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 +79,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 +115,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 +167,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..acd1bd43ff6 100644 --- a/packages/kilo-docs/pages/getting-started/settings/index.md +++ b/packages/kilo-docs/pages/getting-started/settings/index.md @@ -140,7 +140,29 @@ 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 + +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" %} 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/chat-platforms/discord.md b/packages/kilo-docs/pages/kiloclaw/chat-platforms/discord.md new file mode 100644 index 00000000000..219e6799c68 --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/chat-platforms/discord.md @@ -0,0 +1,67 @@ +--- +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. + +## 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** + +## 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) + +## 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 + +## 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.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 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/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.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/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/version-pinning.md b/packages/kilo-docs/pages/kiloclaw/control-ui/version-pinning.md similarity index 91% rename from packages/kilo-docs/pages/kiloclaw/version-pinning.md rename to packages/kilo-docs/pages/kiloclaw/control-ui/version-pinning.md index 5f2157e7629..9905620b83a 100644 --- a/packages/kilo-docs/pages/kiloclaw/version-pinning.md +++ b/packages/kilo-docs/pages/kiloclaw/control-ui/version-pinning.md @@ -45,9 +45,3 @@ To return to automatic updates: {% 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) 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/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/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/pricing.md b/packages/kilo-docs/pages/kiloclaw/faq/pricing.md similarity index 81% rename from packages/kilo-docs/pages/kiloclaw/pricing.md rename to packages/kilo-docs/pages/kiloclaw/faq/pricing.md index 2d4be00d332..e63d9aa99b2 100644 --- a/packages/kilo-docs/pages/kiloclaw/pricing.md +++ b/packages/kilo-docs/pages/kiloclaw/faq/pricing.md @@ -1,37 +1,31 @@ --- -title: "KiloClaw Pricing" +title: "Pricing" description: "Pricing details for KiloClaw instances and model inference" --- -# KiloClaw Pricing +# 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 +## 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 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 +## 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 +## 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/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) 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..79a23bf4622 --- /dev/null +++ b/packages/kilo-docs/pages/kiloclaw/tools/agentcard.md @@ -0,0 +1,44 @@ +--- +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. + +## 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/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. diff --git a/packages/kilo-docs/pages/kiloclaw/troubleshooting.md b/packages/kilo-docs/pages/kiloclaw/troubleshooting.md deleted file mode 100644 index e90f39738d2..00000000000 --- a/packages/kilo-docs/pages/kiloclaw/troubleshooting.md +++ /dev/null @@ -1,111 +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. - -### Can I install tailscale on my KiloClaw instance? - -Not at this time. - -### Can I update the version of Node on my instance? - -Not at this time. - -### How do I upgrade the OpenClaw version? Can I upgrade it myself? - -Updates are managed by the KiloClaw platform team to ensure stability and dependency availability. 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](https://app.kilo.ai/claw). Do **not** click **Update Now** inside the OpenClaw Control UI — this is not supported for KiloClaw instances and may break your setup. - -If you need to roll back, use the [version pinning](/docs/kiloclaw/version-pinning) dialog in the Settings tab. - -## 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/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 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", diff --git a/packages/kilo-gateway/package.json b/packages/kilo-gateway/package.json index f34e197bafe..cc0c2cc9aef 100644 --- a/packages/kilo-gateway/package.json +++ b/packages/kilo-gateway/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@kilocode/kilo-gateway", - "version": "7.1.9", + "version": "7.1.11", "type": "module", "license": "MIT", "description": "Unified Kilo Gateway package for OpenCode - authentication, provider, and API integration", diff --git a/packages/kilo-i18n/package.json b/packages/kilo-i18n/package.json index 07517ac4163..b709bbcea07 100644 --- a/packages/kilo-i18n/package.json +++ b/packages/kilo-i18n/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@kilocode/kilo-i18n", - "version": "7.1.9", + "version": "7.1.11", "type": "module", "license": "MIT", "description": "Kilo-specific i18n translations and overrides", diff --git a/packages/kilo-telemetry/package.json b/packages/kilo-telemetry/package.json index 8295a09104c..c4c56bb6060 100644 --- a/packages/kilo-telemetry/package.json +++ b/packages/kilo-telemetry/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@kilocode/kilo-telemetry", - "version": "7.1.9", + "version": "7.1.11", "type": "module", "license": "MIT", "description": "Telemetry for Kilo CLI - PostHog analytics integration", diff --git a/packages/kilo-ui/package.json b/packages/kilo-ui/package.json index 9b7525e0312..1e9a2132eac 100644 --- a/packages/kilo-ui/package.json +++ b/packages/kilo-ui/package.json @@ -1,6 +1,6 @@ { "name": "@kilocode/kilo-ui", - "version": "7.1.9", + "version": "7.1.11", "type": "module", "license": "MIT", "exports": { diff --git a/packages/kilo-vscode/package.json b/packages/kilo-vscode/package.json index c694463f8aa..66f29057028 100644 --- a/packages/kilo-vscode/package.json +++ b/packages/kilo-vscode/package.json @@ -2,7 +2,7 @@ "name": "kilo-code", "displayName": "Kilo Code: AI Coding Agent, Copilot, and Autocomplete", "description": "Open Source AI coding agent that generates code from natural language, automates tasks, and runs terminal commands. Features inline autocomplete, browser automation, automated refactoring, and custom modes for planning, coding, and debugging. Supports 500+ AI models including Claude (Anthropic), Gemini, Grok, GPT, Codex and GLM.", - "version": "7.1.9", + "version": "7.1.11", "icon": "assets/icons/logo-outline-black.png", "galleryBanner": { "color": "#FFFFFF", diff --git a/packages/kilo-vscode/src/KiloProvider.ts b/packages/kilo-vscode/src/KiloProvider.ts index 8378c5629b8..217cd12c020 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 @@ -575,6 +580,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", this.projectDirectory) + break case "openChanges": vscode.commands.executeCommand("kilo-code.new.showChanges") break @@ -1513,6 +1521,7 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper mode: a.mode, native: a.native, color: a.color, + deprecated: a.deprecated, })), defaultAgent, } @@ -1825,11 +1834,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/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/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}`) }) } 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/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" }) 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. */ diff --git a/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts b/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts index 28d8cf5dca3..02c67a2357b 100644 --- a/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts +++ b/packages/kilo-vscode/src/legacy-migration/provider-mapping.ts @@ -251,6 +251,13 @@ export const PROVIDER_MAP: Record = { key: "syntheticApiKey", name: "Synthetic", }, + apertis: { + id: "apertis", + key: "apertisApiKey", + name: "Apertis", + modelField: "apertisModelId", + urlField: "apertisBaseUrl", + }, "openai-codex": { id: "openai", key: "", @@ -295,7 +302,6 @@ export const UNSUPPORTED_PROVIDERS = new Set([ "virtual-quota-fallback", "glama", "roo", - "apertis", ]) /** Built-in default mode slugs that should not be migrated */ 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..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() @@ -500,14 +504,25 @@ 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 promise = this.fetchAndCacheSuggestion(prompt, prefix, suffix, languageId) + const leading: PendingRequest = { prefix, suffix, promise } + promise.finally(() => this.removePendingRequest(leading)) + this.pendingRequests.push(leading) + 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 @@ -520,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 @@ -531,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) 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 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" }]) + }) }) // --------------------------------------------------------------------------- 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") }) }) }) 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 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..d6cd8121d1b 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 { 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(model.name) + }) + const handleTryModel = () => { const suggestion = suggestedModel() if (!suggestion) return @@ -88,7 +97,7 @@ export const KiloNotifications: 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 575b1a62e14..52d29f4a028 100644 --- a/packages/kilo-vscode/webview-ui/src/components/migration/migration.css +++ b/packages/kilo-vscode/webview-ui/src/components/migration/migration.css @@ -68,18 +68,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/components/profile/ProfileView.tsx b/packages/kilo-vscode/webview-ui/src/components/profile/ProfileView.tsx index f1f29cade1b..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")}

-
+
{ 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("") const [newInstruction, setNewInstruction] = createSignal("") + const browse = () => vscode.postMessage({ type: "openMarketplacePanel" }) // Agent view state const [agentView, setAgentView] = createSignal("list") @@ -301,6 +304,9 @@ const AgentBehaviourTab: Component = () => { + @@ -343,6 +349,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")} + +
{ return (
+
+ +
0} fallback={ @@ -722,6 +754,18 @@ const AgentBehaviourTab: Component = () => { const renderSkillsSubtab = () => (
+
+ +
{/* Discovered skills */}

{language.t("settings.agentBehaviour.discoveredSkills")} diff --git a/packages/kilo-vscode/webview-ui/src/components/shared/ModeSwitcher.tsx b/packages/kilo-vscode/webview-ui/src/components/shared/ModeSwitcher.tsx index 422d0b4801a..e8e4424bc0e 100644 --- a/packages/kilo-vscode/webview-ui/src/components/shared/ModeSwitcher.tsx +++ b/packages/kilo-vscode/webview-ui/src/components/shared/ModeSwitcher.tsx @@ -11,6 +11,7 @@ import { Component, createSignal, onCleanup, For, Show } from "solid-js" import { PopupSelector } from "./PopupSelector" import { Button } from "@kilocode/kilo-ui/button" import { useSession } from "../../context/session" +import { useLanguage } from "../../context/language" import type { AgentInfo } from "../../types/messages" /** Format an agent for display. Uses displayName if available, otherwise title-cases the slug. */ @@ -38,6 +39,7 @@ export interface ModeSwitcherBaseProps { export const ModeSwitcherBase: Component = (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 8ac9723457a..d915e5ff3f0 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ar.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ar.ts @@ -1066,6 +1066,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 أدناه لإتاحة المهارات.", @@ -1136,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": "تُدار سير العمل عبر ملفات سير العمل في مساحة العمل.", @@ -1218,7 +1220,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": @@ -1277,8 +1278,8 @@ export const dict = { "settings.saveBar.warning.many": "عدة جلسات تعمل وستتوقف", "settings.saveBar.saveAnyway": "حفظ على أي حال", "settings.saveBar.cancel": "إلغاء", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "السابق", + "notifications.action.next": "التالي", + "notifications.action.close": "إغلاق", + "notifications.action.tryModel": "جرّب {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/br.ts b/packages/kilo-vscode/webview-ui/src/i18n/br.ts index ae3354126f7..646ace5e035 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/br.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/br.ts @@ -1084,6 +1084,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.", @@ -1157,6 +1158,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": @@ -1247,7 +1249,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": @@ -1306,8 +1307,8 @@ export const dict = { "settings.saveBar.warning.many": "Várias sessões estão em execução e serão interrompidas", "settings.saveBar.saveAnyway": "Salvar mesmo assim", "settings.saveBar.cancel": "Cancelar", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "Anterior", + "notifications.action.next": "Próximo", + "notifications.action.close": "Fechar", + "notifications.action.tryModel": "Experimentar {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/bs.ts b/packages/kilo-vscode/webview-ui/src/i18n/bs.ts index d64c14baf07..5dfa0817e15 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/bs.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/bs.ts @@ -1082,6 +1082,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.", @@ -1153,6 +1154,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.", @@ -1243,7 +1245,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": @@ -1302,8 +1303,8 @@ export const dict = { "settings.saveBar.warning.many": "Nekoliko sesija je pokrenuto i bit će prekinuto", "settings.saveBar.saveAnyway": "Spremi svejedno", "settings.saveBar.cancel": "Otkaži", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "Prethodni", + "notifications.action.next": "Sljedeći", + "notifications.action.close": "Zatvori", + "notifications.action.tryModel": "Probaj {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/da.ts b/packages/kilo-vscode/webview-ui/src/i18n/da.ts index a8eeecae1f4..161c3a283ca 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/da.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/da.ts @@ -1076,6 +1076,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.", @@ -1146,6 +1147,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.", @@ -1233,7 +1235,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": @@ -1293,8 +1294,8 @@ export const dict = { "settings.saveBar.warning.many": "Flere sessioner kører og vil blive afbrudt", "settings.saveBar.saveAnyway": "Gem alligevel", "settings.saveBar.cancel": "Annuller", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "Forrige", + "notifications.action.next": "Næste", + "notifications.action.close": "Luk", + "notifications.action.tryModel": "Prøv {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/de.ts b/packages/kilo-vscode/webview-ui/src/i18n/de.ts index 8f7c6805178..efe7ecdf898 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/de.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/de.ts @@ -1096,6 +1096,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.", @@ -1169,6 +1170,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": @@ -1259,7 +1261,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", @@ -1320,8 +1321,8 @@ export const dict = { "settings.saveBar.warning.many": "Mehrere Sitzungen laufen und werden unterbrochen", "settings.saveBar.saveAnyway": "Trotzdem speichern", "settings.saveBar.cancel": "Abbrechen", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "Zurück", + "notifications.action.next": "Weiter", + "notifications.action.close": "Schließen", + "notifications.action.tryModel": "{{model}} ausprobieren", } satisfies Partial> diff --git a/packages/kilo-vscode/webview-ui/src/i18n/en.ts b/packages/kilo-vscode/webview-ui/src/i18n/en.ts index fbb8f1191b9..7e5d1c0f01e 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/en.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/en.ts @@ -1078,6 +1078,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.", @@ -1116,6 +1117,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.", @@ -1244,7 +1246,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": @@ -1308,5 +1309,5 @@ export const dict = { "notifications.action.previous": "Previous", "notifications.action.next": "Next", "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.tryModel": "Try {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/es.ts b/packages/kilo-vscode/webview-ui/src/i18n/es.ts index d83c3168d3e..1b0a8b80b3a 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/es.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/es.ts @@ -1087,6 +1087,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.", @@ -1161,6 +1162,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": @@ -1250,7 +1252,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": @@ -1310,8 +1311,8 @@ export const dict = { "settings.saveBar.warning.many": "Varias sesiones están en ejecución y se interrumpirán", "settings.saveBar.saveAnyway": "Guardar de todas formas", "settings.saveBar.cancel": "Cancelar", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "Anterior", + "notifications.action.next": "Siguiente", + "notifications.action.close": "Cerrar", + "notifications.action.tryModel": "Probar {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/fr.ts b/packages/kilo-vscode/webview-ui/src/i18n/fr.ts index 051bab83981..e1865dbfbae 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/fr.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/fr.ts @@ -1098,6 +1098,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.", @@ -1173,6 +1174,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": @@ -1263,7 +1265,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": @@ -1323,8 +1324,8 @@ export const dict = { "settings.saveBar.warning.many": "Plusieurs sessions sont en cours et seront interrompues", "settings.saveBar.saveAnyway": "Enregistrer quand même", "settings.saveBar.cancel": "Annuler", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "Précédent", + "notifications.action.next": "Suivant", + "notifications.action.close": "Fermer", + "notifications.action.tryModel": "Essayer {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ja.ts b/packages/kilo-vscode/webview-ui/src/i18n/ja.ts index f65245c19d9..038f2a7f4b6 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ja.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ja.ts @@ -1076,6 +1076,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を追加してください。", @@ -1147,6 +1148,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": @@ -1233,7 +1235,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": @@ -1292,8 +1293,8 @@ export const dict = { "settings.saveBar.warning.many": "複数のセッションが実行中で中断されます", "settings.saveBar.saveAnyway": "それでも保存", "settings.saveBar.cancel": "キャンセル", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "前へ", + "notifications.action.next": "次へ", + "notifications.action.close": "閉じる", + "notifications.action.tryModel": "{{model}}を試す", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ko.ts b/packages/kilo-vscode/webview-ui/src/i18n/ko.ts index 4e9f93ba204..fd28bd4da0c 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ko.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ko.ts @@ -1073,6 +1073,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을 추가하세요.", @@ -1141,6 +1142,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": "워크플로우는 워크스페이스의 워크플로우 파일을 통해 관리됩니다.", @@ -1221,7 +1223,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": @@ -1280,8 +1281,8 @@ export const dict = { "settings.saveBar.warning.many": "여러 세션이 실행 중이며 중단됩니다", "settings.saveBar.saveAnyway": "그래도 저장", "settings.saveBar.cancel": "취소", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "이전", + "notifications.action.next": "다음", + "notifications.action.close": "닫기", + "notifications.action.tryModel": "{{model}} 시도", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/nl.ts b/packages/kilo-vscode/webview-ui/src/i18n/nl.ts index 87cbe8ef733..14dd51e58ef 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/nl.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/nl.ts @@ -1086,6 +1086,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.", @@ -1135,6 +1136,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.", @@ -1237,7 +1239,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": @@ -1298,8 +1299,8 @@ export const dict = { "settings.saveBar.warning.many": "Meerdere sessies zijn actief en worden onderbroken", "settings.saveBar.saveAnyway": "Toch opslaan", "settings.saveBar.cancel": "Annuleren", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "Vorige", + "notifications.action.next": "Volgende", + "notifications.action.close": "Sluiten", + "notifications.action.tryModel": "Probeer {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/no.ts b/packages/kilo-vscode/webview-ui/src/i18n/no.ts index ce43e675979..306fd74428a 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/no.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/no.ts @@ -1079,6 +1079,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.", @@ -1149,6 +1150,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.", @@ -1234,7 +1236,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": @@ -1291,8 +1292,8 @@ export const dict = { "settings.saveBar.warning.many": "Flere økter kjører og vil bli avbrutt", "settings.saveBar.saveAnyway": "Lagre uansett", "settings.saveBar.cancel": "Avbryt", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "Forrige", + "notifications.action.next": "Neste", + "notifications.action.close": "Lukk", + "notifications.action.tryModel": "Prøv {{model}}", } satisfies Partial> diff --git a/packages/kilo-vscode/webview-ui/src/i18n/pl.ts b/packages/kilo-vscode/webview-ui/src/i18n/pl.ts index 6d79e1c6205..3518ab6cd44 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/pl.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/pl.ts @@ -1080,6 +1080,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.", @@ -1153,6 +1154,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.", @@ -1242,7 +1244,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": @@ -1301,8 +1302,8 @@ export const dict = { "settings.saveBar.warning.many": "Kilka sesji jest uruchomionych i zostanie przerwanych", "settings.saveBar.saveAnyway": "Zapisz mimo to", "settings.saveBar.cancel": "Anuluj", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "Poprzedni", + "notifications.action.next": "Następny", + "notifications.action.close": "Zamknij", + "notifications.action.tryModel": "Wypróbuj {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/ru.ts b/packages/kilo-vscode/webview-ui/src/i18n/ru.ts index 293dfb78577..7f5866475dc 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/ru.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/ru.ts @@ -1082,6 +1082,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-адреса ниже, чтобы сделать навыки доступными.", @@ -1154,6 +1155,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": "Рабочие процессы управляются через файлы рабочих процессов.", @@ -1241,7 +1243,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": @@ -1300,8 +1301,8 @@ export const dict = { "settings.saveBar.warning.many": "Несколько сеансов выполняются и будут прерваны", "settings.saveBar.saveAnyway": "Сохранить в любом случае", "settings.saveBar.cancel": "Отмена", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "Назад", + "notifications.action.next": "Далее", + "notifications.action.close": "Закрыть", + "notifications.action.tryModel": "Попробовать {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/th.ts b/packages/kilo-vscode/webview-ui/src/i18n/th.ts index 4b826b3317a..f19a93d25aa 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/th.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/th.ts @@ -1068,6 +1068,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": "โหมดกำหนดเองที่ใช้ได้", @@ -1137,6 +1138,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": "เวิร์กโฟลว์จัดการผ่านไฟล์เวิร์กโฟลว์ในพื้นที่ทำงาน", @@ -1217,7 +1219,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": @@ -1276,8 +1277,8 @@ export const dict = { "settings.saveBar.warning.many": "มีหลายเซสชันกำลังทำงานและจะถูกขัดจังหวะ", "settings.saveBar.saveAnyway": "บันทึกต่อไป", "settings.saveBar.cancel": "ยกเลิก", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "ก่อนหน้า", + "notifications.action.next": "ถัดไป", + "notifications.action.close": "ปิด", + "notifications.action.tryModel": "ลองใช้ {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/tr.ts b/packages/kilo-vscode/webview-ui/src/i18n/tr.ts index ae0fe2fa314..ff0dc211a26 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/tr.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/tr.ts @@ -1083,6 +1083,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.", @@ -1131,6 +1132,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.", @@ -1290,8 +1292,8 @@ export const dict = { "settings.saveBar.warning.many": "Birden fazla oturum çalışıyor ve kesintiye uğrayacak", "settings.saveBar.saveAnyway": "Yine de kaydet", "settings.saveBar.cancel": "İptal", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "Önceki", + "notifications.action.next": "Sonraki", + "notifications.action.close": "Kapat", + "notifications.action.tryModel": "Dene {{model}}", } diff --git a/packages/kilo-vscode/webview-ui/src/i18n/zh.ts b/packages/kilo-vscode/webview-ui/src/i18n/zh.ts index 91e2e50edd7..f7eb55f25c5 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/zh.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/zh.ts @@ -1058,6 +1058,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": "可用自定义模式", @@ -1122,6 +1123,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": @@ -1195,7 +1197,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": @@ -1253,8 +1254,8 @@ export const dict = { "settings.saveBar.warning.many": "多个会话正在运行,将被中断", "settings.saveBar.saveAnyway": "仍然保存", "settings.saveBar.cancel": "取消", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "上一个", + "notifications.action.next": "下一个", + "notifications.action.close": "关闭", + "notifications.action.tryModel": "尝试 {{model}}", } satisfies Partial> diff --git a/packages/kilo-vscode/webview-ui/src/i18n/zht.ts b/packages/kilo-vscode/webview-ui/src/i18n/zht.ts index 58cc5597892..677e7ed3478 100644 --- a/packages/kilo-vscode/webview-ui/src/i18n/zht.ts +++ b/packages/kilo-vscode/webview-ui/src/i18n/zht.ts @@ -1060,6 +1060,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": "可用自訂模式", @@ -1125,6 +1126,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": @@ -1198,7 +1200,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": @@ -1256,8 +1257,8 @@ export const dict = { "settings.saveBar.warning.many": "多個工作階段正在執行,將被中斷", "settings.saveBar.saveAnyway": "仍然儲存", "settings.saveBar.cancel": "取消", - "notifications.action.previous": "Previous", - "notifications.action.next": "Next", - "notifications.action.close": "Close", - "notifications.action.tryModel": "Try model", + "notifications.action.previous": "上一個", + "notifications.action.next": "下一個", + "notifications.action.close": "關閉", + "notifications.action.tryModel": "嘗試 {{model}}", } satisfies Partial> 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"] { diff --git a/packages/kilo-vscode/webview-ui/src/types/messages.ts b/packages/kilo-vscode/webview-ui/src/types/messages.ts index 7a2b10db87f..7d24b879f5b 100644 --- a/packages/kilo-vscode/webview-ui/src/types/messages.ts +++ b/packages/kilo-vscode/webview-ui/src/types/messages.ts @@ -220,6 +220,7 @@ export interface AgentInfo { mode: "subagent" | "primary" | "all" native?: boolean hidden?: boolean + deprecated?: boolean color?: string } @@ -1482,6 +1483,10 @@ export interface OpenSettingsPanelRequest { tab?: string } +export interface OpenMarketplacePanelRequest { + type: "openMarketplacePanel" +} + export interface RequestAgentsMessage { type: "requestAgents" } @@ -2021,6 +2026,7 @@ export type WebviewMessage = | RefreshProfileRequest | OpenExternalRequest | OpenSettingsPanelRequest + | OpenMarketplacePanelRequest | OpenFileRequest | CancelLoginRequest | SetOrganizationRequest diff --git a/packages/opencode/package.json b/packages/opencode/package.json index 8d9afc5db37..3a0c5bc7f5c 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "7.1.9", + "version": "7.1.11", "name": "@kilocode/cli", "type": "module", "license": "MIT", diff --git a/packages/opencode/src/agent/agent.ts b/packages/opencode/src/agent/agent.ts index 16305db1286..8bfbe786a21 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(), @@ -111,6 +112,77 @@ 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", + // text processing (stdout only, no file modification) + "grep *": "allow", + "rg *": "allow", + "ag *": "allow", + "sort *": "allow", + "uniq *": "allow", + "cut *": "allow", + "tr *": "allow", + "jq *": "allow", + // git — allowlist of read-only subcommands, deny everything else + "git *": "deny", + "git log *": "allow", + "git show *": "allow", + "git diff *": "allow", + "git status *": "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 stash list *": "allow", + "git tag -l *": "allow", + "git branch --list *": "allow", + "git branch -a *": "allow", + "git branch -r *": "allow", + "git remote -v *": "allow", + // 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({ "*": "allow", bash, // kilocode_change @@ -226,6 +298,7 @@ export namespace Agent { ), mode: "primary", native: true, + deprecated: true, }, ask: { name: "ask", @@ -237,6 +310,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", @@ -254,7 +328,9 @@ export namespace Agent { external_directory: { [Truncate.GLOB]: "allow", }, + ...mcpRules, }), + user.filter((r) => r.action === "deny"), // kilocode_change: re-apply user denies so explicit MCP blocks win over mcpRules ), mode: "primary", native: true, @@ -381,6 +457,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/agent/prompt/ask.txt b/packages/opencode/src/agent/prompt/ask.txt index 32f9e74e3ef..fc96b149ab1 100644 --- a/packages/opencode/src/agent/prompt/ask.txt +++ b/packages/opencode/src/agent/prompt/ask.txt @@ -4,5 +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 -- 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, etc.) to gather information +- 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 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/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/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..76249cf9d5f 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.getGlobal() + if (remoteEnabled || cfg.remote_control) + enableRemote().catch((err) => log.warn("remote not enabled", { error: String(err) })) Bus.subscribe(Bus.InstanceDisposed, () => disableRemote()) } 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/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/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 } }), ) 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 ceb7db4b7e6..5d97f0939b3 100644 --- a/packages/opencode/src/provider/models.ts +++ b/packages/opencode/src/provider/models.ts @@ -178,6 +178,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 } diff --git a/packages/opencode/src/session/index.ts b/packages/opencode/src/session/index.ts index f7141c759e7..a61cbe5c533 100644 --- a/packages/opencode/src/session/index.ts +++ b/packages/opencode/src/session/index.ts @@ -23,6 +23,7 @@ import { fn } from "@/util/fn" import { Command } from "../command" import { Snapshot } from "@/snapshot" import { WorkspaceContext } from "../control-plane/workspace-context" +import { Filesystem } from "../util/filesystem" // kilocode_change: normalize directory for Windows drive-letter casing import type { Provider } from "@/provider/provider" import { PermissionNext } from "@/permission/next" @@ -578,7 +579,9 @@ export namespace Session { conditions.push(eq(SessionTable.workspace_id, WorkspaceContext.workspaceID)) } if (input?.directory) { - conditions.push(eq(SessionTable.directory, input.directory)) + // kilocode_change start: vscode uri.fsPath gives lowercase drive letter on Windows; resolve() canonicalises to match stored path + conditions.push(eq(SessionTable.directory, Filesystem.resolve(input.directory))) + // kilocode_change end } if (input?.roots) { conditions.push(isNull(SessionTable.parent_id)) @@ -618,7 +621,9 @@ export namespace Session { const conditions: SQL[] = [] if (input?.directory) { - conditions.push(eq(SessionTable.directory, input.directory)) + // kilocode_change start: vscode uri.fsPath gives lowercase drive letter on Windows; resolve() canonicalises to match stored path + conditions.push(eq(SessionTable.directory, Filesystem.resolve(input.directory))) + // kilocode_change end } if (input?.roots) { conditions.push(isNull(SessionTable.parent_id)) 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, 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) + }) }) 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..31bd7f3d796 --- /dev/null +++ b/packages/opencode/test/kilocode/ask-agent-permissions.test.ts @@ -0,0 +1,334 @@ +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", + "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", + "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", +} + +/** 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 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" + } + // 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", () => { + 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"], + ["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", + "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) { + test(`"${cmd}" → deny`, () => { + const result = PermissionNext.evaluate("bash", cmd, ruleset) + expect(result.action).toBe("deny") + }) + } + }) + + describe("denied write/execute commands", () => { + const denied = [ + "find . -exec rm {} \\;", + "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) + }) + + 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) + }) +}) diff --git a/packages/plugin/package.json b/packages/plugin/package.json index 30140516b87..b95a1cdd854 100644 --- a/packages/plugin/package.json +++ b/packages/plugin/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@kilocode/plugin", - "version": "7.1.9", + "version": "7.1.11", "type": "module", "license": "MIT", "scripts": { diff --git a/packages/script/package.json b/packages/script/package.json index cdb36ec1b58..f781c6a94f3 100644 --- a/packages/script/package.json +++ b/packages/script/package.json @@ -8,7 +8,7 @@ "exports": { ".": "./src/index.ts" }, - "version": "7.1.9", + "version": "7.1.11", "dependencies": {}, "peerDependencies": {} } diff --git a/packages/sdk/js/package.json b/packages/sdk/js/package.json index 2a335855008..7a29e2e3a1a 100644 --- a/packages/sdk/js/package.json +++ b/packages/sdk/js/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@kilocode/sdk", - "version": "7.1.9", + "version": "7.1.11", "type": "module", "license": "MIT", "scripts": { diff --git a/packages/sdk/js/src/client.ts b/packages/sdk/js/src/client.ts index 54b4c709fcf..693dce23404 100644 --- a/packages/sdk/js/src/client.ts +++ b/packages/sdk/js/src/client.ts @@ -8,9 +8,13 @@ export { type Config as KiloClientConfig, KiloClient } export function createKiloClient(config?: Config & { directory?: string }) { if (!config?.fetch) { const customFetch: any = (req: any) => { - // @ts-ignore - req.timeout = false - return fetch(req) + // Pass duplex in the init arg so it survives VS Code's proxy-agent + // fetch wrapper, which calls originalFetch(request, { ...init, dispatcher }) + // and would otherwise drop duplex from the cloned Request. + // timeout: false disables Bun's default request timeout for long-running + // streaming calls (replaces the old req.timeout = false assignment which + // wouldn't survive the clone triggered by passing an init object). + return fetch(req, { duplex: "half", timeout: false } as any) } config = { ...config, 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/client.ts b/packages/sdk/js/src/v2/client.ts index db16d12fa1b..bfb630659e6 100644 --- a/packages/sdk/js/src/v2/client.ts +++ b/packages/sdk/js/src/v2/client.ts @@ -8,9 +8,13 @@ export { type Config as KiloClientConfig, KiloClient } export function createKiloClient(config?: Config & { directory?: string; experimental_workspaceID?: string }) { if (!config?.fetch) { const customFetch: any = (req: any) => { - // @ts-ignore - req.timeout = false - return fetch(req) + // Pass duplex in the init arg so it survives VS Code's proxy-agent + // fetch wrapper, which calls originalFetch(request, { ...init, dispatcher }) + // and would otherwise drop duplex from the cloned Request. + // timeout: false disables Bun's default request timeout for long-running + // streaming calls (replaces the old req.timeout = false assignment which + // wouldn't survive the clone triggered by passing an init object). + return fetch(req, { duplex: "half", timeout: false } as any) } config = { ...config, diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index f9dee7fbe0e..798a200afe8 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -1393,6 +1393,10 @@ export type Config = { * @deprecated Use 'share' field instead. Share newly created sessions automatically */ autoshare?: boolean + /** + * Enable remote control of sessions via Kilo Cloud. Equivalent to running /remote on startup. + */ + remote_control?: boolean /** * Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications */ @@ -1944,6 +1948,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/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 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" }, diff --git a/packages/storybook/package.json b/packages/storybook/package.json index 567ac70798b..1f2134e219d 100644 --- a/packages/storybook/package.json +++ b/packages/storybook/package.json @@ -26,7 +26,7 @@ "typescript": "catalog:", "vite": "catalog:" }, - "version": "7.1.9", + "version": "7.1.11", "dependencies": {}, "peerDependencies": {} } diff --git a/packages/ui/package.json b/packages/ui/package.json index 9a1af1a1b6a..e8e085b071c 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/ui", - "version": "7.1.9", + "version": "7.1.11", "type": "module", "license": "MIT", "exports": { diff --git a/packages/util/package.json b/packages/util/package.json index 9011756c653..d7d0f372f25 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/util", - "version": "7.1.9", + "version": "7.1.11", "private": true, "type": "module", "license": "MIT", diff --git a/script/upstream/package.json b/script/upstream/package.json index 34aa1e7f06e..056f044d700 100644 --- a/script/upstream/package.json +++ b/script/upstream/package.json @@ -1,6 +1,6 @@ { "name": "@kilocode/upstream-merge", - "version": "7.1.9", + "version": "7.1.11", "private": true, "type": "module", "description": "Scripts for automating upstream opencode merges into Kilo", 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", }, diff --git a/sdks/vscode/package.json b/sdks/vscode/package.json index e86a8e7d2bd..fdf47120b4a 100644 --- a/sdks/vscode/package.json +++ b/sdks/vscode/package.json @@ -2,7 +2,7 @@ "name": "opencode", "displayName": "opencode", "description": "opencode for VS Code", - "version": "7.1.9", + "version": "7.1.11", "publisher": "sst-dev", "repository": { "type": "git",