Commit Graph

32 Commits

Author SHA1 Message Date
Daniel Anderson-Little cbd7dc2e70 fix(coding-agent): centralize hidden activity state 2026-08-11 17:07:20 -04:00
Daniel Anderson-Little 3a4ea6a376 fix(coding-agent): hide internal tool activity blocks 2026-08-11 16:59:53 -04:00
roboomp 931f61867c fix(tui): gated built-in renderers by tool provenance
- Routed session tool provenance through live and rebuilt transcript render paths.
- Kept same-named extension tools on the generic renderer while preserving native tool rendering.
- Added regression coverage for an external recall result collision.

Fixes #7770
2026-08-06 01:36:25 +00:00
Daniel Anderson-Little a20690a40b feat(tui): add hidden tool activity mode 2026-08-02 22:59:48 -04:00
joshrzemien a3e90b3d95 fix(tui): nest usage metrics in read groups
(cherry picked from commit 101268adc632e80bb3f8304b95497ac7bd884131)
2026-07-29 23:08:41 +02:00
roboomp 62d8b0d3ad fix(tui): initialized provider errors from expand state
New live, rebuilt, and transcript-builder assistant components now inherit the active tool-output expansion state before provider errors render.

Added regression coverage for an error arriving after expanded mode was already enabled.

Fixes #6555
2026-07-25 00:32:52 +00:00
roboomp a2c90f5e5f fix(tui): collapsed synthetic advisor inputs in transcript viewer
Cold-opening a large read-only Advisor transcript froze the TUI for tens
of seconds: AgentTranscriptViewer.render() called the full
container.render() before ScrollView clipped, laying out every synthetic
`Session update` input as full Markdown. A 6.5 MiB __advisor.jsonl
blocked the first frame ~27s in a repro.

Synthetic (agent-attributed) inputs now render as a CollapsedSyntheticMessageComponent:
one dim summary row (heading, size, line count, ctrl+o hint) that builds
the heavy UserMessageComponent Markdown only on expand. Blocks above the
viewport never pay layout on cold open; the raw observability data in
__advisor.jsonl is untouched. Real user prompts stay fully rendered.

Fixes #6308
2026-07-22 18:12:24 +00:00
can1357 60cbcc8c9d Merge PR #5055: feat(coding-agent): add timestamp to per-turn token-usage row (@zommiommy) 2026-07-20 22:50:05 +02:00
can1357 93cc1fed1c merged PR #5417: fix(openai): render native response images
# Conflicts:
#	packages/coding-agent/src/modes/components/chat-transcript-builder.ts
#	packages/coding-agent/test/agent-session-skill-keywords.test.ts
2026-07-16 03:48:21 +02:00
can1357 5ff277349c refactor(coding-agent): consolidated tool surface onto xd:// devices and hub
- Added the `xd://` virtual device protocol (`internal-urls/xd-protocol.ts`, `tools/xdev.ts`): tools declaring `loadMode: "discoverable"` are unmounted from the request tools array and driven via `read xd://` (list/docs+schema) and `write xd://<tool>` (execute), gated by the `tools.xdev` setting (default on) and inlined into the system prompt.
- Merged the `irc`, `job`, and `launch` tools into a single `hub` tool (`tools/hub/`, `async/job-manager.ts`): messaging keeps `send`/`inbox`/`list`, job control maps to `wait`/`cancel`/`jobs`, process supervision keeps `start`/`logs`/`stop`/`restart`/`describe` with `ps`, and the unified `wait` races background jobs against peer messages; SDK `IrcTool`/`JobTool`/`LaunchTool` are replaced by `HubTool`.
- Removed the hidden `resolve` tool in favor of the `xd://resolve`/`xd://reject`/`xd://propose` resolution devices, auto-including `write` whenever a deferrable tool or plan mode is present.
- Removed the BM25 tool-discovery system: the `search_tool_bm25` tool, the `tool-discovery` module, the `tools.discoveryMode`/`mcp.discoveryMode`/`mcp.discoveryDefaultServers`/`tools.essentialOverride` settings, per-tool MCP selection, and the `mcp_tool_selection` message type.
- Unified tool presentation on `ToolLoadMode` (`essential`|`discoverable`), replacing the custom-tool `xdev?: boolean` opt-out; custom, extension, MCP, RPC host, image-generation, and TTS tools now default to `discoverable`, and added a `satisfies` predicate to `SoftToolRequirement`.
- Removed the standalone `ssh` command tool and `ssh/ssh-executor` (the `ssh://` read/write/search protocol stays), and made `--tools` address hidden built-ins.
- Updated collab-web to render `xd://` dispatches and `hub` op families, dropped the `search_tool_bm25`/`ssh`/`report-finding` renderers, refreshed tool docs and prompts, and migrated the affected tests and changelogs.
2026-07-15 15:16:29 +02:00
can1357 f3a935c3d4 Merge PR #5511: fix(tui): anchor Kitty images through tmux (@roboomp) 2026-07-14 23:11:09 +02:00
roboomp d1bcd5812b fix(tui): anchored kitty images through tmux
- Wrapped every Kitty graphics APC for tmux passthrough, preserved quiet mode across chunks, and enabled placeholder placement when Kitty is explicitly forced.

