diff --git a/.changeset/fair-mice-compact.md b/.changeset/fair-mice-compact.md new file mode 100644 index 00000000000..7fc069fb152 --- /dev/null +++ b/.changeset/fair-mice-compact.md @@ -0,0 +1,6 @@ +--- +"kilo-code": patch +"@kilocode/cli": patch +--- + +Fix queued-turn auto-compaction so overflow recovery runs instead of exhausting compaction attempts. diff --git a/.changeset/local-indexing-choice.md b/.changeset/local-indexing-choice.md new file mode 100644 index 00000000000..a9d3b903614 --- /dev/null +++ b/.changeset/local-indexing-choice.md @@ -0,0 +1,6 @@ +--- +"@kilocode/cli": patch +"kilo-code": patch +--- + +Respect project-specific semantic indexing decisions instead of enabling indexing globally across workspaces. diff --git a/.changeset/mention-autocomplete-trailing-space.md b/.changeset/mention-autocomplete-trailing-space.md new file mode 100644 index 00000000000..621c0c55a80 --- /dev/null +++ b/.changeset/mention-autocomplete-trailing-space.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Append a trailing space when autocompleting a file, folder, or special mention (terminal, git changes) via the `@` menu in the chat textarea, so typing immediately after selection no longer breaks the attachment. diff --git a/.changeset/no-home-indexing.md b/.changeset/no-home-indexing.md new file mode 100644 index 00000000000..cc5422900eb --- /dev/null +++ b/.changeset/no-home-indexing.md @@ -0,0 +1,6 @@ +--- +"kilo-code": patch +"@kilocode/cli": patch +--- + +Prevent VS Code empty windows from starting codebase indexing against the home directory. diff --git a/.changeset/quiet-envs-ask.md b/.changeset/quiet-envs-ask.md new file mode 100644 index 00000000000..e18627def83 --- /dev/null +++ b/.changeset/quiet-envs-ask.md @@ -0,0 +1,5 @@ +--- +"@kilocode/cli": patch +--- + +Prompt before reading `.env` files even after broad read permissions were previously approved. diff --git a/.changeset/restore-kilo-env-var.md b/.changeset/restore-kilo-env-var.md deleted file mode 100644 index 9c49549c0b4..00000000000 --- a/.changeset/restore-kilo-env-var.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@kilocode/cli": patch ---- - -Restore the `KILO=1` environment variable so plugins and tooling can distinguish the Kilo CLI from upstream OpenCode. diff --git a/.changeset/select-settings-viewport.md b/.changeset/select-settings-viewport.md new file mode 100644 index 00000000000..f08531526b0 --- /dev/null +++ b/.changeset/select-settings-viewport.md @@ -0,0 +1,6 @@ +--- +"@opencode-ai/ui": patch +"@kilocode/kilo-ui": patch +--- + +Keep settings select dropdowns within the viewport when opened near the edge. diff --git a/.changeset/signin-routes-to-profile.md b/.changeset/signin-routes-to-profile.md new file mode 100644 index 00000000000..f0a35615eff --- /dev/null +++ b/.changeset/signin-routes-to-profile.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Route the "Sign In" action from the Providers settings tab, provider picker, and chat auth errors to the Profile view so the device-auth code, QR, and cancel button are always visible. diff --git a/.changeset/skill-tool-default-agents.md b/.changeset/skill-tool-default-agents.md new file mode 100644 index 00000000000..5608e935f91 --- /dev/null +++ b/.changeset/skill-tool-default-agents.md @@ -0,0 +1,5 @@ +--- +"@kilocode/cli": patch +--- + +Restore Skill tool access for Plan, Ask, Explore, and other non-system agents so skill workflows are available by default. diff --git a/.changeset/snapshot-spinner.md b/.changeset/snapshot-spinner.md new file mode 100644 index 00000000000..d7da19ce3e0 --- /dev/null +++ b/.changeset/snapshot-spinner.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Show snapshot initialization progress in the extension's existing loading indicator. diff --git a/.changeset/stale-turns-recover.md b/.changeset/stale-turns-recover.md new file mode 100644 index 00000000000..da3d5d2deda --- /dev/null +++ b/.changeset/stale-turns-recover.md @@ -0,0 +1,5 @@ +--- +"@kilocode/cli": patch +--- + +Recover sessions left unable to continue after an assistant turn was created but never started. diff --git a/.changeset/trust-system-cas.md b/.changeset/trust-system-cas.md new file mode 100644 index 00000000000..54fb3e3f279 --- /dev/null +++ b/.changeset/trust-system-cas.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Trust the OS certificate store and honor corporate CA bundles for the bundled Kilo backend. The extension now defaults `NODE_USE_SYSTEM_CA=1` on the spawned CLI process so users behind MITM proxies (Zscaler, Netskope, Palo Alto, etc.) no longer hit TLS errors on sign-in. A new `kilo-code.new.extraCaCerts` setting accepts a PEM file path for additional CAs, and `http.proxyStrictSSL=false` is honored as an opt-out from verification. diff --git a/.changeset/utf-32-bom-encoding.md b/.changeset/utf-32-bom-encoding.md new file mode 100644 index 00000000000..176380079fc --- /dev/null +++ b/.changeset/utf-32-bom-encoding.md @@ -0,0 +1,6 @@ +--- +"kilo-code": minor +"@kilocode/cli": minor +--- + +Detect and preserve UTF-32 (LE and BE) with BOM when reading and editing files. UTF-16 and UTF-32 without a BOM remain unsupported. diff --git a/.changeset/webview-font-size.md b/.changeset/webview-font-size.md new file mode 100644 index 00000000000..dd7b6b8d028 --- /dev/null +++ b/.changeset/webview-font-size.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Add a Display setting for adjusting the Kilo webview UI font size. diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index 5c5ca6159a6..7411e242b9e 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: fetch-depth: 0 diff --git a/.github/workflows/check-md-table-padding.yml b/.github/workflows/check-md-table-padding.yml index 51d6706597d..18c3c7aa962 100644 --- a/.github/workflows/check-md-table-padding.yml +++ b/.github/workflows/check-md-table-padding.yml @@ -14,7 +14,7 @@ jobs: if: github.repository == 'Kilo-Org/kilocode' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # kilocode_change with: ref: ${{ github.event.pull_request.head.sha || github.sha }} diff --git a/.github/workflows/check-opencode-annotations.yml b/.github/workflows/check-opencode-annotations.yml index e1588c0fc44..810371d6d3e 100644 --- a/.github/workflows/check-opencode-annotations.yml +++ b/.github/workflows/check-opencode-annotations.yml @@ -21,7 +21,7 @@ jobs: if: github.repository == 'Kilo-Org/kilocode' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # kilocode_change with: ref: ${{ github.event.pull_request.head.sha || github.sha }} fetch-depth: 0 @@ -37,3 +37,8 @@ jobs: else echo "No PR base SHA available (workflow_dispatch without PR context) — skipping." fi + + # kilocode_change start + - name: Check workflow allowlist + run: bun run script/check-workflows.ts + # kilocode_change end diff --git a/.github/workflows/close-issues.yml b/.github/workflows/close-issues.yml index 04b6ae7ac80..aba47e131f1 100644 --- a/.github/workflows/close-issues.yml +++ b/.github/workflows/close-issues.yml @@ -12,7 +12,7 @@ jobs: contents: read issues: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # kilocode_change - uses: oven-sh/setup-bun@v2 with: diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 03bc1867873..a261d6f5b3b 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -26,7 +26,7 @@ jobs: OWNER: ${{ github.repository_owner }} # kilocode_change end - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # kilocode_change - uses: ./.github/actions/setup-bun diff --git a/.github/workflows/compliance-close.yml b/.github/workflows/disabled/compliance-close.yml.disabled similarity index 96% rename from .github/workflows/compliance-close.yml rename to .github/workflows/disabled/compliance-close.yml.disabled index d56d3b4d971..c3bcf9f686f 100644 --- a/.github/workflows/compliance-close.yml +++ b/.github/workflows/disabled/compliance-close.yml.disabled @@ -13,7 +13,6 @@ permissions: jobs: close-non-compliant: - if: github.repository == 'Kilo-Org/kilocode' && false # kilocode_change - disabled: not needed in kilocode repo runs-on: ubuntu-latest steps: - name: Close non-compliant issues and PRs after 2 hours diff --git a/.github/workflows/daily-issues-recap.yml b/.github/workflows/disabled/daily-issues-recap.yml.disabled similarity index 95% rename from .github/workflows/daily-issues-recap.yml rename to .github/workflows/disabled/daily-issues-recap.yml.disabled index 185de2f5b3e..789712ef519 100644 --- a/.github/workflows/daily-issues-recap.yml +++ b/.github/workflows/disabled/daily-issues-recap.yml.disabled @@ -8,9 +8,6 @@ on: jobs: daily-recap: - # kilocode_change start - disabled for kilo-cli fork (OpenCode Discord integration) - if: false - # kilocode_change end runs-on: blacksmith-4vcpu-ubuntu-2404 permissions: contents: read @@ -24,7 +21,7 @@ jobs: - uses: ./.github/actions/setup-bun - name: Install opencode - run: curl -fsSL https://opencode.ai/install | bash + run: curl -fsSL https://kilo.ai/install | bash - name: Generate daily issues recap id: recap @@ -46,7 +43,7 @@ jobs: # Get today's date range TODAY=$(date -u +%Y-%m-%d) - opencode run -m kilo/anthropic/claude-sonnet-4.5 "Generate a daily issues recap for the OpenCode repository. + opencode run -m opencode/claude-sonnet-4-5 "Generate a daily issues recap for the Kilo repository. TODAY'S DATE: ${TODAY} diff --git a/.github/workflows/daily-pr-recap.yml b/.github/workflows/disabled/daily-pr-recap.yml.disabled similarity index 95% rename from .github/workflows/daily-pr-recap.yml rename to .github/workflows/disabled/daily-pr-recap.yml.disabled index 7049531b5dd..ff026917f81 100644 --- a/.github/workflows/daily-pr-recap.yml +++ b/.github/workflows/disabled/daily-pr-recap.yml.disabled @@ -8,9 +8,6 @@ on: jobs: pr-recap: - # kilocode_change start - disabled for kilo-cli fork (OpenCode Discord integration) - if: false - # kilocode_change end runs-on: blacksmith-4vcpu-ubuntu-2404 permissions: contents: read @@ -24,7 +21,7 @@ jobs: - uses: ./.github/actions/setup-bun - name: Install opencode - run: curl -fsSL https://opencode.ai/install | bash + run: curl -fsSL https://kilo.ai/install | bash - name: Generate daily PR recap id: recap @@ -45,7 +42,7 @@ jobs: run: | TODAY=$(date -u +%Y-%m-%d) - opencode run -m kilo/anthropic/claude-sonnet-4.5 "Generate a daily PR activity recap for the OpenCode repository. + opencode run -m opencode/claude-sonnet-4-5 "Generate a daily PR activity recap for the Kilo repository. TODAY'S DATE: ${TODAY} diff --git a/.github/workflows/pr-management.yml b/.github/workflows/disabled/pr-management.yml.disabled similarity index 73% rename from .github/workflows/pr-management.yml rename to .github/workflows/disabled/pr-management.yml.disabled index 7abe0a0ac18..1e331bd6f2e 100644 --- a/.github/workflows/pr-management.yml +++ b/.github/workflows/disabled/pr-management.yml.disabled @@ -5,20 +5,7 @@ on: types: [opened] jobs: - # kilocode_change start - check-author: - if: github.repository == 'Kilo-Org/kilocode' && false # kilocode_change - disabled: not needed in kilocode repo - uses: ./.github/workflows/check-org-member.yml - with: - username: ${{ github.event.pull_request.user.login }} - secrets: - kilo-maintainer-app-id: ${{ secrets.KILO_MAINTAINER_APP_ID }} - kilo-maintainer-app-secret: ${{ secrets.KILO_MAINTAINER_APP_SECRET }} - check-duplicates: - needs: check-author - if: github.repository == 'Kilo-Org/kilocode' && false # kilocode_change - disabled: not needed in kilocode repo - # kilocode_change end runs-on: blacksmith-4vcpu-ubuntu-2404 permissions: contents: read @@ -48,10 +35,9 @@ jobs: if: steps.team-check.outputs.is_team != 'true' run: bun install - # kilocode_change start - - name: Setup Kilo - uses: ./.github/actions/setup-kilo - # kilocode_change end + - name: Install opencode + if: steps.team-check.outputs.is_team != 'true' + run: curl -fsSL https://kilo.ai/install | bash - name: Build prompt if: steps.team-check.outputs.is_team != 'true' @@ -73,10 +59,7 @@ jobs: - name: Check for duplicate PRs if: steps.team-check.outputs.is_team != 'true' env: - # kilocode_change start - KILO_API_KEY: ${{ secrets.KILO_API_KEY }} - KILO_ORG_ID: ${{ secrets.KILO_ORG_ID }} - # kilocode_change end + OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number }} run: | @@ -89,8 +72,7 @@ jobs: fi add-contributor-label: - if: github.repository == 'Kilo-Org/kilocode' && false # kilocode_change - disabled: not needed in kilocode repo - runs-on: blacksmith-2vcpu-ubuntu-2404 # kilocode_change + runs-on: ubuntu-latest permissions: pull-requests: write issues: write diff --git a/.github/workflows/pr-standards.yml b/.github/workflows/disabled/pr-standards.yml.disabled similarity index 90% rename from .github/workflows/pr-standards.yml rename to .github/workflows/disabled/pr-standards.yml.disabled index 75fb650144d..1edbd5d061d 100644 --- a/.github/workflows/pr-standards.yml +++ b/.github/workflows/disabled/pr-standards.yml.disabled @@ -5,22 +5,10 @@ on: types: [opened, edited, synchronize] jobs: - # kilocode_change start - check-author: - if: github.repository == 'Kilo-Org/kilocode' && false # kilocode_change - disabled: not needed in kilocode repo - uses: ./.github/workflows/check-org-member.yml - with: - username: ${{ github.event.pull_request.user.login }} - secrets: - kilo-maintainer-app-id: ${{ secrets.KILO_MAINTAINER_APP_ID }} - kilo-maintainer-app-secret: ${{ secrets.KILO_MAINTAINER_APP_SECRET }} - check-standards: - needs: check-author - if: github.repository == 'Kilo-Org/kilocode' && false # kilocode_change - disabled: not needed in kilocode repo - # kilocode_change end - runs-on: blacksmith-4vcpu-ubuntu-2404 + runs-on: ubuntu-latest permissions: + contents: read pull-requests: write steps: - name: Check PR standards @@ -28,6 +16,30 @@ jobs: with: script: | const pr = context.payload.pull_request; + const login = pr.user.login; + + // Skip PRs older than Feb 18, 2026 at 6PM EST (Feb 19, 2026 00:00 UTC) + const cutoff = new Date('2026-02-19T00:00:00Z'); + const prCreated = new Date(pr.created_at); + if (prCreated < cutoff) { + console.log(`Skipping: PR #${pr.number} was created before cutoff (${prCreated.toISOString()})`); + return; + } + + // Check if author is a team member or bot + if (login === 'opencode-agent[bot]') return; + const { data: file } = await github.rest.repos.getContent({ + owner: context.repo.owner, + repo: context.repo.repo, + path: '.github/TEAM_MEMBERS', + ref: 'dev' + }); + const members = Buffer.from(file.content, 'base64').toString().split('\n').map(l => l.trim()).filter(Boolean); + if (members.includes(login)) { + console.log(`Skipping: ${login} is a team member`); + return; + } + const title = pr.title; async function addLabel(label) { @@ -59,10 +71,10 @@ jobs: repo: context.repo.repo, issue_number: pr.number }); - + const existing = comments.find(c => c.body.includes(markerText)); if (existing) return; - + await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, @@ -88,9 +100,9 @@ jobs: - \`refactor:\` or \`refactor(scope):\` code refactoring - \`test:\` or \`test(scope):\` adding or updating tests - Where \`scope\` is the package name (e.g., \`app\`, \`desktop\`, \`kilo\`). + Where \`scope\` is the package name (e.g., \`app\`, \`desktop\`, \`opencode\`). - See [CONTRIBUTING.md](../blob/main/CONTRIBUTING.md#pr-titles) for details.`); + See [CONTRIBUTING.md](../blob/dev/CONTRIBUTING.md#pr-titles) for details.`); return; } @@ -133,7 +145,7 @@ jobs: 1. Open an issue describing the bug/feature (if one doesn't exist) 2. Add \`Fixes #\` or \`Closes #\` to this PR description - See [CONTRIBUTING.md](../blob/main/CONTRIBUTING.md#issue-first-policy) for details.`); + See [CONTRIBUTING.md](../blob/dev/CONTRIBUTING.md#issue-first-policy) for details.`); return; } @@ -141,7 +153,6 @@ jobs: console.log('PR meets all standards'); check-compliance: - if: github.repository == 'Kilo-Org/kilocode' && false # kilocode_change - disabled: not needed in kilocode repo runs-on: ubuntu-latest permissions: contents: read diff --git a/.github/workflows/storybook.yml b/.github/workflows/disabled/storybook.yml.disabled similarity index 98% rename from .github/workflows/storybook.yml rename to .github/workflows/disabled/storybook.yml.disabled index 9cd606324a1..6d143a8a22f 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/disabled/storybook.yml.disabled @@ -25,7 +25,6 @@ concurrency: jobs: build: - if: false name: storybook build runs-on: blacksmith-4vcpu-ubuntu-2404 steps: diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index b485662e482..316fa748384 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -16,7 +16,7 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change - name: Setup Bun uses: ./.github/actions/setup-bun diff --git a/.github/workflows/docs-check-links.yml b/.github/workflows/docs-check-links.yml index 75b47a67077..4eb00f444af 100644 --- a/.github/workflows/docs-check-links.yml +++ b/.github/workflows/docs-check-links.yml @@ -17,7 +17,7 @@ jobs: if: github.repository == 'Kilo-Org/kilocode' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # kilocode_change - name: Link Checker uses: Kilo-Org/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 diff --git a/.github/workflows/duplicate-issues.yml b/.github/workflows/duplicate-issues.yml index dfc5039ef24..cf02d8e0a48 100644 --- a/.github/workflows/duplicate-issues.yml +++ b/.github/workflows/duplicate-issues.yml @@ -13,7 +13,7 @@ jobs: issues: write steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: fetch-depth: 1 @@ -128,7 +128,7 @@ jobs: issues: write steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: fetch-depth: 1 diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 25b03a7bfc2..e7c44e371da 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -14,7 +14,7 @@ jobs: pull-requests: write steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change - name: Setup Bun uses: ./.github/actions/setup-bun diff --git a/.github/workflows/nix-hashes.yml b/.github/workflows/nix-hashes.yml index cfa4ee633a3..be48bb895e1 100644 --- a/.github/workflows/nix-hashes.yml +++ b/.github/workflows/nix-hashes.yml @@ -73,7 +73,7 @@ jobs: echo "Computed hash for ${SYSTEM}: $HASH" - name: Upload hash - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 # kilocode_change with: name: hash-${{ matrix.system }} path: hash.txt @@ -86,7 +86,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: persist-credentials: false fetch-depth: 0 @@ -106,7 +106,7 @@ jobs: git pull --rebase --autostash origin "$GITHUB_REF_NAME" - name: Download hash artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 # kilocode_change with: path: hashes pattern: hash-* diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 346972018df..54c78d10bc2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,7 +42,7 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 if: github.repository == 'Kilo-Org/kilocode' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 # kilocode_change with: fetch-depth: 0 @@ -78,7 +78,7 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 if: github.repository == 'Kilo-Org/kilocode' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 # kilocode_change with: fetch-tags: true @@ -123,11 +123,11 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 if: github.repository == 'Kilo-Org/kilocode' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 # kilocode_change - uses: ./.github/actions/setup-bun - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 # kilocode_change with: node-version: "24" registry-url: "https://registry.npmjs.org" @@ -156,7 +156,7 @@ jobs: KILO_PRE_RELEASE: ${{ inputs.pre_release }} GH_REPO: ${{ github.repository }} - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 # kilocode_change with: name: kilo-vscode path: packages/kilo-vscode/out @@ -183,7 +183,7 @@ jobs: - smoke-test runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 # kilocode_change - uses: ./.github/actions/setup-bun @@ -200,7 +200,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 # kilocode_change with: node-version: "24" registry-url: "https://registry.npmjs.org" @@ -235,7 +235,7 @@ jobs: path: packages/kilo-vscode/out - name: Cache apt packages (AUR) - uses: actions/cache@v4 + uses: actions/cache@v5 # kilocode_change with: path: /var/cache/apt/archives key: ${{ runner.os }}-apt-aur-${{ hashFiles('.github/workflows/publish.yml') }} diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index a041bc72569..c7660a5d577 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -47,7 +47,7 @@ jobs: KILO_ORG_ID: ${{ secrets.KILO_ORG_ID }} steps: - name: Checkout kilo-bench - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: repository: Kilo-Org/kilo-bench token: ${{ secrets.BENCH_GITHUB_TOKEN }} @@ -122,7 +122,7 @@ jobs: - name: Upload results if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 # kilocode_change with: name: smoke-test-results path: | diff --git a/.github/workflows/source-check-links.yml b/.github/workflows/source-check-links.yml index 60df85b4b54..659de3d09ba 100644 --- a/.github/workflows/source-check-links.yml +++ b/.github/workflows/source-check-links.yml @@ -16,7 +16,7 @@ jobs: if: github.repository == 'Kilo-Org/kilocode' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # kilocode_change - uses: oven-sh/setup-bun@v2 diff --git a/.github/workflows/test-vscode.yml b/.github/workflows/test-vscode.yml index a3e66fff459..60569585848 100644 --- a/.github/workflows/test-vscode.yml +++ b/.github/workflows/test-vscode.yml @@ -27,7 +27,7 @@ jobs: shell: bash steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c7bd4e5decd..559d65f0a9f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,21 +28,21 @@ jobs: matrix: settings: - name: linux - host: blacksmith-8vcpu-ubuntu-2404 + host: blacksmith-4vcpu-ubuntu-2404 # kilocode_change - name: windows - host: blacksmith-8vcpu-windows-2025 + host: blacksmith-4vcpu-windows-2025 # kilocode_change runs-on: ${{ matrix.settings.host }} defaults: run: shell: bash steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Node - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 # kilocode_change with: node-version: "24" @@ -55,7 +55,7 @@ jobs: git config --global user.name "kilo-maintainer[bot]" - name: Cache Turbo - uses: actions/cache@v4 + uses: actions/cache@v5 # kilocode_change with: path: node_modules/.cache/turbo key: turbo-${{ runner.os }}-${{ hashFiles('turbo.json', '**/package.json') }}-${{ github.sha }} @@ -80,7 +80,7 @@ jobs: - name: Upload unit artifacts if: always() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 # kilocode_change with: name: unit-${{ matrix.settings.name }}-${{ github.run_attempt }} include-hidden-files: true diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index b767380365e..b467817c71b 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -13,7 +13,7 @@ jobs: issues: write steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: fetch-depth: 1 diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml index 894f5dac6fe..6c7ae420953 100644 --- a/.github/workflows/typecheck.yml +++ b/.github/workflows/typecheck.yml @@ -12,7 +12,7 @@ jobs: runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change - name: Setup Bun uses: ./.github/actions/setup-bun diff --git a/.github/workflows/visual-regression.yml b/.github/workflows/visual-regression.yml index 4f49c4aa461..d059175adc8 100644 --- a/.github/workflows/visual-regression.yml +++ b/.github/workflows/visual-regression.yml @@ -12,7 +12,7 @@ jobs: matched: ${{ steps.filter.outputs.matched }} is_fork: ${{ steps.fork-check.outputs.is_fork }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 # kilocode_change - uses: Kilo-Org/paths-filter@master id: filter with: @@ -47,7 +47,7 @@ jobs: steps: - name: Checkout (internal) if: needs.check-paths.outputs.is_fork != 'true' - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: lfs: true token: ${{ secrets.BOT_PAT }} @@ -55,7 +55,7 @@ jobs: - name: Checkout (fork) if: needs.check-paths.outputs.is_fork == 'true' - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: lfs: true @@ -77,7 +77,7 @@ jobs: bun-version: latest - name: Cache Bun modules - uses: actions/cache@v4 + uses: actions/cache@v5 # kilocode_change with: path: ~/.bun/install/cache key: bun-${{ hashFiles('bun.lock') }} @@ -87,7 +87,7 @@ jobs: - name: Cache Playwright browsers id: playwright-cache - uses: actions/cache@v4 + uses: actions/cache@v5 # kilocode_change with: path: ~/.cache/ms-playwright key: playwright-${{ hashFiles('packages/kilo-ui/package.json') }} @@ -103,7 +103,7 @@ jobs: - name: Cache Storybook build id: storybook-cache - uses: actions/cache@v4 + uses: actions/cache@v5 # kilocode_change with: path: packages/kilo-ui/storybook-static key: storybook-${{ hashFiles('packages/kilo-ui/src/**', 'packages/kilo-ui/.storybook/**', 'packages/ui/src/**', 'packages/kilo-ui/package.json') }} @@ -195,7 +195,7 @@ jobs: - name: Upload test results on failure if: failure() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 # kilocode_change with: name: visual-regression-results path: packages/kilo-ui/test-results/ @@ -211,7 +211,7 @@ jobs: steps: - name: Checkout (internal) if: needs.check-paths.outputs.is_fork != 'true' - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: lfs: true token: ${{ secrets.BOT_PAT }} @@ -219,7 +219,7 @@ jobs: - name: Checkout (fork) if: needs.check-paths.outputs.is_fork == 'true' - uses: actions/checkout@v4 + uses: actions/checkout@v6 # kilocode_change with: lfs: true @@ -241,7 +241,7 @@ jobs: bun-version: latest - name: Cache Bun modules - uses: actions/cache@v4 + uses: actions/cache@v5 # kilocode_change with: path: ~/.bun/install/cache key: bun-${{ hashFiles('bun.lock') }} @@ -251,7 +251,7 @@ jobs: - name: Cache Playwright browsers id: playwright-cache-vscode - uses: actions/cache@v4 + uses: actions/cache@v5 # kilocode_change with: path: ~/.cache/ms-playwright key: playwright-vscode-${{ hashFiles('packages/kilo-vscode/package.json') }} @@ -267,7 +267,7 @@ jobs: - name: Cache Storybook build id: storybook-cache-vscode - uses: actions/cache@v4 + uses: actions/cache@v5 # kilocode_change with: path: packages/kilo-vscode/storybook-static key: storybook-vscode-${{ hashFiles('packages/kilo-vscode/webview-ui/src/**', 'packages/kilo-vscode/.storybook/**', 'packages/kilo-ui/src/**', 'packages/ui/src/**', 'packages/kilo-vscode/package.json') }} @@ -386,7 +386,7 @@ jobs: - name: Upload test results on failure if: failure() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 # kilocode_change with: name: visual-regression-vscode-results path: packages/kilo-vscode/test-results/ diff --git a/.kilo/command/upstream-manual-merge.md b/.kilo/command/upstream-manual-merge.md new file mode 100644 index 00000000000..cebc4045353 --- /dev/null +++ b/.kilo/command/upstream-manual-merge.md @@ -0,0 +1,263 @@ +--- +description: Resolve upstream merge conflicts +--- + +Resolve the manual part of an upstream merge. + +Arguments: `$ARGUMENTS` + +Use the first argument as the upstream version, for example `v1.1.50` or +`1.1.50`. If no argument is provided, infer the version from the current branch +name, `upstream-merge-report-.md`, or the newest relevant report file. + +## Workflow + +### 1. Inspect the current merge state + +- `git status --short` +- `git diff --name-only --diff-filter=U` +- `upstream-merge-report-.md` when present +- `.worktrees/opencode-merge/auto-merge` for the automated merge snapshot when present + +### 2. Read every conflicted file end-to-end before planning + +Use `script/upstream/find-conflict-markers.sh ` to jump to each region, +then read enough surrounding lines to understand the code — not just the +conflict hunk. Specifically check: + +- is this a plain 3-way on a single expression, or a structural refactor? +- does upstream rename/move something that invalidates a HEAD-only declaration? +- does a `kilocode_change` marker in HEAD encode a bug fix, a feature, or a + defensive check? +- is the conflicted block referenced by *non-conflicted* code elsewhere in the + same file (imports, signatures, call sites) that will break if we drop it? + +When HEAD includes a non-obvious Kilo-specific wrapper (e.g. a helper in +`packages/opencode/src/kilocode/`), find out why it exists before deciding to +keep or bypass it: + +```bash +git log --all --oneline -S "" -- packages/opencode/src/kilocode/ +git log --all --oneline -- +``` + +Look at the commit message and any PR reference. "We wrote our own because of +PR #NNNN" is a real constraint; "we wrote our own because of a typo" is not. + +### 3. Write a plan in chat and get approval + +For every conflicted file (and any adjacent file the resolution forces you to +touch — see §6) include: + +- expected resolution kind: `hybrid`, `take-ours`, `take-theirs`, `regenerated`, + `removed`, `renamed`, or `other` +- risk level: `low`, `medium`, or `high` +- one-sentence rationale (what Kilo behaviour is preserved, what upstream + feature is adopted, what is dropped) +- verification commands you expect to run (targeted tests, typecheck) + +Group files by risk level. Ask the user which batch to start with. You can +resolve an entire `low` batch in one pass if the user approves the batch, but +resolve `medium` and `high` files one at a time. + +**Do not resolve a file until the user has approved that file's (or batch's) +strategy.** + +### 4. Before every edit, explain reasoning before showing the diff + +The user needs to review intent, not just the raw change. For each file, in +order: + +1. Show the conflict's surrounding context (10–30 lines around each conflict + region, in chat). +2. Explain what each of the three sides (HEAD, merge-base, upstream) is doing. +3. State which Kilo behaviour must survive and why (reference PR numbers / + `kilocode_change` comments when possible). +4. State the resolution and why it is better than the alternatives. +5. Then apply the edit. The tool will display the diff — the user only has to + verify the diff matches the reasoning. + +Do not lead with the diff. A diff without reasoning forces the user to +reverse-engineer the decision. + +### 5. Apply resolution rules + +Reference worktrees when present: + +- `.worktrees/opencode-merge/opencode` — pristine upstream tree +- `.worktrees/opencode-merge/kilo-main` — Kilo base snapshot +- `.worktrees/opencode-merge/auto-merge` — automated merge snapshot (original + conflict reference) + +Apply in order: + +- prefer upstream code and architecture whenever compatible with Kilo behaviour +- preserve Kilo-specific behaviour marked with `kilocode_change` +- keep `kilocode_change` markers around Kilo-specific code in shared opencode + files +- when upstream refactors a region that HEAD had annotated with + `kilocode_change`, **check whether the marker encodes a bug fix or a feature + delta**. Bug fixes (missing `await`, defensive null-check, error capture) + usually need to be re-applied on top of the upstream refactor. Example from + v1.14.30: `Workspace.isSyncing` was missing an `await` — upstream's Effect + refactor reintroduced the same bug, so we had to port the fix into the new + `Effect.gen` block. +- when a `take-theirs` drops a line that was the target of a Kilo pre-filter, + the upstream line may be actively wrong for Kilo — e.g. an inner `continue` + filter whose condition collides with an outer filter Kilo added. Re-read the + surrounding 20 lines before committing to `take-theirs`. +- if Kilo-specific code must be refactored to fit new upstream architecture, + explain the refactor in the final summary +- if upstream moved the relevant logic to another file, port the Kilo behaviour + there and list both paths in the final summary. Verify the new file already + carries the Kilo-renamed symbols (e.g. `x-kilo-directory`) by diffing against + pristine upstream. +- if upstream deleted a file, analyse whether the Kilo behaviour should be + ported elsewhere or removed rather than restoring the deleted file +- if tests fail only because upstream intentionally removed behaviour, remove + or update the obsolete tests rather than adding the old file back +- do not modify unrelated files + +When removing code that existed in one side of a conflict, prefer +**commenting it out with `kilocode_change` markers** over deletion when the +surrounding structure (an `if`, a loop) still makes sense. That keeps the +intent visible to the next merger. Example: + +```ts +} else if (input?.scope !== "project" && !Flag.KILO_EXPERIMENTAL_WORKSPACES) { + // kilocode_change start - directory filtering handled by KiloSession.filters above + // if (input?.directory) { + // conditions.push(eq(SessionTable.directory, input.directory)) + // } + // kilocode_change end +} +``` + +Use `TODO:` not `NOTE:` for follow-ups. `TODO` is searchable and implies an +owner will act on it; `NOTE` reads as permanent commentary. + +### 6. Look for adjacent files the conflict forces you to touch + +Upstream restructures sometimes split one file into several (e.g. `permission.ts` +→ `groups/permission.ts` + `handlers/permission.ts`). Only the *renamed* file +shows up in `git diff --diff-filter=U`; the new sibling may need a Kilo feature +ported in too. After resolving the flagged file, check: + +- files that import from the resolved file — do they compile? +- files at paths implied by new imports (e.g. `../middleware/*`, `./handlers/*`) +- `kilocode_change` comments in the *auto-merge* snapshot that didn't end up in + the working tree because the hosting file was renamed + +Add any such files to the plan as `hybrid` or `take-ours` with the same +approval flow. + +### 7. Verify each resolution before moving on + +- confirm `script/upstream/find-conflict-markers.sh ` prints nothing +- read the final file region (the new shape after edit) and sanity-check imports +- for apparently-unused symbols upstream introduced, `grep` the file and the + rest of the package before deleting — they may be called from non-conflicted + code elsewhere. Example: `isTheme` in `theme.tsx` looked unused at the + resolution site but was called twice further down. +- run the smallest relevant check (single `bun test` file, or `bun run + typecheck` in the touched package) +- summarise the exact resolution, tradeoff, and verification result in chat +- ask the user to approve the resolved file before staging it or resolving the + next one (for `medium` / `high`; `low` batches can be staged together) + +### 8. Run the full checks once everything is resolved + +- `git diff --name-only --diff-filter=U` returns empty +- `bun run typecheck` from `packages/opencode/` (targeted) and from repo root + (catches non-conflicted call-site breakage) +- relevant targeted tests. Tests that hang or time out in an unrelated part of + the graph may be pre-existing — note them, don't block the merge on them +- `bun run script/check-opencode-annotations.ts` if `packages/opencode/` shared + files changed. Note that this tool compares against the merge base via `HEAD` + and will be silent until the merge commit lands +- other CI guards that touched files imply (knip for `kilo-vscode/`, + `check-kilocode-change`, source-links, visual regression) + +### 9. Commit with the standard message + +Per `script/upstream/README.md`: + +```bash +git commit -m "resolve merge conflicts" +``` + +The default `git merge` auto-message (`Merge branch '…' into …`) is also fine, +but `resolve merge conflicts` is the convention for these PRs. + +### 10. Resync version strings in a separate commit + +Upstream stamps its own version into shared files — notably +`packages/extensions/zed/extension.toml` (version field + 5 Kilo-Org download +URLs), and any `package.json` that upstream bumped in the same release window. +After the merge this leaves parts of the tree pointing at upstream's version +(e.g. `1.14.30`), whose release tag does not exist on Kilo's pipeline, so the +Zed download URLs silently 404. + +Fix this in a dedicated commit *after* `resolve merge conflicts`: + +```bash +bun run script/sync-versions.ts # uses root package.json version +# or, to target an explicit version: +bun run script/sync-versions.ts 7.2.41 +git add -A +git commit -m "chore: resync versions after upstream merge" +``` + +The script rewrites every top-level `"version"` in `package.json` files +(excluding `node_modules`, hidden dirs, and `packages/kilo-jetbrains/` which +tracks its own cadence), plus the Zed extension toml. It is idempotent — rerun +it any time to rebase the version back onto Kilo main (useful during +long-running upstream merges where `main` releases in the meantime). + +Keeping this in its own commit makes reviewers' job easier: the merge commit +only contains behavioural resolutions, and the version resync is a trivial +diff they can skim in one glance. + +### 11. Write the PR body + +Structure the description so reviewers can skim: + +- **Non-trivial merge decisions**: a short section per file (or group of + related files) that required more than a mechanical `take-ours`/`take-theirs`. + Focus on *what Kilo behaviour survived* and *what upstream features were + adopted*. Link to Kilo PRs when a `kilocode_change` encodes a specific fix. +- **Notable auto-merged changes**: new columns, new helper files, renamed + middleware — anything reviewers should eyeball even though git didn't flag + it. +- **What to test**: explicit, scenario-level test steps for each non-trivial + change. Don't list tests; list *user-visible behaviour* so a tester who + doesn't read the diff can exercise it. +- **CI guards to watch**: typecheck, knip, annotation check, visual regression. +- **Follow-ups**: any `TODO:` you left in code, as a bullet list with links. + +## User-approval checkpoints + +Every manual merge decision requires explicit user approval **before applying** +and **again after verification**. Be especially cautious when a decision is +destructive, changes auth, billing, data deletion, public API compatibility, +config schema behaviour, migrations, provider routing, or security posture. + +## Common pitfalls + +- Auto-merged code can reference declarations that still live inside conflict + blocks. +- Related sibling files can need edits even when they are not listed as + unmerged — especially after upstream structural splits. +- `renamed` should be used only when behaviour moves to a different file. +- Function signatures can drift across conflict boundaries (args added, return + types widened). Grep for every call site before finalising. +- Full-repo typecheck is the catch-all for non-conflicted call-site breakage. +- Upstream can reintroduce bugs a Kilo `kilocode_change` had already fixed — + during big refactors check every `kilocode_change` the refactor touched. +- "Take-theirs" on an inner conditional is often wrong when Kilo added an outer + pre-filter whose whole point was to widen what makes it to the inner block. +- Apparently-unused upstream-added declarations may be called from + non-conflicted code elsewhere. Grep before deleting. +- Stricter DOM lib types (upstream TS upgrade) can surface latent casting + issues around `WebSocket.send`, `Headers`, etc. — prefer narrowing the Kilo + type over adding `any` casts. diff --git a/AGENTS.md b/AGENTS.md index ecfd388986b..cc5eda0d054 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,6 +21,7 @@ Kilo CLI is an open source AI coding agent that generates code from natural lang - **Source links**: After adding or changing URLs in `packages/kilo-vscode/`, `packages/kilo-vscode/webview-ui/`, or `packages/opencode/src/`, run `bun run script/extract-source-links.ts` from the repo root and commit the updated `packages/kilo-docs/source-links.md`. CI runs this check — the build fails if the file is stale. - **kilocode_change check**: `bun run check-kilocode-change` from `packages/kilo-vscode/`. CI runs this — `kilocode_change` is a marker for upstream merge conflicts and must not appear in `packages/kilo-vscode/` or `packages/kilo-ui/` (these are entirely Kilo Code additions). Remove the markers before pushing. - **opencode annotation check**: `bun run script/check-opencode-annotations.ts` from repo root. CI runs this on PRs touching `packages/opencode/` — every Kilo-specific change in shared opencode files must be annotated with `kilocode_change` markers. Exempt paths (no markers needed): `packages/opencode/src/kilocode/`, `packages/opencode/test/kilocode/`, and any path containing `kilocode` in the name. +- **workflow allowlist**: `bun run script/check-workflows.ts` from repo root. CI runs this as part of the annotations workflow — any `.yml` / `.yaml` file added to or removed from `.github/workflows/` must be reflected in the hardcoded list in `script/check-workflows.ts`. Prevents upstream-merged workflows from silently starting to run in our CI. - **Backend/SDK programmatic testing**: see [TESTING.md](./TESTING.md) for spawning the local main-branch backend (`bun dev serve`) and driving it via `curl` — use this instead of `kilo serve` (prod binary) when testing backend fixes. ## Quality Checks @@ -255,6 +256,10 @@ We regularly merge upstream changes from opencode. To minimize merge conflicts a The goal is to keep our diff from upstream as small as possible, making regular merges straightforward and reducing the risk of conflicts. +### Git conflict style + +`bun install` sets `merge.conflictStyle=zdiff3` repo-locally via `script/setup-git.ts` (wired into `postinstall`). Conflicts include the common ancestor between `|||||||` and `=======`, which is what `script/upstream/` and `mergiraf` rely on for structural resolution and what makes manual resolution on shared opencode files tractable. If you've overridden it in your user config, the repo-local setting takes precedence — don't override it back. + ### Kilocode Change Markers To minimize merge conflicts when syncing with upstream, mark Kilo Code-specific changes in shared code with `kilocode_change` comments. diff --git a/bun.lock b/bun.lock index 9885e06182f..3ff080a4b21 100644 --- a/bun.lock +++ b/bun.lock @@ -33,7 +33,7 @@ }, "packages/core": { "name": "@opencode-ai/core", - "version": "7.2.36", + "version": "7.2.40", "bin": { "opencode": "./bin/opencode", }, @@ -68,7 +68,7 @@ }, "packages/kilo-docs": { "name": "@kilocode/kilo-docs", - "version": "7.2.36", + "version": "7.2.40", "dependencies": { "@docsearch/css": "^4", "@docsearch/js": "^4", @@ -97,7 +97,7 @@ }, "packages/kilo-gateway": { "name": "@kilocode/kilo-gateway", - "version": "7.2.36", + "version": "7.2.40", "dependencies": { "@ai-sdk/alibaba": "1.0.17", "@ai-sdk/anthropic": "3.0.71", @@ -133,7 +133,7 @@ }, "packages/kilo-i18n": { "name": "@kilocode/kilo-i18n", - "version": "7.2.36", + "version": "7.2.40", "devDependencies": { "@tsconfig/node22": "catalog:", "@types/bun": "catalog:", @@ -143,7 +143,7 @@ }, "packages/kilo-indexing": { "name": "@kilocode/kilo-indexing", - "version": "7.2.36", + "version": "7.2.40", "dependencies": { "@aws-sdk/client-bedrock-runtime": "3.1005.0", "@aws-sdk/credential-provider-ini": "3.972.31", @@ -177,7 +177,7 @@ }, "packages/kilo-telemetry": { "name": "@kilocode/kilo-telemetry", - "version": "7.2.36", + "version": "7.2.40", "dependencies": { "@kilocode/kilo-gateway": "workspace:*", "posthog-node": "4.4.0", @@ -191,7 +191,7 @@ }, "packages/kilo-ui": { "name": "@kilocode/kilo-ui", - "version": "7.2.36", + "version": "7.2.40", "dependencies": { "@kobalte/core": "0.13.11", "@opencode-ai/core": "workspace:*", @@ -226,7 +226,7 @@ }, "packages/kilo-vscode": { "name": "kilo-code", - "version": "7.2.36", + "version": "7.2.40", "dependencies": { "@anthropic-ai/sdk": "^0.39.0", "@kilocode/kilo-i18n": "workspace:*", @@ -287,7 +287,7 @@ }, "packages/opencode": { "name": "@kilocode/cli", - "version": "7.2.36", + "version": "7.2.40", "bin": { "kilo": "./bin/kilo", "kilocode": "./bin/kilo", @@ -358,6 +358,7 @@ "ai-gateway-provider": "3.1.2", "bonjour-service": "1.3.0", "bun-pty": "0.4.8", + "chardet": "2.1.1", "chokidar": "4.0.3", "cli-sound": "1.1.3", "clipboardy": "4.0.0", @@ -376,7 +377,6 @@ "iconv-lite": "0.7.2", "ignore": "7.0.5", "immer": "11.1.4", - "jschardet": "3.1.4", "jsonc-parser": "3.3.1", "mime-types": "3.0.2", "minimatch": "10.2.5", @@ -446,7 +446,7 @@ }, "packages/plugin": { "name": "@kilocode/plugin", - "version": "7.2.36", + "version": "7.2.40", "dependencies": { "@kilocode/sdk": "workspace:*", "effect": "catalog:", @@ -471,7 +471,7 @@ }, "packages/script": { "name": "@opencode-ai/script", - "version": "7.2.36", + "version": "7.2.40", "dependencies": { "semver": "^7.6.3", }, @@ -482,7 +482,7 @@ }, "packages/sdk/js": { "name": "@kilocode/sdk", - "version": "7.2.36", + "version": "7.2.40", "dependencies": { "cross-spawn": "catalog:", }, @@ -497,7 +497,7 @@ }, "packages/storybook": { "name": "@opencode-ai/storybook", - "version": "7.2.36", + "version": "7.2.40", "devDependencies": { "@opencode-ai/ui": "workspace:*", "@solidjs/meta": "catalog:", @@ -520,7 +520,7 @@ }, "packages/ui": { "name": "@opencode-ai/ui", - "version": "7.2.36", + "version": "7.2.40", "dependencies": { "@kilocode/sdk": "workspace:*", "@kobalte/core": "catalog:", @@ -3300,8 +3300,6 @@ "jsbi": ["jsbi@4.3.2", "", {}, "sha512-9fqMSQbhJykSeii05nxKl4m6Eqn2P6rOlYiS+C5Dr/HPIU/7yZxu5qzbs40tgaFORiw2Amd0mirjxatXYMkIew=="], - "jschardet": ["jschardet@3.1.4", "", {}, "sha512-/kmVISmrwVwtyYU40iQUOp3SUPk2dhNCMsZBQX0R1/jZ8maaXJ/oZIzUOiyOqcgtLnETFKYChbJ5iDC/eWmFHg=="], - "jsesc": ["jsesc@3.1.0", "", { "bin": { "jsesc": "bin/jsesc" } }, "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA=="], "json-bigint": ["json-bigint@1.0.0", "", { "dependencies": { "bignumber.js": "^9.0.0" } }, "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ=="], diff --git a/nix/hashes.json b/nix/hashes.json index e6ab26053e9..04605df30f9 100644 --- a/nix/hashes.json +++ b/nix/hashes.json @@ -1,8 +1,8 @@ { "nodeModules": { - "x86_64-linux": "sha256-1SpPwQiU4XdqJNJhw9Abf2IiBMxv22waspgDTylL2yg=", - "aarch64-linux": "sha256-g+wFoSCCfz0lZym83gHvAPj1R9vIpF4/7jK3bUGCMP4=", - "aarch64-darwin": "sha256-aGNmAN6RWL+4V6kxckMrOPJIgvhnomwILcNBI27VapA=", - "x86_64-darwin": "sha256-KXPaxTzaypPSjBvmUJVICAcjg6XVnG4EKCRFCcUZ3oI=" + "x86_64-linux": "sha256-BkFDOCEvivFrxKOvMjAIhj3QZwmb9vE/KvCZv5puw6E=", + "aarch64-linux": "sha256-sTkfQNjqCNCxmHbpQ8woA6azoiyD37e8Xy7UwB6eNsA=", + "aarch64-darwin": "sha256-lKuagsTHqij5C764DM3d+BOe4JKs2KV8XiwSlJItGMg=", + "x86_64-darwin": "sha256-g5gZMHLq8feSZHVaCOLGU6Tj2Qw56Zogif3pT9EIlz8=" } } diff --git a/package.json b/package.json index 12817c335d0..a67e5c4a566 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "dev:storybook": "bun --cwd packages/storybook storybook", "lint": "oxlint", "typecheck": "bun turbo typecheck", - "postinstall": "bun run --cwd packages/opencode fix-node-pty", + "postinstall": "bun run --cwd packages/opencode fix-node-pty && bun run script/setup-git.ts", "prepare": "husky", "random": "echo 'Random script'", "hello": "echo 'Hello World!'", @@ -146,6 +146,6 @@ "solid-js@1.9.10": "patches/solid-js@1.9.10.patch", "stream-chat@9.38.0": "patches/stream-chat@9.38.0.patch" }, - "version": "7.2.36", + "version": "7.2.40", "peerDependencies": {} } diff --git a/packages/core/package.json b/packages/core/package.json index 55b45cd7440..26ae1f6220f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/package.json", - "version": "7.2.36", + "version": "7.2.40", "name": "@opencode-ai/core", "type": "module", "license": "MIT", diff --git a/packages/extensions/zed/extension.toml b/packages/extensions/zed/extension.toml index a29879efbe7..67b25c223f5 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.2.36" +version = "7.2.40" 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.2.36/opencode-darwin-arm64.zip" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.2.40/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.2.36/opencode-darwin-x64.zip" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.2.40/opencode-darwin-x64.zip" cmd = "./opencode" args = ["acp"] [agent_servers.opencode.targets.linux-aarch64] -archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.2.36/opencode-linux-arm64.tar.gz" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.2.40/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.2.36/opencode-linux-x64.tar.gz" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.2.40/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.2.36/opencode-windows-x64.zip" +archive = "https://github.com/Kilo-Org/kilocode/releases/download/v7.2.40/opencode-windows-x64.zip" cmd = "./opencode.exe" args = ["acp"] diff --git a/packages/kilo-docs/package.json b/packages/kilo-docs/package.json index 6c2732e0632..1623d1511fb 100644 --- a/packages/kilo-docs/package.json +++ b/packages/kilo-docs/package.json @@ -1,6 +1,6 @@ { "name": "@kilocode/kilo-docs", - "version": "7.2.36", + "version": "7.2.40", "private": true, "scripts": { "dev": "next dev --webpack --port 3002", diff --git a/packages/kilo-docs/pages/code-with-ai/agents/using-agents.md b/packages/kilo-docs/pages/code-with-ai/agents/using-agents.md index dde8d394e53..8df51ee32c9 100644 --- a/packages/kilo-docs/pages/code-with-ai/agents/using-agents.md +++ b/packages/kilo-docs/pages/code-with-ai/agents/using-agents.md @@ -99,9 +99,9 @@ You can hold `shift` to move backwards through the list of modes, for example | Aspect | Details | |---|---| | **Description** | A knowledgeable technical assistant focused on answering questions without changing your codebase | -| **Tool Access** | Read-only tools only (cannot edit files or run commands) | -| **Ideal For** | Code explanation, concept exploration, and technical learning | -| **Special Features** | Optimized for informative responses without modifying your project | +| **Tool Access** | Read-only tools (`read`, `glob`, `grep`, `list`), read-only bash commands (`cat`, `grep`, `git log`, `git diff`, `jq`, etc.), and MCP tools (with user approval). All write operations are blocked. | +| **Ideal For** | Code explanation, concept exploration, technical learning, and project investigation | +| **Special Features** | Can run read-only commands and inspect your project without modifying it. MCP tools require approval for each call. | ### plan @@ -155,9 +155,9 @@ The VSCode extension and CLI do not include a built-in Review agent. Code review | Aspect | Details | |---|---| | **Description** | A knowledgeable technical assistant focused on answering questions without changing your codebase | -| **Tool Access** | Read-only tools only (cannot edit files or run commands) | -| **Ideal For** | Code explanation, concept exploration, and technical learning | -| **Special Features** | Optimized for informative responses without modifying your project | +| **Tool Access** | Read-only tools (`read`, `glob`, `grep`, `list`), read-only bash commands (`cat`, `grep`, `git log`, `git diff`, `jq`, etc.), and MCP tools (with user approval). All write operations are blocked. | +| **Ideal For** | Code explanation, concept exploration, technical learning, and project investigation | +| **Special Features** | Can run read-only commands and inspect your project without modifying it. MCP tools require approval for each call. | ### plan diff --git a/packages/kilo-docs/pages/code-with-ai/features/file-encoding.md b/packages/kilo-docs/pages/code-with-ai/features/file-encoding.md index a6d22e2c3cd..746d12dc738 100644 --- a/packages/kilo-docs/pages/code-with-ai/features/file-encoding.md +++ b/packages/kilo-docs/pages/code-with-ai/features/file-encoding.md @@ -11,17 +11,17 @@ Kilo automatically detects the text encoding of each file it reads and preserves - UTF-8, with or without BOM - UTF-16 LE and UTF-16 BE, **with a BOM** +- UTF-32 LE and UTF-32 BE, **with a BOM** - Shift_JIS, EUC-JP, GB2312, Big5, EUC-KR - Windows-1251, KOI8-R - The ISO-8859 family -- Other common legacy Latin and CJK encodings detected by [jschardet](https://github.com/aadsm/jschardet) and decoded by [iconv-lite](https://github.com/ashtuchkin/iconv-lite) +- Other common legacy Latin and CJK encodings detected by [chardet](https://github.com/runk/node-chardet) and decoded by [iconv-lite](https://github.com/ashtuchkin/iconv-lite) New files Kilo creates are always UTF-8 without a BOM. Encoding detection only runs when Kilo reads or overwrites an existing file. ## Not Supported -- **UTF-16 without a BOM.** The byte pattern is ambiguous and cannot be distinguished reliably from other encodings. Save the file with a BOM or convert it to UTF-8. -- **UTF-32.** Extremely rare in practice; convert to UTF-8 if you need Kilo to work with it. +- **UTF-16 or UTF-32 without a BOM.** The byte pattern is ambiguous and cannot be distinguished reliably from other encodings. Save the file with a BOM or convert it to UTF-8. {% callout type="info" %} Encoding detection is statistical. Very short files, or files whose byte patterns happen to look like a different encoding, may occasionally be misidentified. If that happens, converting the file to UTF-8 is the most reliable workaround. diff --git a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/composite-webview/mcp-tool-expanded-chromium-linux.png b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/composite-webview/mcp-tool-expanded-chromium-linux.png index 4aa53ac29e4..e4954fe821a 100644 --- a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/composite-webview/mcp-tool-expanded-chromium-linux.png +++ b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/composite-webview/mcp-tool-expanded-chromium-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c715bd9f470078fea565d3884395009981235a5e6de068c7c529f77f9dd9ebec -size 26962 +oid sha256:f0af006973871a81b4c0ae2fc6c98c88151655afbd9e63d77e970c18db861355 +size 26371 diff --git a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/agent-behaviour-agents-chromium-linux.png b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/agent-behaviour-agents-chromium-linux.png index 795674c1ad6..9a61e5d6f18 100644 --- a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/agent-behaviour-agents-chromium-linux.png +++ b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/agent-behaviour-agents-chromium-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e9f04f72f6227b08bff321ab4af7a794fa754dc58bd504eb88259cd244ba51b -size 27146 +oid sha256:182b21d0047fc054243eee3c21914d20fd125f946c9766fbc203b3817797d668 +size 26645 diff --git a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/agent-behaviour-edit-custom-mode-chromium-linux.png b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/agent-behaviour-edit-custom-mode-chromium-linux.png index eac24c76ff1..19e7ee32a14 100644 --- a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/agent-behaviour-edit-custom-mode-chromium-linux.png +++ b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/agent-behaviour-edit-custom-mode-chromium-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44f3c539accb9ef8b41ed54181990f23dba2447db0b0fafee1775522d19b7ab2 -size 46878 +oid sha256:b74f0ca7296bb81df65fe6628bc8709d743bf46f99b4c7cda67d5d1ae7c55d22 +size 47647 diff --git a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/indexing-provider-blur-race-chromium-linux.png b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/indexing-provider-blur-race-chromium-linux.png index af2c78e53c1..2283986b267 100644 --- a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/indexing-provider-blur-race-chromium-linux.png +++ b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/indexing-provider-blur-race-chromium-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ed6e2cb028e565af2022447c99651bdab8874183a06e64d6ecab6187acffeb92 -size 57319 +oid sha256:f2130db1ea14a5e8fbf879e96529198592a785b8460d29e12746175e102d50d5 +size 53617 diff --git a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/mode-edit-export-chromium-linux.png b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/mode-edit-export-chromium-linux.png index 0b37bc8089e..171ce19dea7 100644 --- a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/mode-edit-export-chromium-linux.png +++ b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/mode-edit-export-chromium-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d7505312deae1654e37f2916d26f82b47eb6dc7eb2831e11481de6197172a94 -size 46679 +oid sha256:1eaae02845079c9955e95b258a137a5aae7718a0aa369f59a037a73a613514bb +size 51958 diff --git a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/mode-edit-permissions-chromium-linux.png b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/mode-edit-permissions-chromium-linux.png index f6e37711f27..2a22e74f26d 100644 --- a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/mode-edit-permissions-chromium-linux.png +++ b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/mode-edit-permissions-chromium-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7dc43983d81b4cc88568dd71b7b312e73336df029f445a9c00175c9393f4331c -size 56736 +oid sha256:801756a5707206d70b5c3fdcc994df12727c7488cfbfa3e7385e0452110d2e12 +size 54350 diff --git a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/providers-configure-chromium-linux.png b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/providers-configure-chromium-linux.png index 996569f48fb..cbcae5fd2ad 100644 --- a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/providers-configure-chromium-linux.png +++ b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/providers-configure-chromium-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c87ac5179843ad5dadf73023f87d1f0b0589a81420e9ef406534a335598a0a2 -size 28082 +oid sha256:25f9a2c9499801c7526c6e0dd60a17ecacb873e69e02e7073f33e07b4c96841d +size 28094 diff --git a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/settings-panel-chromium-linux.png b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/settings-panel-chromium-linux.png index 2a9f410b3bb..77079da8613 100644 --- a/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/settings-panel-chromium-linux.png +++ b/packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/settings/settings-panel-chromium-linux.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16e602e6a870e4b66a466a0895f92e9df117f6137809c79ed797f24d2b6a1e88 -size 31028 +oid sha256:73a34a22b24e42731510f9ecd3ea8827a0e39fa9b335294c45c4e8780df9a1f4 +size 35853 diff --git a/packages/kilo-gateway/package.json b/packages/kilo-gateway/package.json index 6bd084d7d72..c75789b1dc0 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.2.36", + "version": "7.2.40", "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 91e03968e31..688bbab96d6 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.2.36", + "version": "7.2.40", "type": "module", "license": "MIT", "description": "Kilo-specific i18n translations and overrides", diff --git a/packages/kilo-indexing/package.json b/packages/kilo-indexing/package.json index 1756ca5c94a..7fd81080420 100644 --- a/packages/kilo-indexing/package.json +++ b/packages/kilo-indexing/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package.json", "name": "@kilocode/kilo-indexing", - "version": "7.2.36", + "version": "7.2.40", "type": "module", "license": "MIT", "description": "Standalone indexing engine and host helpers for Kilo Code", diff --git a/packages/kilo-telemetry/package.json b/packages/kilo-telemetry/package.json index 426d0e47dac..37a44343553 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.2.36", + "version": "7.2.40", "type": "module", "license": "MIT", "description": "Telemetry for Kilo CLI - PostHog analytics integration", diff --git a/packages/kilo-telemetry/src/telemetry.ts b/packages/kilo-telemetry/src/telemetry.ts index 94a8d946ce8..2e037e3aa6b 100644 --- a/packages/kilo-telemetry/src/telemetry.ts +++ b/packages/kilo-telemetry/src/telemetry.ts @@ -154,6 +154,9 @@ export namespace Telemetry { // LLM export function trackLlmCompletion(properties: { taskId?: string + mode?: "review" + feature?: "code_reviews" + command?: "local-review" | "local-review-uncommitted" apiProvider: string modelId: string inputTokens?: number diff --git a/packages/kilo-ui/package.json b/packages/kilo-ui/package.json index 5c4a9b7b557..18729510a21 100644 --- a/packages/kilo-ui/package.json +++ b/packages/kilo-ui/package.json @@ -1,6 +1,6 @@ { "name": "@kilocode/kilo-ui", - "version": "7.2.36", + "version": "7.2.40", "type": "module", "license": "MIT", "exports": { diff --git a/packages/kilo-ui/src/components/accordion.css b/packages/kilo-ui/src/components/accordion.css index cc21b6f88e8..ec51bc85e56 100644 --- a/packages/kilo-ui/src/components/accordion.css +++ b/packages/kilo-ui/src/components/accordion.css @@ -1,7 +1,7 @@ /* Kilo Accordion overrides */ [data-component="accordion"] { - font-size: 13px; + font-size: var(--kilo-font-size-13); [data-slot="accordion-trigger"] { cursor: pointer; diff --git a/packages/kilo-ui/src/components/auto-approve-bar.css b/packages/kilo-ui/src/components/auto-approve-bar.css index 517e05d0846..1e4cf27bc86 100644 --- a/packages/kilo-ui/src/components/auto-approve-bar.css +++ b/packages/kilo-ui/src/components/auto-approve-bar.css @@ -13,7 +13,7 @@ } [data-slot="auto-approve-label"] { - font-size: 13px; + font-size: var(--kilo-font-size-13); color: var(--text-base); flex: 1; } diff --git a/packages/kilo-ui/src/components/basic-tool.css b/packages/kilo-ui/src/components/basic-tool.css index 17cb5d9d07c..7ea63c439e2 100644 --- a/packages/kilo-ui/src/components/basic-tool.css +++ b/packages/kilo-ui/src/components/basic-tool.css @@ -7,7 +7,7 @@ } [data-slot="basic-tool-tool-info"] { - font-size: 12px; + font-size: var(--kilo-font-size-12); text-align: start; } @@ -34,19 +34,19 @@ } [data-slot="basic-tool-tool-subtitle"] { - font-size: 12px; + font-size: var(--kilo-font-size-12); } [data-slot="basic-tool-tool-title"] { - font-size: 14px; + font-size: var(--kilo-font-size-14); } [data-slot="message-part-title-text"] { - font-size: 14px; + font-size: var(--kilo-font-size-14); } [data-slot="message-part-title-filename"] { - font-size: 12px; + font-size: var(--kilo-font-size-12); } [data-slot="message-part-meta-line"] { @@ -57,7 +57,7 @@ white-space: nowrap; min-width: 0; flex-shrink: 1; - font-size: 12px; + font-size: var(--kilo-font-size-12); &.clickable { cursor: pointer; @@ -88,7 +88,7 @@ text-align: left; flex-shrink: 1; min-width: 0; - font-size: 12px; + font-size: var(--kilo-font-size-12); } [data-slot="webfetch-meta"] { @@ -164,7 +164,7 @@ html[data-theme="kilo-vscode"] [data-component="tool-part-wrapper"][data-part-ty [data-slot="mcp-section-label"] { padding: 6px 12px 0; - font-size: 11px; + font-size: var(--kilo-font-size-11); color: var(--text-weak, var(--vscode-descriptionForeground)); } diff --git a/packages/kilo-ui/src/components/button.css b/packages/kilo-ui/src/components/button.css index 2ddd442620f..6b5b884a380 100644 --- a/packages/kilo-ui/src/components/button.css +++ b/packages/kilo-ui/src/components/button.css @@ -2,8 +2,8 @@ [data-component="button"] { font-family: var(--vscode-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif); - font-size: 13px; - line-height: 16px; + font-size: var(--kilo-font-size-13); + line-height: var(--kilo-font-size-16); border-radius: 2px; cursor: pointer; border-color: transparent; @@ -86,11 +86,11 @@ } &[data-size="normal"] { - height: 32px; + min-height: 32px; padding: 6px 16px; gap: 6px; - font-size: 13px; - line-height: 16px; + font-size: var(--kilo-font-size-13); + line-height: var(--kilo-font-size-16); &[data-icon] { padding: 6px 16px 6px 12px; @@ -98,11 +98,11 @@ } &[data-size="large"] { - height: 32px; + min-height: 32px; padding: 6px 16px; gap: 6px; - font-size: 13px; - line-height: 16px; + font-size: var(--kilo-font-size-13); + line-height: var(--kilo-font-size-16); &[data-icon] { padding: 6px 16px 6px 12px; @@ -110,11 +110,11 @@ } &[data-size="small"] { - height: 24px; + min-height: 24px; padding: 4px 12px; gap: 4px; - font-size: 13px; - line-height: 16px; + font-size: var(--kilo-font-size-13); + line-height: var(--kilo-font-size-16); &[data-icon] { padding: 4px 12px 4px 8px; diff --git a/packages/kilo-ui/src/components/chat-input.css b/packages/kilo-ui/src/components/chat-input.css index bfd29fc7028..a454b22bd7e 100644 --- a/packages/kilo-ui/src/components/chat-input.css +++ b/packages/kilo-ui/src/components/chat-input.css @@ -15,13 +15,13 @@ [data-slot="input-input"] { min-height: 80px; padding: 9px; - font-size: 13px; + font-size: var(--kilo-font-size-13); line-height: normal; } [data-slot="input-helper-text"] { color: var(--text-weak); - font-size: 11px; + font-size: var(--kilo-font-size-11); padding: 4px 9px; } } diff --git a/packages/kilo-ui/src/components/checkbox.css b/packages/kilo-ui/src/components/checkbox.css index d4bce11bfac..97b8260f4cb 100644 --- a/packages/kilo-ui/src/components/checkbox.css +++ b/packages/kilo-ui/src/components/checkbox.css @@ -21,7 +21,7 @@ } [data-slot="checkbox-checkbox-label"] { - font-size: 13px; + font-size: var(--kilo-font-size-13); line-height: normal; padding-inline-start: 10px; margin-inline-end: 10px; diff --git a/packages/kilo-ui/src/components/code.css b/packages/kilo-ui/src/components/code.css index 4deb4adb66a..81a7ea8da18 100644 --- a/packages/kilo-ui/src/components/code.css +++ b/packages/kilo-ui/src/components/code.css @@ -2,7 +2,7 @@ [data-component="code"] { font-family: var(--vscode-editor-font-family, Menlo, Monaco, "Courier New", monospace); - font-size: var(--vscode-editor-font-size, 13px); + font-size: var(--font-size-base); content-visibility: auto; overflow: hidden; } diff --git a/packages/kilo-ui/src/components/code.tsx b/packages/kilo-ui/src/components/code.tsx index f3f4bbf49ec..c5ff061f33f 100644 --- a/packages/kilo-ui/src/components/code.tsx +++ b/packages/kilo-ui/src/components/code.tsx @@ -22,6 +22,17 @@ const codeMetrics = { fileGap: 0, } satisfies Partial +const codeStyle = { + ...styleVariables, + "--diffs-line-height": "var(--kilo-font-size-24)", +} + +function lineHeight() { + if (typeof window === "undefined") return codeMetrics.lineHeight + const value = Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--kilo-font-size-24")) + return Number.isFinite(value) ? value : codeMetrics.lineHeight +} + type SelectionSide = "additions" | "deletions" export type CodeProps = FileOptions & { @@ -172,6 +183,7 @@ export function Code(props: CodeProps) { const [findQuery, setFindQuery] = createSignal("") const [findIndex, setFindIndex] = createSignal(0) const [findCount, setFindCount] = createSignal(0) + const [height, setHeight] = createSignal(lineHeight()) let findMode: "highlights" | "overlay" = "overlay" let findHits: Range[] = [] @@ -914,7 +926,8 @@ export function Code(props: CodeProps) { return virtualizer })() - instance = isVirtual && v ? new VirtualizedFile(opts, v, codeMetrics, workerPool) : new File(opts, workerPool) + const metrics = { ...codeMetrics, lineHeight: height() } + instance = isVirtual && v ? new VirtualizedFile(opts, v, metrics, workerPool) : new File(opts, workerPool) container.innerHTML = "" const value = text() @@ -942,6 +955,19 @@ export function Code(props: CodeProps) { onCleanup(() => monitor.disconnect()) }) + createEffect(() => { + if (typeof document === "undefined") return + if (typeof MutationObserver === "undefined") return + + const root = document.documentElement + const update = () => setHeight(lineHeight()) + const monitor = new MutationObserver(update) + monitor.observe(root, { attributes: true, attributeFilter: ["style"] }) + update() + + onCleanup(() => monitor.disconnect()) + }) + createEffect(() => { rendered() const ranges = local.commentedLines ?? [] @@ -1063,7 +1089,7 @@ export function Code(props: CodeProps) { return (
h3 { - font-size: 16px; + font-size: var(--kilo-font-size-16); font-weight: 400; margin: 16px 0; color: var(--vscode-foreground, var(--text-strong)); diff --git a/packages/kilo-ui/src/components/tag.css b/packages/kilo-ui/src/components/tag.css index 416c7a08072..71389ce17a7 100644 --- a/packages/kilo-ui/src/components/tag.css +++ b/packages/kilo-ui/src/components/tag.css @@ -3,8 +3,8 @@ [data-component="tag"], [data-component="badge"] { border-radius: 2px; - font-size: 11px; - line-height: 16px; + font-size: var(--kilo-font-size-11); + line-height: var(--kilo-font-size-16); font-weight: 600; padding: 2px 4px; border: 1px solid transparent; diff --git a/packages/kilo-ui/src/components/task-header.css b/packages/kilo-ui/src/components/task-header.css index df7ddc96766..9f44c093e22 100644 --- a/packages/kilo-ui/src/components/task-header.css +++ b/packages/kilo-ui/src/components/task-header.css @@ -12,7 +12,7 @@ [data-slot="task-header-title"] { flex: 1; - font-size: 14px; + font-size: var(--kilo-font-size-14); font-weight: 500; color: var(--text-strong); overflow: hidden; @@ -25,7 +25,7 @@ align-items: center; gap: 12px; flex-shrink: 0; - font-size: 13px; + font-size: var(--kilo-font-size-13); color: var(--text-weak); white-space: nowrap; } diff --git a/packages/kilo-ui/src/components/text-field.css b/packages/kilo-ui/src/components/text-field.css index 7919d4fc3ca..a8579590cfc 100644 --- a/packages/kilo-ui/src/components/text-field.css +++ b/packages/kilo-ui/src/components/text-field.css @@ -2,8 +2,8 @@ [data-component="input"] { &[data-variant="normal"] [data-slot="input-label"] { - font-size: 12px; - line-height: 14px; + font-size: var(--kilo-font-size-12); + line-height: var(--kilo-font-size-14); font-weight: var(--font-weight-regular); color: var(--text-base); } @@ -36,10 +36,10 @@ } &[data-variant="normal"] [data-slot="input-input"] { - height: 32px; + min-height: 32px; padding: 6px 12px; - font-size: 13px; - line-height: 16px; + font-size: var(--kilo-font-size-13); + line-height: var(--kilo-font-size-16); font-family: var(--vscode-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif); color: var(--text-base); @@ -55,8 +55,8 @@ } &[data-variant="normal"] [data-slot="input-error"] { - font-size: 12px; - line-height: 14px; + font-size: var(--kilo-font-size-12); + line-height: var(--kilo-font-size-14); font-weight: var(--font-weight-regular); color: var(--text-on-critical-base); } diff --git a/packages/kilo-ui/src/components/tooltip.css b/packages/kilo-ui/src/components/tooltip.css index f2c6f81a133..5c38e2d8d62 100644 --- a/packages/kilo-ui/src/components/tooltip.css +++ b/packages/kilo-ui/src/components/tooltip.css @@ -2,7 +2,7 @@ [data-component="tooltip"] { border-radius: 0; - font-size: 13px; + font-size: var(--kilo-font-size-13); line-height: normal; font-weight: 400; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.36); diff --git a/packages/kilo-ui/src/styles/globals.css b/packages/kilo-ui/src/styles/globals.css index b995c31af2f..eb946b3785d 100644 --- a/packages/kilo-ui/src/styles/globals.css +++ b/packages/kilo-ui/src/styles/globals.css @@ -8,9 +8,26 @@ /* ===== Global design tokens ===== */ :root { - --font-size-small: 11px; - --font-size-base: 13px; - --font-size-large: 16px; + --kilo-font-size-10: 10px; + --kilo-font-size-11: 11px; + --kilo-font-size-12: 12px; + --kilo-font-size-13: 13px; + --kilo-font-size-14: 14px; + --kilo-font-size-15: 15px; + --kilo-font-size-16: 16px; + --kilo-font-size-17: 17px; + --kilo-font-size-18: 18px; + --kilo-font-size-19: 19px; + --kilo-font-size-20: 20px; + --kilo-font-size-21: 21px; + --kilo-font-size-22: 22px; + --kilo-font-size-23: 23px; + --kilo-font-size-24: 24px; + --kilo-font-scale: 1; + --font-size-x-small: var(--kilo-font-size-10); + --font-size-small: var(--kilo-font-size-11); + --font-size-base: var(--kilo-font-size-13); + --font-size-large: var(--kilo-font-size-16); /* Tight border radius (~2px) */ --radius-xs: 2px; @@ -131,7 +148,7 @@ html[data-theme="kilo-vscode"] { --font-family-sans: var(--vscode-font-family); --font-family-mono: var(--vscode-editor-font-family, Menlo, Monaco, "Courier New", monospace); font-family: var(--vscode-font-family); - font-size: var(--vscode-font-size); + font-size: calc(var(--vscode-font-size, 16px) * var(--kilo-font-scale, 1)); font-weight: var(--vscode-font-weight); ::-webkit-scrollbar-button { diff --git a/packages/kilo-ui/src/styles/vscode-bridge.css b/packages/kilo-ui/src/styles/vscode-bridge.css index 7493ff50c4c..2fe4a041a01 100644 --- a/packages/kilo-ui/src/styles/vscode-bridge.css +++ b/packages/kilo-ui/src/styles/vscode-bridge.css @@ -279,6 +279,52 @@ html[data-theme="kilo-vscode"] { --syntax-diff-delete: var(--vscode-gitDecoration-deletedResourceForeground); --syntax-diff-unknown: var(--vscode-charts-red); + /* ===== Pierre diff engine (theme its CSS vars to VS Code editor colors) ===== */ + --diffs-light-bg: var(--vscode-editor-background, #1e1e1e); + --diffs-dark-bg: var(--vscode-editor-background, #1e1e1e); + + --diffs-bg-addition-override: color-mix( + in lab, + var(--vscode-editor-background, #1e1e1e) 82%, + var(--syntax-diff-add, #318430) + ); + --diffs-bg-addition-number-override: color-mix( + in lab, + var(--vscode-editor-background, #1e1e1e) 72%, + var(--syntax-diff-add, #318430) + ); + --diffs-bg-addition-emphasis-override: color-mix( + in lab, + var(--vscode-editor-background, #1e1e1e) 60%, + var(--syntax-diff-add, #318430) + ); + --diffs-bg-addition-hover-override: color-mix( + in lab, + var(--vscode-editor-background, #1e1e1e) 72%, + var(--syntax-diff-add, #318430) + ); + + --diffs-bg-deletion-override: color-mix( + in lab, + var(--vscode-editor-background, #1e1e1e) 82%, + var(--syntax-diff-delete, #da3319) + ); + --diffs-bg-deletion-number-override: color-mix( + in lab, + var(--vscode-editor-background, #1e1e1e) 72%, + var(--syntax-diff-delete, #da3319) + ); + --diffs-bg-deletion-emphasis-override: color-mix( + in lab, + var(--vscode-editor-background, #1e1e1e) 60%, + var(--syntax-diff-delete, #da3319) + ); + --diffs-bg-deletion-hover-override: color-mix( + in lab, + var(--vscode-editor-background, #1e1e1e) 72%, + var(--syntax-diff-delete, #da3319) + ); + /* ===== Markdown ===== */ --markdown-heading: var(--vscode-textLink-foreground); --markdown-text: var(--vscode-editor-foreground); diff --git a/packages/kilo-vscode/CHANGELOG.md b/packages/kilo-vscode/CHANGELOG.md index 6501d36809f..964a8a92c54 100644 --- a/packages/kilo-vscode/CHANGELOG.md +++ b/packages/kilo-vscode/CHANGELOG.md @@ -1,5 +1,7 @@ # kilo-code +## 7.2.39 + ## 7.2.36 ### Minor Changes diff --git a/packages/kilo-vscode/package.json b/packages/kilo-vscode/package.json index eaf7128ca87..96d635740df 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.2.36", + "version": "7.2.40", "icon": "assets/icons/logo-outline-black.png", "galleryBanner": { "color": "#FFFFFF", @@ -781,11 +781,23 @@ "default": false, "description": "Load CLAUDE.md instructions and skills from your Claude Code configuration directory into Kilo sessions. Enable this if you want Kilo to use your Claude Code instructions and skills." }, + "kilo-code.new.extraCaCerts": { + "type": "string", + "default": "", + "description": "Absolute path to a PEM file containing extra CA certificates to trust when the Kilo backend makes HTTPS requests (sets NODE_EXTRA_CA_CERTS on the CLI process). Use this if you're behind a corporate proxy that performs SSL inspection. Leave empty to rely on the OS trust store." + }, "kilo-code.new.autoApprove.enabled": { "type": "boolean", "default": false, "description": "Start Kilo Code with the main auto-approve toggle enabled. When enabled, permission prompts are approved automatically." }, + "kilo-code.new.fontSize": { + "type": "number", + "default": 13, + "minimum": 10, + "maximum": 24, + "description": "Font size in pixels for the Kilo Code webview UI." + }, "kilo-code.new.browserAutomation.enabled": { "type": "boolean", "default": false, diff --git a/packages/kilo-vscode/src/DiffViewerProvider.ts b/packages/kilo-vscode/src/DiffViewerProvider.ts index be434af5157..a81b51650ba 100644 --- a/packages/kilo-vscode/src/DiffViewerProvider.ts +++ b/packages/kilo-vscode/src/DiffViewerProvider.ts @@ -1,7 +1,8 @@ import * as vscode from "vscode" import type { KiloConnectionService } from "./services/cli-backend" -import { buildWebviewHtml } from "./utils" +import { buildWebviewHtml, getWebviewFontSize } from "./utils" import { GitOps } from "./agent-manager/GitOps" +import { watchFontSizeConfig } from "./kilo-provider/font-size" import { WorktreeDiffClient, type DiffTarget } from "./worktree-diff-client" import { appendOutput, @@ -25,6 +26,7 @@ export class DiffViewerProvider implements vscode.Disposable { private cachedDiffTarget: DiffTarget | undefined private gitOps: GitOps private outputChannel: vscode.OutputChannel + private fontConfigDisposable: vscode.Disposable | undefined private onSendComments: ((comments: unknown[], autoSend: boolean) => void) | undefined constructor( @@ -73,10 +75,14 @@ export class DiffViewerProvider implements vscode.Disposable { panel.webview.onDidReceiveMessage((msg) => this.onMessage(msg), undefined, []) panel.webview.html = this.getHtml(panel.webview) + this.fontConfigDisposable?.dispose() + this.fontConfigDisposable = watchFontSizeConfig((msg) => this.post(msg)) panel.onDidDispose(() => { this.log("Panel disposed") this.stopDiffPolling() + this.fontConfigDisposable?.dispose() + this.fontConfigDisposable = undefined this.panel = undefined }) } @@ -89,6 +95,7 @@ export class DiffViewerProvider implements vscode.Disposable { type: "ready", vscodeLanguage: vscode.env.language, languageOverride: vscode.workspace.getConfiguration("kilo-code.new").get("language"), + fontSize: getWebviewFontSize(), workspaceDirectory: getWorkspaceRoot(), }) this.post({ type: "diffViewer.markdownRender", render: getDiffMarkdownRender() }) @@ -255,6 +262,7 @@ export class DiffViewerProvider implements vscode.Disposable { public dispose(): void { this.stopDiffPolling() + this.fontConfigDisposable?.dispose() this.gitOps.dispose() this.panel?.dispose() this.outputChannel.dispose() diff --git a/packages/kilo-vscode/src/DiffVirtualProvider.ts b/packages/kilo-vscode/src/DiffVirtualProvider.ts index 53e8962ccb6..0e2954bbf76 100644 --- a/packages/kilo-vscode/src/DiffVirtualProvider.ts +++ b/packages/kilo-vscode/src/DiffVirtualProvider.ts @@ -1,5 +1,6 @@ import * as vscode from "vscode" -import { buildWebviewHtml } from "./utils" +import { buildWebviewHtml, getWebviewFontSize } from "./utils" +import { watchFontSizeConfig } from "./kilo-provider/font-size" import { appendOutput, getWorkspaceRoot } from "./review-utils" import { getDiffMarkdownRender, setDiffMarkdownRender } from "./review-settings" @@ -21,6 +22,7 @@ export class DiffVirtualProvider implements vscode.Disposable { private panel: vscode.WebviewPanel | undefined private pending: DiffVirtualFile | undefined private outputChannel: vscode.OutputChannel + private fontConfigDisposable: vscode.Disposable | undefined constructor(private readonly extensionUri: vscode.Uri) { this.outputChannel = vscode.window.createOutputChannel("Kilo Diff Virtual") @@ -55,8 +57,12 @@ export class DiffVirtualProvider implements vscode.Disposable { panel.webview.html = this.getHtml(panel.webview) panel.webview.onDidReceiveMessage((msg) => this.onMessage(msg)) + this.fontConfigDisposable?.dispose() + this.fontConfigDisposable = watchFontSizeConfig((msg) => this.post(msg)) panel.onDidDispose(() => { this.log("Panel disposed") + this.fontConfigDisposable?.dispose() + this.fontConfigDisposable = undefined this.panel = undefined this.pending = undefined }) @@ -72,6 +78,7 @@ export class DiffVirtualProvider implements vscode.Disposable { type: "ready", vscodeLanguage: vscode.env.language, languageOverride: vscode.workspace.getConfiguration("kilo-code.new").get("language"), + fontSize: getWebviewFontSize(), workspaceDirectory: getWorkspaceRoot(), }) this.pushData() @@ -113,6 +120,7 @@ export class DiffVirtualProvider implements vscode.Disposable { } public dispose(): void { + this.fontConfigDisposable?.dispose() this.panel?.dispose() this.outputChannel.dispose() } diff --git a/packages/kilo-vscode/src/KiloProvider.ts b/packages/kilo-vscode/src/KiloProvider.ts index f4ad6dd913b..1458bc45066 100644 --- a/packages/kilo-vscode/src/KiloProvider.ts +++ b/packages/kilo-vscode/src/KiloProvider.ts @@ -15,7 +15,7 @@ import { type KiloConnectionService, ServerStartupError } from "./services/cli-b import type { EditorContext, IndexingStatus } from "./services/cli-backend/types" import { FileIgnoreController } from "./services/autocomplete/shims/FileIgnoreController" import { ChatTextAreaAutocomplete } from "./services/autocomplete/chat-autocomplete/ChatTextAreaAutocomplete" -import { buildWebviewHtml } from "./utils" +import { buildWebviewHtml, getWebviewFontSize } from "./utils" import { TelemetryProxy, type TelemetryPropertiesProvider } from "./services/telemetry" import { sessionToWebview, @@ -49,6 +49,7 @@ import { slimPart, slimParts } from "./kilo-provider/slim-metadata" import { handleSidebarWorktreeMessage } from "./kilo-provider/sidebar-worktree" import { parseMessageFiles, type MessageFile } from "./kilo-provider/message-files" import { handleFileSearch } from "./kilo-provider/file-search" +import { watchFontSizeConfig } from "./kilo-provider/font-size" import { getTerminalContents } from "./services/terminal/context" import { disposeGitChangesTarget } from "./kilo-provider/git-changes-target" import { interceptMessage } from "./kilo-provider/git-changes-request" @@ -1091,6 +1092,7 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper } } }) + this.webviewMessageDisposable = watchFontSizeConfig((msg) => this.postMessage(msg), this.webviewMessageDisposable) } private openExternal(url: unknown): void { @@ -1246,10 +1248,10 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper extensionVersion: this.extensionVersion, vscodeLanguage: vscode.env.language, languageOverride: langConfig.get("language"), + fontSize: getWebviewFontSize(), workspaceDirectory: this.getProjectDirectory(this.currentSession?.id), }) } - this.postMessage({ type: "connectionState", state: this.connectionState }) // connect() can resolve after SSE reaches "connected" but before this @@ -2334,7 +2336,10 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper if (refreshProviders) await this.fetchAndSendProviders() } catch (error) { console.error("[Kilo New] KiloProvider: Config write succeeded but post-write refresh failed:", error) - const patch = { ...partial, ...project } + const patch = + partial.indexing === undefined && project.indexing === undefined + ? { ...partial, ...project } + : { ...partial, ...project, indexing: { ...(partial.indexing ?? {}), ...(project.indexing ?? {}) } } const cached = (this.cachedConfigMessage as { config?: unknown } | null)?.config const features = (this.cachedConfigMessage as { features?: unknown } | null)?.features const optimistic = @@ -2348,7 +2353,6 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper this.pending-- } } - private postConfigFailure(error: unknown): void { console.error("[Kilo New] KiloProvider: Failed to update config:", error) this.postMessage({ @@ -2357,7 +2361,6 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper details: getConfigErrorDetails(error), }) } - private async resolveSession(sessionID?: string, draftID?: string, context?: string) { if (!this.client) return undefined @@ -3350,7 +3353,6 @@ export class KiloProvider implements vscode.WebviewViewProvider, TelemetryProper } // ── Worktree stats polling (sidebar diff badge) ────────────────── - private startStatsPolling(): void { this.statsPoller?.stop() this.statsGitOps?.dispose() diff --git a/packages/kilo-vscode/src/kilo-provider/font-size.ts b/packages/kilo-vscode/src/kilo-provider/font-size.ts new file mode 100644 index 00000000000..1338cbe3832 --- /dev/null +++ b/packages/kilo-vscode/src/kilo-provider/font-size.ts @@ -0,0 +1,13 @@ +import * as vscode from "vscode" +import { getWebviewFontSize } from "../utils" + +export function watchFontSizeConfig( + post: (msg: { type: "fontSizeChanged"; fontSize: number }) => void, + next?: vscode.Disposable, +) { + const font = vscode.workspace.onDidChangeConfiguration((event) => { + if (event.affectsConfiguration("kilo-code.new.fontSize")) + post({ type: "fontSizeChanged", fontSize: getWebviewFontSize() }) + }) + return next ? vscode.Disposable.from(font, next) : font +} diff --git a/packages/kilo-vscode/src/kiloclaw/KiloClawProvider.ts b/packages/kilo-vscode/src/kiloclaw/KiloClawProvider.ts index aa5868bea75..4def9b0fda7 100644 --- a/packages/kilo-vscode/src/kiloclaw/KiloClawProvider.ts +++ b/packages/kilo-vscode/src/kiloclaw/KiloClawProvider.ts @@ -10,6 +10,7 @@ import { homedir } from "os" import type { KiloConnectionService } from "../services/cli-backend" import type { KiloClient } from "@kilocode/sdk/v2/client" import { buildWebviewHtml } from "../utils" +import { watchFontSizeConfig } from "../kilo-provider/font-size" import { connect, history, presence, type ClawChatClient } from "./chat-client" import type { KiloClawInMessage, @@ -117,6 +118,8 @@ export class KiloClawProvider implements vscode.Disposable { this.post({ type: "kiloclaw.locale", locale }) }) this.subs.push(unsub) + const font = watchFontSizeConfig((msg) => this.post(msg)) + this.subs.push(() => font.dispose()) } private post(msg: KiloClawOutMessage): void { diff --git a/packages/kilo-vscode/src/kiloclaw/types.ts b/packages/kilo-vscode/src/kiloclaw/types.ts index 0b0dd9ab71b..51f4e28631f 100644 --- a/packages/kilo-vscode/src/kiloclaw/types.ts +++ b/packages/kilo-vscode/src/kiloclaw/types.ts @@ -67,3 +67,4 @@ export type KiloClawOutMessage = | { type: "kiloclaw.status"; data: ClawStatus | null } | { type: "kiloclaw.locale"; locale: string } | { type: "kiloclaw.error"; error: string } + | { type: "fontSizeChanged"; fontSize: number } diff --git a/packages/kilo-vscode/src/services/cli-backend/server-manager.ts b/packages/kilo-vscode/src/services/cli-backend/server-manager.ts index 7e3c7dc82e6..17b4137d7fd 100644 --- a/packages/kilo-vscode/src/services/cli-backend/server-manager.ts +++ b/packages/kilo-vscode/src/services/cli-backend/server-manager.ts @@ -15,6 +15,17 @@ export interface ServerInstance { const STARTUP_TIMEOUT_SECONDS = 30 +type WorkspaceFolderLike = { uri: { fsPath: string } } + +export function resolveServerCwd(folders: readonly WorkspaceFolderLike[] | undefined, storage: string): string { + return folders?.[0]?.uri.fsPath ?? storage +} + +export function resolveIndexingEnv(folders: readonly WorkspaceFolderLike[] | undefined): Record { + if (folders && folders.length > 0) return {} + return { KILO_DISABLE_CODEBASE_INDEXING: "vscode-no-workspace" } +} + export class ServerManager { private instance: ServerInstance | null = null private startupPromise: Promise | null = null @@ -66,12 +77,32 @@ export class ServerManager { return new Promise((resolve, reject) => { console.log("[Kilo New] ServerManager: 🎬 Spawning CLI process:", cliPath, ["serve", "--port", "0"]) - const claudeCompat = vscode.workspace.getConfiguration("kilo-code.new").get("claudeCodeCompat", false) + const cfg = vscode.workspace.getConfiguration("kilo-code.new") + const claudeCompat = cfg.get("claudeCodeCompat", false) // Pin cwd so the CLI doesn't inherit the extension host's cwd ("/" under F5 debug) - const spawnCwd = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath ?? process.env.HOME ?? require("os").homedir() + // or "$HOME" in empty VS Code windows. + const folders = vscode.workspace.workspaceFolders + const spawnCwd = resolveServerCwd(folders, this.context.globalStorageUri.fsPath) + fs.mkdirSync(spawnCwd, { recursive: true }) + const indexingEnv = resolveIndexingEnv(folders) + // TLS / corporate-proxy support: + // - Default NODE_USE_SYSTEM_CA=1 so the bundled Bun CLI trusts the OS + // trust store (Windows cert store, macOS keychain, Linux /etc/ssl). + // Mirrors VS Code's `http.systemCertificates` default (true). + // - Allow users behind MITM proxies to point at a custom CA bundle via + // `kilo-code.new.extraCaCerts` (NODE_EXTRA_CA_CERTS). + // - Honor VS Code's `http.proxyStrictSSL=false` as an explicit opt-out + // from verification, matching what VS Code already does for its own + // requests. Users explicitly set that; we don't flip it ourselves. + // All three are overridable by the user's environment. + const extraCaCerts = cfg.get("extraCaCerts", "").trim() + const proxyStrictSSL = vscode.workspace.getConfiguration("http").get("proxyStrictSSL", true) const serverProcess = spawn(cliPath, ["serve", "--port", "0"], { cwd: spawnCwd, env: { + NODE_USE_SYSTEM_CA: "1", + ...(extraCaCerts && { NODE_EXTRA_CA_CERTS: extraCaCerts }), + ...(!proxyStrictSSL && { NODE_TLS_REJECT_UNAUTHORIZED: "0" }), ...process.env, // Force mimalloc (the allocator Bun ships with) to return freed pages // to the OS immediately instead of retaining them in its arenas. @@ -84,6 +115,7 @@ export class ServerManager { KILO_CLIENT: "vscode", KILO_ENABLE_QUESTION_TOOL: "true", KILOCODE_FEATURE: "vscode-extension", + ...indexingEnv, KILO_TELEMETRY_LEVEL: vscode.env.isTelemetryEnabled ? "all" : "off", KILO_APP_NAME: "kilo-code", KILO_EDITOR_NAME: vscode.env.appName, diff --git a/packages/kilo-vscode/src/utils.ts b/packages/kilo-vscode/src/utils.ts index 6bdcfe065d6..1936575c222 100644 --- a/packages/kilo-vscode/src/utils.ts +++ b/packages/kilo-vscode/src/utils.ts @@ -6,6 +6,31 @@ function getNonce(): string { return crypto.randomBytes(16).toString("hex") } +const SIZES = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24] + +function clamp(size: number) { + if (!Number.isFinite(size)) return 13 + return Math.min(24, Math.max(10, Math.round(size))) +} + +export function getWebviewFontSize(): number { + const raw = vscode.workspace.getConfiguration("kilo-code.new").get("fontSize", 13) + return clamp(raw) +} + +function fontStyle(): string { + const base = getWebviewFontSize() + const vars = SIZES.map((size) => `--kilo-font-size-${size}: ${(base * size) / 13}px;`).join("\n ") + return `:root { + ${vars} + --kilo-font-scale: ${base / 13}; + --font-size-x-small: var(--kilo-font-size-10); + --font-size-small: var(--kilo-font-size-11); + --font-size-base: var(--kilo-font-size-13); + --font-size-large: var(--kilo-font-size-16); + }` +} + export function buildWebviewHtml( webview: vscode.Webview, opts: { @@ -29,6 +54,7 @@ export function buildWebviewHtml( ${opts.title}