Commit 8cec33c
Muhamed Fazal PS
fix: _is_trivial_response no longer skips valid JSON responses (#24)
Removed the naive text.startswith('{') and text.startswith('[') checks
in _is_trivial_response that caused all JSON-formatted responses to be
classified as trivial. JSON responses like {key: value} are valid
structured responses that should be extracted.
High symbol-ratio responses (e.g. code snippets) are still correctly
caught by the existing code_chars density check (lines 170-174).
Updated test assertions to match new behavior.
Fixes #241 parent 9df3738 commit 8cec33c
2 files changed
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
177 | 175 | | |
178 | 176 | | |
179 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | | - | |
| 137 | + | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
0 commit comments