| Earl Lee | 2e463fb | 2025-04-17 11:22:22 -0700 | [diff] [blame] | 1 | /** |
| 2 | * Get the icon text to display for a message type | ||||
| 3 | * @param type - The message type | ||||
| 4 | * @returns The single character to represent this message type | ||||
| 5 | */ | ||||
| 6 | export function getIconText(type: string | null | undefined): string { | ||||
| 7 | switch (type) { | ||||
| 8 | case "user": | ||||
| 9 | return "U"; | ||||
| 10 | case "agent": | ||||
| 11 | return "A"; | ||||
| 12 | case "tool": | ||||
| 13 | return "T"; | ||||
| 14 | case "error": | ||||
| 15 | return "E"; | ||||
| 16 | default: | ||||
| 17 | return "?"; | ||||
| 18 | } | ||||
| 19 | } | ||||