Commit Graph

5958 Commits

Author SHA1 Message Date
kiloconnect[bot] dfbdc97cd3 refactor(cli): simplify isBinaryFile check to UTF-16 BOM only
Per review: CJK and legacy single-byte encodings already passed the old
control-char heuristic (their bytes are all >= 0x80, never NUL), so the
full Encoding.detect pass in isBinaryFile was solving a non-problem for
them. The only realistic regression in the old heuristic is UTF-16 with
BOM, where the second byte of every ASCII character is 0x00 and fires
the NUL-byte early-return.

Replace the detect call with a 2-byte BOM check via a new
Encoding.hasUtf16Bom helper. Also reword the move/add inline markers in
patch/index.ts to note that Encoding.write handles mkdir.
2026-04-22 13:05:31 +00:00
kiloconnect[bot] cce5e459bc refactor(cli): self-review — tighten markers, fix detection edge cases
- Encoding.detect: lowercase-compare UTF-32 rejection so jschardet's
  uppercase 'UTF-32'/'UTF-32BE'/'UTF-32LE' labels no longer slip through
  (iconv-lite happens to have utf-32 codecs that would then be accepted).
- Encoding.read: drop redundant Buffer.from wrap around readFile's
  already-Buffer return value.
- EncodedIO: switch to Effect.tryPromise so I/O failures surface as
  typed errors that .pipe(Effect.catch(...)) can recover from; the
  apply_patch delete branch relies on this to translate read errors
  into 'apply_patch verification failed'.
- Shrink kilocode_change blocks in edit.ts, write.ts, apply_patch.ts,
  patch/index.ts, and read.ts to per-line inline markers where each
  block was only wrapping 1-3 changed lines.
- Collapse the 'if (exists) { let contentOld; let encoding; ... }'
  blocks in edit.ts and write.ts into a single ternary + destructure
  that keeps all three lines self-contained and each independently
  annotated.
- Remove the unused 'latin1' sample and fix the 'providEncoded' typo
  in the encoding integration test file.
- Strengthen the apply_patch Shift_JIS test to assert exact bytes
  instead of the weak 'does not contain these two UTF-8 bytes' check.
- Drop the stray .kilo/ and .kilocode/ lockfiles that were re-added
  by an upstream 'wip' commit.
2026-04-21 16:18:47 +00:00
kiloconnect[bot] adc82a0f02 Merge remote-tracking branch 'origin/main' into feat/encoding-preservation 2026-04-21 16:02:33 +00:00
Marian Alexandru Alecu ed665ed960 Merge pull request #9300 from Kilo-Org/fix/plan-in-agent-manager
fix(agent-manager): start-new-session tab on slow handover
2026-04-21 17:38:47 +03:00
kilo-maintainer[bot] ba98c5c402 release: v7.2.17 2026-04-21 14:28:13 +00:00
kiloconnect[bot] 6f55a3061d refactor(cli): restore stream.destroy and keep original comments
- Wire Readable.from through a named `stream` variable so the `lines`
  helper can destroy it in the finally block, matching the previous
  createReadStream pattern.
- Restore the 'Create parent directories', 'Handle file move', 'Regular
  update', 'Read original file content', and 'For delete, we need to read
  the current content' comments that were dropped when switching to
  Encoding.write / Encoding.read. The explicit fs.mkdir calls are no
  longer needed because Encoding.write mkdirs recursively, but the intent
  comments still apply.
2026-04-21 14:04:35 +00:00
Alex Alecu 925606ce5a fix(cli): clear pending on errors 2026-04-21 16:54:16 +03:00
Alex Alecu 2f6109a5a2 fix(cli): guard follow-up loop start 2026-04-21 16:33:05 +03:00
kiloconnect[bot] 5538fc9c32 feat(cli): preserve UTF-8 BOM through read/write round-trip
iconv-lite's utf-8 codec strips any leading BOM on decode and never emits
one on encode, so files that started with EF BB BF would lose their BOM
after an edit. Track UTF-8-with-BOM as a distinct synthetic encoding label
and re-prepend the BOM bytes on write so the round-trip keeps the file
byte-identical (modulo any actual edits).
2026-04-21 13:32:48 +00:00
kiloconnect[bot] fa08250d73 refactor(cli): restore streaming line read and tidy markers
- Restore the streaming createInterface loop in the `lines` helper so the
  diff against main stays small; decode bytes with iconv-lite up front and
  feed the resulting text through Readable.from.
- Drop 'new file' kilocode_change markers from files under kilocode/
  directories (those paths are exempt from the annotation check).
