@esso0428/pi-subagents 0.15.17 → 0.17.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 (96) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +10 -12
  3. package/dist/agent-history-list.d.ts.map +1 -1
  4. package/dist/agent-history-list.js.map +1 -1
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +20 -40
  7. package/dist/index.js.map +1 -1
  8. package/dist/output-file.js +3 -3
  9. package/dist/output-file.js.map +1 -1
  10. package/dist/settings.d.ts +1 -8
  11. package/dist/settings.d.ts.map +1 -1
  12. package/dist/settings.js +0 -5
  13. package/dist/settings.js.map +1 -1
  14. package/dist/ui/agent-widget.d.ts +66 -28
  15. package/dist/ui/agent-widget.d.ts.map +1 -1
  16. package/dist/ui/agent-widget.js +325 -134
  17. package/dist/ui/agent-widget.js.map +1 -1
  18. package/dist/ui/ccstyle/diff/ansi-utils.js +2 -2
  19. package/dist/ui/ccstyle/diff/ansi-utils.js.map +1 -1
  20. package/dist/ui/ccstyle/diff/diff-presentation.d.ts.map +1 -1
  21. package/dist/ui/ccstyle/diff/diff-presentation.js +0 -1
  22. package/dist/ui/ccstyle/diff/diff-presentation.js.map +1 -1
  23. package/dist/ui/ccstyle/diff/diff-renderer.d.ts +1 -1
  24. package/dist/ui/ccstyle/diff/diff-renderer.d.ts.map +1 -1
  25. package/dist/ui/ccstyle/diff/diff-renderer.js +15 -10
  26. package/dist/ui/ccstyle/diff/diff-renderer.js.map +1 -1
  27. package/dist/ui/ccstyle/diff/line-width-safety.d.ts.map +1 -1
  28. package/dist/ui/ccstyle/diff/line-width-safety.js +1 -2
  29. package/dist/ui/ccstyle/diff/line-width-safety.js.map +1 -1
  30. package/dist/ui/ccstyle/diff/shiki-highlight.d.ts +19 -0
  31. package/dist/ui/ccstyle/diff/shiki-highlight.d.ts.map +1 -0
  32. package/dist/ui/ccstyle/diff/shiki-highlight.js +85 -0
  33. package/dist/ui/ccstyle/diff/shiki-highlight.js.map +1 -0
  34. package/dist/ui/ccstyle/tool-renderer.d.ts +1 -1
  35. package/dist/ui/ccstyle/tool-renderer.d.ts.map +1 -1
  36. package/dist/ui/ccstyle/tool-renderer.js +1 -1
  37. package/dist/ui/ccstyle/tool-renderer.js.map +1 -1
  38. package/dist/ui/ccstyle/tool-result.d.ts +9 -1
  39. package/dist/ui/ccstyle/tool-result.d.ts.map +1 -1
  40. package/dist/ui/ccstyle/tool-result.js +137 -5
  41. package/dist/ui/ccstyle/tool-result.js.map +1 -1
  42. package/dist/ui/conversation-blocks.d.ts.map +1 -1
  43. package/dist/ui/conversation-blocks.js +14 -13
  44. package/dist/ui/conversation-blocks.js.map +1 -1
  45. package/dist/ui/conversation-role.d.ts +1 -1
  46. package/dist/ui/conversation-role.d.ts.map +1 -1
  47. package/dist/ui/conversation-search.js +4 -4
  48. package/dist/ui/conversation-search.js.map +1 -1
  49. package/dist/ui/conversation-timeline.d.ts +17 -1
  50. package/dist/ui/conversation-timeline.d.ts.map +1 -1
  51. package/dist/ui/conversation-timeline.js +116 -43
  52. package/dist/ui/conversation-timeline.js.map +1 -1
  53. package/dist/ui/conversation-viewer.d.ts +5 -1
  54. package/dist/ui/conversation-viewer.d.ts.map +1 -1
  55. package/dist/ui/conversation-viewer.js +67 -26
  56. package/dist/ui/conversation-viewer.js.map +1 -1
  57. package/dist/write-execution.d.ts.map +1 -1
  58. package/dist/write-execution.js +1 -1
  59. package/dist/write-execution.js.map +1 -1
  60. package/package.json +6 -5
  61. package/src/agent-history-list.ts +1 -1
  62. package/src/index.ts +19 -73
  63. package/src/output-file.ts +3 -3
  64. package/src/settings.ts +1 -12
  65. package/src/ui/agent-widget.ts +264 -114
  66. package/src/ui/ccstyle/diff/ansi-utils.ts +2 -2
  67. package/src/ui/ccstyle/diff/diff-presentation.ts +0 -1
  68. package/src/ui/ccstyle/diff/diff-renderer.ts +22 -21
  69. package/src/ui/ccstyle/diff/line-width-safety.ts +1 -2
  70. package/src/ui/ccstyle/diff/shiki-highlight.ts +97 -0
  71. package/src/ui/ccstyle/tool-renderer.ts +3 -3
  72. package/src/ui/ccstyle/tool-result.ts +175 -7
  73. package/src/ui/conversation-role.ts +1 -1
  74. package/src/ui/conversation-search.ts +4 -4
  75. package/src/ui/conversation-timeline.ts +7 -7
  76. package/src/ui/conversation-viewer.ts +16 -7
  77. package/src/write-execution.ts +2 -2
  78. package/dist/ui/fleet-list.d.ts +0 -122
  79. package/dist/ui/fleet-list.d.ts.map +0 -1
  80. package/dist/ui/fleet-list.js +0 -375
  81. package/dist/ui/fleet-list.js.map +0 -1
  82. package/src/ui/deferred-ui-refresh.ts +0 -72
  83. package/src/ui/fleet-list.ts +0 -585
  84. package/test/agent-history-list.test.ts +0 -121
  85. package/test/agent-manager-history.test.ts +0 -88
  86. package/test/agent-menu-history-navigation.test.ts +0 -86
  87. package/test/output-file-history.test.ts +0 -50
  88. package/test/ui/agent-widget.test.ts +0 -172
  89. package/test/ui/conversation-blocks.test.ts +0 -103
  90. package/test/ui/conversation-diff.test.ts +0 -91
  91. package/test/ui/conversation-search.test.ts +0 -55
  92. package/test/ui/conversation-viewer.test.ts +0 -438
  93. package/test/ui/deferred-ui-refresh.test.ts +0 -55
  94. package/test/ui/fleet-list.test.ts +0 -389
  95. package/test/write-execution.test.ts +0 -83
  96. package/tsconfig.json +0 -16
