fix: satisfy gate checks
This commit is contained in:
@@ -1777,8 +1777,10 @@ function applySessionDefaults(cfg: ClawdisConfig): ClawdisConfig {
|
||||
if (!session || session.mainKey === undefined) return cfg;
|
||||
|
||||
const trimmed = session.mainKey.trim();
|
||||
const next: ClawdisConfig = { ...cfg, session: { ...session } };
|
||||
next.session.mainKey = "main";
|
||||
const next: ClawdisConfig = {
|
||||
...cfg,
|
||||
session: { ...session, mainKey: "main" },
|
||||
};
|
||||
|
||||
if (trimmed && trimmed !== "main" && !warnedMainKeyOverride) {
|
||||
warnedMainKeyOverride = true;
|
||||
|
||||
@@ -103,9 +103,9 @@ export function resolveStorePath(store?: string) {
|
||||
return path.resolve(store);
|
||||
}
|
||||
|
||||
export function resolveMainSessionKey(
|
||||
cfg?: { session?: { scope?: SessionScope; mainKey?: string } },
|
||||
): string {
|
||||
export function resolveMainSessionKey(cfg?: {
|
||||
session?: { scope?: SessionScope; mainKey?: string };
|
||||
}): string {
|
||||
if (cfg?.session?.scope === "global") return "global";
|
||||
return "main";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user