* fix(cli): re-apply dead-stream detection to SSE endpoints to prevent memory leak on Windows
The upstream OpenCode v1.3.0 merge rewrote SSE routes with AsyncQueue but
dropped our dead-stream detection. On Windows, stream.onAbort() may never
fire after client disconnect (IOCP delays TCP RST detection), leaking a
GlobalBus listener, heartbeat interval, and AsyncQueue per dead connection.
Wrap writeSSE in try/catch to clean up eagerly on write failure.
* fix(cli): log dead-stream cleanup in SSE endpoints
These files are already in .gitignore but were committed before the
rule was added. Remove them from tracking so the gitignore takes
effect and build-generated changes stop appearing in diffs.
Update DiffVirtualApp and PermissionDiff to reconstruct before/after
content from the patch field when explicit before/after values are not
provided. Export the `text` helper from kilo-ui session-diff and add
`patch` to the PermissionFileDiff type.
In message-v2, refine stripMessageMetadata to only strip oversized
patches (exceeding MAX_DIFF_SIZE) rather than all patches, preserving
small patches so the UI can render inline diffs without additional
fetches.
Replace before/after content fields with unified patch field across
the diff pipeline. WorktreeDiff now generates patch strings via
createTwoFilesPatch, and all consumers (summary stripping, size
checks, content hashing, TUI sync, ingest queue) operate on the
patch field instead of before/after.
Consolidate model variant into the model object, removing the
separate variant field from MessageV2.User, PlanFollowup inject,
and resolveCodeModel interfaces.
Additional changes:
- Add session-diff module export to kilo-ui package
- Remove batch tool (batch.ts deleted)
- Fix WebSocket proxy to convert Uint8Array to ArrayBuffer
- Switch VscodeSessionTurn from useDiffComponent to useFileComponent
- Update SnapshotFileDiff type references in vscode extension
Add Global.Path.config and legacy global dirs (~/.kilo, ~/.kilocode) to
the external_directory whitelist so agents can read global config,
commands, and skills without triggering a permission prompt.
Extend WorktreeDiffItem with `before` and `after` string properties
across the OpenAPI spec, generated TypeScript types, and the Zod
schema in worktree-diff.ts. Both fields are marked as required in
the JSON schema definition.
* fix(tui): show progress indicators while subagent is initializing
Show '↳ Starting...' in the parent session's Task entry when the
subagent is running but has not yet made any tool calls, and show
'↳ Initializing...' in the subagent session view when it has no
messages yet. Prevents the UI from appearing frozen during the
LLM thinking phase on startup.
Closes#8422
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(tui): annotate kilocode changes for CI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(webview): show progress indicators while subagent is initializing
Mirror the TUI fix for the VS Code extension webview:
- TaskToolExpanded: show "Starting..." when the task tool is running
but the child session has no tool calls yet (previously the expanded
body was empty/blank).
- MessageList/ChatView: propagate the readonly flag so the subagent
viewer shows "Initializing..." instead of the generic welcome screen
when the session has no messages yet.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: add i18n translations for Initializing and Starting strings
Replace hardcoded 'Initializing...' and 'Starting...' strings in
webview components with language.t() calls. Add
session.messages.initializing and session.messages.taskStarting keys
to all 19 locale files.
Note: The TUI (packages/opencode) has no i18n framework — all strings
are hardcoded throughout the codebase, so the 'Initializing...' string
in the TUI session view remains as-is.
* fix: localize Initializing/Starting strings in all locale files
Replace English placeholder strings with proper translations in all
19 non-English locale files.
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(cli): invalidate provider state after auth changes
After the Effect migration in #8870, provider state is cached via
InstanceState/ScopedCache. The hasKey check that determines which
models are available ran once at init and was never re-evaluated.
When auth changed (login, logout, org switch), only ModelCache was
cleared but the provider state retained the stale hasKey decision,
causing authenticated users to be stuck on the free model.
* chore: add changeset
* fix(gateway): scope disposeAll to KiloRoutesDeps, not ImportDeps