diff --git a/bun.lock b/bun.lock index 073c5364420..ebc9ce87097 100644 --- a/bun.lock +++ b/bun.lock @@ -27,7 +27,7 @@ }, "packages/app": { "name": "@opencode-ai/app", - "version": "7.1.21", + "version": "7.1.22", "dependencies": { "@kilocode/kilo-i18n": "workspace:*", "@kilocode/kilo-ui": "workspace:*", @@ -79,7 +79,7 @@ }, "packages/desktop": { "name": "@opencode-ai/desktop", - "version": "7.1.21", + "version": "7.1.22", "dependencies": { "@opencode-ai/app": "workspace:*", "@opencode-ai/ui": "workspace:*", @@ -112,7 +112,7 @@ }, "packages/desktop-electron": { "name": "@opencode-ai/desktop-electron", - "version": "7.1.21", + "version": "7.1.22", "dependencies": { "@opencode-ai/app": "workspace:*", "@opencode-ai/ui": "workspace:*", @@ -142,7 +142,7 @@ }, "packages/kilo-docs": { "name": "@kilocode/kilo-docs", - "version": "7.1.21", + "version": "7.1.22", "dependencies": { "@docsearch/css": "^4", "@docsearch/js": "^4", @@ -171,7 +171,7 @@ }, "packages/kilo-gateway": { "name": "@kilocode/kilo-gateway", - "version": "7.1.21", + "version": "7.1.22", "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.21", + "version": "7.1.22", "devDependencies": { "@tsconfig/node22": "catalog:", "@types/bun": "catalog:", @@ -219,7 +219,7 @@ }, "packages/kilo-telemetry": { "name": "@kilocode/kilo-telemetry", - "version": "7.1.21", + "version": "7.1.22", "dependencies": { "@kilocode/kilo-gateway": "workspace:*", "@opentelemetry/api": "1.9.0", @@ -239,7 +239,7 @@ }, "packages/kilo-ui": { "name": "@kilocode/kilo-ui", - "version": "7.1.21", + "version": "7.1.22", "dependencies": { "@kobalte/core": "0.13.11", "@opencode-ai/util": "workspace:*", @@ -274,7 +274,7 @@ }, "packages/kilo-vscode": { "name": "kilo-code", - "version": "7.1.21", + "version": "7.1.22", "dependencies": { "@anthropic-ai/sdk": "^0.39.0", "@kilocode/kilo-i18n": "workspace:*", @@ -327,7 +327,7 @@ }, "packages/opencode": { "name": "@kilocode/cli", - "version": "7.1.21", + "version": "7.1.22", "bin": { "kilo": "./bin/kilo", "kilocode": "./bin/kilo", @@ -451,7 +451,7 @@ }, "packages/plugin": { "name": "@kilocode/plugin", - "version": "7.1.21", + "version": "7.1.22", "dependencies": { "@kilocode/sdk": "workspace:*", "zod": "catalog:", @@ -465,14 +465,14 @@ }, "packages/script": { "name": "@opencode-ai/script", - "version": "7.1.21", + "version": "7.1.22", "devDependencies": { "@types/bun": "catalog:", }, }, "packages/sdk/js": { "name": "@kilocode/sdk", - "version": "7.1.21", + "version": "7.1.22", "devDependencies": { "@hey-api/openapi-ts": "0.90.10", "@tsconfig/node22": "catalog:", @@ -483,7 +483,7 @@ }, "packages/storybook": { "name": "@opencode-ai/storybook", - "version": "7.1.21", + "version": "7.1.22", "devDependencies": { "@opencode-ai/ui": "workspace:*", "@solidjs/meta": "catalog:", @@ -506,7 +506,7 @@ }, "packages/ui": { "name": "@opencode-ai/ui", - "version": "7.1.21", + "version": "7.1.22", "dependencies": { "@kilocode/sdk": "workspace:*", "@kobalte/core": "catalog:", @@ -553,7 +553,7 @@ }, "packages/util": { "name": "@opencode-ai/util", - "version": "7.1.21", + "version": "7.1.22", "dependencies": { "zod": "catalog:", }, diff --git a/package.json b/package.json index 921e2911bd3..4acf8b49429 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.21", + "version": "7.1.22", "peerDependencies": {} } diff --git a/packages/app/package.json b/packages/app/package.json index 22b1ae01ec4..5805d8eaf40 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "@opencode-ai/app", - "version": "7.1.21", + "version": "7.1.22", "description": "", "type": "module", "exports": { diff --git a/packages/desktop-electron/package.json b/packages/desktop-electron/package.json index d21d46182a8..176f7fb2f5e 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.21", + "version": "7.1.22", "type": "module", "license": "MIT", "homepage": "https://opencode.ai", diff --git a/packages/desktop/package.json b/packages/desktop/package.json index ad500440bfa..ece81c56afa 100644 --- a/packages/desktop/package.json +++ b/packages/desktop/package.json @@ -1,7 +1,7 @@ { "name": "@opencode-ai/desktop", "private": true, - "version": "7.1.21", + "version": "7.1.22", "type": "module", "license": "MIT", "scripts": { diff --git a/packages/extensions/zed/extension.toml b/packages/extensions/zed/extension.toml index 4026a0d9708..676bc0335b6 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.21" +version = "7.1.22" 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.21/opencode-darwin-arm64.zip" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.22/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.21/opencode-darwin-x64.zip" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.22/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.21/opencode-linux-arm64.tar.gz" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.22/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.21/opencode-linux-x64.tar.gz" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.22/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.21/opencode-windows-x64.zip" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.1.22/opencode-windows-x64.zip" cmd = "./opencode.exe" args = ["acp"] diff --git a/packages/kilo-docs/package.json b/packages/kilo-docs/package.json index 924318f63bb..fab9fae0df6 100644 --- a/packages/kilo-docs/package.json +++ b/packages/kilo-docs/package.json @@ -1,6 +1,6 @@ { "name": "@kilocode/kilo-docs", - "version": "7.1.21", + "version": "7.1.22", "private": true, "scripts": { "dev": "next dev --webpack --port 3002", diff --git a/packages/kilo-docs/pages/code-with-ai/agents/custom-models.md b/packages/kilo-docs/pages/code-with-ai/agents/custom-models.md index 52d0473d577..ef42c918e3e 100644 --- a/packages/kilo-docs/pages/code-with-ai/agents/custom-models.md +++ b/packages/kilo-docs/pages/code-with-ai/agents/custom-models.md @@ -91,6 +91,43 @@ All fields are optional. When a model ID matches one already in the built-in cat | `provider` | `object` | Override `{ npm?, api? }` — the AI SDK package or base API URL for this model | | `variants` | `object` | Named variant configurations (e.g., different reasoning efforts) | +### Token Limits (`limit`) + +The `limit` object controls how Kilo manages the model's context window and output length. These values are specified in **tokens**. + +| Sub-field | Type | Required | Description | +| --------- | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `context` | `number` | No | The model's total context window size (e.g., `131072` for a 128K model). Used to determine when conversation history should be compacted to stay within the window. | +| `output` | `number` | No | The maximum number of tokens the model can generate in a single response. Sent to the provider as `max_tokens` or equivalent. Capped at 32,000 by default. | +| `input` | `number` | No | An optional stricter input limit. Some providers enforce an input token ceiling that is lower than the full context window. When set, compaction triggers against this value instead of `context`. | + +```jsonc +"limit": { + "context": 131072, + "output": 16384 +} +``` + +#### How limits are resolved + +Kilo resolves token limits in this order: + +1. **Your config** — values you set under `provider..models..limit` +2. **Built-in catalog** — Kilo ships a snapshot of [models.dev](https://models.dev) and refreshes it hourly. If your model ID matches a known model, catalog values are used as defaults. +3. **Fallback** — if neither source provides a value, `context` and `output` default to `0`. + +#### What happens when limits are `0` + +If you use a custom or local model and don't specify limits — and the model isn't in the built-in catalog — both `context` and `output` resolve to `0`. This has meaningful side effects: + +- **Compaction is disabled.** Kilo uses `context` to detect when the conversation exceeds the model's window and needs to be summarized. With `context: 0`, overflow detection is skipped and conversations will grow unbounded until the provider rejects the request. +- **Output falls back to 32,000 tokens.** When `output` is `0`, Kilo uses its internal default of 32,000 tokens (configurable via the `KILO_EXPERIMENTAL_OUTPUT_TOKEN_MAX` environment variable). +- **No context usage tracking.** Usage metrics that depend on knowing the context size are skipped. + +{% callout type="warning" %} +For custom and local models, always set `limit.context` and `limit.output` to match the model's actual capabilities. Without these values, automatic context management is disabled. +{% /callout %} + ## Examples ### Local model with LM Studio @@ -313,5 +350,6 @@ Control which models appear in the model picker for a provider using allowlists **Model errors or unexpected behavior:** - Set `tool_call: true` if you need the model to use tools (file editing, terminal, etc.) -- Set `limit.context` and `limit.output` to match the model's actual capabilities +- Set `limit.context` and `limit.output` to match the model's actual capabilities — see [Token Limits](#token-limits-limit) above for details and defaults +- If conversations seem to grow without being compacted, your `limit.context` is likely `0` (unset) - For local models, ensure your inference server is running and accessible at the configured URL diff --git a/packages/kilo-docs/pages/kiloclaw/faq/general.md b/packages/kilo-docs/pages/kiloclaw/faq/general.md index 6a63a54d016..3aa77ee059c 100644 --- a/packages/kilo-docs/pages/kiloclaw/faq/general.md +++ b/packages/kilo-docs/pages/kiloclaw/faq/general.md @@ -25,3 +25,45 @@ For security reasons, SSH access is currently disabled for all KiloClaw instance 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). + +## How do I migrate my OpenClaw? + +Whether you're migrating from another OpenClaw provider to KiloClaw, moving between KiloClaw instances (e.g., individual to org or vice versa), or leaving KiloClaw for another OpenClaw provider, you should plan to migrate your workspace, memory, and context so your new Claw retains the same knowledge as before. + +You should plan to reconfigure integrations in the new instance as these are often tied to the instance and will break if you attempt migration. + +### 1. Back up your workspace + +Have your current instance export the workspace. We recommend creating a GitHub repo or `tar` archive file for easy loading. + +If you are on KiloClaw, you can use + +**GitHub export** — make sure [GitHub is configured](/docs/kiloclaw/development-tools/github) and ask your instance: + +> Create a new GitHub repo and push your entire workspace there with the `gh` CLI. Tell me the URL of the repo you used. + +**Google Drive** — make sure [Google Drive is configured](/docs/kiloclaw/development-tools/google) and ask your instance: + +> Tar compress your workspace and push the file to Google Drive with the `gog` CLI. Then share the filename you used. + +### 2. Stand up the new instance + +### 3. Reconfigure integrations on the new instance + +If you are using GitHub or Google Drive for the migration, prioritize that configuration. + +### 4. Restore the workspace on the new instance + +On your new Claw, restore the workspace from whichever backup method you used: + +**From GitHub:** + +> The GitHub repo `` has a backup of your workspace. Pull the workspace from the repo with the `gh` CLI and overwrite the existing workspace directory with the repo's contents. + +**From Google Drive:** + +> The Google Drive file `` has a backup of your workspace. Pull the tar file from Google Drive with the `gog` CLI and overwrite the existing workspace directory with its contents. + +{% callout type="note" %} +Replace `` or `` with the actual repository URL or filename from the backup step. +{% /callout %} diff --git a/packages/kilo-gateway/package.json b/packages/kilo-gateway/package.json index 0eea002047f..6013aa87741 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.21", + "version": "7.1.22", "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 61b5898bfa9..02faf1a7a8f 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.21", + "version": "7.1.22", "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 8cd77dd621f..ba725ee81c4 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.21", + "version": "7.1.22", "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 4a7a4047fd9..39b64fde3af 100644 --- a/packages/kilo-ui/package.json +++ b/packages/kilo-ui/package.json @@ -1,6 +1,6 @@ { "name": "@kilocode/kilo-ui", - "version": "7.1.21", + "version": "7.1.22", "type": "module", "license": "MIT", "exports": { diff --git a/packages/kilo-vscode/package.json b/packages/kilo-vscode/package.json index 8b7d9b1221d..b1715af781d 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.21", + "version": "7.1.22", "icon": "assets/icons/logo-outline-black.png", "galleryBanner": { "color": "#FFFFFF", diff --git a/packages/kilo-vscode/webview-ui/agent-manager/BranchSelect.tsx b/packages/kilo-vscode/webview-ui/agent-manager/BranchSelect.tsx index 4c5ee751c6a..c4580234a74 100644 --- a/packages/kilo-vscode/webview-ui/agent-manager/BranchSelect.tsx +++ b/packages/kilo-vscode/webview-ui/agent-manager/BranchSelect.tsx @@ -1,6 +1,6 @@ // Reusable branch selector: search input + scrollable list with keyboard navigation -import { type Component, For, Show, onMount } from "solid-js" +import { type Component, For, Show } from "solid-js" import type { BranchInfo } from "../src/types/messages" import { Icon } from "@kilocode/kilo-ui/icon" import { Spinner } from "@kilocode/kilo-ui/spinner" @@ -34,10 +34,6 @@ interface BranchSelectProps { } export const BranchSelect: Component = (props) => { - let ref: HTMLInputElement | undefined - - onMount(() => requestAnimationFrame(() => ref?.focus())) - const isDefault = (branch: BranchInfo) => { if (props.defaultName) return branch.name === props.defaultName return branch.isDefault @@ -48,7 +44,7 @@ export const BranchSelect: Component = (props) => {