| 1 | package cli |
| 2 | |
| 3 | import ( |
| 4 | "strings" |
| 5 | |
| 6 | "reasonix/internal/event" |
| 7 | ) |
| 8 | |
| 9 | func (m *chatTUI) collapseFinalToolOutput(tool event.Tool) { |
| 10 | // Live shell progress is capped; restore the bounded final head+tail result |
| 11 | // so Ctrl+B keeps the command's ending diagnostics. |
| 12 | if strings.HasPrefix(tool.ID, "shell-") { |
| 13 | if tool.Output == "" { |
| 14 | delete(m.shellOutputs, tool.ID) |
| 15 | } else { |
| 16 | m.shellOutputs[tool.ID] = tool.Output |
| 17 | } |
| 18 | } |
| 19 | m.collapseToolOutput(tool.ID, tool.Output) |
| 20 | } |
| 21 |