Commit Graph

7599 Commits

Author SHA1 Message Date
can1357 4fe2572629 feat(scripts/session-stats): added since-window filtering and hashline edit classification
- Added a new `--since` CLI window option and applied a timestamp cutoff to tools, edits, and followups queries, including session-count updates.
- Updated edit analytics to treat `is_error` as authoritative, added hashline op parsing from edit input, and expanded failure classification patterns for hashline error cases.
2026-06-08 05:56:03 +02:00
can1357 bd079eef6a feat(coding-agent/modes): enabled mouse-hover highlighting for plan review options
- Handled SGR mouse motion reports in `PlanReviewOverlay` to set hovered options from hit-test rows and clear highlights outside option rows.
- Updated option rendering to paint a background band on hovered, non-disabled options while preserving keyboard selection behavior.
- Enabled any-motion mouse tracking for overlays and expanded regression coverage to verify hover tracking setup and teardown.
2026-06-08 05:53:33 +02:00
can1357 53917fc382 fix(agent): fixed OpenAI compaction history builder call-id tracking
- Updated `buildOpenAiNativeHistory` to maintain known and custom tool-call ID sets incrementally while appending provider payload history.
- Rebuilt call-ID state when a full-snapshot payload replaced history so stale outputs were no longer emitted after reset.
- Added compaction regression tests for codex provider payload call-ID registration and stale-result dropping.
- Scope.
- Summary.
- Type.
2026-06-08 05:46:57 +02:00
can1357 02dc03d03f fix(coding-agent): updated late diagnostics to batch messages and drop stale results
- Added per-path edit versioning in `EditTool` to drop stale late diagnostics after later edits.
- Added deferred diagnostics queueing through `queueDeferredDiagnostics` and late-diagnostic yield batching.
- Updated `UiHelpers` to render late diagnostic file path and summary lines in the chat transcript.
2026-06-08 05:46:43 +02:00
can1357 f11cbed185 feat: enabled clickable read links and made deterministic reads non-abortable
- Enabled clickable read-path output for result rows, summaries, and previews.
- Resolved read links from result paths, source metadata, internal URLs, and absolutes.
- Preserved selector suffixes while rendering line-anchor hyperlinks.
- Ignored aborted signals for plain-file and directory reads while keeping conflicts-cancel behavior.
- Added tests for non-abortable read behavior and link-label rendering regression coverage.
2026-06-08 05:40:04 +02:00
can1357 bf518d8a5e fix(coding-agent/edit): fixed edit tool headers to truncate long paths and compact diff stats
- Trimmed first-changed-line suffixes from edit path display and passed the line as a hyperlink target.
- Added middle-eliding path truncation for edit and rename file labels.
- Simplified diff-stat output to show only added/removed counts in a compact bracketed form.
2026-06-08 05:37:18 +02:00
can1357 4f6ea5ca24 test(coding-agent): added writethrough deferred diagnostics benchmark and test coverage
- Added a new `edit-lsp-writethrough.bench.ts` benchmark to measure writethrough latency with and without deferred diagnostics.
- Added a slow-server case to `lsp-diagnostics-freshness.test.ts` that confirmed deferred diagnostics arrive after a prompt inline return.
2026-06-08 05:28:06 +02:00
can1357 8307f7107a fix(coding-agent): suppressed redundant user-interrupt assistant transcript lines
- Added `isUserInterruptAbort` and `shouldRenderAbortReason` helpers so interrupt handling can distinguish Esc-based aborts from other abort reasons.
- Updated assistant transcript rendering to suppress the `Interrupted by user` line while continuing to show generic or other abort labels.
- Updated plan-review and transcript container tests to assert interrupted assistant messages no longer render the redundant interrupt line.
2026-06-08 05:27:25 +02:00
can1357 31309d6212 fix(agent): removed tool-level abort-signal bypasses for read/write/edit tool execution
- Updated `executeToolCalls` to always pass the active `toolSignal` into `tool.execute` rather than bypassing it for non-abortable tools.
- Removed the `nonAbortable` option from `AgentTool` and from the read, write, and edit tools so they can no longer opt out of abort handling.
- Documented the cancellation behavior change in the affected tool docs and package changelogs.
2026-06-08 05:27:00 +02:00
can1357 0a196a43f3 docs: update changelogs 2026-06-08 05:22:32 +02:00
can1357 b1563e4e80 fix(lsp): adjusted LSP diagnostics polling to settle unversioned publishes
- Updated `waitForDiagnostics` to accept exact document-version matches immediately and otherwise wait for a quiescence window before using the latest publish.
- Removed the old unversioned-acceptance option and applied the settle-based wait logic through inline and deferred diagnostics fetch paths.
- Added an LSP writethrough regression test ensuring stale unversioned diagnostics are ignored in favor of later fresh publishes.
2026-06-08 05:20:30 +02:00
can1357 e13f2de58a fix(coding-agent): mapped auxiliary messages to developer role for compaction
- Updated `convertToLlm` logic to emit `developer` role for custom, hook, and file-mention inputs.
- Simplified OpenAI compact output filtering to retain only `user` and `assistant` messages, removing legacy `system-reminder` pattern checks.
- Adjusted compaction and session tests to match the new developer-role mapping and expected compacted content.
2026-06-08 05:19:57 +02:00
can1357 dfeb9af61a feat(coding-agent/lsp): deferred slow LSP diagnostics during writethrough
- Added a configurable diagnostics timeout to `getDiagnosticsForFile` and wired callers to pass custom budgets.
- Refactored writethrough diagnostics retrieval to `fetchDiagnosticsWithDeferral`, waiting inline briefly and handing off slow results to the deferred callback.
- Extended deferred fetches to use a longer timeout so late diagnostics are still delivered for slow servers.
2026-06-08 05:17:37 +02:00
can1357 4442b3bfcc fix(coding-agent): marked agent reminder prompt as synthetic
- Flagged the injected reminder turn with `synthetic: true` to keep it hidden from the transcript.
2026-06-08 05:16:03 +02:00
can1357 e1e75526d9 fix(coding-agent): removed system-reminder wrapper from file context
- Sent file contents as plain text instead of wrapping in `` tags.
- Joined file entries with single newlines instead of double.
2026-06-08 05:15:18 +02:00
can1357 0e78cac716 fix(coding-agent): removed abort marker and updated continue shortcut prompts
- Removed `<turn-aborted>` guidance injection from `transformMessages`, deleted `turn-aborted-guidance.md`, and dropped the synthetic abort note path for aborted/error turns.
- Updated `c`/`.` continue shortcuts to submit `manual-continue.md` as a hidden synthetic `developer` message via `session.prompt(..., { synthetic: true })` instead of sending an empty user turn.
- Updated tests and changelog notes in AI and coding-agent to reflect the revised abort-context and continue behavior.
2026-06-08 05:02:49 +02:00
can1357 cdafa6f371 fix(coding-agent): fixed live scrollback commit behavior for streaming transcript tool rows
- Computed live commit state from render diffs and drove native scrollback via safeLength.
- Fixed volatile live tool rows committing only after stream finalization in native scrollback.
- Stored append-only and volatile flags in FrozenRender snapshots for live-row tracking.
- Removed append-only streaming predicates from assistant and tool rendering paths.
2026-06-08 04:57:36 +02:00
can1357 97ae0fd34d fix(coding-agent): fixed grouped read output by splitting and merging selector rows
- Split top-level and delimited read selectors into separate rows before grouping.
- Merged duplicate same-file read selectors into one summarized row with ellipsis truncation.
- Computed grouped-read status and totals from aggregated rows for accurate summaries.
- Updated changelog entries and fixtures to document/read expectations.
2026-06-08 04:51:25 +02:00
can1357 54404878bf feat(coding-agent/cli): added custom gallery renderer for grouped read fixtures
- Gallery fixtures gained a `renderState` hook to render non-standard component states.
- Added a `read_group` filesystem fixture that uses `ReadToolGroupComponent` to render delimited, full-file, and range read states.
- Added gallery CLI coverage to verify grouped read fixture output and expected ranges.
2026-06-08 04:47:57 +02:00
can1357 da0502008e docs(coding-agent): rewrote plan-mode prompt as execution spec
- Reframed the plan artifact as a self-contained execution spec a fresh agent runs after context is cleared.
- Folded high-consensus requirements (sequencing, contracts, cutover, verification) into existing sections as inline rules.
- Banned decision-free sections and conversation back-references; kept the decision-complete self-check and completeness-wins tiebreak.
2026-06-08 04:44:19 +02:00
can1357 46578e57ba fix(tui): fixed handling of split DEC 2048 in-band resize reports
- Added a reassembly buffer for DEC 2048 in-band resize reports split across stdin reads.
- Dropped invalid or stale partial resize sequences to prevent leaked trailing bytes from entering terminal input.
- Added tests that verify split resize reports are handled and split kitty key sequences are forwarded correctly.
2026-06-08 04:42:26 +02:00
can1357 fe5d27c4a3 feat(coding-agent): removed animated shimmer border on exec blocks
- Removed sweeping bottom-edge segment from pending bash, eval, and ssh blocks; pending now shows a static accent border.
- Dropped border shimmer geometry, animate options, and related tests.
- Repurposed pending-tool 30fps redraws solely for the running task row shimmer.
2026-06-08 04:31:58 +02:00
can1357 f741431b76 fix(coding-agent/modes): fixed resume ranking to prefer literal recency and history matches
- Fixed blank-query behavior so rankSessionSearchMatches returns all sessions unchanged.
- Deduplicated prompt-history results by session path in mergeSessionRanking to avoid duplicate suggestions.
- Adjusted resume ranking to favor literal-token matches by recency, then fallback to fuzzy score.
2026-06-08 04:30:56 +02:00
can1357 ea14cee2bc test(coding-agent): refined log_experiment flagging test to use storage-run setup
- Reworked the log_experiment flagging test to create sessions and runs directly through storage APIs.
- Logged a baseline run, completed a second run, and then invoked log.execute using the baseline run ID in flag_runs.
- Verified the baseline run was marked flagged with the expected reason via storage.listLoggedRuns output.
2026-06-08 03:48:42 +02:00
can1357 65bddab719 feat(coding-agent/eval): enforced JS eval helper options as trailing object literals
- Added strict option parsing for JavaScript helpers so read/sort/uniq/counter/tree/llm/agent now reject positional options and non-object option values.
- Introduced `optionsArg` and `isPlainObject` to enforce a single trailing options object and throw clear TypeError messages on invalid calls.
- Updated the eval tool prompt to document that JavaScript helpers require one trailing options object and no extra positional arguments.
2026-06-08 03:33:45 +02:00
can1357 04a931337f fix(openai-responses): keep open function calls when starting text/thinking
- Stopped prematurely closing function call parts on output_text and thinking_start.
- Only close the open part when it is not a function_call.
2026-06-08 03:15:27 +02:00
can1357 622f0ddc8a tests(coding-agent): updated keyword comments to workflowz
- Aligned doc comments and tests with the workflowz trigger rename.
2026-06-08 03:12:28 +02:00
can1357 ebaa46018f Merge remote-tracking branch 'origin/farm/b74e4820/hashline-replace-drops-body-lines' 2026-06-08 03:11:51 +02:00
roboomp 65bb1c8c4d fix(ai): routed responses tool deltas by content index
Codex review on #2082 found that the Responses compatibility encoder still
kept a singleton open function-call item. When MiniMax object-argument chunks
are flushed late by contentIndex, a later parallel toolcall_start could close
the first item and make the late delta append to the second item instead.

Keep OpenFunctionCall state in a map keyed by contentIndex, allocate Responses
output indexes when items open, and close each function item from its matching
toolcall_end. Late deltas now use event.contentIndex, preserving deferred
object-argument flushes for the original tool call even after later parallel
starts.

Added an encodeStream regression that starts two parallel calls, emits the
first call's arguments only after the second start, and verifies both argument
delta/done events and output_item.done payloads stay attached to their own
output indexes.

Fixes #2080
2026-06-08 01:02:22 +00:00
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