Commit Graph

607 Commits

Author SHA1 Message Date
can1357 d820cf75bb feat: implemented token tracking and metadata options for compaction summaries
- Added `CompactionSummaryMessageOptions` interface to support optional fields and metadata in compaction summary messages.
- Included compaction method labels and before-after amount badge rendering in compaction views.
- Updated session maintenance and compaction methods to track and compute post-compaction token counts.
- Updated calls across agent and coding-agent packages to use the new compaction options object.
2026-08-20 07:18:43 +02:00
can1357 1f526ed5d3 test(coding-agent): updated test harnesses for composer shape methods
- Add syncComposerShape and getComposerShapes stubs to test mocks and harnesses.
2026-08-20 06:38:51 +02:00
can1357 184058f11a test(agent): added tests for compaction speculation and preview rendering
- Added tests for async compaction behavior, snapcompact leading, and discarded armed summaries.
- Added tests verifying status line context cache behavior, speculation ticks, and border accents.
- Updated composer shape preview, todo HUD, and yield tool validation tests to reflect current behavior.
- Added test coverage for session name preview title fallbacks and right alignment.
2026-08-20 06:36:44 +02:00
can1357 43a557081f feat: introduced custom composer styles and runtime extension registration
- Added new field, rail, and rule composer styles with accent and surface color support.
- Introduced runtime extension registration for custom composer shapes and styles.
- Updated status line rendering and theme adapters to support dynamic composer styling and gaps.
- Added comprehensive unit tests for new composer shapes, extension loading, and rendering behaviors.
2026-08-20 06:11:57 +02:00
can1357 bd5764aad4 feat(coding-agent): integrated subscription status icons and advisor tracking
- Added theme icons and formatting for subscription status and advisor tracking across status lines and footers.
- Implemented `isAdvisorUsingSubscription` and `isUsingSubscription` methods to check active models against OAuth usage.
- Updated status line model segments to display the new advisor icon instead of text badges.
- Added comprehensive tests covering subscription and advisor costs across multiple font presets.
2026-08-20 05:51:53 +02:00
can1357 e8d7c0a493 feat: introduced pluggable composer layouts and status line gauge modes
- Introduced embedded mode and context gauge render options for the status line alongside boundary calculation helpers.
- Added pluggable composer styles with a style registry supporting box, claude, pi, and borderless layout rendering.
- Extracted speculation lead resolution into a dedicated shared module and added theme symbol definitions.
- Expanded test coverage for status line context gauge modes, composer shape previews, and editor style assertions.
2026-08-20 05:41:42 +02:00
can1357 3ef3b43b49 feat: introduced customizable composer shapes and status line rendering options
- Add support for customizable composer shapes and editor border styles including box, claude, pi, and borderless.
- Introduce a setup wizard scene and settings selector integration for choosing and previewing composer shapes.
- Enhance status line rendering to support standalone placement and context usage percentage shading.
- Add comprehensive unit tests covering composer shape previews, editor border styles, and status line rendering.
2026-08-20 05:06:17 +02:00
can1357 2d56a37334 refactor(coding-agent): standardized ui dialogs to use overlay panel base
- Introduce OverlayPanel and PanelDivider classes to standardize rounded-box inline overlays and section rules.
- Migrate various UI dialog, selector, and panel components to inherit from OverlayPanel instead of Container.
- Remove manual DynamicBorder elements and custom title/header components across migrated components.
- Update test helpers and assertions to match the new overlay panel structure and rendering methods.
2026-08-20 04:47:33 +02:00
can1357 8c35861d96 feat(coding-agent): implemented ordered compaction fallback and settings
- Replaced legacy `compaction.strategy` and `remoteEnabled` settings with `compaction.methodOrder` across session maintenance, schema, and tests.
- Added automatic fallback mechanism to try subsequent compaction methods upon failure or unsupported model capabilities.
- Added mouse drag-and-drop reordering support and click handlers to multi-select settings submenus.
- Updated documentation and test suites to reflect ordered compaction strategy preferences and fallback chains.
2026-08-20 02:59:49 +02:00
can1357 12238f55ca feat: implemented native ctok tokenization engine with model scopes
- Implemented the `ctok` Rust native tokenization engine with offline support for Claude V3, V47, V5, and V5Sonnet families.
- Replaced global token estimation with model-scoped `Tokenizer` instances and provider-anchored transcript accounting across packages.
- Added vocabulary generation scripts, test fixtures, and comprehensive unit tests for tokenizer routing and matching modes.
2026-08-19 23:27:29 +02:00
can1357 d94bdfa1bb test: hardened new spinner and title-latch suites against full-suite pollution
- Exported stopSharedSpinnerTicker() and wired it into InteractiveMode.stop(): a live block missed by per-component stopAnimation kept the shared 80ms interval alive as a lingering event-loop handle; the spinner suite uses it to observe a freshly armed ticker instead of one leaked by earlier files
- Title-disposal tests now save/clear/restore PI_NO_TITLE (main() in ACP/RPC mode sets it process-wide), matching the prewarm and orphan-submit precedent
2026-08-19 03:20:50 +02:00
can1357 130cc9c0a3 fix(tui): also accept legacy CSI ~ Shift+Enter form in /tree selector
Mirrors the composer's raw-sequence fallback (editor.ts:1466) so
\x1b[13;2~ triggers summarize-and-switch instead of being dropped as
shift+f3, completing the parity requested in issue #8821.
2026-08-19 01:38:35 +02:00
can1357 f60e32f9b8 Merge PR #8916: fix(tui): treat bare LF as Shift+Enter in the /tree selector (@re2zero) 2026-08-19 01:38:35 +02:00
can1357 22439b6be2 Merge PR #8896: fix(settings): hide excluded search providers from summary (@poorpaper) 2026-08-19 01:38:34 +02:00
can1357 dbae69dace Merge PR #8799: fix(tests): stop the checkout location and system zshrc from failing tests (@Huang-404-Q) 2026-08-19 01:36:58 +02:00
re2zero 73e0366121 fix(tui): treat bare LF as Shift+Enter in the /tree selector
The composer accepts three encodings for Shift+Enter (kitty CSI-u, the
legacy \x1b[13;2~ form, and a bare LF from the iTerm2 mapping e.g. Claude
Code's /terminal-setup). The /tree selector only handled the kitty form and
silently routed a bare LF into the plain-Enter branch, so summarize-and-
switch never fired for those terminals.

Mirror the composer: fall through a bare LF to summarize-and-switch while
plain CR (or the decoded Enter key) still does a plain switch.

Fixes #8821
2026-08-19 02:33:40 +08:00
poorpaper 6862ac08f0 fix(settings): hide excluded search providers from summary 2026-08-18 22:30:03 +08:00
Huang-404-Q cdbee5814b fix(tests): stop the checkout location and system zshrc from failing tests
Three tests fail on a clean checkout depending on where the repo lives and
which terminal runs the suite:

- status-line-path builds its fake home inside the checkout, so a clone under
  /tmp lands in a SCRATCH_ROOTS prefix and renders the scratch icon.
- status-line/component renders a fixed 120 columns, so a long checkout path
  or branch name pushes the cost segment out of the assertion.
- bash-executor runs an interactive login zsh, which loads the system
  /etc/zshrc; under Apple Terminal that appends session-save lines to the
  captured output. HOME does not isolate a system-level file.
2026-08-17 16:23:51 +08:00
roboomp 49f22987d5 fix(tui): consolidate live tool spinner timers into one shared ticker
Every live tool block (streaming args, a running partial tool, or a task
subagent) armed its own 80ms setInterval driving requestComponentRender,
so N concurrent live blocks created N unsynchronized repaint timers that
kept the 30fps render scheduler awake near-continuously during
multi-subagent / workflowz / orchestrate work.

Replaced the per-component intervals with a single shared spinner ticker
that advances the already-phase-locked glyph once per step and repaints
every registered live block in one coalesced frame, independent of block
count. Verified 3 live blocks now share 1 timer instead of 3.

Fixes #8731
2026-08-16 14:58:57 +00:00
can1357 d57a0ff233 fix(extensions): preserved drafts before custom presentation 2026-08-16 02:45:04 +02:00
can1357 06793c72bb Merge PR #8441: fix(extensions): pause tool-call timeout during human dialogs (@Seljuke)
# Conflicts:
#	packages/coding-agent/test/extensions-runner.test.ts
2026-08-16 02:45:04 +02:00
can1357 a4e5979d70 Merge PR #8658: fix(tui): preserve welcome columns for long model names (@roboomp) 2026-08-16 02:43:31 +02:00
can1357 d5fd412115 fix(tui): labeled single multi-select Enter as submit 2026-08-16 02:13:40 +02:00
can1357 f83111c8d4 Merge PR #8265: fix(tui): multi-select ask dialog submits on Enter instead of dead-ending (@zhang17-24) 2026-08-16 02:13:40 +02:00
can1357 e61cc18f6b test(theme): covered birch card contrast 2026-08-16 02:13:39 +02:00
can1357 a59fc754b6 test(tui): covered welcome model synchronization 2026-08-16 02:03:17 +02:00
can1357 7e4fd9a686 Merge PR #8428: fix(tui): welcome banner shows stale model name after model changes (@jacobleft) 2026-08-16 02:03:17 +02:00
can1357 8de929c393 Merge PR #8285: fix(tui): preserve scrollback after hidden tool snapshots (@dannyboy-ai) 2026-08-16 02:03:16 +02:00
can1357 5cc9aa74bc fix(ask): used full dialog width for wrapped labels 2026-08-16 02:03:15 +02:00
can1357 565a21bfb4 Merge PR #8654: fix(ask): wrap long option labels in the rich ask dialog instead of truncating (@szavadsky) 2026-08-16 02:03:15 +02:00
Anatoli Tsinovoy ea93012be4 fix(coding-agent): preserve artifacts in CLI forks 2026-08-15 19:24:54 +03:00
roboomp bb1de6d0e4 fix(tui): preserved welcome columns for long model names
Allowed the preferred left column to grow to fit model and provider labels while retaining the minimum right-column width.

Added a regression test at the 55-column layout boundary.

Fixes #8657
2026-08-15 13:48:29 +00:00
Slava Zavadsky 00043ef3ba fix(ask): wrap long option labels in the rich ask dialog instead of truncating
The rich AskDialogComponent (merged in PR #4375) hard-truncated every
option row via truncateToWidth(firstLine, width, Ellipsis.Unicode),
clipping the disambiguating tail of long labels with no way to read it.
The legacy HookSelector dialog has wrapped labels since June 1
(3c7d50d292), so the rich dialog was the remaining truncation path.

renderRowLabel now wraps the label with wrapTextWithAnsi, indenting
continuation lines under the radio/checkbox marker so the cursor stays
visually anchored; the body ScrollView carries vertical overflow. The
note marker is reserved on the first line. Fixes #1243, #8594.
2026-08-15 09:11:32 -04:00
usr-bin-roygbiv bdbea3f7f3 fix(tui): recover reports after orphan fences 2026-08-14 02:15:22 +00:00
Daniel Anderson-Little 44834fdd23 fix(tui): preserve scrollback after hidden tool snapshots 2026-08-13 15:07:39 -04:00
Seljuke fd28acf5a1 fix(extensions): harden dialog timeouts 2026-08-13 20:39:12 +02:00
can1357 28997c0d46 refactor(coding-agent): restructured transcript rendering during initialization
- Stage transcript initialization inside a detached TranscriptContainer to keep existing messages visible during incremental rendering.
- Add fallback state restoration in InteractiveMode.renderInitialMessages when chat rendering is aborted or fails.
- Update render-initial-messages tests to assert that old transcripts remain visible until replacements are fully committed.
2026-08-13 18:55:36 +02:00
can1357 23aff5ae3f test(tui): model direct HerdR in-place resize in stress oracle
The HerdR flicker fix routed direct HerdR panes onto the in-place
multiplexer resize path, but the randomized render-stress oracle still
modeled them as ED3 replaying direct terminals. The width-epoch ledger
now applies to any in-place-resize scenario (multiplexer + direct HerdR)
via a dedicated resizeRepaintsInPlace trait, keeping HerdR's direct
scrollback semantics intact. Adds a deterministic replay regression
(seed 0xcafed00d, 24 iterations) that fails without the oracle update.
2026-08-13 18:39:29 +02:00
jacobleft 272a0e8461 fix(tui): resync welcome banner after init-time model changes
Address review feedback: init-time model switches (#reconcileModeFromSession,
#enterPlanMode for plan.defaultOnStartup) fire model_changed before the
subscription exists, leaving the banner stale for those cases too.

Adds a catch-up #updateWelcomeModel() call right after the subscription is
installed, mirroring how the sessionName listener is registered before
those same init steps (line 1094-1095 comment).

Also adds a regression test for the catch-up path and comments tying the
component test to the wiring gap it covers.
2026-08-13 19:22:05 +08:00
jacobleft 9bb18d3e0e fix(tui): update welcome banner model name on model_changed event
The welcome banner (WelcomeComponent) captures the session's active
model name at init time but never receives updates when the model
changes. Its setModel() method already existed but was never called
after construction.

This wires the model_changed agent session event to a new
#updateWelcomeModel() method in InteractiveMode, mirroring the
existing #updateWelcomeLspServers() pattern. The banner now reflects
the live model after:
- delayed config/modelRoles load (the startup race where an
  alphabetically-first provider is picked before config resolves)
- explicit /model switches
- retry-fallback model swaps
2026-08-13 19:05:36 +08:00
can1357 e8eed95130 feat(coding-agent): introduced fine grained per agent advisor configuration
- Replaced blanket subagent advisor global settings with fine-grained per-agent configuration and frontmatter support.
- Added dashboard keybindings and inline override editors for managing agent advisor patterns.
- Implemented settings migration logic to convert legacy global options into per-agent settings.
- Updated session persistence and execution layers to restore and enforce per-agent advisor behaviors.
2026-08-13 04:59:50 +02:00
can1357 2dddba9fe4 Merge PR #8199: fix(coding-agent): gate prompt tool mentions on session tool availability (@szavadsky)
# Conflicts:
#	packages/coding-agent/src/prompts/system/orchestrate-notice.md
#	packages/coding-agent/src/prompts/system/plan-mode-active.md
#	packages/coding-agent/src/prompts/system/project-prompt.md
#	packages/coding-agent/src/prompts/system/system-prompt.md
2026-08-13 01:18:42 +02:00
can1357 193894c8d4 Merge PR #8135: fix(tui): keep large transcript rebuilds responsive (@roboomp)
# Conflicts:
#	packages/coding-agent/test/modes/utils/render-initial-messages.test.ts
2026-08-13 01:16:23 +02:00
can1357 338abf4881 Merge PR #8266: fix(omp): prevent false reset fireworks (@oleksoleksoleks) 2026-08-13 01:14:51 +02:00
left-to-right b245be11c5 fix(ask): address review comments on multi-select Enter submit
- Multi-question dialogs now advance on Enter in multi-select mode
  instead of submitting every question at once (roboomp blocking)
- Ask tool accepts an empty multi-select submission as a "select none"
  answer instead of aborting as a cancellation (codex P2)
- Footer hint reflects advance vs submit for multi-question dialogs
- Move the #8252 changelog entry to Unreleased (codex P2)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-08-12 22:58:02 +08:00
Shawn Koh 16c2832404 fix(tui): validate leading width epoch blocks
Amp-Thread-ID: https://ampcode.com/threads/T-019ff125-f53d-739b-8462-6027fe70f914
Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 16:16:20 +08:00
Shawn Koh d131b61227 fix(tui): preserve non-prefix width appends
Amp-Thread-ID: https://ampcode.com/threads/T-019ff125-f53d-739b-8462-6027fe70f914
Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 10:14:42 +08:00
Shawn Koh 8751a9571f fix(tui): preserve live output across width epochs
Amp-Thread-ID: https://ampcode.com/threads/T-019ff125-f53d-739b-8462-6027fe70f914
Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 10:14:42 +08:00
Shawn Koh fb0bcdbba0 fix(tui): preserve mutable Markdown row on resize
Amp-Thread-ID: https://ampcode.com/threads/T-019ff125-f53d-739b-8462-6027fe70f914
Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 10:14:41 +08:00
Shawn Koh d164a6407a fix(tui): avoid unwatermarked width-epoch appends
Amp-Thread-ID: https://ampcode.com/threads/T-019ff125-f53d-739b-8462-6027fe70f914
Co-authored-by: Amp <amp@ampcode.com>
2026-08-12 10:14:41 +08:00