rhua-chatgpt-web 1.1.5 → 1.1.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.
Files changed (46) hide show
  1. package/dist/{api_chain-EzupCauA.js → api_chain-8rLd0TuD.js} +2 -2
  2. package/dist/{api_chain-CQbpemiQ.cjs → api_chain-DBmoQA_7.cjs} +1 -1
  3. package/dist/{combine_docs_chain-CYSCkppE.js → combine_docs_chain-BH4-g2GW.js} +2 -2
  4. package/dist/{combine_docs_chain-BRxg6UtZ.cjs → combine_docs_chain-DfTwsFo0.cjs} +1 -1
  5. package/dist/{few_shot-q_TnpUqa.js → few_shot-DJCpSBvt.js} +1 -1
  6. package/dist/{few_shot-DfTvwnAe.cjs → few_shot-DQaRrbJw.cjs} +1 -1
  7. package/dist/{index-Z4SoiuPK.js → index-BAXNGSXw.js} +1 -1
  8. package/dist/{index-CJL6IhdJ.js → index-BDxCvrgc.js} +1 -1
  9. package/dist/{index-xlf6-zoR.cjs → index-BQO11CzB.cjs} +1 -1
  10. package/dist/index-B_x2i-jO.js +4 -0
  11. package/dist/{index-DAVe9cfb.js → index-BaQU1IvP.js} +320 -33
  12. package/dist/index-C8LQxWL1.js +4 -0
  13. package/dist/{index-gSOuomS5.js → index-CD6GBfkZ.js} +1 -1
  14. package/dist/{index-BnjwO3Bw.cjs → index-CFln1NC2.cjs} +1 -1
  15. package/dist/{index-DWYbc6d-.cjs → index-CUnp2vsA.cjs} +1 -1
  16. package/dist/{index-DXTOnzOs.js → index-CXpHNR4F.js} +1 -1
  17. package/dist/index-CYDd-qnF.js +4 -0
  18. package/dist/{index-DXa2ayFF.cjs → index-CvCPvUjj.cjs} +1 -1
  19. package/dist/{index-KdW7xIM8.cjs → index-DFYcGKuT.cjs} +31 -31
  20. package/dist/index-DH4SzrZB.js +4 -0
  21. package/dist/{index-DZFTEz-j.cjs → index-DRg4CNkS.cjs} +1 -1
  22. package/dist/{index-BfavGjvq.js → index-Dy-SzFud.js} +2 -2
  23. package/dist/{index-D__lg2sO.cjs → index-FAGD8ZFV.cjs} +1 -1
  24. package/dist/{index-BI4EdlAm.js → index-GSRYlXZ2.js} +1 -1
  25. package/dist/{index-Chp1R4-v.cjs → index-PQbFNXZe.cjs} +1 -1
  26. package/dist/{index-CtXnaw8Y.cjs → index-VviEQjAE.cjs} +1 -1
  27. package/dist/{index-CgCXN3R6.js → index-Wbrx5M_5.js} +2 -2
  28. package/dist/{index-ybRvvKbH.cjs → index-faFDPW0m.cjs} +1 -1
  29. package/dist/{index-DT9dJ8WJ.cjs → index-jiGOdiuu.cjs} +1 -1
  30. package/dist/{index-DEbJFy6H.cjs → index-xDEsnKsG.cjs} +1 -1
  31. package/dist/index.cjs.js +1 -1
  32. package/dist/{index.es-CC8FXRVt.cjs → index.es-DUhQYmQQ.cjs} +3 -3
  33. package/dist/{index.es-BV1sWnV8.js → index.es-Ofj7pWXh.js} +60 -59
  34. package/dist/index.esm.js +6 -5
  35. package/dist/{llm_chain-zANp5jfK.js → llm_chain-D_TCnPCU.js} +1 -1
  36. package/dist/{llm_chain-Bv5-BS50.cjs → llm_chain-uxhdn-1W.cjs} +1 -1
  37. package/dist/{sequential_chain-Bw8lqqn7.js → sequential_chain-BIzQ7CWb.js} +1 -1
  38. package/dist/{sequential_chain-_P-m2t1s.cjs → sequential_chain-CMYssdOR.cjs} +1 -1
  39. package/dist/style.css +1 -1
  40. package/dist/{vector_db_qa-CSVVrc_O.cjs → vector_db_qa-Bf6oOghB.cjs} +1 -1
  41. package/dist/{vector_db_qa-CIJfQI3s.js → vector_db_qa-DnXdDGBx.js} +3 -3
  42. package/package.json +135 -135
  43. package/dist/index-BcSVqRCu.js +0 -4
  44. package/dist/index-CjhpPaDq.js +0 -4
  45. package/dist/index-CvsV56bR.js +0 -4
  46. package/dist/index-DP9UqkZn.js +0 -4
@@ -3,7 +3,7 @@ import * as ReactDOM from "react-dom";
3
3
  import ReactDOM__default, { flushSync, createPortal } from "react-dom";
4
4
  import * as React from "react";
5
5
  import React__default, { useLayoutEffect, useEffect, useRef, useContext, createRef, memo, createContext, createElement, version, forwardRef, useMemo, useState, useCallback, useImperativeHandle, useSyncExternalStore, Fragment as Fragment$1, useId as useId$2, cloneElement, Children } from "react";
6
- import { Z as getDefaultExportFromCjs, _ as jsxRuntimeExports } from "./index-DAVe9cfb.js";
6
+ import { Z as getDefaultExportFromCjs, _ as jsxRuntimeExports } from "./index-BaQU1IvP.js";
7
7
  function hasWindow() {
8
8
  return typeof window !== "undefined";
9
9
  }
