'use client' import type { FC } from 'react' import type { AgentIteration } from '@/models/log' import { useTranslation } from 'react-i18next' import Divider from '@/app/components/base/divider' import { cn } from '@/utils/classnames' import ToolCall from './tool-call' type Props = { isFinal: boolean index: number iterationInfo: AgentIteration } const Iteration: FC = ({ iterationInfo, isFinal, index }) => { const { t } = useTranslation() return (
{isFinal && (
{t('agentLogDetail.finalProcessing', { ns: 'appLog' })}
)} {!isFinal && (
{`${t('agentLogDetail.iteration', { ns: 'appLog' }).toUpperCase()} ${index}`}
)}
{iterationInfo.tool_calls.map((toolCall, index) => ( ))}
) } export default Iteration