@ferris1225/pi-subagents 4.1.15 → 4.1.17

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/src/runtime.ts CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
12
12
  import { rmSync } from "node:fs";
13
- import { BackgroundTaskQueue, MAX_CONCURRENT_SUBAGENTS } from "./background.ts";
13
+ import { resolveSubagentConcurrency, BackgroundTaskQueue } from "./background.ts";
14
14
  import {
15
15
  completionGroupTriggersTurn,
16
16
  createCompletionBatcher,
@@ -120,7 +120,7 @@ export interface SubagentRuntime {
120
120
  }
121
121
 
122
122
  export function createRuntime(pi: ExtensionAPI, configPath: string): SubagentRuntime {
123
- const backgroundQueue = new BackgroundTaskQueue(MAX_CONCURRENT_SUBAGENTS);
123
+ const backgroundQueue = new BackgroundTaskQueue(resolveSubagentConcurrency());
124
124
 
125
125
  const runtime: SubagentRuntime = {
126
126
  configPath,
@@ -140,7 +140,7 @@ export function createRuntime(pi: ExtensionAPI, configPath: string): SubagentRun
140
140
  const active = monitor
141
141
  .getRuns()
142
142
  .filter((run) => isRunActiveStatus(run.status))
143
- .map((run) => ({ id: run.id, agent: run.agent, label: run.label }));
143
+ .map((run) => ({ id: run.id, agent: run.agent, label: run.label, queued: run.status === "queued" }));
144
144
  const message = {
145
145
  customType: "subagent-result",
146
146
  content: formatCompletionMessage(items) + formatActiveRunsFooter(active),