simonw--llm
aae4eedf16
Iterate prev_response.prompt.messages (the computed Message list) to rebuild prior turn inputs, and funnel each through _append_message_from_message. Output side still uses the flat text / tool_calls accumulators (text_or_raise, tool_calls_or_raise) to avoid calling _build_parts on historical responses whose StreamEvent shape might have used the same part_index for mixed content types.