@arhen/pi-core-subagent 1.3.54 → 1.3.55
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 +8 -3
- package/src/manager.ts +8 -1
- package/src/types.ts +1 -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.55",
|
|
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
|
@@ -60,8 +60,12 @@ function taskStatsWithUsage(task: TaskSnapshot): string {
|
|
|
60
60
|
const usage = formatUsage(task.usage);
|
|
61
61
|
return `${stats}${usage ? ` · ${usage}` : ""}`;
|
|
62
62
|
}
|
|
63
|
+
export function modelTag(task: TaskSnapshot): string {
|
|
64
|
+
const ref = [task.provider, task.model, task.thinking].filter(Boolean).join("/");
|
|
65
|
+
return ref ? ` [${ref}]` : "";
|
|
66
|
+
}
|
|
63
67
|
export function taskLine(task: TaskSnapshot): string {
|
|
64
|
-
return `${statusIcon(task.status)} ${task.agent} · ${taskStatsWithUsage(task)} · ${taskTimer(task)}`;
|
|
68
|
+
return `${statusIcon(task.status)} ${task.agent}${modelTag(task)} · ${taskStatsWithUsage(task)} · ${taskTimer(task)}`;
|
|
65
69
|
}
|
|
66
70
|
export function colorNums(text: string, theme: Theme): string {
|
|
67
71
|
return text.replace(/((?:\d+(?:\.\d+)?[a-zA-Z]*)+)|([^\d]+)/g, (_m, num?: string, rest?: string) =>
|
|
@@ -71,15 +75,16 @@ export function colorNums(text: string, theme: Theme): string {
|
|
|
71
75
|
function themedTaskLine(task: TaskSnapshot, theme: Theme, activity = ""): string {
|
|
72
76
|
const tail = `${taskStatsWithUsage(task)} · ${taskTimer(task)}`;
|
|
73
77
|
|
|
78
|
+
const tag = theme.fg("dim", modelTag(task));
|
|
74
79
|
const gate =
|
|
75
80
|
task.status === "queued" && task.needs?.length ? `${theme.fg("muted", `↳ waits ${task.needs.join(", ")}`)} · ` : "";
|
|
76
81
|
if (TERMINAL.includes(task.status)) {
|
|
77
|
-
return theme.fg("dim", `${statusIcon(task.status)} ${task.agent} · ${tail}`);
|
|
82
|
+
return theme.fg("dim", `${statusIcon(task.status)} ${task.agent}${tag} · ${tail}`);
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
pulsePhase += 1;
|
|
81
86
|
const name = isTalking(task) ? theme.fg(pulsePhase % 2 === 0 ? "accent" : "dim", `${task.agent} ⇄`) : task.agent;
|
|
82
|
-
return `${statusIcon(task.status)} ${name} · ${gate}${activity}${colorNums(tail, theme)}`;
|
|
87
|
+
return `${statusIcon(task.status)} ${name}${tag} · ${gate}${activity}${colorNums(tail, theme)}`;
|
|
83
88
|
}
|
|
84
89
|
const ARG_KEYS = ["pattern", "query", "command", "path", "file_path", "filePath", "url", "name", "subject", "task"];
|
|
85
90
|
export function describeCall(toolName: string, args: unknown, cwd?: string): string {
|
package/src/manager.ts
CHANGED
|
@@ -827,6 +827,7 @@ export class SubagentManager {
|
|
|
827
827
|
task: input.task,
|
|
828
828
|
|
|
829
829
|
model: model?.id ?? input.model,
|
|
830
|
+
provider: model?.provider,
|
|
830
831
|
thinking,
|
|
831
832
|
tools,
|
|
832
833
|
},
|
|
@@ -880,7 +881,13 @@ export class SubagentManager {
|
|
|
880
881
|
this.updateTask(
|
|
881
882
|
run,
|
|
882
883
|
task,
|
|
883
|
-
{
|
|
884
|
+
{
|
|
885
|
+
status: "running",
|
|
886
|
+
sessionId: child.sessionId,
|
|
887
|
+
sessionFile: child.sessionFile,
|
|
888
|
+
provider: child.model?.provider ?? task.provider,
|
|
889
|
+
thinking: child.thinkingLevel,
|
|
890
|
+
},
|
|
884
891
|
ctx,
|
|
885
892
|
onUpdate,
|
|
886
893
|
);
|