(t *testing.T)
| 72 | } |
| 73 | |
| 74 | func TestRenderCompact(t *testing.T) { |
| 75 | out := renderToString(t, sampleSessionJSONL, true) |
| 76 | |
| 77 | if !strings.Contains(out, "Hello, can you help me?") { |
| 78 | t.Error("compact missing user message") |
| 79 | } |
| 80 | if !strings.Contains(out, "─── Tool: Bash ───") { |
| 81 | t.Error("compact missing tool use") |
| 82 | } |
| 83 | if !strings.Contains(out, "Done!") { |
| 84 | t.Error("compact missing assistant text") |
| 85 | } |
| 86 | |
| 87 | if strings.Contains(out, "─── Thinking ───") { |
| 88 | t.Error("compact should omit thinking blocks") |
| 89 | } |
| 90 | if strings.Contains(out, "─── Result") { |
| 91 | t.Error("compact should omit tool results") |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | // retroBindJSONL models a retrospective `flow do --here` bind: the |
| 96 | // whole conversation predates the bind, and there is no later "post- |
nothing calls this directly
no test coverage detected