TestClearResetsSessionTokens: /clear wipes the conversation AND the session counter: starting over from zero is the whole point.
(t *testing.T)
| 2315 | call := chmctx.ToolCall{ID: "c1", Name: "bash"} |
| 2316 | out, _ := m.handleStream(llm.Event{Kind: llm.EventToolCall, ToolCall: &call}) |
| 2317 | om := out.(Model) |
| 2318 | if om.streaming.Len() != 0 { |
| 2319 | t.Fatal("tool call must flush streaming buffer into scroll") |
| 2320 | } |
| 2321 | if !strings.Contains(stripANSI(om.scroll.String()), "I'll run bash") { |
| 2322 | t.Fatalf("content should be committed to scroll before tool call: %q", om.scroll.String()) |
| 2323 | } |
| 2324 | if len(om.pending) != 1 || om.pending[0].Name != "bash" { |
| 2325 | t.Fatalf("tool call should land in pending: %+v", om.pending) |
| 2326 | } |
| 2327 | } |
nothing calls this directly
no test coverage detected