@hheei/pi-subagents 0.5.1 → 0.5.2
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/dist/extension.js +8 -3
- package/package.json +2 -2
package/dist/extension.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { errorMessage, getBackgroundDelivery, registerExtensionLifecycle, } from "@hheei/pi-ext-core";
|
|
1
|
+
import { createRenderThrottle, errorMessage, getBackgroundDelivery, registerExtensionLifecycle, } from "@hheei/pi-ext-core";
|
|
2
2
|
import { discoverAgents } from "./agent-resolver.js";
|
|
3
3
|
import { registerChildBridge } from "./child-bridge.js";
|
|
4
4
|
import { registerParentCommands } from "./commands.js";
|
|
@@ -302,7 +302,10 @@ export default function piSubagentsExtension(pi) {
|
|
|
302
302
|
registerParentCommands(pi, manager);
|
|
303
303
|
const status = createSubagentStatus(context.ui, runtime.signal);
|
|
304
304
|
let refreshVersion = 0;
|
|
305
|
-
|
|
305
|
+
// The manager notifies on every lifecycle transition, and each notification costs an async
|
|
306
|
+
// list plus a full footer rebuild. The footer follows the shared streaming window instead;
|
|
307
|
+
// the first change still paints immediately and the last state is never dropped.
|
|
308
|
+
const repaintStatus = createRenderThrottle(() => {
|
|
306
309
|
if (runtime.signal.aborted)
|
|
307
310
|
return;
|
|
308
311
|
const version = ++refreshVersion;
|
|
@@ -314,11 +317,13 @@ export default function piSubagentsExtension(pi) {
|
|
|
314
317
|
status.refresh(children);
|
|
315
318
|
})
|
|
316
319
|
.catch((error) => diagnose(`Subagent status failed: ${errorMessage(error)}`));
|
|
317
|
-
};
|
|
320
|
+
});
|
|
321
|
+
const refreshStatus = () => repaintStatus.request();
|
|
318
322
|
const unsubscribe = manager.onChange(refreshStatus);
|
|
319
323
|
refreshStatus();
|
|
320
324
|
runtime.resources.add("subagent-status", () => {
|
|
321
325
|
unsubscribe();
|
|
326
|
+
repaintStatus.dispose();
|
|
322
327
|
status.dispose();
|
|
323
328
|
});
|
|
324
329
|
runtime.resources.add("subagent-manager", () => manager.closeLocalConnections());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hheei/pi-subagents",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Independent background Pi subagent sessions with durable identity and RPC control.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@hheei/pi-ext-core": "^0.6.
|
|
38
|
+
"@hheei/pi-ext-core": "^0.6.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@earendil-works/pi-coding-agent": ">=1.3.0",
|