mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 03:21:23 +00:00
refactor: use command lane enum
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
export const AGENT_LANE_NESTED = "nested" as const;
|
||||
export const AGENT_LANE_SUBAGENT = "subagent" as const;
|
||||
import { CommandLane } from "../process/lanes.js";
|
||||
|
||||
export const AGENT_LANE_NESTED = CommandLane.Nested;
|
||||
export const AGENT_LANE_SUBAGENT = CommandLane.Subagent;
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { CommandLane } from "../../process/lanes.js";
|
||||
|
||||
export function resolveSessionLane(key: string) {
|
||||
const cleaned = key.trim() || "main";
|
||||
const cleaned = key.trim() || CommandLane.Main;
|
||||
return cleaned.startsWith("session:") ? cleaned : `session:${cleaned}`;
|
||||
}
|
||||
|
||||
export function resolveGlobalLane(lane?: string) {
|
||||
const cleaned = lane?.trim();
|
||||
return cleaned ? cleaned : "main";
|
||||
return cleaned ? cleaned : CommandLane.Main;
|
||||
}
|
||||
|
||||
export function resolveEmbeddedSessionLane(key: string) {
|
||||
|
||||
Reference in New Issue
Block a user