Commit Graph

1113 Commits

Author SHA1 Message Date
Alex Alecu 7182d4c504 fix: Clear RPC channel for faster shutdown 2026-02-25 17:27:11 +02:00
Alex Alecu a2d182ab23 fix: unref shutdown timer in TUI worker to avoid keeping process alive
The setTimeout fallback in terminateWorker can keep the event loop open
even when the worker exits promptly, delaying shutdown paths triggered
by signals. Unref the timer so normal fast shutdown is not blocked by
this fallback.
2026-02-25 15:44:19 +02:00
Alex Alecu 3ab63cf234 Merge branch 'fix/memory-leak' of https://github.com/Kilo-Org/kilocode into fix/memory-leak 2026-02-25 13:23:46 +02:00
Alex Alecu ee6325d559 fix: guard terminateWorker against multiple invocations
terminateWorker is registered on SIGHUP, SIGTERM, and used in onExit.
If a signal fires and then onExit triggers (or two signals arrive),
worker.terminate() and client.call('shutdown') would fire redundantly.

Cache the pending promise so subsequent calls return the same operation.
2026-02-25 13:16:48 +02:00
Marian Alexandru Alecu 0b635fd726 Merge branch 'main' into fix/memory-leak 2026-02-25 13:07:43 +02:00
Alex Alecu 779121f9e7 fix: resolve /exit hang caused by undelivered worker RPC response
The shutdown RPC call to the worker thread never resolved because the worker's event loop drained after cleanup, preventing the postMessage result from being delivered back to the main thread. This left process.exit() unreachable and the process hanging indefinitely.

Replace the blocking await with a fire-and-forget shutdown RPC that waits for the worker's close event (up to 5s timeout) before calling worker.terminate().
2026-02-25 12:51:59 +02:00
Marian Alexandru Alecu 3653c79395 Merge branch 'main' into fix/fix-plan-mode-suggestions 2026-02-25 09:45:49 +02:00
Kevin van Dijk 0514802611 Resolve merge conflicts 2026-02-24 18:34:12 +01:00
Kevin van Dijk fca4c4ed61 refactor: kilo compat for v1.2.9 2026-02-24 18:32:20 +01:00
Kevin van Dijk ccf97cbed1 Resolve merge conflicts 2026-02-24 18:16:17 +01:00
Kevin van Dijk 20a16a27e5 refactor: kilo compat for v1.2.8 2026-02-24 18:07:52 +01:00
Alex Alecu 0886ef8fa0 fix(plan): Show implementation suggestions only when LLM has all the information 2026-02-24 15:32:58 +02:00
Kevin van Dijk ae62fff98d Resolve merge conflicts 2026-02-23 20:12:28 +01:00
Kevin van Dijk 0e76652f28 refactor: kilo compat for v1.2.7 2026-02-23 18:48:59 +01:00
Kevin van Dijk d6e6016e91 Resolve merge conflicts 2026-02-23 18:19:57 +01:00
Kevin van Dijk ffec9a4153 refactor: kilo compat for v1.2.6 2026-02-23 18:15:49 +01:00
Kevin van Dijk 8eb0ec7610 Resolve merge conflicts 2026-02-23 17:10:26 +01:00
Kevin van Dijk 0b7e73e764 refactor: kilo compat for v1.2.4 2026-02-23 17:04:50 +01:00
Catriel Müller ab0ef3008f refactor: rename gh repo 2026-02-23 11:47:15 -03:00
Kevin van Dijk 7ac4e68dc8 Resolve merge conflicts 2026-02-23 13:54:54 +01:00
Kevin van Dijk 9030ba902c refactor: kilo compat for v1.2.0 2026-02-23 13:30:22 +01:00
Mark IJbema b51b9eb677 docs: update repository URLs from kilo to kilocode
Update all github.com/Kilo-Org/kilo references to github.com/Kilo-Org/kilocode
across package.json files, documentation, scripts, and configuration files.

