@esso0428/pi-subagents 0.17.13 → 0.17.15

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.
@@ -1,487 +0,0 @@
1
- /**
2
- * fleet-list.ts — Claude Code-style "FleetView" list rendered below the editor.
3
- *
4
- * Shows `main` + each running/queued subagent as a navigable list. Pressing ↓ (or
5
- * ←) at an empty prompt activates the list; ↑/↓ move the selection (filled ● marker),
6
- * Enter opens the selected agent's live conversation overlay, Esc returns to the prompt.
7
- * A viewer stays open when its agent finishes; finished agents linger briefly in the list.
8
- *
9
- * Mechanics (see plan): the list is a `belowEditor` widget (render-only), and ALL key
10
- * handling goes through `onTerminalInput` — which fires before the focused editor and
11
- * can `consume` keys — gated on `getEditorText() === ""` so normal typing is untouched.
12
- */
13
- import { Editor, isKeyRelease, Key, matchesKey, truncateToWidth, visibleWidth } from "@earendil-works/pi-tui";
14
- import { hasAgentBadge, renderAgentName } from "../agent-color.js";
15
- import { readAgentHistory } from "../agent-history.js";
16
- import { isTopLevelAgent } from "../agent-manager.js";
17
- import { getLifetimeCost, getLifetimeTotal } from "../usage.js";
18
- import { formatCost } from "./agent-widget.js";
19
- import { ConversationViewer, createStaticConversationSource, VIEWPORT_HEIGHT_PCT } from "./conversation-viewer.js";
20
- /** Widget key for the below-editor fleet list. */
21
- const FLEET_KEY = "fleet";
22
- /** Max agent rows shown at once; extras collapse into a "↓ N more" indicator. */
23
- const MAX_AGENT_ROWS = 5;
24
- /** Re-render cadence so elapsed/token stats tick while agents run. */
25
- const TICK_MS = 200;
26
- /** How long a finished agent lingers in the list before it drops out. */
27
- const FINISHED_LINGER_MS = 4000;
28
- /** `11s` — integer seconds, no decimal/suffix (matches Claude Code, unlike formatMs). */
29
- export function formatFleetElapsed(ms) {
30
- return `${Math.max(0, Math.round(ms / 1000))}s`;
31
- }
32
- /** `↓ 13.1k tokens` — down-arrow prefix, compact magnitude, plural "tokens". */
33
- export function formatFleetTokens(count) {
34
- let compact;
35
- if (count >= 1_000_000)
36
- compact = `${(count / 1_000_000).toFixed(1)}M`;
37
- else if (count >= 1_000)
38
- compact = `${(count / 1_000).toFixed(1)}k`;
39
- else
40
- compact = `${count}`;
41
- return `↓ ${compact} tokens`;
42
- }
43
- /**
44
- * Place `right` flush to `width`, truncating `left` first so the stats survive.
45
- * The final clamp guarantees the line never exceeds `width` (which would wrap and
46
- * desync pi's line-diff → flicker) even on a terminal too narrow for the stats.
47
- */
48
- function rightAlign(left, right, width) {
49
- const rightW = visibleWidth(right);
50
- const maxLeft = Math.max(0, width - rightW - 1);
51
- const leftClamped = truncateToWidth(left, maxLeft);
52
- const gap = Math.max(1, width - visibleWidth(leftClamped) - rightW);
53
- return truncateToWidth(leftClamped + " ".repeat(gap) + right, width);
54
- }
55
- export class FleetList {
56
- manager;
57
- agentActivity;
58
- showCost;
59
- viewerMarkdown;
60
- onViewerMarkdown;
61
- cwd;
62
- ui;
63
- tui;
64
- inputUnsub;
65
- widgetRegistered = false;
66
- timer;
67
- enabled = true;
68
- /** Whether arrow keys currently navigate the list (vs. flow to the editor). */
69
- active = false;
70
- /** 0 = `main`, 1..N = subagents. */
71
- selectedIndex = 0;
72
- /** Set while a conversation overlay is open; calling it closes the overlay. */
73
- viewerClose;
74
- viewingAgentId;
75
- /** Injected by the extension; absent until workflows are wired (or at all). */
76
- workflowSource;
77
- openWorkflow;
78
- /**
79
- * Set while the workflow inspector is up.
80
- *
81
- * It does the two jobs `viewerClose` does for an agent's overlay — keep the
82
- * list out of the dialog's keys, and remember which row to come back to —
83
- * minus the close handle, because that overlay belongs to the extension.
84
- */
85
- viewingWorkflowId;
86
- constructor(manager, agentActivity,
87
- /**
88
- * Read live at render time. Whether each row shows an estimated cost after
89
- * its token count. Defaults to off — the extension supplies the user's
90
- * `showCost` setting.
91
- */
92
- showCost = () => false,
93
- /**
94
- * The user's `viewerMarkdown` setting, for a conversation overlay opened
95
- * from here. Read live rather than captured, because the viewer's `m` key
96
- * changes it while the overlay is up. Omitted → the viewer's own default.
97
- */
98
- viewerMarkdown,
99
- /**
100
- * Persist a mode chosen with `m` in that overlay, so the key means the same
101
- * thing here as it does from `/agents` — one setting, not one per entry
102
- * point. Omitted → `m` still cycles, viewer-locally.
103
- */
104
- onViewerMarkdown, cwd) {
105
- this.manager = manager;
106
- this.agentActivity = agentActivity;
107
- this.showCost = showCost;
108
- this.viewerMarkdown = viewerMarkdown;
109
- this.onViewerMarkdown = onViewerMarkdown;
110
- this.cwd = cwd;
111
- }
112
- // ---- Lifecycle ----
113
- setCwd(cwd) {
114
- this.cwd = cwd;
115
- }
116
- setEnabled(enabled) {
117
- if (enabled === this.enabled)
118
- return;
119
- this.enabled = enabled;
120
- if (!enabled)
121
- this.active = false;
122
- this.update();
123
- }
124
- /** Capture the UI context and (re)register the global input handler. */
125
- setUICtx(ui, registerInput = true) {
126
- if (ui === this.ui) {
127
- if (registerInput && !this.inputUnsub)
128
- this.inputUnsub = ui.onTerminalInput(data => this.handleKey(data));
129
- return;
130
- }
131
- this.inputUnsub?.();
132
- this.ui = ui;
133
- this.widgetRegistered = false;
134
- this.tui = undefined;
135
- this.inputUnsub = registerInput ? ui.onTerminalInput(data => this.handleKey(data)) : undefined;
136
- }
137
- /** Ensure the re-render timer is running (called when an agent spawns). */
138
- ensureTimer() {
139
- if (!this.timer)
140
- this.timer = setInterval(() => this.update(), TICK_MS);
141
- }
142
- /**
143
- * Called when an agent finishes. The viewer (if open on it) stays open so the
144
- * final output remains readable, and the row lingers in the list — just refresh.
145
- */
146
- onAgentFinished(_id) {
147
- this.update();
148
- }
149
- dispose() {
150
- if (this.timer) {
151
- clearInterval(this.timer);
152
- this.timer = undefined;
153
- }
154
- this.inputUnsub?.();
155
- this.inputUnsub = undefined;
156
- if (this.viewerClose) {
157
- this.viewerClose();
158
- this.viewerClose = undefined;
159
- }
160
- this.viewingAgentId = undefined;
161
- // No handle to close the workflow inspector with, but the list is going
162
- // away — leaving the id set would keep it swallowing input forever.
163
- this.viewingWorkflowId = undefined;
164
- if (this.ui && this.widgetRegistered)
165
- this.ui.setWidget(FLEET_KEY, undefined);
166
- this.widgetRegistered = false;
167
- this.tui = undefined;
168
- this.active = false;
169
- // Null last so a `viewerClose()` microtask above can't re-register the widget.
170
- this.ui = undefined;
171
- }
172
- /** Re-register/refresh the below-editor widget; clears it when nothing remains. */
173
- update() {
174
- if (!this.ui)
175
- return;
176
- // A run with no agents of its own left in the list is still worth a row —
177
- // it is the thing the user opens to see what its children did. Read off the
178
- // roster for the same reason activation does: two counts of "is there
179
- // anything here" drifted apart once before.
180
- const hasRows = this.enabled && this.roster().length > 1;
181
- if (!hasRows) {
182
- if (this.widgetRegistered) {
183
- this.ui.setWidget(FLEET_KEY, undefined);
184
- this.widgetRegistered = false;
185
- this.tui = undefined;
186
- }
187
- if (this.timer) {
188
- clearInterval(this.timer);
189
- this.timer = undefined;
190
- }
191
- this.active = false;
192
- this.selectedIndex = 0;
193
- return;
194
- }
195
- this.clampSelection();
196
- this.ensureTimer(); // keep stats ticking whenever the list is shown (e.g. after a re-enable)
197
- if (!this.widgetRegistered) {
198
- this.ui.setWidget(FLEET_KEY, (tui, theme) => {
199
- this.tui = tui;
200
- return {
201
- render: (w) => this.renderBar(w, theme),
202
- invalidate: () => { this.widgetRegistered = false; this.tui = undefined; },
203
- };
204
- }, { placement: "belowEditor" });
205
- this.widgetRegistered = true;
206
- }
207
- else {
208
- this.tui?.requestRender();
209
- }
210
- }
211
- // ---- Roster ----
212
- /**
213
- * Agents shown in the list, ordered earliest-launched first so the ones you
214
- * started sooner sit at the top. Every row is openable (has a session), so Enter
215
- * never dead-ends. Included: running/queued, plus the agent currently being
216
- * viewed, plus recently-finished ones (they linger briefly before dropping out).
217
- * Pending agents with no session yet are hidden until they start.
218
- * (`listAgents()` is newest-first, so we re-sort.)
219
- */
220
- agentRecords() {
221
- const now = Date.now();
222
- return this.manager.listAgents()
223
- .filter(a => isTopLevelAgent(a) && a.session && (a.status === "running" || a.status === "queued"
224
- || a.id === this.viewingAgentId
225
- || (a.completedAt != null && now - a.completedAt < FINISHED_LINGER_MS)))
226
- .sort((a, b) => a.startedAt - b.startedAt);
227
- }
228
- /**
229
- * Wire workflow runs into the list.
230
- *
231
- * Injected rather than constructed here because the fleet list predates
232
- * workflows and must keep working without them — a session with the feature
233
- * switched off never calls this, and the roster is agents-only exactly as
234
- * before.
235
- */
236
- setWorkflowSource(source, open) {
237
- this.workflowSource = source;
238
- this.openWorkflow = open;
239
- }
240
- /** Live runs, plus recently settled ones — the same linger the agents get. */
241
- workflows() {
242
- if (!this.workflowSource)
243
- return [];
244
- const now = Date.now();
245
- return [...this.workflowSource()]
246
- .filter(run => run.status === "running"
247
- || run.status === "paused"
248
- || (run.completedAt != null && now - run.completedAt < FINISHED_LINGER_MS))
249
- .sort((a, b) => a.startedAt - b.startedAt);
250
- }
251
- /**
252
- * Runs sit above the agents rather than interleaved by start time: a run owns
253
- * most of the agents under it, so listing the container first is what makes
254
- * the list read as a hierarchy rather than a shuffle.
255
- */
256
- roster() {
257
- return [
258
- { kind: "main" },
259
- ...this.workflows().map(workflow => ({ kind: "workflow", workflow })),
260
- ...this.agentRecords().map(record => ({ kind: "agent", record })),
261
- ];
262
- }
263
- clampSelection() {
264
- const max = this.roster().length - 1;
265
- if (this.selectedIndex > max)
266
- this.selectedIndex = Math.max(0, max);
267
- if (this.selectedIndex < 0)
268
- this.selectedIndex = 0;
269
- }
270
- // ---- Key handling ----
271
- /** Returns `{consume:true}` to swallow a key, or undefined to let it through. */
272
- handleKey(data) {
273
- if (!this.enabled || !this.ui)
274
- return undefined;
275
- // Input listeners receive BOTH key-press and key-release (the kitty protocol
276
- // emits both, and matchesKey matches either) — act on press only, or every
277
- // tap would move/fire twice. Repeats still pass through for held-key nav.
278
- if (isKeyRelease(data))
279
- return undefined;
280
- // While an overlay is open, let it own all input. Checked before the focus
281
- // test below, which would otherwise read the dialog holding the keyboard as
282
- // "the user left the list" and reset the selection out from under it.
283
- if (this.viewerClose || this.viewingWorkflowId)
284
- return undefined;
285
- // Input listeners fire BEFORE the focused component, and dialogs
286
- // (ctx.ui.select/confirm/input, pi's own menus) swap the prompt editor out
287
- // while getEditorText() still reads the detached — empty — editor. So when
288
- // anything but the editor owns the keyboard, stay out of its keys (#123).
289
- if (!this.editorHasFocus()) {
290
- if (this.active)
291
- this.deactivate();
292
- return undefined;
293
- }
294
- if (!this.active) {
295
- // Activate: ↓ or ← at an empty prompt moves focus into the list.
296
- const isActivator = matchesKey(data, "down") || matchesKey(data, "left");
297
- // Gated on the roster, not the agents: a session whose only row is a
298
- // workflow run still has somewhere to go, and requiring an agent would
299
- // render the row but refuse to move into it.
300
- if (isActivator && this.roster().length > 1 && this.ui.getEditorText() === "") {
301
- this.active = true;
302
- this.selectedIndex = 0;
303
- this.update();
304
- return { consume: true };
305
- }
306
- return undefined;
307
- }
308
- // Active — arrows navigate, Enter opens, Esc / Up-past-top exits.
309
- if (matchesKey(data, "down")) {
310
- const max = this.roster().length - 1;
311
- this.selectedIndex = Math.min(max, this.selectedIndex + 1);
312
- this.update();
313
- return { consume: true };
314
- }
315
- if (matchesKey(data, "up")) {
316
- if (this.selectedIndex === 0) {
317
- this.deactivate();
318
- return { consume: true };
319
- }
320
- this.selectedIndex -= 1;
321
- this.update();
322
- return { consume: true };
323
- }
324
- if (matchesKey(data, "escape")) {
325
- this.deactivate();
326
- return { consume: true };
327
- }
328
- if (matchesKey(data, Key.enter)) {
329
- this.openSelected();
330
- return { consume: true };
331
- }
332
- // Any other key cancels navigation and flows to the editor.
333
- this.deactivate();
334
- return undefined;
335
- }
336
- /**
337
- * True when pi's prompt editor owns the keyboard. pi's editor is an `Editor`
338
- * subclass (CustomEditor) while every dialog/selector is not, and the loader
339
- * aliases pi-tui to pi's own copy, so `instanceof` is a reliable identity
340
- * check. `focusedComponent` is TUI-private (no public accessor), hence the
341
- * best-effort peek: unknowable focus (no tui seen yet, nothing focused)
342
- * counts as the editor so activation keeps working.
343
- */
344
- editorHasFocus() {
345
- const focused = this.tui?.focusedComponent;
346
- return focused == null || focused instanceof Editor;
347
- }
348
- deactivate() {
349
- this.active = false;
350
- this.selectedIndex = 0;
351
- this.update();
352
- }
353
- openSelected() {
354
- const entry = this.roster()[this.selectedIndex];
355
- if (!entry || entry.kind === "main") {
356
- // `main` = return to the prompt; the native transcript is already shown.
357
- this.deactivate();
358
- return;
359
- }
360
- if (entry.kind === "workflow") {
361
- // The extension owns this overlay and closes it, so there is no
362
- // `viewerClose` to hold — but the list still has to know one is up, and
363
- // still has to put the cursor back on the run when it comes down.
364
- this.viewingWorkflowId = entry.workflow.id;
365
- void Promise.resolve(this.openWorkflow?.(entry.workflow.id)).then(() => this.clearViewer(), () => this.clearViewer());
366
- return;
367
- }
368
- const record = entry.record;
369
- if (!this.ui)
370
- return;
371
- const session = record.session ?? (record.transcriptPath && this.cwd
372
- ? (() => {
373
- const messages = readAgentHistory(this.cwd, record.transcriptPath);
374
- return messages ? createStaticConversationSource(messages) : undefined;
375
- })()
376
- : undefined);
377
- if (!session) {
378
- this.ui.notify(`Agent is ${record.status} — no session available.`, "info");
379
- return;
380
- }
381
- const isHistory = record.session === undefined;
382
- const activity = this.agentActivity.get(record.id);
383
- this.viewingAgentId = record.id;
384
- void this.ui.custom((tui, theme, keybindings, done) => {
385
- this.viewerClose = () => done(undefined);
386
- return new ConversationViewer(tui, session, record, activity, theme, done, isHistory ? undefined : () => {
387
- if (this.manager.abort(record.id))
388
- this.ui?.notify(`Stopped "${record.description}".`, "info");
389
- }, keybindings, isHistory ? undefined : (message) => this.manager.steer(record.id, message), this.showCost(), this.viewerMarkdown, this.onViewerMarkdown);
390
- }, {
391
- overlay: true,
392
- overlayOptions: { anchor: "center", width: "90%", maxHeight: `${VIEWPORT_HEIGHT_PCT}%` },
393
- }).then(() => this.clearViewer(), () => this.clearViewer());
394
- }
395
- /** Reset overlay state and return to the list (on close, auto-close, or error). */
396
- clearViewer() {
397
- // Keep the cursor on the agent we were viewing — re-resolve by id so it
398
- // still feels natural if the list reordered (an earlier agent finished)
399
- // while the overlay was open. If that agent is gone, leave the index for
400
- // update()'s clamp to settle.
401
- const viewed = this.viewingAgentId ?? this.viewingWorkflowId;
402
- if (viewed !== undefined) {
403
- const idx = this.roster().findIndex(e => e.kind === "agent" ? e.record.id === viewed
404
- : e.kind === "workflow" ? e.workflow.id === viewed
405
- : false);
406
- if (idx >= 0)
407
- this.selectedIndex = idx;
408
- }
409
- this.viewerClose = undefined;
410
- this.viewingAgentId = undefined;
411
- this.viewingWorkflowId = undefined;
412
- this.update();
413
- }
414
- // ---- Rendering ----
415
- renderBar(width, theme) {
416
- const rows = this.roster().slice(1);
417
- if (rows.length === 0)
418
- return [];
419
- // Clamp locally so a render between a roster shrink and the next update()
420
- // (e.g. on terminal resize) never loses the selection marker.
421
- const sel = Math.min(this.selectedIndex, rows.length);
422
- const hint = this.active
423
- ? "↑↓ select · enter view · esc back"
424
- : "esc to interrupt · ← for agents · ↓ to manage";
425
- const lines = [];
426
- lines.push(truncateToWidth(" " + theme.fg("dim", hint), width));
427
- lines.push("");
428
- lines.push(truncateToWidth(` ${this.bullet(0, sel, theme)} main`, width));
429
- // Window the rows so the selected one stays visible.
430
- const visible = Math.min(MAX_AGENT_ROWS, rows.length);
431
- const selRow = Math.max(0, sel - 1);
432
- const start = selRow < visible ? 0 : selRow - visible + 1;
433
- const hiddenBelow = rows.length - (start + visible);
434
- if (start > 0)
435
- lines.push(rightAlign("", theme.fg("dim", `↑ ${start} more`), width));
436
- for (let a = start; a < start + visible; a++) {
437
- const row = rows[a];
438
- lines.push(row.kind === "workflow" ?
439
- this.renderWorkflowRow(a + 1, sel, row.workflow, width, theme)
440
- : this.renderAgentRow(a + 1, sel, row.record, width, theme));
441
- }
442
- if (hiddenBelow > 0)
443
- lines.push(rightAlign("", theme.fg("dim", `↓ ${hiddenBelow} more`), width));
444
- return lines;
445
- }
446
- bullet(rosterIndex, sel, theme) {
447
- return rosterIndex === sel ? theme.fg("accent", "●") : theme.fg("dim", "○");
448
- }
449
- /**
450
- * A run's row. Shaped like an agent's — bullet, kind, name, stats flush right
451
- * — so the two read as one list, with the agent count where an agent has its
452
- * description and the same elapsed/token tail.
453
- */
454
- renderWorkflowRow(rosterIndex, sel, workflow, width, theme) {
455
- const selected = rosterIndex === sel;
456
- const kind = theme.fg(selected ? "text" : "muted", "workflow");
457
- const name = selected ? theme.fg("text", workflow.name) : workflow.name;
458
- const left = ` ${this.bullet(rosterIndex, sel, theme)} ${kind} ${name}`;
459
- // Frozen once the run settles, exactly as an agent's clock is.
460
- const elapsed = (workflow.completedAt ?? Date.now()) - workflow.startedAt;
461
- const agents = `${workflow.doneCount}/${workflow.totalCount} agent${workflow.totalCount === 1 ? "" : "s"}`;
462
- const stats = `${agents} · ${formatFleetElapsed(elapsed)} · ${formatFleetTokens(workflow.tokens)}`;
463
- return rightAlign(left, selected ? theme.fg("text", stats) : theme.fg("dim", stats), width);
464
- }
465
- renderAgentRow(rosterIndex, sel, record, width, theme) {
466
- // The selected row renders in the theme's primary text color so it reads as
467
- // one selection (#230). A configured badge survives — Claude Code's FleetView
468
- // keeps the agent color on the selected row too and only bolds it — which also
469
- // keeps the row's width fixed as the selection moves.
470
- const selected = rosterIndex === sel;
471
- const name = renderAgentName(record.type, theme, selected
472
- ? { fallbackColor: "text", bold: hasAgentBadge(record.type) }
473
- : { fallbackColor: "muted" });
474
- const description = selected ? theme.fg("text", record.description) : record.description;
475
- const left = ` ${this.bullet(rosterIndex, sel, theme)} ${name} ${description}`;
476
- // The record, not the activity tracker — see the note in AgentWidget's
477
- // running line: only the record carries a nested child's spend, and only it
478
- // outlives the agent.
479
- const tokens = getLifetimeTotal(record.lifetimeUsage);
480
- const elapsedMs = (record.completedAt ?? Date.now()) - record.startedAt; // freezes once finished
481
- const cost = this.showCost() ? formatCost(getLifetimeCost(record.lifetimeUsage)) : "";
482
- const stats = `${formatFleetElapsed(elapsedMs)} · ${formatFleetTokens(tokens)}${cost ? ` · ${cost}` : ""}`;
483
- const right = selected ? theme.fg("text", stats) : theme.fg("dim", stats);
484
- return rightAlign(left, right, width);
485
- }
486
- }
487
- //# sourceMappingURL=fleet-list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fleet-list.js","sourceRoot":"","sources":["../../src/ui/fleet-list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAqB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAsB,UAAU,EAAc,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEnH,kDAAkD;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC;AAC1B,iFAAiF;AACjF,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,sEAAsE;AACtE,MAAM,OAAO,GAAG,GAAG,CAAC;AACpB,yEAAyE;AACzE,MAAM,kBAAkB,GAAG,IAAI,CAAC;AA2ChC,yFAAyF;AACzF,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC;AAClD,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,IAAI,OAAe,CAAC;IACpB,IAAI,KAAK,IAAI,SAAS;QAAE,OAAO,GAAG,GAAG,CA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