Skip to main content

normalize_turn_response

Function normalize_turn_response 

Source
pub fn normalize_turn_response(
    response: AgentResponse,
    protocol_profile: ProtocolRequestProfile,
) -> AgentResponse
Expand description

Normalizes one parsed turn response according to the request profile.

Interactive session turns expect a summary block on every response so the worker can persist and render a Change Summary section even when no change text exists. Some providers still emit summary: null for compliant session-turn JSON, so this fills in an empty summary object that downstream rendering already maps to No changes.