@freecallai/pro 0.0.14 → 0.0.15

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/README.md +1 -1
  2. package/dist/{FkpRichText.vue_vue_type_script_setup_true_lang-D-SOdFra.js → FkpRichText.vue_vue_type_script_setup_true_lang-DaSKjAe7.js} +246 -244
  3. package/dist/{KnowledgeArea-ClZoLiaZ.js → KnowledgeArea-BV2T5ecq.js} +1 -1
  4. package/dist/{KnowledgeArea.vue_vue_type_script_setup_true_lang-CoFF-WCe.js → KnowledgeArea.vue_vue_type_script_setup_true_lang-QJZNyAnH.js} +221 -223
  5. package/dist/{ToolForm-BK9epxdr.js → ToolForm-CJRw9QhZ.js} +1 -1
  6. package/dist/agent-prompt-editor/index.js +198 -179
  7. package/dist/agent-prompt-editor/legacy-converter/index.js +188 -162
  8. package/dist/{choice-UgePgrSl.js → choice-BZa68Gpl.js} +1 -1
  9. package/dist/{guard-DPwe4mCm.js → guard-CZOoBb3d.js} +271 -213
  10. package/dist/index-9-vUHS0W.js +15 -0
  11. package/dist/index-B4oT1Q9u.js +5 -0
  12. package/dist/index-BHgHsPrz.js +5 -0
  13. package/dist/index-Bd2S6qOP.js +19 -0
  14. package/dist/{index-CaA13lC9.js → index-BdSClCaD.js} +1 -1
  15. package/dist/{index-BIi3k45j.js → index-BwkcWrL6.js} +1 -1
  16. package/dist/{index-ChuzFuNm.js → index-Cn_sllKh.js} +1 -1
  17. package/dist/{index-DiLMgNEe.js → index-DvDbrMvv.js} +1 -1
  18. package/dist/{index-DfKH-RZq.js → index-OMoExOaa.js} +2 -2
  19. package/dist/{index-RHu4JIw7.js → index-WExTogRL.js} +1 -1
  20. package/dist/{index-v1UD08i6.js → index-w2M63UAJ.js} +1 -1
  21. package/dist/index.js +3 -3
  22. package/dist/{inline-CVF1zEsG.js → inline-BJJy0svW.js} +1 -1
  23. package/dist/{knowledge-DWM6tWnP.js → knowledge-B3aTxExW.js} +1 -1
  24. package/dist/media-extensions-CpwsEWCD.js +338 -0
  25. package/dist/{media-migration-BctCLEuT.js → media-migration-3-xnOp0T.js} +1 -1
  26. package/dist/{media-policy-B1UuSN2e.js → media-policy-BqquGDH1.js} +36 -36
  27. package/dist/{media-upload-DtH-oCtw.js → media-upload-AunEWyNv.js} +1 -1
  28. package/dist/{model-VLLhEQfn.js → model-aED-32GY.js} +10 -6
  29. package/dist/rich-text/index.js +6 -6
  30. package/dist/rich-text/legacy-converter/index.js +905 -842
  31. package/dist/style.css +1 -1
  32. package/dist/types/agent-prompt-editor/model.d.ts +1 -1
  33. package/dist/types/rich-text/config/descriptor.d.ts +2 -0
  34. package/dist/types/rich-text/model/qianniu-video.d.ts +1 -0
  35. package/dist/types/rich-text/plugins/noFollow/descriptor.d.ts +2 -0
  36. package/dist/types/rich-text/plugins/noFollow/index.d.ts +2 -0
  37. package/dist/types/rich-text/plugins/noFollow/token.d.ts +2 -0
  38. package/dist/types/rich-text/plugins/reasoningMarker/descriptor.d.ts +2 -0
  39. package/dist/types/rich-text/plugins/reasoningMarker/index.d.ts +2 -0
  40. package/dist/types/rich-text/plugins/reasoningMarker/token.d.ts +2 -0
  41. package/dist/types/rich-text/plugins/token-catalog.d.ts +2 -0
  42. package/dist/types/rich-text/public/types.d.ts +1 -1
  43. package/package.json +1 -1
  44. package/dist/index-BMHUPL5x.js +0 -5
  45. package/dist/index-DJLfgC4v.js +0 -5
  46. package/dist/media-extensions-YYbGuUQa.js +0 -341
@@ -1,12 +1,12 @@
1
- import { defineComponent as It, ref as d, computed as N, onMounted as Tt, watch as $, onBeforeUnmount as Et, openBlock as m, createElementBlock as y, withKeys as Mt, withModifiers as ae, normalizeClass as Lt, createElementVNode as k, Fragment as ve, renderList as Le, createCommentVNode as q, createVNode as R, unref as T, withCtx as me, createBlock as Je, createTextVNode as Se, toDisplayString as U, renderSlot as St, normalizeStyle as Ct, withDirectives as We, vModelText as Xe, nextTick as ge } from "vue";
2
- import { Popover as _t, Button as Ce } from "@freecallai/ui";
3
- import _e from "@freecallai/icons";
4
- import { u as wt, c as Ze, m as be, _ as Dt, M as je, a as Nt, b as Pt } from "../media-policy-B1UuSN2e.js";
5
- import { i as Qe } from "../guard-DPwe4mCm.js";
6
- import { _ as Vt } from "../KnowledgeArea.vue_vue_type_script_setup_true_lang-CoFF-WCe.js";
1
+ import { defineComponent as It, ref as d, computed as N, onMounted as Tt, watch as $, onBeforeUnmount as Mt, openBlock as m, createElementBlock as y, withKeys as Et, withModifiers as ae, normalizeClass as Lt, createElementVNode as k, Fragment as ve, renderList as Le, createCommentVNode as q, createVNode as R, unref as M, withCtx as me, createBlock as Je, createTextVNode as we, toDisplayString as U, renderSlot as wt, normalizeStyle as St, withDirectives as We, vModelText as Xe, nextTick as ge } from "vue";
2
+ import { Popover as Ct, Button as Se } from "@freecallai/ui";
3
+ import Ce from "@freecallai/icons";
4
+ import { u as _t, c as Ze, m as be, _ as Dt, M as je, a as Nt, b as Pt } from "../media-policy-BqquGDH1.js";
5
+ import { i as Qe } from "../guard-CZOoBb3d.js";
6
+ import { _ as Vt } from "../KnowledgeArea.vue_vue_type_script_setup_true_lang-QJZNyAnH.js";
7
7
  import { Node as Ot } from "@tiptap/core";
