@myun/gimi-chat 0.5.3 → 0.5.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.
package/dist/apis/useApi.js
CHANGED
|
@@ -198,9 +198,7 @@ var useApi = function useApi(baseUrl, authToken) {
|
|
|
198
198
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
199
199
|
while (1) switch (_context10.prev = _context10.next) {
|
|
200
200
|
case 0:
|
|
201
|
-
return _context10.abrupt("return", fetchService.post('/mcourse/web/trace/product',
|
|
202
|
-
params: params
|
|
203
|
-
}));
|
|
201
|
+
return _context10.abrupt("return", fetchService.post('/mcourse/web/trace/product', params));
|
|
204
202
|
case 1:
|
|
205
203
|
case "end":
|
|
206
204
|
return _context10.stop();
|
|
@@ -320,7 +320,7 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
|
|
|
320
320
|
return _context2.stop();
|
|
321
321
|
}
|
|
322
322
|
}, _callee2);
|
|
323
|
-
})), [dispatch, onSendEnd]);
|
|
323
|
+
})), [dispatch, onSendEnd, inputValue]);
|
|
324
324
|
var handleMCPToolsStreamRs = React.useCallback(function (dataObj) {
|
|
325
325
|
setStatus(2);
|
|
326
326
|
var messageList = messageListRef.current;
|
|
@@ -770,7 +770,7 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
|
|
|
770
770
|
return function (_x13) {
|
|
771
771
|
return _ref10.apply(this, arguments);
|
|
772
772
|
};
|
|
773
|
-
}(), [dispatch]);
|
|
773
|
+
}(), [dispatch, inputValue]);
|
|
774
774
|
var fillInputModel = React.useCallback(function (value, messageList) {
|
|
775
775
|
if ((messageList === null || messageList === void 0 ? void 0 : messageList.length) > 0 && value && messageList[messageList.length - 1].moduleType === 'ask') {
|
|
776
776
|
var targetChatItem = _toConsumableArray(messageList).reverse().find(function (item) {
|
|
@@ -1152,7 +1152,7 @@ var useCommonChatAPI = function useCommonChatAPI(props) {
|
|
|
1152
1152
|
setDisableSend(true);
|
|
1153
1153
|
handleSend('', agentObjRef.current, true);
|
|
1154
1154
|
}
|
|
1155
|
-
}, [dispatch]);
|
|
1155
|
+
}, [dispatch, handleSend]);
|
|
1156
1156
|
React.useEffect(function () {
|
|
1157
1157
|
if ((messageList === null || messageList === void 0 ? void 0 : messageList.length) > 0) {
|
|
1158
1158
|
var _chatItem$moduleInfo, _chatItem$moduleInfo2;
|