mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 09:41:11 +00:00
refactor: simplify agent command lane values
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user