Merged via squash. Prepared head SHA: 52ebbf5188b47386f2a78ac4715993bc082e911b Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras
23 lines
753 B
TypeScript
23 lines
753 B
TypeScript
import {
|
|
resolveSessionStoreTargets,
|
|
type SessionStoreSelectionOptions,
|
|
type SessionStoreTarget,
|
|
} from "../config/sessions.js";
|
|
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
|
import type { RuntimeEnv } from "../runtime.js";
|
|
export { resolveSessionStoreTargets, type SessionStoreSelectionOptions, type SessionStoreTarget };
|
|
|
|
export function resolveSessionStoreTargetsOrExit(params: {
|
|
cfg: OpenClawConfig;
|
|
opts: SessionStoreSelectionOptions;
|
|
runtime: RuntimeEnv;
|
|
}): SessionStoreTarget[] | null {
|
|
try {
|
|
return resolveSessionStoreTargets(params.cfg, params.opts);
|
|
} catch (error) {
|
|
params.runtime.error(error instanceof Error ? error.message : String(error));
|
|
params.runtime.exit(1);
|
|
return null;
|
|
}
|
|
}
|