8
- import { f as ne, a as et, c as zt, e as Kt, v as Rt } from "../model-VLLhEQfn.js";
9
- const Ft = Ot.create({
8
+ import { f as ne, a as et, c as zt, e as Ft, v as Kt } from "../model-aED-32GY.js";
9
+ const Rt = Ot.create({
10
10
  name: "agentSizeChart",
11
11
  group: "inline",
12
12
  inline: !0,
@@ -19,32 +19,32 @@ const Ft = Ot.create({
19
19
  return [
20
20
  {
21
21
  tag: "span[data-agent-size-chart]",
22
- getAttrs: (S) => ({
23
- name: S.getAttribute("data-agent-size-chart") || ""
22
+ getAttrs: (w) => ({
23
+ name: w.getAttribute("data-agent-size-chart") || ""
24
24
  })
25
25
  }
26
26
  ];
27
27
  },
28
- renderHTML({ node: S }) {
28
+ renderHTML({ node: w }) {
29
29
  return [
30
30
  "span",
31
31
  {
32
- "data-agent-size-chart": S.attrs.name,
32
+ "data-agent-size-chart": w.attrs.name,
33
33
  class: "fkp-agent-size-chart fkp-knowledge-tag",
34
34
  contenteditable: "false"
35
35
  },
36
- `#@${S.attrs.name}@#`
36
+ `#@${w.attrs.name}@#`
37
37
  ];
38
38
  },
39
- renderText({ node: S }) {
40
- return `#@${S.attrs.name}@#`;
39
+ renderText({ node: w }) {
40
+ return `#@${w.attrs.name}@#`;
41
41
  }
42
42
  });
43
- function xt(S) {
43
+ function xt(w) {
44
44
  return {
45
45
  ariaLabel: "Agent 提示词",
46
46
  placeholder: "填写提示词",
47
- extensions: [Ft],
47
+ extensions: [Rt],
48
48
  describeTagValidity: (g) => g.type.name === "agentSizeChart" ? {
49
49
  kind: "agentSizeChart",
50
50
  key: String(g.attrs.name || ""),
@@ -55,10 +55,10 @@ function xt(S) {
55
55
  sanitizeInlineNode(g) {
56
56
  if (!g.hasAttribute("data-agent-size-chart")) return;
57
57
  const D = g.getAttribute("data-agent-size-chart") || "";
58
- if (!S() || !D.trim() || /[#@<>\r\n]/u.test(D) || g.textContent !== `#@${D}@#`)
58
+ if (!w() || !D.trim() || /[#@<>\r\n]/u.test(D) || g.textContent !== `#@${D}@#`)
59
59
  return null;
60
- const i = document.createElement("span");
61
- return i.setAttribute("data-agent-size-chart", D), i.textContent = `#@${D}@#`, i;
60
+ const o = document.createElement("span");
61
+ return o.setAttribute("data-agent-size-chart", D), o.textContent = `#@${D}@#`, o;
62
62
  },
63
63
  serializeNode(g) {
64
64
  if (g.type.name === "agentSizeChart")
@@ -86,7 +86,7 @@ const Bt = {
86
86
  key: 2,
87
87
  role: "alert",
88
88
  class: "fkp-agent-prompt-error"
89
- }, Zt = { class: "fkp-agent-prompt-footer" }, oa = /* @__PURE__ */ It({
89
+ }, Zt = { class: "fkp-agent-prompt-footer" }, ia = /* @__PURE__ */ It({
90
90
  name: "FkpAgentPromptEditor",
91
91
  __name: "FkpAgentPromptEditor",
92
92
  props: {
@@ -104,24 +104,28 @@ const Bt = {
104
104
  maxLength: { default: 1e4 }
105
105
  },
106
106
  emits: ["update:modelValue", "change", "diagnostic", "busy-change"],
107
- setup(S, { expose: g, emit: D }) {
108
- const i = S, le = D;
109
- function we(e) {
107
+ setup(w, { expose: g, emit: D }) {
108
+ const o = w, le = D;
109
+ function _e(e) {
110
110
  return JSON.parse(JSON.stringify(e));
111
111
  }
112
112
  function De(e) {
113
- return ne(e) ? Kt() : we(e);
113
+ return ne(e) ? Ft() : _e(e);
114
114
  }
115
- const C = d(De(i.modelValue)), V = d(
116
- ne(i.modelValue)
117
- ), Y = d(0), c = d(), ie = d(), ye = d(), H = d(), G = d(Number.POSITIVE_INFINITY), E = d(!1), A = d(null), oe = d([]), J = d(""), re = d(!1), Ne = d(12), I = d(!1), W = d(null), X = d(0), Z = d(0), ue = d(), _ = d(null), P = d(null), se = d(!1), { suppressedMediaHint: tt, suppressMediaHint: at, resumeMediaHintOnHover: nt } = wt(), Pe = d({});
118
- let w = null;
119
- const F = /* @__PURE__ */ new Set(), ce = /* @__PURE__ */ new Map();
115
+ const S = d(De(o.modelValue)), V = d(
116
+ ne(o.modelValue)
117
+ ), Y = d(0), c = d(), oe = d(), ye = d(), H = d(), G = d(Number.POSITIVE_INFINITY), E = d(!1), A = d(null), ie = d([]), J = d(""), re = d(!1), Ne = d(12), I = d(!1), W = d(null), X = d(0), Z = d(0), ue = d(), C = d(null), P = d(null), se = d(!1), { suppressedMediaHint: tt, suppressMediaHint: at, resumeMediaHintOnHover: nt } = _t(), Pe = d({});
118
+ let _ = null;
119
+ const x = /* @__PURE__ */ new Set(), ce = /* @__PURE__ */ new Map();
120
120
  let h = null, ke = null, lt = 0;
121
121
  const de = d(Date.now());
122
122
  let j;
123
123
  const Ve = N(
124
- () => new Set(i.capabilities || et)
124
+ () => new Set(
125
+ o.capabilities || et.filter(
126
+ (e) => e !== "noFollow" && e !== "reasoningMarker"
127
+ )
128
+ )
125
129
  ), Oe = [
126
130
  { id: "variable", label: "变量", icon: "hashtag", group: "reference" },
127
131
  { id: "todo", label: "待办", icon: "rte-todo", group: "reference" },
@@ -142,43 +146,45 @@ const Bt = {
142
146
  { id: "video", label: "视频", icon: "video3", group: "media" },
143
147
  { id: "originalReply", label: "原话复述", icon: "quote", group: "format" },
144
148
  { id: "separator", label: "分隔符", icon: "sep", group: "format" },
149
+ { id: "noFollow", label: "不跟单", icon: "sep", group: "format" },
150
+ { id: "reasoningMarker", label: "推理", icon: "AI", group: "format" },
145
151
  { id: "smallPayment", label: "小额打款", icon: "rte-tool", group: "tool" }
146
- ], it = N(
152
+ ], ot = N(
147
153
  () => {
148
154
  var e;
149
155
  return new Set(
150
- ((e = i.config) == null ? void 0 : e.schemaVersion) === 1 && Array.isArray(i.config.rules) ? i.config.rules.filter((t) => (t == null ? void 0 : t.visible) === !1).map((t) => t.id) : []
156
+ ((e = o.config) == null ? void 0 : e.schemaVersion) === 1 && Array.isArray(o.config.rules) ? o.config.rules.filter((t) => (t == null ? void 0 : t.visible) === !1).map((t) => t.id) : []
151
157
  );
152
158
  }
153
159
  ), pe = N(
154
160
  () => Oe.filter(
155
- (e) => Ve.value.has(e.id) && !it.value.has(e.id)
161
+ (e) => Ve.value.has(e.id) && !ot.value.has(e.id)
156
162
  )
157
163
  ), ze = N(
158
164
  () => pe.value.slice(0, G.value)
159
165
  ), Ae = N(
160
166
  () => pe.value.slice(G.value)
161
- ), Ke = N(
167
+ ), Fe = N(
162
168
  () => {
163
169
  var e;
164
170
  return ((e = Oe.find((t) => t.id === A.value)) == null ? void 0 : e.label) || "";
165
171
  }
166
172
  ), O = N(
167
- () => i.readonly || i.disabled || !!V.value || !!i.policy && i.policy.expiresAt <= de.value
173
+ () => o.readonly || o.disabled || !!V.value || !!o.policy && o.policy.expiresAt <= de.value
168
174
  );
169
175
  function b(e) {
170
- return !O.value && et.includes(e) && Ve.value.has(e) && (!i.policy || i.policy.allowed.includes(e));
176
+ return !O.value && et.includes(e) && Ve.value.has(e) && (!o.policy || o.policy.allowed.includes(e));
171
177
  }
172
- const ot = xt(() => b("sizeChart"));
178
+ const it = xt(() => b("sizeChart"));
173
179
  function he(e) {
174
180
  var t, n;
175
- return b(e) && (e === "variable" ? !!((t = i.ports) != null && t.listVariables) : !!((n = i.ports) != null && n.listCapabilityOptions));
181
+ return b(e) && (e === "variable" ? !!((t = o.ports) != null && t.listVariables) : !!((n = o.ports) != null && n.listCapabilityOptions));
176
182
  }
177
183
  function Ie(e) {
178
- return e === "image" || e === "video" ? b(e) && be(i.mediaSources, e).some(
184
+ return e === "image" || e === "video" ? b(e) && be(o.mediaSources, e).some(
179
185
  (t) => {
180
186
  var n;
181
- return t !== "local" || !!((n = i.ports) != null && n.uploadMedia);
187
+ return t !== "local" || !!((n = o.ports) != null && n.uploadMedia);
182
188
  }
183
189
  ) : [
184
190
  "variable",
@@ -188,16 +194,16 @@ const Bt = {
188
194
  "attribute"
189
195
  ].includes(e) ? he(e) : b(e);
190
196
  }
191
- function x() {
197
+ function B() {
192
198
  h == null || h.abort(), A.value = null;
193
199
  }
194
- function Re(e, t) {
200
+ function Ke(e, t) {
195
201
  var n;
196
202
  if (Ie(e))
197
- if (E.value = !1, x(), z(), I.value = !1, ["variable", "todo", "tableKnowledge", "sizeChart", "attribute"].includes(
203
+ if (E.value = !1, B(), F(), I.value = !1, ["variable", "todo", "tableKnowledge", "sizeChart", "attribute"].includes(
198
204
  e
199
205
  )) {
200
- const a = t.currentTarget, l = (n = ie.value) == null ? void 0 : n.getBoundingClientRect();
206
+ const a = t.currentTarget, l = (n = oe.value) == null ? void 0 : n.getBoundingClientRect();
201
207
  l && (Ne.value = Math.max(
202
208
  12,
203
209
  Math.min(
@@ -207,23 +213,23 @@ const Bt = {
207
213
  )), dt(e);
208
214
  } else e === "image" || e === "video" ? ft(e, t) : e === "smallPayment" ? mt() : fe({ type: "capability", capabilityId: e });
209
215
  }
210
- let Q, Fe = 0;
216
+ let Q, Re = 0;
211
217
  async function ee() {
212
- const e = ++Fe;
213
- for (G.value = pe.value.length, await ge(); e === Fe && H.value && H.value.clientWidth > 0 && H.value.scrollWidth > H.value.clientWidth + 1 && G.value > 0; )
218
+ const e = ++Re;
219
+ for (G.value = pe.value.length, await ge(); e === Re && H.value && H.value.clientWidth > 0 && H.value.scrollWidth > H.value.clientWidth + 1 && G.value > 0; )
214
220
  G.value--, await ge();
215
221
  Ae.value.length || (E.value = !1);
216
222
  }
217
223
  function xe(e) {
218
224
  var t;
219
- (t = ie.value) != null && t.contains(e.target) || (E.value = !1, x(), P.value || z(), I.value = !1);
225
+ (t = oe.value) != null && t.contains(e.target) || (E.value = !1, B(), P.value || F(), I.value = !1);
220
226
  }
221
227
  Tt(() => {
222
228
  window.addEventListener("resize", ee), document.addEventListener("click", xe), typeof ResizeObserver < "u" && ye.value && (Q = new ResizeObserver(() => void ee()), Q.observe(ye.value)), ee();
223
229
  }), $(pe, (e) => {
224
- A.value && !e.some((t) => t.id === A.value) && x(), I.value && !e.some((t) => t.id === "smallPayment") && (I.value = !1), ee();
230
+ A.value && !e.some((t) => t.id === A.value) && B(), I.value && !e.some((t) => t.id === "smallPayment") && (I.value = !1), ee();
225
231
  }), $(O, (e) => {
226
- e && (x(), z(), I.value = !1, E.value = !1);
232
+ e && (B(), F(), I.value = !1, E.value = !1);
227
233
  });
228
234
  const rt = {
229
235
  businessToken: !0,
@@ -240,6 +246,8 @@ const Bt = {
240
246
  "video",
241
247
  "originalReply",
242
248
  "separator",
249
+ "noFollow",
250
+ "reasoningMarker",
243
251
  "tool"
244
252
  ].filter(
245
253
  (e) => b(e === "tool" ? "smallPayment" : e)
@@ -247,16 +255,16 @@ const Bt = {
247
255
  id: e,
248
256
  slot: e === "image" || e === "video" || e === "originalReply" ? "knowledgeBlock" : "knowledgeInline"
249
257
  }))
250
- ), st = N(() => zt(C.value));
258
+ ), st = N(() => zt(S.value));
251
259
  function Be() {
252
- j && clearTimeout(j), de.value = Date.now(), i.policy && i.policy.expiresAt > de.value && (j = setTimeout(
260
+ j && clearTimeout(j), de.value = Date.now(), o.policy && o.policy.expiresAt > de.value && (j = setTimeout(
253
261
  Be,
254
- Math.min(i.policy.expiresAt - de.value + 1, 2147483647)
262
+ Math.min(o.policy.expiresAt - de.value + 1, 2147483647)
255
263
  ));
256
264
  }
257
265
  $(() => {
258
266
  var e;
259
- return (e = i.policy) == null ? void 0 : e.expiresAt;
267
+ return (e = o.policy) == null ? void 0 : e.expiresAt;
260
268
  }, Be, { immediate: !0 });
261
269
  function te() {
262
270
  le("busy-change", {
@@ -265,32 +273,32 @@ const Bt = {
265
273
  });
266
274
  }
267
275
  function $e() {
268
- z();
269
- for (const e of F) e.abort();
270
- F.clear(), ce.clear(), h = null, A.value = null, E.value = !1, I.value = !1, oe.value = [], re.value = !1, X.value = 0, Z.value = 0, te();
276
+ F();
277
+ for (const e of x) e.abort();
278
+ x.clear(), ce.clear(), h = null, A.value = null, E.value = !1, I.value = !1, ie.value = [], re.value = !1, X.value = 0, Z.value = 0, te();
271
279
  }
272
280
  $(
273
- () => i.promptKey,
281
+ () => o.promptKey,
274
282
  () => {
275
- $e(), C.value = De(i.modelValue), V.value = ne(i.modelValue), Y.value = 0;
283
+ $e(), S.value = De(o.modelValue), V.value = ne(o.modelValue), Y.value = 0;
276
284
  },
277
285
  { flush: "sync" }
278
286
  ), $(
279
- () => [i.modelValue, i.ackRevision],
287
+ () => [o.modelValue, o.ackRevision],
280
288
  ([e, t]) => {
281
289
  const n = ne(e);
282
290
  if (n) {
283
291
  V.value = n, f("PROMPT_DOCUMENT_INVALID", "输入的提示词文档无效", n);
284
292
  return;
285
293
  }
286
- if (Ze(e) === Ze(C.value)) {
294
+ if (Ze(e) === Ze(S.value)) {
287
295
  V.value = null;
288
296
  return;
289
297
  }
290
- Y.value > 0 && (t || 0) < Y.value || (V.value = null, C.value = we(e));
298
+ Y.value > 0 && (t || 0) < Y.value || (V.value = null, S.value = _e(e));
291
299
  },
292
300
  { deep: !0 }
293
- ), Et(() => {
301
+ ), Mt(() => {
294
302
  $e(), j && clearTimeout(j), Q == null || Q.disconnect(), window.removeEventListener("resize", ee), document.removeEventListener("click", xe);
295
303
  });
296
304
  function f(e, t, n = "doc") {
@@ -308,13 +316,13 @@ const Bt = {
308
316
  if (l)
309
317
  return f("PROMPT_DOCUMENT_INVALID", "编辑结果包含无效内容", l), ge(() => {
310
318
  var r;
311
- return (r = c.value) == null ? void 0 : r.restoreDoc(C.value.doc);
319
+ return (r = c.value) == null ? void 0 : r.restoreDoc(S.value.doc);
312
320
  }), !1;
313
- C.value = a;
314
- const o = ++Y.value;
321
+ S.value = a;
322
+ const i = ++Y.value;
315
323
  return le("change", a, {
316
- promptKey: i.promptKey,
317
- revision: o,
324
+ promptKey: o.promptKey,
325
+ revision: i,
318
326
  origin: t,
319
327
  ...n ? { capabilityId: n } : {}
320
328
  }), le("update:modelValue", a), !0;
@@ -323,7 +331,7 @@ const Bt = {
323
331
  const t = ke;
324
332
  Te(e, (t == null ? void 0 : t.origin) || "user", t == null ? void 0 : t.capabilityId);
325
333
  }
326
- function M(e, t, n) {
334
+ function T(e, t, n) {
327
335
  ke = { origin: t, capabilityId: n };
328
336
  try {
329
337
  return e();
@@ -334,19 +342,19 @@ const Bt = {
334
342
  function p(e, t) {
335
343
  return f(e, t), { ok: !1, code: e, message: t };
336
344
  }
337
- function B() {
345
+ function z() {
338
346
  return { ok: !0, revision: Y.value };
339
347
  }
340
348
  function qe(e) {
341
349
  const t = /* @__PURE__ */ new Set(), n = (a) => {
342
- var l, o, r, u;
343
- e === "agentSizeChart" && a.type === e && t.add(String(((l = a.attrs) == null ? void 0 : l.name) || "").trim()), e === "tableKnowledge" && ((o = a.attrs) == null ? void 0 : o.kind) === e && t.add(String(((r = a.attrs) == null ? void 0 : r.label) || "").trim()), (u = a.content) == null || u.forEach(n);
350
+ var l, i, r, u;
351
+ e === "agentSizeChart" && a.type === e && t.add(String(((l = a.attrs) == null ? void 0 : l.name) || "").trim()), e === "tableKnowledge" && ((i = a.attrs) == null ? void 0 : i.kind) === e && t.add(String(((r = a.attrs) == null ? void 0 : r.label) || "").trim()), (u = a.content) == null || u.forEach(n);
344
352
  };
345
- return n(C.value.doc), t;
353
+ return n(S.value.doc), t;
346
354
  }
347
- function Ee(e, t) {
355
+ function Me(e, t) {
348
356
  return {
349
- promptKey: i.promptKey,
357
+ promptKey: o.promptKey,
350
358
  capabilityId: e,
351
359
  requestId: `agent-prompt-${++lt}`,
352
360
  signal: t.signal
@@ -355,15 +363,15 @@ const Bt = {
355
363
  async function fe(e) {
356
364
  var r, u, K;
357
365
  if (O.value) return p("PROMPT_READONLY", "当前提示词不可编辑");
358
- const t = i.promptKey;
366
+ const t = o.promptKey;
359
367
  let n = c.value;
360
- if (n || (await ge(), n = c.value), !n || !await n.whenReady() || t !== i.promptKey)
368
+ if (n || (await ge(), n = c.value), !n || !await n.whenReady() || t !== o.promptKey)
361
369
  return p("EDITOR_UNAVAILABLE", "提示词编辑器尚未就绪");
362
370
  if (e.type === "text")
363
- return e.text ? M(
371
+ return e.text ? T(
364
372
  () => n.insertText(e.text, e.placement, e.selectInserted),
365
373
  "api"
366
- ) ? B() : p("INSERT_FAILED", "文本插入失败") : p("EMPTY_TEXT", "插入文本不能为空");
374
+ ) ? z() : p("INSERT_FAILED", "文本插入失败") : p("EMPTY_TEXT", "插入文本不能为空");
367
375
  if (e.type === "media") {
368
376
  const { asset: s } = e;
369
377
  if (!b(s.kind) || !Qe(s.url))
@@ -372,7 +380,7 @@ const Bt = {
372
380
  if (!v) return p("INSERT_FAILED", "无法确定媒体插入位置");
373
381
  try {
374
382
  const L = n.insertMedia(s, e.name || "", v, !0);
375
- return L && Te(L, "api", s.kind) ? B() : p("INSERT_FAILED", "媒体插入失败");
383
+ return L && Te(L, "api", s.kind) ? z() : p("INSERT_FAILED", "媒体插入失败");
376
384
  } finally {
377
385
  v.dispose();
378
386
  }
@@ -381,18 +389,29 @@ const Bt = {
381
389
  if (!b(a)) return p("CAPABILITY_DISABLED", "当前功能不可用");
382
390
  const { option: l } = e;
383
391
  if (a === "originalReply")
384
- return M(() => n.insertOriginal(), "api", a) ? B() : p("INSERT_FAILED", "原话复述插入失败");
392
+ return T(() => n.insertOriginal(), "api", a) ? z() : p("INSERT_FAILED", "原话复述插入失败");
385
393
  if (a === "separator")
386
- return M(() => n.insertSeparator(), "api", a) ? B() : p("INSERT_FAILED", "分隔符插入失败");
394
+ return T(() => n.insertSeparator(), "api", a) ? z() : p("INSERT_FAILED", "分隔符插入失败");
395
+ if (a === "noFollow" || a === "reasoningMarker")
396
+ return T(
397
+ () => n.insertToken(
398
+ a,
399
+ a,
400
+ a === "noFollow" ? "不跟单" : "推理",
401
+ a === "noFollow" ? "<不发送跟单>" : "{推理}"
402
+ ),
403
+ "api",
404
+ a
405
+ ) ? z() : p("INSERT_FAILED", "功能内容插入失败");
387
406
  if (a === "smallPayment") {
388
407
  const s = Number((r = l == null ? void 0 : l.params) == null ? void 0 : r.amount);
389
- return !Number.isInteger(s) || s < 1 || s > 99 ? p("PAYMENT_INVALID", "小额打款金额必须为 1–99 整数元") : M(
408
+ return !Number.isInteger(s) || s < 1 || s > 99 ? p("PAYMENT_INVALID", "小额打款金额必须为 1–99 整数元") : T(
390
409
  () => n.upsertToken("tool", "small_payment", "小额打款", {
391
410
  amount: String(s)
392
411
  }),
393
412
  "api",
394
413
  a
395
- ) ? B() : p("PAYMENT_INVALID", "小额打款金额必须为 1–99 整数元");
414
+ ) ? z() : p("PAYMENT_INVALID", "小额打款金额必须为 1–99 整数元");
396
415
  }
397
416
  if (!((u = l == null ? void 0 : l.label) != null && u.trim()) || !((K = l.id) != null && K.trim()))
398
417
  return p("OPTION_INVALID", "请选择有效的功能选项");
@@ -410,7 +429,7 @@ const Bt = {
410
429
  return p("SIZE_LIMIT", "最多引用 4 个尺码表");
411
430
  }
412
431
  }
413
- return M(
432
+ return T(
414
433
  () => a === "sizeChart" ? n.insertInlineNode("agentSizeChart", {
415
434
  name: l.label.trim()
416
435
  }) : n.insertToken(
@@ -422,36 +441,36 @@ const Bt = {
422
441
  ),
423
442
  "api",
424
443
  a
425
- ) ? B() : p("INSERT_FAILED", "功能内容插入失败");
444
+ ) ? z() : p("INSERT_FAILED", "功能内容插入失败");
426
445
  }
427
446
  async function Ue(e) {
428
- var a, l, o, r;
447
+ var a, l, i, r;
429
448
  if (!he(e)) return;
430
- h == null || h.abort(), A.value = e, oe.value = [];
449
+ h == null || h.abort(), A.value = e, ie.value = [];
431
450
  const t = new AbortController();
432
- h = t, F.add(t), Z.value++, re.value = !0, te();
433
- const n = i.promptKey;
451
+ h = t, x.add(t), Z.value++, re.value = !0, te();
452
+ const n = o.promptKey;
434
453
  try {
435
- const u = e === "variable" ? await ((l = (a = i.ports) == null ? void 0 : a.listVariables) == null ? void 0 : l.call(
454
+ const u = e === "variable" ? await ((l = (a = o.ports) == null ? void 0 : a.listVariables) == null ? void 0 : l.call(
436
455
  a,
437
456
  { search: J.value, limit: 50 },
438
- Ee(e, t)
439
- )) : await ((r = (o = i.ports) == null ? void 0 : o.listCapabilityOptions) == null ? void 0 : r.call(
440
- o,
457
+ Me(e, t)
458
+ )) : await ((r = (i = o.ports) == null ? void 0 : i.listCapabilityOptions) == null ? void 0 : r.call(
459
+ i,
441
460
  { capabilityId: e, search: J.value, limit: 50 },
442
- Ee(e, t)
461
+ Me(e, t)
443
462
  ));
444
- if (t.signal.aborted || n !== i.promptKey || A.value !== e)
463
+ if (t.signal.aborted || n !== o.promptKey || A.value !== e)
445
464
  return;
446
465
  if (!(u != null && u.ok)) {
447
466
  f("OPTION_LOAD_FAILED", (u == null ? void 0 : u.error.message) || "选项加载失败");
448
467
  return;
449
468
  }
450
- oe.value = u.data.items;
469
+ ie.value = u.data.items;
451
470
  } catch {
452
471
  t.signal.aborted || f("OPTION_LOAD_FAILED", "选项加载失败");
453
472
  } finally {
454
- h === t && (h = null, re.value = !1), F.delete(t) && (Z.value = Math.max(0, Z.value - 1), te());
473
+ h === t && (h = null, re.value = !1), x.delete(t) && (Z.value = Math.max(0, Z.value - 1), te());
455
474
  }
456
475
  }
457
476
  function dt(e) {
@@ -469,20 +488,20 @@ const Bt = {
469
488
  }
470
489
  }));
471
490
  }
472
- function z() {
473
- _.value = null, P.value = null, se.value = !1, w == null || w.dispose(), w = null;
491
+ function F() {
492
+ C.value = null, P.value = null, se.value = !1, _ == null || _.dispose(), _ = null;
474
493
  }
475
- $(() => i.mediaSources, z, { deep: !0 });
494
+ $(() => o.mediaSources, F, { deep: !0 });
476
495
  function ft(e, t) {
477
- var o, r, u;
478
- const n = be(i.mediaSources, e).filter(
496
+ var i, r, u;
497
+ const n = be(o.mediaSources, e).filter(
479
498
  (K) => {
480
499
  var s;
481
- return K !== "local" || !!((s = i.ports) != null && s.uploadMedia);
500
+ return K !== "local" || !!((s = o.ports) != null && s.uploadMedia);
482
501
  }
483
502
  );
484
503
  if (!b(e) || !n.length) return;
485
- if (at(e), w = ((o = c.value) == null ? void 0 : o.captureMediaTarget()) || ((r = c.value) == null ? void 0 : r.captureEndTarget()) || null, !w) {
504
+ if (at(e), _ = ((i = c.value) == null ? void 0 : i.captureMediaTarget()) || ((r = c.value) == null ? void 0 : r.captureEndTarget()) || null, !_) {
486
505
  f("EDITOR_UNAVAILABLE", "无法确定媒体插入位置");
487
506
  return;
488
507
  }
@@ -490,7 +509,7 @@ const Bt = {
490
509
  Ye(e, n[0]);
491
510
  return;
492
511
  }
493
- const a = t.currentTarget.getBoundingClientRect(), l = (u = ie.value) == null ? void 0 : u.getBoundingClientRect();
512
+ const a = t.currentTarget.getBoundingClientRect(), l = (u = oe.value) == null ? void 0 : u.getBoundingClientRect();
494
513
  Pe.value = {
495
514
  left: `${Math.max(
496
515
  8,
@@ -500,29 +519,29 @@ const Bt = {
500
519
  )
501
520
  )}px`,
502
521
  top: `${a.bottom - ((l == null ? void 0 : l.top) || 0) + 4}px`
503
- }, _.value = e;
522
+ }, C.value = e;
504
523
  }
505
524
  function Ye(e, t) {
506
- if (_.value = null, t === "online" || t === "qianniu") {
525
+ if (C.value = null, t === "online" || t === "qianniu") {
507
526
  se.value = t === "qianniu", P.value = e;
508
527
  return;
509
528
  }
510
529
  ue.value && (ue.value.accept = e === "image" ? "image/png,image/jpeg" : "video/mp4", ue.value.click());
511
530
  }
512
531
  function vt(e) {
513
- const t = _.value;
532
+ const t = C.value;
514
533
  t && Ye(t, e);
515
534
  }
516
535
  function He(e, t) {
517
536
  var l;
518
- const n = P.value, a = w;
519
- if (w = null, P.value = null, se.value = !1, !(!n || !a))
537
+ const n = P.value, a = _;
538
+ if (_ = null, P.value = null, se.value = !1, !(!n || !a))
520
539
  try {
521
540
  if (!b(n) || a.status() !== "ready") {
522
541
  f("INSERT_TARGET_LOST", "媒体插入位置已失效");
523
542
  return;
524
543
  }
525
- const o = (l = c.value) == null ? void 0 : l.insertMedia(
544
+ const i = (l = c.value) == null ? void 0 : l.insertMedia(
526
545
  {
527
546
  kind: n,
528
547
  url: e,
@@ -532,7 +551,7 @@ const Bt = {
532
551
  a,
533
552
  !0
534
553
  );
535
- (!o || !Te(o, "api", n)) && f("INSERT_FAILED", "在线媒体插入失败");
554
+ (!i || !Te(i, "api", n)) && f("INSERT_FAILED", "在线媒体插入失败");
536
555
  } finally {
537
556
  a.dispose();
538
557
  }
@@ -544,7 +563,7 @@ const Bt = {
544
563
  var n, a, l;
545
564
  t.type === "businessToken" && ((n = t.attrs) == null ? void 0 : n.kind) === "tool" && t.attrs.key === "small_payment" && (W.value = Number((a = t.attrs.params) == null ? void 0 : a.amount)), (l = t.content) == null || l.forEach(e);
546
565
  };
547
- e(C.value.doc), I.value = !0, A.value = null;
566
+ e(S.value.doc), I.value = !0, A.value = null;
548
567
  }
549
568
  async function gt() {
550
569
  (await fe({
@@ -557,8 +576,8 @@ const Bt = {
557
576
  }
558
577
  })).ok && (I.value = !1);
559
578
  }
560
- function Me(e, t) {
561
- var o;
579
+ function Ee(e, t) {
580
+ var i;
562
581
  if (!e.length || e.length > je) {
563
582
  t == null || t.dispose(), f("INVALID_MEDIA", `一次最多添加 ${je} 个媒体文件`);
564
583
  return;
@@ -576,11 +595,11 @@ const Bt = {
576
595
  t == null || t.dispose(), f("INVALID_MEDIA", "仅支持符合大小限制的 JPG、PNG、MP4 文件");
577
596
  return;
578
597
  }
579
- if (!((o = i.ports) != null && o.uploadMedia) || !t || !c.value) {
598
+ if (!((i = o.ports) != null && i.uploadMedia) || !t || !c.value) {
580
599
  t == null || t.dispose(), f("UPLOAD_UNAVAILABLE", "上传功能不可用");
581
600
  return;
582
601
  }
583
- const a = n, l = M(
602
+ const a = n, l = T(
584
603
  () => {
585
604
  var r;
586
605
  return ((r = c.value) == null ? void 0 : r.insertPendingMediaBatch(a, t)) || null;
@@ -598,21 +617,21 @@ const Bt = {
598
617
  }
599
618
  async function Ge(e, t, n) {
600
619
  var r, u, K;
601
- const a = (r = i.ports) == null ? void 0 : r.uploadMedia;
620
+ const a = (r = o.ports) == null ? void 0 : r.uploadMedia;
602
621
  if (!a) return;
603
622
  const l = new AbortController();
604
- F.add(l), X.value++, te();
605
- const o = i.promptKey;
623
+ x.add(l), X.value++, te();
624
+ const i = o.promptKey;
606
625
  try {
607
- const s = await a({ file: t, kind: n }, Ee(n, l));
608
- if (l.signal.aborted || o !== i.promptKey) return;
626
+ const s = await a({ file: t, kind: n }, Me(n, l));
627
+ if (l.signal.aborted || i !== o.promptKey) return;
609
628
  const v = (u = c.value) == null ? void 0 : u.getMediaState(e);
610
629
  if (!v || v.status !== "uploading") return;
611
630
  if (!s.ok || !Qe(s.data.url) || s.data.kind !== n) {
612
631
  f(
613
632
  "UPLOAD_FAILED",
614
633
  s.ok ? "上传资源无效" : s.error.message
615
- ), M(
634
+ ), T(
616
635
  () => {
617
636
  var L;
618
637
  return (L = c.value) == null ? void 0 : L.failMedia(e, "上传失败", v.nodeVersion);
@@ -623,7 +642,7 @@ const Bt = {
623
642
  return;
624
643
  }
625
644
  if (!b(n)) {
626
- M(
645
+ T(
627
646
  () => {
628
647
  var L;
629
648
  return (L = c.value) == null ? void 0 : L.failMedia(e, "当前无媒体权限", v.nodeVersion);
@@ -633,7 +652,7 @@ const Bt = {
633
652
  );
634
653
  return;
635
654
  }
636
- M(
655
+ T(
637
656
  () => {
638
657
  var L;
639
658
  return ((L = c.value) == null ? void 0 : L.completeMedia(e, v.nodeVersion, s.data)) || !1;
@@ -644,7 +663,7 @@ const Bt = {
644
663
  } catch {
645
664
  if (!l.signal.aborted) {
646
665
  const s = (K = c.value) == null ? void 0 : K.getMediaState(e);
647
- (s == null ? void 0 : s.status) === "uploading" && M(
666
+ (s == null ? void 0 : s.status) === "uploading" && T(
648
667
  () => {
649
668
  var v;
650
669
  return (v = c.value) == null ? void 0 : v.failMedia(e, "上传失败", s.nodeVersion);
@@ -654,13 +673,13 @@ const Bt = {
654
673
  ), f("UPLOAD_FAILED", "媒体上传失败");
655
674
  }
656
675
  } finally {
657
- F.delete(l) && (X.value = Math.max(0, X.value - 1), te());
676
+ x.delete(l) && (X.value = Math.max(0, X.value - 1), te());
658
677
  }
659
678
  }
660
679
  function bt(e) {
661
680
  var a;
662
681
  const t = ce.get(e), n = (a = c.value) == null ? void 0 : a.getMediaState(e);
663
- !t || !n || n.status !== "error" || !b(n.kind) || M(
682
+ !t || !n || n.status !== "error" || !b(n.kind) || T(
664
683
  () => {
665
684
  var l;
666
685
  return (l = c.value) == null ? void 0 : l.retryMedia(e, n.nodeVersion);
@@ -670,38 +689,38 @@ const Bt = {
670
689
  ) && Ge(e, t, n.kind);
671
690
  }
672
691
  async function yt(e) {
673
- var a, l, o;
692
+ var a, l, i;
674
693
  const t = Array.from(e.target.files || []);
675
694
  e.target.value = "";
676
- const n = w;
677
- if (w = null, t.length) {
678
- const r = i.promptKey;
679
- if (!await ((a = c.value) == null ? void 0 : a.whenReady()) || r !== i.promptKey) {
695
+ const n = _;
696
+ if (_ = null, t.length) {
697
+ const r = o.promptKey;
698
+ if (!await ((a = c.value) == null ? void 0 : a.whenReady()) || r !== o.promptKey) {
680
699
  n == null || n.dispose();
681
700
  return;
682
701
  }
683
- const u = n || ((l = c.value) == null ? void 0 : l.captureMediaTarget()) || ((o = c.value) == null ? void 0 : o.captureEndTarget());
684
- Me(t, u || null);
702
+ const u = n || ((l = c.value) == null ? void 0 : l.captureMediaTarget()) || ((i = c.value) == null ? void 0 : i.captureEndTarget());
703
+ Ee(t, u || null);
685
704
  } else n == null || n.dispose();
686
705
  }
687
706
  function kt(e) {
688
- var a, l, o, r;
707
+ var a, l, i, r;
689
708
  const t = Array.from(((a = e.clipboardData) == null ? void 0 : a.files) || []);
690
709
  if (!t.length || O.value) return;
691
710
  e.preventDefault();
692
- const n = ((l = c.value) == null ? void 0 : l.pasteClipboardContent(e)) || ((o = c.value) == null ? void 0 : o.captureMediaTarget()) || ((r = c.value) == null ? void 0 : r.captureEndTarget());
693
- n && Me(t, n);
711
+ const n = ((l = c.value) == null ? void 0 : l.pasteClipboardContent(e)) || ((i = c.value) == null ? void 0 : i.captureMediaTarget()) || ((r = c.value) == null ? void 0 : r.captureEndTarget());
712
+ n && Ee(t, n);
694
713
  }
695
714
  function At(e) {
696
- var a, l, o;
715
+ var a, l, i;
697
716
  const t = Array.from(((a = e.dataTransfer) == null ? void 0 : a.files) || []);
698
717
  if (!t.length || O.value) return;
699
718
  e.preventDefault();
700
- const n = ((l = c.value) == null ? void 0 : l.captureMediaTargetAt(e.clientX, e.clientY)) || ((o = c.value) == null ? void 0 : o.captureEndTarget());
701
- n && Me(t, n);
719
+ const n = ((l = c.value) == null ? void 0 : l.captureMediaTargetAt(e.clientX, e.clientY)) || ((i = c.value) == null ? void 0 : i.captureEndTarget());
720
+ n && Ee(t, n);
702
721
  }
703
722
  function ht() {
704
- return Rt(C.value, i.maxLength);
723
+ return Kt(S.value, o.maxLength);
705
724
  }
706
725
  return g({
707
726
  insertContent: fe,
@@ -718,13 +737,13 @@ const Bt = {
718
737
  var n;
719
738
  return m(), y("section", {
720
739
  ref_key: "root",
721
- ref: ie,
740
+ ref: oe,
722
741
  class: Lt(["fkp-rich-text fkp-agent-prompt-editor", {
723
- "has-open-menu": !!A.value || I.value || E.value || !!_.value
742
+ "has-open-menu": !!A.value || I.value || E.value || !!C.value
724
743
  }]),
725
744
  "aria-label": "Agent 提示词编辑器",
726
- onKeydown: t[12] || (t[12] = Mt(ae((a) => {
727
- x(), I.value = !1, E.value = !1, z();
745
+ onKeydown: t[12] || (t[12] = Et(ae((a) => {
746
+ B(), I.value = !1, E.value = !1, F();
728
747
  }, ["stop"]), ["esc"]))
729
748
  }, [
730
749
  k("div", {
@@ -743,29 +762,29 @@ const Bt = {
743
762
  key: a.id
744
763
  }, [
745
764
  l > 0 && a.group !== ze.value[l - 1].group ? (m(), y("span", Bt)) : q("", !0),
746
- R(T(_t), {
765
+ R(M(Ct), {
747
766
  trigger: "hover",
748
767
  position: "bottom",
749
768
  content: a.label,
750
- "popup-visible": T(tt) === a.id || a.id === "video" && T(be)(e.mediaSources, "video").includes("qianniu") || _.value === a.id || P.value === a.id ? !1 : void 0
769
+ "popup-visible": M(tt) === a.id || a.id === "video" && M(be)(e.mediaSources, "video").includes("qianniu") || C.value === a.id || P.value === a.id ? !1 : void 0
751
770
  }, {
752
771
  default: me(() => [
753
- R(T(Ce), {
772
+ R(M(Se), {
754
773
  class: "fkp-tool-button fkp-agent-prompt-tool",
755
774
  type: "text",
756
775
  "data-fkp-menu-trigger": a.id,
757
776
  "aria-label": a.label,
758
777
  disabled: !Ie(a.id),
759
- onMouseenter: (o) => T(nt)(
778
+ onMouseenter: (i) => M(nt)(
760
779
  a.id,
761
- !!_.value || !!P.value
780
+ !!C.value || !!P.value
762
781
  ),
763
782
  onMousedown: t[0] || (t[0] = ae(() => {
764
783
  }, ["prevent"])),
765
- onClick: (o) => Re(a.id, o)
784
+ onClick: (i) => Ke(a.id, i)
766
785
  }, {
767
786
  default: me(() => [
768
- R(T(_e), {
787
+ R(M(Ce), {
769
788
  name: a.icon,
770
789
  size: 16
771
790
  }, null, 8, ["name"])
@@ -778,7 +797,7 @@ const Bt = {
778
797
  ], 64))), 128))
779
798
  ], 512),
780
799
  Ae.value.length ? (m(), y("div", $t, [
781
- R(T(Ce), {
800
+ R(M(Se), {
782
801
  class: "fkp-more-button",
783
802
  type: "text",
784
803
  "aria-label": "更多操作",
@@ -789,7 +808,7 @@ const Bt = {
789
808
  onClick: t[2] || (t[2] = (a) => E.value = !E.value)
790
809
  }, {
791
810
  default: me(() => [
792
- R(T(_e), {
811
+ R(M(Ce), {
793
812
  name: "more",
794
813
  size: 16
795
814
  })
@@ -797,7 +816,7 @@ const Bt = {
797
816
  _: 1
798
817
  }, 8, ["aria-expanded"]),
799
818
  E.value ? (m(), y("div", qt, [
800
- (m(!0), y(ve, null, Le(Ae.value, (a) => (m(), Je(T(Ce), {
819
+ (m(!0), y(ve, null, Le(Ae.value, (a) => (m(), Je(M(Se), {
801
820
  key: a.id,
802
821
  class: "fkp-agent-prompt-more-item",
803
822
  type: "text",
@@ -806,21 +825,21 @@ const Bt = {
806
825
  disabled: !Ie(a.id),
807
826
  onMousedown: t[3] || (t[3] = ae(() => {
808
827
  }, ["prevent"])),
809
- onClick: (l) => Re(a.id, l)
828
+ onClick: (l) => Ke(a.id, l)
810
829
  }, {
811
830
  default: me(() => [
812
- R(T(_e), {
831
+ R(M(Ce), {
813
832
  name: a.icon,
814
833
  size: 16
815
834
  }, null, 8, ["name"]),
816
- Se(U(a.label), 1)
835
+ we(U(a.label), 1)
817
836
  ]),
818
837
  _: 2
819
838
  }, 1032, ["data-fkp-menu-trigger", "disabled", "onClick"]))), 128))
820
839
  ])) : q("", !0)
821
840
  ])) : q("", !0),
822
841
  k("div", Ut, [
823
- St(e.$slots, "toolbar-action")
842
+ wt(e.$slots, "toolbar-action")
824
843
  ]),
825
844
  k("input", {
826
845
  ref_key: "fileInput",
@@ -831,11 +850,11 @@ const Bt = {
831
850
  }, null, 544)
832
851
  ], 512),
833
852
  R(Dt, {
834
- "menu-kind": _.value,
853
+ "menu-kind": C.value,
835
854
  "dialog-kind": P.value,
836
855
  "qianniu-dialog": se.value,
837
856
  "menu-style": Pe.value,
838
- sources: _.value ? T(be)(e.mediaSources, _.value).filter(
857
+ sources: C.value ? M(be)(e.mediaSources, C.value).filter(
839
858
  (a) => {
840
859
  var l;
841
860
  return a !== "local" || !!((l = e.ports) != null && l.uploadMedia);
@@ -844,19 +863,19 @@ const Bt = {
844
863
  onChoose: vt,
845
864
  onSubmit: He,
846
865
  onSubmitQianniu: t[4] || (t[4] = ({ id: a, url: l }) => He(l, a)),
847
- onClose: z
866
+ onClose: F
848
867
  }, null, 8, ["menu-kind", "dialog-kind", "qianniu-dialog", "menu-style", "sources"]),
849
868
  A.value ? (m(), y("div", {
850
869
  key: 0,
851
870
  class: "fkp-agent-prompt-options",
852
- style: Ct({ left: `${Ne.value}px` })
871
+ style: St({ left: `${Ne.value}px` })
853
872
  }, [
854
873
  k("label", null, [
855
- Se(" 搜索" + U(Ke.value) + " ", 1),
874
+ we(" 搜索" + U(Fe.value) + " ", 1),
856
875
  We(k("input", {
857
876
  "onUpdate:modelValue": t[5] || (t[5] = (a) => J.value = a),
858
877
  type: "search",
859
- "aria-label": `搜索${Ke.value}`,
878
+ "aria-label": `搜索${Fe.value}`,
860
879
  onInput: t[6] || (t[6] = (a) => Ue(A.value))
861
880
  }, null, 40, Yt), [
862
881
  [Xe, J.value]
@@ -865,10 +884,10 @@ const Bt = {
865
884
  k("button", {
866
885
  type: "button",
867
886
  "aria-label": "关闭选项",
868
- onClick: x
869
- }, "×"),
887
+ onClick: B
888
+ }, " × "),
870
889
  re.value ? (m(), y("p", Ht, "加载中…")) : (m(), y("ul", Gt, [
871
- (m(!0), y(ve, null, Le(oe.value, (a) => (m(), y("li", {
890
+ (m(!0), y(ve, null, Le(ie.value, (a) => (m(), y("li", {
872
891
  key: a.id
873
892
  }, [
874
893
  k("button", {
@@ -883,7 +902,7 @@ const Bt = {
883
902
  ], 4)) : q("", !0),
884
903
  I.value ? (m(), y("div", Wt, [
885
904
  k("label", null, [
886
- t[13] || (t[13] = Se(" 小额打款金额(元) ")),
905
+ t[13] || (t[13] = we(" 小额打款金额(元) ")),
887
906
  We(k("input", {
888
907
  "onUpdate:modelValue": t[8] || (t[8] = (a) => W.value = a),
889
908
  type: "number",
@@ -908,19 +927,19 @@ const Bt = {
908
927
  onClick: gt
909
928
  }, "确认")
910
929
  ])) : q("", !0),
911
- V.value ? (m(), y("p", Xt, "提示词文档无效:" + U(V.value), 1)) : q("", !0),
930
+ V.value ? (m(), y("p", Xt, " 提示词文档无效:" + U(V.value), 1)) : q("", !0),
912
931
  (m(), Je(Vt, {
913
932
  key: e.promptKey,
914
933
  ref_key: "area",
915
934
  ref: c,
916
- "model-value": C.value.doc,
935
+ "model-value": S.value.doc,
917
936
  "tag-validity-port": (n = e.ports) == null ? void 0 : n.validateTags,
918
937
  "tag-validity-key": e.promptKey,
919
938
  editable: !O.value,
920
939
  placeholder: e.placeholder,
921
940
  "schema-plan": rt,
922
941
  "paste-capabilities": ut.value,
923
- "document-adapter": T(ot),
942
+ "document-adapter": M(it),
924
943
  "onUpdate:modelValue": ct,
925
944
  onLoadError: t[10] || (t[10] = (a) => f("EDITOR_LOAD_FAILED", a)),
926
945
  onTagValidityError: t[11] || (t[11] = (a) => f("TAG_VALIDITY_FAILED", a)),
@@ -936,8 +955,8 @@ const Bt = {
936
955
  }
937
956
  });
938
957
  export {
939
- oa as FkpAgentPromptEditor,
940
- oa as default,
941
- Kt as emptyAgentPrompt,
942
- Rt as validateAgentPrompt
958
+ ia as FkpAgentPromptEditor,
959
+ ia as default,
960
+ Ft as emptyAgentPrompt,
961
+ Kt as validateAgentPrompt
943
962
  };