refactor: use command lane enum

This commit is contained in:
Peter Steinberger
2026-01-20 10:50:18 +00:00
parent e5f7435d9f
commit 48f733e4b3
7 changed files with 32 additions and 17 deletions

View File

@@ -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) {