(command: string)
| 73 | } |
| 74 | |
| 75 | export function commandPreview(command: string): string { |
| 76 | const normalized = command.replace(/\s+/g, " ").trim(); |
| 77 | return normalized.length > 120 ? `${normalized.slice(0, 117)}...` : normalized; |
| 78 | } |
| 79 | |
| 80 | function firstHeaderValue(value: string | undefined): string | undefined { |
| 81 | return value?.split(",")[0]?.trim() || undefined; |