@@ -486,46 +486,16 @@ func (m *Model) applyToolResultMsg(msg llmToolResultMsg) {
486486 startLine = toolCallEditLine(tc.Arguments)
487487 }
488488
489- // Determine the tool name for display decisions.
490- var toolName string
491- if tc, ok := m.pendingToolCalls[msg.toolCallID]; ok {
492- toolName = tc.Name
493- }
494-
495- // Grep and Shell show all lines (each clickable); others truncate.
496- showFull := toolName == "Grep" || toolName == "Shell"
497-
498- // Split diagnostic lines from the main content so they're always shown.
499489 body, diagLines := extractDiagLines(msg.content)
500-
501- lines := strings.Split(body, "\n")
502- preview := lines
503- truncated := false
504- if !showFull && len(lines) > maxPreviewLines {
505- preview = lines[:maxPreviewLines]
506- truncated = true
490+ if idx := strings.Index(body, "\n"); idx >= 0 {
491+ body = body[:idx]
507492 }
508493
509494 arrow := m.styles.ToolArrow.Render("←") + " "
510- entry := func(display string) convEntry {
511- return convEntry{display: display, kind: entryToolResult, filePath: filePath, full: msg.content, line: startLine}
512- }
513- var wasBottom bool
514- for i, line := range preview {
515- display := m.styleToolResultLine(line)
516- if i == 0 {
517- display = arrow + display
518- wasBottom = m.appendConv(entry(display))
519- } else {
520- m.appendConv(entry(display))
521- }
522- }
523- if truncated {
524- hint := fmt.Sprintf(" ... %d more lines (click to view)", len(lines)-maxPreviewLines)
525- m.appendConv(entry(m.styles.Muted.Render(hint)))
526- }
495+ entry := convEntry{display: arrow + m.styleToolResultLine(body), kind: entryToolResult, filePath: filePath, full: msg.content, line: startLine}
496+ wasBottom := m.appendConv(entry)
527497 for _, dl := range diagLines {
528- m.appendConv(entry(m.styleToolResultLine(dl)))
498+ m.appendConv(convEntry{display: m.styleToolResultLine(dl), kind: entryToolResult, filePath: filePath, full: msg.content, line: startLine})
529499 }
530500 if wasBottom {
531501 m.scrollOffset = 0
@@ -547,6 +517,8 @@ func extractDiagLines(content string) (body string, diags []string) {
547517 return content[:idx], diags
548518 }
549519
520+
521+
550522 // styleToolResultLine applies semantic styling to a tool result line.
551523 // Diagnostic lines (ERROR/WARNING) get colored; everything else is dim.
552524 func (m *Model) styleToolResultLine(line string) string {