@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.
@@ -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: true,
502
- loaded: false
503
+ collapse: !isPendingUserConfirm,
504
+ loaded: false,
505
+ needInit: isPendingUserConfirm
503
506
  };
504
507
  }
505
508
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myun/gimi-chat",
3
- "version": "0.9.53",
3
+ "version": "0.9.55",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",