- Routed Agent Hub transcript images through the shared image budget and terminal image setting.

Fixes #5381
2026-07-14 19:53:12 +00:00
roboomp b6b947bdbe fix(openai): rendered native response images
- Normalized completed image_generation_call results into assistant image blocks.
- Persisted image bytes through the session blob store and rendered them in live, replay, ACP, proxy, telemetry, and HTML paths.
- Added response normalization, persistence, and TUI rendering regressions.

Fixes #4768
2026-07-14 16:15:53 +00:00
roboomp 949ccaa245 fix(tui): preserved mixed assistant segment order
- Split mixed assistant text into per-tool segments instead of one post-tool tail.
- Insert each segment immediately after its preceding tool component across live and rebuilt transcripts.
- Extended the regression test to cover two tool calls with middle and final assistant text.

Fixes #4871
2026-07-11 06:30:34 +00:00
roboomp 411600aa28 fix(tui): displayed cursor final answers after tools
- Split mixed assistant messages so pre-tool text stays before tool panels while trailing text renders after the tool timeline.
- Applied the split to live streaming, transcript rebuilds, and file-backed transcript rendering.
- Added a focused EventController regression test for text/toolCall/text Cursor-shaped turns.

Fixes #4871
2026-07-11 06:01:53 +00:00
Tommaso Fontana 705a6118f6 feat(coding-agent): added timestamp to per-turn token-usage row
The token-usage row shown under assistant messages (display.showTokenUsage) now leads with the turn's local wall-clock time down to the second (YYYY-MM-DD HH:mm:ss), sourced from the assistant message's persisted timestamp so live, rebuilt, and restored transcripts all show the turn time rather than the view time.

createUsageRowBlock takes timestamp as an optional trailing argument, preserving its (usage, durationMs, ttftMs) public call contract on the package's ./modes/components/* export surface.
2026-07-10 10:32:41 +02:00
roboomp 177977856a fix(tui): kept token badges for billed empty turns
Replace the visible-anchor suppression with a billed-usage predicate so live and resume paths agree on rendering the badge whenever the turn actually consumed tokens. Only genuinely free turns (no input, output, cache, or premium requests) drop the row, so hidden automated turns keep cost transparency.

Fixes #4532
2026-07-04 16:58:50 +00:00
roboomp c5c95ecd12 fix(tui): suppressed empty assistant token badges
Suppress token-usage rows for assistant turns that have no visible text, tool call, or terminal error anchor. Share the same decision across live rendering and transcript rebuilds so resume matches live output.

Fixes #4532
2026-07-04 16:40:09 +00:00
can1357 10043a5990 feat(coding-agent): gated block lifecycle and state transitions
- Enforced strict history protection by gating ephemeral block removal on uncommitted state across controllers and UI components.
- Optimized settled-row calculations using explicit mermaid fence detection and improved scrollback integrity.
- Refactored transience management to target only actively streaming blocks, preventing redundant label rendering.
- Implemented persistent compaction for auto-retry errors and enabled consistent terminal title updates during session renaming.
2026-07-04 12:13:34 +02:00
can1357 6e2bba871e feat(agent): implemented automated retry recovery and transcript compaction
- Introduced an automated retry recovery system to track, manage, and persist recovered error states within agent sessions.
- Enabled compact transcript rendering for recovered auto-retry errors by removing heuristic commit machinery.
- Improved raw read tracking and provenance in the ReadTool to support refined file snapshot recording and hashline editing.
- Excluded recovered assistant messages from default model context and updated event controllers to handle retry recovery life cycles.
2026-07-04 11:22:04 +02:00
luk 62efd9ded6 feat(usage-row): use database icon for cache, add ttft + throughput display 2026-07-02 00:25:54 +01:00
roboomp bd6710bd02 fix(tui): deferred todo displacement to successful result
Dropped eager todo snapshot displacement from tool_execution_start, streaming message_update, and the rebuild assistant-iteration step. Displacement now runs only when the next todo's successful result lands, so a failed follow-up leaves the last-good todo panel on screen.

