chore: Enable "curly" rule to avoid single-statement if confusion/errors.

This commit is contained in:
cpojer
2026-01-31 16:19:20 +09:00
parent 009b16fab8
commit 5ceff756e1
1266 changed files with 27871 additions and 9393 deletions

View File

@@ -4,8 +4,12 @@ import type { ElevatedLevel, ReasoningLevel } from "./directives.js";
export const SYSTEM_MARK = "⚙️";
export const formatDirectiveAck = (text: string): string => {
if (!text) return text;
if (text.startsWith(SYSTEM_MARK)) return text;
if (!text) {
return text;
}
if (text.startsWith(SYSTEM_MARK)) {
return text;
}
return `${SYSTEM_MARK} ${text}`;
};
@@ -27,8 +31,12 @@ export const formatElevatedEvent = (level: ElevatedLevel) => {
};
export const formatReasoningEvent = (level: ReasoningLevel) => {
if (level === "stream") return "Reasoning STREAM — emit live <think>.";
if (level === "on") return "Reasoning ON — include <think>.";
if (level === "stream") {
return "Reasoning STREAM — emit live <think>.";
}
if (level === "on") {
return "Reasoning ON — include <think>.";
}
return "Reasoning OFF — hide <think>.";
};