'use client' import type { FC } from 'react' import { useTranslation } from 'react-i18next' import { ImageIndentLeft } from '@/app/components/base/icons/src/vender/line/editor' import { Markdown } from '@/app/components/base/markdown' import LoadingAnim from '@/app/components/base/chat/chat/loading-anim' import StatusContainer from '@/app/components/workflow/run/status-container' import { FileList } from '@/app/components/base/file-uploader' import type { FileEntity } from '@/app/components/base/file-uploader/types' type ResultTextProps = { isRunning?: boolean outputs?: any error?: string onClick?: () => void allFiles?: FileEntity[] } const ResultText: FC = ({ isRunning, outputs, error, onClick, allFiles, }) => { const { t } = useTranslation() return (
{isRunning && !outputs && (
)} {!isRunning && error && (
{error}
)} {!isRunning && !outputs && !error && (
{t('runLog.resultEmpty.title')}
{t('runLog.resultEmpty.tipLeft')} {t('runLog.resultEmpty.link')} {t('runLog.resultEmpty.tipRight')}
)} {outputs && (
{!!allFiles?.length && ( )}
)}
) } export default ResultText