@@ -39841,16 +39841,16 @@ async function et$2() {
39841
39841
  if (fe$1)
39842
39842
  return fe$1;
39843
39843
  const e = await Promise.all([
39844
- import("./index-Z4SoiuPK.js"),
39845
- import("./index-CJL6IhdJ.js"),
39846
- import("./index-CvsV56bR.js"),
39847
- import("./index-CjhpPaDq.js"),
39848
- import("./index-BfavGjvq.js"),
39849
- import("./index-BcSVqRCu.js"),
39850
- import("./index-gSOuomS5.js"),
39851
- import("./index-DP9UqkZn.js"),
39852
- import("./index-BI4EdlAm.js"),
39853
- import("./index-CgCXN3R6.js")
39844
+ import("./index-BAXNGSXw.js"),
39845
+ import("./index-BDxCvrgc.js"),
39846
+ import("./index-B_x2i-jO.js"),
39847
+ import("./index-CYDd-qnF.js"),
39848
+ import("./index-Dy-SzFud.js"),
39849
+ import("./index-DH4SzrZB.js"),
39850
+ import("./index-CD6GBfkZ.js"),
39851
+ import("./index-C8LQxWL1.js"),
39852
+ import("./index-GSRYlXZ2.js"),
39853
+ import("./index-Wbrx5M_5.js")
39854
39854
  ]);
39855
39855
  return fe$1 = {
39856
39856
  rehypeParse: e[0],
@@ -58646,10 +58646,10 @@ if (process.env.NODE_ENV === "production")
58646
58646
  He = Te.createRoot, Te.hydrateRoot;
58647
58647
  else {
58648
58648
  var Ze = Te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
58649
- He = function(ne2, fe2) {
58649
+ He = function(re2, fe2) {
58650
58650
  Ze.usingClientEntryPoint = true;
58651
58651
  try {
58652
- return Te.createRoot(ne2, fe2);
58652
+ return Te.createRoot(re2, fe2);
58653
58653
  } finally {
58654
58654
  Ze.usingClientEntryPoint = false;
58655
58655
  }
@@ -59091,7 +59091,7 @@ const Ft = {
59091
59091
  },
59092
59092
  sidebar: {
59093
59093
  marked_as_resolved: "标记为已解决",
59094
- more_replies: (ne2) => `还有 ${ne2} 条回复`
59094
+ more_replies: (re2) => `还有 ${re2} 条回复`
59095
59095
  }
59096
59096
  },
59097
59097
  generic: {
@@ -59100,13 +59100,14 @@ const Ft = {
59100
59100
  }, Nt = { class: "blocknote-editor-wrapper" }, ie = "#9cc1e9", jt = "#fff", Ce = "data-ai-highlight", qt = /* @__PURE__ */ defineComponent({
59101
59101
  __name: "index",
59102
59102
  props: {
59103
- defaultContent: { type: Array, required: false },
59104
- readOnly: { type: Boolean, required: false },
59105
- placeholder: { type: String, required: false },
59106
- theme: { type: null, required: false }
59103
+ defaultContent: {},
59104
+ readOnly: { type: Boolean },
59105
+ placeholder: {},
59106
+ theme: {},
59107
+ hiddenAiAssistant: { type: Boolean }
59107
59108
  },
59108
59109
  emits: ["content-change", "editor-ready", "editor-error", "handle-ai-assistant"],
59109
- setup(ne2, { expose: fe$12, emit: be2 }) {
59110
+ setup(re2, { expose: fe$12, emit: be2 }) {
59110
59111
  const _e2 = Ce$1(
59111
59112
  {
59112
59113
  type: "insertedText",
@@ -59535,8 +59536,8 @@ const Ft = {
59535
59536
  }
59536
59537
  }
59537
59538
  }
59538
- ), re2 = ne2, ye2 = be2, U2 = ref(null);
59539
- let pe2 = null, t2 = null, te2 = null, ae2 = null, me3 = null;
59539
+ ), te2 = re2, ye2 = be2, U2 = ref(null);
59540
+ let pe2 = null, t2 = null, oe2 = null, ae2 = null, me3 = null;
59540
59541
  const ce3 = (e) => {
59541
59542
  if (!e)
59542
59543
  return;
@@ -59550,12 +59551,12 @@ const Ft = {
59550
59551
  ce3(o);
59551
59552
  });
59552
59553
  }, et2 = (e) => {
59553
- if (!te2)
59554
+ if (!oe2)
59554
59555
  return false;
59555
59556
  if (!e || !e.state || !e.state.doc)
59556
59557
  return console.warn("视图状态无效,无法恢复高亮选区"), se2(e), false;
59557
59558
  try {
59558
- const { fromPos: n, toPos: o } = te2, r2 = e.state.doc.content.size;
59559
+ const { fromPos: n, toPos: o } = oe2, r2 = e.state.doc.content.size;
59559
59560
  if (r2 <= 0)
59560
59561
  return console.warn("文档为空,无法恢复高亮选区"), se2(e), false;
59561
59562
  const s = Math.max(1, Math.min(n, o, r2 - 1)), c = Math.max(s + 1, Math.min(Math.max(n, o), r2));
@@ -59716,7 +59717,7 @@ const Ft = {
59716
59717
  "color",
59717
59718
  "backgroundColor"
59718
59719
  ]);
59719
- return p2 && (c = c.addMark(n, o, p2), x2 = true), x2 && c.steps.length > 0 && (e.dispatch(c.scrollIntoView()), await nextTick(), await new Promise((a) => setTimeout(a, 50))), te2 = { fromPos: n, toPos: o }, Se2(e, n, o), Oe2(e, n, o), x2;
59720
+ return p2 && (c = c.addMark(n, o, p2), x2 = true), x2 && c.steps.length > 0 && (e.dispatch(c.scrollIntoView()), await nextTick(), await new Promise((a) => setTimeout(a, 50))), oe2 = { fromPos: n, toPos: o }, Se2(e, n, o), Oe2(e, n, o), x2;
59720
59721
  }, nt2 = () => {
59721
59722
  const e = U2.value;
59722
59723
  if (!e)
@@ -59726,7 +59727,7 @@ const Ft = {
59726
59727
  r2.style.removeProperty("background-color"), r2.style.removeProperty("color"), r2.style.removeProperty("display"), r2.removeAttribute(Ce);
59727
59728
  });
59728
59729
  }, ge2 = () => {
59729
- ae2 && (ae2.style.display = "none"), te2 = null;
59730
+ ae2 && (ae2.style.display = "none"), oe2 = null;
59730
59731
  }, rt2 = () => {
59731
59732
  const e = U2.value;
59732
59733
  return e ? (ae2 || (ae2 = document.createElement("div"), ae2.className = "ai-highlight-cancel-badge", ae2.innerHTML = "×", ae2.addEventListener("click", (n) => {
@@ -59775,17 +59776,17 @@ const Ft = {
59775
59776
  }, se2 = (e) => {
59776
59777
  var o, r2;
59777
59778
  const n = e || (t2 == null ? void 0 : t2.prosemirrorView);
59778
- if (n && te2) {
59779
- const { fromPos: s, toPos: c } = te2, x2 = (o = n.state.schema.marks) == null ? void 0 : o.backgroundColor, p2 = (r2 = n.state.schema.marks) == null ? void 0 : r2.textColor;
59779
+ if (n && oe2) {
59780
+ const { fromPos: s, toPos: c } = oe2, x2 = (o = n.state.schema.marks) == null ? void 0 : o.backgroundColor, p2 = (r2 = n.state.schema.marks) == null ? void 0 : r2.textColor;
59780
59781
  let l = n.state.tr, a = false;
59781
59782
  x2 && (l = l.removeMark(s, c, x2), a = true), p2 && (l = l.removeMark(s, c, p2), a = true), a && n.dispatch(l.scrollIntoView());
59782
59783
  }
59783
- nt2(), ge2(), te2 = null, me3 = null;
59784
- }, lt2 = () => te2 ? { ...te2 } : null, Ne2 = () => {
59785
- if (!te2)
59784
+ nt2(), ge2(), oe2 = null, me3 = null;
59785
+ }, lt2 = () => oe2 ? { ...oe2 } : null, Ne2 = () => {
59786
+ if (!oe2)
59786
59787
  return;
59787
59788
  const e = t2 == null ? void 0 : t2.prosemirrorView;
59788
- e && Se2(e, te2.fromPos, te2.toPos);
59789
+ e && Se2(e, oe2.fromPos, oe2.toPos);
59789
59790
  }, je3 = (e, n) => {
59790
59791
  try {
59791
59792
  const o = U2.value;
@@ -59995,7 +59996,7 @@ const Ft = {
59995
59996
  console.error("创建背景色 mark 失败:", $2);
59996
59997
  }
59997
59998
  if (j2) {
59998
- g.dispatch(R2.scrollIntoView()), console.log("样式 marks 已应用", { fromPos: v2, toPos: E2 }), te2 = { fromPos: v2, toPos: E2 }, Se2(g, v2, E2);
59999
+ g.dispatch(R2.scrollIntoView()), console.log("样式 marks 已应用", { fromPos: v2, toPos: E2 }), oe2 = { fromPos: v2, toPos: E2 }, Se2(g, v2, E2);
59999
60000
  try {
60000
60001
  g.state.doc.nodesBetween(v2, E2, (V2, Z2) => {
60001
60002
  if (V2.isText) {
@@ -60355,7 +60356,7 @@ const Ft = {
60355
60356
  )
60356
60357
  );
60357
60358
  };
60358
- return React__default.createElement(
60359
+ return te2.hiddenAiAssistant ? null : React__default.createElement(
60359
60360
  "div",
60360
60361
  {
60361
60362
  style: {
@@ -60385,33 +60386,33 @@ const Ft = {
60385
60386
  );
60386
60387
  }, n = () => {
60387
60388
  let o = [];
60388
- if (re2.defaultContent && Array.isArray(re2.defaultContent))
60389
+ if (te2.defaultContent && Array.isArray(te2.defaultContent))
60389
60390
  try {
60390
- const l = toRaw(unref(re2.defaultContent));
60391
+ const l = toRaw(unref(te2.defaultContent));
60391
60392
  Array.isArray(l) && l.length > 0 && (o = ve2(l), o.length === 0 && (o = [
60392
60393
  {
60393
60394
  type: "paragraph",
60394
- content: [{ type: "text", text: re2.placeholder || "", styles: {} }]
60395
+ content: [{ type: "text", text: te2.placeholder || "", styles: {} }]
60395
60396
  }
60396
60397
  ]), console.log("处理后的内容:", o));
60397
60398
  } catch (l) {
60398
60399
  console.warn("处理默认内容时出错:", l), o = [
60399
60400
  {
60400
60401
  type: "paragraph",
60401
- content: [{ type: "text", text: re2.placeholder || "", styles: {} }]
60402
+ content: [{ type: "text", text: te2.placeholder || "", styles: {} }]
60402
60403
  }
60403
60404
  ];
60404
60405
  }
60405
60406
  o.length === 0 && (o = [
60406
60407
  {
60407
60408
  type: "paragraph",
60408
- content: [{ type: "text", text: re2.placeholder || "", styles: {} }]
60409
+ content: [{ type: "text", text: te2.placeholder || "", styles: {} }]
60409
60410
  }
60410
60411
  ]), console.log("准备创建编辑器,initialContent:", o), console.log("initialContent 类型:", typeof o), console.log("initialContent 是否为数组:", Array.isArray(o));
60411
60412
  let r2 = Array.isArray(o) && o.length > 0 ? o : [
60412
60413
  {
60413
60414
  type: "paragraph",
60414
- content: [{ type: "text", text: re2.placeholder || "", styles: {} }]
60415
+ content: [{ type: "text", text: te2.placeholder || "", styles: {} }]
60415
60416
  }
60416
60417
  ];
60417
60418
  r2 = ve2(r2);
@@ -60528,7 +60529,7 @@ const Ft = {
60528
60529
  Ot,
60529
60530
  {
60530
60531
  editor: c,
60531
- theme: re2.theme || "light",
60532
+ theme: te2.theme || "light",
60532
60533
  formattingToolbar: false
60533
60534
  // 禁用默认工具栏
60534
60535
  },
@@ -60715,7 +60716,7 @@ const Ft = {
60715
60716
  return console.warn("获取选中文本时出错:", o), "";
60716
60717
  }
60717
60718
  return console.log("没有文本选区"), "";
60718
- }, de2 = ref(/* @__PURE__ */ new Map()), oe2 = ref({
60719
+ }, de2 = ref(/* @__PURE__ */ new Map()), ne2 = ref({
60719
60720
  isInserting: false,
60720
60721
  insertedText: "",
60721
60722
  originalText: void 0,
@@ -60965,7 +60966,7 @@ const Ft = {
60965
60966
  // 标记这是 rewrite 类型,方便取消时精确区分逻辑
60966
60967
  insertType: "rewrite"
60967
60968
  };
60968
- de2.value.set(w, H2), oe2.value = H2, ge2();
60969
+ de2.value.set(w, H2), ne2.value = H2, ge2();
60969
60970
  return;
60970
60971
  }
60971
60972
  }
@@ -61313,7 +61314,7 @@ const Ft = {
61313
61314
  originalHighlightRange: h2,
61314
61315
  insertType: p2 || "inline"
61315
61316
  };
61316
- de2.value.set(H2, Y2), oe2.value = Y2, h2 && ge2(), await nextTick();
61317
+ de2.value.set(H2, Y2), ne2.value = Y2, h2 && ge2(), await nextTick();
61317
61318
  try {
61318
61319
  w.dispatch(w.state.tr.scrollIntoView());
61319
61320
  } catch {
@@ -61527,7 +61528,7 @@ ${d}
61527
61528
  inlineToPos: void 0,
61528
61529
  insertType: "blocks"
61529
61530
  };
61530
- de2.value.set(w, M), oe2.value = M;
61531
+ de2.value.set(w, M), ne2.value = M;
61531
61532
  } catch (d) {
61532
61533
  console.warn("创建插入状态失败:", d);
61533
61534
  }
@@ -61614,7 +61615,7 @@ ${d}
61614
61615
  }
61615
61616
  }, Ue2 = (e) => {
61616
61617
  var r2, s, c;
61617
- const n = e || oe2.value.highlightId, o = de2.value.get(n);
61618
+ const n = e || ne2.value.highlightId, o = de2.value.get(n);
61618
61619
  if (!(!t2 || !o))
61619
61620
  try {
61620
61621
  const { inlineFromPos: x2, inlineToPos: p2 } = o, l = t2 == null ? void 0 : t2.prosemirrorView, a = (t2 == null ? void 0 : t2.prosemirrorState) || (l == null ? void 0 : l.state);
@@ -61644,7 +61645,7 @@ ${d}
61644
61645
  return !(d.type === "actionButtons" && ((h2 = d.props) == null ? void 0 : h2.highlightId) === n);
61645
61646
  }
61646
61647
  );
61647
- t2.replaceBlocks(w, C2), de2.value.delete(n), oe2.value.highlightId === n && (oe2.value = {
61648
+ t2.replaceBlocks(w, C2), de2.value.delete(n), ne2.value.highlightId === n && (ne2.value = {
61648
61649
  isInserting: false,
61649
61650
  insertedText: "",
61650
61651
  originalSelection: null,
@@ -61670,7 +61671,7 @@ ${d}
61670
61671
  return !(m2.type === "actionButtons" && ((f = m2.props) == null ? void 0 : f.highlightId) === n);
61671
61672
  }
61672
61673
  );
61673
- t2.replaceBlocks(b, i), de2.value.delete(n), oe2.value.highlightId === n && (oe2.value = {
61674
+ t2.replaceBlocks(b, i), de2.value.delete(n), ne2.value.highlightId === n && (ne2.value = {
61674
61675
  isInserting: false,
61675
61676
  insertedText: "",
61676
61677
  originalSelection: null,
@@ -61682,7 +61683,7 @@ ${d}
61682
61683
  }
61683
61684
  }, Ge2 = async (e) => {
61684
61685
  var r2, s, c, x2;
61685
- const n = e || oe2.value.highlightId, o = de2.value.get(n);
61686
+ const n = e || ne2.value.highlightId, o = de2.value.get(n);
61686
61687
  if (!(!t2 || !o))
61687
61688
  try {
61688
61689
  const { originalSelection: p2, inlineFromPos: l, inlineToPos: a, originalHighlightRange: b } = o, i = t2 == null ? void 0 : t2.prosemirrorView, m2 = (t2 == null ? void 0 : t2.prosemirrorState) || (i == null ? void 0 : i.state);
@@ -61787,7 +61788,7 @@ ${d}
61787
61788
  return !(u.type === "actionButtons" && ((y = u.props) == null ? void 0 : y.highlightId) === n);
61788
61789
  }
61789
61790
  );
61790
- t2.replaceBlocks(z2, L3), de2.value.delete(n), oe2.value.highlightId === n && (oe2.value = {
61791
+ t2.replaceBlocks(z2, L3), de2.value.delete(n), ne2.value.highlightId === n && (ne2.value = {
61791
61792
  isInserting: false,
61792
61793
  insertedText: "",
61793
61794
  originalSelection: null,
@@ -61863,7 +61864,7 @@ ${d}
61863
61864
  }
61864
61865
  }
61865
61866
  }
61866
- oe2.value = {
61867
+ ne2.value = {
61867
61868
  isInserting: false,
61868
61869
  insertedText: "",
61869
61870
  originalSelection: null,
@@ -61876,7 +61877,7 @@ ${d}
61876
61877
  }
61877
61878
  };
61878
61879
  watch(
61879
- () => [re2.defaultContent, re2.readOnly, re2.theme],
61880
+ () => [te2.defaultContent, te2.readOnly, te2.theme],
61880
61881
  async () => {
61881
61882
  await nextTick(), pe2 && await qe2();
61882
61883
  },
@@ -61916,7 +61917,7 @@ ${d}
61916
61917
  const e = [
61917
61918
  {
61918
61919
  type: "paragraph",
61919
- content: [{ type: "text", text: re2.placeholder || "", styles: {} }]
61920
+ content: [{ type: "text", text: te2.placeholder || "", styles: {} }]
61920
61921
  }
61921
61922
  ];
61922
61923
  t2.replaceBlocks(t2.topLevelBlocks, e);
@@ -61931,7 +61932,7 @@ ${d}
61931
61932
  insertContentReplaceSelected: gt3,
61932
61933
  acceptInsertion: Ue2,
61933
61934
  cancelInsertion: Ge2,
61934
- getInsertState: () => oe2.value,
61935
+ getInsertState: () => ne2.value,
61935
61936
  // 是否存在未确认的插入内容(含并发插入场景)
61936
61937
  hasPendingInsertions: () => de2.value.size > 0
61937
61938
  }), (e, n) => (openBlock(), createElementBlock("div", Nt, [
@@ -61943,15 +61944,15 @@ ${d}
61943
61944
  ]));
61944
61945
  }
61945
61946
  });
61946
- const Xt = (ne2, fe2) => {
61947
- const be2 = ne2.__vccOpts || ne2;
61947
+ const Xt = (re2, fe2) => {
61948
+ const be2 = re2.__vccOpts || re2;
61948
61949
  for (const [_e2, Ie3] of fe2)
61949
61950
  be2[_e2] = Ie3;
61950
61951
  return be2;
61951
- }, Wt = /* @__PURE__ */ Xt(qt, [["__scopeId", "data-v-191dc005"], ["__file", "/Users/dunhaiguang/Documents/items/yidong/smart-bid-web/packages/BlockNoteEditor/src/index.vue"]]), eo = (ne2) => {
61952
- ne2.component("BlockNoteEditor", Wt);
61953
- }, Ut = (ne2) => {
61954
- installBlockNoteEditor(ne2);
61952
+ }, Wt = /* @__PURE__ */ Xt(qt, [["__scopeId", "data-v-aa508f3c"]]), eo = (re2) => {
61953
+ re2.component("BlockNoteEditor", Wt);
61954
+ }, Ut = (re2) => {
61955
+ installBlockNoteEditor(re2);
61955
61956
  }, to = {
61956
61957
  install: Ut
61957
61958
  };
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $, a0, a4, a2, a3, a1 } from "./index-DAVe9cfb.js";
1
+ import { $, a0, a1, a5, a3, a4, a2 } from "./index-BaQU1IvP.js";
2
2
  import "katex/dist/katex.min.css";
3
3
  import "@semi-bot/semi-theme-xiangshuishidai/scss/index.scss";
4
4
  import "@semi-bot/semi-theme-xiangshuishidai/scss/global.scss";
@@ -8,8 +8,9 @@ import "@semi-bot/semi-theme-xiangshuishidai/semi.css";
8
8
  export {
9
9
  $ as AgentWebIndex,
10
10
  a0 as AiBlockEdit,
11
- a4 as CommonUtil,
12
- a2 as MessageUtil,
13
- a3 as PluginExecutor,
14
- a1 as Storage
11
+ a1 as BlockEditNew,
12
+ a5 as CommonUtil,
13
+ a3 as MessageUtil,
14
+ a4 as PluginExecutor,
15
+ a2 as Storage
15
16
  };
@@ -1,4 +1,4 @@
1
- import { j as BaseOutputParser, i as BaseChain, k as BasePromptTemplate, l as BaseLanguageModel, R as Runnable } from "./index-DAVe9cfb.js";
1
+ import { j as BaseOutputParser, i as BaseChain, k as BasePromptTemplate, l as BaseLanguageModel, R as Runnable } from "./index-BaQU1IvP.js";
2
2
  import "zod";
3
3
  class NoOpOutputParser extends BaseOutputParser {
4
4
  constructor() {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-KdW7xIM8.cjs");require("zod");class t extends e.BaseOutputParser{constructor(){super(...arguments),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain","output_parsers","default"]}),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0})}static lc_name(){return"NoOpOutputParser"}parse(e){return Promise.resolve(e)}getFormatInstructions(){return""}}function r(t){if(function(e){return"function"==typeof e._llmType}(t))return t;if("bound"in t&&e.Runnable.isRunnable(t.bound))return r(t.bound);if("runnable"in t&&"fallbacks"in t&&e.Runnable.isRunnable(t.runnable))return r(t.runnable);if("default"in t&&e.Runnable.isRunnable(t.default))return r(t.default);throw new Error("Unable to extract BaseLanguageModel from llmLike object.")}class i extends e.BaseChain{static lc_name(){return"LLMChain"}get inputKeys(){return this.prompt.inputVariables}get outputKeys(){return[this.outputKey]}constructor(e){if(super(e),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"prompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"llm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"llmKwargs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"outputKey",{enumerable:!0,configurable:!0,writable:!0,value:"text"}),Object.defineProperty(this,"outputParser",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.prompt=e.prompt,this.llm=e.llm,this.llmKwargs=e.llmKwargs,this.outputKey=e.outputKey??this.outputKey,this.outputParser=e.outputParser??new t,this.prompt.outputParser){if(e.outputParser)throw new Error("Cannot set both outputParser and prompt.outputParser");this.outputParser=this.prompt.outputParser}}getCallKeys(){return"callKeys"in this.llm?this.llm.callKeys:[]}_selectMemoryInputs(e){const t=super._selectMemoryInputs(e),r=this.getCallKeys();for(const i of r)i in e&&delete t[i];return t}async _getFinalOutput(e,t,r){let i;return i=this.outputParser?await this.outputParser.parseResultWithPrompt(e,t,null==r?void 0:r.getChild()):e[0].text,i}call(e,t){return super.call(e,t)}async _call(e,t){const r={...e},i={...this.llmKwargs},l=this.getCallKeys();for(const s of l)s in e&&i&&(i[s]=e[s],delete r[s]);const a=await this.prompt.formatPromptValue(r);if("generatePrompt"in this.llm){const{generations:e}=await this.llm.generatePrompt([a],i,null==t?void 0:t.getChild());return{[this.outputKey]:await this._getFinalOutput(e[0],a,t)}}const n=this.outputParser?this.llm.pipe(this.outputParser):this.llm,u=await n.invoke(a,null==t?void 0:t.getChild());return{[this.outputKey]:u}}async predict(e,t){return(await this.call(e,t))[this.outputKey]}_chainType(){return"llm"}static async deserialize(t){const{llm:r,prompt:l}=t;if(!r)throw new Error("LLMChain must have llm");if(!l)throw new Error("LLMChain must have prompt");return new i({llm:await e.BaseLanguageModel.deserialize(r),prompt:await e.BasePromptTemplate.deserialize(l)})}serialize(){const e="serialize"in this.llm?this.llm.serialize():void 0;return{_type:`${this._chainType()}_chain`,llm:e,prompt:this.prompt.serialize()}}_getNumTokens(e){return r(this.llm).getNumTokens(e)}}exports.LLMChain=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DFYcGKuT.cjs");require("zod");class t extends e.BaseOutputParser{constructor(){super(...arguments),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain","output_parsers","default"]}),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0})}static lc_name(){return"NoOpOutputParser"}parse(e){return Promise.resolve(e)}getFormatInstructions(){return""}}function r(t){if(function(e){return"function"==typeof e._llmType}(t))return t;if("bound"in t&&e.Runnable.isRunnable(t.bound))return r(t.bound);if("runnable"in t&&"fallbacks"in t&&e.Runnable.isRunnable(t.runnable))return r(t.runnable);if("default"in t&&e.Runnable.isRunnable(t.default))return r(t.default);throw new Error("Unable to extract BaseLanguageModel from llmLike object.")}class i extends e.BaseChain{static lc_name(){return"LLMChain"}get inputKeys(){return this.prompt.inputVariables}get outputKeys(){return[this.outputKey]}constructor(e){if(super(e),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"prompt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"llm",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"llmKwargs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"outputKey",{enumerable:!0,configurable:!0,writable:!0,value:"text"}),Object.defineProperty(this,"outputParser",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.prompt=e.prompt,this.llm=e.llm,this.llmKwargs=e.llmKwargs,this.outputKey=e.outputKey??this.outputKey,this.outputParser=e.outputParser??new t,this.prompt.outputParser){if(e.outputParser)throw new Error("Cannot set both outputParser and prompt.outputParser");this.outputParser=this.prompt.outputParser}}getCallKeys(){return"callKeys"in this.llm?this.llm.callKeys:[]}_selectMemoryInputs(e){const t=super._selectMemoryInputs(e),r=this.getCallKeys();for(const i of r)i in e&&delete t[i];return t}async _getFinalOutput(e,t,r){let i;return i=this.outputParser?await this.outputParser.parseResultWithPrompt(e,t,null==r?void 0:r.getChild()):e[0].text,i}call(e,t){return super.call(e,t)}async _call(e,t){const r={...e},i={...this.llmKwargs},l=this.getCallKeys();for(const s of l)s in e&&i&&(i[s]=e[s],delete r[s]);const a=await this.prompt.formatPromptValue(r);if("generatePrompt"in this.llm){const{generations:e}=await this.llm.generatePrompt([a],i,null==t?void 0:t.getChild());return{[this.outputKey]:await this._getFinalOutput(e[0],a,t)}}const n=this.outputParser?this.llm.pipe(this.outputParser):this.llm,u=await n.invoke(a,null==t?void 0:t.getChild());return{[this.outputKey]:u}}async predict(e,t){return(await this.call(e,t))[this.outputKey]}_chainType(){return"llm"}static async deserialize(t){const{llm:r,prompt:l}=t;if(!r)throw new Error("LLMChain must have llm");if(!l)throw new Error("LLMChain must have prompt");return new i({llm:await e.BaseLanguageModel.deserialize(r),prompt:await e.BasePromptTemplate.deserialize(l)})}serialize(){const e="serialize"in this.llm?this.llm.serialize():void 0;return{_type:`${this._chainType()}_chain`,llm:e,prompt:this.prompt.serialize()}}_getNumTokens(e){return r(this.llm).getNumTokens(e)}}exports.LLMChain=i;
@@ -1,4 +1,4 @@
1
- import { i as BaseChain } from "./index-DAVe9cfb.js";
1
+ import { i as BaseChain } from "./index-BaQU1IvP.js";
2
2
  function intersection(setA, setB) {
3
3
  const _intersection = /* @__PURE__ */ new Set();
4
4
  for (const elem of setB) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-KdW7xIM8.cjs");function t(e,t){const i=new Set;for(const n of t)e.has(n)&&i.add(n);return i}function i(e,t){const i=new Set(e);for(const n of t)i.delete(n);return i}function n(e){return Array.from(e).map(e=>`"${e}"`).join(", ")}class a extends e.BaseChain{static lc_name(){return"SequentialChain"}get inputKeys(){return this.inputVariables}get outputKeys(){return this.outputVariables}constructor(e){if(super(e),Object.defineProperty(this,"chains",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inputVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"outputVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"returnAll",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.chains=e.chains,this.inputVariables=e.inputVariables,this.outputVariables=e.outputVariables??[],this.outputVariables.length>0&&e.returnAll)throw new Error("Either specify variables to return using `outputVariables` or use `returnAll` param. Cannot apply both conditions at the same time.");this.returnAll=e.returnAll??!1,this._validateChains()}_validateChains(){var e;if(0===this.chains.length)throw new Error("Sequential chain must have at least one chain.");const a=(null==(e=this.memory)?void 0:e.memoryKeys)??[],r=new Set(this.inputKeys),s=new Set(a),o=t(r,s);if(o.size>0)throw new Error(`The following keys: ${n(o)} are overlapping between memory and input keys of the chain variables. This can lead to unexpected behaviour. Please use input and memory keys that don't overlap.`);const u=function(e,t){const i=new Set(e);for(const n of t)i.add(n);return i}(r,s);for(const l of this.chains){let e=i(new Set(l.inputKeys),u);if(l.memory&&(e=i(e,new Set(l.memory.memoryKeys))),e.size>0)throw new Error(`Missing variables for chain "${l._chainType()}": ${n(e)}. Only got the following variables: ${n(u)}.`);const a=new Set(l.outputKeys),r=t(u,a);if(r.size>0)throw new Error(`The following output variables for chain "${l._chainType()}" are overlapping: ${n(r)}. This can lead to unexpected behaviour.`);for(const t of a)u.add(t)}if(0===this.outputVariables.length)if(this.returnAll){const e=i(u,r);this.outputVariables=Array.from(e)}else this.outputVariables=this.chains[this.chains.length-1].outputKeys;else{const e=i(new Set(this.outputVariables),new Set(u));if(e.size>0)throw new Error(`The following output variables were expected to be in the final chain output but were not found: ${n(e)}.`)}}async _call(e,t){let i={};const n=e;let a=0;for(const s of this.chains){a+=1,i=await s.call(n,null==t?void 0:t.getChild(`step_${a}`));for(const e of Object.keys(i))n[e]=i[e]}const r={};for(const s of this.outputVariables)r[s]=n[s];return r}_chainType(){return"sequential_chain"}static async deserialize(t){const i=[],n=t.input_variables,r=t.output_variables,s=t.chains;for(const a of s){const t=await e.BaseChain.deserialize(a);i.push(t)}return new a({chains:i,inputVariables:n,outputVariables:r})}serialize(){const e=[];for(const t of this.chains)e.push(t.serialize());return{_type:this._chainType(),input_variables:this.inputVariables,output_variables:this.outputVariables,chains:e}}}class r extends e.BaseChain{static lc_name(){return"SimpleSequentialChain"}get inputKeys(){return[this.inputKey]}get outputKeys(){return[this.outputKey]}constructor(e){super(e),Object.defineProperty(this,"chains",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inputKey",{enumerable:!0,configurable:!0,writable:!0,value:"input"}),Object.defineProperty(this,"outputKey",{enumerable:!0,configurable:!0,writable:!0,value:"output"}),Object.defineProperty(this,"trimOutputs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.chains=e.chains,this.trimOutputs=e.trimOutputs??!1,this._validateChains()}_validateChains(){for(const e of this.chains){if(1!==e.inputKeys.filter(t=>{var i;return!(null==(i=e.memory)?void 0:i.memoryKeys.includes(t))}).length)throw new Error(`Chains used in SimpleSequentialChain should all have one input, got ${e.inputKeys.length} for ${e._chainType()}.`);if(1!==e.outputKeys.length)throw new Error(`Chains used in SimpleSequentialChain should all have one output, got ${e.outputKeys.length} for ${e._chainType()}.`)}}async _call(e,t){let i=e[this.inputKey],n=0;for(const a of this.chains)n+=1,i=(await a.call({[a.inputKeys[0]]:i,signal:e.signal},null==t?void 0:t.getChild(`step_${n}`)))[a.outputKeys[0]],this.trimOutputs&&(i=i.trim()),await(null==t?void 0:t.handleText(i));return{[this.outputKey]:i}}_chainType(){return"simple_sequential_chain"}static async deserialize(t){const i=[],n=t.chains;for(const a of n){const t=await e.BaseChain.deserialize(a);i.push(t)}return new r({chains:i})}serialize(){const e=[];for(const t of this.chains)e.push(t.serialize());return{_type:this._chainType(),chains:e}}}exports.SequentialChain=a,exports.SimpleSequentialChain=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DFYcGKuT.cjs");function t(e,t){const i=new Set;for(const n of t)e.has(n)&&i.add(n);return i}function i(e,t){const i=new Set(e);for(const n of t)i.delete(n);return i}function n(e){return Array.from(e).map(e=>`"${e}"`).join(", ")}class a extends e.BaseChain{static lc_name(){return"SequentialChain"}get inputKeys(){return this.inputVariables}get outputKeys(){return this.outputVariables}constructor(e){if(super(e),Object.defineProperty(this,"chains",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inputVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"outputVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"returnAll",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.chains=e.chains,this.inputVariables=e.inputVariables,this.outputVariables=e.outputVariables??[],this.outputVariables.length>0&&e.returnAll)throw new Error("Either specify variables to return using `outputVariables` or use `returnAll` param. Cannot apply both conditions at the same time.");this.returnAll=e.returnAll??!1,this._validateChains()}_validateChains(){var e;if(0===this.chains.length)throw new Error("Sequential chain must have at least one chain.");const a=(null==(e=this.memory)?void 0:e.memoryKeys)??[],r=new Set(this.inputKeys),s=new Set(a),o=t(r,s);if(o.size>0)throw new Error(`The following keys: ${n(o)} are overlapping between memory and input keys of the chain variables. This can lead to unexpected behaviour. Please use input and memory keys that don't overlap.`);const u=function(e,t){const i=new Set(e);for(const n of t)i.add(n);return i}(r,s);for(const l of this.chains){let e=i(new Set(l.inputKeys),u);if(l.memory&&(e=i(e,new Set(l.memory.memoryKeys))),e.size>0)throw new Error(`Missing variables for chain "${l._chainType()}": ${n(e)}. Only got the following variables: ${n(u)}.`);const a=new Set(l.outputKeys),r=t(u,a);if(r.size>0)throw new Error(`The following output variables for chain "${l._chainType()}" are overlapping: ${n(r)}. This can lead to unexpected behaviour.`);for(const t of a)u.add(t)}if(0===this.outputVariables.length)if(this.returnAll){const e=i(u,r);this.outputVariables=Array.from(e)}else this.outputVariables=this.chains[this.chains.length-1].outputKeys;else{const e=i(new Set(this.outputVariables),new Set(u));if(e.size>0)throw new Error(`The following output variables were expected to be in the final chain output but were not found: ${n(e)}.`)}}async _call(e,t){let i={};const n=e;let a=0;for(const s of this.chains){a+=1,i=await s.call(n,null==t?void 0:t.getChild(`step_${a}`));for(const e of Object.keys(i))n[e]=i[e]}const r={};for(const s of this.outputVariables)r[s]=n[s];return r}_chainType(){return"sequential_chain"}static async deserialize(t){const i=[],n=t.input_variables,r=t.output_variables,s=t.chains;for(const a of s){const t=await e.BaseChain.deserialize(a);i.push(t)}return new a({chains:i,inputVariables:n,outputVariables:r})}serialize(){const e=[];for(const t of this.chains)e.push(t.serialize());return{_type:this._chainType(),input_variables:this.inputVariables,output_variables:this.outputVariables,chains:e}}}class r extends e.BaseChain{static lc_name(){return"SimpleSequentialChain"}get inputKeys(){return[this.inputKey]}get outputKeys(){return[this.outputKey]}constructor(e){super(e),Object.defineProperty(this,"chains",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inputKey",{enumerable:!0,configurable:!0,writable:!0,value:"input"}),Object.defineProperty(this,"outputKey",{enumerable:!0,configurable:!0,writable:!0,value:"output"}),Object.defineProperty(this,"trimOutputs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.chains=e.chains,this.trimOutputs=e.trimOutputs??!1,this._validateChains()}_validateChains(){for(const e of this.chains){if(1!==e.inputKeys.filter(t=>{var i;return!(null==(i=e.memory)?void 0:i.memoryKeys.includes(t))}).length)throw new Error(`Chains used in SimpleSequentialChain should all have one input, got ${e.inputKeys.length} for ${e._chainType()}.`);if(1!==e.outputKeys.length)throw new Error(`Chains used in SimpleSequentialChain should all have one output, got ${e.outputKeys.length} for ${e._chainType()}.`)}}async _call(e,t){let i=e[this.inputKey],n=0;for(const a of this.chains)n+=1,i=(await a.call({[a.inputKeys[0]]:i,signal:e.signal},null==t?void 0:t.getChild(`step_${n}`)))[a.outputKeys[0]],this.trimOutputs&&(i=i.trim()),await(null==t?void 0:t.handleText(i));return{[this.outputKey]:i}}_chainType(){return"simple_sequential_chain"}static async deserialize(t){const i=[],n=t.chains;for(const a of n){const t=await e.BaseChain.deserialize(a);i.push(t)}return new r({chains:i})}serialize(){const e=[];for(const t of this.chains)e.push(t.serialize());return{_type:this._chainType(),chains:e}}}exports.SequentialChain=a,exports.SimpleSequentialChain=r;