feat: add /reasoning reasoning visibility
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
export type ThinkLevel = "off" | "minimal" | "low" | "medium" | "high";
|
||||
export type VerboseLevel = "off" | "on";
|
||||
export type ElevatedLevel = "off" | "on";
|
||||
export type ReasoningLevel = "off" | "on";
|
||||
|
||||
// Normalize user-provided thinking level strings to the canonical enum.
|
||||
export function normalizeThinkLevel(
|
||||
@@ -55,3 +56,31 @@ export function normalizeElevatedLevel(
|
||||
if (["on", "true", "yes", "1"].includes(key)) return "on";
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Normalize reasoning visibility flags used to toggle reasoning exposure.
|
||||
export function normalizeReasoningLevel(
|
||||
raw?: string | null,
|
||||
): ReasoningLevel | undefined {
|
||||
if (!raw) return undefined;
|
||||
const key = raw.toLowerCase();
|
||||
if (
|
||||
[
|
||||
"off",
|
||||
"false",
|
||||
"no",
|
||||
"0",
|
||||
"hide",
|
||||
"hidden",
|
||||
"disable",
|
||||
"disabled",
|
||||
].includes(key)
|
||||
)
|
||||
return "off";
|
||||
if (
|
||||
["on", "true", "yes", "1", "show", "visible", "enable", "enabled"].includes(
|
||||
key,
|
||||
)
|
||||
)
|
||||
return "on";
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user