rhua-chatgpt-web 1.0.98 → 1.0.99

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.
Files changed (46) hide show
  1. package/dist/{api_chain-wgmc7e6E.js → api_chain-C2BsZcfa.js} +2 -2
  2. package/dist/{api_chain-CB8GWGIU.cjs → api_chain-D2AEAwf2.cjs} +1 -1
  3. package/dist/{combine_docs_chain-DgONM3Mw.cjs → combine_docs_chain-BwUcmS0t.cjs} +1 -1
  4. package/dist/{combine_docs_chain-C4dphi5e.js → combine_docs_chain-D0ygQAil.js} +2 -2
  5. package/dist/{few_shot-CAlLA7_Y.js → few_shot-CHQMukLV.js} +1 -1
  6. package/dist/{few_shot-D1R-zNl7.cjs → few_shot-CQMLIcvu.cjs} +1 -1
  7. package/dist/{index-Bg5840_w.js → index-3uuVdHPW.js} +1 -1
  8. package/dist/{index-cTMOFBXD.cjs → index-5hC-EuRW.cjs} +1 -1
  9. package/dist/{index-DrDcayhM.js → index-B4HXYy58.js} +1 -1
  10. package/dist/index-BMeyd5Mb.js +4 -0
  11. package/dist/index-CE38VgAV.js +4 -0
  12. package/dist/{index-Cd_gRf5s.cjs → index-CUTMmRLO.cjs} +1 -1
  13. package/dist/{index-Dt6MdEi3.cjs → index-CUbh3CUk.cjs} +1 -1
  14. package/dist/{index-DMb9FQJU.cjs → index-CvkY01OP.cjs} +1 -1
  15. package/dist/{index-D6StpCel.cjs → index-D1EyeOGY.cjs} +1 -1
  16. package/dist/{index-CjSvTRsR.cjs → index-D3WYQbg9.cjs} +1 -1
  17. package/dist/index-D5IEaWdP.js +4 -0
  18. package/dist/{index-BN7_2Vpx.js → index-D9geeS71.js} +2 -2
  19. package/dist/{index-CymPiKxB.js → index-DDNOIr8O.js} +1 -1
  20. package/dist/{index-CfwXktuP.cjs → index-DDtVKZHe.cjs} +1 -1
  21. package/dist/{index-BekrpxaM.cjs → index-DKj4xxCF.cjs} +1 -1
  22. package/dist/{index-BbYqG4Lp.js → index-DPo7N7-F.js} +72 -154
  23. package/dist/index-Da-yc0Sn.js +4 -0
  24. package/dist/{index-CI8OM2Jz.js → index-Ddt8e4jQ.js} +1 -1
  25. package/dist/{index-r3AjaSlS.cjs → index-DiJKM8e3.cjs} +1 -1
  26. package/dist/{index-DWSafnCg.cjs → index-DkwjGulR.cjs} +1 -1
  27. package/dist/{index-C1T2elxu.js → index-DlDIFIcy.js} +1 -1
  28. package/dist/{index-D8gIJjM_.cjs → index-NFb6Ikqb.cjs} +1 -1
  29. package/dist/{index-Bg42RK-4.js → index-vJhPvv3A.js} +2 -2
  30. package/dist/{index-CjmBLRKu.cjs → index-xQlqRtFE.cjs} +3 -3
  31. package/dist/index.cjs.js +1 -1
  32. package/dist/{index.es-CtypdcdJ.cjs → index.es-B9waF7p1.cjs} +2 -2
  33. package/dist/{index.es-67G0dUQ8.js → index.es-muo7iWsn.js} +11 -11
  34. package/dist/index.esm.js +1 -1
  35. package/dist/{llm_chain-RoYoMcLp.cjs → llm_chain-BVEQefX9.cjs} +1 -1
  36. package/dist/{llm_chain-AXaQuXMt.js → llm_chain-FiDBkCHX.js} +1 -1
  37. package/dist/{sequential_chain-DVxvWiQQ.js → sequential_chain-C89zWQZZ.js} +1 -1
  38. package/dist/{sequential_chain-9yzJVjdz.cjs → sequential_chain-hcM_0OeZ.cjs} +1 -1
  39. package/dist/style.css +1 -1
  40. package/dist/{vector_db_qa-Ca-yXUO_.js → vector_db_qa-Cxtn-hGw.js} +3 -3
  41. package/dist/{vector_db_qa-4lYMS_5X.cjs → vector_db_qa-DpnOTF2e.cjs} +1 -1
  42. package/package.json +1 -1
  43. package/dist/index-ASKx-pn3.js +0 -4
  44. package/dist/index-B-yz5nX2.js +0 -4
  45. package/dist/index-Ctbtl5KP.js +0 -4
  46. package/dist/index-Cuzto2LI.js +0 -4
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
  import React__default, { useState, useRef, useCallback, useEffect, useMemo, createRef, forwardRef, useLayoutEffect, useImperativeHandle } from "react";