package/CHANGELOG.md CHANGED
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.17.0] - 2026-09-15
11
+
12
+ ### Changed
13
+ - **The above-editor Agents panel is now the single agent navigator.** It replaces the duplicate FleetView roster, uses focus-gated `↑`/`↓` navigation with `Enter` to open live or read-only history viewers, and removes FleetView's duplicate timer and deferred redraw path.
14
+
15
+ ## [0.16.0] - 2026-09-15
16
+
17
+ > **⚠️ Breaking: pi 0.80.8 is now the minimum supported host version.** The package peer dependencies require `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and `@earendil-works/pi-tui` `>=0.80.8`; upgrade pi before installing this release. This floor matches the `ModelRuntime` API used by the runner and avoids installing a release against the pre-0.80.8 session-creation contract.
18
+
19
+ ### Added
20
+ - **Conversation tool output now receives bounded syntax highlighting.** Expanded tool cards infer a language only from an explicit file path or fenced-code language, render with pi's synchronous highlighter on the first paint, and enhance eligible output asynchronously with Shiki. The viewer keeps a local cache and falls back safely when Shiki is unavailable or the output is too large.
21
+ - **Project-local durable history mirrors subagent transcripts.** When output transcripts are enabled, each agent's JSONL stream is also written under `.pi-subagents/agent-transcripts/` (with the directory ignored by Git), and the parent session stores a project-relative locator. Terminal agent records can therefore be reopened in the read-only history viewer after their temporary live handles and output files have been cleaned up or after the session is reloaded.
22
+
23
+ ### Changed
24
+ - **Pi compatibility now starts at `>=0.80.8`.** The runner forwards the parent `ModelRuntime` to child sessions on hosts exposing the new API, preserving extension-registered providers and authentication for isolated agents; the legacy session option remains as a compatibility fallback in the implementation, but older pi versions are outside this release's supported peer range.
25
+ - **Shiki is a runtime dependency.** `@shikijs/cli` is now shipped in `dependencies` because the conversation viewer loads it lazily at runtime for asynchronous tool-output highlighting; pi's highlighter remains the synchronous fallback.
26
+
10
27
  ## [0.15.17] - 2026-09-14
11
28
 
12
29
  ### Fixed
package/README.md CHANGED
@@ -14,8 +14,7 @@ https://github.com/user-attachments/assets/8685261b-9338-4fea-8dfe-1c590d5df543
14
14
 
15
15
  - **Claude Code look & feel** — same tool names, calling conventions, and UI patterns (`Agent`, `get_subagent_result`, `steer_subagent`) — feels native
16
16
  - **Parallel background agents** — spawn multiple agents that run concurrently with automatic queuing (configurable concurrency limit, default 4) and smart group join (consolidated notifications)
17
- - **Live widget UI** — persistent above-editor widget with animated spinners, live tool activity, token counts, and colored status icons. Configurable via `/agents → Settings → Widget`: `all` (every agent), `background` (default — hides foreground runs, which already render inline as the `Agent` tool result), or `off`
18
- - **FleetView** — Claude Code-style navigable list of `main` + every running subagent rendered below the editor (earliest-launched first). Press `↓` (or `←`) at an empty prompt to jump in, `↑`/`↓`/wheel to move the selection, `Enter` to open the selected agent's live, auto-updating conversation, `Esc` to return. The selected row stays visible while the bounded list window moves through the full roster. Finished agents linger briefly before dropping out, and a viewer stays open through completion so you can read the final output. Toggle via `/agents → Settings → Fleet view`
17
+ - **Agents panel UI** — persistent above-editor widget with animated spinners, live tool activity, token counts, colored status icons, and one focus-gated navigator. It shows every agent by default; press `↓` at an empty prompt to activate the panel, `↑`/`↓` to select, `Enter` to open a live or read-only history viewer, and `Esc` to return. Configure via `/agents → Settings → Widget`: `all`, `background`, or `off`
19
18
  - **Conversation viewer** — select any agent in `/agents` to open a live-scrolling overlay of its full conversation (auto-follows new content, scroll up to pause). Steer a running agent inline by pressing `Enter` to open a composer, typing, then `Enter` to send (`Esc` or an empty submit returns) — the message appears as a user message and redirects the agent after its current tool. Stop a still-running agent by pressing `x` (then `x` again to confirm) — both work for background agents too
20
19
  - **Custom agent types** — define agents in `.pi/agents/<name>.md` or `.agents/agents/<name>.md` (project) or globally, with YAML frontmatter: custom system prompts, model selection, thinking levels, tool restrictions
21
20
  - **Mid-run steering** — inject messages into running agents to redirect their work without restarting
@@ -95,7 +94,7 @@ Restrictions:
95
94
 
96
95
  ## UI
97
96
 
98
- The extension renders a persistent widget above the editor showing active agents. By default it shows background runs only (`widgetMode: background`) — foreground agents already render inline as the `Agent` tool result, so the widget would otherwise double-render them. Switch to `all` (every agent) or `off` (hide the widget) via `/agents → Settings → Widget`:
97
+ The extension renders a persistent Agents widget above the editor. By default it shows all agents (`widgetMode: all`), including foreground and background runs. Switch to `background` or `off` via `/agents → Settings → Widget`:
99
98
 
100
99
  ```
