Commit Graph

2044 Commits

Author SHA1 Message Date
can1357 fde55bf927 fix(model): added bracket-affix stripping and string-keyed resolution cache
- Replaced WeakMap model cache with provider/id string keys for stable reuse.
- Returned official model ids directly when matched, before heuristics.
- Collapsed non-message token path to system prompt and tool schema totals.
2026-06-06 22:21:58 +02:00
can1357 20d19e8002 test: replaced blind sleeps with shared fixtures and condition polling
- Shared immutable model registries and auth storage via beforeAll/afterAll.
- Swapped fixed-delay settle sleeps for predicate polling and signals.
- Stubbed network/timers to drop wall-clock waits in registry and history tests.
- Added resetDisplay invalidation tests and startup-timing breakdown lines.
2026-06-06 22:09:04 +02:00
can1357 6e88643dfa Merge remote-tracking branch 'origin/farm/2750a3c2/fix-todo-renderer-and-anthropic-reasoning-flag' 2026-06-06 21:33:39 +02:00
can1357 133137c9a6 fix(eval): surfaced subagent abort reasons and disabled runtime cap
- Used `||` so empty stderr falls through to abortReason in agent bridge.
- Preferred assistant errorMessage over "Cancelled by caller" on internal aborts.
- Forced `maxRuntimeMs: 0` for eval subagents via ExecutorOptions override.
2026-06-06 21:33:07 +02:00
can1357 0bac7012cd feat(coding-agent/web): added GitHub Actions run/job scraping
- Parsed /actions/runs URLs into run and job render handlers.
- Rendered run metadata with per-job breakdown, showing steps for failed jobs.
- Fetched job logs via API token, stripping ISO timestamp prefixes.
2026-06-06 21:31:49 +02:00
can1357 43b22e9564 fix(coding-agent/web): defaulted perplexity ask to experimental model
- Forced authenticated ask requests to `experimental`, matching the anonymous fallback since the cookie session ignores pro upgrades.
- Kept TUI collapsed search answers full; capping now only applies in compact mode via `maxAnswerLines`.
- Preserved full multiline task pending preview instead of bounding it.
2026-06-06 20:13:06 +02:00
roboomp 1c5cb37df5 style: bun run fix 2026-06-06 18:12:08 +00:00
roboomp ce60b6626b fix(coding-agent): harden todo renderer against malformed streaming args
The todo tool's renderCall ran args?.ops?.map(...) directly, which throws
TypeError on any non-array ops value. parseStreamingJson surfaces such
shapes mid-stream: a partial Anthropic input_json_delta buffer like
'{"ops":"[{' becomes { ops: '[{' }, and intermediate states can hand back
null entries before object fields arrive. Each crash spammed Tool
renderer failed warnings and starved the TUI render loop.

Guard against:
- ops being any non-array (string, object, primitive)
- entries being null / non-object
- entry.items being a non-array

The fix is in the TUI renderer only — schema validation in the agent
loop is unchanged, so any genuinely malformed model output still
surfaces an invalid-args tool error to the model.

Fixes #2005
2026-06-06 18:11:42 +00:00
can1357 246688e874 fix(coding-agent/web): unlocked perplexity pro via session cookie
- Sent the OAuth token as `__Secure-next-auth.session-token` cookie since the ask endpoint ignores bearer headers and silently downgrades to `turbo`.
- Fell back to `result.title` when web results omit `name`.
- Renamed `callPerplexityOAuth` to `callPerplexityAsk` and removed a stray brace.
- Added tests covering OAuth, API-key, and anonymous request shapes.
2026-06-06 20:01:51 +02:00
can1357 f73892d491 fix(coding-agent): bounded expanded single-file search results
- Stopped expanded view from dumping every match when all hits share one file.
- Applied an `EXPANDED_LINES × 2` budget while keeping context rows.
- Appended a `… N more matches` summary when truncated.
2026-06-06 20:01:21 +02:00
can1357 d1fbb28edc fix(coding-agent): removed redundant tool-name line in custom render
- Fixed custom-rendered tools with `mergeCallAndResult` (e.g. `lsp`) emitting a redundant tool-name line above the framed result.
- Collapsed the leading blank line for self-delimiting framed boxes.
- Added gallery fidelity routing `lsp`/`task` through the custom-tool branch via a `customRendered` fixture flag.
- Added gallery harness tests guarding state coverage and the custom-branch fallback label.
2026-06-06 18:40:52 +02:00
can1357 06e157cc24 ux(coding-agent/edit): inlined edit result stats into the header
- Updated edit result rendering to inline diff change statistics in the file header instead of using a separate metadata row.
- Removed the redundant standalone metadata line and removed the extra blank line before diff bodies for a tighter single-hunk display.
- Added a test asserting the header now contains +/-/hunk stats and that no extra stats row appears before the diff.
2026-06-06 17:58:28 +02:00
can1357 3d93ab6ec9 Merge remote-tracking branch 'origin/farm/1d94d72e/edit-expanded-preview' 2026-06-06 17:20:29 +02:00
can1357 40ed8852b5 feat(coding-agent): added app.display.reset bound to Ctrl+L
- Added `TUI.resetDisplay()` to force an immediate full-frame replay including native scrollback.
- Moved the persistent model selector default from Ctrl+L to Alt+M, preserving existing user remaps.
- Reserved Alt+M so extensions cannot shadow the model selector shortcut.
2026-06-06 17:19:57 +02:00
roboomp 0ea0fe24ab fix(tui): respected expanded edit previews
Passed options.expanded through the edit call preview renderer so approval previews can lift the streaming diff tail window and hide the preview label.

