Commit Graph

7570 Commits

Author SHA1 Message Date
can1357 f38af64430 chore: bump version to 15.10.2 2026-06-08 02:57:31 +02:00
can1357 bc936cde43 feat(coding-agent/modes): changed workflow fan-out trigger keyword from workflow to workflowz
- Updated workflow detection in `workflow.ts` to recognize only the lowercase `workflowz` token for detection and highlighting.
- Changed workflow instructions and tips to reference the new `workflowz` trigger for eval fan-out behavior.
- Updated workflow tests to assert `workflowz` matches correctly and previous `workflow`/`workflows` forms no longer trigger.
2026-06-08 02:56:36 +02:00
can1357 7dc3ed7e8b Merge remote-tracking branch 'origin/farm/b74e4820/hashline-replace-drops-body-lines' 2026-06-08 02:56:14 +02:00
can1357 3909e83137 test(coding-agent): mocked settings init for ascii bar tests
- Stubbed `isSettingsInitialized` to false so crest timing stays deterministic.
- Replaced magic timestamp with named `CLASSIC_CREST_VISIBLE_MS` constant.
2026-06-08 02:55:44 +02:00
can1357 c4b3f267f5 fix(ai/providers): handled Anthropic ping keepalives and excluded usage limits from retrying
- Anthropic streaming now yielded explicit `ping` events and propagated them through the stream event types.
- Ping keepalive markers reset idle liveness handling so long-running streams no longer stalled as idle.
- Usage and quota limit errors were treated as non-retryable, and tests were added to keep transient rate-limit retries unchanged.
2026-06-08 02:53:01 +02:00
can1357 733d1dabb1 fix(tui): triggered viewport repaint when focus changes
- Tracked focus transitions in TUI and flagged renders after focus changes to allow unknown viewport mutations.
- Used the new focus-change flag when deciding explicit viewport mutation so subsequent frames repaint even when the terminal lacks a viewport-oracle position.
- Added a regression test covering menu teardown focus changes on unknown-viewport terminals with eager scrollback risk.
2026-06-08 02:45:16 +02:00
can1357 d574968da4 fix(coding-agent/config): hardened settings hooks against callback exceptions
- Replaced manual settings callback sets with a shared `SettingSignal` that snapshots listeners and skips over individual callback failures.
- Updated `provider.appendOnlyContext`, `statusLine.sessionAccent`, and `hindsight` hook dispatch to use the new signal and added a Settings test confirming a throwing append-only listener does not stop other listeners.
- Adjusted the duplicate-tool-results regression test to handle `tool_calls` being absent before mapping IDs.
2026-06-08 02:38:18 +02:00
roboomp ac8171a507 fix(ai): emit concat-safe minimax object-args delta on toolcall_end
Codex review on #2082 caught that the merged-args fix still emitted
`delta = JSON.stringify(rawArgs)` per object chunk. Every downstream
consumer that follows the OpenAI `toolcall_delta` contract by
concatenating deltas — `packages/agent/src/proxy.ts` reconstructing
`partialJson` (lines 286-290), `openai-chat-server` forwarding
`tool_calls[].function.arguments`, `openai-responses-server` appending
to `cur.argsText`, `anthropic-messages-server` emitting
`input_json_delta` — would have seen an invalid sequence like
`{"input":"a"}{"input":"b"}` once a host fragmented the args across
deltas, and `parseStreamingJson`'s repair-then-partial-parse fallback
collapses that to `{}` or just the first object. The source-side
`.result()` was correct because `block.arguments` already held the
merged result, but every concat-based reader downstream lost the args.

Suppress object-chunk wire deltas during streaming (the merge still
runs into `block.partialArgs`/`block.arguments`) and flush the full
merged JSON as a single concat-safe delta in `finishToolCallBlock`
right before `toolcall_end`. Concat consumers now reconstruct the args
unconditionally — single-chunk case is still `"" + full_json`,
multi-chunk case is `"" + "" + … + full_json`, both parse to the same
merged object.