- Tighten the changeset copy to sound like a user-facing release note.
2026-04-21 13:15:30 +00:00
kiloconnect[bot] 526f6807ff test(cli): add integration tests for tool encoding preservation
Exercise Read/Write/Edit/ApplyPatch tools directly against files in
UTF-8, UTF-16 LE/BE (with BOM), Shift_JIS, EUC-JP, GB2312, Big5, EUC-KR,
Windows-1251, and KOI8-R to verify the tools decode input correctly and
round-trip bytes back to the original encoding. Also ensure UTF-16
BOMs survive the write pipeline.
2026-04-21 12:40:56 +00:00
kiloconnect[bot] a2926207f9 refactor(cli): simplify encoding detection and isolate helpers
Drop manual BOM parsing, UTF-32, and UTF-16-without-BOM detection: rely on
TextDecoder + jschardet + iconv-lite which already handle BOM round-tripping
for UTF-16 LE/BE. Move the encoding helpers and Effect wrappers into
packages/opencode/src/kilocode/ so shared tool files only carry targeted
kilocode_change markers.
2026-04-21 12:25:53 +00:00
Evgeny Shurakov c0e9ab46b3 Merge pull request #9313 from Kilo-Org/eshurakov/cli-dev-local-script
Cli - Add dev:local script for isolated local development
2026-04-21 14:17:43 +02:00
kiloconnect[bot] 4d6ba91593 Merge branch 'main' into feat/encoding-preservation 2026-04-21 12:07:17 +00:00
Evgeny Shurakov a8803476f5 feat(cli): add dev:local script with isolated XDG dirs and local endpoints 2026-04-21 13:49:55 +02:00
Alex Alecu b6b6802dd4 fix(cli): keep follow-up session busy during handover
Mark new plan follow-up sessions busy as soon as the tab opens so the UI
shows work is still in progress while the handover summary is generated.
Clear the temporary busy state if that pre-loop handover phase is aborted
or fails before the normal prompt loop takes over.
2026-04-21 14:46:06 +03:00
Alex Alecu e696fe6ea4 fix(cli): inject plan message immediately, append handover in-place
Show the plan text right away in the new session tab without waiting
for the handover LLM call. The message part is created with plan+todos
as soon as the session opens; the handover section is upserted onto the
same part once the slow LLM call resolves.
2026-04-21 13:28:48 +03:00
Christiaan Arnoldus b99e7ff513 Apply suggestion from @chrarnoldus 2026-04-21 12:24:46 +02:00
kiloconnect[bot] e28bbd6ee9 Merge remote-tracking branch 'origin/main' into feat/ling 2026-04-21 09:51:41 +00:00
kiloconnect[bot] 85dd7e091b refactor: share isLing helper via kilocode/model-match, add multilingual exclusion 2026-04-21 09:43:57 +00:00
kiloconnect[bot] eb4ef74600 refactor: replace broad ling startsWith with isLing helper excluding kling/bling/spelling 2026-04-21 09:33:23 +00:00
kiloconnect[bot] fe34c0bfe6 fix: use startsWith for ling model detection and add ling to openapi prompt enum 2026-04-21 09:04:34 +00:00
Alex Alecu 0d0dabe598 fix(cli): start-new-session tab on slow plan handover
Create the follow-up session before running the handover LLM call so
the extension's pendingFollowup SSE gate fires inside its 30s TTL. The
handover and todos are now injected into the already-live session
after it resolves, instead of blocking session creation.
2026-04-21 11:50:13 +03:00
kiloconnect[bot] 2df50796b6 chore: add kilocode_change annotations to ling model changes 2026-04-21 08:07:34 +00:00
Christiaan Arnoldus 20c4962541 Merge branch 'main' into feat/ling 2026-04-21 10:02:31 +02:00
Christiaan Arnoldus f0bc029662 Merge branch 'main' into bash-optional-description 2026-04-21 10:00:07 +02:00
Marian Alexandru Alecu 60a1f3c36d Merge pull request #9246 from Kilo-Org/fix/plan-followup-translations
feat(i18n): translate plan follow-up options
2026-04-21 09:57:23 +03:00
kiloconnect[bot] e6310c5292 fix(cli): add alibaba to kiloProviderOptions thinking translation 2026-04-20 19:19:42 +00:00
kiloconnect[bot] e7ac4d5512 Merge remote-tracking branch 'origin/main' into bash-optional-description
# Conflicts:
#	packages/opencode/src/tool/bash.ts
2026-04-20 15:30:04 +00:00
Alex Alecu 00ad8f9c87 Merge remote-tracking branch 'origin/main' into fix/plan-followup-translations
# Conflicts:
#	packages/kilo-vscode/tests/unit/question-dock-utils.test.ts
#	packages/kilo-vscode/webview-ui/src/components/chat/QuestionDock.tsx
#	packages/kilo-vscode/webview-ui/src/components/chat/question-dock-utils.ts
#	packages/opencode/src/kilocode/plan-followup.ts
#	packages/opencode/test/kilocode/plan-followup.test.ts
2026-04-20 18:09:05 +03:00
kiloconnect[bot] 34e16b3622 Merge remote-tracking branch 'origin/main' into add-alibaba-provider 2026-04-20 15:02:20 +00:00
Alex Alecu df44d3847d fix(cli): keep older queued prompts hidden on retarget 2026-04-20 17:26:54 +03:00
Alex Alecu b25843962d fix(cli): restore "Type your own answer" on plan follow-up in TUI
When the plan agent pauses for the follow-up question, CLI users had no
way to send a free-text reply: the main prompt input is hidden while a
blocking question is active, and the "Type your own answer" row was
being forced off to avoid duplicating the VS Code prompt input. CLI now
shows the custom-answer row again, while VS Code keeps it hidden.
2026-04-20 17:16:48 +03:00
Alex Alecu 64e2f096c4 fix(cli): make plan follow-up "Continue here" continue the loop
The prompt queue's scope() hid the user message injected by
PlanFollowup.inject() because its ID was newer than the queue target,
so the loop saw the same plan_exit messages and re-asked the question
in an infinite cycle. Retarget the queue after inject so the new
message is visible on the next iteration.
2026-04-20 17:16:48 +03:00
Alex Alecu ec5ac2e19f fix(vscode,cli): make plan_exit "Continue here" work again
Restore custom: false on the plan follow-up question — the "Type your own answer" row was redundant because the main prompt already routes typed text as a question reply. Auto-submit single-question single-select option picks in the VS Code QuestionDock so the button behaves like the TUI instead of silently waiting for a second Submit click.
2026-04-20 17:16:48 +03:00
Alex Alecu c529142d72 feat(i18n): translate plan_exit follow-up options in the VS Code sidebar
Add optional `labelKey`/`descriptionKey` to Question.Option and `questionKey`/`headerKey` to Question.Info, annotated with `kilocode_change` markers. Populate these keys from the plan follow-up so the "Ready to implement?" question, "Start new session", and "Continue here" buttons render in the sidebar language while the canonical English labels remain on the reply wire (unchanged server-side matching).
2026-04-20 16:15:06 +03:00
Marius 2b17a7b4e8 fix: persist custom provider model and variant deletions (#9239)
* fix: persist custom provider model and variant deletions

The CLI config.update endpoint deep-merges its payload with existing
global config, so removing a model or reasoning variant from a custom
provider in the UI had no effect on disk. Save payloads now emit null
sentinels for removed IDs, and the Provider schema accepts nullable
record values so stripNulls can delete them during the merge.

Closes #9186

* chore: update kilo-vscode visual regression baselines

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-20 13:05:49 +00:00
Alex Alecu f970d34278 fix(vscode,cli): make plan_exit "Continue here" work again
Restore custom: false on the plan follow-up question — the "Type your own answer" row was redundant because the main prompt already routes typed text as a question reply. Auto-submit single-question single-select option picks in the VS Code QuestionDock so the button behaves like the TUI instead of silently waiting for a second Submit click.
2026-04-20 14:56:40 +03:00
Imanol Maiztegui 22267986b2 Merge pull request #9205 from Kilo-Org/imanolmaiztegui/kilo-opencode-v1.4.6
OpenCode v1.4.6
2026-04-20 13:45:58 +02:00
Evgeny Shurakov 214496f679 Merge pull request #8494 from Kilo-Org/eshurakov/nebula-chauffeur
Sessions - Add session_status ingest message for status tracking
2026-04-20 13:06:45 +02:00
Marian Alexandru Alecu 521490b5b8 Merge pull request #9199 from Kilo-Org/fix/suggest-tool-stuck-session
fix(cli): release session busy state while suggest tool waits
2026-04-20 14:04:17 +03:00
Alex Alecu 58fd32937d test(cli): pin suggest tool session-status behavior to prevent stuck-busy regression
Lock in that a session with an open suggestion reports as idle (so reopening VS Code or switching worktrees does not show it stuck/running), that accepting flips it back to busy without an idle flash, and that a dismissed suggestion leaves it idle for the run loop to resume cleanly.
2026-04-20 13:57:14 +03:00
Imanol Maiztegui 126132d8da refactor(snapshot): inline kilo snapshot helpers and remove dedicated module
Move worktree-scoped gitdir construction, ACP guard logic, and diff
caching directly into the core snapshot service, eliminating the
separate kilocode/snapshot module. This reduces indirection and keeps
all snapshot concerns co-located in a single file.
2026-04-20 12:55:36 +02:00
Evgeny Shurakov 93e7ddb39e fix(cli): coalesce status sync retries 2026-04-20 12:04:07 +02:00
Imanol Maiztegui 7e27cd0add chore(cli): sort dependencies alphabetically in package.json 2026-04-20 11:31:07 +02:00
Imanol Maiztegui aa4deb520c resolve merge conflicts 2026-04-20 11:04:03 +02:00
Imanol Maiztegui c4a516f3cf refactor: kilo compat for v1.4.6 2026-04-20 10:45:43 +02:00
Evgeny Shurakov ba6970bf23 fix(cli): time out status derive to prevent stuck chain entries
If deriveAndSyncStatus hangs, the per-session promise chain would never
drain and map entries would accumulate. Wrap the derive with a 3s timeout
so stuck work fails fast, is logged, and the existing cleanup runs.
2026-04-20 10:45:29 +02:00
kiloconnect[bot] 8b90eec6d0 feat(gateway): add Alibaba as supported AI SDK provider 2026-04-20 08:43:03 +00:00
Alex Alecu 973e3f912f fix(cli): restore busy state when suggestion is accepted 2026-04-20 11:25:53 +03:00