Commit Graph

514 Commits

Author SHA1 Message Date
Alex Jaden 070ff41f4c fix(coding-agent): sync WezTerm theme changes on macOS
(cherry picked from commit fa70be267daa6f98cf18e2f257041f4e6e68a61d)
2026-07-29 23:08:34 +02:00
can1357 ac6cd57bd4 Merge PR #6820: fix(coding-agent): preserve parent todos in vibe mode (@Iron-Ham) 2026-07-28 10:59:37 +02:00
can1357 169a1b81c7 feat(coding-agent/goals): replaced guided goal modal workflow with interview brief
- Reworked the `/guided-goal` command to send a hidden interview brief instead of a modal popup flow.
- Removed the deprecated `guided-setup.ts` module and system prompt template.
- Updated goal tool availability and activation logic to support goal creation during the interview.
- Replaced existing tests and added new verification for the updated guided-goal workflow.
2026-07-28 08:55:49 +02:00
Hesham Salman 7f7e742db6 fix(coding-agent): preserve parent todos in vibe mode 2026-07-27 13:52:25 -04:00
can1357 0a83d9f364 Merge PR #6570: fix(plan-mode): prefer newest draft during review (@roboomp) 2026-07-26 15:41:30 +02:00
roboomp bac71f4654 fix(coding-agent): stopped blocked vibe reset loops
Disable reset-mode loops when vibe mode prevents the required session transition, so the prompt is not resubmitted into the unchanged session.

Added focused regression coverage for the blocked transition.

Fixes #6607
2026-07-25 12:05:54 +00:00
roboomp c8ef3cc8ff fix(coding-agent): handled vibe session commands safely
Blocked interactive session transitions before they reach the AgentSession vibe guard, preserving the active session and rendering the existing exit-vibe warning instead of rejecting the input callback.

Added regression coverage for new, drop, fork, and move transitions.

Fixes #6607
2026-07-25 11:57:53 +00:00
roboomp 28068f53d3 fix(plan-mode): promoted reviewed plan path into state before refine
handlePlanApproval and the ACP rejection path selected a resolved draft that could differ from PlanModeState.planFilePath but never updated the state, so a refine turn was rebuilt by #buildPlanModeMessage() from the stale path. Both paths now promote the reviewed path into plan-mode state.

Fixes #6569
2026-07-25 01:51:52 +00:00
can1357 3c80e6f9cd fix(coding-agent): expose live tool rebuild options 2026-07-24 16:29:27 +02:00
can1357 68e76c6243 fix(coding-agent): preserve shared live tools across rebuilds 2026-07-24 16:26:59 +02:00
roboomp 484fa319eb fix(coding-agent): keep running async task handles during rebuild dedup
The rebuild dedup dropped any preserved pendingTools component whose toolCallId
had a persisted toolResult. A background task's initial async.state=="running"
result is persisted while EventController#handleToolExecutionEnd deliberately
keeps its component in pendingTools so a later tool_execution_update/_end can
settle it. Dropping that still-live handle stranded those updates on the running
snapshot. Only terminal results are now owned by the replay; running async
handles stay preserved. Added a regression covering the running-task case.
2026-07-24 13:53:43 +00:00
roboomp 759e551e8c fix(coding-agent): dropped resolved tools from mid-stream rebuild preservation
rebuildChatFromMessages preserves the live pendingTools components across its
clear+replay so streaming keeps routing into them. That preservation assumed
every pending-tool component was still dangling (its result outside
state.messages). Once a tool's result had landed in the session entries while
its component still lingered in pendingTools (a rebuild racing the
tool-completion event, or a background/displaceable snapshot), the replay
reconstructed the completed block from the persisted toolResult AND the
preserved live component was re-appended, so the same tool block rendered twice.

Resolved tool calls are now dropped from the preserved live set and owned by the
replay; only genuinely in-flight (dangling, replay-stripped) calls are preserved.

