Skip to main content

extract_in_progress_turn_id

Function extract_in_progress_turn_id 

Source
fn extract_in_progress_turn_id(result: &Value) -> Option<String>
Expand description

The id of whichever turn in thread.turns (a ThreadResumeResponse field, populated on thread/resume) has status: "inProgress", if any. TurnStatus’s only other values (completed/interrupted/failed) are all terminal, so at most one entry can ever match. Malformed/missing shapes intentionally fall through to None rather than erroring — this is best-effort derivation of pre-existing state, not a required field.