fix: stabilize embedded runner queueing
This commit is contained in:
@@ -71,6 +71,8 @@ export async function runEmbeddedPiAgent(
|
||||
const globalLane = resolveGlobalLane(params.lane);
|
||||
const enqueueGlobal =
|
||||
params.enqueue ?? ((task, opts) => enqueueCommandInLane(globalLane, task, opts));
|
||||
const enqueueSession =
|
||||
params.enqueue ?? ((task, opts) => enqueueCommandInLane(sessionLane, task, opts));
|
||||
const channelHint = params.messageChannel ?? params.messageProvider;
|
||||
const resolvedToolResultFormat =
|
||||
params.toolResultFormat ??
|
||||
@@ -81,7 +83,7 @@ export async function runEmbeddedPiAgent(
|
||||
: "markdown");
|
||||
const isProbeSession = params.sessionId?.startsWith("probe-") ?? false;
|
||||
|
||||
return enqueueCommandInLane(sessionLane, () =>
|
||||
return enqueueSession(() =>
|
||||
enqueueGlobal(async () => {
|
||||
const started = Date.now();
|
||||
const resolvedWorkspace = resolveUserPath(params.workspaceDir);
|
||||
|
||||
@@ -121,7 +121,8 @@ export function buildMinimalServicePath(options: BuildServicePathOptions = {}):
|
||||
return env.PATH ?? "";
|
||||
}
|
||||
|
||||
return getMinimalServicePathPartsFromEnv({ ...options, env }).join(path.delimiter);
|
||||
const delimiter = platform === "win32" ? path.win32.delimiter : path.posix.delimiter;
|
||||
return getMinimalServicePathPartsFromEnv({ ...options, env }).join(delimiter);
|
||||
}
|
||||
|
||||
export function buildServiceEnvironment(params: {
|
||||
|
||||
Reference in New Issue
Block a user