@myun/gimi-chat 0.2.0 → 0.2.2

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.
@@ -122,7 +122,6 @@ var useChatHistory = function useChatHistory(checkUnfinishedMessage, scrollBotto
122
122
 
123
123
  // 获取对话记录
124
124
  var getContentMessageList = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
125
- var _bussinessParamsRef$c;
126
125
  var pageIndex,
127
126
  curPageSize,
128
127
  currentMessageList,
@@ -145,7 +144,7 @@ var useChatHistory = function useChatHistory(checkUnfinishedMessage, scrollBotto
145
144
  curPageSize = _args.length > 1 && _args[1] !== undefined ? _args[1] : param.pageSize;
146
145
  currentMessageList = messageListRef.current;
147
146
  currentAgentObj = agentObjRef.current;
148
- currentBussinessParams = _objectSpread({}, ((_bussinessParamsRef$c = bussinessParamsRef.current) === null || _bussinessParamsRef$c === void 0 ? void 0 : _bussinessParamsRef$c.bussinessParams) || {});
147
+ currentBussinessParams = _objectSpread({}, bussinessParamsRef.current || {});
149
148
  _context.prev = 5;
150
149
  params = {
151
150
  pageIndex: pageIndex,
@@ -65,7 +65,6 @@ export var useChatStream = function useChatStream(platform) {
65
65
  url,
66
66
  fullResponse,
67
67
  reasoningResponse,
68
- _bussinessParamsRef$c,
69
68
  _args = arguments;
70
69
  return _regeneratorRuntime().wrap(function _callee$(_context) {
71
70
  while (1) switch (_context.prev = _context.next) {
@@ -112,7 +111,7 @@ export var useChatStream = function useChatStream(platform) {
112
111
  botId: "BOT1766633236586",
113
112
  content: '',
114
113
  mapInput: {},
115
- sysInfo: _objectSpread({}, (_bussinessParamsRef$c = bussinessParamsRef.current) === null || _bussinessParamsRef$c === void 0 ? void 0 : _bussinessParamsRef$c.bussinessParams)
114
+ sysInfo: _objectSpread({}, bussinessParamsRef.current)
116
115
  })
117
116
  }), {}, {
118
117
  openWhenHidden: true,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { IChatMessageItem } from "../interfaces/chatMessage";
3
- declare const useCommonChatAPI: (containerRef: React.RefObject<HTMLDivElement>, platform: string, stopTTSByText?: () => void, isPlaying?: boolean, agentId?: number, reloadAgentKey?: string, resetKey?: string, interruptKey?: string, onConversationCreated?: ((conversationId: number) => void) | undefined, onSendEnd?: ((message: IChatMessageItem) => void) | undefined) => {
2
+ import { IAIInputProps } from "../types/chat";
3
+ declare const useCommonChatAPI: (containerRef: React.RefObject<HTMLDivElement>, platform: string, stopTTSByText?: () => void, isPlaying?: boolean, agentId?: number, reloadAgentKey?: string, resetKey?: string, interruptKey?: string, chatInputConfig?: IAIInputProps) => {
4
4
  headerValue: string;
5
5
  getHeaderValue: (conversationId: number) => Promise<void>;
6
6
  msgLoading: boolean;
@@ -20,9 +20,9 @@ declare const useCommonChatAPI: (containerRef: React.RefObject<HTMLDivElement>,
20
20
  showBackBottom: boolean;
21
21
  isScrolling: boolean;
22
22
  isMoreLoading: boolean;
23
- startConversationAndChat: (value: string) => Promise<string | undefined>;
23
+ startConversationAndChat: (value: string) => Promise<void>;
24
24
  deleteConversation: () => Promise<void>;
25
- regenerate: () => void;
25
+ regenerate: () => Promise<void>;
26
26
  startAICorrection: (answerId: number, questionId: number) => Promise<void>;
27
27
  };
28
28
  export default useCommonChatAPI;