import { default as React } from 'react'; import { ConversationData } from './AiChat.types'; import { Styles } from '@mxmweb/zui'; import { AIChatLocale, AIChatMessages } from '../i18n'; import { ChatOverlayPanelVariant } from './ChatOverlayPanel'; export interface ListItemType { label: string; sessionId: string; gmtModified: number; assistant?: any; [key: string]: any; } export interface ListType { activedItem?: string; data: ListItemType[]; sortRules?: { label: string; dayPeriod: number; }[]; } export interface SidebarTabConfig { key: string; type: 'custom' | 'form'; label: string; icon: React.ReactNode; enabled?: boolean; component?: React.ReactNode; formConfig?: any[]; initialValues?: Record; onChange?: (values: any) => void; [key: string]: any; } export interface AppStatusManager { display: 'ready' | 'loading' | 'error' | 'processing' | 'uploading' | 'thinking' | 'analyzing'; sender: 'ready' | 'loading' | 'error' | 'processing' | 'uploading'; app: 'ready' | 'initializing' | 'error'; } export interface SenderConfig { /** 输入框 placeholder,用于 i18n;未传时使用 AIChat messages.sender.placeholder */ placeholder?: string; upload_size_limit?: number; upload_number_limit?: number; upload_file_type_limit?: string[]; upload_limit_message?: string; actions?: { icon: React.ReactNode; badgeCount?: number; name: string; tip?: string; }[]; switchs?: Array<{ label: string; name: string; type: 'switch' | 'select'; defaultValue?: boolean | string | number; enabled?: boolean; icon?: React.ReactNode; options?: { label: string; value: string | number; }[]; }>; } interface AiChatProps { messagePT?: number; scrollOld?: boolean; activeSessionId: string | undefined; chatData: ConversationData; sidebar?: SidebarTabConfig[]; status: AppStatusManager; recommandQuestions?: string[]; eventsEmit?: (eventName: string, data?: any, callback?: () => void) => void; CustomComponents?: any; fileUploadStatus?: any; styles?: Styles; senderConfig?: SenderConfig; onSenderConfigChange?: (data: { name: string; checked: boolean; all: Record; }) => void; rightbarInitialCollapsed?: boolean; rightbarWidth?: string; onRightbarChange?: (collapsed: boolean) => void; disclaimer?: string | React.ReactNode; chatHeader?: { title?: string; tools?: React.ReactNode; }; locale?: AIChatLocale; messages?: Partial; /** * 布局模式:desktop 保持原有三栏;mobile 强制窄视口布局;auto 按 breakpoint 与视口宽度切换。 * 2026-04-02 新增:默认 desktop,不破坏既有接入方。 */ layoutMode?: 'desktop' | 'mobile' | 'auto'; /** 与 layoutMode=auto 配合,默认 768(<768 视为窄视口) */ breakpoint?: number; /** * 窄视口下右侧栏内容承载形态:bottomSheet 底部抽屉;drawer 右侧全高抽屉。 * 2026-04-02 新增:默认 drawer。 */ panelVariant?: ChatOverlayPanelVariant; /** * 右侧栏在窄视口是否使用覆盖层(不占用主区宽度)。默认 undefined 时与 auto/mobile 一致为 overlay。 * desktop 下始终为内联栏。 */ rightbarVariant?: 'inline' | 'overlay'; /** 是否在 Sender 等区域保留安全区内边距(默认 true) */ safeArea?: boolean; } export default function AiChat({ messagePT, chatData, sidebar, eventsEmit, status, CustomComponents, recommandQuestions, styles, senderConfig, fileUploadStatus, onSenderConfigChange, activeSessionId, scrollOld, rightbarInitialCollapsed, rightbarWidth, onRightbarChange, disclaimer, chatHeader, locale, messages: messagesOverride, layoutMode, breakpoint, panelVariant, rightbarVariant, safeArea, }: AiChatProps): import("react/jsx-runtime").JSX.Element; export {};