@arhen/pi-core-subagent 1.1.10 → 1.1.12
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 +13 -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.12",
|
|
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
|
@@ -1218,18 +1218,25 @@ export default function (pi: ExtensionAPI) {
|
|
|
1218
1218
|
return { content: [{ type: "text", text: makeSummary(details.run) }], details };
|
|
1219
1219
|
},
|
|
1220
1220
|
renderCall(args, theme) {
|
|
1221
|
-
|
|
1222
|
-
const
|
|
1221
|
+
// ponytail: args stream in partially, so mode is unknowable until JSON closes. Show "preparing…" instead of a wrong "single ?".
|
|
1222
|
+
const mode = args.chain?.length
|
|
1223
|
+
? `chain ${args.chain.length}`
|
|
1224
|
+
: args.tasks?.length
|
|
1225
|
+
? `parallel ${args.tasks.length}`
|
|
1226
|
+
: args.agent
|
|
1227
|
+
? `single ${args.agent}`
|
|
1228
|
+
: "preparing…";
|
|
1229
|
+
const flags = [args.background ? "background" : "", args.allowIntercom ? "can ask" : ""].filter(Boolean).join(", ");
|
|
1223
1230
|
// Params used, dimmed: model, thinking, toolset, per-task write count.
|
|
1224
1231
|
const tasks = args.tasks ?? args.chain ?? [];
|
|
1225
1232
|
const writeCount = tasks.filter((t: any) => t.write).length;
|
|
1226
1233
|
const parts: string[] = [];
|
|
1227
1234
|
if (args.model) parts.push(args.model);
|
|
1228
1235
|
if (args.thinking) parts.push(args.thinking);
|
|
1229
|
-
if (args.write) parts.push("
|
|
1230
|
-
if (writeCount > 0) parts.push(`${writeCount}
|
|
1231
|
-
if (args.concurrency) parts.push(
|
|
1232
|
-
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`);
|
|
1233
1240
|
const params = parts.length > 0 ? `\n ${theme.fg("dim", parts.join(" · "))}` : "";
|
|
1234
1241
|
return new Text(`${theme.fg("toolTitle", theme.bold("subagent"))} ${theme.fg("accent", mode)}${flags ? ` ${theme.fg("muted", `[${flags}]`)}` : ""}${params}`, 0, 0);
|
|
1235
1242
|
},
|