@myun/gimi-chat 0.9.53 → 0.9.55
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/answer-item/index.js +20 -9
- package/dist/components/chat-input/extension/skill/MentionList.js +9 -8
- package/dist/components/chat-input/extension/skill/ReferSlot.js +1 -1
- package/dist/components/chat-input/extension/skill/index.less +16 -1
- package/dist/components/chat-input/index.js +1 -2
- package/dist/components/message-list/skill-tag/index.js +1 -1
- package/dist/hooks/useCommonChatAPI.js +2 -2
- package/dist/interfaces/chatMessage.d.ts +2 -0
- package/dist/umd/index.min.js +1 -1
- package/dist/utils/tools.js +6 -3
- package/package.json +1 -1
package/dist/utils/tools.js
CHANGED
|
@@ -458,6 +458,8 @@ export function formatFields(dataList, chatList) {
|
|
|
458
458
|
dataList.forEach(function (item, index) {
|
|
459
459
|
if (item.role === 1 && item.chatId !== null && roleZeroMap.has(item.chatId)) {
|
|
460
460
|
var _roleZeroData$related;
|
|
461
|
+
// 当前处于用户交互确认
|
|
462
|
+
var isPendingUserConfirm = item.moduleType === "user_confirm" && (item === null || item === void 0 ? void 0 : item.pendingUserConfirm);
|
|
461
463
|
var roleZeroData = roleZeroMap.get(item.chatId);
|
|
462
464
|
var artifacts = [];
|
|
463
465
|
try {
|
|
@@ -482,7 +484,7 @@ export function formatFields(dataList, chatList) {
|
|
|
482
484
|
var _parseMessageContent2 = parseMessageContent(item.content || ''),
|
|
483
485
|
moduleInfo = _parseMessageContent2.moduleInfo,
|
|
484
486
|
content = _parseMessageContent2.content;
|
|
485
|
-
item.stop = item.contentState ? 0 : 1; // 推理状态 0 推理完成 1 停止
|
|
487
|
+
item.stop = isPendingUserConfirm ? 0 : item.contentState ? 0 : 1; // 推理状态 0 推理完成 1 停止
|
|
486
488
|
// item.moduleType = item.content ? JSON.parse(item.content).moduleType : null;
|
|
487
489
|
item.moduleInfo = moduleInfo;
|
|
488
490
|
if (content) {
|
|
@@ -498,8 +500,9 @@ export function formatFields(dataList, chatList) {
|
|
|
498
500
|
item.thinkingInfo = {
|
|
499
501
|
status: "COMPLETED",
|
|
500
502
|
toolName: "已完成",
|
|
501
|
-
collapse:
|
|
502
|
-
loaded: false
|
|
503
|
+
collapse: !isPendingUserConfirm,
|
|
504
|
+
loaded: false,
|
|
505
|
+
needInit: isPendingUserConfirm
|
|
503
506
|
};
|
|
504
507
|
}
|
|
505
508
|
});
|