import type { AgentLogItemWithChildren } from '@/types/workflow' import { useTranslation } from 'react-i18next' import AgentLogItem from './agent-log-item' import { AgentLogNav } from './agent-log-nav' type AgentResultPanelProps = { agentOrToolLogItemStack: AgentLogItemWithChildren[] agentOrToolLogListMap: Record onShowAgentOrToolLog: (detail?: AgentLogItemWithChildren) => void } const AgentResultPanel = ({ agentOrToolLogItemStack, agentOrToolLogListMap, onShowAgentOrToolLog, }: AgentResultPanelProps) => { const { t } = useTranslation() const top = agentOrToolLogItemStack[agentOrToolLogItemStack.length - 1] const list = agentOrToolLogListMap[top!.message_id] return (
{list!.map((item) => ( ))}
{top!.hasCircle && (
{t(($) => $.circularInvocationTip, { ns: 'runLog' })}
)}
) } export default AgentResultPanel