Update subprocess_cli.py

This commit is contained in:
Alden Olivero 2025-06-18 11:18:24 +05:30 committed by GitHub
parent e8c53e199e
commit e9af109c67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -190,6 +190,11 @@ class SubprocessCLITransport(Transport):
continue
json_buffer += line_str
try:
data = json.loads(json_buffer)
yield data
json_buffer = ""
except json.JSONDecodeError as e:
if json_buffer.startswith("{") or json_buffer.startswith("["):
open_braces = json_buffer.count("{") - json_buffer.count("}")