@arhen/pi-core-subagent 1.0.0 → 1.0.1
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/index.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arhen/pi-core-subagent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "pi extension: fast in-process subagents with single/parallel/chain, background runs, intercom and agent-to-agent mailbox. Leader defines agents inline.",
|
|
6
6
|
"license": "MIT",
|
package/src/index.ts
CHANGED
|
@@ -268,6 +268,7 @@ class SubagentsWidget implements Component {
|
|
|
268
268
|
const active = !TERMINAL.includes(run.status);
|
|
269
269
|
const head = active ? "accent" : "dim";
|
|
270
270
|
const lines = [truncateToWidth(`${this.theme.fg(head, active ? "●" : "○")} ${this.theme.fg(head, `Subagents (${done}/${run.tasks.length})`)}`, width, "…")];
|
|
271
|
+
const allDone = TERMINAL.includes(run.status);
|
|
271
272
|
const visible = run.tasks.slice(0, MAX_TASKS);
|
|
272
273
|
visible.forEach((task, i) => {
|
|
273
274
|
const last = i === visible.length - 1 && run.tasks.length <= MAX_TASKS;
|
|
@@ -276,7 +277,10 @@ class SubagentsWidget implements Component {
|
|
|
276
277
|
!TERMINAL.includes(task.status) && task.lastActivity
|
|
277
278
|
? `${this.theme.fg("dim", `→ ${task.lastActivity}`)} · `
|
|
278
279
|
: "";
|
|
279
|
-
|
|
280
|
+
// Completed run: dim everything except the agent name.
|
|
281
|
+
const line = allDone
|
|
282
|
+
? `${this.theme.fg("dim", `${statusIcon(task.status)} `)}${task.agent} ${this.theme.fg("dim", `· ${taskStatsWithUsage(task)} · ${taskTimer(task)}`)}`
|
|
283
|
+
: `${statusIcon(task.status)} ${task.agent} · ${activity}${taskStatsWithUsage(task)} · ${taskTimer(task)}`;
|
|
280
284
|
lines.push(truncateToWidth(`${conn} ${line}`, width, "…"));
|
|
281
285
|
});
|
|
282
286
|
if (run.tasks.length > MAX_TASKS) lines.push(`${this.theme.fg("dim", "└─")} ${this.theme.fg("dim", `+${run.tasks.length - MAX_TASKS} more`)}`);
|