@huyooo/ai-chat-frontend-react 0.3.20 → 0.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,6 +43,7 @@ interface ChatInputProps {
|
|
|
43
43
|
onModelChange?: (model: string) => void;
|
|
44
44
|
onWebSearchChange?: (enabled: boolean) => void;
|
|
45
45
|
onThinkingChange?: (enabled: boolean) => void;
|
|
46
|
+
onUploadError?: (message: string) => void;
|
|
46
47
|
}
|
|
47
48
|
export declare const ChatInput: import("react").ForwardRefExoticComponent<ChatInputProps & import("react").RefAttributes<ChatInputHandle>>;
|
|
48
49
|
export {};
|
|
@@ -53,6 +53,7 @@ interface MessageBubbleProps {
|
|
|
53
53
|
onRegenerate?: () => void;
|
|
54
54
|
/** 编辑用户消息后重新发送 */
|
|
55
55
|
onSend?: (text: string, images?: import('../../adapter').ImageData[], atContextItems?: AtContextItem[]) => void;
|
|
56
|
+
onUploadError?: (message: string) => void;
|
|
56
57
|
/** 步骤折叠模式 */
|
|
57
58
|
stepsExpandedType?: 'open' | 'close' | 'auto';
|
|
58
59
|
/** 工具调用相关 - 通过 props 传递 */
|
|
@@ -20,12 +20,14 @@ interface UseImageUploadOptions {
|
|
|
20
20
|
maxImages?: number;
|
|
21
21
|
/** 单张图片最大大小(字节),默认 10MB */
|
|
22
22
|
maxSize?: number;
|
|
23
|
-
/** 图片最大宽度,默认
|
|
23
|
+
/** 图片最大宽度,默认 2048px(控制请求体和视觉 token 成本) */
|
|
24
24
|
maxWidth?: number;
|
|
25
|
-
/** 图片最大高度,默认
|
|
25
|
+
/** 图片最大高度,默认 2048px(控制请求体和视觉 token 成本) */
|
|
26
26
|
maxHeight?: number;
|
|
27
|
-
/** 压缩质量 0-1,默认 0.
|
|
27
|
+
/** 压缩质量 0-1,默认 0.82 */
|
|
28
28
|
quality?: number;
|
|
29
|
+
/** 上传失败或跳过时的提示 */
|
|
30
|
+
onError?: (message: string) => void;
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
33
|
* 图片上传 hook
|