mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 05:22:44 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -34,7 +34,9 @@ import { resolveSubagentLabel } from "./subagents-utils.js";
|
||||
|
||||
function formatApiKeySnippet(apiKey: string): string {
|
||||
const compact = apiKey.replace(/\s+/g, "");
|
||||
if (!compact) return "unknown";
|
||||
if (!compact) {
|
||||
return "unknown";
|
||||
}
|
||||
const edge = compact.length >= 12 ? 6 : 4;
|
||||
const head = compact.slice(0, edge);
|
||||
const tail = compact.slice(-edge);
|
||||
@@ -48,7 +50,9 @@ function resolveModelAuthLabel(
|
||||
agentDir?: string,
|
||||
): string | undefined {
|
||||
const resolved = provider?.trim();
|
||||
if (!resolved) return undefined;
|
||||
if (!resolved) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const providerKey = normalizeProviderId(resolved);
|
||||
const store = ensureAuthProfileStore(agentDir, {
|
||||
@@ -161,7 +165,9 @@ export async function buildStatusReply(params: {
|
||||
maxWindows: 2,
|
||||
includeResets: true,
|
||||
});
|
||||
if (summaryLine) usageLine = `📊 Usage: ${summaryLine}`;
|
||||
if (summaryLine) {
|
||||
usageLine = `📊 Usage: ${summaryLine}`;
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
usageLine = null;
|
||||
|
||||
Reference in New Issue
Block a user