import { RiArrowRightLine } from '@remixicon/react' import { useTranslation } from 'react-i18next' import type { AgentLogItemWithChildren, NodeTracing, } from '@/types/workflow' type AgentLogTriggerProps = { nodeInfo: NodeTracing onShowAgentOrToolLog: (detail?: AgentLogItemWithChildren) => void } const AgentLogTrigger = ({ nodeInfo, onShowAgentOrToolLog, }: AgentLogTriggerProps) => { const { t } = useTranslation() const { agentLog, execution_metadata } = nodeInfo const agentStrategy = execution_metadata?.tool_info?.agent_strategy return (
{ onShowAgentOrToolLog({ id: nodeInfo.id, children: agentLog || [] } as AgentLogItemWithChildren) }} >
{t('workflow.nodes.agent.strategy.label')}
{ agentStrategy && (
{agentStrategy}
) }
{t('runLog.detail')}
) } export default AgentLogTrigger