Two new regression tests in `issue-2080-repro.test.ts` accumulate
`event.delta` the way `proxy.ts` does and assert `JSON.parse(accum)`
matches the source-side merged args, covering both the multi-chunk
fragmented-string shape and the single-chunk shape (no #1776
regression). The three pre-existing tests for the merge behaviour
itself still pass unchanged.
2026-06-08 00:37:23 +00:00
can1357 00e6e14cb4 feat: added reconstructed raw SSE capture for stream provider SDKs
- Added reconstructed SSE event emission for OpenAI, Azure, and Anthropic streams.
- Added raw SSE text to debug report bundles, including raw-sse.txt output.
- Included dropped-record metadata in raw SSE text when events were trimmed.
- Updated raw SSE and sse-debug tests for observer-based capture and safety checks.
2026-06-08 02:35:14 +02:00
can1357 71624ee47b fix(coding-agent): fixed stale settings and session-accent cache handling
- Cached setting path segments and memoized `Settings.get()` results, clearing caches on updates.
- Triggered session-name and session-accent callbacks only when effective values changed, with error-safe dispatch.
- Memoized status-line and interactive accent resolution with cache invalidation on settings/theme/session changes.
- Added regression tests for keybinding precedence, status-line, settings, and accent cache behavior.
2026-06-08 02:30:44 +02:00
can1357 a3efb62998 feat(coding-agent/modes): added canonical key matching behavior and exported alias utilities
- Built canonical and alias key maps for action/custom handlers and rebuilt them on changes.
- Preserved the first handler when custom key alias collisions occurred during rebuilds.
- Exported canonicalKeyId and addKeyAliases from keybindings for external use.
2026-06-08 02:29:30 +02:00
roboomp a5587336e8 style: bun run fix 2026-06-08 00:28:08 +00:00
roboomp 9bc2a01b18 fix(ai): merged minimax multi-chunk object tool arguments
MiniMax-compatible OpenAI-completions hosts stream `function.arguments` as
an object instead of the OpenAI JSON-string contract. The accumulator
added in #1776 wrote `block.partialArgs = rawArgs` per chunk, which
worked for the assumed single-chunk shape but silently dropped every
chunk but the last when the host fragmented the args across deltas. For
an `edit` call that meant a tail-slice of the patch text was applied —
e.g. a `replace 91..91:` body whose surrounding rows were lost, surfacing
as the hashline applier "widening" the delete across the original line's
neighbours (the symptom the reporter saw with MiniMax-M3).

Shallow-merge chunks into the accumulated args object. For shared string
keys, distinguish cumulative restatements from per-chunk-delta fragments
with `startsWith` so cumulative payloads are not doubled and delta
fragments are not lost. The single-chunk shape covered by the existing
#1776 regression test remains a no-op because there is no prior value to
merge with. New `issue-2080-repro.test.ts` covers the three multi-chunk
shapes: delta fragments, cumulative restatements, and chunks that
introduce new keys.

