@myun/gimi-chat 0.0.5 → 0.0.7
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/components/ai-chat-dialogue/index.js +181 -135
- package/dist/components/ai-correction/index.js +38 -25
- package/dist/components/ai-loading/index.js +12 -8
- package/dist/components/answer-item/index.js +135 -113
- package/dist/components/ask-card/index.js +42 -33
- package/dist/components/chat-input/index.js +135 -114
- package/dist/components/chat-voice/VoiceCommunication.js +23 -21
- package/dist/components/chat-voice/VoiceRecord.js +24 -21
- package/dist/components/conversation-delete/index.js +10 -8
- package/dist/components/dots-loading/index.js +10 -7
- package/dist/components/empty/index.js +12 -7
- package/dist/components/excel-components/ExcelCard.js +7 -3
- package/dist/components/excel-components/ExcelExcuting.js +60 -43
- package/dist/components/excel-components/ExcelFailCard.js +15 -10
- package/dist/components/excel-components/ExcelSuccessCard.js +3 -2
- package/dist/components/file-card/fileCardSidebar.js +23 -16
- package/dist/components/file-card/index.js +68 -49
- package/dist/components/file-preview/index.js +36 -29
- package/dist/components/file-upload/index.js +10 -7
- package/dist/components/file-upload/uploadV1.js +33 -27
- package/dist/components/gimi-sidebar/index.js +20 -13
- package/dist/components/header/index.js +18 -11
- package/dist/components/iconfont-com/index.js +2 -1
- package/dist/components/knowledge-trace/KnowledgeIconComponent.js +28 -22
- package/dist/components/knowledge-trace/classList.js +37 -28
- package/dist/components/knowledge-trace/documentList.js +36 -27
- package/dist/components/knowledge-trace/index.js +28 -21
- package/dist/components/knowledge-trace/videoList.js +46 -36
- package/dist/components/lottie-img/index.js +10 -8
- package/dist/components/message-actions/CopyButton.js +25 -22
- package/dist/components/message-actions/LikeButton.js +25 -22
- package/dist/components/message-actions/RegenerateButton.js +21 -18
- package/dist/components/message-actions/UnLikeButton.js +25 -22
- package/dist/components/message-actions/VoicePlay.js +25 -22
- package/dist/components/message-list/index.js +85 -72
- package/dist/components/no-microphone-root/index.js +39 -29
- package/dist/components/preset-agent-content/index.js +20 -15
- package/dist/components/reasoning-content/index.js +55 -42
- package/dist/components/reference-content/index.js +72 -63
- package/dist/components/templates/CommonChat.js +78 -64
- package/dist/components/templates/GimiChatComponent.js +13 -6
- package/dist/components/templates/demo/demo.js +104 -102
- package/dist/components/upload-list/index.js +56 -41
- package/dist/components/voice-bars/index.js +22 -19
- package/dist/components/voice-check-dialog/index.js +24 -17
- package/dist/components/voice-recording/index.js +57 -42
- package/dist/components/work-flow-content/demo.js +2 -1
- package/dist/components/work-flow-content/index.js +12 -9
- package/package.json +8 -7
|
@@ -8,11 +8,13 @@ import React from 'react';
|
|
|
8
8
|
import { knowledgeConstants } from "../../constants";
|
|
9
9
|
import { Tooltip } from '@douyinfe/semi-ui';
|
|
10
10
|
import styles from "./index.module.css";
|
|
11
|
-
import {
|
|
11
|
+
import { IconClear } from '@douyinfe/semi-icons';
|
|
12
12
|
import { useAppSelector, useAppDispatch } from "../../store/hooks";
|
|
13
13
|
import { setQuoteTeachModelList, setQuoteProductList } from "../../store/slices/gimiMenuSlice";
|
|
14
14
|
import { formatSecondsToChinese } from "../../utils/tools";
|
|
15
15
|
import classNames from 'classnames';
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
18
|
export var TeachModelReferenceContent = function TeachModelReferenceContent(_ref) {
|
|
17
19
|
var item = _ref.item,
|
|
18
20
|
showDuration = _ref.showDuration;
|
|
@@ -27,24 +29,29 @@ export var TeachModelReferenceContent = function TeachModelReferenceContent(_ref
|
|
|
27
29
|
})
|
|
28
30
|
}));
|
|
29
31
|
};
|
|
30
|
-
return /*#__PURE__*/
|
|
31
|
-
className: styles.main
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
33
|
+
className: styles.main,
|
|
34
|
+
children: [item.canCancel && /*#__PURE__*/_jsx(IconClear, {
|
|
35
|
+
className: styles.closeIcon,
|
|
36
|
+
onClick: onCancel
|
|
37
|
+
}), /*#__PURE__*/_jsx("img", {
|
|
38
|
+
alt: "\u8D44\u6599\u5F15\u7528\u56FE\u7247",
|
|
39
|
+
className: styles.img,
|
|
40
|
+
src: knowledgeConstants.VIDEO_ICON_ADDRESS
|
|
41
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
42
|
+
className: styles.description,
|
|
43
|
+
children: [/*#__PURE__*/_jsx(Tooltip, {
|
|
44
|
+
content: item.teachModelName,
|
|
45
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
46
|
+
className: classNames(item.canCancel ? styles.text_oneline : styles.text_twoline),
|
|
47
|
+
children: item.teachModelName
|
|
48
|
+
})
|
|
49
|
+
}), item.duration > 0 && showDuration && /*#__PURE__*/_jsx("div", {
|
|
50
|
+
className: styles.duration,
|
|
51
|
+
children: "\u65F6\u957F".concat(formatSecondsToChinese(item.duration), "\u5206\u949F")
|
|
52
|
+
})]
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
48
55
|
};
|
|
49
56
|
export var ProductReferenceContent = function ProductReferenceContent(_ref2) {
|
|
50
57
|
var item = _ref2.item;
|
|
@@ -59,22 +66,26 @@ export var ProductReferenceContent = function ProductReferenceContent(_ref2) {
|
|
|
59
66
|
})
|
|
60
67
|
}));
|
|
61
68
|
};
|
|
62
|
-
return /*#__PURE__*/
|
|
63
|
-
className: styles.main
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
70
|
+
className: styles.main,
|
|
71
|
+
children: [item.canCancel && /*#__PURE__*/_jsx(IconClear, {
|
|
72
|
+
className: styles.closeIcon,
|
|
73
|
+
onClick: onCancel
|
|
74
|
+
}), /*#__PURE__*/_jsx("img", {
|
|
75
|
+
alt: "\u8D44\u6599\u5F15\u7528\u56FE\u7247",
|
|
76
|
+
className: styles.img,
|
|
77
|
+
src: knowledgeConstants.CLASS_ICON_BIG_ADDRESS
|
|
78
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
79
|
+
className: styles.description,
|
|
80
|
+
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
81
|
+
content: item.productName,
|
|
82
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
83
|
+
className: styles.product_text,
|
|
84
|
+
children: item.productName
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
})]
|
|
88
|
+
});
|
|
78
89
|
};
|
|
79
90
|
export var ReferencesEdit = function ReferencesEdit(_ref3) {
|
|
80
91
|
var quoteTeachModelList = _ref3.quoteTeachModelList,
|
|
@@ -90,36 +101,34 @@ export var ReferencesEdit = function ReferencesEdit(_ref3) {
|
|
|
90
101
|
canCancel: true
|
|
91
102
|
});
|
|
92
103
|
});
|
|
93
|
-
return /*#__PURE__*/
|
|
94
|
-
className: styles.list
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}));
|
|
104
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
105
|
+
className: styles.list,
|
|
106
|
+
children: [newQuoteTeachModelList.map(function (item) {
|
|
107
|
+
return /*#__PURE__*/_jsx(TeachModelReferenceContent, {
|
|
108
|
+
item: item,
|
|
109
|
+
showDuration: true
|
|
110
|
+
}, item.teachModelId);
|
|
111
|
+
}), newQuoteProductList.map(function (item) {
|
|
112
|
+
return /*#__PURE__*/_jsx(ProductReferenceContent, {
|
|
113
|
+
item: item
|
|
114
|
+
}, item.productId);
|
|
115
|
+
})]
|
|
116
|
+
});
|
|
107
117
|
};
|
|
108
118
|
export var References = function References(_ref4) {
|
|
109
119
|
var quoteTeachModelList = _ref4.quoteTeachModelList,
|
|
110
120
|
quoteProductList = _ref4.quoteProductList;
|
|
111
|
-
return /*#__PURE__*/
|
|
112
|
-
className: styles.list
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
})
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}));
|
|
121
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
122
|
+
className: styles.list,
|
|
123
|
+
children: [quoteTeachModelList === null || quoteTeachModelList === void 0 ? void 0 : quoteTeachModelList.filter(Boolean).map(function (item) {
|
|
124
|
+
return /*#__PURE__*/_jsx(TeachModelReferenceContent, {
|
|
125
|
+
item: item,
|
|
126
|
+
showDuration: false
|
|
127
|
+
}, item.teachModelId);
|
|
128
|
+
}), quoteProductList === null || quoteProductList === void 0 ? void 0 : quoteProductList.filter(Boolean).map(function (item) {
|
|
129
|
+
return /*#__PURE__*/_jsx(ProductReferenceContent, {
|
|
130
|
+
item: item
|
|
131
|
+
}, item.productId);
|
|
132
|
+
})]
|
|
133
|
+
});
|
|
125
134
|
};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2
7
|
import React from 'react';
|
|
3
8
|
import { store } from "../../store";
|
|
4
9
|
import { useAppDispatch, useAppSelector } from "../../store/hooks";
|
|
@@ -16,6 +21,8 @@ import KonwledgeTrace from "../knowledge-trace";
|
|
|
16
21
|
import FileCardSideBar from "../file-card/fileCardSidebar";
|
|
17
22
|
import OfficeFilePreviewPanel from "../file-preview";
|
|
18
23
|
import AiLoading from "../ai-loading";
|
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
26
|
var CommonChat = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20
27
|
var _props$businessType = props.businessType,
|
|
21
28
|
businessType = _props$businessType === void 0 ? 'chat' : _props$businessType,
|
|
@@ -150,69 +157,76 @@ var CommonChat = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
150
157
|
}
|
|
151
158
|
handleSend(val, agent, isSystemAuto);
|
|
152
159
|
}, [handleSend, startConversationAndChat, conversationId]);
|
|
153
|
-
return /*#__PURE__*/
|
|
160
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
154
161
|
className: styles.main,
|
|
155
|
-
id: "myun_gimi_design_chat"
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
162
|
+
id: "myun_gimi_design_chat",
|
|
163
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
164
|
+
className: styles.chat_content,
|
|
165
|
+
children: [showHeader && headerValue && /*#__PURE__*/_jsx("div", {
|
|
166
|
+
className: styles.content_header,
|
|
167
|
+
children: replaceBraces(headerValue)
|
|
168
|
+
}), /*#__PURE__*/_jsxs("div", {
|
|
169
|
+
className: styles.scroll_wrapper,
|
|
170
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
171
|
+
className: "".concat(styles.scroll_container, " ").concat(isScrolling ? styles.scrolling : ''),
|
|
172
|
+
ref: containerRef,
|
|
173
|
+
children: [showPrologue && messageList.length === 0 && !isMoreLoading && /*#__PURE__*/_jsx(PresetAgentContent, {
|
|
174
|
+
prologue: (agentObj === null || agentObj === void 0 ? void 0 : agentObj.prologue) || '',
|
|
175
|
+
questionList: (agentObj === null || agentObj === void 0 ? void 0 : agentObj.questionList) || [],
|
|
176
|
+
setInputValue: setInputValue
|
|
177
|
+
}), isMoreLoading ? /*#__PURE__*/_jsx("div", {
|
|
178
|
+
style: {
|
|
179
|
+
height: '100%'
|
|
180
|
+
},
|
|
181
|
+
children: /*#__PURE__*/_jsx(AiLoading, {})
|
|
182
|
+
}) : /*#__PURE__*/_jsx(MessageList, _objectSpread({
|
|
183
|
+
chatList: messageList || defaultMessages,
|
|
184
|
+
handleSend: handleSend,
|
|
185
|
+
inputModelRef: inputModelRef,
|
|
186
|
+
msgLoading: msgLoading,
|
|
187
|
+
onSucessExcel: onSucessExcel,
|
|
188
|
+
onFailureExcel: onFailureExcel,
|
|
189
|
+
onRegenerateClick: regenerate,
|
|
190
|
+
onRetryExcel: onRetryExcel,
|
|
191
|
+
chatUI: chatUI,
|
|
192
|
+
model: model,
|
|
193
|
+
isPlaying: isPlaying,
|
|
194
|
+
playTTSByText: playTTSByText,
|
|
195
|
+
stopTTSByText: stopTTSByText
|
|
196
|
+
}, props.messageConfig))]
|
|
197
|
+
}), showBackBottom && /*#__PURE__*/_jsx("div", {
|
|
198
|
+
className: styles.backBottomBtn,
|
|
199
|
+
onClick: function onClick() {
|
|
200
|
+
return scrollBottomForce(true);
|
|
201
|
+
},
|
|
202
|
+
children: /*#__PURE__*/_jsx(IconChevronDown, {
|
|
203
|
+
size: "large"
|
|
204
|
+
})
|
|
205
|
+
})]
|
|
206
|
+
}), showInput && /*#__PURE__*/_jsx(ChatInput, _objectSpread(_objectSpread({
|
|
207
|
+
ref: chatInputRef
|
|
208
|
+
}, chatInputConfig), {}, {
|
|
209
|
+
onSend: handleInputSend,
|
|
210
|
+
disabled: disableSend || isMoreLoading,
|
|
211
|
+
showDefaultPrompt: messageList.length === 0,
|
|
212
|
+
defaultPrompt: (agentObj === null || agentObj === void 0 ? void 0 : agentObj.defaultPrompt) || ''
|
|
213
|
+
// onContentChange={onInputValueChange}
|
|
214
|
+
,
|
|
215
|
+
onInterrupt: handleInterrupt,
|
|
216
|
+
isRecording: isRecording,
|
|
217
|
+
isVoiceGetting: isExecuting,
|
|
218
|
+
recordingCount: recordingCount,
|
|
219
|
+
asrText: asrText,
|
|
220
|
+
shortAsrClick: shortAsrClick,
|
|
221
|
+
disableVoiceCommunication: disableVoiceCommunication,
|
|
222
|
+
onHistoryReload: onHistoryReload
|
|
223
|
+
}, props.chatInputConfig))]
|
|
224
|
+
}), /*#__PURE__*/_jsx(KonwledgeTrace, _objectSpread(_objectSpread({}, props.sidebarConfig), {}, {
|
|
225
|
+
chatList: messageList || defaultMessages,
|
|
226
|
+
isOverFlow: model === 'fullscreen' ? false : true
|
|
227
|
+
})), /*#__PURE__*/_jsx(FileCardSideBar, _objectSpread(_objectSpread({}, props.sidebarConfig), {}, {
|
|
228
|
+
isOverFlow: model === 'fullscreen' ? false : true
|
|
229
|
+
})), /*#__PURE__*/_jsx(OfficeFilePreviewPanel, {})]
|
|
230
|
+
});
|
|
217
231
|
});
|
|
218
232
|
export default CommonChat;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
2
7
|
import { store } from "../../store";
|
|
3
8
|
import CommonChat from "./CommonChat";
|
|
4
9
|
import React from 'react';
|
|
5
10
|
import { Provider } from 'react-redux';
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
12
|
var GimiChatComponent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
7
13
|
var commonChatRef = React.useRef(null);
|
|
8
14
|
React.useImperativeHandle(ref, function () {
|
|
@@ -14,10 +20,11 @@ var GimiChatComponent = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
14
20
|
inputEditor: ((_commonChatRef$curren4 = commonChatRef.current) === null || _commonChatRef$curren4 === void 0 ? void 0 : _commonChatRef$curren4.inputEditor) || null
|
|
15
21
|
};
|
|
16
22
|
});
|
|
17
|
-
return /*#__PURE__*/
|
|
18
|
-
store: store
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
return /*#__PURE__*/_jsx(Provider, {
|
|
24
|
+
store: store,
|
|
25
|
+
children: /*#__PURE__*/_jsx(CommonChat, _objectSpread(_objectSpread({}, props), {}, {
|
|
26
|
+
ref: commonChatRef
|
|
27
|
+
}))
|
|
28
|
+
});
|
|
22
29
|
});
|
|
23
30
|
export default GimiChatComponent;
|
|
@@ -1,109 +1,111 @@
|
|
|
1
1
|
import GimiChatComponent from "../GimiChatComponent";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
4
|
export default function Demo() {
|
|
4
|
-
return /*#__PURE__*/
|
|
5
|
+
return /*#__PURE__*/_jsx("div", {
|
|
5
6
|
style: {
|
|
6
7
|
height: '600px'
|
|
7
|
-
}
|
|
8
|
-
}, /*#__PURE__*/React.createElement(GimiChatComponent, {
|
|
9
|
-
baseUrl: 't-mgateway.gaodunwangxiao.com',
|
|
10
|
-
businessType: "correction",
|
|
11
|
-
token: 'eyJhZ2VuY3kiOjk1NTU1LCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJHYW9kdW4iLCJpYXQiOjE3Njg4OTEyMzIsInN1YiI6IjE1Mjg4NzQiLCJpc3MiOiJHYW9kdW4iLCJleHAiOjE3NzE0ODMyMzJ9.6JpEbaJnxMKiER78Ko5irwVpGFfKOP1zxYSUYXPL00Y',
|
|
12
|
-
platform: "myun",
|
|
13
|
-
agentId: 79
|
|
14
|
-
// bussinessParams={
|
|
15
|
-
// {
|
|
16
|
-
// "ANSWER_ID": 19923,
|
|
17
|
-
// "QUESTION_ID": 77595
|
|
18
|
-
// }
|
|
19
|
-
// }
|
|
20
|
-
// agentDetail={{
|
|
21
|
-
// "agentIcon": "https://mstatic.gaodunwangxiao.com/image/2025/09/24/Excel建模-1758706152601.png",
|
|
22
|
-
// "agentId": 65,
|
|
23
|
-
// "agentIntroduce": "帮你智能搭建财务数据表格信息",
|
|
24
|
-
// "agentMode": "workflow",
|
|
25
|
-
// "agentName": "智能Excel建模",
|
|
26
|
-
// "agentState": 1,
|
|
27
|
-
// "agentType": "product",
|
|
28
|
-
// "botId": "BOT1757402118115",
|
|
29
|
-
// "botInstructionId": 0,
|
|
30
|
-
// "characterSetting": null,
|
|
31
|
-
// "conversationType": 2,
|
|
32
|
-
// "customizeInstructContent": null,
|
|
33
|
-
// "defaultPrompt": "我要生成一个{{输入模板名称,如PVM模板}},用于{{输入使用场景,如分析收入增长主要驱动力}}。关键数据:{{输入数据}}",
|
|
34
|
-
// "inputPrompt": "",
|
|
35
|
-
// "isCustomizeInstruct": 0,
|
|
36
|
-
// "isEnableRelated": 1,
|
|
37
|
-
// "isEnableVoiceCall": 0,
|
|
38
|
-
// "maxLength": null,
|
|
39
|
-
// "modeType": null,
|
|
40
|
-
// "openUploadFile": 1,
|
|
41
|
-
// "productId": 36842,
|
|
42
|
-
// "prologue": "帮你智能搭建财务数据表格信息",
|
|
43
|
-
// "questionList": [
|
|
44
|
-
// {
|
|
45
|
-
// "id": 127,
|
|
46
|
-
// "question": "会计是现代社会经济活动开展的重要基础,也是推动国际经贸往来的重要保障"
|
|
47
|
-
// },
|
|
48
|
-
// {
|
|
49
|
-
// "id": 128,
|
|
50
|
-
// "question": "全面预算的执行和监控中可以采用什么方式做好业务支持和预算管控?"
|
|
51
|
-
// }
|
|
52
|
-
// ],
|
|
53
|
-
// "showName": "智能Excel建模",
|
|
54
|
-
// "showNameStatus": 1,
|
|
55
|
-
// "sourceModelId": null,
|
|
56
|
-
// "temperature": null,
|
|
57
|
-
// "voiceConfigs": [
|
|
58
|
-
// {
|
|
59
|
-
// "emotions": [
|
|
60
|
-
// {
|
|
61
|
-
// "name": "悲伤",
|
|
62
|
-
// "param": "sad"
|
|
63
|
-
// },
|
|
64
|
-
// {
|
|
65
|
-
// "name": "恐惧",
|
|
66
|
-
// "param": "fear"
|
|
67
|
-
// },
|
|
68
|
-
// {
|
|
69
|
-
// "name": "厌恶",
|
|
70
|
-
// "param": "hate"
|
|
71
|
-
// },
|
|
72
|
-
// {
|
|
73
|
-
// "name": "中性",
|
|
74
|
-
// "param": "neutral"
|
|
75
|
-
// }
|
|
76
|
-
// ],
|
|
77
|
-
// "gender": "female",
|
|
78
|
-
// "isSupportMix": 0,
|
|
79
|
-
// "languageCode": "zh-CN",
|
|
80
|
-
// "languageId": 1,
|
|
81
|
-
// "languageName": "中文",
|
|
82
|
-
// "scene": "多情感",
|
|
83
|
-
// "toneId": 2,
|
|
84
|
-
// "toneName": "甜心小美(多情感)",
|
|
85
|
-
// "voiceType": "zh_female_tianxinxiaomei_emo_v2_mars_bigtts"
|
|
86
|
-
// }
|
|
87
|
-
// ],
|
|
88
|
-
// "workflowList": [
|
|
89
|
-
// {
|
|
90
|
-
// "botFlowId": "MC-2CDBD8AB38B6410A8C14EE503C9ADBCE",
|
|
91
|
-
// "workflowId": 315,
|
|
92
|
-
// "workflowName": "excel生成926(第3版)"
|
|
93
|
-
// }
|
|
94
|
-
// ]
|
|
95
|
-
// }}
|
|
96
|
-
,
|
|
97
|
-
showPrologue: true,
|
|
98
|
-
model: 'fullscreen',
|
|
99
|
-
conversationId: 8394,
|
|
100
|
-
chatInputConfig: {
|
|
101
|
-
enableFileUpload: true,
|
|
102
|
-
enableVoiceChat: true,
|
|
103
|
-
enableVoiceRecord: true
|
|
104
8
|
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
9
|
+
children: /*#__PURE__*/_jsx(GimiChatComponent, {
|
|
10
|
+
baseUrl: 't-mgateway.gaodunwangxiao.com',
|
|
11
|
+
businessType: "correction",
|
|
12
|
+
token: 'eyJhZ2VuY3kiOjk1NTU1LCJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJHYW9kdW4iLCJpYXQiOjE3Njg4OTEyMzIsInN1YiI6IjE1Mjg4NzQiLCJpc3MiOiJHYW9kdW4iLCJleHAiOjE3NzE0ODMyMzJ9.6JpEbaJnxMKiER78Ko5irwVpGFfKOP1zxYSUYXPL00Y',
|
|
13
|
+
platform: "myun",
|
|
14
|
+
agentId: 79
|
|
15
|
+
// bussinessParams={
|
|
16
|
+
// {
|
|
17
|
+
// "ANSWER_ID": 19923,
|
|
18
|
+
// "QUESTION_ID": 77595
|
|
19
|
+
// }
|
|
20
|
+
// }
|
|
21
|
+
// agentDetail={{
|
|
22
|
+
// "agentIcon": "https://mstatic.gaodunwangxiao.com/image/2025/09/24/Excel建模-1758706152601.png",
|
|
23
|
+
// "agentId": 65,
|
|
24
|
+
// "agentIntroduce": "帮你智能搭建财务数据表格信息",
|
|
25
|
+
// "agentMode": "workflow",
|
|
26
|
+
// "agentName": "智能Excel建模",
|
|
27
|
+
// "agentState": 1,
|
|
28
|
+
// "agentType": "product",
|
|
29
|
+
// "botId": "BOT1757402118115",
|
|
30
|
+
// "botInstructionId": 0,
|
|
31
|
+
// "characterSetting": null,
|
|
32
|
+
// "conversationType": 2,
|
|
33
|
+
// "customizeInstructContent": null,
|
|
34
|
+
// "defaultPrompt": "我要生成一个{{输入模板名称,如PVM模板}},用于{{输入使用场景,如分析收入增长主要驱动力}}。关键数据:{{输入数据}}",
|
|
35
|
+
// "inputPrompt": "",
|
|
36
|
+
// "isCustomizeInstruct": 0,
|
|
37
|
+
// "isEnableRelated": 1,
|
|
38
|
+
// "isEnableVoiceCall": 0,
|
|
39
|
+
// "maxLength": null,
|
|
40
|
+
// "modeType": null,
|
|
41
|
+
// "openUploadFile": 1,
|
|
42
|
+
// "productId": 36842,
|
|
43
|
+
// "prologue": "帮你智能搭建财务数据表格信息",
|
|
44
|
+
// "questionList": [
|
|
45
|
+
// {
|
|
46
|
+
// "id": 127,
|
|
47
|
+
// "question": "会计是现代社会经济活动开展的重要基础,也是推动国际经贸往来的重要保障"
|
|
48
|
+
// },
|
|
49
|
+
// {
|
|
50
|
+
// "id": 128,
|
|
51
|
+
// "question": "全面预算的执行和监控中可以采用什么方式做好业务支持和预算管控?"
|
|
52
|
+
// }
|
|
53
|
+
// ],
|
|
54
|
+
// "showName": "智能Excel建模",
|
|
55
|
+
// "showNameStatus": 1,
|
|
56
|
+
// "sourceModelId": null,
|
|
57
|
+
// "temperature": null,
|
|
58
|
+
// "voiceConfigs": [
|
|
59
|
+
// {
|
|
60
|
+
// "emotions": [
|
|
61
|
+
// {
|
|
62
|
+
// "name": "悲伤",
|
|
63
|
+
// "param": "sad"
|
|
64
|
+
// },
|
|
65
|
+
// {
|
|
66
|
+
// "name": "恐惧",
|
|
67
|
+
// "param": "fear"
|
|
68
|
+
// },
|
|
69
|
+
// {
|
|
70
|
+
// "name": "厌恶",
|
|
71
|
+
// "param": "hate"
|
|
72
|
+
// },
|
|
73
|
+
// {
|
|
74
|
+
// "name": "中性",
|
|
75
|
+
// "param": "neutral"
|
|
76
|
+
// }
|
|
77
|
+
// ],
|
|
78
|
+
// "gender": "female",
|
|
79
|
+
// "isSupportMix": 0,
|
|
80
|
+
// "languageCode": "zh-CN",
|
|
81
|
+
// "languageId": 1,
|
|
82
|
+
// "languageName": "中文",
|
|
83
|
+
// "scene": "多情感",
|
|
84
|
+
// "toneId": 2,
|
|
85
|
+
// "toneName": "甜心小美(多情感)",
|
|
86
|
+
// "voiceType": "zh_female_tianxinxiaomei_emo_v2_mars_bigtts"
|
|
87
|
+
// }
|
|
88
|
+
// ],
|
|
89
|
+
// "workflowList": [
|
|
90
|
+
// {
|
|
91
|
+
// "botFlowId": "MC-2CDBD8AB38B6410A8C14EE503C9ADBCE",
|
|
92
|
+
// "workflowId": 315,
|
|
93
|
+
// "workflowName": "excel生成926(第3版)"
|
|
94
|
+
// }
|
|
95
|
+
// ]
|
|
96
|
+
// }}
|
|
97
|
+
,
|
|
98
|
+
showPrologue: true,
|
|
99
|
+
model: 'fullscreen',
|
|
100
|
+
conversationId: 8394,
|
|
101
|
+
chatInputConfig: {
|
|
102
|
+
enableFileUpload: true,
|
|
103
|
+
enableVoiceChat: true,
|
|
104
|
+
enableVoiceRecord: true
|
|
105
|
+
},
|
|
106
|
+
messageConfig: {
|
|
107
|
+
enableRegenerate: true
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
});
|
|
109
111
|
}
|