import type { FileEntity } from '@/app/components/base/file-uploader/types' import type { FileUploadConfigResponse } from '@/models/common' import type { VarInInspect } from '@/types/workflow' import { FileUploaderInAttachmentWrapper } from '@/app/components/base/file-uploader' import { FILE_EXTS } from '@/app/components/base/prompt-editor/constants' import Textarea from '@/app/components/base/textarea' import ErrorMessage from '@/app/components/workflow/nodes/llm/components/json-schema-config-modal/error-message' import SchemaEditor from '@/app/components/workflow/nodes/llm/components/json-schema-config-modal/schema-editor' import { SupportUploadFileTypes } from '@/app/components/workflow/types' import { TransferMethod } from '@/types/app' import { cn } from '@/utils/classnames' import { PreviewMode } from '../../base/features/types' import BoolValue from '../panel/chat-variable-panel/components/bool-value' import DisplayContent from './display-content' import LargeDataAlert from './large-data-alert' import { PreviewType } from './types' type TextEditorSectionProps = { currentVar: VarInInspect value: unknown textEditorDisabled: boolean isTruncated: boolean onTextChange: (value: string) => void } export const TextEditorSection = ({ currentVar, value, textEditorDisabled, isTruncated, onTextChange, }: TextEditorSectionProps) => { return ( <> {isTruncated && } {currentVar.value_type === 'string' ? ( ) : (