Fixes #2080
2026-06-08 00:28:01 +00:00
can1357 5e34d446e7 fix(coding-agent/modes): fixed shimmer sweep timing to use fixed-cell velocity
- Updated classic shimmer to compute band position from elapsed time at 30 cells per second instead of a fixed sweep duration.
- Updated KITT shimmer to use fixed-speed ping-pong motion over the same 2xrange cycle so round-trip timing scales with message length.
2026-06-08 02:27:24 +02:00
can1357 6d77bafe84 fix(tui): suppressed redundant cursor writes during no-op terminal rerenders
- Added hardware cursor state caching to reuse last known position and visibility.
- Updated cursor flow to preserve target row/column/visibility across rerenders.
- Reworked cursor output emission to skip unchanged cursor moves and hide/show writes.
2026-06-08 02:22:18 +02:00
can1357 078dac7ea8 fix(tui): skipped loader render requests when text unchanged
- Returned a changed flag from setText to gate render requests.
- Avoided redundant renders when composed loader text matches prior frame.
2026-06-08 02:15:24 +02:00
can1357 243a806415 fix(coding-agent): fixed reference retries and raw/placeholder handling
- Adjusted `LspTool` to retry only zero/decl-only references with two 250ms waits for project-aware servers.
- Removed raw-mode GitHub repo README API fallback in `read`, so `:raw` now renders the page directly.
- Replaced regex heuristics in `isImagePlaceholderAnswer` with a fixed normalized placeholder set.
2026-06-08 02:07:18 +02:00
can1357 584ea7536d docs(docs): documented eval, read, search, and browser behavior fixes
- Documented `eval` `llm()` default system fallback when none is supplied (#1492).
- Documented Python `read()` positional arguments and `eval` reset-cell coalescing for overlapping cells.
- Documented `read` path handling for `local://`, absolute paths, and `realpath` snapshot-key canonicalization.
- Documented `search`, `find`, `ast_grep`, and `ast_edit` path parsing for bracket paths, URLs, `skip`, and large files.
- Documented `web_search` placeholder filtering for image-like answers and `task` schema-overridden finalize path.
- Documented `browser` `tab.open` viewport reuse, credential redaction, and `lsp` timeout/routing updates.
2026-06-08 02:04:59 +02:00
can1357 68c454c0fc feat(edit/read): enabled canonical snapshot keys across read/write paths
- Canonicalized snapshot key resolution with realpath, parent fallback, and raw fallback.
- Updated snapshot, hashline, read, and write flows to use canonical snapshot keys consistently.
- Fixed converted-content line-range reads to apply selectors via in-memory range/text builders.
- Updated read tool docs to clarify one-line and multi-range selector context bounds.
2026-06-08 02:04:59 +02:00
can1357 088fb7fb75 fix(eval): resolved JS/Python resets by awaiting in-flight operations
- Coalesced concurrent JS and Python reset requests by awaiting in-flight promises instead of throwing.
- Aligned non-reset execution calls to wait for in-progress resets before running on a recreated session.
2026-06-08 02:04:59 +02:00
can1357 49aa6e5839 fix(eval): corrected eval LLM calls and spawn-aware tool descriptions
- Ensured eval LLM calls always include a non-empty system prompt to avoid 400s.
- Aligned eval tool docs with session spawn policy by omitting agent() when spawns are disallowed.
- Added regression coverage for default system prompts and spawn-aware agent() description behavior.
2026-06-08 02:04:59 +02:00
can1357 f73942eb28 fix(eval/py): corrected read() positional offset/limit support and tests
- Updated `packages/coding-agent/src/eval/py/prelude.py` to accept positional `offset` and `limit` in `read()`.
- Added regression coverage in `packages/coding-agent/src/eval/py/__tests__/prelude.test.ts` for positional read signatures.
2026-06-08 02:04:59 +02:00
can1357 8173b7ea8c feat(tools/browser): enabled shared browser tab reuse and extract safety
- Applied `opts.viewport` on reusable tabs in `tab-supervisor.acquireTab` before conditional `tab.goto`.
- Skipped `runInTabWithSnapshot` on tab reuse when no viewport or URL change was requested.
- Changed `tab.extract` to return `Promise<string>` and throw on missing or empty Readability content.
- Redacted `user:pass@` from tab URLs returned in observations to avoid leaking credentials.
- Documented `tab.extract(format)` to return markdown/text and throw when no readable content exists.
2026-06-08 02:04:59 +02:00
can1357 81a7af448e fix(lsp): addressed lsp flakiness via timeout handling and retry behavior
- Updated sendRequest timeout handling to use explicit timeoutMs, then AbortSignal deadlines, else 30s fallback.
- Normalized getServersForFile matching to accept both `.ts` and `ts` for extension routing.
- Expanded references retry logic to handle thin results with progressive backoff before giving up.
- Filtered rename_file fanout to servers matching source/destination extensions only.
- Updated status output to separate configured servers from started clients with readiness labels.
- Added regression tests for timeout ownership, extension filtering, and status readiness reporting.
2026-06-08 02:04:59 +02:00
can1357 ccf49e6c37 feat(tools/fetch): added :raw repo-root README decode with fallback
- Added `:raw` repo-root resolution via GitHub API `/readme` for decoded markdown.
- Preserved fallback to default raw HTML rendering when the README payload was unusable.
- Added regression coverage for successful README decoding and fallback behavior.
2026-06-08 02:04:59 +02:00
can1357 b3af7c29b4 feat(tools/github): added cache purges for mutating gh bash commands
- Added pre-run cache invalidation for mutating gh issue/pr bash commands.
- Implemented bash command token parsing for mutating issue/pr calls and extraction.
- Added cache purging by issue/PR number with optional cross-repo scope.
- Added tests covering mutating, chained, and no-op bash command cache scenarios.
2026-06-08 02:04:59 +02:00
can1357 ee4df538f0 fix(tools): resolved search-path parsing and local sandbox checks
- Set `FindTool` to disable recursive glob traversal so `dir/*` stays shallow.
- Added `parseSearchPathPreferringLiteral` to prefer literal paths like `apps/[id]/page.tsx` when they exist.
- Updated `resolveToolSearchScope` to reject external URLs with a clear `read` usage error.
- Expanded plan-mode sandbox checks to allow absolute paths inside the local artifact root.
2026-06-08 02:04:59 +02:00
can1357 de8851b0c8 fix(tools/search): patched search for skip and oversized archive warnings
- Accepted nullable `skip` in `searchSchema` and treated it as 0 in `SearchTool` pagination logic.
- Added oversized-file detection for explicit search targets to warn when native grep's 4MB cap may hide matches.
- Clarified archive-member error guidance to read `<archive>:<member>` content directly before re-grepping.
2026-06-08 02:04:59 +02:00
can1357 c9b3c23600 feat(task): enabled schema override flow to keep task payloads with warnings
- Propagated `schemaOverridden` from `YieldTool` into executor `YieldItem` metadata.
- Bypassed schema validation on override or schema-builder errors and kept payload output with success exit.
- Emitted `SUBAGENT_WARNING_SCHEMA_OVERRIDDEN` so accepted override results no longer surface as `schema_violation`.
2026-06-08 02:04:59 +02:00
can1357 e44bf8261b fix(web): resolved placeholder-only codex responses by returning citations
- Expanded Codex placeholder detection to match common image-reference phrases and punctuation.
- Raised `codex` provider failure when final and streamed text are placeholders and no sources exist.
- Dropped placeholder prose from returned answers while preserving citation sources.
2026-06-08 02:04:59 +02:00
can1357 16f9c199da ux(coding-agent/task): adjusted running task progress output to animate descriptions
- Reworked running-task rendering so shimmer animation is applied to descriptions instead of IDs.
- Added accent coloring for the separator and description text to keep the status line formatting consistent.
2026-06-08 01:46:03 +02:00
can1357 b4d845b2ef chore: bump models 2026-06-08 01:41:06 +02:00
can1357 854c854033 fix(natives): kept Linux clipboard alive to preserve X11 selection ownership
- Reworked Linux clipboard writes to use a shared `OnceLock<Mutex<Option<Clipboard>>>` so a `Clipboard` instance persists for the process and keeps X11 ownership alive.
- Updated `copy_to_clipboard` to route Linux calls through the persistent helper while macOS and Windows keep transient on-thread writes.
- Added changelog entries for the native X11 clipboard fix and the AI default Anthropic model note.

Fixes #2075
2026-06-08 01:39:48 +02:00
Can Bölük 200e1721a0 Merge pull request #2033 from WodenJay/fix/proxy-stream-disconnect
fix(proxy): throw error when server disconnects without terminal event
2026-06-08 01:36:45 +02:00
can1357 caa9c69309 feat(coding-agent): added provider-priority model selection and refined fallback ordering
- Added first-party-first provider priority defaults for model ranking.
- Consolidated model resolution to use getModelMatchPreferences from session settings.
- Prioritized providerPriorityRank ahead of usage rank when picking preferred models.
- Added second-pass fallback to default-model or API-key-valid matching order.
2026-06-08 01:32:39 +02:00
can1357 e1840cde00 feat(coding-agent/modes): displayed auto-selected role defaults as [ROLE auto] badges
- Tracked each role assignment with an `autoSelected` flag to distinguish inferred defaults from configured models.
- Resolved unconfigured known roles from `pi/{role}` candidates in `#loadRoleModels` and marked them as auto-selected defaults.
- Added a selector test verifying unconfigured models render `[SMOL auto]` and `[SLOW auto]` badges.
2026-06-08 01:22:36 +02:00
can1357 a89bb76444 fix(tui): preserved visible ANSI content when truncating terminal rows
- Replaced the TUI row truncation path with per-character and ANSI-sequence iteration that tracks visible cells before clipping output.
- Added ANSI helpers to parse sequence boundaries and preserve OSC66 visible payloads while enforcing max source length during truncation.
- Added natives regression coverage for Ghostty super+alt backspace key matching and parsing.
2026-06-08 01:22:26 +02:00
can1357 d930f4c82d feat(packages/ai): added credential origin to provider auth
- Added `getCredentialOrigin` and `getEnvApiKeyName` to classify auth source.
- Surfaced provenance tags in the `/login` and `/logout` provider picker.
- Made the picker search filter match credential origin and env var name.
- Added coverage for credential-origin precedence and env naming.
2026-06-08 01:16:37 +02:00
can1357 b2e7cd2634 fix(packages/ai): resolved tool-call duplicate IDs for OpenAI/Mistral
- Adjusted deduplicateToolCallIds in transform-messages.ts to enforce max tool-call ID length.
- Updated convertMessages in openai-completions.ts to pass provider-specific ID limits and suffix settings.
- Added regression coverage for duplicate tool IDs on OpenAI and Mistral truncation paths.
2026-06-08 01:09:47 +02:00
can1357 403ce587df fix(packages/coding-agent): resolved missing source cwd for local resumes
- Handled local resumes with missing source CWD by prompting to move and reopening sessions.
- Shared missing-CWD relocation logic between local and global resumes for consistency.
- Added regression test for local explicit-session-dir resumes and session-header cwd updates.
2026-06-08 01:09:47 +02:00
can1357 41aa4de9b2 fix(packages/coding-agent): resolved OSC5522 BEL and metadata behavior
- Tracked kitty-dot payload listings to emit BEL-terminated OSC5522 responses.
- Updated non-kitty-dot writes to include mime in metadata and drop ST terminator.
- Adjusted enhanced-paste tests to assert BEL terminator and metadata formatting.
2026-06-08 01:09:47 +02:00
can1357 d6830b4b8b fix(packages/tui): resolved width-based truncation with issue-2045 test
- Switched long-row truncation to visible-cell width, preserving suffixes after zero-width prefixes.
- Added issue-2045 regression test in issue-2045-repro.test.ts for combining-prefix truncation.
2026-06-08 01:09:47 +02:00
can1357 d3476c6664 chore: fix changelogs 2026-06-08 00:58:40 +02:00
can1357 5be2600b92 fix(coding-agent): normalized relative --cwd flag before downstream use
- Updated startup handling so `applyStartupCwd` now re-syncs `parsed.cwd` to the resolved absolute project directory after `setProjectDir` runs.
- Adjusted the CLI cwd tests to verify a relative `--cwd` argument is normalized to an absolute path and does not double-resolve against the new process cwd.
2026-06-08 00:58:22 +02:00
Can Bölük 70b9203ce4 Merge pull request #1997 from WodenJay/fix/1492-hashline-bare-body-prefix
fix(hashline): strip N: line-number prefix from auto-piped bare body rows
2026-06-08 00:58:16 +02:00
Can Bölük 77c19d43cf Merge branch 'main' into fix/1492-hashline-bare-body-prefix 2026-06-08 00:58:09 +02:00
can1357 1e163e4c80 fix(hashline): strip bare-row N: prefixes only when every bare row carries one
Defer read-output line-number stripping from #handleRaw to #flushPending and
gate it on uniformity: a bare "N:text" row is only a pasted-snapshot artifact
when *every* bare body row in the hunk carries the prefix. A mixed set (e.g.
"3:keep" next to "plain") is treated as genuine content and left intact,
avoiding silent corruption of bodies that legitimately start with "digits:".
Removes at most one prefix per row; "+"-prefixed literal rows stay untouched.

Reverts the now-orphaned stripLeadingHashlinePrefixes export back to private.
2026-06-08 00:56:05 +02:00
can1357 181419b65b fix(coding-agent/modes): fixed Esc interrupt acknowledgement to update loader immediately
- Added an interrupt state in EventController to switch the working label to `Interrupting...` and suspend intent-driven updates until the turn resets.
- Called `notifyInterrupting()` from streaming-interrupt paths in InputController and exposed it on InteractiveModeContext so Esc acknowledgement shows immediately while tools tear down.
- Added tests to verify loader acknowledgement, freeze of late intent updates during interruption, and label updates resuming on the next agent start.
2026-06-08 00:54:54 +02:00
Can Bölük 94b00883cf Merge pull request #2066 from DarkPhilosophy/fix/parse-cwd-flag
fix(coding-agent): parse --cwd launch flag
2026-06-08 00:54:49 +02:00
Can Bölük cab7eb920c Merge branch 'main' into fix/parse-cwd-flag 2026-06-08 00:54:38 +02:00