mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 20:21:35 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -26,7 +26,9 @@ export const createShouldEmitToolResult = (params: {
|
||||
const store = loadSessionStore(params.storePath);
|
||||
const entry = store[params.sessionKey];
|
||||
const current = normalizeVerboseLevel(String(entry?.verboseLevel ?? ""));
|
||||
if (current) return current !== "off";
|
||||
if (current) {
|
||||
return current !== "off";
|
||||
}
|
||||
} catch {
|
||||
// ignore store read failures
|
||||
}
|
||||
@@ -49,7 +51,9 @@ export const createShouldEmitToolOutput = (params: {
|
||||
const store = loadSessionStore(params.storePath);
|
||||
const entry = store[params.sessionKey];
|
||||
const current = normalizeVerboseLevel(String(entry?.verboseLevel ?? ""));
|
||||
if (current) return current === "full";
|
||||
if (current) {
|
||||
return current === "full";
|
||||
}
|
||||
} catch {
|
||||
// ignore store read failures
|
||||
}
|
||||
@@ -72,9 +76,15 @@ export const signalTypingIfNeeded = async (
|
||||
): Promise<void> => {
|
||||
const shouldSignalTyping = payloads.some((payload) => {
|
||||
const trimmed = payload.text?.trim();
|
||||
if (trimmed) return true;
|
||||
if (payload.mediaUrl) return true;
|
||||
if (payload.mediaUrls && payload.mediaUrls.length > 0) return true;
|
||||
if (trimmed) {
|
||||
return true;
|
||||
}
|
||||
if (payload.mediaUrl) {
|
||||
return true;
|
||||
}
|
||||
if (payload.mediaUrls && payload.mediaUrls.length > 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
if (shouldSignalTyping) {
|
||||
|
||||
Reference in New Issue
Block a user