@freecallai/pro 0.0.4 → 0.0.6

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 (94) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +23 -23
  3. package/dist/FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang--MPtqZY_.js +193 -0
  4. package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-DIIFWISD.js +4995 -0
  5. package/dist/KnowledgeArea-CEX1esVZ.js +4 -0
  6. package/dist/KnowledgeArea.vue_vue_type_script_setup_true_lang-Bg1e7xYT.js +1653 -0
  7. package/dist/ToolForm-Ch1YRmMw.js +196 -0
  8. package/dist/agent-prompt-editor/index.js +917 -0
  9. package/dist/agent-prompt-editor/legacy-converter/index.js +490 -0
  10. package/dist/{choice-C1SxozNA.js → choice-2dbddjJU.js} +1 -1
  11. package/dist/edition-info/index.js +1 -1
  12. package/dist/filters/index.js +1 -1
  13. package/dist/{guard-CXpVx8UR.js → guard-Cr_ny-sR.js} +226 -213
  14. package/dist/{index-B8jg37Wj.js → index-5FRWdHnd.js} +1 -1
  15. package/dist/index-7x1OTv0m.js +98 -0
  16. package/dist/{index-CM0MN2DT.js → index-BBxrpF3v.js} +1 -1
  17. package/dist/index-CEjD03Kk.js +5 -0
  18. package/dist/{index-UjI4WA5F.js → index-CK_CrdQW.js} +1 -1
  19. package/dist/index-Ck8RYpuE.js +816 -0
  20. package/dist/{index-lNhA3N9x.js → index-DBQsQ1ZK.js} +1 -0
  21. package/dist/{index-BqXNMfLG.js → index-DiaPY8Db.js} +2 -2
  22. package/dist/{index-bSNw0XAf.js → index-DmdrsEvk.js} +1 -1
  23. package/dist/index-DnmCPdCI.js +168 -0
  24. package/dist/{index-Cy4DqT8R.js → index-DwDYy2lj.js} +1 -1
  25. package/dist/{index-CZc2Gyjb.js → index-aic1yCBs.js} +1 -1
  26. package/dist/index-sWjZ9xuV.js +5 -0
  27. package/dist/index.js +13 -13
  28. package/dist/{inline-Zj7Hqg-_.js → inline-8aNfINLF.js} +1 -1
  29. package/dist/knowledge-type-picker/index.js +1 -1
  30. package/dist/{knowledge-DaTnF2IW.js → knowledge-y2j0ijgx.js} +1 -1
  31. package/dist/media-id-b2dgniSy.js +15 -0
  32. package/dist/{media-migration-C2QLMSpd.js → media-migration-Dy_rbdkK.js} +1 -1
  33. package/dist/media-policy-BwKjZPWt.js +158 -0
  34. package/dist/{media-upload-D9MYBbLg.js → media-upload-BetGuTLJ.js} +1 -1
  35. package/dist/model-DvukseoR.js +146 -0
  36. package/dist/navigation/index.js +1 -1
  37. package/dist/rich-text/index.js +75 -73
  38. package/dist/rich-text/legacy-converter/index.js +822 -799
  39. package/dist/style.css +1 -1
  40. package/dist/switcher/index.js +1 -1
  41. package/dist/types/agent-prompt-editor/FkpAgentPromptEditor.vue.d.ts +550 -0
  42. package/dist/types/agent-prompt-editor/agent-size-chart.d.ts +3 -0
  43. package/dist/types/agent-prompt-editor/document-adapter.d.ts +3 -0
  44. package/dist/types/agent-prompt-editor/index.d.ts +6 -0
  45. package/dist/types/agent-prompt-editor/legacy-converter-index.d.ts +2 -0
  46. package/dist/types/agent-prompt-editor/legacy-converter.d.ts +26 -0
  47. package/dist/types/agent-prompt-editor/model.d.ts +21 -0
  48. package/dist/types/agent-prompt-editor/types.d.ts +56 -0
  49. package/dist/types/edition-info/FkpEditionInfo.vue.d.ts +1 -3
  50. package/dist/types/edition-info/presets.d.ts +8 -0
  51. package/dist/types/edition-info/types.d.ts +1 -0
  52. package/dist/types/filters/FkpFilter.vue.d.ts +2 -2
  53. package/dist/types/filters/FkpFilterDateRange.vue.d.ts +2 -2
  54. package/dist/types/filters/FkpFilterPeriod.vue.d.ts +2 -2
  55. package/dist/types/filters/FkpSearchableMultiSelect.vue.d.ts +2 -2
  56. package/dist/types/index.d.ts +4 -1
  57. package/dist/types/navigation/FkpNavigation.vue.d.ts +20 -29
  58. package/dist/types/navigation/NavigationButton.vue.d.ts +26 -0
  59. package/dist/types/navigation/NavigationGroup.vue.d.ts +45 -0
  60. package/dist/types/navigation/NavigationIcon.vue.d.ts +28 -0
  61. package/dist/types/navigation/NavigationNodes.vue.d.ts +40 -0
  62. package/dist/types/navigation/index.d.ts +1 -1
  63. package/dist/types/navigation/types.d.ts +43 -5
  64. package/dist/types/navigation/use-navigation-tree.d.ts +13 -0
  65. package/dist/types/rich-text/FkpRichText.vue.d.ts +31 -9
  66. package/dist/types/rich-text/config/descriptor.d.ts +1 -0
  67. package/dist/types/rich-text/config/resolve.d.ts +1 -1
  68. package/dist/types/rich-text/index.d.ts +4 -1
  69. package/dist/types/rich-text/knowledge-document-adapter.d.ts +2 -0
  70. package/dist/types/rich-text/model/question-text.d.ts +1 -1
  71. package/dist/types/rich-text/plugins/registry.d.ts +2 -1
  72. package/dist/types/rich-text/public/types.d.ts +16 -0
  73. package/dist/types/rich-text/runtime/document-adapter.d.ts +9 -0
  74. package/dist/types/rich-text/runtime/knowledge-clipboard.d.ts +9 -3
  75. package/dist/types/rich-text/runtime/media-sources.d.ts +7 -0
  76. package/dist/types/rich-text/runtime/media-upload-session.d.ts +2 -0
  77. package/dist/types/rich-text/ui/FkpKnowledgeTypePicker.vue.d.ts +3 -3
  78. package/dist/types/rich-text/ui/KnowledgeArea.vue.d.ts +18 -3
  79. package/dist/types/rich-text/ui/MediaSourceControls.vue.d.ts +190 -0
  80. package/dist/types/rich-text/ui/ToolForm.vue.d.ts +2 -2
  81. package/dist/types/rich-text/ui/token-renderer.d.ts +3 -0
  82. package/dist/types/rich-text/ui/useMediaHint.d.ts +6 -0
  83. package/dist/types/switcher/FkpSwitcher.vue.d.ts +2 -2
  84. package/dist/types-PvYB5e85.js +14 -0
  85. package/package.json +13 -5
  86. package/dist/FkpKnowledgeTypePicker.vue_vue_type_script_setup_true_lang-DYwu7oQs.js +0 -187
  87. package/dist/FkpRichText.vue_vue_type_script_setup_true_lang-BowbZoTQ.js +0 -4885
  88. package/dist/KnowledgeArea-BH-_uF6R.js +0 -1438
  89. package/dist/ToolForm-C6XW31Y7.js +0 -185
  90. package/dist/index-CS2xQQ8W.js +0 -168
  91. package/dist/index-D0bJAQSN.js +0 -327
  92. package/dist/index-DAZ1ulyA.js +0 -5
  93. package/dist/index-DCmHHi07.js +0 -71
  94. package/dist/index-F7lDP1lI.js +0 -5
