import type { AgentLogItemWithChildren } from '@/types/workflow' import { Button } from '@langgenius/dify-ui/button' import { useTranslation } from 'react-i18next' import AgentLogNavMore from './agent-log-nav-more' type AgentLogNavProps = { agentOrToolLogItemStack: AgentLogItemWithChildren[] onShowAgentOrToolLog: (detail?: AgentLogItemWithChildren) => void } export function AgentLogNav({ agentOrToolLogItemStack, onShowAgentOrToolLog }: AgentLogNavProps) { const { t } = useTranslation() const agentOrToolLogItemStackLength = agentOrToolLogItemStack.length const first = agentOrToolLogItemStack[0] const mid = agentOrToolLogItemStack.slice(1, -1) const end = agentOrToolLogItemStack.at(-1) return (