Fixes #6516
2026-07-24 13:40:57 +00:00
can1357 af9e8546a9 feat: implemented session account selection and pinning via slash command
- Add `pinSessionOAuthAccount` storage method and active account flag to the auth storage API.
- Introduce session account selector component, controller logic, and interactive mode delegation.
- Implement the `/session pin` builtin slash command with text listing and account pinning capabilities.
- Add unit tests covering session account selection, component navigation, and command handling.
2026-07-24 07:57:55 +02:00
can1357 189a3b51f0 fix: defer tiny-title prewarm past the scheduled first paint
requestRender(true) only queues the paint via setImmediate; calling
prewarm() synchronously afterwards put the worker spawn syscall ahead
of the render callback in the same loop turn. Schedule the prewarm
with its own setImmediate (FIFO after the render callback) so the
first startup frame paints before the subprocess spawns.
2026-07-24 06:51:37 +02:00
roboomp 3cdb93cd01 fix(tui): prewarm tiny-title worker off the first-submit hot path
The first interactive submit fired session.generateTitle() before
startPendingSubmission() painted the optimistic user row, and
tinyTitleClient.generate() spawned the local tiny-title subprocess
synchronously in #ensureWorker() before its first await. With a local
providers.tinyModel configured, subprocess-spawn latency therefore landed
ahead of the first frame, stalling the first prompt.

Paint the pending row before starting titling, and prewarm an idle,
unref'd worker at TUI startup via a no-op ping (no model load) so the
first submit reuses a live subprocess.

Fixes #6462
2026-07-24 03:48:43 +00:00
can1357 32f79dbb48 Merge PR #6444: fix(plan): preserve and line-anchor review annotations (@anatoli-tsinovoy) 2026-07-24 02:24:05 +02:00
can1357 3d64910bb0 feat(coding-agent/live): added realtime voice interaction with Codex Live sessions (experimental)
- Added `src/live/` subsystem with WebRTC transport, protocol parser, session controller, and headless Chromium audio injection.
- Added `LiveVisualizer` component with phase states, transcript display, and animated waveform rendering.
- Added `/live` slash command and `LiveCommandController` to toggle live voice sessions.
- Suppressed local TTS via `vocalizer.suspend()` during live mode to prevent audio conflicts.
- Added live-instructions and agent-final-message prompts for agent messaging context.
- Added `protocol.test.ts` covering event parsing, chunking, and context message construction.
2026-07-24 02:20:43 +02:00
Anatoli Tsinovoy ead98c7f12 fix(plan): preserve review annotations 2026-07-24 00:52:31 +03:00
can1357 5d66eb7f2a Merge PR #5464: fix(coding-agent): persist vibe sessions across restarts (@roboomp) 2026-07-23 18:06:11 +02:00
can1357 08be77c483 fix: repaired mis-applied conflict resolutions from title-state merge 2026-07-23 17:34:13 +02:00
can1357 154d4ace9f Merge PR #4448: feat(todo): add blocked status with block/unblock ops (@mattwilkinsonn)
# Conflicts:
#	packages/coding-agent/src/modes/interactive-mode.ts
#	packages/coding-agent/src/prompts/tools/todo.md
2026-07-23 17:32:43 +02:00
can1357 8490654df3 refactor(coding-agent): expressed run state via the title separator instead of prefix glyphs
Kept the bare 'π' brand per owner direction: the separator between the
brand and the session label now carries the state — '>' when it's the
user's turn (idle), animated spinner frames while working, '!' when the
agent is blocked on the user. Disabled ('tui.titleState' off) renders the
pre-state 'π: label' layout. Updated the state/runtime tests to the new
contract.
2026-07-23 17:31:30 +02:00
can1357 0dac3d45b5 Merge PR #4451: feat(coding-agent): reflect agent run state in terminal title (@mattwilkinsonn)
# Conflicts:
#	packages/coding-agent/src/modes/controllers/event-controller.ts
#	packages/coding-agent/src/modes/interactive-mode.ts
2026-07-23 17:31:30 +02:00
slee1996 2145ab8f8e fix(coding-agent): retry MCP tool auth challenges 2026-07-22 23:44:38 -06:00
can1357 741aaa301d Merge PR #5895: feat(tui): allow re-answering a past ask from the session tree (@Mathews-Tom) 2026-07-22 21:13:23 +02:00
can1357 2393f3fd1e Merge PR #6217: fix(tui): surface provider errors above plan review (@roboomp) 2026-07-22 21:13:17 +02:00
can1357 e7f3fde12b fix(tui): prune settled-component cache to rendered messages on rebuild
Session entries keep AgentMessage objects strongly reachable for the whole
session, so WeakMap entries for compacted-away history pinned their
components' rendered layout caches forever. Rebuild now retains only
components for messages the new transcript context actually renders.
2026-07-22 21:13:17 +02:00
can1357 e1173b8aeb Merge PR #6199: fix(tui): reuse settled components after compaction (@roboomp) 2026-07-22 21:13:17 +02:00
roboomp 1cf4831c9c fix(tui): surfaced provider errors above plan review
- Dismissed the fullscreen plan review and settled its pending choice when a turn-ending provider error is pinned.
- Added regression coverage for restored editor focus and visible error presentation.