101
100
  ● Agents
@@ -112,20 +111,19 @@ The token field is annotated with two optional signals inside parens:
112
111
  - **`NN%`** — context-window utilization (color-coded: <70% dim, 70–85% warning, ≥85% error). Omitted when the model has no declared `contextWindow`, or briefly right after compaction.
113
112
  - **`⇊N`** — number of times the session has compacted, when > 0. Stays dim; the percent's color carries urgency.
114
113
 
115
- ### FleetView
114
+ ### Agents panel navigator
116
115
 
117
- While subagents are running, a Claude Code-style navigable list renders **below** the editor:
116
+ While agents are running or have openable history, the single Agents panel renders **above** the editor:
118
117
 
119
118
  ```
120
- esc to interrupt · ← for agents · ↓ to manage
121
-
122
- ● main
123
- ○ general-purpose Sleep then report 1 11s · ↓ 13.1k tokens
124
- ○ general-purpose Sleep then report 2 11s · ↓ 13.1k tokens
125
- ↓ 3 more
119
+ ● Agents ↑↓ select · enter view · esc back
120
+ ├─ ● Agent Refactor auth module · ↻5≤30 · 5 tool uses · 12.3s
121
+ │ ⎿ editing 2 files…
122
+ ├─ ○ Explore Find auth files · ↻3 · 4.1s
123
+ └─ +1 more (↓ 1 more; 1 finished)
126
124
  ```
