mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-11 17:21:13 +00:00
* perf(inbound): trim dispatch and command startup imports * fix(reply): restore command alias canonicalization * style(reply): format command context * fix(reply): restore runtime shim exports * test(reply): mock ACP route seam * fix(reply): repair dispatch type seams * perf(inbound): defer followup reply helpers * refactor(tts): share auto mode normalization * fix(reply): catch followup compaction notice failures
15 lines
462 B
TypeScript
15 lines
462 B
TypeScript
import type { TtsAutoMode } from "../config/types.tts.js";
|
|
|
|
export const TTS_AUTO_MODES = new Set<TtsAutoMode>(["off", "always", "inbound", "tagged"]);
|
|
|
|
export function normalizeTtsAutoMode(value: unknown): TtsAutoMode | undefined {
|
|
if (typeof value !== "string") {
|
|
return undefined;
|
|
}
|
|
const normalized = value.trim().toLowerCase();
|
|
if (TTS_AUTO_MODES.has(normalized as TtsAutoMode)) {
|
|
return normalized as TtsAutoMode;
|
|
}
|
|
return undefined;
|
|
}
|