Fixes #6086
2026-07-21 21:09:17 +00:00
roboomp 13039b7bdf fix(tui): reused settled components after compaction
Preserved settled user and assistant component instances during compaction-only transcript rebuilds so warmed Markdown and layout caches remain valid.

Covered both manual and automatic compaction paths with focused regression tests.

Fixes #6033
2026-07-21 20:25:35 +00:00
Mathews-Tom d7f6ce5e04 Merge remote-tracking branch 'upstream/main' into feat/tree-ask-reanswer 2026-07-21 19:25:33 +05:30
can1357 d8e137abdd Merge PR #6079: fix(status-line): aggregate vibe worker tok/s into the status-line badge (@oldschoola) 2026-07-20 22:50:06 +02:00
can1357 29f25f537e Merge PR #6020: fix(coding-agent): enable plan mode for print prompts (@roboomp) 2026-07-20 22:50:04 +02:00
can1357 936fdbe4a7 Merge PR #6013: fix(coding-agent): preserve plan exit rollback state (@any-victor) 2026-07-20 22:50:03 +02:00
oldschoola 4a065e3d89 fix(status-line): aggregate vibe worker tok/s into the status-line badge
In /vibe mode the director is often idle while workers stream, so the
status-line tok/s badge showed a stale/zero rate even while parallel
workers were actively generating tokens. The badge now aggregates the
main session's live tok/s with every live vibe worker's tok/s, and
falls back to the main session's own cached rate when no workers are
streaming.

- Extract calculateTokensPerSecond to utils/token-rate.ts (neutral
  location) so vibe/runtime.ts can depend on it without the render
  layer depending on the heavy vibe/task graph.
- Add aggregateVibeWorkerTokensPerSecond to vibe/runtime.ts: sums
  each live worker's rate via the shared calculator, returns null
  when no workers are streaming so the main rate shines through.
- StatusLineComponent takes the aggregator via an injected
  setVibeWorkerTokenRateProvider callback (wired in interactive-mode)
  keeping the render layer off the vibe/task dependency graph.
- #getTokensPerSecond splits into #getMainSessionTokensPerSecond
  (preserves the sticky per-assistant-message cache) plus the
  worker-aggregation path, so the director-idle case no longer
  short-circuits to null.
2026-07-19 13:03:38 -07:00
Victor Araújo 7f10e13bbe fix(coding-agent): preserve plan tool presentation 2026-07-19 14:45:41 -03:00
Victor Araújo 8a8ff498b3 fix(coding-agent): preserve plan exit rollback state 2026-07-19 14:45:41 -03:00
Mathews-Tom ab1d7db7d1 Merge remote-tracking branch 'upstream/main' into feat/tree-ask-reanswer
# Conflicts:
#	packages/coding-agent/src/modes/controllers/selector-controller.ts
2026-07-19 15:02:33 +05:30
roboomp 3f67489a9f fix(coding-agent): preserved model on plan resume
Plan-mode reconciliation now keeps the model restored from the session journal instead of reapplying the current plan role.

Fixes #6015
2026-07-18 22:07:22 +00:00
roboomp c4053918fe fix(coding-agent): handled headless plan proposals
Installed the normal plan proposal handler in print mode, persisted the resolved plan artifact, and silently stopped the completed planning turn for later review.