5
- import { Button, Input, Select, Checkbox, Tooltip, Toast, Typography, Collapsible, Dropdown, Tag, Avatar, Spin, Layout, Switch, Modal, TextArea, Empty, Form, TagGroup, Divider, Tree, SideSheet } from "@douyinfe/semi-ui";
5
+ import { Button, Input, Select, Checkbox, Tooltip, Toast, Typography, Collapsible, Dropdown, Tag, Avatar, Spin, Layout, Modal, TextArea, Empty, Form, TagGroup, Divider, Tree, SideSheet } from "@douyinfe/semi-ui";
6
6
  import { IconChevronDown, IconClose, IconShareStroked, IconPlus, IconSearch, IconEdit2Stroked, IconDeleteStroked, IconCopyStroked, IconDownCircleStroked, IconBulb, IconChevronUp, IconLink, IconTreeTriangleDown, IconImage, IconFile, IconArrowRight, IconArrowLeft, IconBolt, IconEditStroked, IconComment, IconDelete, IconCloud, IconStop, IconSend, IconChevronLeft, IconArrowUp, IconRefresh, IconHistory } from "@douyinfe/semi-icons";
7
7
  import styled from "styled-components";
8
8
  import { useNavigate, useSearchParams } from "react-router-dom";
@@ -1021,7 +1021,7 @@ const convertDifyAppToAgent = (difyApp) => {
1021
1021
  const getAgentList = async (type = "app") => {
1022
1022
  let preApi = location.hostname === "localhost" ? "http://111.6.44.42:30001" : location.origin;
1023
1023
  let baseApi = `${preApi}/prod-api/system/apps/list?pageNum=1&pageSize=100&type=${type}`;
1024
- let token = "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiOTJhNDljYjMtMDRkMC00MzE5LWEwNmMtODIxNGRjYjMxOGY1In0._W5hAT_pvOlwutPu086G8IyIfdmFqHbNeDpndRC1qejNOJuiQUOAUff2Thg0dbPw2q50_hqy4NtimhC3z-ae2g ";
1024
+ let token = "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiOTJhNDljYjMtMDRkMC00MzE5LWEwNmMtODIxNGRjYjMxOGY1In0._W5hAT_pvOlwutPu086G8IyIfdmFqHbNeDpndRC1qejNOJuiQUOAUff2Thg0dbPw2q50_hqy4NtimhC3z-ae2g";
1025
1025
  try {
1026
1026
  const cacheData = localStorage.getItem("agentWebCache");
1027
1027
  console.log("cacheData", cacheData);
@@ -1595,7 +1595,6 @@ const AiList = ({
1595
1595
  handleWrite,
1596
1596
  usageIncrementFn
1597
1597
  }) => {
1598
- console.log("父组件传过来的appTypeOptions:", appTypeOptions);
1599
1598
  const navigate = useNavigate();
1600
1599
  const [activeFilter, setActiveFilter] = useState(() => {
1601
1600
  try {
@@ -42573,15 +42572,12 @@ const CommentHeader = React__default.memo(
42573
42572
  clearCurrentChatList,
42574
42573
  renameSessionTitle,
42575
42574
  triggerSessionSidebar,
42576
- onThinkStatusSend,
42577
42575
  onToggleChatHistory,
42578
42576
  onToggleAgentList,
42579
42577
  chatHistoryVisible,
42580
42578
  agentListVisible,
42581
42579
  onNavigateView,
42582
42580
  currentAgentName,
42583
- currentAgentCustomize,
42584
- isThinkInitial = true,
42585
42581
  onBackToAiList,
42586
42582
  showBackButton = true,
42587
42583
  handleBack
@@ -42589,10 +42585,6 @@ const CommentHeader = React__default.memo(
42589
42585
  const { Header } = Layout;
42590
42586
  const [titleRenameVisible, setTitleRenameVisible] = useState(false);
42591
42587
  const [titleContent, setTitleContent] = useState(sessionTitle);
42592
- const [isThink, setIsThink] = useState(isThinkInitial);
42593
- useEffect(() => {
42594
- setIsThink(isThinkInitial);
42595
- }, [isThinkInitial]);
42596
42588
  const titleContentChange = (content2) => {
42597
42589
  setTitleContent(content2);
42598
42590
  };
@@ -42633,20 +42625,7 @@ const CommentHeader = React__default.memo(
42633
42625
  className: "comment-header-back"
42634
42626
  }
42635
42627
  ),
42636
- currentAgentName && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "comment-header-agent-name", children: currentAgentName }),
42637
- currentAgentCustomize === "智能问答" && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "comment-header-think-switch", style: { marginLeft: "12px", display: "flex", alignItems: "center", gap: "8px" }, children: [
42638
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: "14px", color: "var(--semi-color-text-1)" }, children: "思考过程" }),
42639
- /* @__PURE__ */ jsxRuntimeExports.jsx(
42640
- Switch,
42641
- {
42642
- checked: isThink,
42643
- onChange: (checked) => {
42644
- setIsThink(checked);
42645
- onThinkStatusSend(checked);
42646
- }
42647
- }
42648
- )
42649
- ] })
42628
+ currentAgentName && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "comment-header-agent-name", children: currentAgentName })
42650
42629
  ] }) }),
42651
42630
  /* @__PURE__ */ jsxRuntimeExports.jsx(
42652
42631
  Modal,
@@ -43688,6 +43667,7 @@ function createDynamicFormConfig(userInputForm) {
43688
43667
  };
43689
43668
  }