This reflects the repository rename from kilo to kilocode.
2026-02-23 11:41:41 +01:00
Alex Alecu a514530139 fix: ensure abort fires even if shutdown throws in web.ts
Wrap Instance.disposeAll() and server.stop() in try/finally so
abort.abort() always fires, preventing the process from hanging
if either call rejects.
2026-02-20 17:38:40 +02:00
Alex Alecu 7f94b83893 fix: ensure abort fires even if shutdown throws in serve.ts
Wrap Instance.disposeAll() and server.stop() in try/finally so
abort.abort() always fires, preventing the process from hanging
if either call rejects.
2026-02-20 17:38:35 +02:00
Alex Alecu d4231c20e3 fix: Close sub-agents, preventing them from becoming orphan processes 2026-02-20 13:49:51 +02:00
Aiden Cline 1a329ba47d fix: issue from structuredClone addition by using unwrap (#14359) 2026-02-19 19:28:06 -06:00
Michael Hart 8ad60b1ec2 Use structuredClone instead of remeda's clone (#14351)
Co-authored-by: Dax Raad <d@ironbay.co>
Co-authored-by: Dax <mail@thdxr.com>
2026-02-19 18:37:56 -06:00
Yanosh Kunsh 824ab4cecc feat(tui): add custom tool and mcp call responses visible and collapsable (#10649)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-02-19 15:36:40 -06:00
Matt Silverlock 1a1437e78b fix(github): action branch detection and 422 handling (#14322)
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
2026-02-19 15:11:59 -06:00
Dax cb8b74d3f1 refactor: migrate from Bun.Glob to npm glob package (#14317) 2026-02-19 13:40:09 -05:00
Dax Raad af72010e9f Revert "refactor: migrate from Bun.Glob to npm glob package"
This reverts commit 3c21735b35.
2026-02-19 12:48:43 -05:00
Dax Raad 3c21735b35 refactor: migrate from Bun.Glob to npm glob package
Replace Bun.Glob usage with a new Glob utility wrapper around the npm 'glob' package.
This moves us off Bun-specific APIs toward standard Node.js compatible solutions.

Changes:
- Add new src/util/glob.ts utility module with scan(), scanSync(), and match()
- Default include option is 'file' (only returns files, not directories)
- Add symlink option (default: false) to control symlink following
- Migrate all 12 files using Bun.Glob to use the new Glob utility
- Add comprehensive tests for the glob utility

Breaking changes:
- Removed support for include: 'dir' option (use include: 'all' and filter manually)
- symlink now defaults to false (was true in most Bun.Glob usages)

Files migrated:
- src/util/log.ts
- src/util/filesystem.ts
- src/tool/truncation.ts
- src/session/instruction.ts
- src/storage/json-migration.ts
- src/storage/storage.ts
- src/project/project.ts
- src/cli/cmd/tui/context/theme.tsx
- src/config/config.ts
- src/tool/registry.ts
- src/skill/skill.ts
- src/file/ignore.ts
2026-02-19 12:34:18 -05:00
Dax 02a9495063 Remove use of Bun.file (#14215) 2026-02-19 11:32:32 -05:00
Christiaan Arnoldus f1e23c1b87 Remove fallback 2026-02-19 12:41:57 +01:00
Christiaan Arnoldus 51a1297d9c Merge branch 'dev' into feat/dynamic-recommended-models 2026-02-19 11:50:21 +01:00
Dax Raad 11a37834c2 tui: ensure onExit callback fires after terminal output is written 2026-02-18 20:43:50 -05:00
Dax Raad 568eccb4c6 Revert: all refactor commits migrating from Bun.file() to Filesystem module 2026-02-18 19:41:14 -05:00
Aiden Cline 088eac9d4e fix: opencode run crashing, and show errored tool calls in output (#14206) 2026-02-18 17:13:01 -06:00
Dax 6fb4f2a7a5 refactor: migrate src/cli/cmd/tui/thread.ts from Bun.file() to Filesystem module (#14135) 2026-02-18 17:28:41 -05:00
Dax e37a9081a6 refactor: migrate src/cli/cmd/session.ts from Bun.file() to statSync (#14144) 2026-02-18 16:20:58 -05:00
Dax 898bcdec87 refactor: migrate src/cli/cmd/agent.ts from Bun.file()/Bun.write() to Filesystem module (#14142) 2026-02-18 21:08:01 +00:00
Dax d5971e2da5 refactor: migrate src/cli/cmd/import.ts from Bun.file() to Filesystem module (#14143) 2026-02-18 21:07:32 +00:00
OpeOginni be2e6f1926 fix(opencode): update pasteImage to only increment count when the previous attachment is an image too (#14173) 2026-02-18 12:09:09 -06:00
Matt Silverlock d447b7694a fix(github): emit PROMPT_TOO_LARGE error on context overflow (#14166) 2026-02-18 11:45:27 -06:00
Dax 5638b782c5 refactor: migrate editor.ts from Bun.file()/Bun.write() to Filesystem module (#14149) 2026-02-18 17:44:33 +00:00
Dax eb3f337695 refactor: migrate clipboard.ts from Bun.file() to Filesystem module (#14148) 2026-02-18 12:38:44 -05:00
Dax 8f4a72c57a refactor: migrate config/markdown.ts from Bun.file() to Filesystem module (#14151) 2026-02-18 12:35:32 -05:00
Dax 472d01fbaf refactor: migrate cli/cmd/run.ts from Bun.file() to Filesystem/stat modules (#14155) 2026-02-18 17:22:46 +00:00
Kevin van Dijk f5e65046fa Resolve merge conflicts 2026-02-18 18:16:52 +01:00
Dax 3d189b42a3 refactor: migrate file/ripgrep.ts from Bun.file()/Bun.write() to Filesystem module (#14159) 2026-02-18 12:10:42 -05:00