@namzu/cli 17.0.0 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +28 -10
  2. package/dist/integrations/subagents/activity.d.ts +8 -0
  3. package/dist/integrations/subagents/activity.d.ts.map +1 -1
  4. package/dist/integrations/subagents/activity.js +38 -2
  5. package/dist/integrations/subagents/activity.js.map +1 -1
  6. package/dist/integrations/subagents/policy.d.ts +6 -0
  7. package/dist/integrations/subagents/policy.d.ts.map +1 -0
  8. package/dist/integrations/subagents/policy.js +6 -0
  9. package/dist/integrations/subagents/policy.js.map +1 -0
  10. package/dist/integrations/subagents/runtime.d.ts.map +1 -1
  11. package/dist/integrations/subagents/runtime.js +6 -2
  12. package/dist/integrations/subagents/runtime.js.map +1 -1
  13. package/dist/tui/AgentExplorer.d.ts +21 -0
  14. package/dist/tui/AgentExplorer.d.ts.map +1 -1
  15. package/dist/tui/AgentExplorer.js +52 -1
  16. package/dist/tui/AgentExplorer.js.map +1 -1
  17. package/dist/tui/App.d.ts.map +1 -1
  18. package/dist/tui/App.js +84 -31
  19. package/dist/tui/App.js.map +1 -1
  20. package/dist/tui/Composer.d.ts +3 -1
  21. package/dist/tui/Composer.d.ts.map +1 -1
  22. package/dist/tui/Composer.js +6 -2
  23. package/dist/tui/Composer.js.map +1 -1
  24. package/dist/tui/LiveActivity.js +1 -1
  25. package/dist/tui/PermissionOverlay.d.ts.map +1 -1
  26. package/dist/tui/PermissionOverlay.js +4 -2
  27. package/dist/tui/PermissionOverlay.js.map +1 -1
  28. package/dist/tui/agent.d.ts +4 -0
  29. package/dist/tui/agent.d.ts.map +1 -1
  30. package/dist/tui/agent.js +6 -2
  31. package/dist/tui/agent.js.map +1 -1
  32. package/dist/tui/permission-review.d.ts.map +1 -1
  33. package/dist/tui/permission-review.js +47 -10
  34. package/dist/tui/permission-review.js.map +1 -1
  35. package/dist/tui/slashCommands.d.ts +2 -0
  36. package/dist/tui/slashCommands.d.ts.map +1 -1
  37. package/dist/tui/slashCommands.js +6 -3
  38. package/dist/tui/slashCommands.js.map +1 -1
  39. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAON,KAAK,OAAO,EAiBZ,MAAM,YAAY,CAAA;AA+GnB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AA2CvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAU/D,MAAM,WAAW,QAAQ;IACxB,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAA;IACxB,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAA;IAC1D,0EAA0E;IAC1E,QAAQ,CAAC,cAAc,CAAC,EAAE,qBAAqB,CAAA;CAC/C;AAOD,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC5B,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAuKrB,6EAA6E;AAC7E,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,MAAM,EAAE,CAM7F;AAED,sEAAsE;AACtE,wBAAgB,mBAAmB,CAClC,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,MAAM,EAAE,MAAM,MAAM,EACpB,iBAAiB,GAAE,SAAS,MAAM,EAAO,GACvC,SAAS,iBAAiB,EAAE,CAuE9B;AA8GD,wBAAgB,GAAG,CAAC,EACnB,GAAG,EAAE,UAAU,EACf,aAAa,EACb,cAAsC,GACtC,EAAE,QAAQ,2CAinKV"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/tui/App.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAON,KAAK,OAAO,EAiBZ,MAAM,YAAY,CAAA;AAiHnB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AA2CvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAU/D,MAAM,WAAW,QAAQ;IACxB,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAA;IACxB,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAA;IAC1D,0EAA0E;IAC1E,QAAQ,CAAC,cAAc,CAAC,EAAE,qBAAqB,CAAA;CAC/C;AAOD,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAC5B,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;AAuKrB,6EAA6E;AAC7E,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,MAAM,EAAE,CAM7F;AAED,sEAAsE;AACtE,wBAAgB,mBAAmB,CAClC,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,MAAM,EAAE,MAAM,MAAM,EACpB,iBAAiB,GAAE,SAAS,MAAM,EAAO,GACvC,SAAS,iBAAiB,EAAE,CAuE9B;AA+GD,wBAAgB,GAAG,CAAC,EACnB,GAAG,EAAE,UAAU,EACf,aAAa,EACb,cAAsC,GACtC,EAAE,QAAQ,2CAwrKV"}
