UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

19 lines (18 loc) • 878 B
import { l as normalizeOptionalString } from "./string-coerce-CCIiB4H7.mjs"; import { o as resolveInternalSessionKey, s as resolveMainSessionAlias } from "./sessions-resolution-B1MUJxVg.mjs"; import "./sessions-helpers-BN0PfnY4.mjs"; import { l as resolveCommandTurnContext, o as isNativeCommandTurn } from "./command-turn-context-BaN4kAo-.mjs"; //#region src/auto-reply/reply/command-source-session-key.ts function resolveCommandSourceSessionKey(e, t) { const n = normalizeOptionalString(e.ctx.CommandTargetSessionKey); const r = normalizeOptionalString(e.sessionKey); const i = t?.preferCommandTarget ?? isNativeCommandTurn(resolveCommandTurnContext(e.ctx)) ? n || r : r || n; if (!i) return; const { alias: a } = resolveMainSessionAlias(e.cfg); return resolveInternalSessionKey({ key: i, alias: a }); } //#endregion export { resolveCommandSourceSessionKey as t };