refactor(ui): implement dedicated package @page-agent/ui

This commit is contained in:
Simon
2025-12-15 17:34:12 +08:00
parent 2b8b6ef86a
commit d1c8ca8197
18 changed files with 150 additions and 15 deletions

6
packages/ui/src/utils.ts Normal file
View File

@@ -0,0 +1,6 @@
export function truncate(text: string, maxLength: number): string {
if (text.length > maxLength) {
return text.substring(0, maxLength) + '...'
}
return text
}