Commit Graph

250 Commits

Author SHA1 Message Date
can1357 92d03466b7 Merge branch 'farm/c8a3da70/fix-resume-delete-scroll' into resume picker
Resolve the session-selector.ts conflict by integrating the delete-dialog
content-slot fix (#3283) on top of the fullscreen mouse-picker refactor.

The branch swapped the delete-confirmation dialog INTO a single content
slot (replacing the SessionList) so the picker is always
`chrome + max(list, dialog) + chrome` and never overflows the viewport.
Adjustments baked into this merge:

- Wrap the SessionList in `#contentSlot` and keep the dialog swapping into
  that slot, but preserve the new fullscreen path: mouse hit-testing,
  the pinned footer (`#footerLines`/`#footerStart`), and fill-height
  trimming all still work because the render offset now tracks
  `#contentSlot` (the list lives one level down).
- Keep both CHANGELOG entries (picker mouse/fullscreen + #3283 fix) and
  the ported scroll-stability regression test.
2026-06-23 02:46:56 +02:00
can1357 cffb804d3a feat(coding-agent): added mouse support and fullscreen rendering to session picker
- Enabled fullscreen overlay rendering for the terminal session picker.
- Implemented full mouse support including wheel-based scrolling and click-to-select functionality.
- Anchored the session picker footer to the bottom of the viewport to correct UI flickering.
- Added comprehensive unit tests for mouse interaction and layout constancy during resizing.
2026-06-23 02:25:30 +02:00
roboomp e266782604 fix(session-selector): swap delete dialog into SessionList slot
Earlier rounds shrank the SessionList by the dialog's row count to keep
the picker inside the viewport, but the SessionList could only claw back
whole session rows and bottomed out at zero entries. On a narrow
terminal with a long session title the dialog still wrapped past what
the SessionList could free, the picker overflowed the viewport, and the
TUI committed the header into native scrollback.

The picker now hosts the SessionList inside a single contentSlot
Container. Opening the delete confirmation swaps the dialog INTO that
slot (replacing the SessionList); closing it swaps the SessionList back.
The dialog therefore competes only with the SessionList's rendered
budget, not with the SessionList AND the picker chrome, so the picker
frame stays bounded by terminalRows even when the dialog wraps to many
rows. SessionList's external-reserve plumbing is no longer needed and is
removed.

Addresses PR #3285 second-round review feedback.
2026-06-23 00:05:53 +00:00
roboomp 964dc480c9 fix(session-selector): derive delete-dialog reserve from rendered height
The first round of the issue #3283 fix reserved a fixed 12 SessionList
rows for the delete confirmation dialog. On a narrow terminal or against
a long session name, HookSelectorComponent's Markdown title and help
text wrap past 12 rows; the picker would still overflow even after the
SessionList shrank to zero entries, and the TUI committed the picker
header into native scrollback again.

SessionSelectorComponent now overrides render() to measure the dialog's
actual rendered height at the live width before super.render() walks
the children, and pushes that as the SessionList's external-row reserve.
The dialog's own Container memoization makes the extra pre-render
essentially free.

Addresses PR #3285 review feedback.
2026-06-22 23:56:25 +00:00
roboomp ecdff42513 fix(session-selector): keep /resume header pinned after delete
The delete-confirmation dialog mounted as a sibling below the picker's
bottom border briefly grew the picker past the terminal height. The TUI's
append-only renderer committed the picker's top rows (header + first
sessions) into native scrollback to fit the dialog within the viewport.
When the dialog closed and the picker re-rendered shorter, `windowTop`
stayed pinned at `#committedRows`, leaving the picker stranded below the
committed prefix — the user saw the header scrolled off the top.

SessionList now exposes `setExternalReserveRows`; SessionSelectorComponent
reserves the dialog's worst-case height while the dialog is mounted so
the picker's total rendered output stays within the terminal viewport
and the TUI never commits its rows.

Fixes #3283
2026-06-22 23:38:11 +00:00
can1357 060f4004e7 feat(coding-agent): refactored eval tool to single-step execution
- Transitioned the eval tool from batch multi-cell execution to a single-step input structure with flat parameters.
- Updated core agent logic, UI components, and documentation to support state persistence across incremental eval calls.
- Restricted bash tool capabilities by requiring explicit use of `read` or `find` instead of `ls` or `find`.
- Added support for Ruby and Julia language runtimes to the eval tool and associated web renderers.
2026-06-23 00:59:58 +02:00
can1357 2ff005a354 fix(coding-agent/modes): resolved escape key handling under kitty keyboard protocol
- Update input handler to recognize CSI-u escape sequences using `matchesKey`.
- Ensure legacy bare escape sequences remain supported in environments without the protocol.
- Add test coverage for both CSI-u and legacy escape inputs.
2026-06-23 00:36:54 +02:00
can1357 5c21b28786 feat: optimized handoff generation and harden request safety
- Introduced `generateHandoffFromContext` to enable provider-aware oneshot generation and improved cache hit rates via the live-turn pipeline.
- Updated `buildSideRequestContext` to support pinning custom system prompts, preventing per-turn hook leakage during handoff.
- Added concurrency guards across CLI and RPC modes to block manual `/handoff` requests while a session is actively streaming.
- Standardized handoff execution to force `toolChoice: "none"` and enforce consistent cache-routing behavior.
2026-06-22 20:05:40 +02:00
can1357 266723a870 Merge remote-tracking branch 'origin/farm/fb97f79d/fix-prompt-template-optimistic-render' 2026-06-21 18:31:42 +02:00
roboomp 1c22d32640 test(tui): restored event-controller optimistic stubs
Added clearOptimisticUserMessage and replaceOptimisticUserMessage stubs to the EventController message_start test double so the optimistic-submission case no longer throws when the controller reconciles the signature.

Fixes #3199
2026-06-21 15:49:58 +00:00
can1357 e43d01a684 Merge PR #1794: fix(coding-agent): mark forked sessions in resume picker (@roboomp)
# Conflicts:
#	packages/coding-agent/src/modes/components/session-selector.ts
2026-06-21 17:18:16 +02:00
can1357 984c8dd2f6 fix(coding-agent): reconciled tool arguments on execution start
- Synchronize tool arguments with the component state upon receipt of `tool_execution_start` to ensure visual consistency when final update events are missed.
- Terminate active argument reveal streams to prevent late ticks from overwriting valid, fully-materialized tool arguments with stale partial data.
- Add test coverage to verify that tool UI components render finalized arguments even in the absence of intermediate streaming updates.
2026-06-21 06:51:37 +02:00
can1357 aaac4e414f Merge PR #2950: feat(coding-agent): add copy affordance to completed /btw answers (@wolfiesch)
Adds 'c copy' to the completed /btw panel footer (alongside b branch / Esc
dismiss), copying the sanitized visible answer to the clipboard. The copy
shortcut is guarded by canCopyBtw + main-editor focus + empty editor.
2026-06-20 23:56:24 +02:00
can1357 330a37e289 test(coding-agent): fixed type error in event controller tests
- Added missing settings property to the InteractiveModeContext mock in event controller tests.
2026-06-20 23:43:38 +02:00
can1357 9722505a2b Merge PR #3017: fix(coding-agent): handle todo paths and prompt inventory (@oldschoola)
# Conflicts:
#	packages/coding-agent/test/system-prompt-inventory.test.ts
2026-06-20 22:19:28 +02:00
can1357 7bf8db9215 Merge PR #2946: fix(coding-agent): show omfg dismiss hint (@wolfiesch) 2026-06-20 22:16:57 +02:00
can1357 d3d88ce5c3 test(coding-agent): force startInAllScope in #3099 regression so it discriminates
The #3099 test omitted the startInAllScope flag, so it passed against the
buggy baseline too (empty folder defaults to folder scope regardless). Force
the removed flag via a cast to pin the real contract: even when a caller asks
for all-projects scope on an empty folder, the picker must stay folder-scoped.
Proven: passes on head src, fails on baseline src (renders '(all projects)').
2026-06-20 22:13:01 +02:00
can1357 31bb2144e7 Merge PR #3100: fix(coding-agent): keep /resume picker scoped to the current folder (@roboomp) 2026-06-20 22:13:01 +02:00
can1357 b717a65fc3 feat(coding-agent): introduced prose-only thinking mode
- Added a `proseOnlyThinking` configuration setting to suppress raw code blocks in AI thinking traces.
- Implemented `formatThinkingForDisplay` utility to replace code blocks with ellipses in the UI.
- Integrated runtime toggling and live refreshing of message components via streaming reveal controllers.
- Added a live tokens-per-second indicator to the assistant thinking pulse.
- Verified logic with new unit and integration tests for thinking block presentation.
2026-06-20 08:51:15 +02:00
can1357 4947ac6ce2 feat(coding-agent/modes): added live streaming-speed indicator to thinking animation
- Added a windowed `SpeedTracker` to report average tokens-per-second during reasoning streams.
- Updated thinking animation from a dot pulse to a starburst effect with a dynamic speed badge.
- Engineered badges to fade from gray to accent color based on streaming throughput.
- Implemented automatic badge suppression during streaming lulls or for providers without live usage reporting.
- Added session-wide reset logic to prevent rate leaking between consecutive message turns.
2026-06-20 08:30:01 +02:00
roboomp de03b0c8ee fix(coding-agent): kept /resume picker scoped to the current folder
The session picker auto-switched into all-projects scope whenever the
current cwd had no sessions, so /resume from a fresh project silently
surfaced every other project's history. The empty-folder hint already
tells users to Tab into all-projects, but the auto-switch made it
unreachable. Both call sites (the /resume slash command and `omp
--resume` startup) now always open in folder scope; `omp --resume`
keeps the global probe only to early-exit with 'No sessions found' when
nothing exists anywhere. The component-level `startInAllScope` option
is deleted along with its callers.

Fixes #3099
2026-06-20 03:43:59 +00:00
oldschoola ee661cb418 fix(coding-agent): handle todo paths and prompt inventory 2026-06-19 17:10:26 -07:00
can1357 2de02f2119 Merge PR #3019: fix: Windows test failures — path handling, EBUSY, SQLite handle leaks (@oldschoola) 2026-06-19 17:17:04 +02:00
can1357 5c66faa81d Merge PR #3026: fix(coding-agent): guard theme getters against undefined theme before init (@oldschoola) 2026-06-19 17:16:37 +02:00
can1357 d46bd0139b refactor(coding-agent): fixed system prompt customization path
- Fixed `SYSTEM.md` integration to correctly include custom-rendered sections like rules and skills.
- Consolidated system prompt validation by requiring `<skills>` tag presence instead of specific prose.
- Removed redundant system prompt math-formatting tests and orphaned task batch documentation tests.
2026-06-19 16:16:37 +02:00
can1357 fd0dd40083 refactor(coding-agent): improved detection of reflowing markdown
- Replaced regex-based markdown detection with a stateful parser in `detectLiveReflowingMarkdown`.
- Correctly ignore table delimiters and mermaid markers when they appear inside fenced code blocks.
- Added tests to verify that code blocks containing markdown-like syntax do not prevent commit stability.
2026-06-19 16:11:40 +02:00
can1357 865694df7e fix: resolved streaming stability and reference isolation issues
- Prevent object reference sharing between agent snapshots and stream events by deep-cloning tool-call arguments.
- Stabilize GFM tables and Mermaid diagrams during streaming by delaying transcript block commits until content finalization.
- Implement session resume safety to prevent crashes when working directories are missing.
- Add comprehensive test suites to verify streaming commit stability and immutable snapshot isolation.
2026-06-19 16:09:00 +02:00
can1357 a98230addc chore: update changelog & tests 2026-06-19 16:06:18 +02:00
roboomp ffcbc5f876 fix(ux): gated advisor dependent settings
Added an advisorEnabled visibility predicate and wired the advisor dependent settings through it so the Model Advisor sub-options hide unless Enable Advisor is active. Added regression coverage for the settings UI adapter.\n\nFixes #3027
2026-06-19 06:39:24 +00:00
can1357 b877464575 refactor(coding-agent): migrated UI chrome to rounded box corners
- Switch all UI components and tests from sharp box corners (`boxSharp`) to rounded ones (`boxRound`).
- Update `Theme` to re-export sharp junction symbols (tees and cross) under `boxRound` to ensure consistent divider rendering in rounded boxes.
- Remove outdated architectural notes regarding forced tool-choice queues in documentation.
2026-06-19 07:57:15 +02:00
oldschoola cc3c956f26 fix(coding-agent/modes): guarded theme getters against undefined theme before init
- Added `typeof theme === "undefined"` guards to all four theme getters.
- Fallbacks return a usable plain-ASCII or plain-text theme instead of crashing.
- Added a pre-init test asserting the getters never throw.
2026-06-18 22:14:24 -07:00
oldschoola 14252e71cb fix: Windows test failures — path handling, EBUSY, SQLite handle leaks
Fix all Windows-specific test failures caused by path handling problems
and EBUSY errors from unclosed SQLite database handles.

Root causes fixed:
1. POSIX path assumptions: replaced hard-coded file:///tmp, /repo, etc.
   with pathToFileURL/path.resolve/path.join computed expectations
2. shortenPath() now normalizes backslashes to forward slashes after ~
   and respects home directory boundaries
3. HistoryStorage.resetInstance() leaked its Database — added #close()
   that finalizes all prepared statements and closes the DB
4. AgentStorage gained the same resetInstance()/#close() pattern
5. SqliteAuthCredentialStore.close() leaked one-off prepared statements
   from inline this.#db.prepare() calls — wrapped each in try/finally
6. model-cache.ts used a process-global DB even for custom dbPath —
   now opens/closes per-call via withModelCacheDb
7. createAgentSession leaked AuthStorage on construction failure —
   added ownsAuthStorage cleanup in catch block
8. MnemopiBackend.removeDbFiles() now truly best-effort (catches errors)
9. TempDir retry window expanded from 4x10ms to 40x25ms
10. TempDir prefix convention: non-@ prefixes created dirs relative to
    cwd instead of os.tmpdir() — all test temp dirs now use @ prefix
11. Shell-escaped interpolated paths in bash tool tests
12. git core.autocrlf false in autoresearch test repo init

All 522 previously-failing Windows tests now pass.
2026-06-18 21:32:38 -07:00
can1357 7a819bba16 Merge PR #2906: fix(login): honor disabledProviders in /login provider list (@dipunj) 2026-06-18 23:32:53 +02:00
Wolfgang Schoenberger a2addd1175 feat(coding-agent): add btw copy affordance 2026-06-18 13:28:37 -07:00
Wolfgang Schoenberger ed8d7982b8 fix(coding-agent): show omfg dismiss hint 2026-06-18 13:28:11 -07:00
Dipunj ca4c5463d9 fix(login): hide alias logins when their credential provider is disabled
A login entry can store credentials under a different provider id via
storeCredentialsAs (e.g. openai-codex-device => openai-codex). Filtering
only on provider.id left such alias logins visible after disabling the
underlying model provider. Surface storeCredentialsAs on OAuthProviderInfo
and hide a login entry when either its own id or its storeCredentialsAs
target is in disabledProviders.

Addresses Codex review on #2906.
2026-06-18 15:56:43 -04:00
can1357 f5ebab2b83 feat(utils): vendor mermaid rendering 2026-06-18 18:52:38 +02:00
can1357 31fe9ab3f1 hack: backtrack changelog 2026-06-18 04:55:19 +02:00
can1357 4a1f3483c7 feat(coding-agent): promote completed /btw answers into branches (#2894) 2026-06-18 02:50:23 +02:00
can1357 9382439b52 feat(cli): add retry keybinding (#2899) 2026-06-18 02:48:29 +02:00
can1357 a050474af7 feat: migrated validation schemas and tool definitions from Zod to ArkType
- Migrated all wire protocol, schema definitions, and tools validation from Zod to ArkType across multiple packages.
- Updated extension runtimes, custom tools loader, and TypeBox compatibility shim to expose and use ArkType instances.
- Added a comprehensive ArkType migration guide, validation parity tests, and helper utilities.
- Removed redundant PDF asset routing and parsing implementations from the read tool.
2026-06-18 00:59:53 +02:00
Dipunj d23774663e fix(login): honor disabledProviders in /login provider list
The /login selector listed every OAuth-capable provider regardless of the
disabledProviders setting, so providers hidden from the model picker still
appeared as login targets. Filter them out in login mode (logout stays
unfiltered so stored credentials of a now-disabled provider can still be
removed).
2026-06-17 16:14:03 -04:00
KamijoToma 0babeec0ef fix(coding-agent): tighten btw branchability 2026-06-18 02:45:03 +08:00
KamijoToma 2bbb16c49b fix(coding-agent): harden btw branch state 2026-06-18 02:35:33 +08:00
KamijoToma b92e995d73 fix(coding-agent): strip btw native replay payload 2026-06-18 02:21:44 +08:00
KamijoToma 5146095627 fix(coding-agent): strip btw thinking signatures 2026-06-18 01:56:02 +08:00
KamijoToma 6116b97a54 Add retry keybinding 2026-06-18 01:51:11 +08:00
KamijoToma 9e67a507b9 fix(coding-agent): stabilize btw branch context 2026-06-18 01:37:50 +08:00
KamijoToma e3eb99ea44 fix(coding-agent): prevent duplicate btw branch promotion 2026-06-18 01:23:55 +08:00
KamijoToma 52b3155cbd feat(coding-agent): branch completed btw answers 2026-06-18 00:58:23 +08:00