Files
openclaw/extensions/qa-lab/src/progress-format.ts
Peter Steinberger c23d66e3b5 refactor: consolidate coercion ownership (#122692)
* refactor: consolidate coercion ownership

* test: align shard check with weighted planning

* chore: refresh plugin SDK API baseline
2026-08-12 09:25:28 -07:00

14 lines
439 B
TypeScript

export function sanitizeQaProgressValue(value: string): string {
let normalized = "";
for (const char of value) {
const code = char.codePointAt(0);
if (code === undefined) {
continue;
}
const isControl = code <= 0x1f || (code >= 0x7f && code <= 0x9f);
normalized += isControl ? " " : char;
}
normalized = normalized.replace(/\s+/gu, " ").trim();
return normalized.length > 0 ? normalized : "<empty>";
}