(text: string, width: number)
| 92 | |
| 93 | // Pad text to fixed width (right-pad with spaces) |
| 94 | const padRight = (text: string, width: number): string => { |
| 95 | // Use Array.from to count code points so emoji/wide chars don't break padding |
| 96 | const len = Array.from(text).length |
| 97 | if (len >= width) return text |
| 98 | return text + ' '.repeat(width - len) |
| 99 | } |
| 100 | |
| 101 | // Convert chats to SelectableListItem format with aligned columns |
| 102 | // Order: time | message count | prompt |
no test coverage detected