rhua-chatgpt-web 1.1.6 → 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.
- package/dist/{api_chain-CKT4Ohw8.js → api_chain-8rLd0TuD.js} +2 -2
- package/dist/{api_chain-N6cO3Z7A.cjs → api_chain-DBmoQA_7.cjs} +1 -1
- package/dist/{combine_docs_chain--Y7d6aSy.js → combine_docs_chain-BH4-g2GW.js} +2 -2
- package/dist/{combine_docs_chain-BNJxb0Gs.cjs → combine_docs_chain-DfTwsFo0.cjs} +1 -1
- package/dist/{few_shot-ChC8aH8b.js → few_shot-DJCpSBvt.js} +1 -1
- package/dist/{few_shot-CDBqI2Ys.cjs → few_shot-DQaRrbJw.cjs} +1 -1
- package/dist/{index-u8vlzCLe.js → index-BAXNGSXw.js} +1 -1
- package/dist/{index-0kEbYI8E.js → index-BDxCvrgc.js} +1 -1
- package/dist/{index-BL6aXvwq.cjs → index-BQO11CzB.cjs} +1 -1
- package/dist/index-B_x2i-jO.js +4 -0
- package/dist/{index-zAP0Ll9a.js → index-BaQU1IvP.js} +229 -17
- package/dist/index-C8LQxWL1.js +4 -0
- package/dist/{index-zo6xsYrJ.js → index-CD6GBfkZ.js} +1 -1
- package/dist/{index-B78sVP5R.cjs → index-CFln1NC2.cjs} +1 -1
- package/dist/{index-CosWt-S3.cjs → index-CUnp2vsA.cjs} +1 -1
- package/dist/{index-DjJb_SAb.js → index-CXpHNR4F.js} +1 -1
- package/dist/index-CYDd-qnF.js +4 -0
- package/dist/{index-BoVswZfB.cjs → index-CvCPvUjj.cjs} +1 -1
- package/dist/{index-vZBjPhbn.cjs → index-DFYcGKuT.cjs} +11 -11
- package/dist/index-DH4SzrZB.js +4 -0
- package/dist/{index-By0Xo-m7.cjs → index-DRg4CNkS.cjs} +1 -1
- package/dist/{index-Bd66L2W0.js → index-Dy-SzFud.js} +2 -2
- package/dist/{index-CFuOi4iF.cjs → index-FAGD8ZFV.cjs} +1 -1
- package/dist/{index-DkxD2k9x.js → index-GSRYlXZ2.js} +1 -1
- package/dist/{index-Cfepbmtj.cjs → index-PQbFNXZe.cjs} +1 -1
- package/dist/{index-B8ZRW_yr.cjs → index-VviEQjAE.cjs} +1 -1
- package/dist/{index-DyXL0CeE.js → index-Wbrx5M_5.js} +2 -2
- package/dist/{index-CIYMf0qL.cjs → index-faFDPW0m.cjs} +1 -1
- package/dist/{index-BllBfWMm.cjs → index-jiGOdiuu.cjs} +1 -1
- package/dist/{index-BLUkF_Fj.cjs → index-xDEsnKsG.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/{index.es-B2TKMjj8.cjs → index.es-DUhQYmQQ.cjs} +3 -3
- package/dist/{index.es-mYp333HK.js → index.es-Ofj7pWXh.js} +60 -59
- package/dist/index.esm.js +6 -5
- package/dist/{llm_chain-EOU4-N68.js → llm_chain-D_TCnPCU.js} +1 -1
- package/dist/{llm_chain-Ccdciq6f.cjs → llm_chain-uxhdn-1W.cjs} +1 -1
- package/dist/{sequential_chain-YncpdH_1.js → sequential_chain-BIzQ7CWb.js} +1 -1
- package/dist/{sequential_chain-B7gSmAiJ.cjs → sequential_chain-CMYssdOR.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{vector_db_qa-CldcVkud.cjs → vector_db_qa-Bf6oOghB.cjs} +1 -1
- package/dist/{vector_db_qa-nw6U0HI5.js → vector_db_qa-DnXdDGBx.js} +3 -3
- package/package.json +135 -135
- package/dist/index-CB3iLddF.js +0 -4
- package/dist/index-CDalpP5C.js +0 -4
- package/dist/index-CEh-kRgr.js +0 -4
- package/dist/index-Dz9H6mEL.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-
|
|
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-
|
|
39845
|
-
import("./index-
|
|
39846
|
-
import("./index-
|
|
39847
|
-
import("./index-
|
|
39848
|
-
import("./index-
|
|
39849
|
-
import("./index-
|
|
39850
|
-
import("./index-
|
|
39851
|
-
import("./index-
|
|
39852
|
-
import("./index-
|
|
39853
|
-
import("./index-
|
|
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(
|
|
58649
|
+
He = function(re2, fe2) {
|
|
58650
58650
|
Ze.usingClientEntryPoint = true;
|
|
58651
58651
|
try {
|
|
58652
|
-
return Te.createRoot(
|
|
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: (
|
|
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: {
|
|
59104
|
-
readOnly: { type: Boolean
|
|
59105
|
-
placeholder: {
|
|
59106
|
-
theme: {
|
|
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(
|
|
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
|
-
),
|
|
59539
|
-
let pe2 = null, t2 = 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 (!
|
|
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 } =
|
|
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))),
|
|
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"),
|
|
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 &&
|
|
59779
|
-
const { fromPos: s, toPos: c } =
|
|
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(),
|
|
59784
|
-
}, lt2 = () =>
|
|
59785
|
-
if (!
|
|
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,
|
|
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 }),
|
|
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 (
|
|
60389
|
+
if (te2.defaultContent && Array.isArray(te2.defaultContent))
|
|
60389
60390
|
try {
|
|
60390
|
-
const l = toRaw(unref(
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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()),
|
|
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),
|
|
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),
|
|
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),
|
|
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 ||
|
|
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),
|
|
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),
|
|
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 ||
|
|
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),
|
|
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
|
-
|
|
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
|
-
() => [
|
|
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:
|
|
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: () =>
|
|
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 = (
|
|
61947
|
-
const be2 =
|
|
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-
|
|
61952
|
-
|
|
61953
|
-
}, Ut = (
|
|
61954
|
-
installBlockNoteEditor(
|
|
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,
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
a3 as
|
|
14
|
-
|
|
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-
|
|
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-
|
|
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 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
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;
|