mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 23:11:37 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -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>.";
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user