mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 17:18:25 +00:00
style: apply oxfmt
This commit is contained in:
@@ -68,7 +68,10 @@ export function markdownToText(markdown: string): string {
|
||||
return normalizeWhitespace(text);
|
||||
}
|
||||
|
||||
export function truncateText(value: string, maxChars: number): { text: string; truncated: boolean } {
|
||||
export function truncateText(
|
||||
value: string,
|
||||
maxChars: number,
|
||||
): { text: string; truncated: boolean } {
|
||||
if (value.length <= maxChars) return { text: value, truncated: false };
|
||||
return { text: value.slice(0, maxChars), truncated: true };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user