import type { TextareaHTMLAttributes, ReactNode } from 'react'
export type InputPropsWithWebkitDirectory = React.InputHTMLAttributes & {
webkitdirectory?: string
}
export interface FolderPermissionConfig {
enable?: boolean
projectName?: string
}
export interface GenerationStatusConfig {
content?: ReactNode
icon?: ReactNode
time?: string
}
export interface FooterLeftModelSwitchItem {
value: string
label: string
icon?: ReactNode
}
export interface FooterLeftModelSwitchConfig {
modeSwitch: {
icon?: ReactNode
label: string
value: string
options: FooterLeftModelSwitchItem[]
onChange: (value: string) => void
}
modelSwitch: {
label: string
value: string
options: FooterLeftModelSwitchItem[]
onChange: (value: string) => void
}
consumptionMultiplier: {
value: string
options?: FooterLeftModelSwitchItem[]
onChange?: (value: string) => void
}
}
export interface ChatInputProps extends Omit, 'onChange' | 'value'> {
value?: string
onChange?: (value: string) => void
onSend?: (value: string) => void
placeholder?: string
disabled?: boolean
maxRows?: number
form?: string
attachments?: { files?: ReactNode; images?: ReactNode } | ReactNode
showFooter?: boolean
showFolderButton?: boolean
folderButtonLabel?: string
onFolderButtonClick?: () => void
onFolderClear?: () => void
folderPermission?: FolderPermissionConfig
showMoreButton?: boolean
onMoreButtonClick?: () => void
footerLeftConfig?: FooterLeftModelSwitchConfig
sendButtonStatus?: 'normal' | 'generating'
showGenerationStatus?: boolean
generationStatus?: GenerationStatusConfig
addLargeIcon?: ReactNode
folderIcon?: ReactNode
folderOpenIcon?: ReactNode
historyIcon?: ReactNode
arrowDownIcon?: ReactNode
subMenuArrowIcon?: ReactNode
folderFillIcon?: ReactNode
closeIcon?: ReactNode
/** 供 Portal 浮层继承(Showcase 预览区等场景),不传则由 dropdown-menu 使用 getThemeFromDocument() 兜底 */
dataStyle?: string
dataTheme?: string
}