Commit Graph

7453 Commits

Author SHA1 Message Date
DarkPhilosophy 4e675f4c5f Merge remote-tracking branch 'can1357/main' into fix/empty-stop-guard-tooluse 2026-06-07 15:04:44 +03:00
can1357 b6d422ff65 fix(ai): memoized PI_REQ_DEBUG response-log close to avoid truncated body on cancel 2026-06-07 09:34:20 +02:00
can1357 84573a0d1a chore: bump version to 15.10.1 2026-06-07 09:18:25 +02:00
can1357 493c67aa6a test(tui): adjusted TUI test timings for consistent render-throttle flushes
- Increased `Bun.sleep` delays in TUI tests from short frame intervals to 40ms.
- Adjusted mocked `performance.now` tick advances from 20ms to 40ms so render throttling sees full frame gaps.
- Modified the streaming scrollback settle helper to yield a `nextTick` before sleeping, then flush.
2026-06-07 09:18:06 +02:00
can1357 5c60772f38 ux(coding-agent/tools): folded raw output artifact notices into the bash status footer
- Added a `showHeader` option to shell rendering and suppressed the bash frame title bar by default.
- Parsed trailing raw-output artifact notices and folded their IDs into status footer metadata instead of command output.
2026-06-07 09:12:12 +02:00
can1357 3c1a31062c ux(coding-agent): refined tool renderers with padded status headers
- Updated read-group rendering to use the enabled success mark and omitted duplicate success marks on child files in grouped reads.
- Adjusted find and search renderers to apply tool-title coloring, search icons, and padded layout via createCachedComponent.
- Added tests covering read-group success marking and padded find/search renderer output.
2026-06-07 09:03:09 +02:00
can1357 b65851d504 feat(coding-agent): enabled smooth streaming reveal mode with 30 FPS and new setting
- Added `display.smoothStreaming` to settings schema.
- Updated streaming-reveal behavior to produce smooth 30 FPS reveals.
- Updated event-controller flow to support smooth streaming reveal mode.
- Expanded streaming-reveal tests for the new smooth streaming behavior.
2026-06-07 08:53:20 +02:00
can1357 90fca44c34 Merge remote-tracking branch 'origin/farm/621c6784/fix-anthropic-tool-arg-coercion' 2026-06-07 08:50:48 +02:00
can1357 a40f01c1e9 fix(tui): fixed no-append live-region repaints during viewport shifts
- Constrained the no-append repaint optimization to execute only when the logical viewport position was unchanged.
- Documented the live-region pinned repaint cursor re-anchoring fix in the TUI changelog entry.
2026-06-07 08:50:14 +02:00
roboomp 64e71e16fe fix(ai): scoped union branch tagging to combinator path
Only mark Zod and JSON Schema validation issues as union-branch when their own path matches the combinator's path so nested array fields inside a tag-selected branch keep their singleton-wrap repair.

Fixes #2026
2026-06-07 06:50:06 +00:00
can1357 8543dcaee4 fix(tui): fixed uppercase Shift preservation for printable keybindings
- Updated key canonicalization in keybinding parsing to parse modifiers case-insensitively and infer `shift` from printable uppercase keys.
- Added regression tests for `shift+a` matching uppercase `A` and for cursor anchoring during no-append live repaint scenarios.
- Recorded the uppercase Shift keybinding fix in the package changelog entry.
2026-06-07 08:49:12 +02:00
can1357 4b1649aef7 Merge remote-tracking branch 'origin/farm/621c6784/fix-anthropic-tool-arg-coercion' 2026-06-07 08:46:23 +02:00
can1357 f8fa44c327 fix(packages/ai): resolved Anthropic tool-call parallel-use suppression
- Removed Opus-specific `tool_choice.disable_parallel_tool_use` injection for Anthropic tool calls.
- Removed the obsolete `disablesParallelToolUse` helper from model capability checks.
2026-06-07 08:44:19 +02:00
roboomp 9cd1883941 fix(ai): tagged json schema union branch issues
Marked JSON Schema validation issues that come from a failed anyOf/oneOf branch and threaded the marker through the coercion bridge so the singleton-array wrap mirrors the Zod branch guard.

