import { RAGFlowFormItem } from '@/components/ragflow-form'; import { Input } from '@/components/ui/input'; import { t } from 'i18next'; import { z } from 'zod'; export type OutputType = { title: string; type?: string; }; type OutputProps = { list: Array; isFormRequired?: boolean; }; export function transferOutputs(outputs: Record) { return Object.entries(outputs).map(([key, value]) => ({ title: key, type: value?.type, })); } export const OutputSchema = { outputs: z.record(z.any()), }; export function Output({ list, isFormRequired = false }: OutputProps) { return (
{t('flow.output')}
    {list.map((x, idx) => (
  • {x.title}: {x.type}
  • ))}
{isFormRequired && ( )}
); }