renderText renders an assistant text entry.
(entry LogEntry)
| 371 | |
| 372 | // renderText renders an assistant text entry. |
| 373 | func (l *LogViewer) renderText(entry LogEntry) []string { |
| 374 | if entry.Text == "" { |
| 375 | return []string{} |
| 376 | } |
| 377 | |
| 378 | textStyle := lipgloss.NewStyle().Foreground(TextColor) |
| 379 | wrapped := wrapText(entry.Text, l.width-4) |
| 380 | lines := strings.Split(wrapped, "\n") |
| 381 | |
| 382 | var result []string |
| 383 | for _, line := range lines { |
| 384 | result = append(result, textStyle.Render(line)) |
| 385 | } |
| 386 | return result |
| 387 | } |
| 388 | |
| 389 | // renderToolCard renders a tool call as a single styled line with icon and argument. |
| 390 | func (l *LogViewer) renderToolCard(entry LogEntry) []string { |
no test coverage detected