package/dist/tui/App.js CHANGED
@@ -28,7 +28,7 @@ import { checkUpdates } from '../integrations/updates.js';
28
28
  import { appendMemory, composeMemoryPrompt, readMemory } from '../memory/store.js';
29
29
  import { composeSkillsPrompt, discoverSkills, loadSkillBody } from '../skills/store.js';
30
30
  import { discoverUserCommands } from '../user-commands/store.js';
31
- import { AgentCockpit, AgentTranscript, agentCockpitIsWide, agentPickerPageSize, agentPhasePageSize, agentPhases, agentTranscriptPageSize, maxAgentTranscriptTailOffset, } from './AgentExplorer.js';
31
+ import { AgentCockpit, AgentTaskPanel, AgentTranscript, activeSubagentCohorts, agentCockpitIsWide, agentPhasePageSize, agentPhases, agentPickerPageSize, agentTranscriptPageSize, maxAgentTranscriptTailOffset, } from './AgentExplorer.js';
32
32
  import { ChoicePicker } from './ChoicePicker.js';
33
33
  import { Composer, suggestionWindowSize, } from './Composer.js';
34
34
  import { CopyPicker } from './CopyPicker.js';
@@ -462,9 +462,16 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
462
462
  subagentsRef.current = next;
463
463
  setSubagentsState(next);
464
464
  const surface = agentSurfaceRef.current;
465
- if (!surface || next.some((agent) => agent.viewId === surface.selectedId))
465
+ if (!surface)
466
466
  return;
467
- const phases = agentPhases(next);
467
+ const activeCohorts = activeSubagentCohorts(next);
468
+ if (activeCohorts.length === 0) {
469
+ setAgentSurface(null);
470
+ return;
471
+ }
472
+ if (activeCohorts.some((agent) => agent.viewId === surface.selectedId))
473
+ return;
474
+ const phases = agentPhases(activeCohorts);
468
475
  const fallbackPhase = phases.find((phase) => phase.id === surface.selectedPhaseId) ?? phases[0];
469
476
  const fallbackAgent = fallbackPhase?.agents[0];
470
477
  if (!fallbackPhase || !fallbackAgent) {
@@ -478,6 +485,20 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
478
485
  focus: surface.kind === 'cockpit' ? surface.focus : surface.returnFocus,
479
486
  });
480
487
  }, [setAgentSurface]);
488
+ const openAgentCockpit = useCallback(() => {
489
+ const agents = activeSubagentCohorts(subagentsRef.current);
490
+ const firstPhase = agentPhases(agents)[0];
491
+ const firstAgent = firstPhase?.agents[0];
492
+ if (!firstPhase || !firstAgent)
493
+ return false;
494
+ setAgentSurface({
495
+ kind: 'cockpit',
496
+ selectedPhaseId: firstPhase.id,
497
+ selectedId: firstAgent.viewId,
498
+ focus: 'agents',
499
+ });
500
+ return true;
501
+ }, [setAgentSurface]);
481
502
  /** One git-backed review choice may be resolving while its visible picker remains authoritative. */
482
503
  const reviewChoiceInFlightRef = useRef(null);
483
504
  const exitArmedRef = useRef(false);
@@ -1937,8 +1958,16 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
1937
1958
  setPermissionReviewOffset(0);
1938
1959
  setPermissionDetailsOpen(false);
1939
1960
  setPermission(null);
1940
- if (resolve)
1961
+ if (resolve) {
1962
+ // The provider resumes asynchronously after the decision. Leaving the
1963
+ // old state in place during that hand-off painted an empty `…` row and
1964
+ // the now-invalid approval footer, so a four-agent batch looked frozen
1965
+ // precisely while its children were starting. The turn is working from
1966
+ // the instant consent resolves; the next tool event will refine this to
1967
+ // `tool`, and the ordinary turn finalizer owns the transition to idle.
1968
+ setState('thinking');
1941
1969
  resolve(decision);
1970
+ }
1942
1971
  }, [setPermissionDetailsOpen, setPermissionReviewOffset]);
1943
1972
  /**
1944
1973
  * Stop the running turn, and hand the screen back in a usable state.
@@ -2480,6 +2509,7 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
2480
2509
  setState('tool');
2481
2510
  const tool = {
2482
2511
  id: event.toolUseId,
2512
+ ...(event.runId ? { runId: event.runId } : {}),
2483
2513
  toolName: event.toolName,
2484
2514
  label: formatToolCall(event.toolName, event.summary, event.standalone),
2485
2515
  startedAt: Date.now(),
@@ -2491,7 +2521,8 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
2491
2521
  }
2492
2522
  case 'tool-progress': {
2493
2523
  const running = activeToolsRef.current;
2494
- const index = running.findIndex((tool) => tool.id === event.toolUseId);
2524
+ const index = running.findIndex((tool) => tool.id === event.toolUseId &&
2525
+ (event.runId === undefined || tool.runId === event.runId));
2495
2526
  // A terminal event may already have removed this call. Never recreate
2496
2527
  // a live row from late diagnostic state.
2497
2528
  if (index < 0)
@@ -2517,12 +2548,25 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
2517
2548
  // active tool" — under parallel calls that mis-attributes a
2518
2549
  // result to the wrong call. If no id matches, render the
2519
2550
  // completion on its own (label from the end event itself).
2520
- const i = running.findIndex((t) => t.id === event.toolUseId);
2551
+ const i = running.findIndex((tool) => tool.id === event.toolUseId &&
2552
+ (event.runId === undefined || tool.runId === event.runId));
2521
2553
  const done = i >= 0 ? running[i] : undefined;
2522
2554
  if (i >= 0) {
2523
2555
  activeToolsRef.current = [...running.slice(0, i), ...running.slice(i + 1)];
2524
2556
  setActiveTools(activeToolsRef.current);
2525
2557
  }
2558
+ const representedSuccessfulAgent = !event.isError &&
2559
+ event.toolName.toLowerCase() === 'agent' &&
2560
+ subagentsRef.current.some((agent) => agent.toolUseId === event.toolUseId &&
2561
+ (event.runId === undefined || agent.workflowId === event.runId));
2562
+ if (representedSuccessfulAgent) {
2563
+ // The automatic panel already owned this successful child from
2564
+ // start through settlement. Re-emitting its internal Agent call as
2565
+ // a transcript tool row after the panel closes is duplicate protocol,
2566
+ // not useful history. Failures remain durable transcript rows.
2567
+ setState(activeToolsRef.current.length > 0 ? 'tool' : 'thinking');
2568
+ break;
2569
+ }
2526
2570
  pushMessage('tool', done?.label ?? formatToolCall(event.toolName, event.summary), false, event.isError ? '✗' : '✓', done?.detail, event.isError ? theme.status.error : theme.status.ok, event.durationMs !== undefined
2527
2571
  ? formatElapsed(event.durationMs)
2528
2572
  : done
@@ -3078,21 +3122,9 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
3078
3122
  return;
3079
3123
  }
3080
3124
  case 'agent-cockpit': {
3081
- const agents = subagentsRef.current;
3082
- if (agents.length === 0) {
3083
- pushMessage('system', 'No delegated agents are available in this conversation yet. When an Agent tool starts one, /agent opens its live activity and retained transcript.');
3084
- return;
3125
+ if (!openAgentCockpit()) {
3126
+ pushMessage('system', 'No delegated agents are active. When an Agent tool starts one, its live activity appears below the composer and this view can inspect it.');
3085
3127
  }
3086
- const firstPhase = agentPhases(agents)[0];
3087
- const firstAgent = firstPhase?.agents[0];
3088
- if (!firstPhase || !firstAgent)
3089
- return;
3090
- setAgentSurface({
3091
- kind: 'cockpit',
3092
- selectedPhaseId: firstPhase.id,
3093
- selectedId: firstAgent.viewId,
3094
- focus: 'agents',
3095
- });
3096
3128
  return;
3097
3129
  }
3098
3130
  case 'clear-screen':
@@ -3755,6 +3787,7 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
3755
3787
  exitWithSummary,
3756
3788
  hasUnsettledTurn,
3757
3789
  nextId,
3790
+ openAgentCockpit,
3758
3791
  pushMessage,
3759
3792
  rawOutput,
3760
3793
  removeStoredCredential,
@@ -4226,6 +4259,18 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
4226
4259
  resolvePermission({ kind: 'approve-all' });
4227
4260
  return;
4228
4261
  }
4262
+ // The active child count already advertises this key beside Working.
4263
+ // Open the same retained cockpit as `/agent`; Enter then drills into a
4264
+ // child's transcript. Keep the shortcut below consent so it can never
4265
+ // hide an approval that owns the keyboard.
4266
+ if (key.ctrl && input === 't') {
4267
+ if (agentSurfaceRef.current) {
4268
+ setAgentSurface(null);
4269
+ return;
4270
+ }
4271
+ if (openAgentCockpit())
4272
+ return;
4273
+ }
4229
4274
  // Child observation owns navigation, but never outranks consent: the
4230
4275
  // permission branch above preempts it if a child or parent call asks.
4231
4276
  const agentView = agentSurfaceRef.current;
@@ -4234,7 +4279,7 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
4234
4279
  // highlighted child before the list has appeared on screen.
4235
4280
  if (agentSurfaceCommittedRef.current !== agentView)
4236
4281
  return;
4237
- const agents = subagentsRef.current;
4282
+ const agents = activeSubagentCohorts(subagentsRef.current);
4238
4283
  if (agentView.kind === 'cockpit') {
4239
4284
  const phases = agentPhases(agents);
4240
4285
  const phaseIndex = Math.max(0, phases.findIndex((phase) => phase.id === agentView.selectedPhaseId));
@@ -4516,9 +4561,21 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
4516
4561
  // Background is left natural — we inherit the terminal's own background
4517
4562
  // and only theme the foreground. Forcing
4518
4563
  // a filled bg left mismatched patches around bordered areas, so we don't.
4519
- const liveSubagentCount = subagents.filter((agent) => agent.status === 'starting' || agent.status === 'working').length;
4564
+ const liveSubagents = activeSubagentCohorts(subagents);
4565
+ const representedSubagentTools = new Set(subagents
4566
+ .filter((agent) => agent.toolUseId !== undefined)
4567
+ .map((agent) => JSON.stringify([agent.workflowId, agent.toolUseId])));
4568
+ const representedUnscopedSubagentToolUseIds = new Set(subagents.map((agent) => agent.toolUseId).filter((id) => id !== undefined));
4569
+ // Keep the exact parent Agent row suppressed through the child-settled →
4570
+ // tool-end hand-off. The monitor publishes terminal state synchronously,
4571
+ // while the provider event that removes the generic tool row arrives on the
4572
+ // next tick; filtering only live children made that raw row flash back.
4573
+ const visibleActiveTools = activeTools.filter((tool) => tool.toolName.toLowerCase() !== 'agent' ||
4574
+ !(tool.runId
4575
+ ? representedSubagentTools.has(JSON.stringify([tool.runId, tool.id]))
4576
+ : representedUnscopedSubagentToolUseIds.has(tool.id)));
4520
4577
  const selectedSubagent = agentSurface
4521
- ? subagents.find((agent) => agent.viewId === agentSurface.selectedId)
4578
+ ? liveSubagents.find((agent) => agent.viewId === agentSurface.selectedId)
4522
4579
  : undefined;
4523
4580
  const lifecycleOwnsViewport = phase === 'trust' ||
4524
4581
  phase === 'resume' ||
@@ -4563,16 +4620,13 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
4563
4620
  : goalStatus && phase === 'ready' && state === 'idle'
4564
4621
  ? undefined
4565
4622
  : hintForPhase(phase, state, session?.hasProvider === true, composerHasDraft);
4566
- return (_jsx(Box, { flexDirection: "column", display: externalEditorRequest ? 'none' : 'flex', children: _jsxs(Box, { flexDirection: "column", paddingX: 1, children: [transcriptOwned || !lifecycleOwnsViewport ? (_jsx(TranscriptFrame, { children: _jsx(Transcript, { messages: finalized, pending: messages.find((m) => m.pending) ?? null, state: state, settled: renderedSettled, resetKey: resetKey, raw: rawOutput, hyperlinks: hyperlinks, showLive: !lifecycleOwnsViewport, header: transcriptOwned ? (_jsx(Banner, { version: ctx.version, session: session, permissionMode: permissionMode, cwd: ctx.cwd })) : undefined }) })) : null, phase === 'trust' ? (_jsx(TrustPrompt, { cwd: ctx.cwd })) : phase === 'resume' ? (_jsx(ResumePicker, { conversations: resumeList, selected: selectedResume })) : phase === 'edit' ? (_jsx(EditPromptPicker, { prompts: editList, selected: selectedEdit })) : phase === 'picker' ? (_jsx(Picker, { detected: pickerDetected ?? detected, currentProvider: currentProvider, selectionKind: pickerSelectionKind, currentModel: session?.modelSummary ?? null, initialView: pickerInitialView, onSubmit: handlePickerSubmit, onCancel: handlePickerCancel, onCredential: handleTypedCredential, onLogin: startLoginFromPicker, onLoginComplete: finishLoginFromPicker, keyEntryFor: keyEntryFor, notice: pickerNotice })) : (_jsxs(_Fragment, { children: [agentSurface === null ? (_jsx(LiveActivity, { activeTools: activeTools, working: state === 'thinking' || state === 'tool', agentCount: liveSubagentCount, interruptible: abortRef.current !== null, animate: stdout.isTTY === true })) : null, permission ? (_jsx(PermissionOverlay, { toolCalls: permission.toolCalls, review: permission.review, summary: permission.summary, detailsOpen: permissionDetailsOpen, reviewOffset: permissionReviewOffset, columns: terminal.columns })) : null, permission === null && agentSurface?.kind === 'cockpit' ? (_jsx(AgentCockpit, { agents: subagents, selectedPhaseId: agentSurface.selectedPhaseId, selectedId: agentSurface.selectedId, focus: agentSurface.focus, terminalRows: terminal.rows, terminalColumns: terminal.columns })) : permission === null && agentSurface?.kind === 'transcript' && selectedSubagent ? (_jsx(AgentTranscript, { agent: selectedSubagent, tailOffset: agentSurface.tailOffset, terminalRows: terminal.rows, terminalColumns: terminal.columns })) : null, textPrompt ? (_jsx(TextPrompt, { title: textPrompt.title, placeholder: textPrompt.placeholder, initialValue: textPrompt.initialValue, emptyNotice: textPrompt.emptyNotice, hidden: permission !== null || agentSurface !== null, onSubmit: submitTextPrompt, onCancel: cancelTextPrompt }, textPrompt.token)) : permission === null && agentSurface === null && choicePicker ? (_jsx(ChoicePicker, { title: choicePicker.title, notice: choicePicker.notice, options: choicePicker.options, selected: selectedChoice, windowSize: choicePicker.kind === 'command' ? choicePicker.windowSize : undefined })) : permission === null && agentSurface === null && copyPicker ? (_jsx(CopyPicker, { targets: copyPicker.targets, selected: selectedCopy })) : null, _jsxs(ComposerFrame, { focus: state === 'idle' &&
4623
+ return (_jsx(Box, { flexDirection: "column", display: externalEditorRequest ? 'none' : 'flex', children: _jsxs(Box, { flexDirection: "column", paddingX: 1, children: [transcriptOwned || !lifecycleOwnsViewport ? (_jsx(TranscriptFrame, { children: _jsx(Transcript, { messages: finalized, pending: messages.find((m) => m.pending) ?? null, state: state, settled: renderedSettled, resetKey: resetKey, raw: rawOutput, hyperlinks: hyperlinks, showLive: !lifecycleOwnsViewport, header: transcriptOwned ? (_jsx(Banner, { version: ctx.version, session: session, permissionMode: permissionMode, cwd: ctx.cwd })) : undefined }) })) : null, phase === 'trust' ? (_jsx(TrustPrompt, { cwd: ctx.cwd })) : phase === 'resume' ? (_jsx(ResumePicker, { conversations: resumeList, selected: selectedResume })) : phase === 'edit' ? (_jsx(EditPromptPicker, { prompts: editList, selected: selectedEdit })) : phase === 'picker' ? (_jsx(Picker, { detected: pickerDetected ?? detected, currentProvider: currentProvider, selectionKind: pickerSelectionKind, currentModel: session?.modelSummary ?? null, initialView: pickerInitialView, onSubmit: handlePickerSubmit, onCancel: handlePickerCancel, onCredential: handleTypedCredential, onLogin: startLoginFromPicker, onLoginComplete: finishLoginFromPicker, keyEntryFor: keyEntryFor, notice: pickerNotice })) : (_jsxs(_Fragment, { children: [agentSurface === null ? (_jsx(LiveActivity, { activeTools: visibleActiveTools, working: state === 'thinking' || state === 'tool', interruptible: abortRef.current !== null, animate: stdout.isTTY === true })) : null, permission ? (_jsx(PermissionOverlay, { toolCalls: permission.toolCalls, review: permission.review, summary: permission.summary, detailsOpen: permissionDetailsOpen, reviewOffset: permissionReviewOffset, columns: terminal.columns })) : null, textPrompt ? (_jsx(TextPrompt, { title: textPrompt.title, placeholder: textPrompt.placeholder, initialValue: textPrompt.initialValue, emptyNotice: textPrompt.emptyNotice, hidden: permission !== null || agentSurface !== null, onSubmit: submitTextPrompt, onCancel: cancelTextPrompt }, textPrompt.token)) : permission === null && agentSurface === null && choicePicker ? (_jsx(ChoicePicker, { title: choicePicker.title, notice: choicePicker.notice, options: choicePicker.options, selected: selectedChoice, windowSize: choicePicker.kind === 'command' ? choicePicker.windowSize : undefined })) : permission === null && agentSurface === null && copyPicker ? (_jsx(CopyPicker, { targets: copyPicker.targets, selected: selectedCopy })) : null, _jsxs(ComposerFrame, { focus: state === 'idle' &&
4567
4624
  phase === 'ready' &&
4568
4625
  conversationMutation === null &&
4569
4626
  textPrompt === null &&
4570
4627
  choicePicker === null &&
4571
4628
  copyPicker === null &&
4572
- agentSurface === null, hidden: permission !== null ||
4573
- choicePicker !== null ||
4574
- copyPicker !== null ||
4575
- agentSurface !== null, children: [pendingSteers.length > 0 &&
4629
+ agentSurface === null, hidden: permission !== null || choicePicker !== null || copyPicker !== null, children: [pendingSteers.length > 0 &&
4576
4630
  permission === null &&
4577
4631
  textPrompt === null &&
4578
4632
  choicePicker === null &&
@@ -4594,11 +4648,10 @@ export function App({ ctx: initialCtx, onExitSummary, externalEditor = defaultEx
4594
4648
  agentSurface !== null, hidden: permission !== null ||
4595
4649
  textPrompt !== null ||
4596
4650
  choicePicker !== null ||
4597
- copyPicker !== null ||
4598
- agentSurface !== null,
4651
+ copyPicker !== null,
4599
4652
  // A turn is running, so Esc is the interrupt and not
4600
4653
  // the composer's clear.
4601
- escapeInterrupts: !compacting && (state === 'thinking' || state === 'tool'), onSubmit: handleSubmit, onNotice: (text) => pushMessage('system', text), onStepReasoningEffort: stepReasoningEffort, onExternalEdit: requestExternalEditor, onEditPrevious: openPromptEditor, draftToRestore: composerDraft, onDraftRestored: (token) => setComposerDraft((draft) => (draft?.token === token ? null : draft)), onDraftPresenceChange: setComposerHasDraft, userCommands: userCommands, mentionCandidates: mentionCandidates, history: history })] })] })), _jsx(Box, { paddingTop: 1, children: _jsx(StatusBar, { cwd: ctx.cwd, provider: session?.providerSummary ?? null, model: session?.modelSummary ?? null, effort: reasoningEffort ?? 'default', goal: statusGoal, state: state, hint: statusHint }) })] }) }));
4654
+ escapeInterrupts: !compacting && (state === 'thinking' || state === 'tool'), onSubmit: handleSubmit, onNotice: (text) => pushMessage('system', text), onStepReasoningEffort: stepReasoningEffort, onExternalEdit: requestExternalEditor, onEditPrevious: openPromptEditor, draftToRestore: composerDraft, onDraftRestored: (token) => setComposerDraft((draft) => (draft?.token === token ? null : draft)), onDraftPresenceChange: setComposerHasDraft, onOpenAgentPanel: openAgentCockpit, userCommands: userCommands, mentionCandidates: mentionCandidates, history: history })] }), permission === null && agentSurface === null && liveSubagents.length > 0 ? (_jsx(AgentTaskPanel, { agents: liveSubagents, terminalRows: terminal.rows, terminalColumns: terminal.columns })) : permission === null && agentSurface?.kind === 'cockpit' ? (_jsx(AgentCockpit, { agents: liveSubagents, selectedPhaseId: agentSurface.selectedPhaseId, selectedId: agentSurface.selectedId, focus: agentSurface.focus, terminalRows: terminal.rows, terminalColumns: terminal.columns })) : permission === null && agentSurface?.kind === 'transcript' && selectedSubagent ? (_jsx(AgentTranscript, { agent: selectedSubagent, tailOffset: agentSurface.tailOffset, terminalRows: terminal.rows, terminalColumns: terminal.columns })) : null] })), _jsx(Box, { paddingTop: 1, children: _jsx(StatusBar, { cwd: ctx.cwd, provider: session?.providerSummary ?? null, model: session?.modelSummary ?? null, effort: reasoningEffort ?? 'default', goal: statusGoal, state: state, hint: statusHint }) })] }) }));
4602
4655
  }
4603
4656
  function Banner({ version, session, permissionMode, cwd, }) {
4604
4657
  const { columns } = useWindowSize();