43690
43669
  function CommentIndex({
43670
+ appTypeOptions,
43691
43671
  onBackToAiList,
43692
43672
  onNavigateView,
43693
43673
  baseUrl,
@@ -43982,7 +43962,6 @@ function CommentIndex({
43982
43962
  let filesDataMap = {};
43983
43963
  if (filesCache) {
43984
43964
  const filesData = JSON.parse(filesCache);
43985
- console.log("[初始化会话] 找到文件信息缓存:", filesData);
43986
43965
  filesDataMap = filesData.reduce((acc, file) => {
43987
43966
  if (!acc[file.variable]) {
43988
43967
  acc[file.variable] = [];
@@ -44000,7 +43979,6 @@ function CommentIndex({
44000
43979
  (file) => fileIds.includes(file.fileId)
44001
43980
  );
44002
43981
  if (matchedFiles.length > 0) {
44003
- console.log(`[初始化会话] 恢复文件字段 ${variable}:`, matchedFiles);
44004
43982
  matchedFiles.forEach((file) => {
44005
43983
  restoredFileNamesMap[file.fileId] = file.fileName;
44006
43984
  if (file.fileType) {
@@ -44010,20 +43988,15 @@ function CommentIndex({
44010
43988
  }
44011
43989
  }
44012
43990
  });
44013
- console.log("[初始化会话] 恢复的表单数据:", restoredFormData);
44014
43991
  } else {
44015
- console.log("[初始化会话] 未找到表单数据缓存");
44016
43992
  const filesKey = `dialog_files_${newSessionId}`;
44017
43993
  const filesCache = localStorage.getItem(filesKey);
44018
43994
  if (filesCache) {
44019
43995
  const filesData = JSON.parse(filesCache);
44020
- console.log("[初始化会话] 找到文件信息缓存:", filesData);
44021
43996
  } else {
44022
- console.log("[初始化会话] 未找到文件信息缓存");
44023
43997
  }
44024
43998
  }
44025
43999
  } catch (error) {
44026
- console.error("[初始化会话] 查找本地缓存失败:", error);
44027
44000
  }
44028
44001
  setCurrentCommentSession({
44029
44002
  ...currentSession,
@@ -44079,11 +44052,19 @@ function CommentIndex({
44079
44052
  });
44080
44053
  const loadAgents = async () => {
44081
44054
  try {
44082
- const [appAgents, toolsAgents] = await Promise.all([
44083
- getAgentList("app"),
44084
- getAgentList("tools")
44085
- ]);
44086
- const allAgents = [...appAgents, ...toolsAgents];
44055
+ let agentPromises = [];
44056
+ if (appTypeOptions && appTypeOptions.length > 0) {
44057
+ agentPromises = appTypeOptions.map(
44058
+ (option) => getAgentList(option.dictValue)
44059
+ );
44060
+ } else {
44061
+ agentPromises = [
44062
+ getAgentList("app"),
44063
+ getAgentList("tools")
44064
+ ];
44065
+ }
44066
+ const agentResults = await Promise.all(agentPromises);
44067
+ const allAgents = agentResults.flat();
44087
44068
  setAgentList(allAgents);
44088
44069
  const hasPendingAgent = hasIncomingSelectedAgent || typeof window !== "undefined" && window.localStorage.getItem("selectedAgent");
44089
44070
  if (hasPendingAgent) {
@@ -44392,7 +44373,6 @@ function CommentIndex({
44392
44373
  fileType = CommonUtil.getFileTypeFromLocalStorage(fileId);
44393
44374
  typeSource = "localStorage.filesTypeArr";
44394
44375
  } catch (error) {
44395
- console.warn(`[发送消息] 从 filesTypeArr 获取文件类型失败:`, error);
44396
44376
  try {
44397
44377
  const sessionId = currentCommentSessionId;
44398
44378
  if (sessionId) {
@@ -44404,37 +44384,18 @@ function CommentIndex({
44404
44384
  if (fileInfo && fileInfo.fileType) {
44405
44385
  fileType = fileInfo.fileType;
44406
44386
  typeSource = `dialog_files_${sessionId}`;
44407
- console.log(`[发送消息] 从 dialog_files_ 缓存获取文件类型成功:`, {
44408
- 文件ID: fileId,
44409
- 文件类型: fileType,
44410
- 文件名: fileInfo.fileName,
44411
- 来源: typeSource
44412
- });
44413
44387
  } else {
44414
- console.warn(`[发送消息] 在 dialog_files_ 缓存中未找到文件ID: ${fileId}`);
44415
44388
  if (fileInfo && fileInfo.fileName) {
44416
44389
  fileType = CommonUtil.getFileTypeFromFileName(fileInfo.fileName);
44417
44390
  typeSource = `根据文件名判断 (${fileInfo.fileName})`;
44418
- console.log(`[发送消息] 根据文件名判断文件类型:`, {
44419
- 文件ID: fileId,
44420
- 文件名: fileInfo.fileName,
44421
- 判断类型: fileType
44422
- });
44423
44391
  }
44424
44392
  }
44425
44393
  } else {
44426
- console.warn(`[发送消息] 未找到 dialog_files_ 缓存: ${filesKey}`);
44427
44394
  }
44428
44395
  }
44429
44396
  } catch (cacheError) {
44430
- console.error(`[发送消息] 从 dialog_files_ 缓存获取文件类型失败:`, cacheError);
44431
44397
  }
44432
44398
  }
44433
- console.log("[发送消息接口入参] 默认请求体格式 - 文件:", {
44434
- 文件ID: fileId,
44435
- 文件类型: fileType,
44436
- 来源: typeSource
44437
- });
44438
44399
  return {
44439
44400
  type: fileType,
44440
44401
  transfer_method: "local_file",
@@ -44463,11 +44424,6 @@ function CommentIndex({
44463
44424
  if (newUploadedFileIds.length > 0) {
44464
44425
  const filesArray = newUploadedFileIds.filter((fileId) => fileId).map((fileId) => {
44465
44426
  const fileType = CommonUtil.getFileTypeFromLocalStorage(fileId);
44466
- console.log("[发送消息接口入参] files字段 - 新上传文件:", {
44467
- 文件ID: fileId,
44468
- 从filesTypeArr获取的类型: fileType,
44469
- 来源: "localStorage.filesTypeArr"
44470
- });
44471
44427
  return {
44472
44428
  type: fileType,
44473
44429
  transfer_method: "local_file",
@@ -44938,13 +44894,11 @@ function CommentIndex({
44938
44894
  const formDataCache = localStorage.getItem(formDataKey);
44939
44895
  if (formDataCache) {
44940
44896
  const cachedFormData = JSON.parse(formDataCache);
44941
- console.log("[切换会话] 找到表单数据缓存:", cachedFormData);
44942
44897
  const filesKey = `dialog_files_${sessionId}`;
44943
44898
  const filesCache = localStorage.getItem(filesKey);
44944
44899
  let filesDataMap = {};
44945
44900
  if (filesCache) {
44946
44901
  const filesData = JSON.parse(filesCache);
44947
- console.log("[切换会话] 找到文件信息缓存:", filesData);
44948
44902
  filesDataMap = filesData.reduce((acc, file) => {
44949
44903
  if (!acc[file.variable]) {
44950
44904
  acc[file.variable] = [];
@@ -44962,7 +44916,6 @@ function CommentIndex({
44962
44916
  (file) => fileIds.includes(file.fileId)
44963
44917
  );
44964
44918
  if (matchedFiles.length > 0) {
44965
- console.log(`[切换会话] 恢复文件字段 ${variable}:`, matchedFiles);
44966
44919
  matchedFiles.forEach((file) => {
44967
44920
  restoredFileNamesMap[file.fileId] = file.fileName;
44968
44921
  if (file.fileType) {
@@ -44972,20 +44925,15 @@ function CommentIndex({
44972
44925
  }
44973
44926
  }
44974
44927
  });
44975
- console.log("[切换会话] 恢复的表单数据:", restoredFormData);
44976
44928
  } else {
44977
- console.log("[切换会话] 未找到表单数据缓存");
44978
44929
  const filesKey = `dialog_files_${sessionId}`;
44979
44930
  const filesCache = localStorage.getItem(filesKey);
44980
44931
  if (filesCache) {
44981
44932
  const filesData = JSON.parse(filesCache);
44982
- console.log("[切换会话] 找到文件信息缓存:", filesData);
44983
44933
  } else {
44984
- console.log("[切换会话] 未找到文件信息缓存");
44985
44934
  }
44986
44935
  }
44987
44936
  } catch (error) {
44988
- console.error("[切换会话] 查找本地缓存失败:", error);
44989
44937
  }
44990
44938
  setCurrentCommentSession({
44991
44939
  ...selectedSession,
@@ -45439,13 +45387,11 @@ function CommentIndex({
45439
45387
  let restoredFormData = {};
45440
45388
  if (formDataCache) {
45441
45389
  const cachedFormData = JSON.parse(formDataCache);
45442
- console.log("[智能体选择] 找到表单数据缓存:", cachedFormData);
45443
45390
  const filesKey = `dialog_files_${latestSession.id}`;
45444
45391
  const filesCache = localStorage.getItem(filesKey);
45445
45392
  let filesDataMap = {};
45446
45393
  if (filesCache) {
45447
45394
  const filesData = JSON.parse(filesCache);
45448
- console.log("[智能体选择] 找到文件信息缓存:", filesData);
45449
45395
  filesDataMap = filesData.reduce((acc, file) => {
45450
45396
  if (!acc[file.variable]) {
45451
45397
  acc[file.variable] = [];
@@ -45463,7 +45409,6 @@ function CommentIndex({
45463
45409
  (file) => fileIds.includes(file.fileId)
45464
45410
  );
45465
45411
  if (matchedFiles.length > 0) {
45466
- console.log(`[智能体选择] 恢复文件字段 ${variable}:`, matchedFiles);
45467
45412
  const fileNamesMap = { ...latestSession.fileNamesMap };
45468
45413
  const fileTypesMap = { ...latestSession.fileTypesMap };
45469
45414
  matchedFiles.forEach((file) => {
@@ -45481,16 +45426,12 @@ function CommentIndex({
45481
45426
  }
45482
45427
  }
45483
45428
  });
45484
- console.log("[智能体选择] 恢复的表单数据:", restoredFormData);
45485
45429
  } else {
45486
- console.log("[智能体选择] 未找到表单数据缓存");
45487
45430
  const filesKey = `dialog_files_${latestSession.id}`;
45488
45431
  const filesCache = localStorage.getItem(filesKey);
45489
45432
  if (filesCache) {
45490
45433
  const filesData = JSON.parse(filesCache);
45491
- console.log("[智能体选择] 找到文件信息缓存:", filesData);
45492
45434
  } else {
45493
- console.log("[智能体选择] 未找到文件信息缓存");
45494
45435
  }
45495
45436
  }
45496
45437
  if (!formDataCache) {
@@ -45500,7 +45441,6 @@ function CommentIndex({
45500
45441
  } : prev);
45501
45442
  }
45502
45443
  } catch (error) {
45503
- console.error("[智能体选择] 查找本地缓存失败:", error);
45504
45444
  }
45505
45445
  if (aiContent && aiContent.trim()) {
45506
45446
  setPendingAiContentToSend(aiContent.trim());
@@ -45803,13 +45743,6 @@ function CommentIndex({
45803
45743
  return chatList;
45804
45744
  });
45805
45745
  }, []);
45806
- const handleThinkStatus = (status) => {
45807
- if (status) {
45808
- setIsThink(true);
45809
- } else {
45810
- setIsThink(false);
45811
- }
45812
- };
45813
45746
  const handleToggleChatHistory = useCallback(() => {
45814
45747
  setChatHistoryVisible((prevState) => {
45815
45748
  const newState = !prevState;
@@ -45884,11 +45817,19 @@ function CommentIndex({
45884
45817
  }
45885
45818
  if (!agent) {
45886
45819
  try {
45887
- const [appAgents, toolsAgents] = await Promise.all([
45888
- getAgentList("app"),
45889
- getAgentList("tools")
45890
- ]);
45891
- const allAgents = [...appAgents, ...toolsAgents];
45820
+ let agentPromises = [];
45821
+ if (appTypeOptions && appTypeOptions.length > 0) {
45822
+ agentPromises = appTypeOptions.map(
45823
+ (option) => getAgentList(option.dictValue)
45824
+ );
45825
+ } else {
45826
+ agentPromises = [
45827
+ getAgentList("app"),
45828
+ getAgentList("tools")
45829
+ ];
45830
+ }
45831
+ const agentResults = await Promise.all(agentPromises);
45832
+ const allAgents = agentResults.flat();
45892
45833
  setAgentList(allAgents);
45893
45834
  agent = allAgents.find((a) => a.id === agentId);
45894
45835
  } catch (error) {
@@ -45928,17 +45869,12 @@ function CommentIndex({
45928
45869
  clearCurrentChatList,
45929
45870
  renameSessionTitle,
45930
45871
  triggerSessionSidebar,
45931
- onThinkStatusSend: handleThinkStatus,
45932
45872
  onToggleChatHistory: handleToggleChatHistory,
45933
45873
  onToggleAgentList: handleToggleAgentList,
45934
45874
  chatHistoryVisible,
45935
45875
  agentListVisible,
45936
45876
  onNavigateView,
45937
45877
  currentAgentName: (currentCommentSession == null ? void 0 : currentCommentSession.agentName) || ((_a2 = agentList.find((agent) => agent.id === selectedAgentId)) == null ? void 0 : _a2.name) || "",
45938
- currentAgentCustomize: (_b = agentList.find(
45939
- (agent) => agent.id === (currentCommentSession == null ? void 0 : currentCommentSession.agentId) || agent.id === selectedAgentId
45940
- )) == null ? void 0 : _b.customize,
45941
- isThinkInitial: isThink,
45942
45878
  onBackToAiList,
45943
45879
  showBackButton: pageType === "xinXiaoYi" ? false : true,
45944
45880
  handleBack
@@ -46013,12 +45949,6 @@ function CommentIndex({
46013
45949
  }
46014
45950
  },
46015
45951
  onUploadSuccess: (fileId, fileName, variable, mimeType, extension2, fileType) => {
46016
- console.log("[文件上传成功] 开始更新 fileNamesMap:", {
46017
- fileId,
46018
- fileName,
46019
- variable,
46020
- currentCommentSessionId
46021
- });
46022
45952
  if (currentCommentSessionId) {
46023
45953
  LocalForageService.getItem("session_list").then((sessionList) => {
46024
45954
  const newSessionList = [
@@ -46030,18 +45960,7 @@ function CommentIndex({
46030
45960
  if (sessionIndex >= 0) {
46031
45961
  const currentSession = newSessionList[sessionIndex];
46032
45962
  const fileNamesMap = currentSession.fileNamesMap || {};
46033
- console.log("[文件上传成功] 更新前的 fileNamesMap:", {
46034
- fileNamesMap,
46035
- fileNamesMapKeys: Object.keys(fileNamesMap),
46036
- currentSessionFileNamesMap: currentSession.fileNamesMap
46037
- });
46038
45963
  fileNamesMap[fileId] = fileName;
46039
- console.log("[文件上传成功] 更新后的 fileNamesMap:", {
46040
- fileNamesMap,
46041
- fileNamesMapKeys: Object.keys(fileNamesMap),
46042
- newFileId: fileId,
46043
- newFileName: fileName
46044
- });
46045
45964
  newSessionList[sessionIndex] = {
46046
45965
  ...currentSession,
46047
45966
  fileNamesMap
@@ -46056,7 +45975,6 @@ function CommentIndex({
46056
45975
  setCurrentCommentSession(
46057
45976
  newSessionList[sessionIndex]
46058
45977
  );
46059
- console.log("[文件上传成功] fileNamesMap 已保存到存储和状态");
46060
45978
  try {
46061
45979
  const fileInfo = {
46062
45980
  sessionId: currentCommentSessionId,
@@ -46075,7 +45993,6 @@ function CommentIndex({
46075
45993
  try {
46076
45994
  filesList = JSON.parse(existingFilesData);
46077
45995
  } catch (parseError) {
46078
- console.warn("解析已存储的文件列表失败:", parseError);
46079
45996
  filesList = [];
46080
45997
  }
46081
45998
  }
@@ -46086,26 +46003,15 @@ function CommentIndex({
46086
46003
  filesList.push(fileInfo);
46087
46004
  }
46088
46005
  localStorage.setItem(existingFilesKey, JSON.stringify(filesList));
46089
- console.log("文件信息已存储到本地缓存:", fileInfo);
46090
46006
  } catch (error) {
46091
- console.error("存储文件信息到本地缓存失败:", error);
46092
46007
  }
46093
- } else {
46094
- console.warn("[文件上传成功] 未找到会话,sessionIndex:", sessionIndex);
46095
46008
  }
46096
46009
  });
46097
- } else {
46098
- console.warn("[文件上传成功] currentCommentSessionId 为空");
46099
46010
  }
46100
46011
  },
46101
46012
  onUploadError: (error) => {
46102
46013
  },
46103
46014
  onFileDelete: (fileId, variable) => {
46104
- console.log("[文件删除] 开始删除文件缓存:", {
46105
- fileId,
46106
- variable,
46107
- currentCommentSessionId
46108
- });
46109
46015
  if (currentCommentSessionId) {
46110
46016
  try {
46111
46017
  const filesKey = `dialog_files_${currentCommentSessionId}`;
@@ -46115,12 +46021,9 @@ function CommentIndex({
46115
46021
  const updatedFilesData = filesData.filter((file) => file.fileId !== fileId);
46116
46022
  if (updatedFilesData.length !== filesData.length) {
46117
46023
  localStorage.setItem(filesKey, JSON.stringify(updatedFilesData));
46118
- console.log(`[文件删除] 已从缓存中删除文件 ${fileId},剩余文件数量:`, updatedFilesData.length);
46119
46024
  } else {
46120
- console.log(`[文件删除] 缓存中未找到文件 ${fileId}`);
46121
46025
  }
46122
46026
  } else {
46123
- console.log(`[文件删除] 未找到文件缓存: ${filesKey}`);
46124
46027
  }
46125
46028
  LocalForageService.getItem("session_list").then((sessionList) => {
46126
46029
  const newSessionList = [...sessionList || []];
@@ -46139,14 +46042,11 @@ function CommentIndex({
46139
46042
  fileTypesMap
46140
46043
  };
46141
46044
  LocalForageService.setItem("session_list", newSessionList);
46142
- console.log("[测试卡顿]11", newSessionList);
46143
46045
  setCommentSessionList(newSessionList);
46144
46046
  setCurrentCommentSession(newSessionList[sessionIndex]);
46145
- console.log(`[文件删除] 已更新会话中的文件映射,删除文件 ${fileId}`);
46146
46047
  }
46147
46048
  });
46148
46049
  } catch (error) {
46149
- console.error("[文件删除] 删除文件缓存失败:", error);
46150
46050
  }
46151
46051
  }
46152
46052
  },
@@ -46342,19 +46242,36 @@ function CommentIndex({
46342
46242
  }
46343
46243
  }
46344
46244
  ) }),
46345
- /* @__PURE__ */ jsxRuntimeExports.jsx(
46346
- TextArea,
46347
- {
46348
- className: "comment-send-input",
46349
- placeholder: !currentCommentSessionId ? "请先创建对话" : "Enter发送, Shift+Enter换行。",
46350
- value: userChatContent,
46351
- autosize: { minRows: 1, maxRows: 1 },
46352
- onChange: (value) => changeUserChatContent(value),
46353
- onEnterPress: chatEnterPress,
46354
- ref: sendInputRef,
46355
- disabled: !currentCommentSessionId
46356
- }
46357
- ),
46245
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "comment-input-container", children: [
46246
+ ((_b = agentList.find(
46247
+ (agent) => agent.id === selectedAgentId || agent.id === (currentCommentSession == null ? void 0 : currentCommentSession.agentId)
46248
+ )) == null ? void 0 : _b.customize) === "智能问答" && /* @__PURE__ */ jsxRuntimeExports.jsx(
46249
+ Button,
46250
+ {
46251
+ className: `comment-think-button ${isThink ? "active" : ""}`,
46252
+ theme: "borderless",
46253
+ type: "tertiary",
46254
+ onClick: () => {
46255
+ setIsThink(!isThink);
46256
+ },
46257
+ disabled: !currentCommentSessionId,
46258
+ children: "深度思考"
46259
+ }
46260
+ ),
46261
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
46262
+ TextArea,
46263
+ {
46264
+ className: "comment-send-input",
46265
+ placeholder: !currentCommentSessionId ? "请先创建对话" : "Enter发送, Shift+Enter换行。",
46266
+ value: userChatContent,
46267
+ autosize: { minRows: 1, maxRows: 1 },
46268
+ onChange: (value) => changeUserChatContent(value),
46269
+ onEnterPress: chatEnterPress,
46270
+ ref: sendInputRef,
46271
+ disabled: !currentCommentSessionId
46272
+ }
46273
+ )
46274
+ ] }),
46358
46275
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "comment-addon-box", children: [
46359
46276
  /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { layout: "vertical", margin: "6px" }),
46360
46277
  fileUploadEnabled && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
@@ -46490,7 +46407,7 @@ const BlockEdit = ({
46490
46407
  const initVueEditor = async () => {
46491
46408
  if (editorRef.current) {
46492
46409
  try {
46493
- const BlockNoteEditorModule = await import("./index.es-67G0dUQ8.js");
46410
+ const BlockNoteEditorModule = await import("./index.es-muo7iWsn.js");
46494
46411
  const BlockNoteEditor = BlockNoteEditorModule.BlockNoteEditor;
46495
46412
  const theme = {
46496
46413
  colors: {
@@ -46768,6 +46685,7 @@ const AgentWebIndex = ({
46768
46685
  {
46769
46686
  baseUrl,
46770
46687
  token,
46688
+ appTypeOptions,
46771
46689
  onBackToAiList: handleBackToAiList,
46772
46690
  onNavigateView: (nextView) => setView(nextView),
46773
46691
  pageType,
@@ -47444,7 +47362,7 @@ const AiBlockEdit = ({
47444
47362
  const initVueEditor = async () => {
47445
47363
  if (editorRef.current) {
47446
47364
  try {
47447
- const BlockNoteEditorModule = await import("./index.es-67G0dUQ8.js");
47365
+ const BlockNoteEditorModule = await import("./index.es-muo7iWsn.js");
47448
47366
  const BlockNoteEditor = BlockNoteEditorModule.BlockNoteEditor;
47449
47367
  const theme = {
47450
47368
  colors: {
@@ -48370,7 +48288,7 @@ class BasePromptTemplate extends Runnable {
48370
48288
  return PromptTemplate2.deserialize({ ...data, _type: "prompt" });
48371
48289
  }
48372
48290
  case "few_shot": {
48373
- const { FewShotPromptTemplate } = await import("./few_shot-CAlLA7_Y.js");
48291
+ const { FewShotPromptTemplate } = await import("./few_shot-CHQMukLV.js");
48374
48292
  return FewShotPromptTemplate.deserialize(data);
48375
48293
  }
48376
48294
  default:
@@ -49942,35 +49860,35 @@ class BaseChain extends BaseLangChain {
49942
49860
  static async deserialize(data, values = {}) {
49943
49861
  switch (data._type) {
49944
49862
  case "llm_chain": {
49945
- const { LLMChain } = await import("./llm_chain-AXaQuXMt.js");
49863
+ const { LLMChain } = await import("./llm_chain-FiDBkCHX.js");
49946
49864
  return LLMChain.deserialize(data);
49947
49865
  }
49948
49866
  case "sequential_chain": {
49949
- const { SequentialChain } = await import("./sequential_chain-DVxvWiQQ.js");
49867
+ const { SequentialChain } = await import("./sequential_chain-C89zWQZZ.js");
49950
49868
  return SequentialChain.deserialize(data);
49951
49869
  }
49952
49870
  case "simple_sequential_chain": {
49953
- const { SimpleSequentialChain } = await import("./sequential_chain-DVxvWiQQ.js");
49871
+ const { SimpleSequentialChain } = await import("./sequential_chain-C89zWQZZ.js");
49954
49872
  return SimpleSequentialChain.deserialize(data);
49955
49873
  }
49956
49874
  case "stuff_documents_chain": {
49957
- const { StuffDocumentsChain } = await import("./combine_docs_chain-C4dphi5e.js");
49875
+ const { StuffDocumentsChain } = await import("./combine_docs_chain-D0ygQAil.js");
49958
49876
  return StuffDocumentsChain.deserialize(data);
49959
49877
  }
49960
49878
  case "map_reduce_documents_chain": {
49961
- const { MapReduceDocumentsChain } = await import("./combine_docs_chain-C4dphi5e.js");
49879
+ const { MapReduceDocumentsChain } = await import("./combine_docs_chain-D0ygQAil.js");
49962
49880
  return MapReduceDocumentsChain.deserialize(data);
49963
49881
  }
49964
49882
  case "refine_documents_chain": {
49965
- const { RefineDocumentsChain } = await import("./combine_docs_chain-C4dphi5e.js");
49883
+ const { RefineDocumentsChain } = await import("./combine_docs_chain-D0ygQAil.js");
49966
49884
  return RefineDocumentsChain.deserialize(data);
49967
49885
  }
49968
49886
  case "vector_db_qa": {
49969
- const { VectorDBQAChain } = await import("./vector_db_qa-Ca-yXUO_.js");
49887
+ const { VectorDBQAChain } = await import("./vector_db_qa-Cxtn-hGw.js");
49970
49888
  return VectorDBQAChain.deserialize(data, values);
49971
49889
  }
49972
49890
  case "api_chain": {
49973
- const { APIChain } = await import("./api_chain-wgmc7e6E.js");
49891
+ const { APIChain } = await import("./api_chain-C2BsZcfa.js");
49974
49892
  return APIChain.deserialize(data);
49975
49893
  }
49976
49894
  default:
@@ -0,0 +1,4 @@
1
+ import { r } from "./index-DPo7N7-F.js";
2
+ export {
3
+ r as default
4
+ };
@@ -1,4 +1,4 @@
1
- import { n as convertElement, o as convert, p as isElement, w as whitespace } from "./index-BbYqG4Lp.js";
1
+ import { n as convertElement, o as convert, p as isElement, w as whitespace } from "./index-DPo7N7-F.js";
2
2
  const embedded = convertElement(
3
3
  /**
4
4
  * @param element
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CfwXktuP.cjs"),t=require("./index-CjmBLRKu.cjs"),n=["pre","script","style","textarea"],i={};function a(e,t){return Boolean(t&&"element"===t.type&&e.blanks.length>0&&e.blanks.includes(t.tagName))}function l(t,n){return"root"===n.type||"element"===n.type&&(t.head||"script"===n.tagName||e.embedded(n)||!e.phrasing(n))}exports.default=function(r){return function(c){!function(r,c){const d=c||i,s={blanks:d.blanks||[],head:!1,indentInitial:!1!==d.indentInitial,indent:"number"==typeof d.indent?" ".repeat(d.indent):"string"==typeof d.indent?d.indent:" "};function o(e,n,i){const l=e[e.length-1],r=l&&t.whitespace(l)?e[e.length-2]:l,c=(a(s,r)&&a(s,i)?"\n\n":"\n")+s.indent.repeat(Math.max(n,0));l&&"text"===l.type?l.value=t.whitespace(l)?c:l.value+c:e.push({type:"text",value:c})}e.minifyWhitespace(r,{newlines:!0}),t.visitParents(r,function(e,i){if(!("children"in e))return;if("element"===e.type&&"head"===e.tagName&&(s.head=!0),s.head&&"element"===e.type&&"body"===e.tagName&&(s.head=!1),"element"===e.type&&n.includes(e.tagName))return t.SKIP;if(0===e.children.length||!l(s,e))return;let a=i.length;s.indentInitial||a--;let r=!1;for(const t of e.children)"comment"!==t.type&&"text"!==t.type||(t.value.includes("\n")&&(r=!0),t.value=t.value.replace(/ *\n/g,"$&"+s.indent.repeat(a)));const c=[];let d;for(const t of e.children)(l(s,t)||r&&!d)&&(o(c,a,t),r=!0),d=t,c.push(t);d&&(r||l(s,d))&&(t.whitespace(d)&&(c.pop(),d=c[c.length-1]),o(c,a-1)),e.children=c})}(c,r)}};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DDtVKZHe.cjs"),t=require("./index-xQlqRtFE.cjs"),n=["pre","script","style","textarea"],i={};function a(e,t){return Boolean(t&&"element"===t.type&&e.blanks.length>0&&e.blanks.includes(t.tagName))}function l(t,n){return"root"===n.type||"element"===n.type&&(t.head||"script"===n.tagName||e.embedded(n)||!e.phrasing(n))}exports.default=function(r){return function(c){!function(r,c){const d=c||i,s={blanks:d.blanks||[],head:!1,indentInitial:!1!==d.indentInitial,indent:"number"==typeof d.indent?" ".repeat(d.indent):"string"==typeof d.indent?d.indent:" "};function o(e,n,i){const l=e[e.length-1],r=l&&t.whitespace(l)?e[e.length-2]:l,c=(a(s,r)&&a(s,i)?"\n\n":"\n")+s.indent.repeat(Math.max(n,0));l&&"text"===l.type?l.value=t.whitespace(l)?c:l.value+c:e.push({type:"text",value:c})}e.minifyWhitespace(r,{newlines:!0}),t.visitParents(r,function(e,i){if(!("children"in e))return;if("element"===e.type&&"head"===e.tagName&&(s.head=!0),s.head&&"element"===e.type&&"body"===e.tagName&&(s.head=!1),"element"===e.type&&n.includes(e.tagName))return t.SKIP;if(0===e.children.length||!l(s,e))return;let a=i.length;s.indentInitial||a--;let r=!1;for(const t of e.children)"comment"!==t.type&&"text"!==t.type||(t.value.includes("\n")&&(r=!0),t.value=t.value.replace(/ *\n/g,"$&"+s.indent.repeat(a)));const c=[];let d;for(const t of e.children)(l(s,t)||r&&!d)&&(o(c,a,t),r=!0),d=t,c.push(t);d&&(r||l(s,d))&&(t.whitespace(d)&&(c.pop(),d=c[c.length-1]),o(c,a-1)),e.children=c})}(c,r)}};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CjmBLRKu.cjs");exports.fromDom=e.fromDom;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-xQlqRtFE.cjs");exports.fromDom=e.fromDom;
@@ -1,4 +1,4 @@
1
- import { c, d, b, h } from "./index-BbYqG4Lp.js";
1
+ import { c, d, b, h } from "./index-DPo7N7-F.js";
2
2
  export {
3
3
  c as default,
4
4
  d as defaultFootnoteBackContent,