fix(tui_gateway): forward response_transformed on turn completion (#96465)
Gateway half of #96467 (7eeb0d4b03), grafted from server.py::_run_prompt_submit into tui_gateway/prompt_turn.py::_complete_turn_payload. Renderer half pending (conflicts with main's use-message-stream). Original commit email unusable; authored with the contributor's noreply address.
This commit is contained in:
@@ -830,6 +830,10 @@ def _complete_turn_payload(session: dict, st: _TurnRun, status_note: str | None,
|
||||
payload["warning"] = status_note
|
||||
if result.get("response_previewed"):
|
||||
payload["response_previewed"] = True
|
||||
# transform_llm_output may rewrite the final after streaming: the renderer must treat
|
||||
# this payload as the authoritative replacement even without a prefix relationship.
|
||||
if result.get("response_transformed"):
|
||||
payload["response_transformed"] = True
|
||||
# Structured billing-wall descriptor: the client renders recovery without re-parsing text.
|
||||
if _billing_block := result.get("billing_block"):
|
||||
payload["billing"] = _billing_block
|
||||
|
||||
Reference in New Issue
Block a user