mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 07:57:39 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -4,9 +4,15 @@ export function resolveMemoryVectorState(vector: { enabled: boolean; available?:
|
||||
tone: Tone;
|
||||
state: "ready" | "unavailable" | "disabled" | "unknown";
|
||||
} {
|
||||
if (!vector.enabled) return { tone: "muted", state: "disabled" };
|
||||
if (vector.available === true) return { tone: "ok", state: "ready" };
|
||||
if (vector.available === false) return { tone: "warn", state: "unavailable" };
|
||||
if (!vector.enabled) {
|
||||
return { tone: "muted", state: "disabled" };
|
||||
}
|
||||
if (vector.available === true) {
|
||||
return { tone: "ok", state: "ready" };
|
||||
}
|
||||
if (vector.available === false) {
|
||||
return { tone: "warn", state: "unavailable" };
|
||||
}
|
||||
return { tone: "muted", state: "unknown" };
|
||||
}
|
||||
|
||||
@@ -14,7 +20,9 @@ export function resolveMemoryFtsState(fts: { enabled: boolean; available: boolea
|
||||
tone: Tone;
|
||||
state: "ready" | "unavailable" | "disabled";
|
||||
} {
|
||||
if (!fts.enabled) return { tone: "muted", state: "disabled" };
|
||||
if (!fts.enabled) {
|
||||
return { tone: "muted", state: "disabled" };
|
||||
}
|
||||
return fts.available ? { tone: "ok", state: "ready" } : { tone: "warn", state: "unavailable" };
|
||||
}
|
||||
|
||||
@@ -22,7 +30,9 @@ export function resolveMemoryCacheSummary(cache: { enabled: boolean; entries?: n
|
||||
tone: Tone;
|
||||
text: string;
|
||||
} {
|
||||
if (!cache.enabled) return { tone: "muted", text: "cache off" };
|
||||
if (!cache.enabled) {
|
||||
return { tone: "muted", text: "cache off" };
|
||||
}
|
||||
const suffix = typeof cache.entries === "number" ? ` (${cache.entries})` : "";
|
||||
return { tone: "ok", text: `cache on${suffix}` };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user