Shared plan proposal validation with interactive mode and added regression coverage.

Fixes #6017
2026-07-18 21:46:03 +00:00
can1357 69ce192c0b Merge PR #5832: fix(coding-agent): show loop state in status line (@wolfiesch) 2026-07-18 20:12:46 +02:00
can1357 5570aaaa05 Merge PR #5940: fix(tui): scope stable-focus keystroke renders (@roboomp) 2026-07-18 19:57:43 +02:00
roboomp 3eca0813bb fix(tui): preserved callback-driven full renders
Kept full-root rendering as the default after input and introduced an explicit host opt-in for stable-focus subtree repainting. The coding-agent default composer opts in, while extension-provided editors and other TUI consumers retain callback-safe full composition.
2026-07-18 00:20:15 +00:00
roboomp 10ec14d94d fix(coding-agent): parallelized session teardown
Bounded aborted post-prompt drains and ran independent subsystem cleanup under one barrier while preserving writers-before-close ordering.

Kept long interactive shutdowns visible with a delayed status refresh.

Fixes #5932
2026-07-18 00:19:14 +00:00
Wolfgang Schoenberger 1d681d9eeb fix(coding-agent): show loop state in status line 2026-07-17 13:19:55 -07:00
Mathews-Tom 8ae0625bae Merge remote-tracking branch 'upstream/main' into feat/tree-ask-reanswer 2026-07-18 01:17:40 +05:30
roboomp 939d6761f7 fix(tui): shared walking-viewport policy for collapsed todos
The first pass anchored a slice on the active task, which still showed completed rows, kept the active item mid-window, and gave the two views divergent selection logic. Per reviewer, replace it with one shared policy both collapsed views run.

selectCollapsedTodos (todo.ts) omits completed/abandoned, pulls every active task (in_progress or subagent-matched pending) to the head in todo order, fills remaining rows with following pending tasks, and emits '… N more active todos' when active work alone exceeds the cap; it falls back to closed tasks for a settled phase so HUD persistence still renders. renderTreeList gains a trailingSummary primitive so item selection lives in the todo domain. The transient tool result reaches live subagent matches via setActiveTodoDescriptionsProvider, wired from interactive mode's observer registry, so both views share the active set.

Fixes #5873
2026-07-17 18:03:13 +00:00
Mathews-Tom fcbcf73769 feat(tui): allow re-answering a past ask from the session tree
Selecting an ask toolResult in /tree previously just repositioned the
leaf onto the stale answer without re-running the interactive picker
(issue #5642). navigateTree() now detects an ask toolResult target and
returns { reopenAsk: { toolCallId, questions } } recovered from the
original toolCall's persisted arguments, instead of mutating anything.
The TUI's tree selector re-opens the ask picker via a standalone
AskTool.execute() call (reusing the live tool-execution UI context),
then calls navigateTree() again with { reanswerAskResult } to branch a
*new* sibling toolResult off the same ask toolCall -- the original
answer's branch stays fully reachable. Non-ask toolResults, and ask
toolResults whose original arguments can't be recovered (legacy/
corrupted sessions), keep the existing plain leaf-move behavior.

This implements direction 2 from the issue's maintainer triage
(re-answer as a new sibling branch), not direction 1 (resuming the
agent turn) or direction 3 (docs-only).
2026-07-17 23:29:35 +05:30
roboomp e6fd29ec21 fix(tui): keep active todo visible in collapsed views
Both collapsed todo renderers took fixed edge slices: the tool result kept the tail eight (truncateFrom start) and the HUD kept the head five (base.slice), so a mid-phase in_progress task fell in the omitted middle of both.

Add an anchorIndex option to renderTreeList that slides the collapsed window over the anchored item with two-sided '… N more' summaries, and anchor both call sites on the in_progress task (HUD falls back to the first subagent-matched pending task).

Fixes #5873
2026-07-17 16:33:28 +00:00
can1357 8bdb69254b merge PR #5596 via eval/pr-5596: feat(coding-agent): support per-project model roles
Combined #5586's role-tag precedence with #5596's scope labels in the
selector status messages.
2026-07-17 05:23:49 +02:00