mirror of
https://github.com/anthropics/claude-code-sdk-python.git
synced 2025-07-07 14:45:00 +00:00
Update subprocess_cli.py
This commit is contained in:
parent
e8c53e199e
commit
e9af109c67
1 changed files with 5 additions and 0 deletions
|
@ -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("}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue