@arhen/pi-core-subagent 1.3.20 → 1.3.22
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.
- package/package.json +1 -1
- package/src/format.ts +2 -2
- package/src/index.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arhen/pi-core-subagent",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.22",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "pi extension: fast in-process subagents with a dependency-graph scheduler (needs edges gate tasks and carry upstream output into dependent prompts), plus background runs, intercom and agent-to-agent mailbox. Leader defines agents inline.",
|
|
6
6
|
"license": "MIT",
|
package/src/format.ts
CHANGED
|
@@ -86,13 +86,13 @@ export function themedTaskLine(task: TaskSnapshot, theme: Theme, activity = ""):
|
|
|
86
86
|
const tail = `${taskStatsWithUsage(task)} · ${taskTimer(task)}`;
|
|
87
87
|
// Queued task with unmet needs: show the gate it's waiting on instead of empty stats.
|
|
88
88
|
const gate =
|
|
89
|
-
task.status === "queued" && task.needs?.length ? `${theme.fg("muted", `↳ waits ${task.needs.join(",")}`)} · ` : "";
|
|
89
|
+
task.status === "queued" && task.needs?.length ? `${theme.fg("muted", `↳ waits ${task.needs.join(", ")}`)} · ` : "";
|
|
90
90
|
if (TERMINAL.includes(task.status)) {
|
|
91
91
|
return theme.fg("dim", `${statusIcon(task.status)} ${task.agent} · ${tail}`);
|
|
92
92
|
}
|
|
93
93
|
// Talking (mailbox/intercom tool in flight): pulse the name accent↔dim; normal otherwise.
|
|
94
94
|
pulsePhase += 1;
|
|
95
|
-
const name = isTalking(task) ? theme.fg(pulsePhase % 2 === 0 ? "accent" : "dim", `${task.agent}⇄`) : task.agent;
|
|
95
|
+
const name = isTalking(task) ? theme.fg(pulsePhase % 2 === 0 ? "accent" : "dim", `${task.agent} ⇄`) : task.agent;
|
|
96
96
|
return `${statusIcon(task.status)} ${name} · ${gate}${activity}${colorNums(tail, theme)}`;
|
|
97
97
|
}
|
|
98
98
|
/**
|
package/src/index.ts
CHANGED
|
@@ -239,6 +239,12 @@ export default function (pi: ExtensionAPI) {
|
|
|
239
239
|
// ponytail: mode/count already shown on the call line above; result header only adds progress + status.
|
|
240
240
|
const header = `${statusIcon(run.status)} ${theme.fg("accent", `${run.tasks.filter((t) => t.status === "completed").length}/${run.tasks.length} done`)}${run.background ? ` ${theme.fg("muted", "(background)")}` : ""} ${theme.fg("muted", run.status)}`;
|
|
241
241
|
if (!expanded) {
|
|
242
|
+
// Background: the spawn snapshot is always "0 tools" noise and the footer widget
|
|
243
|
+
// already shows live per-task state — keep the card to the header only.
|
|
244
|
+
if (run.background) {
|
|
245
|
+
const usage = formatUsage(run.aggregateUsage);
|
|
246
|
+
return new Text(usage ? `${header}\n${theme.fg("dim", usage)}` : header, 0, 0);
|
|
247
|
+
}
|
|
242
248
|
const lines = [header, ...run.tasks.map((task) => ` ${themedTaskLine(task, theme)}`)];
|
|
243
249
|
const usage = formatUsage(run.aggregateUsage);
|
|
244
250
|
if (usage) lines.push(theme.fg("dim", usage));
|