@freecallai/pro 0.0.3 → 0.0.4
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/{FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-xR8ZhhdJ.js → FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-DYwu7oQs.js} +1 -1
- package/dist/{FkpRichText.vue_vue_type_script_setup_true_lang-CaHRIHab.js → FkpRichText.vue_vue_type_script_setup_true_lang-BowbZoTQ.js} +1782 -1761
- package/dist/{KnowledgeArea-_rsydhnt.js → KnowledgeArea-BH-_uF6R.js} +3 -3
- package/dist/{ToolForm-Czg67cDT.js → ToolForm-C6XW31Y7.js} +1 -1
- package/dist/{choice-Bt2xhoN_.js → choice-C1SxozNA.js} +1 -1
- package/dist/{guard-B7U3S4F1.js → guard-CXpVx8UR.js} +96 -91
- package/dist/{index-BBv72oZe.js → index-B8jg37Wj.js} +1 -1
- package/dist/{index-D9yqpH_4.js → index-BqXNMfLG.js} +2 -2
- package/dist/{index-BF6MRSMb.js → index-CM0MN2DT.js} +1 -1
- package/dist/{index-DYeJRJY1.js → index-CZc2Gyjb.js} +1 -1
- package/dist/{index-B4-2_sJI.js → index-Cy4DqT8R.js} +1 -1
- package/dist/index-DAZ1ulyA.js +5 -0
- package/dist/index-F7lDP1lI.js +5 -0
- package/dist/{index-sjDmbR5o.js → index-UjI4WA5F.js} +1 -1
- package/dist/{index-trxE5T0w.js → index-bSNw0XAf.js} +1 -1
- package/dist/index.js +5 -5
- package/dist/{inline-KPGqYMIR.js → inline-Zj7Hqg-_.js} +1 -1
- package/dist/{knowledge-CupkY2rK.js → knowledge-DaTnF2IW.js} +1 -1
- package/dist/knowledge-type-picker/index.js +1 -1
- package/dist/{media-extensions-DhRlLKYM.js → media-extensions-wlcCEdtg.js} +27 -24
- package/dist/{media-migration-CbMT2wS0.js → media-migration-C2QLMSpd.js} +1 -1
- package/dist/{media-upload-P9WeUHHr.js → media-upload-D9MYBbLg.js} +1 -1
- package/dist/rich-text/index.js +6 -6
- package/dist/rich-text/legacy-converter/index.js +923 -825
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/dist/index-BQrYBmwR.js +0 -5
- package/dist/index-uCVrA6xK.js +0 -5
|
@@ -7,8 +7,8 @@ import Ot from "@tiptap/extension-placeholder";
|
|
|
7
7
|
import { Extension as Vt, Node as ue } from "@tiptap/core";
|
|
8
8
|
import { DecorationSet as Lt, Decoration as zt } from "@tiptap/pm/view";
|
|
9
9
|
import { glyphs as Y } from "@freecallai/icons";
|
|
10
|
-
import { g as fe, i as X, t as H, m as ce, n as $t, o as Ht, q as Je, r as Ke, b as te, u as ne, C as Ft, v as Ut, w as _t, x as qt, y as ze, z as Jt } from "./guard-
|
|
11
|
-
import { m as Kt, f as $e } from "./FkpRichText.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { g as fe, i as X, t as H, m as ce, n as $t, o as Ht, q as Je, r as Ke, b as te, u as ne, C as Ft, v as Ut, w as _t, x as qt, y as ze, z as Jt } from "./guard-CXpVx8UR.js";
|
|
11
|
+
import { m as Kt, f as $e } from "./FkpRichText.vue_vue_type_script_setup_true_lang-BowbZoTQ.js";
|
|
12
12
|
import { DOMParser as Yt, DOMSerializer as Xt } from "@tiptap/pm/model";
|
|
13
13
|
function ae() {
|
|
14
14
|
const r = globalThis.crypto.getRandomValues(new Uint8Array(16));
|
|
@@ -870,7 +870,7 @@ const un = {
|
|
|
870
870
|
Te([]);
|
|
871
871
|
return;
|
|
872
872
|
}
|
|
873
|
-
import("./media-extensions-
|
|
873
|
+
import("./media-extensions-wlcCEdtg.js").then(({ MediaBlock: e }) => {
|
|
874
874
|
G || Te([e.configure({ sceneStyle: !0 })]);
|
|
875
875
|
}).catch(() => {
|
|
876
876
|
G || (u.value = !0, A(!1), k("load-error", "媒体编辑器加载失败,请刷新页面重试"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as T, ref as w, watch as q, openBlock as t, createElementBlock as n, Fragment as h, renderList as S, normalizeClass as _, createElementVNode as k, createTextVNode as c, toDisplayString as s, createCommentVNode as g, createVNode as f, unref as u, withCtx as b, createBlock as x, normalizeStyle as B } from "vue";
|
|
2
2
|
import { RadioGroup as F, Radio as E, Checkbox as P, Switch as W, Textarea as z, Input as R, Button as V } from "@freecallai/ui";
|
|
3
|
-
import { c as j } from "./FkpRichText.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { c as j } from "./FkpRichText.vue_vue_type_script_setup_true_lang-BowbZoTQ.js";
|
|
4
4
|
const D = { class: "fkp-tool-form" }, G = { key: 0 }, O = { class: "fkp-visually-hidden" }, A = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "fkp-tool-form-checkbox"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const we = [
|
|
2
2
|
{
|
|
3
3
|
id: "todo",
|
|
4
4
|
apiVersion: 1,
|
|
@@ -9,7 +9,7 @@ const be = [
|
|
|
9
9
|
actions: [{ id: "todo.questionAction.apply", requiredPorts: [] }],
|
|
10
10
|
order: 10,
|
|
11
11
|
types: ["normal"],
|
|
12
|
-
icon: "
|
|
12
|
+
icon: "rte-todo",
|
|
13
13
|
menu: {
|
|
14
14
|
title: "待办标签",
|
|
15
15
|
searchLabel: "搜索标签名称",
|
|
@@ -38,7 +38,7 @@ const be = [
|
|
|
38
38
|
actions: [{ id: "todo.knowledgeInline.apply", requiredPorts: [] }],
|
|
39
39
|
order: 10,
|
|
40
40
|
types: ["reasoning"],
|
|
41
|
-
icon: "
|
|
41
|
+
icon: "rte-todo",
|
|
42
42
|
menu: {
|
|
43
43
|
title: "待办标签",
|
|
44
44
|
searchLabel: "搜索标签名称",
|
|
@@ -56,7 +56,7 @@ const be = [
|
|
|
56
56
|
optionSource: "flatTags",
|
|
57
57
|
optionTrigger: "hover"
|
|
58
58
|
}
|
|
59
|
-
],
|
|
59
|
+
], he = [
|
|
60
60
|
{
|
|
61
61
|
id: "tableKnowledge",
|
|
62
62
|
apiVersion: 1,
|
|
@@ -81,7 +81,7 @@ const be = [
|
|
|
81
81
|
optionSource: "flatTags",
|
|
82
82
|
optionTrigger: "hover"
|
|
83
83
|
}
|
|
84
|
-
],
|
|
84
|
+
], $e = [
|
|
85
85
|
{
|
|
86
86
|
id: "ticket",
|
|
87
87
|
apiVersion: 1,
|
|
@@ -114,7 +114,7 @@ const be = [
|
|
|
114
114
|
optionSource: "flatTags",
|
|
115
115
|
optionTrigger: "hover"
|
|
116
116
|
}
|
|
117
|
-
],
|
|
117
|
+
], Se = [
|
|
118
118
|
{
|
|
119
119
|
id: "originalReply",
|
|
120
120
|
apiVersion: 1,
|
|
@@ -141,7 +141,7 @@ const be = [
|
|
|
141
141
|
types: ["reasoning"],
|
|
142
142
|
icon: "quote"
|
|
143
143
|
}
|
|
144
|
-
],
|
|
144
|
+
], Ae = [
|
|
145
145
|
{
|
|
146
146
|
id: "memory",
|
|
147
147
|
apiVersion: 1,
|
|
@@ -154,7 +154,7 @@ const be = [
|
|
|
154
154
|
types: ["normal", "reasoning", "agent"],
|
|
155
155
|
icon: "memory"
|
|
156
156
|
}
|
|
157
|
-
],
|
|
157
|
+
], Te = [
|
|
158
158
|
{
|
|
159
159
|
id: "tagged",
|
|
160
160
|
apiVersion: 1,
|
|
@@ -165,7 +165,7 @@ const be = [
|
|
|
165
165
|
actions: [{ id: "tagged.questionAction.apply", requiredPorts: [] }],
|
|
166
166
|
order: 40,
|
|
167
167
|
types: ["normal", "reasoning", "agent"],
|
|
168
|
-
icon: "tag",
|
|
168
|
+
icon: "rte-tag",
|
|
169
169
|
menu: {
|
|
170
170
|
title: "顾客标签",
|
|
171
171
|
searchLabel: "搜索标签名称",
|
|
@@ -180,7 +180,7 @@ const be = [
|
|
|
180
180
|
optionTrigger: "hover",
|
|
181
181
|
questionTag: { kind: "default", protocolLabel: "顾客标签" }
|
|
182
182
|
}
|
|
183
|
-
],
|
|
183
|
+
], Ie = [
|
|
184
184
|
{
|
|
185
185
|
id: "attribute",
|
|
186
186
|
apiVersion: 1,
|
|
@@ -191,7 +191,7 @@ const be = [
|
|
|
191
191
|
actions: [{ id: "attribute.knowledgeInline.apply", requiredPorts: [] }],
|
|
192
192
|
order: 30,
|
|
193
193
|
types: ["reasoning"],
|
|
194
|
-
icon: "
|
|
194
|
+
icon: "prte-reference",
|
|
195
195
|
menu: {
|
|
196
196
|
title: "属性",
|
|
197
197
|
searchLabel: "搜索属性名称",
|
|
@@ -208,7 +208,7 @@ const be = [
|
|
|
208
208
|
optionTrigger: "hover",
|
|
209
209
|
optionHierarchy: "tree"
|
|
210
210
|
}
|
|
211
|
-
],
|
|
211
|
+
], xe = [
|
|
212
212
|
{
|
|
213
213
|
id: "tool",
|
|
214
214
|
apiVersion: 1,
|
|
@@ -219,7 +219,7 @@ const be = [
|
|
|
219
219
|
actions: [{ id: "tool.knowledgeInline.apply", requiredPorts: [] }],
|
|
220
220
|
order: 40,
|
|
221
221
|
types: ["reasoning"],
|
|
222
|
-
icon: "tool",
|
|
222
|
+
icon: "rte-tool",
|
|
223
223
|
menu: {
|
|
224
224
|
title: "工具",
|
|
225
225
|
searchLabel: "搜索工具名称",
|
|
@@ -248,7 +248,7 @@ const be = [
|
|
|
248
248
|
actions: [{ id: "variable.knowledgeInline.apply", requiredPorts: [] }],
|
|
249
249
|
order: 50,
|
|
250
250
|
types: ["normal", "reasoning"],
|
|
251
|
-
icon: "
|
|
251
|
+
icon: "hashtag",
|
|
252
252
|
menu: {
|
|
253
253
|
title: "变量",
|
|
254
254
|
searchLabel: "搜索变量名称",
|
|
@@ -286,7 +286,7 @@ const w = {
|
|
|
286
286
|
requiredPorts: [],
|
|
287
287
|
optionalPorts: ["getReasoningTemplate", "listCapabilityOptions"]
|
|
288
288
|
}
|
|
289
|
-
},
|
|
289
|
+
}, Pe = [
|
|
290
290
|
{
|
|
291
291
|
id: "image",
|
|
292
292
|
apiVersion: 1,
|
|
@@ -301,7 +301,7 @@ const w = {
|
|
|
301
301
|
icon: "pic",
|
|
302
302
|
optionKind: "media"
|
|
303
303
|
}
|
|
304
|
-
],
|
|
304
|
+
], Oe = [
|
|
305
305
|
{
|
|
306
306
|
id: "video",
|
|
307
307
|
apiVersion: 1,
|
|
@@ -313,10 +313,10 @@ const w = {
|
|
|
313
313
|
primaryActionId: "video.upload",
|
|
314
314
|
order: 70,
|
|
315
315
|
types: ["normal", "reasoning"],
|
|
316
|
-
icon: "
|
|
316
|
+
icon: "video3",
|
|
317
317
|
optionKind: "media"
|
|
318
318
|
}
|
|
319
|
-
],
|
|
319
|
+
], qe = [
|
|
320
320
|
{
|
|
321
321
|
id: "separator",
|
|
322
322
|
apiVersion: 1,
|
|
@@ -329,7 +329,7 @@ const w = {
|
|
|
329
329
|
types: ["normal", "reasoning"],
|
|
330
330
|
icon: "sep"
|
|
331
331
|
}
|
|
332
|
-
],
|
|
332
|
+
], Ve = [
|
|
333
333
|
{
|
|
334
334
|
id: "reasoningPolish",
|
|
335
335
|
apiVersion: 1,
|
|
@@ -343,7 +343,7 @@ const w = {
|
|
|
343
343
|
types: ["reasoning"],
|
|
344
344
|
icon: "AI"
|
|
345
345
|
}
|
|
346
|
-
],
|
|
346
|
+
], _e = [
|
|
347
347
|
{
|
|
348
348
|
id: "reasoningTemplate",
|
|
349
349
|
apiVersion: 1,
|
|
@@ -355,7 +355,7 @@ const w = {
|
|
|
355
355
|
primaryActionId: "reasoningTemplate.load",
|
|
356
356
|
order: 100,
|
|
357
357
|
types: ["reasoning"],
|
|
358
|
-
icon: "
|
|
358
|
+
icon: "rte-template",
|
|
359
359
|
menu: {
|
|
360
360
|
title: "模板",
|
|
361
361
|
searchLabel: "搜索模板名称",
|
|
@@ -378,7 +378,7 @@ const w = {
|
|
|
378
378
|
readPorts: ["getAgentPrompt"],
|
|
379
379
|
order: 10,
|
|
380
380
|
types: ["agent"],
|
|
381
|
-
icon: "
|
|
381
|
+
icon: "rte-agent",
|
|
382
382
|
menu: {
|
|
383
383
|
title: "自定义Agent",
|
|
384
384
|
searchLabel: "搜索标签名称",
|
|
@@ -395,23 +395,23 @@ const w = {
|
|
|
395
395
|
optionTrigger: "hover"
|
|
396
396
|
}
|
|
397
397
|
], q = [
|
|
398
|
-
...be,
|
|
399
|
-
...he,
|
|
400
398
|
...we,
|
|
401
399
|
...$e,
|
|
400
|
+
...he,
|
|
402
401
|
...Se,
|
|
403
402
|
...Ae,
|
|
404
403
|
...Te,
|
|
405
404
|
...Ie,
|
|
406
|
-
...ve,
|
|
407
405
|
...xe,
|
|
406
|
+
...ve,
|
|
408
407
|
...Pe,
|
|
409
408
|
...Oe,
|
|
410
409
|
...qe,
|
|
411
410
|
...Ve,
|
|
411
|
+
..._e,
|
|
412
412
|
...je
|
|
413
413
|
];
|
|
414
|
-
function
|
|
414
|
+
function ue(e, t = "") {
|
|
415
415
|
const r = /* @__PURE__ */ new Set(), i = (o, a, n) => {
|
|
416
416
|
if (o === null || typeof o == "string" || typeof o == "boolean")
|
|
417
417
|
return null;
|
|
@@ -462,7 +462,7 @@ function S(e, t, r) {
|
|
|
462
462
|
}
|
|
463
463
|
const Le = S(
|
|
464
464
|
"待办",
|
|
465
|
-
"
|
|
465
|
+
"rte-todo",
|
|
466
466
|
(e) => e.label === "默认" && e.token === "{待办}" ? "{待办}" : `{待办@${e.label || e.key}}`
|
|
467
467
|
);
|
|
468
468
|
function st(e) {
|
|
@@ -472,14 +472,14 @@ function st(e) {
|
|
|
472
472
|
const r = e.match(/^\{智能建单@([^\s{}:]+):([^{}\r\n]+)\}$/u);
|
|
473
473
|
return r && r[2].trim() ? { key: r[1], label: r[2] } : null;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Re(e, t, r) {
|
|
476
476
|
return (r == null ? void 0 : r.protocol) === "legacy" ? `{智能工单@name=${t};id=${e}}` : `{智能建单@${e}:${t}}`;
|
|
477
477
|
}
|
|
478
|
-
const
|
|
478
|
+
const Ce = {
|
|
479
479
|
...S(
|
|
480
480
|
"工单",
|
|
481
481
|
"AI-ticket",
|
|
482
|
-
(e) =>
|
|
482
|
+
(e) => Re(
|
|
483
483
|
String(e.key || ""),
|
|
484
484
|
String(e.label || ""),
|
|
485
485
|
e.params
|
|
@@ -489,29 +489,29 @@ const Re = {
|
|
|
489
489
|
validate(e) {
|
|
490
490
|
return e.params != null && (typeof e.params != "object" || Array.isArray(e.params) || Object.keys(e.params).length !== 1 || e.params.protocol !== "legacy") ? "params" : typeof e.key != "string" || !/^[^\s{}:]+$/u.test(e.key) ? "key" : typeof e.label != "string" || !e.label.trim() || /[{}\r\n]/u.test(e.label) || e.params != null && /[;]/u.test(e.label) ? "label" : e.params != null && /[;]/u.test(e.key) ? "key" : null;
|
|
491
491
|
}
|
|
492
|
-
},
|
|
492
|
+
}, De = {
|
|
493
493
|
...S(
|
|
494
494
|
"表格知识",
|
|
495
495
|
"table-knowledge",
|
|
496
496
|
(e) => `##${e.label}##`
|
|
497
497
|
),
|
|
498
498
|
validate: (e) => typeof e.label != "string" || !e.label.trim() || /[#\r\n]/u.test(e.label) ? "label" : null
|
|
499
|
-
}, De = {
|
|
500
|
-
...S("属性", "data", (e) => `{属性@${e.key}}`),
|
|
501
|
-
allowInOriginalReply: !1
|
|
502
499
|
}, Be = {
|
|
500
|
+
...S("属性", "prte-reference", (e) => `{属性@${e.key}}`),
|
|
501
|
+
allowInOriginalReply: !1
|
|
502
|
+
}, Ne = {
|
|
503
503
|
requiresInsertToken: !0,
|
|
504
504
|
present(e) {
|
|
505
505
|
const t = String(e.label || e.key || "");
|
|
506
506
|
return {
|
|
507
507
|
layout: "inline",
|
|
508
|
-
icon: "
|
|
508
|
+
icon: "hashtag",
|
|
509
509
|
label: t.startsWith("#") && t.endsWith("#") ? t : `#${t}#`,
|
|
510
510
|
ariaLabel: String(e.label || "")
|
|
511
511
|
};
|
|
512
512
|
},
|
|
513
513
|
serialize: (e) => String(e.token || `#${e.key}#`)
|
|
514
|
-
},
|
|
514
|
+
}, Ke = {
|
|
515
515
|
present: (e) => ({
|
|
516
516
|
layout: "inline",
|
|
517
517
|
icon: "sep",
|
|
@@ -520,20 +520,20 @@ const Re = {
|
|
|
520
520
|
}),
|
|
521
521
|
serialize: () => "{分隔符}"
|
|
522
522
|
};
|
|
523
|
-
function
|
|
523
|
+
function Me(e, t) {
|
|
524
524
|
if (e !== "order_note" && e !== "small_payment") return null;
|
|
525
525
|
const r = t && typeof t == "object" && !Array.isArray(t) ? t : {};
|
|
526
526
|
if (e === "small_payment") {
|
|
527
527
|
const o = typeof r.amount == "string" ? r.amount : "", a = /^(?:0|[1-9]\d*)(?:\.\d{1,2})?$/.test(o), [n = "", s = ""] = o.split(".");
|
|
528
528
|
return {
|
|
529
529
|
label: "小额打款",
|
|
530
|
-
icon: "tool",
|
|
530
|
+
icon: "rte-tool",
|
|
531
531
|
summary: a ? `¥${n}.${s.padEnd(2, "0")}` : ""
|
|
532
532
|
};
|
|
533
533
|
}
|
|
534
534
|
return { label: "备注", icon: "msg-tag", summary: r.contentMode === "smart" ? "智能提取" : typeof r.content == "string" ? r.content.replace(/\s+/g, " ").trim() : "" };
|
|
535
535
|
}
|
|
536
|
-
const
|
|
536
|
+
const pe = (e) => typeof e == "string" && /^(?:[1-9]|[1-9]\d)$/.test(e), de = (e) => typeof e == "string" && /^(?:rmk_[a-z0-9]{8}|[1-9]\d*)$/.test(e), $ = {
|
|
537
537
|
none: "不标记",
|
|
538
538
|
red: "红色",
|
|
539
539
|
yellow: "黄色",
|
|
@@ -551,7 +551,7 @@ const ue = (e) => typeof e == "string" && /^(?:[1-9]|[1-9]\d)$/.test(e), pe = (e
|
|
|
551
551
|
function A(e) {
|
|
552
552
|
if (!e || typeof e != "object" || Array.isArray(e)) return !1;
|
|
553
553
|
const t = e;
|
|
554
|
-
return
|
|
554
|
+
return de(t.id) && (t.contentMode === "fixed" || t.contentMode === "smart") && typeof t.content == "string" && !!t.content.trim() && [...t.content.trim()].length <= 500 && !/\^\^|\$\$|¥¥/.test(t.content) && !t.content.endsWith("^") && Object.hasOwn($, String(t.flag)) && typeof t.preserveFlag == "boolean" && (t.position === "first" || t.position === "last");
|
|
555
555
|
}
|
|
556
556
|
function ae() {
|
|
557
557
|
return `rmk_${crypto.randomUUID().replace(/-/g, "").slice(0, 8)}`;
|
|
@@ -565,7 +565,7 @@ function lt(e, t, r, i, o) {
|
|
|
565
565
|
u.type === "businessToken" && ((d = u.attrs) == null ? void 0 : d.kind) === "tool" && (!o || u.attrs.id !== o) && (u.attrs.key === "small_payment" && a++, u.attrs.key === "order_note" && n.add(String(((y = u.attrs.params) == null ? void 0 : y.id) || ""))), (g = u.content) == null || g.forEach(s);
|
|
566
566
|
};
|
|
567
567
|
if (i && s(i), e === "small_payment")
|
|
568
|
-
return
|
|
568
|
+
return pe(t.amount) ? a ? {
|
|
569
569
|
ok: !1,
|
|
570
570
|
code: "TOOL_LIMIT_REACHED",
|
|
571
571
|
message: "最多配置一个小额打款工具"
|
|
@@ -574,7 +574,7 @@ function lt(e, t, r, i, o) {
|
|
|
574
574
|
code: "TOOL_PARAMS_INVALID",
|
|
575
575
|
message: "打款金额必须是1-99的整数元"
|
|
576
576
|
};
|
|
577
|
-
let c =
|
|
577
|
+
let c = de(r.id) ? r.id : ae();
|
|
578
578
|
if (!o)
|
|
579
579
|
for (; n.has(c); ) c = ae();
|
|
580
580
|
if (n.has(c))
|
|
@@ -636,7 +636,7 @@ function ct(e) {
|
|
|
636
636
|
attrs: { kind: "tool", key: "order_note", label: "订单备注", params: a }
|
|
637
637
|
} : null;
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function le(e) {
|
|
640
640
|
var r;
|
|
641
641
|
if (e.type !== "businessToken" || ((r = e.attrs) == null ? void 0 : r.kind) !== "tool") return null;
|
|
642
642
|
const { params: t } = e.attrs;
|
|
@@ -644,7 +644,7 @@ function Fe(e) {
|
|
|
644
644
|
const { sceneId: i, sceneName: o } = t || {};
|
|
645
645
|
return typeof i == "string" && /^[^\s{}:]+$/u.test(i) && typeof o == "string" && o.trim() && !/[{}\r\n]/u.test(o) ? `{外部方法@${i}:${o}}` : null;
|
|
646
646
|
}
|
|
647
|
-
return e.attrs.key === "small_payment" ?
|
|
647
|
+
return e.attrs.key === "small_payment" ? pe(t == null ? void 0 : t.amount) ? `$$小额打款@${Number(t.amount) * 100}$$` : null : e.attrs.key !== "order_note" || !A(t) ? null : `^^订单备注-${t.contentMode === "fixed" ? "固定话术" : "智能提取"}@编号=${t.id};插旗=${$[t.flag]};保留已有旗帜=${t.preserveFlag ? "是" : "否"};位置=${t.position === "first" ? "最前" : "最后"};内容=${t.content}^^`;
|
|
648
648
|
}
|
|
649
649
|
function ut(e) {
|
|
650
650
|
try {
|
|
@@ -664,10 +664,15 @@ function ut(e) {
|
|
|
664
664
|
return null;
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
|
-
const
|
|
667
|
+
const Fe = {
|
|
668
668
|
allowsParams: !0,
|
|
669
|
+
validate(e) {
|
|
670
|
+
return ["small_payment", "order_note", "external_method"].includes(
|
|
671
|
+
String(e.key)
|
|
672
|
+
) ? le({ type: "businessToken", attrs: { ...e } }) ? null : "params" : null;
|
|
673
|
+
},
|
|
669
674
|
present(e) {
|
|
670
|
-
const t =
|
|
675
|
+
const t = Me(e.key, e.params);
|
|
671
676
|
return t ? {
|
|
672
677
|
layout: "toolNote",
|
|
673
678
|
icon: t.icon,
|
|
@@ -677,7 +682,7 @@ const Me = {
|
|
|
677
682
|
summary: t.summary
|
|
678
683
|
} : {
|
|
679
684
|
layout: "tool",
|
|
680
|
-
icon: "tool",
|
|
685
|
+
icon: "rte-tool",
|
|
681
686
|
label: String(e.label || ""),
|
|
682
687
|
ariaLabel: `工具:${e.label || ""}`
|
|
683
688
|
};
|
|
@@ -686,7 +691,7 @@ const Me = {
|
|
|
686
691
|
if (["small_payment", "order_note", "external_method"].includes(
|
|
687
692
|
String(e.key)
|
|
688
693
|
)) {
|
|
689
|
-
const t =
|
|
694
|
+
const t = le({
|
|
690
695
|
type: "businessToken",
|
|
691
696
|
attrs: { ...e }
|
|
692
697
|
});
|
|
@@ -695,30 +700,30 @@ const Me = {
|
|
|
695
700
|
}
|
|
696
701
|
return `{工具@${e.key}}`;
|
|
697
702
|
}
|
|
698
|
-
},
|
|
703
|
+
}, ge = {
|
|
699
704
|
todo: Le,
|
|
700
|
-
ticket:
|
|
701
|
-
tableKnowledge:
|
|
702
|
-
variable:
|
|
703
|
-
attribute:
|
|
704
|
-
tool:
|
|
705
|
-
separator:
|
|
706
|
-
}, P =
|
|
705
|
+
ticket: Ce,
|
|
706
|
+
tableKnowledge: De,
|
|
707
|
+
variable: Ne,
|
|
708
|
+
attribute: Be,
|
|
709
|
+
tool: Fe,
|
|
710
|
+
separator: Ke
|
|
711
|
+
}, P = ge;
|
|
707
712
|
function I(e) {
|
|
708
713
|
return typeof e == "string" && Object.prototype.hasOwnProperty.call(P, e) ? P[e] : void 0;
|
|
709
714
|
}
|
|
710
|
-
const
|
|
711
|
-
|
|
712
|
-
), Ee =
|
|
715
|
+
const fe = Object.keys(
|
|
716
|
+
ge
|
|
717
|
+
), Ee = fe.filter(
|
|
713
718
|
(e) => P[e].choice
|
|
714
|
-
), Ue = ["image", "video"], ze = new Set(
|
|
719
|
+
), Ue = ["image", "video"], ze = new Set(fe), We = new Set(Ee), He = new Set(Ue), ye = (e) => typeof e == "string" && ze.has(e), pt = (e) => typeof e == "string" && We.has(e), me = (e) => typeof e == "string" && He.has(e), Je = /* @__PURE__ */ new Set([
|
|
715
720
|
"businessToken",
|
|
716
721
|
"originalReply",
|
|
717
722
|
"messageSeparator",
|
|
718
723
|
"mediaBlock"
|
|
719
724
|
]), V = (e) => Je.has(e);
|
|
720
725
|
function Qe(e, t) {
|
|
721
|
-
return e === "businessToken" ?
|
|
726
|
+
return e === "businessToken" ? ye(t == null ? void 0 : t.kind) ? t.kind : null : e === "mediaBlock" ? me(t == null ? void 0 : t.kind) ? t.kind : null : e === "originalReply" ? "originalReply" : e === "messageSeparator" ? "separator" : null;
|
|
722
727
|
}
|
|
723
728
|
function Ge(e) {
|
|
724
729
|
const t = Qe(e.type || "", e.attrs);
|
|
@@ -764,7 +769,7 @@ function O(e) {
|
|
|
764
769
|
function Xe(e) {
|
|
765
770
|
return e.includes("[") || e.includes("]") || /[【】\r\n]/u.test(e);
|
|
766
771
|
}
|
|
767
|
-
function
|
|
772
|
+
function ke(e) {
|
|
768
773
|
return /[{}\r\n]/u.test(e);
|
|
769
774
|
}
|
|
770
775
|
function Ze(e, t) {
|
|
@@ -783,7 +788,7 @@ function et(e) {
|
|
|
783
788
|
var s;
|
|
784
789
|
const i = r.protocolLabel, o = (s = e.extensionState[t]) == null ? void 0 : s.data, a = o && typeof o == "object" && !Array.isArray(o) ? o.enabled === !0 : !1, n = a ? Ze(e, t) : null;
|
|
785
790
|
if (a && !n) throw new Error(`${i}已开启但未选择方案`);
|
|
786
|
-
if (n &&
|
|
791
|
+
if (n && ke(n.label))
|
|
787
792
|
throw new Error("方案名称包含协议保留字符");
|
|
788
793
|
return n ? [`{${i}@${n.label}}`] : [];
|
|
789
794
|
}).join("");
|
|
@@ -794,7 +799,7 @@ function yt(e) {
|
|
|
794
799
|
throw new Error("意图文字中不可填写方括号或换行,请修改");
|
|
795
800
|
return `[${e.question.text}]${et(e)}`;
|
|
796
801
|
}
|
|
797
|
-
const
|
|
802
|
+
const be = /* @__PURE__ */ new Set([
|
|
798
803
|
"doc",
|
|
799
804
|
"paragraph",
|
|
800
805
|
"text",
|
|
@@ -809,14 +814,14 @@ const ke = /* @__PURE__ */ new Set([
|
|
|
809
814
|
"originalReply",
|
|
810
815
|
"messageSeparator",
|
|
811
816
|
"mediaBlock"
|
|
812
|
-
]), mt = (e) =>
|
|
817
|
+
]), mt = (e) => be.has(e), tt = /* @__PURE__ */ new Set([
|
|
813
818
|
"bold",
|
|
814
819
|
"italic",
|
|
815
820
|
"strike",
|
|
816
821
|
"code",
|
|
817
822
|
"link",
|
|
818
823
|
"underline"
|
|
819
|
-
]),
|
|
824
|
+
]), x = /* @__PURE__ */ new Set([
|
|
820
825
|
"paragraph",
|
|
821
826
|
"bulletList",
|
|
822
827
|
"orderedList",
|
|
@@ -826,13 +831,13 @@ const ke = /* @__PURE__ */ new Set([
|
|
|
826
831
|
"originalReply",
|
|
827
832
|
"messageSeparator",
|
|
828
833
|
"mediaBlock"
|
|
829
|
-
]),
|
|
830
|
-
doc:
|
|
834
|
+
]), ce = {
|
|
835
|
+
doc: x,
|
|
831
836
|
paragraph: /* @__PURE__ */ new Set(["text", "hardBreak", "businessToken"]),
|
|
832
837
|
bulletList: /* @__PURE__ */ new Set(["listItem"]),
|
|
833
838
|
orderedList: /* @__PURE__ */ new Set(["listItem"]),
|
|
834
|
-
listItem: /* @__PURE__ */ new Set(["paragraph", ...
|
|
835
|
-
blockquote:
|
|
839
|
+
listItem: /* @__PURE__ */ new Set(["paragraph", ...x]),
|
|
840
|
+
blockquote: x,
|
|
836
841
|
codeBlock: /* @__PURE__ */ new Set(["text"]),
|
|
837
842
|
originalReply: /* @__PURE__ */ new Set(["paragraph", "mediaBlock", "messageSeparator"])
|
|
838
843
|
}, nt = {
|
|
@@ -881,12 +886,12 @@ function k(e, t, r = "") {
|
|
|
881
886
|
);
|
|
882
887
|
return i ? r ? `${r}.${i}` : i : null;
|
|
883
888
|
}
|
|
884
|
-
function
|
|
889
|
+
function v(e, t = "knowledge.doc", r = !1) {
|
|
885
890
|
if (e === null) return null;
|
|
886
891
|
const i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new WeakSet();
|
|
887
892
|
function a(n, s, c, l = !1) {
|
|
888
|
-
var d, y, g, m, f, b, j, L,
|
|
889
|
-
if (!n || typeof n != "object" || !n.type || !
|
|
893
|
+
var d, y, g, m, f, b, _, j, L, R, h, C, D, B, N, K, M, F, E, U, z, W, H, J, Q, G, Y, X, Z, ee, te, ne, re, oe, ie;
|
|
894
|
+
if (!n || typeof n != "object" || !n.type || !be.has(n.type) || o.has(n) || (o.add(n), c ? !((d = ce[c]) != null && d.has(n.type)) : n.type !== "doc") || !r && l && n.type === "businessToken" && ((g = I((y = n.attrs) == null ? void 0 : y.kind)) == null ? void 0 : g.allowInOriginalReply) === !1)
|
|
890
895
|
return s;
|
|
891
896
|
for (const p of Object.keys(n))
|
|
892
897
|
if (!["type", "attrs", "content", "marks", "text"].includes(p))
|
|
@@ -898,20 +903,20 @@ function x(e, t = "knowledge.doc", r = !1) {
|
|
|
898
903
|
) && !((m = n.content) != null && m.length))
|
|
899
904
|
return `${s}.content`;
|
|
900
905
|
if (n.type === "listItem" && ((b = (f = n.content) == null ? void 0 : f[0]) == null ? void 0 : b.type) !== "paragraph")
|
|
901
|
-
return (
|
|
906
|
+
return (_ = n.content) != null && _.length ? `${s}.content[0]` : `${s}.content`;
|
|
902
907
|
if (n.text !== void 0 && n.type !== "text") return `${s}.text`;
|
|
903
908
|
if (n.type === "text" && (typeof n.text != "string" || n.text.length === 0))
|
|
904
909
|
return `${s}.text`;
|
|
905
910
|
if (n.type === "text" && n.content !== void 0)
|
|
906
911
|
return `${s}.content`;
|
|
907
|
-
if ((
|
|
912
|
+
if ((j = n.content) != null && j.length && !ce[n.type])
|
|
908
913
|
return `${s}.content`;
|
|
909
914
|
if (n.attrs !== void 0 && (!n.attrs || typeof n.attrs != "object" || Array.isArray(n.attrs)))
|
|
910
915
|
return `${s}.attrs`;
|
|
911
916
|
const u = nt[n.type] || /* @__PURE__ */ new Set();
|
|
912
917
|
for (const p of Object.keys(n.attrs || {}))
|
|
913
918
|
if (!u.has(p)) return `${s}.attrs.${p}`;
|
|
914
|
-
if (n.type === "businessToken" && !
|
|
919
|
+
if (n.type === "businessToken" && !ye((L = n.attrs) == null ? void 0 : L.kind))
|
|
915
920
|
return `${s}.attrs.kind`;
|
|
916
921
|
if (n.type === "businessToken") {
|
|
917
922
|
const p = (C = (h = I(
|
|
@@ -925,9 +930,9 @@ function x(e, t = "knowledge.doc", r = !1) {
|
|
|
925
930
|
return `${s}.attrs.label`;
|
|
926
931
|
if (n.type === "businessToken" && ((N = n.attrs) == null ? void 0 : N.token) !== void 0 && n.attrs.token !== null && typeof n.attrs.token != "string")
|
|
927
932
|
return `${s}.attrs.token`;
|
|
928
|
-
if (n.type === "businessToken" && ((K = n.attrs) == null ? void 0 : K.params) != null && (!((
|
|
933
|
+
if (n.type === "businessToken" && ((K = n.attrs) == null ? void 0 : K.params) != null && (!((M = I(n.attrs.kind)) != null && M.allowsParams) || typeof n.attrs.params != "object" || Array.isArray(n.attrs.params) || ue(n.attrs.params) !== null || JSON.stringify(n.attrs.params).length > 8192))
|
|
929
934
|
return `${s}.attrs.params`;
|
|
930
|
-
if (n.type === "mediaBlock" && !
|
|
935
|
+
if (n.type === "mediaBlock" && !me((F = n.attrs) == null ? void 0 : F.kind))
|
|
931
936
|
return `${s}.attrs.kind`;
|
|
932
937
|
if (n.type === "mediaBlock") {
|
|
933
938
|
if (((E = n.attrs) == null ? void 0 : E.assetId) !== void 0 && n.attrs.assetId !== null && typeof n.attrs.assetId != "string")
|
|
@@ -1006,7 +1011,7 @@ function kt(e) {
|
|
|
1006
1011
|
function bt(e) {
|
|
1007
1012
|
if (!e || typeof e != "object" || Array.isArray(e))
|
|
1008
1013
|
return "modelValue";
|
|
1009
|
-
const t =
|
|
1014
|
+
const t = ue(e);
|
|
1010
1015
|
if (t !== null) return t || "modelValue";
|
|
1011
1016
|
const r = e;
|
|
1012
1017
|
if (r.schemaVersion !== 1) return "schemaVersion";
|
|
@@ -1057,14 +1062,14 @@ function bt(e) {
|
|
|
1057
1062
|
);
|
|
1058
1063
|
if (u) return u;
|
|
1059
1064
|
}
|
|
1060
|
-
const n =
|
|
1065
|
+
const n = v(r.knowledge.doc);
|
|
1061
1066
|
if (n) return n;
|
|
1062
1067
|
const s = ot(
|
|
1063
1068
|
r.knowledge.doc,
|
|
1064
1069
|
r.type
|
|
1065
1070
|
);
|
|
1066
1071
|
if (s) return s;
|
|
1067
|
-
const c =
|
|
1072
|
+
const c = v(
|
|
1068
1073
|
r.knowledge.retainedDoc ?? null,
|
|
1069
1074
|
"knowledge.retainedDoc",
|
|
1070
1075
|
r.type === "agent"
|
|
@@ -1073,7 +1078,7 @@ function bt(e) {
|
|
|
1073
1078
|
if (r.type === "agent") {
|
|
1074
1079
|
if (r.knowledge.agentBody && r.knowledge.retainedDoc)
|
|
1075
1080
|
return "knowledge.agentBody";
|
|
1076
|
-
const l =
|
|
1081
|
+
const l = v(
|
|
1077
1082
|
r.knowledge.agentBody ?? null,
|
|
1078
1083
|
"knowledge.agentBody",
|
|
1079
1084
|
!0
|
|
@@ -1110,7 +1115,7 @@ function bt(e) {
|
|
|
1110
1115
|
const f = m;
|
|
1111
1116
|
if (typeof f.id != "string" || !f.id.trim())
|
|
1112
1117
|
return `extensionState.${l}.data.tag.id`;
|
|
1113
|
-
if (typeof f.label != "string" || !f.label.trim() ||
|
|
1118
|
+
if (typeof f.label != "string" || !f.label.trim() || ke(f.label))
|
|
1114
1119
|
return `extensionState.${l}.data.tag.label`;
|
|
1115
1120
|
const b = k(
|
|
1116
1121
|
f,
|
|
@@ -1130,28 +1135,28 @@ export {
|
|
|
1130
1135
|
Ge as D,
|
|
1131
1136
|
mt as E,
|
|
1132
1137
|
kt as F,
|
|
1133
|
-
|
|
1134
|
-
|
|
1138
|
+
ke as G,
|
|
1139
|
+
fe as H,
|
|
1135
1140
|
Ze as I,
|
|
1136
1141
|
Ue as M,
|
|
1137
1142
|
et as a,
|
|
1138
1143
|
O as b,
|
|
1139
1144
|
bt as c,
|
|
1140
|
-
|
|
1145
|
+
Re as d,
|
|
1141
1146
|
st as e,
|
|
1142
|
-
|
|
1147
|
+
ue as f,
|
|
1143
1148
|
I as g,
|
|
1144
1149
|
Xe as h,
|
|
1145
1150
|
V as i,
|
|
1146
|
-
|
|
1151
|
+
le as j,
|
|
1147
1152
|
ct as k,
|
|
1148
1153
|
ut as l,
|
|
1149
1154
|
ft as m,
|
|
1150
|
-
|
|
1151
|
-
|
|
1155
|
+
ye as n,
|
|
1156
|
+
pe as o,
|
|
1152
1157
|
lt as p,
|
|
1153
1158
|
A as q,
|
|
1154
|
-
|
|
1159
|
+
v as r,
|
|
1155
1160
|
yt as s,
|
|
1156
1161
|
dt as t,
|
|
1157
1162
|
gt as u,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as n, p as l, b as d } from "./FkpRichText.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { l as n, p as l, b as d } from "./FkpRichText.vue_vue_type_script_setup_true_lang-BowbZoTQ.js";
|
|
2
2
|
const c = {
|
|
3
3
|
id: "reasoningTemplate",
|
|
4
4
|
slot: "sceneAction",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as a } from "./operations-D8pn-_iW.js";
|
|
2
|
-
import { m as i } from "./inline-
|
|
3
|
-
import { p as d } from "./guard-
|
|
2
|
+
import { m as i } from "./inline-Zj7Hqg-_.js";
|
|
3
|
+
import { p as d } from "./guard-CXpVx8UR.js";
|
|
4
4
|
const l = {
|
|
5
5
|
validateInsert(n, e) {
|
|
6
6
|
const { option: t } = n;
|