mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 16:01:24 +00:00
refactor(usage): centralize responseUsage mode
This commit is contained in:
@@ -103,6 +103,10 @@ export function normalizeUsageDisplay(raw?: string | null): UsageDisplayLevel |
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function resolveResponseUsageMode(raw?: string | null): UsageDisplayLevel {
|
||||
return normalizeUsageDisplay(raw) ?? "off";
|
||||
}
|
||||
|
||||
// Normalize elevated flags used to toggle elevated bash permissions.
|
||||
export function normalizeElevatedLevel(raw?: string | null): ElevatedLevel | undefined {
|
||||
if (!raw) return undefined;
|
||||
|
||||
Reference in New Issue
Block a user