This commit is contained in:
mnasrautinno 2025-12-29 16:33:41 +08:00 committed by GitHub
commit c5eef62ac4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -35,6 +35,7 @@ from core.workflow.node_events import (
AgentLogEvent,
NodeEventBase,
NodeRunResult,
RunRetrieverResourceEvent,
StreamChunkEvent,
StreamCompletedEvent,
)
@ -670,6 +671,11 @@ class AgentNode(Node[AgentNodeData]):
agent_logs.append(agent_log)
yield agent_log
elif message.type == ToolInvokeMessage.MessageType.RETRIEVER_RESOURCES:
assert isinstance(message.message, ToolInvokeMessage.RetrieverResourceMessage)
retriever_resources = message.message.retriever_resources
context_str = message.message.context
yield RunRetrieverResourceEvent(retriever_resources=retriever_resources, context=context_str)
# Add agent_logs to outputs['json'] to ensure frontend can access thinking process
json_output: list[dict[str, Any]] = []