Added regression coverage for the failed follow-up case and updated the streamed-second-todo test to drive displacement from the success result.

Fixes #3516
2026-06-26 02:21:37 +00:00
roboomp ba3a6079be fix(tui): collapsed multi-todo rebuild snapshots
Resolved any tracked todo snapshot before storing a fresh one in the rebuild paths so an assistant message replaying multiple todo tool calls collapses to the final snapshot.

Added a renderSessionContext regression test for two todo tool calls in one rebuilt assistant message.

Fixes #3516
2026-06-26 02:17:12 +00:00
roboomp a2230b3dd0 fix(tui): collapsed repeated todo snapshots
Kept successful todo result blocks live until a later todo update replaces them or the turn ends.

Added regression coverage for same-turn todo snapshot replacement after intervening tool output.

Fixes #3516
2026-06-26 02:04:19 +00:00
roboomp 3bcbf1515d fix(tui): reduced large transcript stalls
Tail appended transcript JSONL instead of rebuilding rendered history on every poll, collapse compacted history for live chat rendering, and replace synchronous session rewrites so tailers detect historical changes.

Fixes #3258
2026-06-22 12:01:34 +00:00
can1357 93db34b0d5 refactor(coding-agent): consolidated editor state and unify transcript rendering
- Centralized draft state and image management by migrating fields from context to the CustomEditor component.
- Standardized transcript row construction by introducing shared helpers for background jobs, IRC traffic, and file mentions.
- Refactored redundant UI logic and helper functions into reusable utility modules to streamline message submission and component rendering.
- Standardized event handler types by consolidating lifecycle definitions into a shared module while maintaining public API stability.
2026-06-22 06:11:57 +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 a9c493db13 feat(coding-agent): added toggleable prompt cache miss markers
- Added `display.cacheMissMarker` setting to enable visual indicators for prompt cache invalidation in assistant messages.
- Included updated theme symbols to represent cache misses across supported icon sets.
- Configured the selector controller to rebuild the chat display when the marker visibility setting is toggled.
2026-06-19 07:54:32 +02:00
can1357 5e507b0165 feat(coding-agent): implemented detectCacheInvalidation to identify
- Implemented `detectCacheInvalidation` to identify when model requests lose their prompt cache.
- Added `CacheInvalidationMarkerComponent` to display a slim notice above affected assistant turns.
- Updated `ChatTranscriptBuilder` and `EventController` to track session usage and inject markers dynamically.
- Included comprehensive test coverage for invalidation detection logic and UI rendering.
2026-06-19 07:49:53 +02:00
can1357 64b81c3b8f feat(coding-agent): standardized message card styling
- Refreshed all injected message frames with a consistent rounded-outline card design.
- Implemented icon-tagged headers for hooks, local skill invocations, and generic custom messages.
- Updated skill invocation cards with home-shortened paths, dynamic line count units, and compact invocation argument display.
- Unified branch summary styling with compaction banners to provide a consistent visual language for history collapse points.
- Removed leaked absolute home directory paths from skill metadata displays.
2026-06-19 07:41:23 +02:00
can1357 b33a4b80df fix(coding-agent): aligned transcript viewer body with header
- Fixed an alignment issue where the transcript body was incorrectly offset by an extra gutter column relative to the "Agent Hub" title.
- Updated the transcript renderer to omit the redundant outer gutter and ensure file-mention rows include the standard 1-column left pad.
- Added regression tests to verify consistent gutter alignment and correct scroll behavior.
2026-06-19 04:29:49 +02:00
can1357 280492a605 feat(coding-agent): migrated agent transcripts to fullscreen overlay
- Replaced inline chat view with a dedicated fullscreen `AgentTranscriptViewer` overlay.
- Introduced `ChatTranscriptBuilder` to enable non-incremental, full-history transcript rendering.
- Implemented robust state management for thinking blocks, message history, and transcript disposal.
- Added support for auto-reloading local session files and sync for remote transcript data.
2026-06-19 04:13:10 +02:00