fix: keep CLI sidebar branch label in sync with git

The CLI never builds the v2 location stack, so the .git watcher that
feeds Vcs branch updates never starts and the sidebar branch label goes
stale after a git switch outside Kilo.

Warm the LocationServiceMap entry for the instance directory during
kilocode bootstrap. This starts the same watcher the file/pty handlers
use, keyed by the same ref, so the stack is shared instead of
duplicated. The warm-up is forked off the bootstrap critical path and
failures only log a warning.

Fixes #12225
This commit is contained in:
Johnny Amancio
2026-07-20 14:58:41 +02:00
parent 2742b573f8
commit 520679a91f
9 changed files with 162 additions and 2 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ jobs:
if: matrix.settings.run
run: bun turbo test:ci --output-logs=errors-only --log-order=grouped --log-prefix=task --filter='@kilocode/cli'
env:
KILO_EXPERIMENTAL_DISABLE_FILEWATCHER: ${{ runner.os == 'Windows' && 'true' || 'false' }}
KILO_EXPERIMENTAL_DISABLE_FILEWATCHER: "true" # kilocode_change - was Windows-only; the CLI now starts a watcher per instance, too heavy/racy for unit tests. Watcher tests opt back in.
KILO_TEST_PROFILE: ${{ matrix.settings.os == 'macos' && 'darwin' || '' }}
KILO_TEST_SHARD: ${{ format('{0}/{1}', matrix.settings.index, matrix.settings.total) }}
# kilocode_change end