127
125
 
128
- The list is ordered earliest-launched first, and only shows agents you can actually open (pending/queued agents with no session yet appear once they start). At an **empty prompt**, press `↓` (or `←`) to move focus from the prompt into the list — the selected row is marked `●`, the rest `○`. `↑`/`↓` move the selection, `Enter` opens the selected agent's live conversation overlay (it auto-updates as the agent works), and `Esc` (or `↑` above `main`) returns to the prompt. Selecting `main` returns to the normal view. Inside the overlay, press `Enter` to steer the running agent — type a message and `Enter` to send it (`Esc` or an empty submit returns), and it redirects the agent the same way the `steer_subagent` tool does. A viewer stays open when its agent finishes so you can read the final output, and finished agents linger in the list for a few seconds before dropping out. Typing anything at a non-empty prompt behaves normally — the list only captures arrow keys when the prompt is empty. Disable it entirely via `/agents → Settings → Fleet view`.
126
+ At an **empty prompt**, press `↓` to activate the panel. The selected row is marked `●`; `↑`/`↓` move through the full bounded roster, `Enter` opens a running agent live or a terminal agent's read-only history. A queued agent remains selectable, but has no live viewer until it starts; `Esc` returns to the prompt. `↑` while the first row is selected also returns to the prompt. Pressing `↑` at an inactive prompt, typing in a non-empty prompt, or using `j`/`k`/`←` behaves normally; the panel only captures the focus-gated arrow sequence described above. Disable it entirely via `/agents → Settings → Widget → off`.
129
127
 
130
128
  Individual agent results render Claude Code-style in the conversation:
131
129
 
