Files
test-openclaw/src/acp/conversation-id.ts
T

10 lines
275 B
TypeScript

export function normalizeConversationText(value: unknown): string {
if (typeof value === "string") {
return value.trim();
}
if (typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") {
return `${value}`.trim();
}
return "";
}