- backend: StreamingBackend interface + StreamEvent type - backend/ollama: ChatStream with line-by-line JSON-LD decoder - backend/openai: ChatStream with SSE delta parser + tool arg accumulation - agent/loop: runStreamStep reads deltas, emits OutputMsg per chunk, deduplicates call/tool display between stream and outer loop - main: agentMsg tea type streams incremental updates to the TUI; plain string buf replaces strings.Builder (avoids copy-by-value panic); drainAgent cancels in-flight goroutines cleanly on user interrupt |
||
|---|---|---|
| .. | ||
| backend.go | ||
| new.go | ||
| ollama.go | ||
| openai.go | ||