fix: record message confirmations in context

This commit is contained in:
Xin Wang
2026-08-11 14:15:10 +08:00
parent 86639692ba
commit fc026e765e
6 changed files with 273 additions and 8 deletions

View File

@@ -22,6 +22,7 @@ from services.message_stage import (
MessageDisplaySpec,
MessageStageRunner,
MessageStageSpec,
confirmation_context_message,
)
from services.pipecat.call_lifecycle import playback_marker_for
from services.pipecat.realtime_tools import RealtimeTool, RealtimeToolResult
@@ -893,7 +894,17 @@ class WorkflowRealtimeController:
node_id=node_id,
code="workflow_message_error",
)
return result.succeeded
return False
context_message = confirmation_context_message(
result,
source=f"workflow-message:{node_id}",
)
if context_message is not None:
await self._runtime.realtime.send_text(
context_message["content"],
run_immediately=False,
)
return True
async def _enter_action(self, node_id: str) -> bool:
self._state.enter(node_id, WorkflowStatus.RUNNING_ACTION)