Fixes #2026
2026-06-07 06:43:47 +00:00
can1357 f3257c3cf1 test(packages/coding-agent): added tests for read grouping task shimmer
- Added regression coverage for EventController to collapse single-read completions into one read group.
- Added assertions that visible reasoning breaks grouping and finalizes the prior read block.
- Added nested-live task rendering test for static task header while the task body shimmers.
- Added task-progress rendering tests for shimmered task-name rows and spinner-disabled fallback.
- Added a ToolExecutionComponent timing test validating bash spinnerFrame increments on 30fps cadence.
2026-06-07 08:42:51 +02:00
can1357 1b2373425b feat(packages/coding-agent): set 30fps stream and stabilized read groups
- Reduced shimmer-driven UI animations and borders to a 30fps cadence.
- Collapsed consecutive read tool calls into one finalized transcript block.
- Tracked visible assistant content to finalize and reset read groups correctly.
- Updated running task rows to static bullet markers with shimmer-only subagent labels.
2026-06-07 08:42:51 +02:00
can1357 9b98dafe4e test(packages/tui): updated tui test timing for 30fps render cadence
- Updated settle helpers in repro tests to wait 40ms before terminal flush.
- Raised process-terminal-render-harness SETTLE_MS to 67ms for 30fps timing.
- Updated render-throttle mocks to advance mock time by 40ms per frame.
- Added Loader component cadence test for 30fps animated repaint timing.
- Added render-regressions check that non-force renders are scheduled at ~33ms.
2026-06-07 08:42:51 +02:00
can1357 9d80a7d5c6 perf(packages/tui): optimized tui core by skipping redundant work paths
- Added animated message-color gating so loader timers run at 30fps only when needed.
- Added no-op checks in loader and text updates to skip work for unchanged values.
- Optimized key matching by canonicalizing key IDs and precomputing alias sets.
- Added prepared-line caching and bounded terminal/width scans to reduce repaint overhead.
2026-06-07 08:42:51 +02:00
roboomp bb2a0a0e79 fix(ai): preserved union tool argument shape
Skipped singleton array wrapping for expectations that come only from failed Zod union branches so other branch coercions can succeed first.

Fixes #2026
2026-06-07 06:36:36 +00:00
roboomp 0d6913e926 fix(ai): coerced singleton array arguments
Wrapped non-string singleton values when an array field is expected so malformed Anthropic-compatible tool calls can validate instead of looping on errors.

