refactor: simplify agent command lane values

This commit is contained in:
Peter Steinberger
2026-04-11 00:53:47 +01:00
parent fdb08dd35b
commit 22e7b462c5

View File

@@ -254,13 +254,10 @@ async function prepareAgentCommandExecution(
}
const laneRaw = normalizeOptionalString(opts.lane) ?? "";
const isSubagentLane = laneRaw === String(AGENT_LANE_SUBAGENT);
const subagentLane: string = AGENT_LANE_SUBAGENT;
const isSubagentLane = laneRaw === subagentLane;
const timeoutSecondsRaw =
opts.timeout !== undefined
? Number.parseInt(String(opts.timeout), 10)
: isSubagentLane
? 0
: undefined;
opts.timeout !== undefined ? Number.parseInt(opts.timeout, 10) : isSubagentLane ? 0 : undefined;
if (
timeoutSecondsRaw !== undefined &&
(Number.isNaN(timeoutSecondsRaw) || timeoutSecondsRaw < 0)