Commit Graph

1275 Commits

Author SHA1 Message Date
Alex Alecu 16abe9679f chore(cli): fix type error after main merge
Add missing 'variant' property to task tool metadata in prompt-effect test, required after upstream added model variant support to the task tool's ExecuteResult type.
2026-04-27 13:11:31 +03:00
Alex Alecu 67993d094e Merge remote-tracking branch 'origin/main' into fix/costs-of-subagents 2026-04-27 13:03:15 +03:00
Marius a5bca011a1 Allow ChatGPT login over OpenAI provider config (#9549)
* fix: allow ChatGPT login over OpenAI provider config

Let users with inherited or globally configured OpenAI API keys sign in with ChatGPT for Codex without first removing their existing provider setup.

* fix: satisfy provider login ci checks

Annotate Kilo-specific shared CLI changes and apply webview formatting so the existing ChatGPT login flow passes CI.
2026-04-27 11:17:04 +02:00
Marius dbf113524e fix(cli): guard external directory boundaries (#9484)
* fix(cli): guard external directory boundaries

* test(cli): move boundary regressions to kilocode tests

* fix(cli): scope root guard to permission prompts

* test(cli): isolate boundary regression fixtures

* test(cli): simplify boundary regression coverage
2026-04-27 11:15:57 +02:00
Marian Alexandru Alecu a2b72044e0 Merge branch 'main' into fix/queued-messages-test 2026-04-27 11:48:19 +03:00
Imanol Maiztegui 94f47d452e Merge branch 'main' into fix/openrouter-deepseek-reasoning 2026-04-27 09:54:31 +02:00
kiloconnect[bot] f631338576 chore(cli): add kilocode_change markers to ported shell cwd fix 2026-04-27 07:38:01 +00:00
kiloconnect[bot] e8c13e0ee8 fix(cli): preserve shell cwd after login startup 2026-04-27 07:31:57 +00:00
Alex Alecu 778c5a84e0 test(cli): guard queued prompt request tail (#9492)
Strengthen the Kilo queue integration test to capture each LLM
request body and assert the second request ends with the queued
user message, not a prior-turn assistant tail. Update the skipped
upstream prompt-effect active-run test comment to reference #9492
and point at the Kilo-specific authoritative coverage.
2026-04-27 10:22:03 +03:00
Josh Lambert 55ddf87040 Revert "fix(cli): also skip interleaved reasoning transform for @kilocode/kilo-gateway"
This reverts commit 1dd436d61a.
2026-04-26 19:55:56 -04:00
Josh Lambert 1dd436d61a fix(cli): also skip interleaved reasoning transform for @kilocode/kilo-gateway
The gateway wraps @openrouter/ai-sdk-provider internally, so the same
openrouter SDK-side reasoning handling applies. Without this, users
routing through api.kilo.ai still see DeepSeek 400 'reasoning_content
must be passed back' errors.
2026-04-26 11:29:26 -04:00
Josh Lambert a1557d1a1f chore: annotate cherry-picked upstream changes with kilocode_change markers 2026-04-26 11:09:07 -04:00
Aiden Cline c884cea5ba fix: ensure openrouter behaves correctly 2026-04-26 10:55:41 -04:00
Josh Holmer a356f3a923 fix(cli): respect configured model for subagents (#7549)
* fix(cli): respect configured model for subagents

* fix(cli): also respect configured variant for subagents
2026-04-24 21:44:08 +02:00
Alex Alecu bc90a50597 fix(cli): count subagent stats 2026-04-24 19:19:41 +03:00
Alex Alecu 1230a3af8b fix(cli): ignore deleted cost sync 2026-04-24 19:19:35 +03:00
Alex Alecu 195ef4e54f fix(cli): exclude subagent sessions from stats aggregate
The task tool propagates each child session's total cost into the parent's tool-wrapper assistant message. Counting both root and child sessions in `kilo stats` would double-count that contribution. Filter `getAllSessions()` to root sessions (parent_id IS NULL), matching how the TUI session list and web sidebar already treat child sessions.
2026-04-24 19:06:08 +03:00
Imanol Maiztegui 8eb0bb3e84 fix(read): skip binary detection for UTF-16 BOM encoded files
Add a check for UTF-16 byte order marks before the NUL/control-char
heuristic so that legitimate UTF-16 encoded files are not incorrectly
classified as binary. Also update Opus 4.7 transform test to expect
the `display: "summarized"` property in xhigh reasoning config.
2026-04-24 13:49:10 +02:00
Imanol Maiztegui 258fe2c8a3 Merge branch 'main' into imanolmaiztegui/kilo-opencode-v1.14.17 2026-04-24 13:31:41 +02:00
Imanol Maiztegui a2ae026f50 test(tui): trim verbose backstory from slot reactivity test header
Remove implementation history paragraph from the test file's doc
comment, keeping only the concise description of what the test
validates.
2026-04-24 11:24:02 +02:00
Imanol Maiztegui 07024a0341 fix(tui): preserve SolidJS prop reactivity in Slot wrapper
Replace object spread (`{...props}`) with `mergeProps` when forwarding
props through the plugin Slot wrapper. Spreading props in SolidJS
evaluates each prop once at mount time, freezing reactive values like
`ref`, `visible`, `disabled`, and `on_submit`. This caused handlers to
bind against stale closures after overlay transitions, breaking Enter
submission on the session_prompt slot.

Add regression tests verifying the wrapper uses `mergeProps` (not
spread) and that reactive prop tracking is preserved at runtime.
2026-04-24 11:22:30 +02:00
Imanol Maiztegui 93a1a00361 refactor: adapt kilo compat layer for v1.14.17 API changes
- Switch ConfigCommand validation from Zod to Effect Schema using
  StandardSchemaV1 interface
- Fix toConfig permission merging to avoid mutating shared object
- Wrap saveAlwaysRules route handler with jsonRequest/Effect generator
- Update Typescript.spawn call sites to pass InstanceContext parameter
- Fix Npm import path in config-gitignore test
2026-04-24 10:30:50 +02:00
Imanol Maiztegui 7d1c046f10 resolve merge conflicts 2026-04-24 10:06:31 +02:00
Alex Alecu ae0c437791 fix(cli): serialize concurrent subagent cost propagation 2026-04-24 07:26:09 +03:00
Alex Alecu 73ab363f9a fix(cli): include subagent costs in session total (#6321)
When a session spawned subagents via the task tool, the displayed cost reflected only the parent's own LLM steps. Propagate each subagent's total up to the invoking assistant message so every UI sums the full tree.
2026-04-24 06:17:02 +03:00
kiloconnect[bot] bde1a4ae88 test(cli): expand encoding preservation coverage
Add unit tests for the Encoding namespace and extend the tool integration
suite with ApplyPatch delete and EditTool replaceAll paths for non-UTF-8
files.
2026-04-23 14:49:05 +00:00
Christiaan Arnoldus 529c3a57f3 Merge pull request #8587 from Kilo-Org/feat/encoding-preservation
feat(cli): preserve original text encoding when editing files
2026-04-23 16:20:23 +02:00
Alex Alecu a22d65e0d7 Merge branch 'main' into fix/queue-messages
Resolve conflicts in question/index.ts, session/prompt.ts, and KiloProvider.ts to pull in upstream's flattened namespace refactor while preserving the queued-messages feature: Question.dismissAll, KiloQuestion.guardFollowup on ask, and the mid-turn 'break out when a follow-up is queued' check in runLoop. VS Code abortSession keeps its queue-preserving signature (no queuedMessageIDs delete); new autocomplete settings helpers from main are wired in unchanged.
2026-04-23 16:45:54 +03:00
kiloconnect[bot] fd04901452 Merge remote-tracking branch 'origin/main' into feat/encoding-preservation
# Conflicts:
#	packages/opencode/src/patch/patch.ts
#	packages/opencode/src/tool/edit.ts
#	packages/opencode/src/tool/write.ts
2026-04-23 13:38:19 +00:00
Imanol Maiztegui 3f507b9427 refactor: kilo compat for v1.14.17 2026-04-23 15:22:41 +02:00
Christiaan Arnoldus 3be1cd6e42 Merge branch 'main' into feat/encoding-preservation 2026-04-23 14:33:07 +02:00
Imanol Maiztegui d8b9b6fb4b test(lsp): enable experimental flag in spawn tests to bypass TsClient short-circuit
Set and restore `Flag.KILO_EXPERIMENTAL_LSP_TOOL` around the two
`.live` LSP spawn tests so they actually reach the `spawn()` call
instead of being short-circuited by the TsClient guard.
2026-04-23 14:25:03 +02:00
Imanol Maiztegui f99974e9c5 Merge branch 'main' into imanolmaiztegui/kilo-opencode-v1.4.9 2026-04-23 14:15:54 +02:00
Imanol Maiztegui c7c1e17352 feat(opencode): include filediff metadata in edit tool permission ask
Add `filediff` field to the edit tool's permission-ask metadata so the
VS Code extension's PermissionDock can render inline diff previews.
Sort and deduplicate dependency entries in package.json. Include a
comprehensive test suite verifying filediff presence across new file
creation, existing file edits, and multi-line replacements.
2026-04-23 14:13:46 +02:00
Imanol Maiztegui 77566d3027 refactor: update imports, fix bugs, and align with v1.4.9 upstream changes
- Fix import paths in kilocode server instance to use routes directory
- Convert relative imports to path aliases in experimental and session routes
- Fix variable name bug in fromModelsDevModel (m -> base) for patchKiloModel
- Add null guard for VITE_KILO_CHANNEL in titlebar before calling includes
- Simplify model schema by replacing safeEnum with direct Schema.Literals
- Remove unused fullSyncedSessions set from sync context
- Add blocking option to question ask interface
- Remove FileTime dependency from read-directory and session-compaction tests
- Remove unnecessary @ts-expect-error comments for Flag overrides in tests
- Fix Account import path in config-gitignore test
- Regenerate SDK with new session list params (projectID, worktrees),
  deduplicated Console class, and updated timeout default to 300000ms
2026-04-23 13:51:49 +02:00
kiloconnect[bot] eb52bda015 fix(cli): prevent double BOM when content starts with U+FEFF
Strip a leading U+FEFF from text before prepending a UTF-8/UTF-16 BOM so
round-tripping content that already carries a BOM character emits exactly
one BOM. Also clarifies the changeset that new files default to UTF-8.
2026-04-23 10:04:01 +00:00
Imanol Maiztegui 9cde05f934 resolve merge conflicts 2026-04-23 11:25:43 +02:00
Marian Alexandru Alecu 1d0318b294 Merge branch 'main' into fix/queue-messages 2026-04-23 12:17:39 +03:00
Josh Holmer 10e8ebb5e1 fix(cli): log stream error on log rotation 2026-04-22 21:05:29 -04:00
kiloconnect[bot] 8c47af8af4 refactor(cli): reapply encoding changes after main merge
Main moved the Patch namespace out of packages/opencode/src/patch/index.ts
into patch/patch.ts and switched tool imports to the new
@opencode-ai/shared/filesystem and ../../src/tool barrels. Reapply the
encoding-aware read/write changes on top of the refactored patch.ts, and
update the integration test imports to match the new module layout.
2026-04-22 15:59:41 +00:00
kiloconnect[bot] 5a4aa91bfb Merge remote-tracking branch 'origin/main' into feat/encoding-preservation 2026-04-22 15:54:11 +00:00
Alex Alecu 6f5dbe050e Merge remote-tracking branch 'origin/main' into cli-suggest-non-blocking
# Conflicts:
#	packages/opencode/src/cli/cmd/tui/routes/session/index.tsx
2026-04-22 17:54:46 +03:00
Alex Alecu f4c70554e8 Merge branch 'main' into fix/queue-messages 2026-04-22 17:54:33 +03:00
Alex Alecu 6d45e33efb core: auto-dismiss suggestion and question prompts once a new user message is queued, so a queued follow-up runs immediately instead of stalling behind a tool waiting on esc 2026-04-22 17:49:44 +03:00
Imanol Maiztegui aeb800dd47 refactor: kilo compat for v1.4.9 2026-04-22 16:17:14 +02:00
Imanol Maiztegui e17c053fc8 style(imports): consolidate deep imports to use barrel re-exports
Replace granular submodule imports with their parent barrel index
across snapshot diff source and related test files. This covers
util/log, util/filesystem, config/config, provider/provider,
tool/registry, tool/truncate, and the filesystem shared package.
2026-04-22 15:58:25 +02:00
Imanol Maiztegui 5149d3edcb Merge branch 'main' into imanolmaiztegui/kilo-opencode-v1.4.7 2026-04-22 15:55:07 +02:00
Marian Alexandru Alecu 3bbe667c8c Merge pull request #9119 from Kilo-Org/fix/snapshot-diff-freeze
fix(cli): fix hanging sessions on huge-file diffs
2026-04-22 16:29:03 +03:00
Alex Alecu 5221569844 fix(cli): cover moved noReply line in kilocode_change block 2026-04-22 16:03:08 +03:00
Alex Alecu 311a73404b fix(cli): break after current stream instead of aborting on new prompt
Replace the state.cancel-based mid-turn injection with a break-after-stream
queue. When a new prompt arrives while the assistant is streaming, the current
LLM step now finishes cleanly, any pending suggest/question tool auto-dismisses
via Suggestion.dismissAll and the new Question.dismissAll, and runLoop breaks
out before the next LLM step via KiloSessionPromptQueue.hasFollowup. Queued
prompts still run in order, each getting a full turn unless a newer one
arrives during it.
2026-04-22 16:00:12 +03:00