@myun/gimi-chat 0.4.0 → 0.4.1

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.
@@ -100,7 +100,8 @@ var CommonChat = /*#__PURE__*/React.forwardRef(function (props, ref) {
100
100
  messageList: messageList,
101
101
  agentDetail: agentObj,
102
102
  conversationId: store.getState().gimiMenu.conversationId,
103
- inputEditor: chatInputRef.current
103
+ inputEditor: chatInputRef.current,
104
+ uploadFileList: store.getState().gimiMenu.fileList
104
105
  };
105
106
  });
106
107
  React.useEffect(function () {
@@ -77,7 +77,7 @@ var useChatHistory = function useChatHistory(checkUnfinishedMessage, scrollBotto
77
77
 
78
78
  // 处理加载历史后的滚动补偿
79
79
  useLayoutEffect(function () {
80
- if (historyScrollRef.current && containerRef.current) {
80
+ if (historyScrollRef.current && containerRef.current && !isMoreLoading) {
81
81
  var _historyScrollRef$cur = historyScrollRef.current,
82
82
  height = _historyScrollRef$cur.height,
83
83
  top = _historyScrollRef$cur.top;
@@ -94,7 +94,7 @@ var useChatHistory = function useChatHistory(checkUnfinishedMessage, scrollBotto
94
94
  }
95
95
  historyScrollRef.current = null;
96
96
  }
97
- }, [messageList]);
97
+ }, [messageList, isMoreLoading, containerRef]);
98
98
 
99
99
  // 处理滚动事件
100
100
  useEffect(function () {
@@ -26,6 +26,7 @@ export interface CommonChatRef {
26
26
  agentDetail?: AgentConfig;
27
27
  conversationId?: number | null;
28
28
  inputEditor?: ChatInputRef | null;
29
+ uploadFileList?: FileItem[];
29
30
  }
30
31
 
31
32
  export interface IAIInputProps {