Commit Graph

1277 Commits

Author SHA1 Message Date
Alex Alecu b871498690 style(cli): add kilocode markers in toast 2026-04-08 11:46:40 +03:00
Alex Alecu 770887e96c fix(cli): improve config warning UX across CLI, TUI, and VS Code
Separate verbose parse details into a new Warning.detail field so toast
messages stay short while 'kilo config check' and VS Code's Show Details
action expose the full diagnostic.  Make the TUI config-warning toast
persistent (dismissed on first prompt submit) and fire VS Code's
checkConfigWarnings() independently so prior failures in the SSE handler
cannot suppress it.  Add 'kilo config check' subcommand that prints all
warnings with color and exits non-zero.
2026-04-07 17:05:08 +03:00
Alex Alecu f0118047e5 feat(cli): add config warnings endpoint and surface errors to TUI/extension
Collect warnings during config loading instead of crashing when config
files have invalid JSON, schema errors, or frontmatter issues. Warnings
are exposed via a new GET /config/warnings pull-based endpoint.

- Add Config.Warning schema and warnings collection in stateInit()
- Wrap all loadFile/load calls with try/catch to collect warnings
- Thread warnings through loadCommand/loadAgent/loadMode/invalid
- Wrap well-known remote config block to prevent network/parse crashes
- Add GET /config/warnings server route with OpenAPI spec
- Regenerate SDK with config.warnings() method
- TUI: fetch warnings in bootstrap non-blocking phase, show as toast
- VS Code: fetch warnings on SSE connect, show as native notifications
- Add 5 new tests for warning collection (JSON, schema, markdown)
2026-04-07 16:26:46 +03:00
Catriel Müller 581f90f9ae Merge pull request #7800 from Kilo-Org/catrielmuller/kiloclaw-client
feat(cli): KiloClaw Chat on TUI
2026-04-02 07:39:54 -03:00
Marius 5187cb0fd4 fix(cli): guard against null theme in TUI resolveTheme and Proxy (#8112)
* fix(cli): guard against null theme in TUI resolveTheme and Proxy

Add null guards to prevent crashes when theme.theme is null/undefined:
- Add isValidTheme type guard with fallback to built-in kilo theme
- Wrap theme resolution memo in try/catch for resilience
- Use empty object as Proxy target instead of memo result
- Validate custom theme JSON and protect built-in theme keys

Closes #8109

* fix(cli): validate required theme keys in isValidTheme

Check for background, text, and primary keys to reject empty or
partial theme objects that would produce undefined field accesses.
2026-04-02 12:24:33 +02:00
Catriel Müller 32f670e1cc Merge branch 'main' into catrielmuller/kiloclaw-client 2026-04-01 16:20:14 -03:00
Mark IJbema 6f7df50b45 Revert "fix(cli): prevent zombie kilo serve processes on extension host crash" 2026-04-01 14:16:01 +02:00
kiloconnect[bot] 2de6c363e3 fix(cli): prevent zombie kilo serve processes on extension host crash
When the VS Code extension host is hard-killed (crash, OOM, kill -9),
dispose() is never called and the kilo serve child process is orphaned.

Fix by using a stdin keepalive pipe: the extension keeps stdin open after
spawning the CLI. The CLI watches for EOF on stdin (only when
KILO_CLIENT=vscode) and triggers a clean shutdown. The OS closes the
write-end of the pipe on any parent death, so the CLI always exits
regardless of how the extension host terminates.

On clean dispose(), stdin is explicitly closed before sending SIGTERM,
so the shutdown path is consistent in both the crash and clean cases.

Closes #8050
2026-04-01 09:04:30 +00:00
Mark IJbema 9a23857265 Merge pull request #7906 from Kilo-Org/mark/fix-windows-hide-regression-7896
fix: add windowsHide:true to remaining spawn/exec calls to prevent CMD flash on Windows
2026-03-31 09:17:32 +02:00
Alex Alecu c4732a6c8c fix(cli): restore agent picker labels 2026-03-31 09:02:11 +03:00
Aarav Sharma 12d292ec08 fix: propagate deprecated field in agent merge and show description in dialog 2026-03-30 16:50:38 -06:00
kiloconnect[bot] 482bf89b69 fix: add windowsHide:true to remaining spawn/exec calls to prevent CMD flash on Windows
Previous fixes in #6813 and subsequent PRs added windowsHide:true to most
spawn sites, but several call sites were missed or regressed:

- SDK server.ts (v1 + v2): kilo serve and TUI spawn
- ts-check.ts: Bun.spawn for tsc invocation
- github.ts: exec for browser open
- desktop-electron cli.ts: install script spawn and version check
- desktop-electron ipc.ts: open-path execFile
- desktop-electron apps.ts: wsl/where execFileSync calls

Without windowsHide:true, each of these subprocess invocations causes a
visible cmd.exe console window to briefly flash on Windows.

Closes #7896
2026-03-30 07:03:58 +00:00
Aarav Sharma e9060468a1 core: deprecate orchestrator agent with visual badge across UI
Mark the orchestrator agent as deprecated so users see a warning badge
in the mode switcher and agent settings, signaling they should migrate
to other agent configurations for task delegation.
2026-03-29 17:24:52 -06:00
Catriel Müller 8db5065447 refactor: improve comments 2026-03-27 10:57:01 -03:00
Catriel Müller 8737bdfb19 feat: KiloClaw Chat on TUI 2026-03-27 10:48:01 -03:00
Marian Alexandru Alecu ed03c64710 Merge branch 'main' into feat/config-permission-protection 2026-03-26 17:01:41 +02:00
Alex Alecu 1cb4b5c8c0 refactor(cli): clean up code quality issues 2026-03-26 14:11:54 +02:00
Alex Alecu 721b3d0630 chore(cli): add missing kilocode_change markers 2026-03-26 13:59:08 +02:00
Alex Alecu bfbfbb967c chore(cli): add kilocode_change markers 2026-03-26 13:52:48 +02:00
Alex Alecu 5d611d6da6 revert: remove /new worker/subprocess restart
The subprocess restart approach did not solve the underlying Bun native
memory retention issue (oven-sh/bun#28318). Remove all restart plumbing
from rpc.ts, thread.ts, worker.ts, app.tsx, and sdk.tsx to keep the
diff clean. The diff-size and store-eviction fixes remain.
2026-03-26 11:40:49 +02:00
Alex Alecu 1596cae383 fix(cli): use subprocess instead of Worker thread for actual memory reclamation
Bun Workers are threads within the same OS process — terminate() frees
the JSC context but mimalloc retains every page process-wide, so the
previous Worker-restart approach had zero effect on RSS.

Switch to Bun.spawn() with IPC which creates a separate child process.
Killing that process returns all its native memory to the OS.

The IPC relay pattern means the RPC client persists across subprocess
restarts — event listeners, fetch proxy, and SDK all continue working
without getter-indirection or rebinding.

Workaround for https://github.com/oven-sh/bun/issues/28318
2026-03-26 11:28:14 +02:00
Alex Alecu a7d37318cb fix(cli): replay workspace after restart 2026-03-26 10:46:45 +02:00
Alex Alecu 1a0536daf3 fix(cli): detach RPC listener on cleanup 2026-03-26 10:46:23 +02:00
Alex Alecu 10e3b12b13 fix(cli): evict child sessions recursively 2026-03-26 10:46:09 +02:00
Alex Alecu 6819ee7580 fix(cli): restart worker on /new to reclaim native memory
Bun's JSC does not return freed native heap pages to the OS within a
single Worker lifetime. After large sessions, the only way to reclaim
that 2-3 GB of native allocator retention is to terminate the worker
and spawn a fresh one.

Workaround for https://github.com/oven-sh/bun/issues/28318

- Add getter-indirection layer so fetch/events transparently follow
  worker replacement without rebuilding the TUI
- Add rejectAll() to RPC client to fail in-flight calls on termination
- Add rebindable event source that re-registers handlers on new client
- Wire /new command to fire-and-forget restart; sync layer re-bootstraps
  via server.instance.disposed event from the new worker
- Guard against re-entry and skip in external server mode
2026-03-26 10:28:20 +02:00
Alex Alecu 6878ddb03d fix(cli): strip summary.diffs from messages in TUI store
User messages carry summary.diffs with full before/after file content
(the same giant strings as session_diff). The TUI never reads this
field. Strip it at both entry points (SSE handler + full sync) to
prevent multi-MB strings from accumulating in the Solid store.
2026-03-25 17:52:05 +02:00
Alex Alecu a3c8340401 fix(cli): keep permission and question on evict 2026-03-25 17:40:22 +02:00
Alex Alecu 1a07ad1a56 fix(cli): evict per-session data from TUI store on navigation
The Solid store accumulated messages, parts, diffs, todos, status, and
permissions for every session visited during a TUI lifetime. Navigating
away via /new or the session list never freed the old session's data.

Add an evict() function that deletes all per-session entries from the
store maps and clears the fullSyncedSessions cache. Wire it into:
- A createEffect in app.tsx that fires when the route changes away
  from a session (on() tracks prev vs current sessionID)
- The session.deleted SSE handler, which previously only removed the
  session list entry but left orphaned per-session data
2026-03-25 17:33:05 +02:00
Alex Alecu 7f57983c14 fix(cli): strip before/after from TUI session_diff store
Defense-in-depth: destructure away before/after content from FileDiff
objects at both TUI store entry points (SSE handler + full sync). The
sidebar only reads file, additions, deletions — carrying full file content
in the Solid store is unnecessary and risks memory bloat.
2026-03-25 15:32:33 +02:00
Evgeny Shurakov 508378464a Merge pull request #7446 from Kilo-Org/eshurakov/ingest-stream
Remote - add real-time session relay and remote control over WebSocket
2026-03-25 13:43:17 +01:00
Alex Alecu c2969d296e fix(cli): close absolute-path bypass and extract DISABLE_ALWAYS_KEY constant
- Check absolute patterns in isRequest via isAbsolute() to match the
  existing metadata.filepath dual-dispatch logic, preventing a bypass
  where tools pass absolute project-level config paths in patterns
- Export ConfigProtection.DISABLE_ALWAYS_KEY constant to replace the
  'disableAlways' magic string across config-paths.ts, next.ts, and
  permission.tsx so renames/typos are caught at compile time
2026-03-25 11:52:42 +02:00
Alex Alecu 21902b1dd1 feat(cli): hide 'Always allow' in TUI for config file edits
When the disableAlways metadata flag is set on a permission request,
only show 'Allow once' and 'Reject' options in the TUI prompt.
2026-03-25 11:16:51 +02:00
Catriel Müller a8e0da3da7 feat: Kilo gateway custom modes 2026-03-24 10:22:54 -03:00
Evgeny Shurakov 37b866f1ef feat(cli): add remote session relay over WebSocket
Introduce WebSocket-based remote session relay so external clients can
subscribe to sessions, send messages, answer questions, and respond to
permissions in real time.

- RemoteWS manages the authenticated WebSocket lifecycle with reconnect
- RemoteSender dispatches inbound commands and forwards server events
- Backfill pending questions/permissions when a client subscribes
- Add question_reject command for dismissing questions remotely
- Consolidate /remote TUI command into kilo-commands
- Add session.viewed endpoint to the generated SDK
- RemoteProtocol.Preview schema for diagnostic logging
2026-03-24 13:54:30 +01:00
Mark IJbema 54e14d7f87 fix: remove dead docs link from github setup wizard output 2026-03-23 11:22:27 +01:00
Mark IJbema 1461b57952 fix: replace dead docs/github link, exclude vercel.link from lychee
- kilo.ai/docs/github/#usage-examples was a 404 (page never created).
  Replaced with kilo.ai/docs/automate/integrations in github.ts:245.
- vercel.link redirects to a login page that blocks bots — added to
  lychee.toml exclusions.
2026-03-23 11:22:07 +01:00
Johnny Amancio 6e4c57f328 fix: Adjust missing merge conflicts not caught before 2026-03-20 12:33:10 +01:00
Johnny Amancio a49820192d resolve merge conflicts 2026-03-20 12:18:26 +01:00
Johnny Amancio f3a327d265 refactor: kilo compat for v1.2.24 2026-03-20 11:56:07 +01:00
Eric Clemmons a75008864f fix(opencode): pass missing auth headers in run --attach (#16097)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
2026-03-19 19:43:43 +01:00
Marian Alexandru Alecu b0bf365e70 Merge pull request #7313 from Kilo-Org/onboarding-improvement 2026-03-19 20:04:36 +02:00
Alex Alecu 4be714dbf9 fix(cli): exclude anonymous kilo provider from connected check
The kilo provider always autoloads with free models and apiKey="anonymous",
causing useConnected() to return true even for first-time users without any
API key. This prevented the onboarding tip from ever appearing.
2026-03-19 16:20:06 +02:00
Alex Alecu 6d42e22a6e fix(cli): show tips for connected first-time users 2026-03-19 16:01:59 +02:00
Alex Alecu c263032282 fix(cli): respect tips toggle during onboarding
The onboarding tip now honors the tips_hidden setting so users
can dismiss it via the command palette if they choose to.
2026-03-19 15:03:49 +02:00
Alex Alecu 4c8df7d336 feat(cli): show onboarding tip for first-time users on free model
First-time users with no connected provider now see a targeted tip
on the home screen: 'Using a free model — run /connect to add your
API key'. Once a provider is connected or the user has sessions,
normal random tip behavior resumes.
2026-03-19 14:31:54 +02:00
Alex Alecu 1ac86e5c36 feat(cli): show config and project paths in /status dialog
Display global config path (from Global.Path.config) and project
directory in the status dialog so users can quickly verify which
config files are being loaded. Paths are shortened with ~ for
readability, matching existing TUI conventions.
2026-03-19 14:28:59 +02:00
Catriel Müller 30d39649aa refactor: merge main 2026-03-18 18:18:38 -03:00
Catriel Müller 7edd3f6fc2 Merge branch 'main' into catrielmuller/kilo-opencode-v1.2.21 2026-03-18 17:10:56 -03:00
Marian Alexandru Alecu 48504430f5 Merge pull request #7252 from Kilo-Org/fix/cli-paste-summary-thresholds
feat(cli): delay paste summary
2026-03-18 18:15:31 +02:00
Marian Alexandru Alecu 82d6b73c91 Merge pull request #7246 from Kilo-Org/feat/cli-terminal-bell
feat(cli): add notifications - ring terminal bell on task done and input prompts
2026-03-18 16:14:05 +02:00