When a streaming error occurs mid-tool-call (e.g., JSON parse error),
the tool call gets recorded with `partialJson` and `stopReason: "error"`.
Previously, the transcript repair function would insert synthetic
tool_results for these incomplete tool calls, but the API rejected them
as orphans because the original tool_use block was malformed.
This fix:
1. Adds `stripIncompleteToolCalls()` to filter out tool calls with
`partialJson` from assistant messages that have `stopReason: "error"`
2. Updates `extractToolCallsFromAssistant()` to skip any tool call
block that has `partialJson` property
Now when a streaming error happens mid-tool-call:
- The incomplete tool call is stripped from the message
- No synthetic tool_result is inserted for it
- The API request remains valid
Fixes issue where sessions became permanently broken after a single
streaming error, requiring manual session file deletion to recover.