Commit Graph

6236 Commits

Author SHA1 Message Date
Marian Alexandru Alecu dbe0f920a8 Merge pull request #9332 from Kilo-Org/fix/queue-messages
fix(cli): fix queued messages
2026-04-23 17:18:37 +03: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
Marian Alexandru Alecu 5b5425cc32 Merge pull request #9408 from Kilo-Org/fix/suggest-review-prompt
fix(cli): narrow when suggest offers review
2026-04-23 16:39:10 +03: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
Alex Alecu 2285bd0831 fix(cli): align suggest gate with commands 2026-04-23 13:12:08 +03:00
Alex Alecu c214d63afb fix(cli): narrow when suggest offers a local code review
Stops the suggest tool from surfacing a local-review prompt after PR-comment replies, reactive fixes, trivial edits, non-implementation work, or review-adjacent turns. Tool description and system prompt now share one explicit gate: only suggest when the user initiated implementation and the diff is substantial.
2026-04-23 12:41:07 +03: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
Alex Alecu d0e109dcb6 refactor(cli): move question dismissAll to kilocode file 2026-04-23 11:29:37 +03:00
Alex Alecu a9107539e3 refactor(cli): move question tool dismissed helpers to kilocode file 2026-04-23 11:29:30 +03:00
Vishal Kumar Singh 03a1285c69 fix(cli): stop doubling the log directory in rotating-file-stream history path
On every kilo CLI startup the process writes an error like:

    log stream error: ENOENT: no such file or directory, open
    '<log-dir>/<log-dir>/.log-history'

Log rotation is effectively disabled because rotating-file-stream cannot
open its history file.

Root cause: rotating-file-stream (3.2.x) treats the `history` option as
a filename resolved against the `path` option. In
`packages/opencode/src/util/log.ts` we were passing an absolute path
(`path.join(dir, '.log-history')`) for `history` while also setting
`path: dir`, so the library concatenated the two and produced the
`<dir>/<dir>/.log-history` path that ENOENTs.

Passing the relative filename `.log-history` lets the library resolve
the history file under the configured `path` directory, matches the
docs, and restores the 50 MB / 10-file rotation cap.

