@eigenpal/docx-editor-agents 1.5.0 → 1.6.1
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/README.md +1 -1
- package/dist/ai-sdk/server.js +1 -1
- package/dist/ai-sdk/server.mjs +1 -1
- package/dist/bridge.d.mts +1 -1
- package/dist/bridge.d.ts +1 -1
- package/dist/bridge.js +1 -1
- package/dist/bridge.mjs +1 -1
- package/dist/chunk-3RLSV2EA.mjs +2 -0
- package/dist/chunk-5THPDZLF.mjs +5 -0
- package/dist/{chunk-XDZHYYU6.mjs → chunk-6RMDMHUK.mjs} +1 -1
- package/dist/{chunk-RI5S75JY.js → chunk-AO5SO6ZS.js} +4 -4
- package/dist/chunk-EX4NO3JP.js +5 -0
- package/dist/{chunk-RYT33AHF.js → chunk-JMEIIPEL.js} +1 -1
- package/dist/{chunk-EPRXZTIE.js → chunk-MMJQ47Q7.js} +1 -1
- package/dist/{chunk-24MVJKCP.mjs → chunk-MSKW7E36.mjs} +4 -4
- package/dist/chunk-RTU2ZS7R.js +75 -0
- package/dist/chunk-X5FXVERG.mjs +75 -0
- package/dist/{chunk-BFGKTTP7.mjs → chunk-YAKNDLQA.mjs} +1 -1
- package/dist/chunk-YIZV6SSD.js +2 -0
- package/dist/executor-3N3ESB3N.mjs +1 -0
- package/dist/executor-KLVHM2GK.js +1 -0
- package/dist/headless-6GD55ATM.js +1 -0
- package/dist/{headless-6HFY6GHX.mjs → headless-ESEZ6OHS.mjs} +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/mcp.d.mts +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +3 -3
- package/dist/mcp.mjs +3 -3
- package/dist/react.d.mts +8 -8
- package/dist/react.d.ts +8 -8
- package/dist/react.js +2 -2
- package/dist/react.mjs +1 -1
- package/dist/{server-D1vJRNf0.d.mts → server-DP8QoY84.d.mts} +22 -0
- package/dist/{server-D1vJRNf0.d.ts → server-DP8QoY84.d.ts} +22 -0
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/vue.js +6 -6
- package/dist/vue.mjs +226 -179
- package/package.json +1 -1
- package/dist/chunk-3XKOKAHP.mjs +0 -75
- package/dist/chunk-4I6U7BWX.mjs +0 -2
- package/dist/chunk-HSVOT6AW.mjs +0 -5
- package/dist/chunk-HTMMNA3I.js +0 -75
- package/dist/chunk-UTMAYI7M.js +0 -2
- package/dist/chunk-VPUAYS3Y.js +0 -5
- package/dist/executor-SBR6X4JZ.mjs +0 -1
- package/dist/executor-ZTSOZMKE.js +0 -1
- package/dist/headless-HVIRJIN4.js +0 -1
package/dist/vue.mjs
CHANGED
|
@@ -210,14 +210,14 @@ var k = {
|
|
|
210
210
|
color: "#444746",
|
|
211
211
|
borderRadius: "999px",
|
|
212
212
|
transition: "background 0.15s"
|
|
213
|
-
},
|
|
213
|
+
}, ne = {
|
|
214
214
|
flex: 1,
|
|
215
215
|
minHeight: 0,
|
|
216
216
|
overflow: "hidden",
|
|
217
217
|
display: "flex",
|
|
218
218
|
flexDirection: "column"
|
|
219
219
|
};
|
|
220
|
-
function
|
|
220
|
+
function L(e, t) {
|
|
221
221
|
let n = t.currentTarget;
|
|
222
222
|
n && (n.style.background = e ? "#f1f3f4" : "transparent");
|
|
223
223
|
}
|
|
@@ -262,8 +262,8 @@ var k = {
|
|
|
262
262
|
"data-testid": "agent-panel-close",
|
|
263
263
|
style: I,
|
|
264
264
|
onClick: n[0] ||= (e) => s("close"),
|
|
265
|
-
onMouseenter: n[1] ||= (e) =>
|
|
266
|
-
onMouseleave: n[2] ||= (e) =>
|
|
265
|
+
onMouseenter: n[1] ||= (e) => L(!0, e),
|
|
266
|
+
onMouseleave: n[2] ||= (e) => L(!1, e)
|
|
267
267
|
}, [...n[4] ||= [o("svg", {
|
|
268
268
|
viewBox: "0 -960 960 960",
|
|
269
269
|
width: "18",
|
|
@@ -272,7 +272,7 @@ var k = {
|
|
|
272
272
|
"aria-hidden": "true"
|
|
273
273
|
}, [o("path", { d: "m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" })], -1)]], 40, te)) : i("", !0)
|
|
274
274
|
]),
|
|
275
|
-
o("div", { style:
|
|
275
|
+
o("div", { style: ne }, [_(t.$slots, "default")])
|
|
276
276
|
], 46, A));
|
|
277
277
|
}
|
|
278
278
|
});
|
|
@@ -309,14 +309,14 @@ function F(e) {
|
|
|
309
309
|
}
|
|
310
310
|
//#endregion
|
|
311
311
|
//#region src/vue/components/AgentTimeline.vue?vue&type=script&setup=true&lang.ts
|
|
312
|
-
var I = ["aria-expanded"],
|
|
312
|
+
var I = ["aria-expanded"], ne = {
|
|
313
313
|
key: 1,
|
|
314
314
|
style: {
|
|
315
315
|
marginRight: "6px",
|
|
316
316
|
display: "inline-flex"
|
|
317
317
|
},
|
|
318
318
|
"aria-hidden": "true"
|
|
319
|
-
},
|
|
319
|
+
}, L = /* @__PURE__ */ c({
|
|
320
320
|
__name: "AgentTimeline",
|
|
321
321
|
props: {
|
|
322
322
|
toolCalls: {},
|
|
@@ -460,7 +460,7 @@ var I = ["aria-expanded"], L = {
|
|
|
460
460
|
stroke: "#0b57d0",
|
|
461
461
|
"stroke-width": "3",
|
|
462
462
|
"stroke-linecap": "round"
|
|
463
|
-
})], -1)]], 4)) : (m(), a("span",
|
|
463
|
+
})], -1)]], 4)) : (m(), a("span", ne, [...r[2] ||= [o("svg", {
|
|
464
464
|
width: "12",
|
|
465
465
|
height: "12",
|
|
466
466
|
viewBox: "0 0 24 24",
|
|
@@ -517,7 +517,7 @@ var I = ["aria-expanded"], L = {
|
|
|
517
517
|
style: d(S.timelineError)
|
|
518
518
|
}, v(e.error), 5)) : i("", !0)], 4)], 4))), 128))], 4)) : i("", !0)], 4)) : i("", !0);
|
|
519
519
|
}
|
|
520
|
-
}),
|
|
520
|
+
}), re = ["data-role"], ie = ["aria-label"], R = "ep-agent-chat-keyframes", ae = /* @__PURE__ */ c({
|
|
521
521
|
__name: "AgentChatLog",
|
|
522
522
|
props: {
|
|
523
523
|
messages: {},
|
|
@@ -569,9 +569,9 @@ var I = ["aria-expanded"], L = {
|
|
|
569
569
|
() => s.messages[s.messages.length - 1]?.status === "streaming"
|
|
570
570
|
], y, { flush: "post" });
|
|
571
571
|
function b() {
|
|
572
|
-
if (typeof document > "u" || document.getElementById(
|
|
572
|
+
if (typeof document > "u" || document.getElementById(R)) return;
|
|
573
573
|
let e = document.createElement("style");
|
|
574
|
-
e.id =
|
|
574
|
+
e.id = R, e.textContent = "\n@keyframes epAgentDot {\n 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }\n 40% { transform: scale(1); opacity: 1; }\n}\n@keyframes epAgentSpin {\n to { transform: rotate(360deg); }\n}\n", document.head.appendChild(e);
|
|
575
575
|
}
|
|
576
576
|
let S = {
|
|
577
577
|
flex: 1,
|
|
@@ -654,7 +654,7 @@ var I = ["aria-expanded"], L = {
|
|
|
654
654
|
key: e.id,
|
|
655
655
|
style: d(C.messageGroup),
|
|
656
656
|
"data-role": e.role
|
|
657
|
-
}, [e.role === "assistant" && e.toolCalls && e.toolCalls.length > 0 ? (m(), r(
|
|
657
|
+
}, [e.role === "assistant" && e.toolCalls && e.toolCalls.length > 0 ? (m(), r(L, {
|
|
658
658
|
key: 0,
|
|
659
659
|
"tool-calls": e.toolCalls,
|
|
660
660
|
streaming: e.status === "streaming",
|
|
@@ -674,7 +674,7 @@ var I = ["aria-expanded"], L = {
|
|
|
674
674
|
])) : i("", !0), e.text.length > 0 ? (m(), a("div", {
|
|
675
675
|
key: 1,
|
|
676
676
|
style: d(e.role === "user" ? C.userBubble : C.assistantBubble)
|
|
677
|
-
}, v(e.text), 5)) : i("", !0)], 12,
|
|
677
|
+
}, v(e.text), 5)) : i("", !0)], 12, re))), 128)),
|
|
678
678
|
t.loading ? (m(), a("div", {
|
|
679
679
|
key: 1,
|
|
680
680
|
style: d(C.thinkingBubble),
|
|
@@ -692,7 +692,7 @@ var I = ["aria-expanded"], L = {
|
|
|
692
692
|
...C.dot,
|
|
693
693
|
animationDelay: "0.3s"
|
|
694
694
|
}) }, null, 4)
|
|
695
|
-
], 12,
|
|
695
|
+
], 12, ie)) : i("", !0),
|
|
696
696
|
t.error ? (m(), a("div", {
|
|
697
697
|
key: 2,
|
|
698
698
|
style: d(C.errorBubble),
|
|
@@ -704,11 +704,11 @@ var I = ["aria-expanded"], L = {
|
|
|
704
704
|
}, null, 512)
|
|
705
705
|
], 2));
|
|
706
706
|
}
|
|
707
|
-
}),
|
|
707
|
+
}), oe = [
|
|
708
708
|
"value",
|
|
709
709
|
"placeholder",
|
|
710
710
|
"disabled"
|
|
711
|
-
],
|
|
711
|
+
], se = ["aria-label", "disabled"], ce = /* @__PURE__ */ c({
|
|
712
712
|
__name: "AgentComposer",
|
|
713
713
|
props: {
|
|
714
714
|
modelValue: {},
|
|
@@ -786,7 +786,7 @@ var I = ["aria-expanded"], L = {
|
|
|
786
786
|
placeholder: e.placeholder,
|
|
787
787
|
disabled: e.disabled,
|
|
788
788
|
onInput: n[0] ||= (e) => s("update:modelValue", e.target.value)
|
|
789
|
-
}, null, 44,
|
|
789
|
+
}, null, 44, oe), o("button", {
|
|
790
790
|
type: "submit",
|
|
791
791
|
"aria-label": e.sendLabel,
|
|
792
792
|
disabled: !c.value,
|
|
@@ -803,12 +803,12 @@ var I = ["aria-expanded"], L = {
|
|
|
803
803
|
"stroke-width": "2",
|
|
804
804
|
"stroke-linecap": "round",
|
|
805
805
|
"stroke-linejoin": "round"
|
|
806
|
-
})], -1)]], 12,
|
|
806
|
+
})], -1)]], 12, se)], 4), t.$slots.footnote ? (m(), a("div", {
|
|
807
807
|
key: 0,
|
|
808
808
|
style: d(p.footnote)
|
|
809
809
|
}, [_(t.$slots, "footnote")], 4)) : i("", !0)], 38));
|
|
810
810
|
}
|
|
811
|
-
}),
|
|
811
|
+
}), le = ["disabled"], ue = /* @__PURE__ */ c({
|
|
812
812
|
__name: "AgentSuggestionChip",
|
|
813
813
|
props: {
|
|
814
814
|
label: {},
|
|
@@ -835,15 +835,15 @@ var I = ["aria-expanded"], L = {
|
|
|
835
835
|
style: r,
|
|
836
836
|
disabled: e.disabled,
|
|
837
837
|
onClick: i[0] ||= (e) => n("click")
|
|
838
|
-
}, v(e.label), 9,
|
|
838
|
+
}, v(e.label), 9, le));
|
|
839
839
|
}
|
|
840
|
-
}),
|
|
840
|
+
}), de = ["aria-label"], fe = {
|
|
841
841
|
class: "ai-ctx-menu__header",
|
|
842
842
|
"aria-hidden": "true"
|
|
843
|
-
},
|
|
843
|
+
}, pe = ["onMousedown"], me = ["innerHTML"], he = { class: "ai-ctx-menu__label" }, ge = {
|
|
844
844
|
key: 0,
|
|
845
845
|
class: "ai-ctx-menu__custom"
|
|
846
|
-
},
|
|
846
|
+
}, _e = ["placeholder"], ve = /* @__PURE__ */ c({
|
|
847
847
|
__name: "AIContextMenu",
|
|
848
848
|
props: {
|
|
849
849
|
isOpen: { type: Boolean },
|
|
@@ -924,7 +924,7 @@ var I = ["aria-expanded"], L = {
|
|
|
924
924
|
onContextmenu: c[4] ||= w(() => {}, ["prevent"]),
|
|
925
925
|
onKeydown: c[5] ||= C(w((e) => f("close"), ["stop"]), ["esc"])
|
|
926
926
|
}, [
|
|
927
|
-
o("div",
|
|
927
|
+
o("div", fe, v(T.value), 1),
|
|
928
928
|
(m(), a(e, null, g(y, (e) => o("button", {
|
|
929
929
|
key: e.id,
|
|
930
930
|
ref_for: !0,
|
|
@@ -935,39 +935,39 @@ var I = ["aria-expanded"], L = {
|
|
|
935
935
|
}, [o("span", {
|
|
936
936
|
class: "ai-ctx-menu__icon",
|
|
937
937
|
innerHTML: e.icon
|
|
938
|
-
}, null, 8,
|
|
938
|
+
}, null, 8, me), o("span", he, v(D(e.id)), 1)], 40, pe)), 64)),
|
|
939
939
|
c[6] ||= o("div", { class: "ai-ctx-menu__divider" }, null, -1),
|
|
940
|
-
s.showCustomPrompt ? (m(), a("div",
|
|
940
|
+
s.showCustomPrompt ? (m(), a("div", ge, [S(o("input", {
|
|
941
941
|
"onUpdate:modelValue": c[2] ||= (e) => p.value = e,
|
|
942
942
|
class: "ai-ctx-menu__input",
|
|
943
943
|
placeholder: E.value,
|
|
944
944
|
onKeydown: c[3] ||= C(w((e) => A("custom"), ["prevent"]), ["enter"])
|
|
945
|
-
}, null, 40,
|
|
946
|
-
], 44,
|
|
945
|
+
}, null, 40, _e), [[b, p.value]])])) : i("", !0)
|
|
946
|
+
], 44, de)) : i("", !0)]));
|
|
947
947
|
}
|
|
948
|
-
}),
|
|
948
|
+
}), z = (e, t) => {
|
|
949
949
|
let n = e.__vccOpts || e;
|
|
950
950
|
for (let [e, r] of t) n[e] = r;
|
|
951
951
|
return n;
|
|
952
|
-
},
|
|
952
|
+
}, ye = /* @__PURE__ */ z(ve, [["__scopeId", "data-v-c30da7a7"]]), be = ["aria-label"], xe = { class: "ai-preview__header" }, Se = { class: "ai-preview__title" }, Ce = ["aria-label"], we = {
|
|
953
953
|
key: 0,
|
|
954
954
|
class: "ai-preview__loading"
|
|
955
|
-
},
|
|
955
|
+
}, Te = {
|
|
956
956
|
key: 1,
|
|
957
957
|
class: "ai-preview__error"
|
|
958
|
-
},
|
|
958
|
+
}, Ee = {
|
|
959
959
|
key: 2,
|
|
960
960
|
class: "ai-preview__content"
|
|
961
|
-
},
|
|
961
|
+
}, De = {
|
|
962
962
|
key: 0,
|
|
963
963
|
class: "ai-preview__diff"
|
|
964
|
-
},
|
|
964
|
+
}, Oe = { class: "ai-preview__diff-label" }, ke = { class: "ai-preview__diff-text ai-preview__diff-text--old" }, Ae = { class: "ai-preview__diff-label" }, je = { class: "ai-preview__diff-text ai-preview__diff-text--new" }, Me = {
|
|
965
965
|
key: 1,
|
|
966
966
|
class: "ai-preview__result"
|
|
967
|
-
},
|
|
967
|
+
}, Ne = {
|
|
968
968
|
key: 3,
|
|
969
969
|
class: "ai-preview__footer"
|
|
970
|
-
},
|
|
970
|
+
}, Pe = /* @__PURE__ */ z(/* @__PURE__ */ c({
|
|
971
971
|
__name: "AIResponsePreview",
|
|
972
972
|
props: {
|
|
973
973
|
isVisible: { type: Boolean },
|
|
@@ -1020,27 +1020,27 @@ var I = ["aria-expanded"], L = {
|
|
|
1020
1020
|
tabindex: "-1",
|
|
1021
1021
|
onKeydown: n[5] ||= C(w((e) => s("reject"), ["stop"]), ["esc"])
|
|
1022
1022
|
}, [
|
|
1023
|
-
o("div",
|
|
1023
|
+
o("div", xe, [o("span", Se, v(d.value), 1), o("button", {
|
|
1024
1024
|
class: "ai-preview__close",
|
|
1025
1025
|
"aria-label": u.value.close,
|
|
1026
1026
|
onClick: n[0] ||= (e) => s("reject")
|
|
1027
|
-
}, " ✕ ", 8,
|
|
1028
|
-
e.isLoading ? (m(), a("div",
|
|
1027
|
+
}, " ✕ ", 8, Ce)]),
|
|
1028
|
+
e.isLoading ? (m(), a("div", we, [n[6] ||= o("span", { class: "ai-preview__spinner" }, null, -1), o("span", null, v(u.value.loading), 1)])) : e.error ? (m(), a("div", Te, [o("span", null, v(e.error), 1), e.showRetry ? (m(), a("button", {
|
|
1029
1029
|
key: 0,
|
|
1030
1030
|
class: "ai-preview__retry",
|
|
1031
1031
|
onMousedown: n[1] ||= w((e) => s("retry"), ["prevent"])
|
|
1032
|
-
}, v(u.value.retry), 33)) : i("", !0)])) : (m(), a("div",
|
|
1033
|
-
o("div",
|
|
1034
|
-
o("div",
|
|
1035
|
-
o("div",
|
|
1036
|
-
o("div",
|
|
1037
|
-
])) : (m(), a("div",
|
|
1032
|
+
}, v(u.value.retry), 33)) : i("", !0)])) : (m(), a("div", Ee, [e.showDiff ? (m(), a("div", De, [
|
|
1033
|
+
o("div", Oe, v(u.value.original), 1),
|
|
1034
|
+
o("div", ke, v(e.originalText), 1),
|
|
1035
|
+
o("div", Ae, v(u.value.suggested), 1),
|
|
1036
|
+
o("div", je, v(e.responseText), 1)
|
|
1037
|
+
])) : (m(), a("div", Me, v(e.responseText), 1)), e.allowEdit && c.value ? S((m(), a("textarea", {
|
|
1038
1038
|
key: 2,
|
|
1039
1039
|
"onUpdate:modelValue": n[2] ||= (e) => l.value = e,
|
|
1040
1040
|
class: "ai-preview__textarea",
|
|
1041
1041
|
rows: "4"
|
|
1042
1042
|
}, null, 512)), [[b, l.value]]) : i("", !0)])),
|
|
1043
|
-
!e.isLoading && !e.error ? (m(), a("div",
|
|
1043
|
+
!e.isLoading && !e.error ? (m(), a("div", Ne, [
|
|
1044
1044
|
e.allowEdit && !c.value ? (m(), a("button", {
|
|
1045
1045
|
key: 0,
|
|
1046
1046
|
class: "ai-preview__btn",
|
|
@@ -1055,9 +1055,9 @@ var I = ["aria-expanded"], L = {
|
|
|
1055
1055
|
onMousedown: w(f, ["prevent"])
|
|
1056
1056
|
}, v(u.value.accept), 33)
|
|
1057
1057
|
])) : i("", !0)
|
|
1058
|
-
], 40,
|
|
1058
|
+
], 40, be)) : i("", !0);
|
|
1059
1059
|
}
|
|
1060
|
-
}), [["__scopeId", "data-v-1226b741"]]),
|
|
1060
|
+
}), [["__scopeId", "data-v-1226b741"]]), B = [
|
|
1061
1061
|
"single",
|
|
1062
1062
|
"words",
|
|
1063
1063
|
"double",
|
|
@@ -1076,7 +1076,7 @@ var I = ["aria-expanded"], L = {
|
|
|
1076
1076
|
"wavyHeavy",
|
|
1077
1077
|
"wavyDouble",
|
|
1078
1078
|
"none"
|
|
1079
|
-
],
|
|
1079
|
+
], V = [
|
|
1080
1080
|
"black",
|
|
1081
1081
|
"blue",
|
|
1082
1082
|
"cyan",
|
|
@@ -1094,7 +1094,126 @@ var I = ["aria-expanded"], L = {
|
|
|
1094
1094
|
"white",
|
|
1095
1095
|
"yellow",
|
|
1096
1096
|
"none"
|
|
1097
|
-
],
|
|
1097
|
+
], Fe = {
|
|
1098
|
+
name: "apply_formatting",
|
|
1099
|
+
displayName: "Applying formatting",
|
|
1100
|
+
description: "Apply character formatting (bold, italic, underline, strike, color, highlight, font size, font family) to a paragraph or to a unique phrase within it. Pass `search` to scope the change to part of the paragraph; omit it to format the whole paragraph. Direct edit — does not create a tracked change. Pass `false` to clear a mark; omit a key to leave it untouched. Color uses `{rgb: \"FF0000\"}` (no hash) or `{themeColor: \"accent1\"}`. Font size is in points. Font family takes `{ascii, hAnsi}`.",
|
|
1101
|
+
inputSchema: {
|
|
1102
|
+
type: "object",
|
|
1103
|
+
properties: {
|
|
1104
|
+
paraId: {
|
|
1105
|
+
type: "string",
|
|
1106
|
+
description: "Paragraph id from read_document / find_text."
|
|
1107
|
+
},
|
|
1108
|
+
search: {
|
|
1109
|
+
type: "string",
|
|
1110
|
+
description: "Optional: format only this exact phrase within the paragraph (must be unique)."
|
|
1111
|
+
},
|
|
1112
|
+
marks: {
|
|
1113
|
+
type: "object",
|
|
1114
|
+
description: "Marks to set or clear. Omit a key to leave it untouched.",
|
|
1115
|
+
properties: {
|
|
1116
|
+
bold: { type: "boolean" },
|
|
1117
|
+
italic: { type: "boolean" },
|
|
1118
|
+
underline: { description: "true → single underline; false → clear; or { style: \"single\"|\"double\"|\"thick\"|\"dotted\"|\"dottedHeavy\"|\"dash\"|\"dashedHeavy\"|\"dashLong\"|\"dashLongHeavy\"|\"dotDash\"|\"dashDotHeavy\"|\"dotDotDash\"|\"dashDotDotHeavy\"|\"wave\"|\"wavyHeavy\"|\"wavyDouble\"|\"words\"|\"none\" }. Other values are rejected." },
|
|
1119
|
+
strike: { type: "boolean" },
|
|
1120
|
+
color: {
|
|
1121
|
+
type: "object",
|
|
1122
|
+
description: "Either {rgb: \"RRGGBB\"} (no hash) or {themeColor: \"accent1\"|\"text1\"|...}.",
|
|
1123
|
+
properties: {
|
|
1124
|
+
rgb: { type: "string" },
|
|
1125
|
+
themeColor: { type: "string" }
|
|
1126
|
+
}
|
|
1127
|
+
},
|
|
1128
|
+
highlight: {
|
|
1129
|
+
type: "string",
|
|
1130
|
+
enum: [...V],
|
|
1131
|
+
description: "Highlight color — must be one of the Word-supported names: " + V.join(", ") + ". Pass \"none\" to clear. Hex values are rejected (Word does not accept hex for <w:highlight>)."
|
|
1132
|
+
},
|
|
1133
|
+
fontSize: {
|
|
1134
|
+
type: "number",
|
|
1135
|
+
description: "Size in points (e.g. 12, 14, 24)."
|
|
1136
|
+
},
|
|
1137
|
+
fontFamily: {
|
|
1138
|
+
type: "object",
|
|
1139
|
+
properties: {
|
|
1140
|
+
ascii: { type: "string" },
|
|
1141
|
+
hAnsi: { type: "string" }
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
required: ["paraId", "marks"]
|
|
1148
|
+
},
|
|
1149
|
+
handler: (e, t) => {
|
|
1150
|
+
if (!e.marks || Object.keys(e.marks).length === 0) return {
|
|
1151
|
+
success: !1,
|
|
1152
|
+
error: "No marks provided. Specify at least one of bold/italic/etc."
|
|
1153
|
+
};
|
|
1154
|
+
let n = typeof e.marks.underline == "object" && e.marks.underline !== null ? e.marks.underline.style : void 0;
|
|
1155
|
+
if (n && !B.includes(n)) return {
|
|
1156
|
+
success: !1,
|
|
1157
|
+
error: `Invalid underline.style "${n}". Must be one of: ${B.join(", ")}.`
|
|
1158
|
+
};
|
|
1159
|
+
let r = typeof e.marks.highlight == "string" ? e.marks.highlight : void 0;
|
|
1160
|
+
if (r && !V.includes(r)) return {
|
|
1161
|
+
success: !1,
|
|
1162
|
+
error: `Invalid highlight "${r}". Must be one of: ${V.join(", ")}. Hex values are not supported by Word's highlight attribute.`
|
|
1163
|
+
};
|
|
1164
|
+
let i = r === "none" ? {
|
|
1165
|
+
...e.marks,
|
|
1166
|
+
highlight: ""
|
|
1167
|
+
} : e.marks;
|
|
1168
|
+
return t.applyFormatting({
|
|
1169
|
+
paraId: e.paraId,
|
|
1170
|
+
search: e.search,
|
|
1171
|
+
marks: i
|
|
1172
|
+
}) ? {
|
|
1173
|
+
success: !0,
|
|
1174
|
+
data: `Formatting applied to ${e.search ? `"${e.search}" in ${e.paraId}` : e.paraId}.`
|
|
1175
|
+
} : {
|
|
1176
|
+
success: !1,
|
|
1177
|
+
error: "Could not apply formatting. The paraId may not exist, or `search` is missing / ambiguous."
|
|
1178
|
+
};
|
|
1179
|
+
}
|
|
1180
|
+
}, Ie = {
|
|
1181
|
+
name: "set_paragraph_style",
|
|
1182
|
+
displayName: "Setting paragraph style",
|
|
1183
|
+
description: "Apply a paragraph style by id (e.g. \"Heading1\", \"Heading2\", \"Title\", \"Quote\", \"Normal\"). The styleId must exist in the document's style definitions — unknown ids are no-ops. Direct edit, not a tracked change.",
|
|
1184
|
+
inputSchema: {
|
|
1185
|
+
type: "object",
|
|
1186
|
+
properties: {
|
|
1187
|
+
paraId: {
|
|
1188
|
+
type: "string",
|
|
1189
|
+
description: "Paragraph id from read_document / find_text."
|
|
1190
|
+
},
|
|
1191
|
+
styleId: {
|
|
1192
|
+
type: "string",
|
|
1193
|
+
description: "Style id (e.g. \"Heading1\", \"Title\", \"Quote\", \"Normal\")."
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
1196
|
+
required: ["paraId", "styleId"]
|
|
1197
|
+
},
|
|
1198
|
+
handler: (e, t) => t.setParagraphStyle({
|
|
1199
|
+
paraId: e.paraId,
|
|
1200
|
+
styleId: e.styleId
|
|
1201
|
+
}) ? {
|
|
1202
|
+
success: !0,
|
|
1203
|
+
data: `Style "${e.styleId}" applied to ${e.paraId}.`
|
|
1204
|
+
} : {
|
|
1205
|
+
success: !1,
|
|
1206
|
+
error: `Could not set style. paraId "${e.paraId}" not found, or styleId "${e.styleId}" is not defined.`
|
|
1207
|
+
}
|
|
1208
|
+
}, H = [
|
|
1209
|
+
"page",
|
|
1210
|
+
"sectionNextPage",
|
|
1211
|
+
"sectionContinuous"
|
|
1212
|
+
], Le = {
|
|
1213
|
+
page: "Page break",
|
|
1214
|
+
sectionNextPage: "Section break (next page)",
|
|
1215
|
+
sectionContinuous: "Section break (continuous)"
|
|
1216
|
+
}, U = [
|
|
1098
1217
|
{
|
|
1099
1218
|
name: "read_document",
|
|
1100
1219
|
displayName: "Reading document",
|
|
@@ -1365,117 +1484,39 @@ var I = ["aria-expanded"], L = {
|
|
|
1365
1484
|
error: "Could not propose change. Possible causes: paraId not found; search missing or ambiguous; or the target overlaps an existing tracked change."
|
|
1366
1485
|
}
|
|
1367
1486
|
},
|
|
1487
|
+
Fe,
|
|
1488
|
+
Ie,
|
|
1368
1489
|
{
|
|
1369
|
-
name: "
|
|
1370
|
-
displayName: "
|
|
1371
|
-
description: "
|
|
1372
|
-
inputSchema: {
|
|
1373
|
-
type: "object",
|
|
1374
|
-
properties: {
|
|
1375
|
-
paraId: {
|
|
1376
|
-
type: "string",
|
|
1377
|
-
description: "Paragraph id from read_document / find_text."
|
|
1378
|
-
},
|
|
1379
|
-
search: {
|
|
1380
|
-
type: "string",
|
|
1381
|
-
description: "Optional: format only this exact phrase within the paragraph (must be unique)."
|
|
1382
|
-
},
|
|
1383
|
-
marks: {
|
|
1384
|
-
type: "object",
|
|
1385
|
-
description: "Marks to set or clear. Omit a key to leave it untouched.",
|
|
1386
|
-
properties: {
|
|
1387
|
-
bold: { type: "boolean" },
|
|
1388
|
-
italic: { type: "boolean" },
|
|
1389
|
-
underline: { description: "true → single underline; false → clear; or { style: \"single\"|\"double\"|\"thick\"|\"dotted\"|\"dottedHeavy\"|\"dash\"|\"dashedHeavy\"|\"dashLong\"|\"dashLongHeavy\"|\"dotDash\"|\"dashDotHeavy\"|\"dotDotDash\"|\"dashDotDotHeavy\"|\"wave\"|\"wavyHeavy\"|\"wavyDouble\"|\"words\"|\"none\" }. Other values are rejected." },
|
|
1390
|
-
strike: { type: "boolean" },
|
|
1391
|
-
color: {
|
|
1392
|
-
type: "object",
|
|
1393
|
-
description: "Either {rgb: \"RRGGBB\"} (no hash) or {themeColor: \"accent1\"|\"text1\"|...}.",
|
|
1394
|
-
properties: {
|
|
1395
|
-
rgb: { type: "string" },
|
|
1396
|
-
themeColor: { type: "string" }
|
|
1397
|
-
}
|
|
1398
|
-
},
|
|
1399
|
-
highlight: {
|
|
1400
|
-
type: "string",
|
|
1401
|
-
enum: [...H],
|
|
1402
|
-
description: "Highlight color — must be one of the Word-supported names: " + H.join(", ") + ". Pass \"none\" to clear. Hex values are rejected (Word does not accept hex for <w:highlight>)."
|
|
1403
|
-
},
|
|
1404
|
-
fontSize: {
|
|
1405
|
-
type: "number",
|
|
1406
|
-
description: "Size in points (e.g. 12, 14, 24)."
|
|
1407
|
-
},
|
|
1408
|
-
fontFamily: {
|
|
1409
|
-
type: "object",
|
|
1410
|
-
properties: {
|
|
1411
|
-
ascii: { type: "string" },
|
|
1412
|
-
hAnsi: { type: "string" }
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
},
|
|
1418
|
-
required: ["paraId", "marks"]
|
|
1419
|
-
},
|
|
1420
|
-
handler: (e, t) => {
|
|
1421
|
-
if (!e.marks || Object.keys(e.marks).length === 0) return {
|
|
1422
|
-
success: !1,
|
|
1423
|
-
error: "No marks provided. Specify at least one of bold/italic/etc."
|
|
1424
|
-
};
|
|
1425
|
-
let n = typeof e.marks.underline == "object" && e.marks.underline !== null ? e.marks.underline.style : void 0;
|
|
1426
|
-
if (n && !V.includes(n)) return {
|
|
1427
|
-
success: !1,
|
|
1428
|
-
error: `Invalid underline.style "${n}". Must be one of: ${V.join(", ")}.`
|
|
1429
|
-
};
|
|
1430
|
-
let r = typeof e.marks.highlight == "string" ? e.marks.highlight : void 0;
|
|
1431
|
-
if (r && !H.includes(r)) return {
|
|
1432
|
-
success: !1,
|
|
1433
|
-
error: `Invalid highlight "${r}". Must be one of: ${H.join(", ")}. Hex values are not supported by Word's highlight attribute.`
|
|
1434
|
-
};
|
|
1435
|
-
let i = r === "none" ? {
|
|
1436
|
-
...e.marks,
|
|
1437
|
-
highlight: ""
|
|
1438
|
-
} : e.marks;
|
|
1439
|
-
return t.applyFormatting({
|
|
1440
|
-
paraId: e.paraId,
|
|
1441
|
-
search: e.search,
|
|
1442
|
-
marks: i
|
|
1443
|
-
}) ? {
|
|
1444
|
-
success: !0,
|
|
1445
|
-
data: `Formatting applied to ${e.search ? `"${e.search}" in ${e.paraId}` : e.paraId}.`
|
|
1446
|
-
} : {
|
|
1447
|
-
success: !1,
|
|
1448
|
-
error: "Could not apply formatting. The paraId may not exist, or `search` is missing / ambiguous."
|
|
1449
|
-
};
|
|
1450
|
-
}
|
|
1451
|
-
},
|
|
1452
|
-
{
|
|
1453
|
-
name: "set_paragraph_style",
|
|
1454
|
-
displayName: "Setting paragraph style",
|
|
1455
|
-
description: "Apply a paragraph style by id (e.g. \"Heading1\", \"Heading2\", \"Title\", \"Quote\", \"Normal\"). The styleId must exist in the document's style definitions — unknown ids are no-ops. Direct edit, not a tracked change.",
|
|
1490
|
+
name: "insert_break",
|
|
1491
|
+
displayName: "Inserting break",
|
|
1492
|
+
description: "Insert a break after a paragraph (located by paraId). `type: \"page\"` adds a page break so following content starts on a new page. `type: \"sectionNextPage\"` starts a new document section on a new page. `type: \"sectionContinuous\"` starts a new section on the same page (use this to change column layout or margins from that point onward). The target paragraph becomes the end of its page/section and the next paragraph begins the new one. Direct edit — not a tracked change.",
|
|
1456
1493
|
inputSchema: {
|
|
1457
1494
|
type: "object",
|
|
1458
1495
|
properties: {
|
|
1459
1496
|
paraId: {
|
|
1460
1497
|
type: "string",
|
|
1461
|
-
description: "Paragraph id from read_document / find_text."
|
|
1498
|
+
description: "Paragraph id from read_document / find_text. The break is inserted after this paragraph."
|
|
1462
1499
|
},
|
|
1463
|
-
|
|
1500
|
+
type: {
|
|
1464
1501
|
type: "string",
|
|
1465
|
-
|
|
1502
|
+
enum: [...H],
|
|
1503
|
+
description: "Break kind: \"page\" (page break), \"sectionNextPage\" (new section, new page), or \"sectionContinuous\" (new section, same page)."
|
|
1466
1504
|
}
|
|
1467
1505
|
},
|
|
1468
|
-
required: ["paraId", "
|
|
1506
|
+
required: ["paraId", "type"]
|
|
1469
1507
|
},
|
|
1470
|
-
handler: (e, t) => t.
|
|
1508
|
+
handler: (e, t) => H.includes(e.type) ? t.insertBreak({
|
|
1471
1509
|
paraId: e.paraId,
|
|
1472
|
-
|
|
1510
|
+
type: e.type
|
|
1473
1511
|
}) ? {
|
|
1474
1512
|
success: !0,
|
|
1475
|
-
data:
|
|
1513
|
+
data: `${Le[e.type]} inserted after ${e.paraId}.`
|
|
1476
1514
|
} : {
|
|
1477
1515
|
success: !1,
|
|
1478
|
-
error: `Could not
|
|
1516
|
+
error: `Could not insert break. paraId "${e.paraId}" not found.`
|
|
1517
|
+
} : {
|
|
1518
|
+
success: !1,
|
|
1519
|
+
error: `Invalid break type "${e.type}". Must be one of: ${H.join(", ")}.`
|
|
1479
1520
|
}
|
|
1480
1521
|
},
|
|
1481
1522
|
{
|
|
@@ -1545,7 +1586,7 @@ var I = ["aria-expanded"], L = {
|
|
|
1545
1586
|
}
|
|
1546
1587
|
}
|
|
1547
1588
|
];
|
|
1548
|
-
function
|
|
1589
|
+
function Re(e, t, n) {
|
|
1549
1590
|
let r = U.find((t) => t.name === e);
|
|
1550
1591
|
if (!r) return {
|
|
1551
1592
|
success: !1,
|
|
@@ -1560,13 +1601,13 @@ function Pe(e, t, n) {
|
|
|
1560
1601
|
};
|
|
1561
1602
|
}
|
|
1562
1603
|
}
|
|
1563
|
-
function
|
|
1604
|
+
function ze(e) {
|
|
1564
1605
|
let t = U.find((t) => t.name === e);
|
|
1565
1606
|
if (t?.displayName) return t.displayName;
|
|
1566
1607
|
let n = e.replace(/_/g, " ");
|
|
1567
1608
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
1568
1609
|
}
|
|
1569
|
-
function
|
|
1610
|
+
function Be() {
|
|
1570
1611
|
return U.map((e) => ({
|
|
1571
1612
|
type: "function",
|
|
1572
1613
|
function: {
|
|
@@ -1608,9 +1649,9 @@ function J(e, t) {
|
|
|
1608
1649
|
//#region src/content.ts
|
|
1609
1650
|
function Y(e, t = {}) {
|
|
1610
1651
|
let { fromIndex: n, toIndex: r, includeTrackedChanges: i = !0, includeCommentAnchors: a = !0 } = t, o = [], s = 0;
|
|
1611
|
-
for (let t of e.content) if (t.type === "paragraph") X(s, n, r) && o.push(
|
|
1652
|
+
for (let t of e.content) if (t.type === "paragraph") X(s, n, r) && o.push(Ve(t, s, i, a)), s++;
|
|
1612
1653
|
else if (t.type === "table") {
|
|
1613
|
-
X(s, n, r) && o.push(
|
|
1654
|
+
X(s, n, r) && o.push(He(t, s, i, a));
|
|
1614
1655
|
for (let e of t.rows) for (let t of e.cells) for (let e of t.content) e.type === "paragraph" && s++;
|
|
1615
1656
|
} else s++;
|
|
1616
1657
|
return o;
|
|
@@ -1618,7 +1659,7 @@ function Y(e, t = {}) {
|
|
|
1618
1659
|
function X(e, t, n) {
|
|
1619
1660
|
return (t === void 0 || e >= t) && (n === void 0 || e <= n);
|
|
1620
1661
|
}
|
|
1621
|
-
function
|
|
1662
|
+
function Ve(e, t, n, r) {
|
|
1622
1663
|
let i = Z(e, n, r), a = e.formatting?.styleId, o = e.paraId;
|
|
1623
1664
|
return D(a) ? {
|
|
1624
1665
|
type: "heading",
|
|
@@ -1640,7 +1681,7 @@ function Le(e, t, n, r) {
|
|
|
1640
1681
|
text: i
|
|
1641
1682
|
};
|
|
1642
1683
|
}
|
|
1643
|
-
function
|
|
1684
|
+
function He(e, t, n, r) {
|
|
1644
1685
|
let i = [], a = [];
|
|
1645
1686
|
for (let t of e.rows) {
|
|
1646
1687
|
let e = [], o = [];
|
|
@@ -1658,7 +1699,7 @@ function Re(e, t, n, r) {
|
|
|
1658
1699
|
cellParaIds: a
|
|
1659
1700
|
};
|
|
1660
1701
|
}
|
|
1661
|
-
function
|
|
1702
|
+
function Ue(e) {
|
|
1662
1703
|
let t = [], n = (e) => e.paraId ? e.paraId : String(e.index);
|
|
1663
1704
|
for (let r of e) switch (r.type) {
|
|
1664
1705
|
case "heading":
|
|
@@ -1708,7 +1749,7 @@ function Z(e, t, n) {
|
|
|
1708
1749
|
}
|
|
1709
1750
|
//#endregion
|
|
1710
1751
|
//#region src/textSearch.ts
|
|
1711
|
-
function
|
|
1752
|
+
function We(e) {
|
|
1712
1753
|
let t = [], n = 0;
|
|
1713
1754
|
for (let r = 0; r < e.content.length; r++) {
|
|
1714
1755
|
let i = e.content[r];
|
|
@@ -1760,16 +1801,16 @@ function Be(e) {
|
|
|
1760
1801
|
}
|
|
1761
1802
|
return t;
|
|
1762
1803
|
}
|
|
1763
|
-
function
|
|
1764
|
-
return
|
|
1804
|
+
function Ge(e) {
|
|
1805
|
+
return We(e).map((e) => e.text).join("");
|
|
1765
1806
|
}
|
|
1766
1807
|
//#endregion
|
|
1767
1808
|
//#region src/discovery.ts
|
|
1768
|
-
function
|
|
1809
|
+
function Ke(e, t, n) {
|
|
1769
1810
|
let r = /* @__PURE__ */ new Map(), i = (e, t, n) => {
|
|
1770
1811
|
let i = null;
|
|
1771
1812
|
for (let a of e.content) if (W(a)) {
|
|
1772
|
-
i === null && (i =
|
|
1813
|
+
i === null && (i = Ge(e));
|
|
1773
1814
|
let o = G(a.content), s = a.info.id, c = `${n.noteType ?? "body"}:${n.noteId ?? ""}:${s}`, l = r.get(c);
|
|
1774
1815
|
l && l.paragraphIndex === t ? l.text += o : r.set(c, {
|
|
1775
1816
|
id: s,
|
|
@@ -1794,10 +1835,10 @@ function Ve(e, t, n) {
|
|
|
1794
1835
|
}));
|
|
1795
1836
|
return Array.from(r.values()).filter((e) => !(t?.author && e.author !== t.author || t?.type && e.type !== t.type));
|
|
1796
1837
|
}
|
|
1797
|
-
function
|
|
1838
|
+
function qe(e, t) {
|
|
1798
1839
|
let n = e.comments ?? [];
|
|
1799
1840
|
if (n.length === 0) return [];
|
|
1800
|
-
let r =
|
|
1841
|
+
let r = Ye(e), i = [], a = /* @__PURE__ */ new Map();
|
|
1801
1842
|
for (let e of n) if (e.parentId !== void 0) {
|
|
1802
1843
|
let t = a.get(e.parentId) ?? [];
|
|
1803
1844
|
t.push(e), a.set(e.parentId, t);
|
|
@@ -1807,13 +1848,13 @@ function He(e, t) {
|
|
|
1807
1848
|
id: e.id,
|
|
1808
1849
|
author: e.author,
|
|
1809
1850
|
date: e.date ?? null,
|
|
1810
|
-
text:
|
|
1851
|
+
text: Je(e)
|
|
1811
1852
|
}));
|
|
1812
1853
|
return {
|
|
1813
1854
|
id: e.id,
|
|
1814
1855
|
author: e.author,
|
|
1815
1856
|
date: e.date ?? null,
|
|
1816
|
-
text:
|
|
1857
|
+
text: Je(e),
|
|
1817
1858
|
anchoredText: t?.text ?? "",
|
|
1818
1859
|
paragraphIndex: t?.paragraphIndex ?? -1,
|
|
1819
1860
|
replies: n,
|
|
@@ -1821,10 +1862,10 @@ function He(e, t) {
|
|
|
1821
1862
|
};
|
|
1822
1863
|
}).filter((e) => !(t?.author && e.author !== t.author || t?.done !== void 0 && e.done !== t.done));
|
|
1823
1864
|
}
|
|
1824
|
-
function
|
|
1825
|
-
return e.content.map((e) =>
|
|
1865
|
+
function Je(e) {
|
|
1866
|
+
return e.content.map((e) => Ge(e)).join("\n");
|
|
1826
1867
|
}
|
|
1827
|
-
function
|
|
1868
|
+
function Ye(e) {
|
|
1828
1869
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
|
|
1829
1870
|
return q(e, (e, r) => {
|
|
1830
1871
|
for (let i of e.content) if (i.type === "commentRangeStart") n.set(i.id, {
|
|
@@ -1852,7 +1893,7 @@ function We(e) {
|
|
|
1852
1893
|
}
|
|
1853
1894
|
//#endregion
|
|
1854
1895
|
//#region src/bridge.ts
|
|
1855
|
-
function
|
|
1896
|
+
function Q(e) {
|
|
1856
1897
|
return !e || e.length === 0 ? "" : e.map((e) => {
|
|
1857
1898
|
let t = e;
|
|
1858
1899
|
return t?.content ? t.content.map((e) => e.content?.map((e) => e.text || "").join("") || "").join("") : "";
|
|
@@ -1866,14 +1907,14 @@ function $(e) {
|
|
|
1866
1907
|
}
|
|
1867
1908
|
return e.getDocument()?.package?.document ?? null;
|
|
1868
1909
|
}
|
|
1869
|
-
function
|
|
1910
|
+
function Xe(e, t = "AI") {
|
|
1870
1911
|
function n(e) {
|
|
1871
1912
|
return e ?? t;
|
|
1872
1913
|
}
|
|
1873
1914
|
return {
|
|
1874
1915
|
getContentAsText(t) {
|
|
1875
1916
|
let n = $(e);
|
|
1876
|
-
return n ?
|
|
1917
|
+
return n ? Ue(Y(n, t)) : "";
|
|
1877
1918
|
},
|
|
1878
1919
|
getContent(t) {
|
|
1879
1920
|
let n = $(e);
|
|
@@ -1882,7 +1923,7 @@ function Ke(e, t = "AI") {
|
|
|
1882
1923
|
getComments(t) {
|
|
1883
1924
|
let n = $(e);
|
|
1884
1925
|
if (!n) return [];
|
|
1885
|
-
let r =
|
|
1926
|
+
let r = qe(n, t);
|
|
1886
1927
|
if (r.length > 0) return r;
|
|
1887
1928
|
let i = e.getComments();
|
|
1888
1929
|
if (i.length === 0) return [];
|
|
@@ -1899,14 +1940,14 @@ function Ke(e, t = "AI") {
|
|
|
1899
1940
|
id: e.id,
|
|
1900
1941
|
author: e.author,
|
|
1901
1942
|
date: e.date ?? null,
|
|
1902
|
-
text:
|
|
1943
|
+
text: Q(e.content),
|
|
1903
1944
|
anchoredText: "",
|
|
1904
1945
|
paragraphIndex: -1,
|
|
1905
1946
|
replies: n.map((e) => ({
|
|
1906
1947
|
id: e.id,
|
|
1907
1948
|
author: e.author,
|
|
1908
1949
|
date: e.date ?? null,
|
|
1909
|
-
text:
|
|
1950
|
+
text: Q(e.content)
|
|
1910
1951
|
})),
|
|
1911
1952
|
done: e.done ?? !1
|
|
1912
1953
|
});
|
|
@@ -1915,7 +1956,7 @@ function Ke(e, t = "AI") {
|
|
|
1915
1956
|
},
|
|
1916
1957
|
getChanges(t) {
|
|
1917
1958
|
let n = $(e);
|
|
1918
|
-
return n ?
|
|
1959
|
+
return n ? Ke(n, t) : [];
|
|
1919
1960
|
},
|
|
1920
1961
|
findText(t, n) {
|
|
1921
1962
|
return e.findInDocument(t, n);
|
|
@@ -1958,6 +1999,12 @@ function Ke(e, t = "AI") {
|
|
|
1958
1999
|
styleId: t.styleId
|
|
1959
2000
|
});
|
|
1960
2001
|
},
|
|
2002
|
+
insertBreak(t) {
|
|
2003
|
+
return e.insertBreak({
|
|
2004
|
+
paraId: t.paraId,
|
|
2005
|
+
type: t.type
|
|
2006
|
+
});
|
|
2007
|
+
},
|
|
1961
2008
|
getPage(t) {
|
|
1962
2009
|
return e.getPageContent(t);
|
|
1963
2010
|
},
|
|
@@ -1980,7 +2027,7 @@ function Ke(e, t = "AI") {
|
|
|
1980
2027
|
},
|
|
1981
2028
|
onContentChange(t) {
|
|
1982
2029
|
return e.onContentChange(() => {
|
|
1983
|
-
let n = $(e), r = n ?
|
|
2030
|
+
let n = $(e), r = n ? qe(n) : [], i = n ? Ke(n) : [];
|
|
1984
2031
|
try {
|
|
1985
2032
|
t({
|
|
1986
2033
|
commentCount: r.length,
|
|
@@ -2006,20 +2053,20 @@ function Ke(e, t = "AI") {
|
|
|
2006
2053
|
}
|
|
2007
2054
|
//#endregion
|
|
2008
2055
|
//#region src/vue/composables/useAgentBridge.ts
|
|
2009
|
-
var
|
|
2010
|
-
function
|
|
2011
|
-
let { editorRef: t, author: r = "AI" } = e, i = n(() => t.value ?
|
|
2056
|
+
var Ze = Be();
|
|
2057
|
+
function Qe(e) {
|
|
2058
|
+
let { editorRef: t, author: r = "AI" } = e, i = n(() => t.value ? Xe(t.value, y(r)) : null);
|
|
2012
2059
|
function a(e, t) {
|
|
2013
2060
|
let n = i.value;
|
|
2014
|
-
return n ?
|
|
2061
|
+
return n ? Re(e, t, n) : {
|
|
2015
2062
|
success: !1,
|
|
2016
2063
|
error: "Editor not ready"
|
|
2017
2064
|
};
|
|
2018
2065
|
}
|
|
2019
2066
|
return {
|
|
2020
2067
|
executeToolCall: a,
|
|
2021
|
-
toolSchemas:
|
|
2068
|
+
toolSchemas: Ze
|
|
2022
2069
|
};
|
|
2023
2070
|
}
|
|
2024
2071
|
//#endregion
|
|
2025
|
-
export {
|
|
2072
|
+
export { ye as AIContextMenu, Pe as AIResponsePreview, ae as AgentChatLog, ce as AgentComposer, M as AgentPanel, ue as AgentSuggestionChip, L as AgentTimeline, ze as getToolDisplayName, Qe as useAgentBridge };
|