Added regression coverage for collapsed versus expanded edit preview rendering.

Fixes #1992
2026-06-06 15:17:32 +00:00
can1357 77d4b90d2c fix(coding-agent): fixed framed read output rendering by removing extra box padding
- Added `setPaddingY` to `Box` and used `setBoxPaddingForFramedBlock` when rendering framed outputs.
- Read tool results now skipped vertical padding in framed blocks, removing extra blank rows above and below the output.
- Added a regression test for `ToolExecutionComponent` that confirmed framed read content no longer renders extra blank lines.
2026-06-06 17:01:47 +02:00
can1357 512aacc517 fix(coding-agent/tools): corrected collapsed search truncation behavior
- Adjusted renderCollapsedSearchGroups to compact each result group before truncation so first-section hits stay visible.
- Removed collapsed-body truncation notices and kept truncation status in the output header.
2026-06-06 16:35:01 +02:00
can1357 6efe86c07b fix(coding-agent): honored boolean env flag overrides over settings
- Made PI_INTENT_TRACING, PI_AUTO_QA, PI_PY, and PI_JS take precedence when set.
- Fell back to config when the env flag is unset instead of ORing.
- Surfaced PI_PY=0/PI_JS=0 in the disabled-backend error messages.
2026-06-06 16:30:09 +02:00
can1357 001a6ad564 tests: remove useless assertations 2026-06-06 16:00:31 +02:00
can1357 6810c549a7 feat(coding-agent/modes): interleaved runnable commands into /copy tree
- Emitted per-command cmd:N targets after the assistant message that issued them.
- Carried commands from text-less messages to the next visible message.
- Replaced the single trailing "last command" leaf.
2026-06-06 15:45:59 +02:00
can1357 bcb48c4e43 fix(coding-agent/modes): enabled eager foreground rendering and suppressed duplicate error lines
- Updated EventController to keep foreground render mode active from agent_start through agent_end so live-region rebuild remains enabled during a turn.
- Pinned stop-reason assistant errors to the editor banner and suppressed the transcript's inline Error line while pinned, then restored it on the next agent_start.
- Added tests covering error-banner suppression/restoration and eager native scrollback rebuild ordering before loading animation.
2026-06-06 15:44:38 +02:00
can1357 00e7d7c4be fix(coding-agent): fixed write streaming preview to honor Ctrl+O expansion
- Updated write streaming content formatting to accept an expanded flag and show full output only when expansion is active.
- Passed the expanded state from the write renderer so in-flight write previews now lift the 12-line cap on Ctrl+O.
- Added streaming write preview tests to verify collapsed tail capping, expansion growth, and short-write behavior.
2026-06-06 15:40:56 +02:00
can1357 860eef3f2f refactor(hashline): switched header syntax to bracketed [path#tag]
- Replaced `¶path#hash` prefix with `[path#hash]` delimiters across parser, tokenizer, and grammar.
- Updated prompts, docs, and recovery paths to the new bracketed form.
2026-06-06 15:38:08 +02:00
can1357 ecd80120a3 feat(coding-agent): added framed tool rendering with capped streaming previews
- Wrapped tool call/result renderers with framed block markers for full-width display.
- Added preview-line caps via capPreviewLines to bound multiline outputs with truncation hints.
- Added code-cell tail rendering so streaming output shows capped tail slices with markers.
- Added setPaddingX in Box and applied framed-inline padding adjustments for tight layouts.
2026-06-06 15:19:06 +02:00
can1357 126f4e8dcf feat(coding-agent): replaced /copy subcommands with picker tree
- Added a fullscreen /copy tree of recent assistant messages with nested code blocks and a live preview pane.
- Removed the /copy last|code|all|cmd subcommands in favor of tree selection.
- Extracted copy-target assembly into a testable util.
2026-06-06 15:15:54 +02:00
can1357 6d99f2e740 feat(model-selector): disabled models below current context size
- Dimmed models whose context window is smaller than current usage.
- Skipped disabled entries during navigation and selection.
- Showed context-limit suffix and warning for unselectable models.
2026-06-06 15:10:14 +02:00
can1357 2d0f62eb69 refactor(coding-agent): replaced list count indicators with ScrollView
- Wrapped selector and overlay list windows in ScrollView for proportional right-edge scrollbars.
- Dropped numeric position/count footers in favor of the scrollbar.
- Simplified SelectList status line to search hints only.
- Added ED3-risk autocomplete repaint test for POSIX terminals.
2026-06-06 14:20:41 +02:00
can1357 4c5b1eb41d test(coding-agent): raised async job manager singleton test timeouts
- Raised the timeout on four `sdk-async-job-manager-singleton` session tests to 60000ms to reduce flakes in parallel runs.
- Adjusted the asynchronous singleton cases to avoid timeout races between long session startup and teardown.
- Recorded the timeout stabilization in the package changelog entry.
2026-06-06 13:48:06 +02:00
Can Bölük 7cc7282034 Merge branch 'main' into fix/retry-model-fallback-toggle 2026-06-06 13:47:25 +02:00
Can Bölük e8f1cbb7d3 Merge branch 'main' into fix/ttsr-enabled-1767 2026-06-06 13:45:30 +02:00
can1357 52c1f62028 Merge remote-tracking branch 'origin/farm/75ea0bb0/fix-review-render-yield-non-array' 2026-06-06 13:38:59 +02:00
can1357 f7974e0f23 Merge remote-tracking branch 'origin/farm/f646bd45/fix-windows-ctrl-enter-followup' 2026-06-06 13:38:52 +02:00
roboomp 1ffa6dc6fb fix(coding-agent): guarded task renderer against non-array yield slot
renderAgentResult and the live-progress sibling cast
extractedToolData?.yield to Array<{ data }> and called ?.map without
checking the actual runtime shape. Optional chaining only short-circuits
on null/undefined, so any stray non-array value (a single yield object
landing in the slot) made .map undefined and threw
TypeError: completeData?.map is not a function — taking down every
`review` task render.

Both sites now route through a new normalizeYieldData helper (next to
normalizeReportFindings) that returns an array of yield records: it
preserves arrays unchanged, wraps a single object as a 1-element array
so the verdict still renders, and drops primitives. Added a regression
test exercising the result branch, the progress branch, the primitive
fall-through, and the canonical array shape — all of the failing-branch
ones reproduce the crash on the pre-fix renderer.

Fixes #1987
2026-06-06 11:16:44 +00:00
QianYan-Art 55c4efec4e fix(coding-agent): honor ttsr.enabled: false in TtsrManager
`TtsrManager` previously ignored the `ttsr.enabled: false` toggle:
- `addRule()` still registered rules, so `bucketRules` demoted them
  to the TTSR bucket and dropped the rulebook/alwaysApply fallback
- `hasRules()` still returned true, so `AgentSession` entered the
  TTSR matching path on every message_update
- `checkDelta` / `checkSnapshot` (via `#matchBuffer`) still matched
  patterns and could abort the stream and inject system reminders

Gate all three public-ish entry points on `#settings.enabled` so
disabling TTSR short-circuits the whole path. Condition rules fall
through to the rulebook bucket in `bucketRules` instead of being
silently swallowed.

Closes #1767
2026-06-06 04:05:04 -07:00
roboomp 09c8bf0f9a fix(keybindings): ignored stale Ctrl+Q config claims
The Ctrl+Q follow-up fallback should only be removed when a recognized
keybinding action claims that chord. Unknown or stale config entries are
ignored by the keybinding manager and should not suppress a working
follow-up default.

Addresses code review on #1905.
2026-06-06 08:39:05 +00:00
roboomp 9c8a6d208f fix(lsp): handled workspace/workspaceFolders requests
Returned the current workspace folder list when a server queried workspace/workspaceFolders after initialization so advertising the capability no longer left late requests answered with -32601.
2026-06-06 06:38:27 +00:00
roboomp cdcf74bb07 fix(lsp): opened rust analyzer files before workspace wait
Ensured rust-analyzer textDocument/didOpen ran before workspace readiness polling so the server could discover the file's Cargo workspace, and skipped the readiness wait entirely for standalone .rs files outside any Cargo workspace ancestor.
2026-06-06 06:32:41 +00:00
roboomp 17089d1702 fix(lsp): retried rust analyzer status timeouts
Continued rust-analyzer workspace readiness polling across transient analyzerStatus request timeouts while preserving early exit for unsupported methods and server failures.
2026-06-06 06:23:00 +00:00
roboomp e3107fa7b4 fix(lsp): supported rust analyzer workspaces
Advertised workspace folder support during LSP initialization and waited for rust-analyzer to finish loading Cargo workspaces before opening project-indexed files.

Fixes #1976
2026-06-06 06:17:39 +00:00
can1357 2e425b7b65 docs(coding-agent): documented auto discovery mode behavior
- Described "auto" default gating MCP tools past 40-tool threshold.
- Noted late resolution in createAgentSession after registry exists.
- Updated legacy mcp.discoveryMode mapping to MCP-only.
2026-06-06 01:14:14 +02:00
can1357 f5a938f859 feat(coding-agent): added auto tool discovery mode
- Made "auto" the default, hiding MCP tools past 40-tool threshold.
- Centralized discovery mode resolution in shared mode helper.
- Activated search tool in createAgentSession once full registry exists.
2026-06-06 01:12:26 +02:00
can1357 4a084eb1e6 test(coding-agent): added pendingImageLinks to input controller stubs
- Updated escape and skill-queue test fixtures for new imageLinks field.
2026-06-06 01:06:45 +02:00
can1357 efd6703580 fix: fixed native scrollback behavior for append-only assistant streams
- Fixed assistant transcript blocks to expose append-only commit-safe boundaries.
- Updated TUI live-region commit and pinned-paint logic to clamp commit-safe ends.
- Fixed long streamed assistant replies to remain in native scrollback on overflow.
2026-06-06 00:43:16 +02:00
can1357 ca143a4e08 feat(coding-agent): pinned turn-ending provider errors above editor
- Added a persistent error banner so stream errors survive transcript scroll.
- Cleared the banner when the next turn starts.
- Skipped pinning for aborts and normal stops.
2026-06-06 00:23:07 +02:00
can1357 340ac31122 fix(coding-agent): appended queued image messages synchronously
- Removed async image-link materialization between user message_start and addMessageToChat.
- Fixed steering bubbles rendering below the tool output they were sent to steer.
- Materialized clickable image links via synchronous blob-store fallback instead.
2026-06-05 23:57:01 +02:00
can1357 388e6462c3 fix(coding-agent): fixed cold-launch scrollback and frozen abort labels
- Cleared native scrollback on `omp`/`omp -c` so the resumed transcript no longer stacks on the prior run's welcome screen.
- Tracked assistant block finalization so aborted streaming messages stay repaintable when status rows land beneath them on ED3-risk terminals.
2026-06-05 23:50:49 +02:00
can1357 da636e3f51 feat(coding-agent): enabled clickable image and path links across chat and tools
- Added image-reference rendering to make `[Image #N]` placeholders clickable in chat.
- Added MIME-aware image blob materialization with extensioned sidecar paths.
- Added clickable path, line, and URL hyperlinks for read, search, and fetch outputs.
- Hardened OSC8 hyperlink emission with URI validation and control-byte/idempotency checks.
2026-06-05 23:38:22 +02:00
can1357 70c94efabe fix(coding-agent): froze live region by block finalization state
- Replaced bottom-most-block liveness with a finalization check so the live region spans every still-mutating block.
- Kept unfinalized tools repaintable when out-of-band inserts append finalized blocks below them.
- Recomputed blocks as they cross out of the live region to seal their final content.
2026-06-05 23:34:05 +02:00
can1357 9114607ce6 feat(coding-agent): surfaced active model in system prompt
- Rendered the active model identifier into the project prompt.
- Rebuilt the cached base prompt on model switch to avoid staleness.
2026-06-05 23:08:44 +02:00
can1357 78700a2c77 feat(ollama): added OLLAMA_HOST and OLLAMA_CONTEXT_LENGTH support
- Used OLLAMA_HOST for implicit discovery when OLLAMA_BASE_URL is unset.
- Applied OLLAMA_CONTEXT_LENGTH override to discovered context budgeting.
2026-06-05 22:47:40 +02:00