@@ -1,187 +0,0 @@
1
- import { defineComponent as O, ref as A, computed as q, watch as E, onMounted as _, onBeforeUnmount as R, openBlock as c, createElementBlock as d, withKeys as U, withModifiers as j, normalizeClass as L, createVNode as i, unref as p, withCtx as b, Fragment as h, createElementVNode as r, toDisplayString as y, Transition as G, renderList as H, createCommentVNode as J, renderSlot as Q } from "vue";
2
- import { Button as K } from "@freecallai/ui";
3
- import { IconPlusCircle as W } from "@freecallai/ui/es/icon/index.js";
4
- import w from "@freecallai/icons";
5
- const X = () => ({
6
- type: "doc",
7
- content: [{ type: "paragraph" }]
8
- }), Y = (f = "normal") => ({
9
- schemaVersion: 1,
10
- type: f,
11
- question: { text: "" },
12
- knowledge: { doc: f === "agent" ? null : X(), agentRef: null },
13
- extensionState: {}
14
- }), Z = ["onKeydown"], x = {
15
- key: 0,
16
- class: "fkp-type-popup",
17
- "aria-hidden": "false"
18
- }, ee = {
19
- class: "fkp-menu fkp-type-menu",
20
- "aria-label": "选择知识类型"
21
- }, ne = { class: "fkp-type-option-copy" }, ie = /* @__PURE__ */ O({
22
- name: "FkpKnowledgeTypePicker",
23
- __name: "FkpKnowledgeTypePicker",
24
- props: {
25
- currentType: { default: "normal" },
26
- mode: { default: "add" },
27
- trigger: { default: "button" },
28
- buttonLabel: { default: "添加知识" },
29
- disabled: { type: Boolean, default: !1 },
30
- open: { type: [Boolean, null], default: null },
31
- ariaKeyshortcuts: {}
32
- },
33
- emits: ["update:open", "select", "create"],
34
- setup(f, { emit: S }) {
35
- const l = f, m = S, v = A(), T = A(!1), o = q(() => l.open ?? T.value);
36
- let t = !1, k;
37
- const z = ["normal", "reasoning", "agent"], B = {
38
- normal: "常规知识",
39
- reasoning: "推理知识",
40
- agent: "Agent 知识"
41
- }, I = {
42
- normal: "适用于答案明确、无需条件判断的基础问答场景,命中后 AI 将参考知识内容生成回复。",
43
- reasoning: "适用于需要基础逻辑规则,按条件分情况判断处理的场景,命中后 AI 将按配置规则执行并回复。",
44
- agent: "适用于多步骤复杂业务流程、或需调用外部接口的场景,命中后 AI 将按 Agent 提示词执行并回复。"
45
- }, C = {
46
- normal: "regular",
47
- reasoning: "thinking",
48
- agent: "rte-agent"
49
- };
50
- function a() {
51
- k && clearTimeout(k), k = void 0;
52
- }
53
- function u(e, n) {
54
- l.open === null && (T.value = e), m("update:open", e, n);
55
- }
56
- function M() {
57
- a(), !(l.disabled || o.value) && (t = !1, u(!0, "hover"));
58
- }
59
- function P() {
60
- if (a(), !l.disabled) {
61
- if (o.value && !t) {
62
- t = !0, m("update:open", !0, "click");
63
- return;
64
- }
65
- t = !o.value, u(t, "click");
66
- }
67
- }
68
- function F() {
69
- !o.value || t || (a(), k = setTimeout(() => {
70
- t || u(!1, "leave");
71
- }, 180));
72
- }
73
- function V(e) {
74
- a(), t = !1, u(!1, "select"), m("select", e), l.mode === "add" && m("create", { type: e, scene: Y(e), position: "start" });
75
- }
76
- function g(e) {
77
- var n;
78
- !o.value || (n = v.value) != null && n.contains(e.target) || (t = !1, a(), u(!1, "outside"));
79
- }
80
- function $() {
81
- var e, n;
82
- o.value && (t = !1, a(), u(!1, "escape"), (n = (e = v.value) == null ? void 0 : e.querySelector(".fkp-type-button")) == null || n.focus());
83
- }
84
- function D(e) {
85
- e.setAttribute("aria-hidden", "false"), e.removeAttribute("inert");
86
- }
87
- function N(e) {
88
- e.setAttribute("aria-hidden", "true"), e.setAttribute("inert", "");
89
- }
90
- return E(
91
- () => l.open,
92
- (e) => {
93
- e === !1 && (t = !1, a());
94
- }
95
- ), E(o, (e) => {
96
- e ? document.addEventListener("click", g) : document.removeEventListener("click", g);
97
- }), _(() => {
98
- o.value && document.addEventListener("click", g);
99
- }), R(() => {
100
- a(), document.removeEventListener("click", g);
101
- }), (e, n) => (c(), d("div", {
102
- ref_key: "root",
103
- ref: v,
104
- class: L(["fkp-knowledge-type-picker", [`is-${e.currentType}`, { "is-add-button": e.trigger === "button" }]]),
105
- onMouseenter: a,
106
- onMouseleave: F,
107
- onKeydown: U(j($, ["stop", "prevent"]), ["esc"])
108
- }, [
109
- i(p(K), {
110
- class: "fkp-type-button",
111
- type: e.trigger === "button" ? "primary" : "text",
112
- "data-fkp-menu-trigger": "type",
113
- disabled: e.disabled,
114
- "aria-label": e.mode === "add" ? "添加知识场景" : "选择知识类型",
115
- "aria-expanded": o.value,
116
- "aria-keyshortcuts": e.ariaKeyshortcuts,
117
- onMouseenter: M,
118
- onClick: P
119
- }, {
120
- default: b(() => [
121
- e.trigger === "button" ? (c(), d(h, { key: 0 }, [
122
- i(p(W)),
123
- r("strong", null, y(e.buttonLabel), 1)
124
- ], 64)) : (c(), d(h, { key: 1 }, [
125
- i(p(w), {
126
- name: C[e.currentType],
127
- size: 16
128
- }, null, 8, ["name"]),
129
- r("strong", null, y(B[e.currentType]), 1),
130
- i(p(w), {
131
- name: "arrow-down",
132
- size: 12
133
- })
134
- ], 64))
135
- ]),
136
- _: 1
137
- }, 8, ["type", "disabled", "aria-label", "aria-expanded", "aria-keyshortcuts"]),
138
- i(G, {
139
- name: "zoom-in-fade-out",
140
- onBeforeEnter: D,
141
- onBeforeLeave: N
142
- }, {
143
- default: b(() => [
144
- o.value ? (c(), d("div", x, [
145
- n[1] || (n[1] = r("span", {
146
- class: "fkp-type-menu-arrow",
147
- "aria-hidden": "true"
148
- }, null, -1)),
149
- r("div", ee, [
150
- n[0] || (n[0] = r("strong", { class: "fkp-type-menu-title" }, "选择要添加的知识类型:", -1)),
151
- (c(), d(h, null, H(z, (s) => i(p(K), {
152
- key: s,
153
- class: "fkp-type-option",
154
- type: "text",
155
- "aria-pressed": e.mode === "switch" ? e.currentType === s : void 0,
156
- onClick: (te) => V(s)
157
- }, {
158
- default: b(() => [
159
- r("span", {
160
- class: L(["fkp-type-option-icon", `is-${s}`])
161
- }, [
162
- i(p(w), {
163
- name: C[s],
164
- size: 16
165
- }, null, 8, ["name"])
166
- ], 2),
167
- r("span", ne, [
168
- r("strong", null, y(B[s]), 1),
169
- r("span", null, y(I[s]), 1)
170
- ])
171
- ]),
172
- _: 2
173
- }, 1032, ["aria-pressed", "onClick"])), 64))
174
- ])
175
- ])) : J("", !0)
176
- ]),
177
- _: 1
178
- }),
179
- Q(e.$slots, "default")
180
- ], 42, Z));
181
- }
182
- });
183
- export {
184
- ie as _,
185
- X as a,
186
- Y as e
187
- };