@myun/gimi-chat 0.3.3 → 0.3.4

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.
@@ -1240,7 +1240,7 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
1240
1240
  return function (_x26) {
1241
1241
  return _ref17.apply(this, arguments);
1242
1242
  };
1243
- }(), [dispatch, startChat, chatInputConfig === null || chatInputConfig === void 0 ? void 0 : chatInputConfig.onBeforeSend]);
1243
+ }(), [dispatch, startChat, chatInputConfig === null || chatInputConfig === void 0 ? void 0 : chatInputConfig.onBeforeSend, initAttachments]);
1244
1244
  var handleSendFile = React.useCallback(function (messageList) {
1245
1245
  if (!navigator.onLine) {
1246
1246
  Toast.error('无法连接到网络');
@@ -7,6 +7,20 @@ export interface ChatInputRef {
7
7
  blur: () => void;
8
8
  }
9
9
 
10
+ export type FileItem = {
11
+ uid: string;
12
+ name: string;
13
+ size: string;
14
+ status: FileStatus;
15
+ fileUrl?: string;
16
+ fileName?: string; // 后端返回的文件名(可选)
17
+ fileSize?: number; // 后端返回的文件大小(可选)
18
+ fileType?: string; // 后端返回的文件类型(可选)
19
+ fileId?: string; // 后端返回的文件ID(可选)
20
+ fileToken?: string; // 关键!后端返回的文件标识,用于SSE调用
21
+ content?: string; // SSE返回的内容
22
+ }
23
+
10
24
  export interface CommonChatRef {
11
25
  messageList: IChatMessageItem[];
12
26
  agentDetail?: AgentConfig;