Fixes #2026
2026-06-07 06:31:30 +00:00
can1357 87a5ae77a1 fix(ai/utils): skipped persisting HTTP 400 raw dumps during Bun test runtime
- Updated `appendRawHttpRequestDumpFor400` to skip execution in the Bun test runtime.
- Imported `isBunTestRuntime` and used it to avoid writing 400 raw request dumps to `~/.omp/logs/http-400-requests` when tests use mocked fetch responses.
- Documented the test-runtime persistence fix in the package changelog.
2026-06-07 08:15:50 +02:00
can1357 20487d8cb6 chore: fix stale tests 2026-06-07 08:11:38 +02:00
can1357 b57899d3eb fix(ai): stripped Fireworks DeepSeek thinking toggle when reasoning effort is set
- Added stripFireworksDeepSeekThinkingToggle to strip DeepSeek V4 `thinking` metadata before model compatibility is used.
- Applied the stripping helper in Fireworks model mapping and generation so produced models exclude the incompatible flag.
- Updated completion param construction to remove `thinking` when `reasoning_effort` is sent and added a regression test for Fireworks DeepSeek V4.
2026-06-07 08:05:51 +02:00
can1357 5f9df0e27b chore: bumped models 2026-06-07 08:05:30 +02:00
can1357 0914379f49 fix(coding-agent): rendered shared task context as markdown and froze async block borders
- Updated task call and result rendering to process shared context with the Markdown renderer, so context sections are now displayed with proper Markdown formatting.
- Stopped shimmer animation on pending bash/eval/task blocks once async state is `running`, preventing the committed frame from freezing a transient dark border segment.
- Adjusted rule path display to fall back to a root-relative path when cwd-relative resolution is unavailable.
2026-06-07 08:01:52 +02:00
can1357 76af35dcd6 fix(tui): preserved TUI initial scrollback unless clear was requested
- Updated the initial render intent to carry a `clearScrollback` flag.
- Adjusted first-frame rendering logic to preserve existing scrollback by default and clear only when requested.
- Added `resolver` stubs to coding-agent and web-search test registries for interface compatibility.
2026-06-07 07:54:50 +02:00
can1357 becc44ccef fix(tui): fixed startup scrollback clearing and ED3 streaming replay duplication
- Added a clear-initial-terminal-history flag to interactive mode initialization and passed it from cold-launch startup.
- Extended TUI.start to accept clearScrollback and clear native scrollback on initial full paint for non-multiplexer sessions.
- Preserved ED3 streaming scrollback accounting during capped streaming frames and added tests to prevent committed prefix duplication across terminal history rewrites.
2026-06-07 07:42:51 +02:00
can1357 c8217a1325 test(tui): added Markdown.render cache mutation regression tests
- Added tests confirming `Markdown.render` returns caller-owned lines so per-instance mutations do not change the next render output.
- Added coverage that mutating one instance's render output cannot leak injected lines into another instance via shared cache reuse.
- Added a repeated mutate-then-render test to ensure no line accumulation across multiple render cycles.
2026-06-07 07:37:20 +02:00
can1357 e78352abc7 fix(tui): fixed live viewport anchoring during repaint updates
- Replaced the repaint viewport clamp with strict bottom anchoring at lines.length - height.
- Removed the anti-duplication clamping path that could persist off-tail #viewportTopRow values between frames.
- Kept native scrollback cleanup to the existing dirty checkpoint mechanism for stale committed prefixes.
2026-06-07 07:36:08 +02:00
can1357 4080202911 fix(agent): prevented event-loop stalls during oneshot LLM completions
- Added `EventLoopKeepalive` in `instrumentedCompleteSimple` to keep the event loop alive during oneshot completion calls.
- This prevented long-lived completion promises from freezing host spinners in Bun by keeping timer servicing active.
2026-06-07 07:34:11 +02:00
can1357 4a3984eb0a fix(coding-agent/tools): fixed Markdown cache contamination from mutable render arrays
- Marked Markdown cached lines as readonly snapshots and returned copied arrays from `render()`.
- Stored fresh snapshot arrays in both L1 and L2 caches so callers appending rows cannot mutate shared cached Markdown output.
- Added an AskTool test that renders calls and results twice to verify repeated renders remain stable and do not duplicate option labels.
2026-06-07 07:33:43 +02:00
can1357 13ca95382d fix(coding-agent): recolored search tool icons to accent
- Switched find, search, ast_grep, and bm25 magnifier glyphs from success green to accent so the icon matches the tool title color.
2026-06-07 07:23:50 +02:00
can1357 1a9d898b8a feat(coding-agent): added immediate steering flush on empty streaming submit
- Updated InputController streaming submit handling to interrupt and resume when queued steering exists, refreshing the pending-message UI and render.
- Added AgentSession.interruptAndFlushQueuedMessages to abort active work and continue processing queued messages immediately.
- Added tests for queued steering interruption in both agent-session concurrency and input-controller keybinding flows.
2026-06-07 07:18:02 +02:00
can1357 0f043d4c29 fix(coding-agent): preserved approved plan paths during plan apply resolution
- Replaced approved-plan renaming with `resolveApprovedPlan` resolution and state/slug lookup.
- Updated ACP and interactive apply flows to propagate canonical `planFilePath` instead of renamed paths.
- Added local plan fallback lookup by mtime for unresolved slugs after plan approval.
- Restricted plan-mode writes to `local://` plan artifacts and simplified path handling.
2026-06-07 07:17:23 +02:00
can1357 ddd8c86209 ux(coding-agent): added separator support for unlabeled output sections
- Extended `OutputBlock` section metadata with an optional `separator` flag and included it in cache hashing.
- Updated output block rendering to emit an unlabeled section divider when the separator flag is enabled.
- Marked task and result render paths to request separators for non-context content sections to improve output clarity.
2026-06-07 07:08:06 +02:00
can1357 9d245eea60 fix(coding-agent): adjusted edit output padding to remove inherited left gutter space
- Added a configurable `contentPaddingLeft` option to `renderOutputBlock` with normalized defaults.
- Updated edit renderer output blocks to disable inherited left padding and align inner-width wrapping.
- Added coverage for completed edit gutter rendering to confirm no leading space and correct frame width.
2026-06-07 06:59:01 +02:00
can1357 793251fa2e fix(coding-agent): labeled TTSR-aborted tool placeholders with matched rule names
- Passed a formatted TTSR match message into the agent abort call when streaming is interrupted by TTSR rules.
- Added a `#formatTtsrAbortReason` helper to include matched rule names in the abort reason.
- Added a concurrent-session test confirming aborted tool results mention the matched TTSR rule instead of `Request was aborted`.
2026-06-07 06:56:16 +02:00
can1357 5ff5d966ba test(coding-agent/session): added tests for SessionManager fork behavior and controller fixtures
- Added a new SessionManager.forkFrom test confirming terminal breadcrumb suppression while cloning source session history under a new parent session.
- Updated TanCommandController test fixtures with required assistant message API, provider, model, and completion metadata.
2026-06-07 06:56:09 +02:00
can1357 cbd7c20105 feat(coding-agent/tools): added binary routing for notebook, sqlite, and archive payloads
- Added archive format sniffing to identify ZIP, TAR, and TAR.GZ from file bytes.
- Added MIME/extension and header-based routing for notebook, sqlite, and archive payloads.
- Added archive entry rendering with slash-terminated dirs and size suffixes.
- Added tests for archive, sqlite, notebook, and fallback binary dispatch scenarios.
2026-06-07 06:55:52 +02:00
can1357 9bd9e3127e feat(coding-agent): added /tan background forking with prompt cache inheritance
- Added `/tan` slash command registration and interactive handling.
- Added TanCommandController validation and async task scheduling for `/tan` dispatch.
- Added session cloning that suppresses breadcrumbs, copies artifacts, and handles abort cleanup.
- Added `promptCacheKey` support in Agent and inherited `providerPromptCacheKey` in session creation.
2026-06-07 06:52:15 +02:00
can1357 a01d9c3655 feat(coding-agent/tools): collapsed untouched todo phases to one-line summaries
- Collapsed non-touched phases to one-line summaries in multi-phase todo renders while retaining full output for active, touched, or expanded views.
- Computed touched phases from in-progress tasks, completion transitions, and tool operations, with init operations now marking all phases.
- Added renderer tests covering collapsed rendering, argument-less fallback behavior, expanded mode, and separator-free phase output.
2026-06-07 06:44:11 +02:00
can1357 6adf98fd10 feat(coding-agent): added OSC5522 enhanced paste support for local image and text inserts
- Added OSC5522 parsing and a payload controller that prefers image MIME and reassembles chunks.
- Added bracketed image-path detection and `onPasteImagePath` callback wiring in the editor.
- Added local image-path paste insertion with fallback to text paste on image-size errors.
- Added `Editor.pasteText()` and OSC5522 disable sequencing on terminal cleanup.
2026-06-07 06:43:52 +02:00
can1357 f88cf724f3 refactor(coding-agent/tools): restructured todo task list rendering via shared tree helper
- Replaced the inline todo-phase preview loop in todoToolRenderer with renderTreeList.
- Kept task output generation delegated through formatTodoLine while passing expanded state and preview limits to the shared helper.
2026-06-07 06:29:41 +02:00
can1357 021b621865 perf(tui): removed per-frame line-fit cache from tui render path
- Removed the per-frame `#fitLineCache` in `TUI` rendering to avoid rope-string hashing during repaints.
- Deleted `packages/tui/bench/width.ts`, retiring an obsolete visibleWidth benchmark script.
2026-06-07 06:26:49 +02:00
can1357 705c937c56 fix(tui): fixed visibleWidth parity and OSC66 width metadata behavior
- Fixed `visibleWidth` parity with native width using `Bun.stringWidth` ANSI stripping.
- Fixed tab and OSC66 width parsing with `s=`/`w=` metadata handling.
- Added ASCII and long-string fast paths in `visibleWidth` for faster width checks.
- Consolidated visible-width regression coverage by replacing removed IME/Arabic/Jamo tests with `visible-width.test.ts`.
2026-06-07 06:24:07 +02:00
can1357 a78f4c6766 feat(coding-agent): enabled abort reasons to propagate and surface through streaming messages
- Added optional `reason` parameters to `Agent.abort` and `AgentSession.abort` APIs.
- Passed abort reasons through interrupt flows into underlying agent cancellation.
- Replaced hard-coded abort text with `resolveAbortLabel` for streaming and replayed messages.
- Fell back to generic `Request was aborted` text when no abort reason was provided.
2026-06-07 06:19:55 +02:00
can1357 136106ba4f fix(coding-agent): kept task context visible after first progress snapshot
- Rendered shared `# Goal`/`# Constraints` brief in result frame via buildContextSection helper.
- Undid per-field double-encoding so brief reads cleanly from raw result args.
- Removed header spinner since per-agent body lines already animate.
- Wrapped run summary in bracket glyphs to match bash tool footer.
2026-06-07 06:07:17 +02:00
can1357 d9f09a07b7 fix(tui): prevented committed-prefix duplication on viewport repaint
- Clamped repaint anchor to min(firstChanged, scrollbackHighWater) so byte-identical committed rows are not re-painted into the active grid.
- Added submitPinsViewportToTail capability to reconcile native scrollback at submit on unprobeable local terminals.
- Renamed allowUnknownViewportMutation to allowUnknownViewportTransientRepaint to clarify it never authorizes a settled transcript commit.
2026-06-07 06:01:25 +02:00
can1357 6e554d8ab8 ux(coding-agent): refined tool-execution block framing and state background
- Adjusted tool-execution rendering to apply state-based background tinting and spacing for non-framed outputs.
- Detected framed block children and skipped extra padding and tinting so those custom renderers stay flush.
- Wrapped framed output with markFramedBlockComponent so self-framed blocks are recognized by the renderer.
2026-06-07 05:53:00 +02:00
can1357 741558a6d4 feat(coding-agent): removed background mode command and runtime plumbing
- Removed the built-in `background` (`bg`) slash command and its `handleBackgroundCommand` path from the interactive flow.
- Deleted background event subscription and shutdown handling by removing `handleBackgroundEvent` from the event, input, and interactive controllers.
- Simplified `InteractiveModeContext` by dropping background-only fields and helpers such as `isBackgrounded`, background UI context creation, and background event callbacks.
2026-06-07 05:43:59 +02:00