@arhen/pi-core-subagent 1.1.11 → 1.1.13
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 +7 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arhen/pi-core-subagent",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
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
|
@@ -1226,24 +1226,25 @@ export default function (pi: ExtensionAPI) {
|
|
|
1226
1226
|
: args.agent
|
|
1227
1227
|
? `single ${args.agent}`
|
|
1228
1228
|
: "preparing…";
|
|
1229
|
-
const flags = [args.background ? "
|
|
1229
|
+
const flags = [args.background ? "background" : "", args.allowIntercom ? "can ask" : ""].filter(Boolean).join(", ");
|
|
1230
1230
|
// Params used, dimmed: model, thinking, toolset, per-task write count.
|
|
1231
1231
|
const tasks = args.tasks ?? args.chain ?? [];
|
|
1232
1232
|
const writeCount = tasks.filter((t: any) => t.write).length;
|
|
1233
1233
|
const parts: string[] = [];
|
|
1234
1234
|
if (args.model) parts.push(args.model);
|
|
1235
1235
|
if (args.thinking) parts.push(args.thinking);
|
|
1236
|
-
if (args.write) parts.push("
|
|
1237
|
-
if (writeCount > 0) parts.push(`${writeCount}
|
|
1238
|
-
if (args.concurrency) parts.push(
|
|
1239
|
-
if (args.maxRuntimeMs) parts.push(`${Math.round(args.maxRuntimeMs / 60000)}m`);
|
|
1236
|
+
if (args.write) parts.push("can edit");
|
|
1237
|
+
if (writeCount > 0) parts.push(`${writeCount} can edit`);
|
|
1238
|
+
if (args.concurrency) parts.push(`${args.concurrency} at a time`);
|
|
1239
|
+
if (args.maxRuntimeMs) parts.push(`${Math.round(args.maxRuntimeMs / 60000)}m limit`);
|
|
1240
1240
|
const params = parts.length > 0 ? `\n ${theme.fg("dim", parts.join(" · "))}` : "";
|
|
1241
1241
|
return new Text(`${theme.fg("toolTitle", theme.bold("subagent"))} ${theme.fg("accent", mode)}${flags ? ` ${theme.fg("muted", `[${flags}]`)}` : ""}${params}`, 0, 0);
|
|
1242
1242
|
},
|
|
1243
1243
|
renderResult(result, { expanded }, theme) {
|
|
1244
1244
|
const run = result.details?.run;
|
|
1245
1245
|
if (!run) return new Text(result.content[0]?.type === "text" ? result.content[0].text : "", 0, 0);
|
|
1246
|
-
|
|
1246
|
+
// ponytail: mode/count already shown on the call line above; result header only adds progress + status.
|
|
1247
|
+
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)}`;
|
|
1247
1248
|
if (!expanded) {
|
|
1248
1249
|
const lines = [header, ...run.tasks.map((task) => ` ${taskLine(task)}`)];
|
|
1249
1250
|
const usage = formatUsage(run.aggregateUsage);
|