Fixes #8252
Fixes #8275
Fixes #9321
2026-04-23 13:07:01 +05:30
Josh Holmer 10e8ebb5e1 fix(cli): log stream error on log rotation 2026-04-22 21:05:29 -04:00
Marius 48c0553bb7 feat(vscode): xterm.js terminal tabs in agent manager (#9268)
Click the chevron next to the + tab button and pick 'New Terminal' (or hit Cmd+Shift+T / Ctrl+Shift+T) to spawn a real shell inside the selected worktree or Local directory. Each terminal runs via the Kilo CLI's PTY backend, streamed over a direct loopback WebSocket so raw bytes bypass postMessage. Tabs mirror the worktree split-button pattern, support mixed drag-reorder with session tabs, and survive worktree-context switches without losing xterm state (slots are opacity-toggled in a persistent absolute-positioned layer, never unmounted). The legacy Cmd+/ integrated-terminal shortcut and console icon are preserved so existing muscle memory keeps working.
2026-04-22 16:20:40 +00:00
Alex Alecu 310343e7ce chore(cli): mark blockingSuggestion as kilocode change 2026-04-22 18:05:16 +03:00
Alex Alecu d5492f4765 fix(cli): mark dismissed question as blocked 2026-04-22 17:58:33 +03: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
Imanol Maiztegui 92f1c1daba refactor(tui,provider): raise paste-summary thresholds, improve copilot auth error, and clean up comments
Increase paste-summary trigger from 3 lines/150 chars to 5 lines/800
chars to reduce unnecessary summarization on small pastes. Add a branded
reauthentication hint when GitHub Copilot returns 403. Guard against
empty agent list during org switch in the model auto-update effect and
reformat multi-line ternary for readability. Relocate inline comment on
mercury exclusion in reasoning effort variants.
2026-04-22 15:50:55 +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
Marian Alexandru Alecu 740c2b4e8b Merge pull request #9344 from Kilo-Org/fix/infinite-compact
fix(cli): cap per-turn compaction attempts
2026-04-22 16:10:11 +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
kilo-maintainer[bot] eb7bd75d6d release: v7.2.20 2026-04-22 12:30:54 +00:00
Alex Alecu cdd5dc095d Merge remote-tracking branch 'origin/main' into cli-suggest-non-blocking 2026-04-22 15:25:33 +03:00
Alex Alecu 188d71e0ed chore(cli): annotate kilocode sdk import 2026-04-22 15:07:36 +03:00
kilo-maintainer[bot] 475f836904 release: v7.2.19 2026-04-22 11:42:59 +00:00
Alex Alecu 40cb8889fe tui(cli): redesign inline suggest bar to match VS Code single-row layout
Replaces the number-prefixed question-picker block with a full-width tinted
row: icon + suggestion text on the left, clickable action buttons on the
right. Removes keyboard shortcuts and the esc-dismiss hint -- dismissal
already happens automatically server-side when the user sends a new prompt.
2026-04-22 14:24:56 +03:00
kilo-maintainer[bot] fe76dffa50 release: v7.2.18 2026-04-22 10:51:47 +00:00
Alex Alecu c5ca657306 fix(cli): bind reservation owner 2026-04-22 13:49:26 +03:00
Alex Alecu e7bcc93ebb tui(cli): make suggest renderer reactive so the inline bar actually appears
Previously, the non-blocking inline SuggestBar never showed up because the
Suggest component used an early-return if/else that ran once at mount
(when no pending request existed yet) and never re-evaluated when the
suggestion arrived. Users saw 'Suggesting next step...' forever with no
way to accept or dismiss, which felt like the suggestion was blocking
the session again. Switching to <Switch>/<Match> so the branch updates
when the request lands makes the bar appear and be interactive.
2026-04-22 13:08:00 +03:00
Imanol Maiztegui f373e0d06a fix(cli): handle EADDRINUSE race in mcp oauth callback server
Parallel bun test subprocesses can race between isPortInUse() and
listen(), causing the loser to crash with EADDRINUSE. Treat that error
as 'another instance owns the port' (same semantics as the isPortInUse
branch above) so the auto-connect test stops flaking in CI.
2026-04-22 10:41:42 +02:00
Imanol Maiztegui 27028fe292 fix(provider): update adaptive efforts, gateway support, and test corrections
Extract inline Opus 4.7 adaptive effort logic into anthropicAdaptiveEfforts
helper, extend smallOptions to recognize Kilo Gateway alongside OpenRouter,
fix LSP test file path from lsp/index.ts to lsp/lsp.ts, and update xhigh
variant assertion to include display: "summarized".
2026-04-22 10:18:05 +02:00
Imanol Maiztegui 23167b8b6a refactor(test): replace direct Config.get assignment with spyOn mocking
Swap manual save-and-restore of Config.get for bun:test spyOn/mock.restore
across session-list and recall test suites, ensuring proper mock teardown
and consistent namespace imports.
2026-04-22 10:02:40 +02:00
Imanol Maiztegui 5791061abf fix(proxy): await async isSyncing check in server proxy 2026-04-22 09:52:37 +02:00
Imanol Maiztegui f117020215 fix(test): correct config module import to namespace import
Change named import to namespace import for the Config module in
custom-provider-delete test to align with how the module exports
its members.
2026-04-22 09:46:29 +02:00
Imanol Maiztegui 87c2b560d1 Merge branch 'main' into imanolmaiztegui/kilo-opencode-v1.4.7 2026-04-22 09:44:37 +02:00
Imanol Maiztegui ea09e76048 refactor(sdk): reorder generated types and fix route chaining in instance handler
Alphabetically sort import statements in the SDK codegen output and
reposition type declarations (EventInstallationUpdated,
EventSessionTurnOpen, SessionStatus, Todo, etc.) to match updated
code generation ordering. In the server instance router, assign the
chained route builder to a `full` variable before passing it to
`registerKiloRoutes` for clarity.
2026-04-22 09:18:55 +02:00
Alex Alecu 8d06a083bc tui(cli): render non-blocking suggestions inline in the conversation
Moves the 'Run review?' suggestion picker out of the footer bar above the
prompt and into the conversation itself, at the position of the suggest
tool call. Frees up vertical space for reading while scrolling and
matches where the VS Code extension shows the same picker. Clicking an
option still accepts, digit keys 1/2 fast-accept when the prompt isn't
focused, and Esc dismisses. Blocking suggestions keep the above-prompt
overlay.
2026-04-22 09:59:02 +03:00
Alex Alecu d500a983b9 fix(cli): reserve latest injected prompt 2026-04-22 09:54:17 +03:00
Alex Alecu c032fc2021 fix(cli): cap per-turn compaction attempts to stop infinite busy loop
When every compaction round still overflowed the model context, SessionPrompt.runLoop would keep calling compaction forever and report the turn as completed. Cap attempts at three per turn and surface exhaustion as a ContextOverflowError on the assistant message with TurnClose reason=error.
2026-04-22 09:54:11 +03:00
Imanol Maiztegui 324ee79f33 build(deps): upgrade OpenTelemetry packages to v2 and sort dependencies
Bump @opentelemetry/core, sdk-trace-base, sdk-trace-node, and
resources from 1.30.x to 2.6.1 and semantic-conventions from 1.28.0
to 1.40.0 in kilo-telemetry. Migrate to the new v2 API surface:
replace `new Resource()` with `resourceFromAttributes()`, rename
`parentSpanId` to `parentSpanContext`, and rename
`instrumentationLibrary` to `instrumentationScope` in span types and
tests. Alphabetically sort dependency entries in the opencode
package.json.
2026-04-22 08:45:19 +02:00
Imanol Maiztegui a314589520 fix(opencode): replace direct Env access with effect-based resolution and update test infrastructure
Remove synchronous Env.get/Env.all calls in provider, tool registry,
and model-cache modules, replacing them with effect-yielded env
lookups or direct process.env reads where appropriate. Thread resolved
env through patchCustomLoaderResult and kiloCustomLoaders dependency
type. Drop unused paste-summary import from prompt component, fix
createResource action call in session list dialog, add bell toggle KV
signal, and rewrite config-gitignore test to use proper Effect layers
instead of mocked AppRuntime. Update remaining import paths and test
module mocks to align with barrel re-exports.
2026-04-22 08:28:03 +02:00
Imanol Maiztegui 251ed67347 refactor(opencode): update internal import paths to use barrel re-exports
Migrate all deep import paths across source and test files to
reference barrel index modules instead of direct file paths. This
covers config, provider, storage, util, tool, lsp, project, and
installation modules. Also moves provider promise helpers out of the
namespace block, switches Clipboard to namespace import style, fixes a
duplicate Filesystem import, removes the deleted paste-summary test,
and corrects snapshot cache typing and indentation.
2026-04-22 07:24:09 +02:00