@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.
- package/dist/apis/useApi.d.ts +3 -0
- package/dist/apis/useApi.js +24 -3
- package/dist/client/components/history-list/index.js +10 -6
- package/dist/client/components/new-main/index.js +3 -116
- package/dist/client/components/slider/index.d.ts +2 -1
- package/dist/client/components/slider/index.js +9 -21
- package/dist/client/core/chat.js +27 -13
- package/dist/client/core/index.css +6 -3
- package/dist/client/core/index.d.ts +2 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/components/answer-item/index.js +14 -1
- package/dist/components/chat-input/index.js +9 -1
- package/dist/components/chat-input/index.module.css +2 -0
- package/dist/components/message-list/index.module.css +2 -0
- package/dist/components/templates/CommonChat.js +8 -13
- package/dist/components/templates/index.module.css +1 -0
- package/dist/hooks/useChatHistory.js +1 -2
- package/dist/hooks/useChatStream.js +1 -2
- package/dist/hooks/useCommonChatAPI.d.ts +4 -4
- package/dist/hooks/useCommonChatAPI.js +230 -166
- package/dist/store/slices/gimiMenuSlice.d.ts +4 -2
- package/dist/store/slices/gimiMenuSlice.js +16 -15
- package/dist/types/chat.d.ts +2 -0
- package/dist/umd/index.min.js +1 -1
- package/package.json +1 -1
- package/dist/client/components/common-chat/index.d.ts +0 -5
- package/dist/client/components/common-chat/index.js +0 -207
- package/dist/client/components/common-chat/index.module.css +0 -109
|
@@ -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({},
|
|
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({},
|
|
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 {
|
|
3
|
-
declare const useCommonChatAPI: (containerRef: React.RefObject<HTMLDivElement>, platform: string, stopTTSByText?: () => void, isPlaying?: boolean, agentId?: number, reloadAgentKey?: string, resetKey?: string, interruptKey?: string,
|
|
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<
|
|
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;
|