import { TNode } from '../common'; import type { TextareaProps, CollapsePanelProps, AvatarProps } from 'tdesign-vue-next'; export interface TdChatItemProps { actions?: string | TNode; animation?: 'skeleton' | 'moving' | 'gradient'; avatar?: String | AvatarProps | TNode; content?: string | TNode; datetime?: string | TNode; name?: string | TNode; reasoning?: boolean | TdChatReasoning; role?: 'user' | 'assistant' | 'error' | 'model-change' | 'system'; textLoading?: boolean; variant?: 'base' | 'outline' | 'text'; } export interface TdChatProps { layout?: Layout; reverse?: boolean; data?: Array; textLoading?: boolean; clearHistory?: boolean | TNode; actions?: TNode; isStreamLoad?: boolean; onClear?: (context: { e: MouseEvent; }) => void; } export interface TdChatListProps { data?: Array; textLoading?: boolean; onScroll?: (e: Event) => void; } export interface TdChatContentProps { content?: string; role?: string; isNormalText?: boolean; textLoading: boolean; } export interface TdChatActionsProps { isGood?: Boolean; isBad?: Boolean; content?: string; disabled?: boolean; onOperation?: (value: string, context: { e: MouseEvent; index?: number; item?: TdChatItemProps; }) => void; } export interface TdChatInputProps { placeholder?: string; disabled?: boolean; value: string; modelValue: string; defaultValue: string; autosize?: boolean | { minRows?: number; maxRows?: number; }; onSend?: (value: string, context: { e: MouseEvent | KeyboardEvent; }) => void; onStop?: (value: string, context: { e: MouseEvent; }) => void; onChange?: (value: string, context: { e: InputEvent | MouseEvent | KeyboardEvent; }) => void; onBlur?: (value: string, context: { e: FocusEvent; }) => void; onFocus?: (value: string, context: { e: FocusEvent; }) => void; } export interface TdChatSenderProps { disabled?: boolean; placeholder?: string; prefix?: string | TNode; stopDisabled?: boolean; suffix?: string | TNode; textareaProps?: TextareaProps; value?: string; defaultValue?: string; modelValue?: string; onBlur?: (value: string, context: { e: FocusEvent; }) => void; onChange?: (value: string, context: { e: InputEvent | MouseEvent | KeyboardEvent; }) => void; onFocus?: (value: string, context: { e: FocusEvent; }) => void; onSend?: (value: string, context: { e: MouseEvent | KeyboardEvent; }) => void; onStop?: (value: string, context: { e: MouseEvent; }) => void; onFileSelect?: (params: { files: File[]; name: UploadActionType; }) => void; } export interface MetaData { avatar?: string; name?: string; [key: string]: any; } export interface TdChatItemMeta { avatar?: string; name?: string; role?: string; datetime?: string; } export interface TdChatReasoningProps { collapsePanelProps?: CollapsePanelProps; expandIcon?: TNode; expandIconPlacement?: 'left' | 'right'; header?: TNode; headerRightContent?: TNode; onExpandChange?: (value: boolean) => void; collapsed?: boolean; } export declare type ModelRoleEnum = 'assistant' | 'user' | 'error' | 'model-change' | 'system'; export declare type Variant = 'text' | 'base' | 'outline'; export declare type Layout = 'single' | 'both'; export declare type animation = 'skeleton' | 'moving' | 'gradient'; export interface FetchSSEOptions { success?: (res: SSEEvent) => void; fail?: () => void; complete?: (isOk: Boolean, msg?: String, requestid?: String) => void; } export interface SSEEvent { type: string | null; data: string | null; } export interface BackBottomParams { behavior?: 'auto' | 'smooth'; } export interface ChatInstanceFunctions { scrollToBottom?: (params?: BackBottomParams) => void; } export interface TdChatReasoning { expandIconPlacement?: 'left' | 'right'; onExpandChange?: (isExpand: boolean) => void; collapsePanelProps?: Object; collapsed?: boolean; } export declare type UploadActionType = 'uploadAttachment' | 'uploadImage'; export interface UploadActionConfig { name: UploadActionType; uploadProps?: { multiple?: boolean; accept?: string; }; action: (params: { files: File[]; name: UploadActionType; }) => void; }