@arhen/pi-core-subagent 1.1.22 → 1.1.23
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/README.md +1 -1
- package/package.json +1 -1
- package/src/index.ts +12 -13
package/README.md
CHANGED
|
@@ -100,7 +100,7 @@ Background + intercom:
|
|
|
100
100
|
| `send_agent_message` | message to a sibling subagent's mailbox (`to` = its task id, or `"leader"`) |
|
|
101
101
|
| `poll_agent_messages` | drain this subagent's mailbox |
|
|
102
102
|
|
|
103
|
-
## Peek — `/peek` or `ctrl+shift+a`
|
|
103
|
+
## Peek — `/subagents peek` or `ctrl+shift+a`
|
|
104
104
|
|
|
105
105
|
Read-only pane over the session's subagents:
|
|
106
106
|
|
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.23",
|
|
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
|
@@ -1202,18 +1202,6 @@ const ReplyParam = Type.Object({
|
|
|
1202
1202
|
export default function (pi: ExtensionAPI) {
|
|
1203
1203
|
const manager = new SubagentManager(pi);
|
|
1204
1204
|
|
|
1205
|
-
pi.registerCommand("subagents", {
|
|
1206
|
-
description: "Show recent subagent runs",
|
|
1207
|
-
handler: async (_args, ctx) => {
|
|
1208
|
-
const runs = manager.listRuns().slice(0, 10);
|
|
1209
|
-
if (runs.length === 0) {
|
|
1210
|
-
ctx.ui.notify("No subagent runs in this session.", "info");
|
|
1211
|
-
return;
|
|
1212
|
-
}
|
|
1213
|
-
ctx.ui.notify(runs.flatMap((run) => compactLines(run).concat("")).join("\n") || "No subagent runs in this session.", "info");
|
|
1214
|
-
},
|
|
1215
|
-
});
|
|
1216
|
-
|
|
1217
1205
|
/** Read-only peek: browse agents, enter to tail one. Never mutates run state. */
|
|
1218
1206
|
const openPeek = async (ctx: ExtensionContext) => {
|
|
1219
1207
|
if (!ctx.hasUI) return;
|
|
@@ -1242,7 +1230,18 @@ export default function (pi: ExtensionAPI) {
|
|
|
1242
1230
|
{ overlay: true, overlayOptions: { anchor: "center", width: "70%", minWidth: 60, maxHeight: "70%", margin: 2 } },
|
|
1243
1231
|
);
|
|
1244
1232
|
};
|
|
1245
|
-
pi.registerCommand("
|
|
1233
|
+
pi.registerCommand("subagents", {
|
|
1234
|
+
description: "List subagent runs. `/subagents peek` opens the browsable pane.",
|
|
1235
|
+
handler: async (args, ctx) => {
|
|
1236
|
+
if (String(args ?? "").trim().toLowerCase() === "peek") return openPeek(ctx);
|
|
1237
|
+
const runs = manager.listRuns().slice(0, 10);
|
|
1238
|
+
if (runs.length === 0) {
|
|
1239
|
+
ctx.ui.notify("No subagent runs in this session.", "info");
|
|
1240
|
+
return;
|
|
1241
|
+
}
|
|
1242
|
+
ctx.ui.notify(runs.flatMap((run) => compactLines(run).concat("")).join("\n"), "info");
|
|
1243
|
+
},
|
|
1244
|
+
});
|
|
1246
1245
|
// ctrl+shift+s belongs to pi-web-access (search curator); 'a' for agents is free.
|
|
1247
1246
|
pi.registerShortcut("ctrl+shift+a", { description: "Peek at running subagents", handler: openPeek });
|
|
1248
1247
|
|