Tells whether json may already be complete, i.e. whether handing it to JSON.parse can succeed at all.
Tool call arguments are rendered repeatedly while they stream in, and the arguments object is truncated
until the last delta arrives: JSON.parse would scan the whole string only to throw, which gets quadratic
as the arguments grow (noticeable with large payloads such as whole-file writes). An arguments object can
only be complete once it ends with }, so callers skip the parse until then. Text that does not start
with { is not a streaming arguments object and is always considered worth parsing.
Tells whether
jsonmay already be complete, i.e. whether handing it toJSON.parsecan succeed at all.Tool call arguments are rendered repeatedly while they stream in, and the arguments object is truncated until the last delta arrives:
JSON.parsewould scan the whole string only to throw, which gets quadratic as the arguments grow (noticeable with large payloads such as whole-file writes). An arguments object can only be complete once it ends with}, so callers skip the parse until then. Text that does not start with{is not a streaming arguments object and is always considered worth parsing.