@@ -1 +1 @@
1
- {"version":3,"file":"agent-history-list.d.ts","sourceRoot":"","sources":["../src/agent-history-list.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAG3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAI9C,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,SAAS,GACT,SAAS,GACT,SAAS,GACT,OAAO,CAAC;AAUZ,sEAAsE;AACtE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,kBAAkB,CAElF;AAED,6EAA6E;AAC7E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAG/D;AAED,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAIzF;AAED,uEAAuE;AACvE,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,GAAG,EAAE,MAAM,GAAG,SAAS,GACtB;IAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAAC,OAAO,EAAE,WAAW,EAAE,CAAA;CAAE,CAanD;AAWD,yDAAyD;AACzD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CASjF;AAED,mEAAmE;AACnE,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,GAAG,EAAE,MAAM,GAAG,SAAS,GACtB,MAAM,EAAE,CAMV"}
1
+ {"version":3,"file":"agent-history-list.d.ts","sourceRoot":"","sources":["../src/agent-history-list.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAI3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9C,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,SAAS,GAC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CAAC;AA6C9B,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GACvB,SAAS,CAKX;AAkKD,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,YAAY,QA4qExC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAc,KAAK,YAAY,EAA0F,MAAM,iCAAiC,CAAC;AACxK,OAAO,EAAE,SAAS,EAAiE,MAAM,wBAAwB,CAAC;AAmBlH,OAAO,EAcL,KAAK,KAAK,EAEX,MAAM,sBAAsB,CAAC;AA4C9B,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,GACvB,SAAS,CAKX;AAkKD,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,YAAY,QAiqExC"}
package/dist/index.js CHANGED
@@ -14,6 +14,8 @@ import { join } from "node:path";
14
14
  import { defineTool, getAgentDir, getSettingsListTheme } from "@earendil-works/pi-coding-agent";
15
15
  import { Container, Key, matchesKey, SettingsList, Spacer, Text } from "@earendil-works/pi-tui";
16
16
  import { Type } from "@sinclair/typebox";
17
+ import { agentHistoryLocator, createAgentHistoryPath, readAgentHistory } from "./agent-history.js";
18
+ import { buildAgentStatusMenuEntries, canOpenActiveAgent, canOpenAgentHistory, formatAgentHistoryOption, splitAgentRecords } from "./agent-history-list.js";
17
19
  import { AgentManager } from "./agent-manager.js";
18
20
  import { getAgentConversation, getDefaultMaxTurns, getGraceTurns, normalizeMaxTurns, SUBAGENT_TOOL_NAMES, setDefaultMaxTurns, setGraceTurns, steerAgent } from "./agent-runner.js";
19
21
  import { applyNicoOverrides, BUILTIN_TOOL_NAMES, getAgentConfig, getAllTypes, getAvailableTypes, isDefaultsDisabled, registerAgents, resolveType, setDefaultsDisabled } from "./agent-types.js";
@@ -23,15 +25,12 @@ import { isModelInScope, readEnabledModels, resolveEnabledModels } from "./enabl
23
25
  import { GroupJoinManager } from "./group-join.js";
24
26
  import { resolveAgentInvocationConfig, resolveJoinMode } from "./invocation-config.js";
25
27
  import { resolveModel } from "./model-resolver.js";
26
- import { agentHistoryLocator, createAgentHistoryPath, readAgentHistory } from "./agent-history.js";
27
- import { buildAgentStatusMenuEntries, canOpenActiveAgent, canOpenAgentHistory, formatAgentHistoryOption, splitAgentRecords } from "./agent-history-list.js";
28
28
  import { createOutputFilePath, streamToOutputFile, writeInitialEntry } from "./output-file.js";
29
29
  import { SubagentScheduler } from "./schedule.js";
30
30
  import { resolveStorePath, ScheduleStore } from "./schedule-store.js";
31
31
  import { applyAndEmitLoaded, saveAndEmitChanged } from "./settings.js";
32
32
  import { getStatusNote } from "./status-note.js";
33
33
  import { AgentWidget, buildInvocationTags, describeActivity, fgPreservingNestedStyles, formatDuration, formatMs, formatTokens, formatTurns, getDisplayName, getPromptModeLabel, SPINNER, } from "./ui/agent-widget.js";
34
- import { FleetList } from "./ui/fleet-list.js";
35
34
  import { showSchedulesMenu } from "./ui/schedule-menu.js";
36
35
  import { addUsage, getLifetimeTotal, getSessionContextPercent } from "./usage.js";
37
36
  // ---- Shared helpers ----
@@ -319,7 +318,6 @@ export default function (pi) {
319
318
  function sendIndividualNudge(record) {
320
319
  agentActivity.delete(record.id);
321
320
  widget.markFinished(record.id);
322
- fleet.onAgentFinished(record.id);
323
321
  scheduleNudge(record.id, () => emitIndividualNudge(record));
324
322
  widget.update();
325
323
  }
@@ -328,7 +326,6 @@ export default function (pi) {
328
326
  for (const r of records) {
329
327
  agentActivity.delete(r.id);
330
328
  widget.markFinished(r.id);
331
- fleet.onAgentFinished(r.id);
332
329
  }
333
330
  const groupKey = `group:${records.map(r => r.id).join(",")}`;
334
331
  scheduleNudge(groupKey, () => {
@@ -405,7 +402,6 @@ export default function (pi) {
405
402
  if (record.resultConsumed) {
406
403
  agentActivity.delete(record.id);
407
404
  widget.markFinished(record.id);
408
- fleet.onAgentFinished(record.id);
409
405
  widget.update();
410
406
  return;
411
407
  }
@@ -429,6 +425,8 @@ export default function (pi) {
429
425
  type: record.type,
430
426
  description: record.description,
431
427
  });
428
+ widget.ensureTimer();
429
+ widget.update();
432
430
  }, (record, info) => {
433
431
  // Emit compacted event when agent's session compacts (preserves count on record).
434
432
  pi.events.emit("subagents:compacted", {
@@ -540,23 +538,24 @@ export default function (pi) {
540
538
  for (const timer of pendingNudges.values())
541
539
  clearTimeout(timer);
542
540
  pendingNudges.clear();
543
- fleet.dispose();
541
+ widget.dispose();
544
542
  manager.dispose();
545
543
  });
546
- // Live widget: show running agents above editor.
547
- // widgetMode (default "background") selects what the widget shows: "all" =
548
- // every agent; "background" = hide foreground (they already render inline as
549
- // the Agent tool result, so showing them here too is a duplicate, #118), keep
550
- // everything else; "off" = hide the widget entirely. Read live at render time.
551
- let widgetMode = "background";
544
+ // Live widget: show all agents above the editor. Read live at render time.
545
+ let widgetMode = "all";
552
546
  function getWidgetMode() { return widgetMode; }
553
- const widget = new AgentWidget(manager, agentActivity, getWidgetMode);
554
- function setWidgetMode(m) { widgetMode = m; widget.update(); }
555
- // Claude Code-style FleetView: navigable list of main + subagents below the editor.
556
- const fleet = new FleetList(manager, agentActivity, () => currentCtx?.cwd, pi, () => currentCtx);
557
- let fleetViewEnabled = true;
558
- function isFleetViewEnabled() { return fleetViewEnabled; }
559
- function setFleetViewEnabled(b) { fleetViewEnabled = b; fleet.setEnabled(b); }
547
+ const widget = new AgentWidget(manager, agentActivity, getWidgetMode, {
548
+ canOpenHistory: (record) => canOpenAgentHistory(record, currentCtx?.cwd),
549
+ onOpen: (record, mode) => {
550
+ const ctx = currentCtx;
551
+ if (ctx)
552
+ void viewAgentConversation(ctx, record, mode);
553
+ },
554
+ });
555
+ function setWidgetMode(m) {
556
+ widgetMode = m;
557
+ widget.update();
558
+ }
560
559
  // Project/global default for writing the subagent .output transcript. A custom
561
560
  // agent's `output_transcript` frontmatter overrides this per spawn; when the
562
561
  // frontmatter is silent, this default applies. Read live at spawn time.
@@ -649,7 +648,6 @@ export default function (pi) {
649
648
  // Grab UI context from first tool execution + clear lingering widget on new turn
650
649
  pi.on("tool_execution_start", async (_event, ctx) => {
651
650
  widget.setUICtx(ctx.ui);
652
- fleet.setUICtx(ctx.ui);
653
651
  widget.onTurnStart();
654
652
  });
655
653
  /** Format an agent's tool scope: "*" when it has all built-ins, else a comma-separated list. */
@@ -700,7 +698,6 @@ export default function (pi) {
700
698
  setScopeModels: setScopeModelsEnabled,
701
699
  setDisableDefaultAgents: setDisableDefaultAgents,
702
700
  setToolDescriptionMode: setToolDescriptionMode,
703
- setFleetView: setFleetViewEnabled,
704
701
  setWidgetMode: setWidgetMode,
705
702
  setOutputTranscript: setOutputTranscript,
706
703
  }, (event, payload) => pi.events.emit(event, payload));
@@ -1179,8 +1176,6 @@ Terse command-style prompts produce shallow, generic work.
1179
1176
  agentActivity.set(id, bgState);
1180
1177
  widget.ensureTimer();
1181
1178
  widget.update();
1182
- fleet.ensureTimer();
1183
- fleet.update();
1184
1179
  // Emit created event
1185
1180
  pi.events.emit("subagents:created", {
1186
1181
  id,
@@ -1232,8 +1227,7 @@ Terse command-style prompts produce shallow, generic work.
1232
1227
  fgId = a.id;
1233
1228
  agentActivity.set(a.id, fgState);
1234
1229
  widget.ensureTimer();
1235
- fleet.ensureTimer();
1236
- fleet.update();
1230
+ widget.update();
1237
1231
  break;
1238
1232
  }
1239
1233
  }
@@ -1281,7 +1275,6 @@ Terse command-style prompts produce shallow, generic work.
1281
1275
  if (fgId) {
1282
1276
  agentActivity.delete(fgId);
1283
1277
  widget.markFinished(fgId);
1284
- fleet.onAgentFinished(fgId);
1285
1278
  }
1286
1279
  // Get final token count
1287
1280
  const tokenText = formatLifetimeTokens(fgState);
@@ -2050,7 +2043,6 @@ ${systemPrompt}
2050
2043
  scopeModels: isScopeModelsEnabled(),
2051
2044
  disableDefaultAgents: isDefaultsDisabled(),
2052
2045
  toolDescriptionMode: getToolDescriptionMode(),
2053
- fleetView: isFleetViewEnabled(),
2054
2046
  widgetMode: getWidgetMode(),
2055
2047
  outputTranscript: getOutputTranscriptDefault(),
2056
2048
  };
@@ -2118,13 +2110,6 @@ ${systemPrompt}
2118
2110
  currentValue: getOutputTranscriptDefault() ? "on" : "off",
2119
2111
  values: ["on", "off"],
2120
2112
  },
2121
- {
2122
- id: "fleetView",
2123
- label: "Fleet view",
2124
- description: "Claude Code-style main+subagents list below the editor (↓/← to navigate, Enter to view)",
2125
- currentValue: isFleetViewEnabled() ? "on" : "off",
2126
- values: ["on", "off"],
2127
- },
2128
2113
  {
2129
2114
  id: "widgetMode",
2130
2115
  label: "Widget",
@@ -2202,11 +2187,6 @@ ${systemPrompt}
2202
2187
  setToolDescriptionMode(value);
2203
2188
  notifyApplied(ctx, `Tool description set to ${value}. Takes effect on next pi session.`);
2204
2189
  }
2205
- else if (id === "fleetView") {
2206
- const enabled = value === "on";
2207
- setFleetViewEnabled(enabled);
2208
- notifyApplied(ctx, `Fleet view ${enabled ? "enabled" : "disabled"}`);
2209
- }
2210
2190
  else if (id === "widgetMode") {
2211
2191
  setWidgetMode(value);
2212
2192
  notifyApplied(ctx, `Widget set to ${value}`);