Commit bffad54
feat: PTY providers use native JSON streaming, not fragile PTY prompt detection
Stream() now uses each CLI's built-in JSON streaming output instead of
trying to detect prompts in rich TUI output:
- Claude Code: --output-format stream-json --verbose (structured events)
- Gemini CLI: --output-format stream-json
- Others: fallback to non-interactive exec + single event emission
Removed the isPTYProvider hack that forced Chat() in the chat handler.
Stream() is now the universal path for all provider types.
Verified both Claude Code and Ollama work through Stream():
- Claude Code: stream-json parsing extracts assistant text events
- Ollama: standard Genkit streaming (unchanged)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 738cf99 commit bffad54
3 files changed
Lines changed: 3 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | 179 | | |
212 | 180 | | |
213 | 181 | | |
| |||
0 commit comments