@piotr-oles/pi-subagents 1.0.0 → 1.0.1
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
CHANGED
|
@@ -149,6 +149,10 @@ export class RunningSubagent {
|
|
|
149
149
|
): Promise<void> {
|
|
150
150
|
const session = this.session;
|
|
151
151
|
const unsubscribe = session.subscribe(async (event: AgentSessionEvent) => {
|
|
152
|
+
if (this.state.aborted) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
152
156
|
switch (event.type) {
|
|
153
157
|
case "turn_end":
|
|
154
158
|
this.state.turn++;
|
|
@@ -78,17 +78,14 @@ export class SubagentStore {
|
|
|
78
78
|
entry.instance = entry.instance.run({
|
|
79
79
|
onUpdate: (running: RunningSubagent) => {
|
|
80
80
|
if (entry.instance.status !== "running") {
|
|
81
|
-
|
|
81
|
+
return;
|
|
82
82
|
}
|
|
83
83
|
params.onUpdate(running);
|
|
84
84
|
entry.instance = running;
|
|
85
85
|
},
|
|
86
86
|
onDone: (done: DoneSubagent) => {
|
|
87
|
-
if (entry.instance.status === "done") {
|
|
88
|
-
return; // noop
|
|
89
|
-
}
|
|
90
87
|
if (entry.instance.status !== "running") {
|
|
91
|
-
|
|
88
|
+
return;
|
|
92
89
|
}
|
|
93
90
|
this.running.delete(entry.instance.id);
|
|
94
91
|
params.onDone(done);
|