feat(agent-runner): expose effective prompt and transcript history

This commit is contained in:
huanghuoguoguo
2026-06-04 00:21:30 +08:00
committed by huanghuoguoguo
parent 3dc579feb3
commit bd690a79f0
14 changed files with 363 additions and 85 deletions
@@ -147,10 +147,11 @@ class ChatMessageHandler(handler.MessageHandler):
f'Conversation({query.query_id}) Streaming completed: {chunk_count} chunks, {text_length} chars'
)
# Update conversation history
conversation = await self._ensure_conversation_for_history(query)
conversation.messages.append(query.user_message)
conversation.messages.extend(query.resp_messages)
# Keep a conversation object available for downstream legacy
# readers, but do not mirror AgentRunner history into
# conversation.messages. TranscriptStore is the canonical
# history source for this path.
await self._ensure_conversation_for_history(query)
except Exception as e:
# Import orchestrator errors for specific handling