@blueking/ai-blueking 2.1.0-beta.4 → 2.1.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue3/index.es.min.js +688 -688
- package/dist/vue3/index.iife.min.js +1 -1
- package/dist/vue3/index.umd.bundle.min.js +3049 -0
- package/dist/vue3/index.umd.min.js +1 -1
- package/dist/vue3.d.ts +1 -0
- package/dist/vue3.d.ts.map +1 -1
- package/package.json +7 -1
- package/dist/components/render-popup.vue.d.ts +0 -23
- package/dist/components/render-popup.vue.d.ts.map +0 -1
- package/dist/components/selection-footer/selection-footer.vue.d.ts +0 -22
- package/dist/components/selection-footer/selection-footer.vue.d.ts.map +0 -1
- package/dist/composables/use-select-pop.d.ts +0 -24
- package/dist/composables/use-select-pop.d.ts.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Fragment as e, Teleport as t, computed as n,
|
|
2
|
-
import { AiSelection as ee, ChatContainer as te, MessageContentType as
|
|
3
|
-
import { Exception as ie, Input as
|
|
4
|
-
import
|
|
5
|
-
import { Search as
|
|
6
|
-
import { AGUIProtocol as
|
|
1
|
+
import { Fragment as e, Teleport as t, computed as n, createApp as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineComponent as d, guardReactiveProps as f, h as p, h as m, isRef as h, mergeDefaults as g, nextTick as _, normalizeClass as v, normalizeProps as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, onUnmounted as C, openBlock as w, reactive as T, ref as E, render as D, renderList as O, renderSlot as k, shallowRef as A, toDisplayString as j, toValue as M, unref as N, useCssVars as P, vShow as F, watch as I, withCtx as L, withDirectives as R, withModifiers as z } from "vue";
|
|
2
|
+
import { AiSelection as ee, ChatContainer as te, MessageContentType as ne, MessageRender as re, MessageRole as B, MessageStatus as V, MessageToolsStatus as H } from "@blueking/chat-x";
|
|
3
|
+
import { Exception as ie, Input as ae, Message as oe, OverflowTitle as U, PopConfirm as se, bkTooltips as ce } from "bkui-vue";
|
|
4
|
+
import le from "tippy.js";
|
|
5
|
+
import { Search as ue } from "bkui-vue/lib/icon";
|
|
6
|
+
import { AGUIProtocol as de, AGUIProtocol as W, MessageRole as fe, useChatHelper as pe, useChatHelper as me } from "@blueking/chat-helper";
|
|
7
7
|
import "tippy.js/themes/light.css";
|
|
8
8
|
//#region src/assets/icon/iconcool.js
|
|
9
9
|
(function() {
|
|
@@ -14,33 +14,33 @@ import "tippy.js/themes/light.css";
|
|
|
14
14
|
})();
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/assets/images/avatar.png
|
|
17
|
-
var fe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAAGVn0euAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAYKADAAQAAAABAAAAYAAAAACpM19OAAAj4UlEQVR4Ae1dB4AURbqu7pnZyOICShIVBI5TDPgwR0yn5yknKigIy+5KMCJ4ohgQMGdP8BQDsAsqHsZTnnqcPlEU1DNwnnqKYATxRDIsuxO63/f91dXTMzuzzBLEd28Leqq66q+//lR/he7qVWpbh35lsYVBnHbwJpjuPqB2Be/3s9X+jH9TFnMZZwxdBkVXdhkc+02w8E8VifoVOg+Kurze/tRxuw2OuodU1tUHMlgI2GdczH1/kSPXR1847ieLE+6AC2uk0v7DoxKn8DDkt7aaMOFOtWaNq8YjXr/WVS3DupEehXHBLRWInXc/rXbV22/NU+vWOurNN+epmnWoENEV9g9WWDIjzyoOuWo9AG694xlVi/ihe55SsfUJtOAI5h5FCYnD8oufj6ryrVcLNrknHmyrkO2qSEgpx3ZUK7SAf5Y11rIIKz+mEuM/jNzgtgDdpd4l6ZCjGO99Vat68MG6v5R09/61NfVoGe/6+vITBqg2HLoJevnK3DO+61v3CXPvi7VbpVsSj8XW7b2HUsNPDam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j1EzLlAIRujiCuAvjIUGy9KFEbz3BUlXIvg9KxfcWvimPdOWESpdlVas7j1GMb7CDL2QlOA2+BnDKODmPsSHZXp33ZFjQGO0OGLExp6Ya18EIfcH4/IMj8IQy/St1BMk8ikQ42a0gjzhIp+CkzIKEbBaaIwJwx6TqkxRrNdWUtnJtpLlyCN+GkMK3tReLOWe0kHLqE6jW+V8xAnohU7GOzzw4/bdO9QcELLdY7DSwqMSaxf4/J0hfHyr0N0FwigUJXHwxVQRjLsUkBE40m7SOkVIWERDiFSAWKkuFyXRlbE+3BAV5Slf18e9pzhdXyuL31GTb6kBFjVdfY/miQO4OMYTz6rdRrdqhWRTaJJAkwSaJNAkgSYJNEmgSQJNEmhQAv8Lix8k/gNx6O4AAAAASUVORK5CYII=";
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/utils/message-utils.ts
|
|
20
|
-
function
|
|
20
|
+
function ge(e, t) {
|
|
21
21
|
let n = null;
|
|
22
22
|
for (let r of e) if (r.role === "user" && r.id !== void 0 && (n = r), r === t) break;
|
|
23
23
|
return n;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
let n =
|
|
25
|
+
function _e(e, t) {
|
|
26
|
+
let n = ge(e, t);
|
|
27
27
|
if (n?.id !== void 0) return typeof n.id == "number" ? n.id : Number(n.id);
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/utils/index.ts
|
|
31
|
-
var
|
|
31
|
+
var ve = (e) => {
|
|
32
32
|
let t = document.cookie.match(RegExp(`(^| )${e}=([^;]*)(;|$)`));
|
|
33
33
|
return t ? t[2] : "";
|
|
34
|
-
},
|
|
34
|
+
}, ye = (e) => e.endsWith("/") ? e : `${e}/`, be = (e) => {
|
|
35
35
|
if (!e) return e;
|
|
36
36
|
try {
|
|
37
37
|
let t = new URL(e, window.location.origin);
|
|
38
|
-
return t.protocol = window.location.protocol,
|
|
38
|
+
return t.protocol = window.location.protocol, ye(t.toString());
|
|
39
39
|
} catch (t) {
|
|
40
|
-
return console.warn("Failed to normalize URL:", t),
|
|
40
|
+
return console.warn("Failed to normalize URL:", t), ye(e);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
async function
|
|
43
|
+
async function xe(e) {
|
|
44
44
|
if (typeof navigator < "u" && "clipboard" in navigator) try {
|
|
45
45
|
return await navigator.clipboard.writeText(e), !0;
|
|
46
46
|
} catch {}
|
|
@@ -54,23 +54,23 @@ async function ve(e) {
|
|
|
54
54
|
document.body.removeChild(t);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Se() {
|
|
58
58
|
let e = window.navigator.userAgent.toLowerCase(), t = window.navigator.platform.toLowerCase();
|
|
59
59
|
return t.includes("mac") || e.includes("mac") ? "mac" : t.includes("win") || e.includes("win") ? "windows" : t.includes("linux") || e.includes("linux") ? "linux" : "unknown";
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
return
|
|
61
|
+
function Ce() {
|
|
62
|
+
return G() ? "Cmd + I" : "Ctrl + I";
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
return
|
|
64
|
+
function G() {
|
|
65
|
+
return Se() === "mac";
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
let t =
|
|
67
|
+
function we(e) {
|
|
68
|
+
let t = G() ? e.metaKey : e.ctrlKey, n = e.key.toLowerCase() === "i";
|
|
69
69
|
return t && n && !e.shiftKey && !e.altKey;
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region src/lang/index.ts
|
|
73
|
-
var
|
|
73
|
+
var Te = ve("blueking_language") || "zh-cn", Ee = {
|
|
74
74
|
小鲸: "BK GPT",
|
|
75
75
|
关闭: "close",
|
|
76
76
|
发送: "Send",
|
|
@@ -105,7 +105,7 @@ var Ce = he("blueking_language") || "zh-cn", we = {
|
|
|
105
105
|
取消: "Cancel",
|
|
106
106
|
确定: "Confirm",
|
|
107
107
|
分享链接已复制到剪贴板: "Share link copied to clipboard"
|
|
108
|
-
},
|
|
108
|
+
}, De = {
|
|
109
109
|
重命名: "重命名",
|
|
110
110
|
自动生成命名: "自动生成命名",
|
|
111
111
|
分享会话: "分享会话",
|
|
@@ -113,11 +113,11 @@ var Ce = he("blueking_language") || "zh-cn", we = {
|
|
|
113
113
|
取消: "取消",
|
|
114
114
|
确定: "确定",
|
|
115
115
|
分享链接已复制到剪贴板: "分享链接已复制到剪贴板"
|
|
116
|
-
}, K = (e) =>
|
|
116
|
+
}, K = (e) => Te === "en" ? Ee[e] || e : De[e] || e;
|
|
117
117
|
//#endregion
|
|
118
118
|
//#region src/composables/use-history-panel.ts
|
|
119
|
-
function
|
|
120
|
-
let { triggerRef: t, panelComponent: n, panelProps: r = {}, tippyOptions: i = {} } = e, a =
|
|
119
|
+
function Oe(e) {
|
|
120
|
+
let { triggerRef: t, panelComponent: n, panelProps: r = {}, tippyOptions: i = {} } = e, a = E(null), o = null, s = () => (o ||= document.createElement("div"), D(m(n, {
|
|
121
121
|
...r,
|
|
122
122
|
onClose: d
|
|
123
123
|
}), o), o), c = (e) => {
|
|
@@ -134,7 +134,7 @@ function Ee(e) {
|
|
|
134
134
|
offset: [0, 8],
|
|
135
135
|
appendTo: document.querySelector(".ai-blueking-container-wrapper") || document.body
|
|
136
136
|
};
|
|
137
|
-
a.value =
|
|
137
|
+
a.value = le(t.value, {
|
|
138
138
|
content: s(),
|
|
139
139
|
interactive: !0,
|
|
140
140
|
trigger: "manual",
|
|
@@ -159,27 +159,27 @@ function Ee(e) {
|
|
|
159
159
|
a.value || l(), a.value?.show();
|
|
160
160
|
}, d = () => {
|
|
161
161
|
a.value?.hide();
|
|
162
|
-
},
|
|
162
|
+
}, f = () => {
|
|
163
163
|
a.value || l(), a.value?.state.isVisible ? d() : u();
|
|
164
|
-
},
|
|
165
|
-
e.stopPropagation(),
|
|
164
|
+
}, p = (e) => {
|
|
165
|
+
e.stopPropagation(), f();
|
|
166
166
|
}, h = () => {
|
|
167
|
-
a.value &&= (a.value.destroy(), null), o &&= (
|
|
167
|
+
a.value &&= (a.value.destroy(), null), o &&= (D(null, o), null), document.removeEventListener("click", c, !1);
|
|
168
168
|
};
|
|
169
|
-
return
|
|
169
|
+
return x(() => {
|
|
170
170
|
h();
|
|
171
171
|
}), {
|
|
172
172
|
show: u,
|
|
173
173
|
hide: d,
|
|
174
|
-
toggle:
|
|
175
|
-
handleTriggerClick:
|
|
174
|
+
toggle: f,
|
|
175
|
+
handleTriggerClick: p,
|
|
176
176
|
destroy: h,
|
|
177
177
|
isVisible: () => a.value?.state.isVisible ?? !1
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
180
|
//#endregion
|
|
181
181
|
//#region src/components/ai-header/history-dropdown/history-group.vue?vue&type=script&setup=true&lang.ts
|
|
182
|
-
var
|
|
182
|
+
var ke = { class: "history-group" }, Ae = { class: "history-group-title" }, je = { class: "history-group-list" }, Me = /* @__PURE__ */ d({
|
|
183
183
|
__name: "history-group",
|
|
184
184
|
props: {
|
|
185
185
|
currentSessionCode: {},
|
|
@@ -188,13 +188,13 @@ var De = { class: "history-group" }, Oe = { class: "history-group-title" }, ke =
|
|
|
188
188
|
},
|
|
189
189
|
setup(e) {
|
|
190
190
|
let t = e;
|
|
191
|
-
return (e, n) => (
|
|
191
|
+
return (e, n) => (w(), o("div", ke, [s("div", Ae, [s("span", null, j(t.title), 1)]), s("div", je, [k(e.$slots, "default", {}, void 0, !0)])]));
|
|
192
192
|
}
|
|
193
193
|
}), q = (e, t) => {
|
|
194
194
|
let n = e.__vccOpts || e;
|
|
195
195
|
for (let [e, r] of t) n[e] = r;
|
|
196
196
|
return n;
|
|
197
|
-
},
|
|
197
|
+
}, Ne = /* @__PURE__ */ q(Me, [["__scopeId", "data-v-3b603cb6"]]), Pe = { class: "history-item-actions" }, Fe = /* @__PURE__ */ q(/* @__PURE__ */ d({
|
|
198
198
|
__name: "history-item",
|
|
199
199
|
props: {
|
|
200
200
|
isActive: { type: Boolean },
|
|
@@ -209,9 +209,9 @@ var De = { class: "history-group" }, Oe = { class: "history-group-title" }, ke =
|
|
|
209
209
|
"rename-confirm"
|
|
210
210
|
],
|
|
211
211
|
setup(t, { emit: n }) {
|
|
212
|
-
let
|
|
213
|
-
|
|
214
|
-
e && (f.value =
|
|
212
|
+
let r = t, a = n, c = ce, d = E(null), f = E("");
|
|
213
|
+
I(() => r.isEditing, (e) => {
|
|
214
|
+
e && (f.value = r.session.sessionName, _(() => {
|
|
215
215
|
if (d.value) try {
|
|
216
216
|
let e = d.value;
|
|
217
217
|
e && typeof e.focus == "function" && e.focus();
|
|
@@ -223,23 +223,23 @@ var De = { class: "history-group" }, Oe = { class: "history-group-title" }, ke =
|
|
|
223
223
|
}));
|
|
224
224
|
});
|
|
225
225
|
let p = () => {
|
|
226
|
-
|
|
226
|
+
r.isEditing || a("click", r.session);
|
|
227
227
|
}, m = () => {
|
|
228
|
-
|
|
229
|
-
},
|
|
230
|
-
|
|
231
|
-
},
|
|
228
|
+
a("edit", r.session);
|
|
229
|
+
}, h = () => {
|
|
230
|
+
a("delete", r.session.sessionCode);
|
|
231
|
+
}, g = () => {
|
|
232
232
|
let e = f.value.trim();
|
|
233
|
-
e && e !==
|
|
233
|
+
e && e !== r.session.sessionName ? a("rename-confirm", r.session.sessionCode, e) : a("rename-cancel");
|
|
234
234
|
}, y = () => {
|
|
235
|
-
|
|
235
|
+
a("rename-cancel");
|
|
236
236
|
}, b = (e, t) => {
|
|
237
|
-
t.key === "Enter" ?
|
|
237
|
+
t.key === "Enter" ? g() : t.key === "Escape" && y();
|
|
238
238
|
};
|
|
239
|
-
return (t, n) => (
|
|
240
|
-
class:
|
|
239
|
+
return (t, n) => (w(), o("div", {
|
|
240
|
+
class: v(["history-item", { active: r.isActive }]),
|
|
241
241
|
onClick: p
|
|
242
|
-
}, [
|
|
242
|
+
}, [r.isEditing ? (w(), i(N(ae), {
|
|
243
243
|
key: 1,
|
|
244
244
|
ref_key: "editInputRef",
|
|
245
245
|
ref: d,
|
|
@@ -249,37 +249,37 @@ var De = { class: "history-group" }, Oe = { class: "history-group-title" }, ke =
|
|
|
249
249
|
width: "100%",
|
|
250
250
|
height: "28px"
|
|
251
251
|
},
|
|
252
|
-
onBlur:
|
|
252
|
+
onBlur: g,
|
|
253
253
|
onKeyup: b,
|
|
254
|
-
onClick: n[2] ||=
|
|
255
|
-
}, null, 8, ["modelValue"])) : (
|
|
256
|
-
default:
|
|
254
|
+
onClick: n[2] ||= z(() => {}, ["stop"])
|
|
255
|
+
}, null, 8, ["modelValue"])) : (w(), o(e, { key: 0 }, [u(N(U), { style: { width: "calc(100% - 42px)" } }, {
|
|
256
|
+
default: L(() => [l(j(r.session.sessionName), 1)]),
|
|
257
257
|
_: 1
|
|
258
|
-
}),
|
|
258
|
+
}), s("span", Pe, [R(s("i", {
|
|
259
259
|
class: "bkai-icon bkai-bianji",
|
|
260
|
-
onClick:
|
|
261
|
-
}, null, 512), [[
|
|
262
|
-
content:
|
|
260
|
+
onClick: z(m, ["stop"])
|
|
261
|
+
}, null, 512), [[N(c), {
|
|
262
|
+
content: N(K)("编辑"),
|
|
263
263
|
boundary: "parent"
|
|
264
|
-
}]]),
|
|
265
|
-
title:
|
|
264
|
+
}]]), u(N(se), {
|
|
265
|
+
title: N(K)("确认删除会话 ?"),
|
|
266
266
|
content: "删除操作无法撤回,请谨慎操作!",
|
|
267
267
|
"confirm-config": { theme: "danger" },
|
|
268
268
|
trigger: "click",
|
|
269
269
|
boundary: "parent",
|
|
270
|
-
onConfirm:
|
|
270
|
+
onConfirm: h
|
|
271
271
|
}, {
|
|
272
|
-
default:
|
|
272
|
+
default: L(() => [R(s("i", {
|
|
273
273
|
class: "bkai-icon bkai-shanchu",
|
|
274
|
-
onClick: n[0] ||=
|
|
275
|
-
}, null, 512), [[
|
|
276
|
-
content:
|
|
274
|
+
onClick: n[0] ||= z(() => {}, ["stop"])
|
|
275
|
+
}, null, 512), [[N(c), {
|
|
276
|
+
content: N(K)("删除"),
|
|
277
277
|
boundary: "parent"
|
|
278
278
|
}]])]),
|
|
279
279
|
_: 1
|
|
280
280
|
}, 8, ["title"])])], 64))], 2));
|
|
281
281
|
}
|
|
282
|
-
}), [["__scopeId", "data-v-fea14d3a"]]),
|
|
282
|
+
}), [["__scopeId", "data-v-fea14d3a"]]), Ie = { class: "history-search" }, Le = { class: "input-icon" }, Re = /* @__PURE__ */ q(/* @__PURE__ */ d({
|
|
283
283
|
__name: "history-search",
|
|
284
284
|
props: {
|
|
285
285
|
modelValue: { default: "" },
|
|
@@ -290,18 +290,18 @@ var De = { class: "history-group" }, Oe = { class: "history-group-title" }, ke =
|
|
|
290
290
|
let n = e, r = t, i = (e) => {
|
|
291
291
|
r("update:modelValue", e);
|
|
292
292
|
};
|
|
293
|
-
return (e, t) => (
|
|
293
|
+
return (e, t) => (w(), o("div", Ie, [u(N(ae), {
|
|
294
294
|
"model-value": n.modelValue,
|
|
295
295
|
behavior: "simplicity",
|
|
296
|
-
placeholder: n.placeholder ||
|
|
296
|
+
placeholder: n.placeholder || N(K)("搜索会话名称"),
|
|
297
297
|
style: { height: "22px" },
|
|
298
298
|
"onUpdate:modelValue": i
|
|
299
299
|
}, {
|
|
300
|
-
suffix:
|
|
300
|
+
suffix: L(() => [s("span", Le, [u(N(ue))])]),
|
|
301
301
|
_: 1
|
|
302
302
|
}, 8, ["model-value", "placeholder"])]));
|
|
303
303
|
}
|
|
304
|
-
}), [["__scopeId", "data-v-e7ff40b2"]]),
|
|
304
|
+
}), [["__scopeId", "data-v-e7ff40b2"]]), ze = { class: "bkai-history-dropdown" }, Be = { class: "history-dropdown-header" }, Ve = { class: "history-dropdown-header-title" }, He = { class: "history-dropdown-content" }, Ue = /* @__PURE__ */ q(/* @__PURE__ */ d({
|
|
305
305
|
__name: "index",
|
|
306
306
|
props: { sessionBusinessManager: {} },
|
|
307
307
|
emits: [
|
|
@@ -310,8 +310,8 @@ var De = { class: "history-group" }, Oe = { class: "history-group-title" }, ke =
|
|
|
310
310
|
"session-rename",
|
|
311
311
|
"session-switch"
|
|
312
312
|
],
|
|
313
|
-
setup(t, { emit:
|
|
314
|
-
let
|
|
313
|
+
setup(t, { emit: r }) {
|
|
314
|
+
let a = t, c = r, l = E(""), d = E(null), f = n(() => a.sessionBusinessManager.currentSession.value?.sessionCode), p = n(() => {
|
|
315
315
|
let e = {
|
|
316
316
|
today: {
|
|
317
317
|
key: "today",
|
|
@@ -343,17 +343,17 @@ var De = { class: "history-group" }, Oe = { class: "history-group-title" }, ke =
|
|
|
343
343
|
alias: K("更早"),
|
|
344
344
|
sessionList: []
|
|
345
345
|
}
|
|
346
|
-
}, t =
|
|
346
|
+
}, t = a.sessionBusinessManager.sessionList.value.filter((e) => e.sessionName.toLowerCase().includes(l.value.toLowerCase())), n = /* @__PURE__ */ new Date(), r = new Date(n);
|
|
347
347
|
r.setDate(r.getDate() - 1);
|
|
348
348
|
let i = new Date(n);
|
|
349
349
|
i.setDate(n.getDate() - 3);
|
|
350
|
-
let a = new Date(n);
|
|
351
|
-
a.setDate(n.getDate() - 5);
|
|
352
350
|
let o = new Date(n);
|
|
353
|
-
o.setDate(n.getDate() -
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
351
|
+
o.setDate(n.getDate() - 5);
|
|
352
|
+
let s = new Date(n);
|
|
353
|
+
s.setDate(n.getDate() - 7);
|
|
354
|
+
for (let a of t) {
|
|
355
|
+
let t = new Date(a.createdAt || ""), c = t.toDateString();
|
|
356
|
+
c === n.toDateString() ? e.today.sessionList.push(a) : c === r.toDateString() ? e.yesterday.sessionList.push(a) : t >= i && t > o ? e["3days"].sessionList.push(a) : t >= o && t > s ? e["5days"].sessionList.push(a) : t >= s ? e["1week"].sessionList.push(a) : e.before.sessionList.push(a);
|
|
357
357
|
}
|
|
358
358
|
for (let t of Object.values(e)) t.sessionList.sort((e, t) => {
|
|
359
359
|
let n = new Date(e.createdAt || 0).getTime();
|
|
@@ -367,22 +367,22 @@ var De = { class: "history-group" }, Oe = { class: "history-group-title" }, ke =
|
|
|
367
367
|
}, _ = (e) => {
|
|
368
368
|
c("session-delete", e);
|
|
369
369
|
}, v = (e, t) => {
|
|
370
|
-
let n =
|
|
370
|
+
let n = a.sessionBusinessManager.sessionList.value.find((t) => t.sessionCode === e);
|
|
371
371
|
n && (n.sessionName = t), d.value = null, c("session-rename", e, t);
|
|
372
372
|
}, y = () => {
|
|
373
373
|
d.value = null;
|
|
374
374
|
};
|
|
375
|
-
return (t, n) => (
|
|
376
|
-
modelValue:
|
|
377
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
378
|
-
placeholder:
|
|
379
|
-
}, null, 8, ["modelValue", "placeholder"])]),
|
|
375
|
+
return (t, n) => (w(), o("div", ze, [s("div", Be, [s("h1", Ve, j(N(K)("历史会话")), 1), u(Re, {
|
|
376
|
+
modelValue: l.value,
|
|
377
|
+
"onUpdate:modelValue": n[0] ||= (e) => l.value = e,
|
|
378
|
+
placeholder: N(K)("搜索会话名称")
|
|
379
|
+
}, null, 8, ["modelValue", "placeholder"])]), s("div", He, [p.value.length > 0 ? (w(!0), o(e, { key: 0 }, O(p.value, (t) => (w(), i(Ne, {
|
|
380
380
|
key: t.key,
|
|
381
381
|
"current-session-code": f.value,
|
|
382
382
|
sessions: t.sessionList,
|
|
383
383
|
title: t.alias
|
|
384
384
|
}, {
|
|
385
|
-
default:
|
|
385
|
+
default: L(() => [(w(!0), o(e, null, O(t.sessionList, (e) => (w(), i(Fe, {
|
|
386
386
|
key: e.sessionCode,
|
|
387
387
|
"is-active": m(e.sessionCode),
|
|
388
388
|
"is-editing": d.value === e.sessionCode,
|
|
@@ -402,21 +402,21 @@ var De = { class: "history-group" }, Oe = { class: "history-group-title" }, ke =
|
|
|
402
402
|
"current-session-code",
|
|
403
403
|
"sessions",
|
|
404
404
|
"title"
|
|
405
|
-
]))), 128)) : (
|
|
405
|
+
]))), 128)) : (w(), i(N(ie), {
|
|
406
406
|
key: 1,
|
|
407
|
-
description:
|
|
407
|
+
description: l.value ? N(K)("搜索为空") : N(K)("暂无对话"),
|
|
408
408
|
scene: "part",
|
|
409
409
|
style: { "margin-top": "100px" },
|
|
410
|
-
type:
|
|
410
|
+
type: l.value ? "search-empty" : "empty"
|
|
411
411
|
}, null, 8, ["description", "type"]))])]));
|
|
412
412
|
}
|
|
413
413
|
}), [["__scopeId", "data-v-143fb0ef"]]);
|
|
414
414
|
//#endregion
|
|
415
415
|
//#region src/components/ai-header/history-dropdown/use-history-dropdown.ts
|
|
416
|
-
function
|
|
417
|
-
return e.sessionBusinessManager ?
|
|
416
|
+
function We(e) {
|
|
417
|
+
return e.sessionBusinessManager ? Oe({
|
|
418
418
|
triggerRef: e.triggerRef,
|
|
419
|
-
panelComponent:
|
|
419
|
+
panelComponent: Ue,
|
|
420
420
|
panelProps: {
|
|
421
421
|
sessionBusinessManager: e.sessionBusinessManager,
|
|
422
422
|
onSessionSwitch: e.onSessionSwitch,
|
|
@@ -439,10 +439,10 @@ function He(e) {
|
|
|
439
439
|
}
|
|
440
440
|
//#endregion
|
|
441
441
|
//#region src/components/ai-header/index.vue?vue&type=script&setup=true&lang.ts
|
|
442
|
-
var
|
|
442
|
+
var Ge = { class: "left-section" }, Ke = { class: "logo" }, qe = ["src"], Je = {
|
|
443
443
|
key: 0,
|
|
444
444
|
class: "rename-tooltip"
|
|
445
|
-
},
|
|
445
|
+
}, Ye = { class: "rename-content" }, Xe = { class: "right-section" }, Ze = /* @__PURE__ */ q(/* @__PURE__ */ d({
|
|
446
446
|
__name: "index",
|
|
447
447
|
props: {
|
|
448
448
|
title: { default: "" },
|
|
@@ -507,27 +507,27 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
507
507
|
"history-session-rename"
|
|
508
508
|
],
|
|
509
509
|
setup(e, { expose: t, emit: r }) {
|
|
510
|
-
let
|
|
511
|
-
!p.value || !
|
|
510
|
+
let i = e, c = r, d = ce, f = E(null), p = E(null), m = E(null), h = E(!1), g = E(""), _ = E(null), y = null, C = /* @__PURE__ */ new Map(), T = null, D = () => {
|
|
511
|
+
!p.value || !i.sessionBusinessManager || (T = We({
|
|
512
512
|
triggerRef: p,
|
|
513
|
-
sessionBusinessManager:
|
|
514
|
-
onSessionSwitch: (e) =>
|
|
515
|
-
onSessionDelete: (e) =>
|
|
516
|
-
onSessionRename: (e, t) =>
|
|
513
|
+
sessionBusinessManager: i.sessionBusinessManager,
|
|
514
|
+
onSessionSwitch: (e) => c("history-session-switch", e),
|
|
515
|
+
onSessionDelete: (e) => c("history-session-delete", e),
|
|
516
|
+
onSessionRename: (e, t) => c("history-session-rename", e, t)
|
|
517
517
|
}));
|
|
518
|
-
}, O = n(() =>
|
|
519
|
-
let e = !
|
|
520
|
-
return
|
|
518
|
+
}, O = n(() => i.hasPermission ? i.enableChatSession ? i.title || `${i.agentName || ""}-${i.sessionName || ""}` : i.agentName : K("无智能体使用权限")), k = n(() => i.isCompressionHeight ? "bkai-morenchicun" : "bkai-yasuo"), A = n(() => i.isCompressionHeight ? K("恢复默认尺寸") : K("缩小高度")), M = n(() => i.hasPermission), P = (e) => M.value ? e : K("暂无使用权限"), F = () => ({ cursor: M.value ? "pointer" : "not-allowed" }), L = n(() => {
|
|
519
|
+
let e = !i.hasSessionContents, t = e ? "disabled" : "", n = e ? `data-tippy-content="${K("请先发起会话")}"` : "", r = "";
|
|
520
|
+
return i.dropdownMenuConfig?.showRename && (r += `
|
|
521
521
|
<div class="tippy-menu-item" data-action="rename">
|
|
522
522
|
<i class="bkai-icon bkai-bianji"></i>
|
|
523
523
|
<span>${K("重命名")}</span>
|
|
524
524
|
</div>
|
|
525
|
-
`),
|
|
525
|
+
`), i.dropdownMenuConfig?.showAutoGenerate && (r += `
|
|
526
526
|
<div class="tippy-menu-item ${t}" data-action="auto-generate" ${n}>
|
|
527
527
|
<i class="bkai-icon bkai-auto-refresh-line"></i>
|
|
528
528
|
<span>${K("自动生成命名")}</span>
|
|
529
529
|
</div>
|
|
530
|
-
`),
|
|
530
|
+
`), i.dropdownMenuConfig?.showShare && (r += `
|
|
531
531
|
<div class="tippy-menu-item ${t}" data-action="share" ${n}>
|
|
532
532
|
<i class="bkai-icon bkai-fenxiang"></i>
|
|
533
533
|
<span>${K("分享会话")}</span>
|
|
@@ -537,42 +537,42 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
537
537
|
${r}
|
|
538
538
|
</div>
|
|
539
539
|
`;
|
|
540
|
-
}),
|
|
541
|
-
if (
|
|
542
|
-
await
|
|
540
|
+
}), z = async () => {
|
|
541
|
+
if (i.sessionBusinessManager) try {
|
|
542
|
+
await i.sessionBusinessManager.createNewSession();
|
|
543
543
|
} catch (e) {
|
|
544
|
-
console.error("Failed to create new session:", e),
|
|
544
|
+
console.error("Failed to create new session:", e), oe({
|
|
545
545
|
theme: "error",
|
|
546
546
|
message: K("创建会话失败")
|
|
547
547
|
});
|
|
548
548
|
}
|
|
549
|
-
|
|
550
|
-
},
|
|
551
|
-
e.stopPropagation(),
|
|
552
|
-
},
|
|
553
|
-
|
|
554
|
-
},
|
|
555
|
-
e.stopPropagation(),
|
|
556
|
-
},
|
|
549
|
+
c("new-chat");
|
|
550
|
+
}, ee = (e) => {
|
|
551
|
+
e.stopPropagation(), i.sessionBusinessManager ? (T || D(), T && T.handleTriggerClick(e)) : c("history-click", e);
|
|
552
|
+
}, te = () => {
|
|
553
|
+
c("help-click");
|
|
554
|
+
}, ne = (e) => {
|
|
555
|
+
e.stopPropagation(), T && T.isVisible() && T.hide(), y && (y.state.isVisible ? y.hide() : y.show());
|
|
556
|
+
}, re = (e) => {
|
|
557
557
|
e.stopPropagation(), e.preventDefault();
|
|
558
558
|
let t = e.currentTarget, n = t.dataset.action;
|
|
559
|
-
if (!t.classList.contains("disabled")) switch (
|
|
559
|
+
if (!t.classList.contains("disabled")) switch (y && y.hide(), n) {
|
|
560
560
|
case "rename":
|
|
561
|
-
|
|
561
|
+
B();
|
|
562
562
|
break;
|
|
563
563
|
case "auto-generate":
|
|
564
|
-
|
|
564
|
+
c("auto-generate-name");
|
|
565
565
|
break;
|
|
566
566
|
case "share":
|
|
567
|
-
|
|
567
|
+
c("share");
|
|
568
568
|
break;
|
|
569
569
|
}
|
|
570
|
-
},
|
|
571
|
-
document.removeEventListener("click",
|
|
572
|
-
document.addEventListener("click",
|
|
570
|
+
}, B = () => {
|
|
571
|
+
document.removeEventListener("click", U), g.value = i.sessionName || "", h.value = !0, setTimeout(() => {
|
|
572
|
+
document.addEventListener("click", U);
|
|
573
573
|
}, 100), setTimeout(() => {
|
|
574
|
-
if (
|
|
575
|
-
let e =
|
|
574
|
+
if (_.value) try {
|
|
575
|
+
let e = _.value;
|
|
576
576
|
e && typeof e.focus == "function" && e.focus();
|
|
577
577
|
let t = e.$el?.querySelector("input");
|
|
578
578
|
t && typeof t.select == "function" && t.select();
|
|
@@ -580,26 +580,26 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
580
580
|
console.warn("Failed to focus rename input:", e);
|
|
581
581
|
}
|
|
582
582
|
}, 100);
|
|
583
|
-
},
|
|
584
|
-
let e =
|
|
583
|
+
}, V = () => {
|
|
584
|
+
let e = g.value.trim();
|
|
585
585
|
if (!e) {
|
|
586
|
-
|
|
586
|
+
H();
|
|
587
587
|
return;
|
|
588
588
|
}
|
|
589
|
-
|
|
590
|
-
},
|
|
591
|
-
h.value = !1,
|
|
592
|
-
},
|
|
593
|
-
|
|
594
|
-
},
|
|
589
|
+
c("rename", e), h.value = !1, g.value = "";
|
|
590
|
+
}, H = () => {
|
|
591
|
+
h.value = !1, g.value = "";
|
|
592
|
+
}, ie = (e, t) => {
|
|
593
|
+
g.value = e, t.key === "Enter" ? V() : t.key === "Escape" && H();
|
|
594
|
+
}, U = (e) => {
|
|
595
595
|
if (!h.value) return;
|
|
596
596
|
let t = e.target, n = document.querySelector(".rename-tooltip");
|
|
597
|
-
n && !n.contains(t) &&
|
|
597
|
+
n && !n.contains(t) && H();
|
|
598
598
|
}, se = async () => {
|
|
599
599
|
if (!m.value) return;
|
|
600
600
|
let e = (await import("tippy.js")).default;
|
|
601
|
-
|
|
602
|
-
content:
|
|
601
|
+
y &&= (y.destroy(), null), y = e(m.value, {
|
|
602
|
+
content: L.value,
|
|
603
603
|
theme: "ai-blueking-light more-menu-light light",
|
|
604
604
|
placement: "bottom-start",
|
|
605
605
|
trigger: "manual",
|
|
@@ -613,9 +613,9 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
613
613
|
let { default: e } = await import("tippy.js");
|
|
614
614
|
document.querySelectorAll(".tippy-menu-item").forEach((t) => {
|
|
615
615
|
let n = t;
|
|
616
|
-
n.addEventListener("click",
|
|
616
|
+
n.addEventListener("click", re);
|
|
617
617
|
let r = n.getAttribute("data-tippy-content");
|
|
618
|
-
if (r && !
|
|
618
|
+
if (r && !C.has(n)) {
|
|
619
619
|
let t = e(n, {
|
|
620
620
|
content: r,
|
|
621
621
|
theme: "ai-blueking-tooltip",
|
|
@@ -624,7 +624,7 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
624
624
|
delay: [300, 0],
|
|
625
625
|
appendTo: () => document.querySelector(".ai-blueking-panel") || document.body
|
|
626
626
|
});
|
|
627
|
-
|
|
627
|
+
C.set(n, t);
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
630
|
}, 0);
|
|
@@ -632,116 +632,116 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
632
632
|
onHide: () => {
|
|
633
633
|
document.querySelectorAll(".tippy-menu-item").forEach((e) => {
|
|
634
634
|
let t = e;
|
|
635
|
-
t.removeEventListener("click",
|
|
636
|
-
let n =
|
|
637
|
-
n && (n.destroy(),
|
|
635
|
+
t.removeEventListener("click", re);
|
|
636
|
+
let n = C.get(t);
|
|
637
|
+
n && (n.destroy(), C.delete(t));
|
|
638
638
|
});
|
|
639
639
|
}
|
|
640
640
|
});
|
|
641
641
|
};
|
|
642
|
-
return
|
|
643
|
-
|
|
644
|
-
}),
|
|
645
|
-
se(),
|
|
646
|
-
}),
|
|
647
|
-
|
|
642
|
+
return I(() => [i.isCompressionHeight, i.hasSessionContents], () => {
|
|
643
|
+
y && y.setContent(L.value);
|
|
644
|
+
}), S(() => {
|
|
645
|
+
se(), i.sessionBusinessManager && D(), document.addEventListener("click", U);
|
|
646
|
+
}), x(() => {
|
|
647
|
+
y &&= (y.destroy(), null), C.forEach((e) => {
|
|
648
648
|
e.destroy();
|
|
649
|
-
}),
|
|
649
|
+
}), C.clear(), T &&= (T.destroy(), null), document.removeEventListener("click", U);
|
|
650
650
|
}), t({
|
|
651
651
|
headerRef: f,
|
|
652
652
|
historyIconRef: p
|
|
653
|
-
}), (t, n) => (
|
|
653
|
+
}), (t, n) => (w(), o("div", {
|
|
654
654
|
ref_key: "headerRef",
|
|
655
655
|
ref: f,
|
|
656
|
-
class:
|
|
657
|
-
}, [
|
|
658
|
-
|
|
656
|
+
class: v(["ai-header drag-handle", { draggable: i.draggable }])
|
|
657
|
+
}, [s("div", Ge, [
|
|
658
|
+
s("div", Ke, [s("img", {
|
|
659
659
|
alt: "logo",
|
|
660
|
-
src:
|
|
661
|
-
}, null, 8,
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
h.value ? (
|
|
660
|
+
src: N(he)
|
|
661
|
+
}, null, 8, qe)]),
|
|
662
|
+
s("div", { class: v(["title", { "title-with-tooltip": h.value }]) }, [
|
|
663
|
+
l(j(O.value) + " ", 1),
|
|
664
|
+
a(" 重命名 tooltip 直接绑定在 title 上 "),
|
|
665
|
+
h.value ? (w(), o("div", Je, [s("div", Ye, [u(N(ae), {
|
|
666
666
|
ref_key: "renameInputRef",
|
|
667
|
-
ref:
|
|
668
|
-
modelValue:
|
|
669
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
667
|
+
ref: _,
|
|
668
|
+
modelValue: g.value,
|
|
669
|
+
"onUpdate:modelValue": n[0] ||= (e) => g.value = e,
|
|
670
670
|
class: "rename-input",
|
|
671
|
-
placeholder:
|
|
672
|
-
onKeyup:
|
|
673
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
671
|
+
placeholder: N(K)("请输入新的会话名称"),
|
|
672
|
+
onKeyup: ie
|
|
673
|
+
}, null, 8, ["modelValue", "placeholder"]), s("div", { class: "rename-buttons" }, [s("i", {
|
|
674
674
|
class: "bkai-icon bkai-check-1 rename-btn confirm-btn",
|
|
675
|
-
onClick:
|
|
676
|
-
}),
|
|
675
|
+
onClick: V
|
|
676
|
+
}), s("i", {
|
|
677
677
|
class: "bkai-icon bkai-close rename-btn cancel-btn",
|
|
678
|
-
onClick:
|
|
679
|
-
})])])])) :
|
|
678
|
+
onClick: H
|
|
679
|
+
})])])])) : a("v-if", !0)
|
|
680
680
|
], 2),
|
|
681
|
-
|
|
681
|
+
i.showMoreIcon && M.value ? (w(), o("span", {
|
|
682
682
|
key: 0,
|
|
683
683
|
ref_key: "moreIconRef",
|
|
684
684
|
ref: m,
|
|
685
685
|
class: "bkai-icon bkai-more",
|
|
686
|
-
onClick:
|
|
687
|
-
}, null, 512)) :
|
|
688
|
-
]),
|
|
689
|
-
|
|
690
|
-
|
|
686
|
+
onClick: ne
|
|
687
|
+
}, null, 512)) : a("v-if", !0)
|
|
688
|
+
]), s("div", Xe, [
|
|
689
|
+
a(" 新增会话按钮 "),
|
|
690
|
+
i.showNewChatIcon && e.enableChatSession !== !1 ? R((w(), o("i", {
|
|
691
691
|
key: 0,
|
|
692
|
-
class:
|
|
692
|
+
class: v([
|
|
693
693
|
"bkai-icon",
|
|
694
694
|
"bkai-xinzengliaotian",
|
|
695
|
-
{ disabled: !
|
|
695
|
+
{ disabled: !M.value }
|
|
696
696
|
]),
|
|
697
|
-
style:
|
|
698
|
-
onClick: n[1] ||= (e) =>
|
|
699
|
-
}, null, 6)), [[
|
|
700
|
-
content:
|
|
697
|
+
style: b(F()),
|
|
698
|
+
onClick: n[1] ||= (e) => M.value ? z() : void 0
|
|
699
|
+
}, null, 6)), [[N(d), {
|
|
700
|
+
content: P(N(K)("新增会话")),
|
|
701
701
|
boundary: "parent"
|
|
702
|
-
}]]) :
|
|
703
|
-
|
|
704
|
-
|
|
702
|
+
}]]) : a("v-if", !0),
|
|
703
|
+
a(" 历史会话按钮 "),
|
|
704
|
+
i.showHistoryIcon && e.enableChatSession !== !1 ? R((w(), o("i", {
|
|
705
705
|
key: 1,
|
|
706
706
|
ref_key: "historyIconRef",
|
|
707
707
|
ref: p,
|
|
708
|
-
class:
|
|
708
|
+
class: v([
|
|
709
709
|
"bkai-icon",
|
|
710
710
|
"bkai-history",
|
|
711
|
-
{ disabled: !
|
|
711
|
+
{ disabled: !M.value }
|
|
712
712
|
]),
|
|
713
|
-
style:
|
|
714
|
-
onClick: n[2] ||= (e) =>
|
|
715
|
-
}, null, 6)), [[
|
|
716
|
-
content:
|
|
713
|
+
style: b(F()),
|
|
714
|
+
onClick: n[2] ||= (e) => M.value ? ee(e) : void 0
|
|
715
|
+
}, null, 6)), [[N(d), {
|
|
716
|
+
content: P(N(K)("历史会话")),
|
|
717
717
|
boundary: "parent"
|
|
718
|
-
}]]) :
|
|
719
|
-
e.chatGroup?.enabled ?
|
|
718
|
+
}]]) : a("v-if", !0),
|
|
719
|
+
e.chatGroup?.enabled ? R((w(), o("i", {
|
|
720
720
|
key: 2,
|
|
721
721
|
class: "bkai-icon bkai-zhushou",
|
|
722
|
-
onClick:
|
|
723
|
-
}, null, 512)), [[
|
|
724
|
-
content:
|
|
722
|
+
onClick: te
|
|
723
|
+
}, null, 512)), [[N(d), {
|
|
724
|
+
content: N(K)("转人工"),
|
|
725
725
|
boundary: "parent"
|
|
726
|
-
}]]) :
|
|
727
|
-
|
|
726
|
+
}]]) : a("v-if", !0),
|
|
727
|
+
i.showCompressionIcon ? R((w(), o("i", {
|
|
728
728
|
key: 3,
|
|
729
|
-
class:
|
|
730
|
-
onClick: n[3] ||= (e) =>
|
|
731
|
-
}, null, 2)), [[
|
|
732
|
-
content:
|
|
729
|
+
class: v(["bkai-icon", k.value]),
|
|
730
|
+
onClick: n[3] ||= (e) => c("toggle-compression")
|
|
731
|
+
}, null, 2)), [[N(d), {
|
|
732
|
+
content: A.value,
|
|
733
733
|
boundary: "parent"
|
|
734
|
-
}]]) :
|
|
735
|
-
|
|
734
|
+
}]]) : a("v-if", !0),
|
|
735
|
+
R(s("i", {
|
|
736
736
|
class: "bkai-icon bkai-close-line-2",
|
|
737
|
-
onClick: n[4] ||= (e) =>
|
|
738
|
-
}, null, 512), [[
|
|
739
|
-
content:
|
|
737
|
+
onClick: n[4] ||= (e) => c("close")
|
|
738
|
+
}, null, 512), [[N(d), {
|
|
739
|
+
content: N(K)("关闭"),
|
|
740
740
|
boundary: "parent"
|
|
741
741
|
}]])
|
|
742
742
|
])], 2));
|
|
743
743
|
}
|
|
744
|
-
}), [["__scopeId", "data-v-3cf2263c"]]),
|
|
744
|
+
}), [["__scopeId", "data-v-3cf2263c"]]), Qe = class {
|
|
745
745
|
_isGenerating;
|
|
746
746
|
_isStopLoading;
|
|
747
747
|
agentModule;
|
|
@@ -758,7 +758,7 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
758
758
|
this.eventEmitter?.emit(e, t);
|
|
759
759
|
}
|
|
760
760
|
constructor(e, t, n = null, r = null, i = {}) {
|
|
761
|
-
this.agentModule = e, this.messageModule = t, this.sessionModule = n, this.eventEmitter = r, this.config = i, this._isGenerating =
|
|
761
|
+
this.agentModule = e, this.messageModule = t, this.sessionModule = n, this.eventEmitter = r, this.config = i, this._isGenerating = E(!1), this._isStopLoading = E(!1);
|
|
762
762
|
}
|
|
763
763
|
get isGenerating() {
|
|
764
764
|
return this._isGenerating;
|
|
@@ -812,7 +812,7 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
812
812
|
async regenerateFromAIMessages(e, t) {
|
|
813
813
|
try {
|
|
814
814
|
if (!e || e.length === 0) throw Error("No AI messages provided");
|
|
815
|
-
let n = this.messages.value, r =
|
|
815
|
+
let n = this.messages.value, r = ge(n, e[0]);
|
|
816
816
|
if (!r) throw Error("No user message found before AI messages");
|
|
817
817
|
let i = r.id;
|
|
818
818
|
if (i === void 0) throw Error("User message has no id");
|
|
@@ -829,7 +829,7 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
829
829
|
let n = this.messages.value, r = n.findIndex((t) => String(t.id) === e);
|
|
830
830
|
if (r === -1) throw Error(`Message not found: ${e}`);
|
|
831
831
|
let i = n[r];
|
|
832
|
-
if (i.role !==
|
|
832
|
+
if (i.role !== fe.User) throw Error("Can only regenerate from user messages");
|
|
833
833
|
let a = n.slice(r), o = typeof i.content == "string" ? i.content : JSON.stringify(i.content), s = i.property;
|
|
834
834
|
this._isGenerating.value = !0;
|
|
835
835
|
let c = this.messageModule.deleteMessages(a);
|
|
@@ -847,7 +847,7 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
847
847
|
try {
|
|
848
848
|
let i = this.messages.value, a = i.findIndex((t) => String(t.id) === e);
|
|
849
849
|
if (a === -1) throw Error(`Message not found: ${e}`);
|
|
850
|
-
if (i[a].role !==
|
|
850
|
+
if (i[a].role !== fe.User) throw Error("Can only resend user messages");
|
|
851
851
|
let o = i.slice(a);
|
|
852
852
|
this._isGenerating.value = !0;
|
|
853
853
|
let s = this.messageModule.deleteMessages(o);
|
|
@@ -896,7 +896,7 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
896
896
|
this._isStopLoading.value = !1;
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
|
-
},
|
|
899
|
+
}, $e = class {
|
|
900
900
|
agentModule;
|
|
901
901
|
config;
|
|
902
902
|
eventEmitter;
|
|
@@ -1025,7 +1025,7 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
1025
1025
|
}), e;
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
|
-
},
|
|
1028
|
+
}, et = class {
|
|
1029
1029
|
messageModule;
|
|
1030
1030
|
sessionModule;
|
|
1031
1031
|
constructor(e, t) {
|
|
@@ -1042,7 +1042,7 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
1042
1042
|
userMessageIds: e.map((e) => String(e.id))
|
|
1043
1043
|
};
|
|
1044
1044
|
}
|
|
1045
|
-
},
|
|
1045
|
+
}, tt = class {
|
|
1046
1046
|
_agentShortcuts;
|
|
1047
1047
|
_effectiveShortcuts;
|
|
1048
1048
|
_propsShortcuts;
|
|
@@ -1051,7 +1051,7 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
1051
1051
|
this.eventEmitter?.emit(e, t);
|
|
1052
1052
|
}
|
|
1053
1053
|
constructor(e = null, t = []) {
|
|
1054
|
-
this._propsShortcuts =
|
|
1054
|
+
this._propsShortcuts = E(t), this._agentShortcuts = E([]), this.eventEmitter = e, this._effectiveShortcuts = n(() => this._propsShortcuts.value.length > 0 ? this._propsShortcuts.value : this._agentShortcuts.value.length > 0 ? this._agentShortcuts.value : []);
|
|
1055
1055
|
}
|
|
1056
1056
|
get count() {
|
|
1057
1057
|
return this._effectiveShortcuts.value.length;
|
|
@@ -1099,7 +1099,7 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
1099
1099
|
setShortcuts(e) {
|
|
1100
1100
|
this._propsShortcuts.value = e;
|
|
1101
1101
|
}
|
|
1102
|
-
},
|
|
1102
|
+
}, nt = class {
|
|
1103
1103
|
_isCompressed;
|
|
1104
1104
|
_isDraggingOrResizing;
|
|
1105
1105
|
_nimbusMinimized;
|
|
@@ -1112,7 +1112,7 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
1112
1112
|
listeners;
|
|
1113
1113
|
onceListeners;
|
|
1114
1114
|
constructor(e = {}) {
|
|
1115
|
-
this.config = e, this.listeners = /* @__PURE__ */ new Map(), this.onceListeners = /* @__PURE__ */ new Map(), this.debugMode = e.debug ?? !1, this.cleanupFunctions = [], this._panelVisible =
|
|
1115
|
+
this.config = e, this.listeners = /* @__PURE__ */ new Map(), this.onceListeners = /* @__PURE__ */ new Map(), this.debugMode = e.debug ?? !1, this.cleanupFunctions = [], this._panelVisible = E(e.initialPanelVisible ?? !1), this._nimbusMinimized = E(e.initialNimbusMinimized ?? !1), this._isDraggingOrResizing = E(!1), this._isCompressed = E(!1), this._positionAndSize = E({
|
|
1116
1116
|
x: 0,
|
|
1117
1117
|
y: 0,
|
|
1118
1118
|
width: 400,
|
|
@@ -1314,12 +1314,12 @@ var Ue = { class: "left-section" }, We = { class: "logo" }, Ge = ["src"], Ke = {
|
|
|
1314
1314
|
};
|
|
1315
1315
|
}
|
|
1316
1316
|
};
|
|
1317
|
-
function
|
|
1318
|
-
return new
|
|
1317
|
+
function rt(e) {
|
|
1318
|
+
return new nt(e);
|
|
1319
1319
|
}
|
|
1320
1320
|
//#endregion
|
|
1321
1321
|
//#region src/manager/event-types.ts
|
|
1322
|
-
var
|
|
1322
|
+
var it = {
|
|
1323
1323
|
"panel-show": "show",
|
|
1324
1324
|
"panel-hide": "close",
|
|
1325
1325
|
"panel-toggle": null,
|
|
@@ -1368,7 +1368,7 @@ var nt = {
|
|
|
1368
1368
|
"agent-info-loaded": null,
|
|
1369
1369
|
error: null
|
|
1370
1370
|
};
|
|
1371
|
-
function
|
|
1371
|
+
function at(e, t) {
|
|
1372
1372
|
switch (e) {
|
|
1373
1373
|
case "send-message": return [t.content];
|
|
1374
1374
|
case "rename": return [t.newName];
|
|
@@ -1398,13 +1398,13 @@ function rt(e, t) {
|
|
|
1398
1398
|
}
|
|
1399
1399
|
//#endregion
|
|
1400
1400
|
//#region src/manager/ui/ui-state-manager.ts
|
|
1401
|
-
var
|
|
1401
|
+
var ot = class {
|
|
1402
1402
|
_selectedMessageIds;
|
|
1403
1403
|
_isSelectionMode;
|
|
1404
1404
|
_editingSessionCode;
|
|
1405
1405
|
_loadingStates;
|
|
1406
1406
|
constructor() {
|
|
1407
|
-
this._selectedMessageIds =
|
|
1407
|
+
this._selectedMessageIds = E(/* @__PURE__ */ new Set()), this._isSelectionMode = E(!1), this._editingSessionCode = E(null), this._loadingStates = T({});
|
|
1408
1408
|
}
|
|
1409
1409
|
get isSelectionMode() {
|
|
1410
1410
|
return this._isSelectionMode;
|
|
@@ -1474,8 +1474,8 @@ var it = class {
|
|
|
1474
1474
|
};
|
|
1475
1475
|
//#endregion
|
|
1476
1476
|
//#region src/components/composables/use-chatbot-init.ts
|
|
1477
|
-
function
|
|
1478
|
-
let { props: t, emit: n, scrollToBottom: r } = e, i =
|
|
1477
|
+
function st(e) {
|
|
1478
|
+
let { props: t, emit: n, scrollToBottom: r } = e, i = A(null), a = A(null), o = A(null), s = A(null), c = E(!1), l = E(!t.chatHelper), u = E(null), d = () => t.chatHelper ? !t.chatHelper.agent || !t.chatHelper.session || !t.chatHelper.message ? {
|
|
1479
1479
|
valid: !1,
|
|
1480
1480
|
error: "[ChatBot] Invalid chatHelper: missing required modules (agent, session, message)"
|
|
1481
1481
|
} : { valid: !0 } : t.url ? { valid: !0 } : {
|
|
@@ -1485,7 +1485,7 @@ function at(e) {
|
|
|
1485
1485
|
let e = d();
|
|
1486
1486
|
if (!e.valid) return console.error(e.error), u.value = Error(e.error), null;
|
|
1487
1487
|
if (t.chatHelper) return t.chatHelper;
|
|
1488
|
-
let i = new
|
|
1488
|
+
let i = new W({
|
|
1489
1489
|
onStart: () => {
|
|
1490
1490
|
n("receive-start");
|
|
1491
1491
|
},
|
|
@@ -1498,9 +1498,9 @@ function at(e) {
|
|
|
1498
1498
|
onError: (e) => {
|
|
1499
1499
|
n("error", e);
|
|
1500
1500
|
}
|
|
1501
|
-
}), a =
|
|
1501
|
+
}), a = me({
|
|
1502
1502
|
requestData: {
|
|
1503
|
-
urlPrefix:
|
|
1503
|
+
urlPrefix: be(t.url),
|
|
1504
1504
|
headers: t.requestOptions?.headers,
|
|
1505
1505
|
data: t.requestOptions?.data
|
|
1506
1506
|
},
|
|
@@ -1517,16 +1517,16 @@ function at(e) {
|
|
|
1517
1517
|
c.value = !1, u.value = null, l.value = !t.chatHelper, await p(r, d), i.value = null, a.value = null, o.value = null, s.value = null;
|
|
1518
1518
|
let h = f();
|
|
1519
1519
|
if (!h) return;
|
|
1520
|
-
let g = new
|
|
1520
|
+
let g = new $e(h.session, h.agent, null, {
|
|
1521
1521
|
enableChatSession: !0,
|
|
1522
1522
|
autoSwitchToInitialSession: !!t.sessionCode,
|
|
1523
1523
|
loadRecentSessionOnMount: t.autoLoad,
|
|
1524
1524
|
initialSessionCode: t.sessionCode
|
|
1525
|
-
}), _ = new
|
|
1525
|
+
}), _ = new Qe(h.agent, h.message, h.session, null, {
|
|
1526
1526
|
openingRemark: t.helloText,
|
|
1527
1527
|
predefinedQuestions: t.prompts,
|
|
1528
1528
|
placeholder: t.placeholder
|
|
1529
|
-
}), v = new
|
|
1529
|
+
}), v = new tt(null, t.shortcuts || []);
|
|
1530
1530
|
i.value = h, a.value = g, o.value = _, s.value = v;
|
|
1531
1531
|
try {
|
|
1532
1532
|
if (l.value && (await Promise.all([h.agent.getAgentInfo(), h.session.getSessions()]), e !== m || (await g.loadRecentSession({ skipLoadSessions: !0 }), e !== m))) return;
|
|
@@ -1536,7 +1536,7 @@ function at(e) {
|
|
|
1536
1536
|
console.error("Failed to initialize ChatBot:", t), u.value = t, n("error", t);
|
|
1537
1537
|
}
|
|
1538
1538
|
};
|
|
1539
|
-
return
|
|
1539
|
+
return I([() => t.url, () => t.chatHelper], () => h(), { immediate: !0 }), x(() => {
|
|
1540
1540
|
p(i.value, l.value);
|
|
1541
1541
|
}), {
|
|
1542
1542
|
chatHelper: i,
|
|
@@ -1550,8 +1550,8 @@ function at(e) {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
//#endregion
|
|
1552
1552
|
//#region src/components/composables/use-chatbot-state.ts
|
|
1553
|
-
function
|
|
1554
|
-
let { props: t, chatHelper: r, chatBusinessManager: i, sessionBusinessManager: a, shortcutManager: o, isStandaloneMode: s, isInitialized: c, selectedShortcut: l } = e, u = n(() => i.value?.isStopLoading.value ?
|
|
1553
|
+
function ct(e) {
|
|
1554
|
+
let { props: t, chatHelper: r, chatBusinessManager: i, sessionBusinessManager: a, shortcutManager: o, isStandaloneMode: s, isInitialized: c, selectedShortcut: l } = e, u = n(() => i.value?.isStopLoading.value ? V.StopLoading : ((t.chatHelper || r.value)?.agent)?.isChatting?.value ? V.Streaming : V.Complete), d = n(() => u.value === V.Streaming ? H.Disabled : void 0), f = n(() => i.value?.messages.value ?? []), p = n(() => i.value?.isMessagesLoading.value ?? !1);
|
|
1555
1555
|
return {
|
|
1556
1556
|
messageStatus: u,
|
|
1557
1557
|
messageToolsStatus: d,
|
|
@@ -1573,8 +1573,8 @@ function ot(e) {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
//#endregion
|
|
1575
1575
|
//#region src/components/composables/use-message-sender.ts
|
|
1576
|
-
function
|
|
1577
|
-
let { emit: t, chatHelper: n, chatBusinessManager: r, selectedShortcut: i, selectedResources: a } = e, o =
|
|
1576
|
+
function lt(e) {
|
|
1577
|
+
let { emit: t, chatHelper: n, chatBusinessManager: r, selectedShortcut: i, selectedResources: a } = e, o = A([[]]), s = A(""), c = (e, t) => {
|
|
1578
1578
|
o.value = e, a.value = t;
|
|
1579
1579
|
}, l = async (e, i = {}) => {
|
|
1580
1580
|
if (!r.value || !n.value) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
|
|
@@ -1616,15 +1616,15 @@ function st(e) {
|
|
|
1616
1616
|
}
|
|
1617
1617
|
//#endregion
|
|
1618
1618
|
//#region src/components/composables/use-share-selection.ts
|
|
1619
|
-
function
|
|
1619
|
+
function ut(e) {
|
|
1620
1620
|
let { emit: t, chatHelper: n, isStandaloneMode: r } = e, i = async (e) => {
|
|
1621
1621
|
if (!(!n.value || e.length === 0)) try {
|
|
1622
|
-
await
|
|
1622
|
+
await xe((await new et(n.value.message, n.value.session).shareMessages(e)).shareUrl), oe({
|
|
1623
1623
|
message: "分享链接已复制到剪贴板",
|
|
1624
1624
|
theme: "success"
|
|
1625
1625
|
});
|
|
1626
1626
|
} catch (e) {
|
|
1627
|
-
console.error("[ChatBot] Failed to share messages:", e),
|
|
1627
|
+
console.error("[ChatBot] Failed to share messages:", e), oe({
|
|
1628
1628
|
message: "分享失败,请重试",
|
|
1629
1629
|
theme: "error"
|
|
1630
1630
|
});
|
|
@@ -1636,7 +1636,7 @@ function ct(e) {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
//#endregion
|
|
1638
1638
|
//#region src/components/composables/use-shortcuts.ts
|
|
1639
|
-
function
|
|
1639
|
+
function dt(e) {
|
|
1640
1640
|
let { props: t, emit: r, shortcutManager: i, doSendMessage: a, selectedShortcut: o } = e, s = n(() => i.value?.effectiveShortcuts.value ?? []), c = (e, t) => {
|
|
1641
1641
|
let n = e, r;
|
|
1642
1642
|
if (r = n.enable_fill_back && n.fill_back_component_key ? n.fill_back_component_key : n.components?.find((e) => e.fillBack)?.key, r && t) {
|
|
@@ -1690,9 +1690,9 @@ function lt(e) {
|
|
|
1690
1690
|
}, f = () => {
|
|
1691
1691
|
o.value = null;
|
|
1692
1692
|
};
|
|
1693
|
-
return
|
|
1693
|
+
return I(() => t.shortcuts, (e) => {
|
|
1694
1694
|
i.value?.setShortcuts(e || []);
|
|
1695
|
-
}, { immediate: !0 }),
|
|
1695
|
+
}, { immediate: !0 }), I(() => e.chatHelper.value?.agent.info.value?.conversationSettings?.commands, (e) => {
|
|
1696
1696
|
e && i.value?.setAgentShortcuts(e);
|
|
1697
1697
|
}, { immediate: !0 }), {
|
|
1698
1698
|
effectiveShortcuts: s,
|
|
@@ -1730,14 +1730,14 @@ function lt(e) {
|
|
|
1730
1730
|
}
|
|
1731
1731
|
//#endregion
|
|
1732
1732
|
//#region src/components/composables/use-tool-actions.ts
|
|
1733
|
-
function
|
|
1733
|
+
function ft(e) {
|
|
1734
1734
|
let { emit: t, chatHelper: n, chatBusinessManager: r, cite: i, focusInput: a, scrollToBottom: o, getShortcutFromMessage: s, buildShortcutProperty: c } = e, l = async (e) => {
|
|
1735
1735
|
if (!r.value || !n.value) {
|
|
1736
1736
|
console.error("[ChatBot] Cannot delete messages: chatBusinessManager not initialized");
|
|
1737
1737
|
return;
|
|
1738
1738
|
}
|
|
1739
1739
|
try {
|
|
1740
|
-
let t = r.value.messages.value, i =
|
|
1740
|
+
let t = r.value.messages.value, i = ge(t, e[0]);
|
|
1741
1741
|
if (!i) {
|
|
1742
1742
|
console.error("[ChatBot] No user message found before AI messages");
|
|
1743
1743
|
return;
|
|
@@ -1776,7 +1776,7 @@ function ut(e) {
|
|
|
1776
1776
|
let a = [];
|
|
1777
1777
|
for (let e = i + 1; e < t.length; e++) {
|
|
1778
1778
|
let n = t[e];
|
|
1779
|
-
if (n.role ===
|
|
1779
|
+
if (n.role === B.User) break;
|
|
1780
1780
|
a.push(n);
|
|
1781
1781
|
}
|
|
1782
1782
|
let o = [e, ...a];
|
|
@@ -1788,7 +1788,7 @@ function ut(e) {
|
|
|
1788
1788
|
return {
|
|
1789
1789
|
handleAgentAction: async (e, t) => {
|
|
1790
1790
|
if (e.id === "cite") {
|
|
1791
|
-
i.value = t.filter((e) => e.role !==
|
|
1791
|
+
i.value = t.filter((e) => e.role !== B.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"), a();
|
|
1792
1792
|
return;
|
|
1793
1793
|
}
|
|
1794
1794
|
if (e.id === "rebuild") {
|
|
@@ -1819,7 +1819,7 @@ function ut(e) {
|
|
|
1819
1819
|
console.error("[ChatBot] Cannot submit feedback: no active session");
|
|
1820
1820
|
return;
|
|
1821
1821
|
}
|
|
1822
|
-
let c =
|
|
1822
|
+
let c = _e(r.value?.messages.value || [], i[0]);
|
|
1823
1823
|
if (c === void 0) {
|
|
1824
1824
|
console.error("[ChatBot] Cannot submit feedback: no user message found");
|
|
1825
1825
|
return;
|
|
@@ -1907,7 +1907,7 @@ function ut(e) {
|
|
|
1907
1907
|
}
|
|
1908
1908
|
//#endregion
|
|
1909
1909
|
//#region src/components/chat-bot.vue
|
|
1910
|
-
var
|
|
1910
|
+
var pt = /* @__PURE__ */ d({
|
|
1911
1911
|
__name: "chat-bot",
|
|
1912
1912
|
props: {
|
|
1913
1913
|
autoLoad: {
|
|
@@ -1954,140 +1954,140 @@ var dt = /* @__PURE__ */ u({
|
|
|
1954
1954
|
"stop"
|
|
1955
1955
|
],
|
|
1956
1956
|
setup(e, { expose: t, emit: r }) {
|
|
1957
|
-
let i = e,
|
|
1958
|
-
await
|
|
1957
|
+
let i = e, a = r, s = E(), l = E(), d = E(), p = A([]), m = E(null), g = async () => {
|
|
1958
|
+
await _(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
1959
1959
|
}, x = () => {
|
|
1960
|
-
|
|
1961
|
-
}, { chatHelper:
|
|
1960
|
+
d.value?.focus?.();
|
|
1961
|
+
}, { chatHelper: S, isStandaloneMode: C, isInitialized: T, initError: D, chatBusinessManager: O, sessionBusinessManager: j, shortcutManager: M } = st({
|
|
1962
1962
|
props: i,
|
|
1963
|
-
emit:
|
|
1964
|
-
scrollToBottom:
|
|
1965
|
-
}), { userInput: P, cite:
|
|
1966
|
-
emit:
|
|
1967
|
-
chatHelper:
|
|
1968
|
-
chatBusinessManager:
|
|
1969
|
-
selectedShortcut:
|
|
1970
|
-
selectedResources:
|
|
1971
|
-
}), { handleSelectShortcut:
|
|
1963
|
+
emit: a,
|
|
1964
|
+
scrollToBottom: g
|
|
1965
|
+
}), { userInput: P, cite: F, handleUpdateModelValue: I, doSendMessage: R, handleSendMessage: z, handleUpload: ee, handleStopSending: ne, stopGeneration: B } = lt({
|
|
1966
|
+
emit: a,
|
|
1967
|
+
chatHelper: S,
|
|
1968
|
+
chatBusinessManager: O,
|
|
1969
|
+
selectedShortcut: m,
|
|
1970
|
+
selectedResources: p
|
|
1971
|
+
}), { handleSelectShortcut: V, handleCloseShortcut: H, handleShortcutSubmit: ie, selectShortcutWithText: ae, getShortcutFromMessage: oe, buildShortcutProperty: U, sendShortcutDirectly: se } = dt({
|
|
1972
1972
|
props: i,
|
|
1973
|
-
emit:
|
|
1974
|
-
chatHelper:
|
|
1975
|
-
shortcutManager:
|
|
1976
|
-
doSendMessage:
|
|
1977
|
-
selectedShortcut:
|
|
1978
|
-
}), { messageStatus:
|
|
1973
|
+
emit: a,
|
|
1974
|
+
chatHelper: S,
|
|
1975
|
+
shortcutManager: M,
|
|
1976
|
+
doSendMessage: R,
|
|
1977
|
+
selectedShortcut: m
|
|
1978
|
+
}), { messageStatus: ce, messageToolsStatus: le, messages: ue, isMessagesLoading: de, isGenerating: W, currentSession: fe, isWelcomeState: pe, openingRemark: me, effectiveResources: he, effectivePrompts: ge, effectiveSupportUpload: _e, chatbotStyle: ve, filteredShortcuts: ye } = ct({
|
|
1979
1979
|
props: i,
|
|
1980
|
-
chatHelper:
|
|
1981
|
-
chatBusinessManager:
|
|
1982
|
-
sessionBusinessManager:
|
|
1983
|
-
shortcutManager:
|
|
1984
|
-
isStandaloneMode:
|
|
1985
|
-
isInitialized:
|
|
1986
|
-
selectedShortcut:
|
|
1987
|
-
}), { handleAgentAction:
|
|
1988
|
-
emit:
|
|
1989
|
-
chatHelper:
|
|
1990
|
-
chatBusinessManager:
|
|
1991
|
-
cite:
|
|
1980
|
+
chatHelper: S,
|
|
1981
|
+
chatBusinessManager: O,
|
|
1982
|
+
sessionBusinessManager: j,
|
|
1983
|
+
shortcutManager: M,
|
|
1984
|
+
isStandaloneMode: C,
|
|
1985
|
+
isInitialized: T,
|
|
1986
|
+
selectedShortcut: m
|
|
1987
|
+
}), { handleAgentAction: be, handleAgentFeedback: xe, handleUserAction: Se, handleUserInputConfirm: Ce, handleUserShortcutConfirm: G, handleStopStreaming: we } = ft({
|
|
1988
|
+
emit: a,
|
|
1989
|
+
chatHelper: S,
|
|
1990
|
+
chatBusinessManager: O,
|
|
1991
|
+
cite: F,
|
|
1992
1992
|
focusInput: x,
|
|
1993
|
-
scrollToBottom:
|
|
1994
|
-
getShortcutFromMessage:
|
|
1995
|
-
buildShortcutProperty:
|
|
1996
|
-
}), Te = n(() => !
|
|
1997
|
-
emit:
|
|
1998
|
-
chatHelper:
|
|
1999
|
-
isStandaloneMode:
|
|
2000
|
-
}),
|
|
2001
|
-
|
|
2002
|
-
},
|
|
1993
|
+
scrollToBottom: g,
|
|
1994
|
+
getShortcutFromMessage: oe,
|
|
1995
|
+
buildShortcutProperty: U
|
|
1996
|
+
}), Te = n(() => !T.value || de.value), { handleConfirmShare: Ee } = ut({
|
|
1997
|
+
emit: a,
|
|
1998
|
+
chatHelper: S,
|
|
1999
|
+
isStandaloneMode: C
|
|
2000
|
+
}), De = (e) => {
|
|
2001
|
+
a("execution-panel-change", e);
|
|
2002
|
+
}, K = async (e) => {
|
|
2003
2003
|
let t = e.data?.props;
|
|
2004
|
-
if (t?.task_id != null && t?.node_id) return
|
|
2004
|
+
if (t?.task_id != null && t?.node_id) return S.value?.message.getFlowAgentTaskNodeInfo(t.task_id, t.node_id);
|
|
2005
2005
|
};
|
|
2006
2006
|
return t({
|
|
2007
|
-
sendMessage: (e) =>
|
|
2008
|
-
stopGeneration:
|
|
2007
|
+
sendMessage: (e) => z(e, [[]]),
|
|
2008
|
+
stopGeneration: B,
|
|
2009
2009
|
switchSession: async (e) => {
|
|
2010
|
-
if (!
|
|
2010
|
+
if (!j.value) {
|
|
2011
2011
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
2012
2012
|
return;
|
|
2013
2013
|
}
|
|
2014
2014
|
try {
|
|
2015
|
-
await
|
|
2015
|
+
await j.value.switchSession(e), a("session-switched", j.value.currentSession.value);
|
|
2016
2016
|
} catch (e) {
|
|
2017
|
-
console.error("Failed to switch session:", e),
|
|
2017
|
+
console.error("Failed to switch session:", e), a("error", e);
|
|
2018
2018
|
}
|
|
2019
2019
|
},
|
|
2020
|
-
messages:
|
|
2021
|
-
currentSession:
|
|
2022
|
-
isGenerating:
|
|
2023
|
-
getChatHelper: () =>
|
|
2020
|
+
messages: ue,
|
|
2021
|
+
currentSession: fe,
|
|
2022
|
+
isGenerating: W,
|
|
2023
|
+
getChatHelper: () => S.value,
|
|
2024
2024
|
setCiteText: (e) => {
|
|
2025
|
-
|
|
2025
|
+
F.value = e;
|
|
2026
2026
|
},
|
|
2027
2027
|
focusInput: x,
|
|
2028
|
-
enterShareMode: () =>
|
|
2029
|
-
exitShareMode: () =>
|
|
2028
|
+
enterShareMode: () => l.value?.enterShareMode(),
|
|
2029
|
+
exitShareMode: () => l.value?.exitShareMode(),
|
|
2030
2030
|
selectShortcut: (e, t) => {
|
|
2031
|
-
|
|
2031
|
+
ae(e, t);
|
|
2032
2032
|
},
|
|
2033
|
-
sendShortcut: (e, t) =>
|
|
2034
|
-
}), (t, n) => (
|
|
2035
|
-
class:
|
|
2033
|
+
sendShortcut: (e, t) => se(e, t)
|
|
2034
|
+
}), (t, n) => (w(), o("div", {
|
|
2035
|
+
class: v([
|
|
2036
2036
|
"ai-chatbot",
|
|
2037
2037
|
i.extCls,
|
|
2038
|
-
{ "welcome-state":
|
|
2038
|
+
{ "welcome-state": N(pe) }
|
|
2039
2039
|
]),
|
|
2040
|
-
style:
|
|
2041
|
-
}, [
|
|
2040
|
+
style: b(N(ve))
|
|
2041
|
+
}, [u(N(te), {
|
|
2042
2042
|
ref_key: "chatContainerRef",
|
|
2043
|
-
ref:
|
|
2044
|
-
cite:
|
|
2045
|
-
"onUpdate:cite": n[0] ||= (e) =>
|
|
2046
|
-
"selected-shortcut":
|
|
2047
|
-
"onUpdate:selectedShortcut": n[1] ||= (e) =>
|
|
2043
|
+
ref: l,
|
|
2044
|
+
cite: N(F),
|
|
2045
|
+
"onUpdate:cite": n[0] ||= (e) => h(F) ? F.value = e : null,
|
|
2046
|
+
"selected-shortcut": m.value,
|
|
2047
|
+
"onUpdate:selectedShortcut": n[1] ||= (e) => m.value = e,
|
|
2048
2048
|
"chat-loading": Te.value,
|
|
2049
2049
|
"common-tippy-options": e.messageToolsTippyOptions,
|
|
2050
|
-
"message-status":
|
|
2051
|
-
"message-tools-status":
|
|
2052
|
-
messages:
|
|
2053
|
-
"model-value":
|
|
2054
|
-
"on-agent-action":
|
|
2055
|
-
"on-agent-feedback":
|
|
2056
|
-
"on-custom-tab-change":
|
|
2057
|
-
"on-send-message":
|
|
2058
|
-
"on-stop-sending":
|
|
2059
|
-
"on-upload":
|
|
2060
|
-
"on-user-action":
|
|
2061
|
-
"on-user-input-confirm":
|
|
2062
|
-
"on-user-shortcut-confirm":
|
|
2063
|
-
"opening-remark":
|
|
2050
|
+
"message-status": N(ce),
|
|
2051
|
+
"message-tools-status": N(le),
|
|
2052
|
+
messages: N(ue),
|
|
2053
|
+
"model-value": N(P),
|
|
2054
|
+
"on-agent-action": N(be),
|
|
2055
|
+
"on-agent-feedback": N(xe),
|
|
2056
|
+
"on-custom-tab-change": K,
|
|
2057
|
+
"on-send-message": N(z),
|
|
2058
|
+
"on-stop-sending": N(ne),
|
|
2059
|
+
"on-upload": N(ee),
|
|
2060
|
+
"on-user-action": N(Se),
|
|
2061
|
+
"on-user-input-confirm": N(Ce),
|
|
2062
|
+
"on-user-shortcut-confirm": N(G),
|
|
2063
|
+
"opening-remark": N(me),
|
|
2064
2064
|
placeholder: i.placeholder,
|
|
2065
2065
|
placement: "left",
|
|
2066
|
-
prompts:
|
|
2066
|
+
prompts: N(ge),
|
|
2067
2067
|
"resize-props": i.resizeProps,
|
|
2068
|
-
resources:
|
|
2069
|
-
"shortcut-id":
|
|
2070
|
-
shortcuts:
|
|
2071
|
-
"support-upload":
|
|
2072
|
-
onCollapseChange:
|
|
2073
|
-
onConfirmShare:
|
|
2074
|
-
onDeleteShortcut:
|
|
2075
|
-
onSelectShortcut:
|
|
2076
|
-
onShortcutClose:
|
|
2077
|
-
onShortcutSubmit:
|
|
2078
|
-
onStopStreaming:
|
|
2079
|
-
"onUpdate:modelValue":
|
|
2068
|
+
resources: N(he),
|
|
2069
|
+
"shortcut-id": m.value?.id,
|
|
2070
|
+
shortcuts: N(ye),
|
|
2071
|
+
"support-upload": N(_e),
|
|
2072
|
+
onCollapseChange: De,
|
|
2073
|
+
onConfirmShare: N(Ee),
|
|
2074
|
+
onDeleteShortcut: N(H),
|
|
2075
|
+
onSelectShortcut: N(V),
|
|
2076
|
+
onShortcutClose: N(H),
|
|
2077
|
+
onShortcutSubmit: N(ie),
|
|
2078
|
+
onStopStreaming: N(we),
|
|
2079
|
+
"onUpdate:modelValue": N(I)
|
|
2080
2080
|
}, {
|
|
2081
|
-
message:
|
|
2081
|
+
message: L(({ message: n, messageToolsStatus: r }) => [u(N(re), {
|
|
2082
2082
|
message: n,
|
|
2083
2083
|
"message-tools-status": r,
|
|
2084
|
-
"on-action": (e) =>
|
|
2085
|
-
"on-input-confirm": (e, t) =>
|
|
2086
|
-
"on-shortcut-confirm": (e) =>
|
|
2084
|
+
"on-action": (e) => N(Se)(e, n),
|
|
2085
|
+
"on-input-confirm": (e, t) => N(Ce)(n, e, t),
|
|
2086
|
+
"on-shortcut-confirm": (e) => N(G)(n, e),
|
|
2087
2087
|
"tippy-options": e.messageToolsTippyOptions
|
|
2088
|
-
},
|
|
2088
|
+
}, c({ _: 2 }, [t.$slots.codeHeader ? {
|
|
2089
2089
|
name: "codeHeader",
|
|
2090
|
-
fn:
|
|
2090
|
+
fn: L((e) => [k(t.$slots, "codeHeader", y(f(e)))]),
|
|
2091
2091
|
key: "0"
|
|
2092
2092
|
} : void 0]), 1032, [
|
|
2093
2093
|
"message",
|
|
@@ -2103,10 +2103,10 @@ var dt = /* @__PURE__ */ u({
|
|
|
2103
2103
|
}), J = /* @__PURE__ */ function(e) {
|
|
2104
2104
|
return e.ERROR = "error", e.IDLE = "idle", e.LOADING_AGENT = "loading_agent", e.READY = "ready", e;
|
|
2105
2105
|
}({});
|
|
2106
|
-
function
|
|
2107
|
-
let { url: t, requestOptions: r, autoInit: i = !0, protocolCallbacks: a } = e, o =
|
|
2106
|
+
function mt(e) {
|
|
2107
|
+
let { url: t, requestOptions: r, autoInit: i = !0, protocolCallbacks: a } = e, o = M(t);
|
|
2108
2108
|
if (!o) throw Error("[useChatBootstrap] url is required");
|
|
2109
|
-
let s =
|
|
2109
|
+
let s = E(J.IDLE), c = E(null), l = E(!1), u = /* @__PURE__ */ new Map(), d = new W({
|
|
2110
2110
|
onStart: () => {
|
|
2111
2111
|
a?.onStart?.();
|
|
2112
2112
|
},
|
|
@@ -2119,7 +2119,7 @@ function ft(e) {
|
|
|
2119
2119
|
onError: (e) => {
|
|
2120
2120
|
a?.onError?.(e);
|
|
2121
2121
|
}
|
|
2122
|
-
}), f =
|
|
2122
|
+
}), f = me({
|
|
2123
2123
|
requestData: {
|
|
2124
2124
|
urlPrefix: o,
|
|
2125
2125
|
headers: r?.headers,
|
|
@@ -2144,7 +2144,7 @@ function ft(e) {
|
|
|
2144
2144
|
let t = f.http;
|
|
2145
2145
|
t?.updateConfig ? t.updateConfig({ urlPrefix: e }) : console.warn("[useChatBootstrap] chatHelper.http.updateConfig is not implemented yet, URL change may not take effect"), await y();
|
|
2146
2146
|
};
|
|
2147
|
-
return
|
|
2147
|
+
return I(() => M(t), (e, t) => {
|
|
2148
2148
|
e && e !== t && t && x(e);
|
|
2149
2149
|
}), i && Promise.resolve().then(() => {
|
|
2150
2150
|
y();
|
|
@@ -2170,7 +2170,7 @@ function ft(e) {
|
|
|
2170
2170
|
}
|
|
2171
2171
|
//#endregion
|
|
2172
2172
|
//#region src/composables/use-event-bridge.ts
|
|
2173
|
-
function
|
|
2173
|
+
function ht(e) {
|
|
2174
2174
|
return {
|
|
2175
2175
|
sendMessage: (t) => e("send-message", { content: t }),
|
|
2176
2176
|
receiveStart: () => e("receive-start", {}),
|
|
@@ -2187,12 +2187,12 @@ function pt(e) {
|
|
|
2187
2187
|
shareMessages: (t) => e("share-messages", { messageIds: t })
|
|
2188
2188
|
};
|
|
2189
2189
|
}
|
|
2190
|
-
function
|
|
2190
|
+
function gt(e) {
|
|
2191
2191
|
let { componentManager: t, emit: n, debug: r = !1 } = e, i = [], a = () => {
|
|
2192
|
-
for (let [e, a] of Object.entries(
|
|
2192
|
+
for (let [e, a] of Object.entries(it)) {
|
|
2193
2193
|
if (a === null) continue;
|
|
2194
2194
|
let o = t.on(e, (t) => {
|
|
2195
|
-
let i =
|
|
2195
|
+
let i = at(e, t);
|
|
2196
2196
|
r && console.debug(`[useEventBridge] ${e} -> ${a}`, i), n(a, ...i);
|
|
2197
2197
|
});
|
|
2198
2198
|
i.push(o);
|
|
@@ -2204,7 +2204,7 @@ function mt(e) {
|
|
|
2204
2204
|
}, c = () => {
|
|
2205
2205
|
i.forEach((e) => e()), i.length = 0;
|
|
2206
2206
|
};
|
|
2207
|
-
return a(),
|
|
2207
|
+
return a(), C(() => {
|
|
2208
2208
|
c();
|
|
2209
2209
|
}), {
|
|
2210
2210
|
forwardToManager: o,
|
|
@@ -2214,17 +2214,17 @@ function mt(e) {
|
|
|
2214
2214
|
}
|
|
2215
2215
|
//#endregion
|
|
2216
2216
|
//#region src/composables/use-ai-blueking-init.ts
|
|
2217
|
-
function
|
|
2218
|
-
let { props: t, emit: r } = e, i =
|
|
2217
|
+
function _t(e) {
|
|
2218
|
+
let { props: t, emit: r } = e, i = E(), a = E(), o = n(() => be(t.url ?? "")), s = rt({
|
|
2219
2219
|
initialPanelVisible: !1,
|
|
2220
2220
|
initialNimbusMinimized: t.defaultMinimize,
|
|
2221
2221
|
enablePopup: t.enablePopup,
|
|
2222
2222
|
enableNimbus: !t.hideNimbus,
|
|
2223
2223
|
enableDraggable: t.draggable
|
|
2224
|
-
}), c = s.panelVisible, l = s.nimbusMinimized, { forwardToManager: u } =
|
|
2224
|
+
}), c = s.panelVisible, l = s.nimbusMinimized, { forwardToManager: u } = gt({
|
|
2225
2225
|
componentManager: s,
|
|
2226
2226
|
emit: r
|
|
2227
|
-
}), d =
|
|
2227
|
+
}), d = ht(u), { chatHelper: f, isReady: p, agentInfo: m, agentName: h, currentSession: g } = mt({
|
|
2228
2228
|
url: o,
|
|
2229
2229
|
requestOptions: t.requestOptions,
|
|
2230
2230
|
autoInit: !0,
|
|
@@ -2247,13 +2247,13 @@ function ht(e) {
|
|
|
2247
2247
|
});
|
|
2248
2248
|
}
|
|
2249
2249
|
}
|
|
2250
|
-
}), _ = f, v = new
|
|
2250
|
+
}), _ = f, v = new $e(_.session, _.agent, null, {
|
|
2251
2251
|
enableChatSession: t.enableChatSession,
|
|
2252
2252
|
initialSessionCode: t.initialSessionCode
|
|
2253
|
-
}),
|
|
2253
|
+
}), y = new et(_.message, _.session), b = new tt(null, t.shortcuts || []), C = { appendTo: (e) => {
|
|
2254
2254
|
let t = e.closest(".draggable-container-content");
|
|
2255
2255
|
return console.log("[ai-blueking] appendTo called, ref:", e), console.log("[ai-blueking] appendTo closest result:", t), t ?? document.body;
|
|
2256
|
-
} },
|
|
2256
|
+
} }, w = n(() => s.isCompressed.value), T = n(() => h.value), D = n(() => _.message.list.value.length === 0), O = n(() => t.resources?.length ? t.resources : m.value?.resources ?? []), k = n(() => t.prompts?.length ? t.prompts : m.value?.conversationSettings?.predefinedQuestions ?? []), A = (e) => {
|
|
2257
2257
|
console.error("ChatBot error:", e), s.emitInternal("sdk-error", {
|
|
2258
2258
|
apiName: "chat",
|
|
2259
2259
|
code: -1,
|
|
@@ -2261,7 +2261,7 @@ function ht(e) {
|
|
|
2261
2261
|
data: e
|
|
2262
2262
|
});
|
|
2263
2263
|
};
|
|
2264
|
-
|
|
2264
|
+
I(() => p.value, async (e) => {
|
|
2265
2265
|
if (e && m.value) {
|
|
2266
2266
|
let e = m.value;
|
|
2267
2267
|
if (e.saasUrl && fetch(e.saasUrl, {
|
|
@@ -2270,28 +2270,28 @@ function ht(e) {
|
|
|
2270
2270
|
}).catch(() => {}), e.conversationSettings && (u("session-initialized", {
|
|
2271
2271
|
openingRemark: e.conversationSettings.openingRemark || "",
|
|
2272
2272
|
predefinedQuestions: e.conversationSettings.predefinedQuestions || []
|
|
2273
|
-
}), e.conversationSettings.commands &&
|
|
2273
|
+
}), e.conversationSettings.commands && b.setAgentShortcuts(e.conversationSettings.commands)), t.loadRecentSessionOnMount) try {
|
|
2274
2274
|
await v.loadRecentSession({ skipLoadSessions: !0 });
|
|
2275
2275
|
} catch (e) {
|
|
2276
2276
|
console.error("[AIBlueking] Failed to load recent session:", e);
|
|
2277
2277
|
}
|
|
2278
2278
|
}
|
|
2279
|
-
}, { immediate: !0 }),
|
|
2280
|
-
|
|
2279
|
+
}, { immediate: !0 }), I(() => t.shortcuts, (e) => {
|
|
2280
|
+
b.setShortcuts(e || []);
|
|
2281
2281
|
}, { immediate: !0 });
|
|
2282
2282
|
let j = (e) => {
|
|
2283
|
-
|
|
2283
|
+
we(e) && (e.preventDefault(), c.value ? s.hidePanel() : s.showPanel());
|
|
2284
2284
|
};
|
|
2285
|
-
return
|
|
2285
|
+
return S(async () => {
|
|
2286
2286
|
i.value && s.setContainerRef(i.value), window.addEventListener("keydown", j);
|
|
2287
|
-
}),
|
|
2287
|
+
}), x(() => {
|
|
2288
2288
|
window.removeEventListener("keydown", j), s.destroy();
|
|
2289
2289
|
}), {
|
|
2290
2290
|
chatHelper: _,
|
|
2291
2291
|
componentManager: s,
|
|
2292
2292
|
sessionBusinessManager: v,
|
|
2293
|
-
shareBusinessManager:
|
|
2294
|
-
shortcutManager:
|
|
2293
|
+
shareBusinessManager: y,
|
|
2294
|
+
shortcutManager: b,
|
|
2295
2295
|
forwarders: d,
|
|
2296
2296
|
forwardToManager: u,
|
|
2297
2297
|
chatBotRef: a,
|
|
@@ -2300,9 +2300,9 @@ function ht(e) {
|
|
|
2300
2300
|
nimbusMinimized: l,
|
|
2301
2301
|
normalizedUrl: o,
|
|
2302
2302
|
agentInfo: m,
|
|
2303
|
-
agentName:
|
|
2303
|
+
agentName: T,
|
|
2304
2304
|
currentSession: g,
|
|
2305
|
-
isCompressed:
|
|
2305
|
+
isCompressed: w,
|
|
2306
2306
|
isWelcomeState: D,
|
|
2307
2307
|
messageToolsTippyOptions: C,
|
|
2308
2308
|
agentResources: O,
|
|
@@ -2312,8 +2312,8 @@ function ht(e) {
|
|
|
2312
2312
|
}
|
|
2313
2313
|
//#endregion
|
|
2314
2314
|
//#region src/composables/use-ai-selection.ts
|
|
2315
|
-
function
|
|
2316
|
-
let { shortcutManager: t, chatBotRef: r, forwardToManager: i, show: a, props: o } = e, s =
|
|
2315
|
+
function vt(e) {
|
|
2316
|
+
let { shortcutManager: t, chatBotRef: r, forwardToManager: i, show: a, props: o } = e, s = E(!1), c = E("");
|
|
2317
2317
|
return {
|
|
2318
2318
|
aiSelectionVisible: s,
|
|
2319
2319
|
selectedText: c,
|
|
@@ -2334,19 +2334,19 @@ function gt(e) {
|
|
|
2334
2334
|
}
|
|
2335
2335
|
//#endregion
|
|
2336
2336
|
//#region src/composables/use-nimbus.ts
|
|
2337
|
-
function
|
|
2338
|
-
let n = window.innerHeight - 48 - 40, r = window.innerWidth - 48 - 16, i =
|
|
2337
|
+
function yt(e, t = !1) {
|
|
2338
|
+
let n = window.innerHeight - 48 - 40, r = window.innerWidth - 48 - 16, i = E(r), a = E(n), o = E(0), s = E(t), c = E(!1), l = E(!1), u = 0, d = (e) => {
|
|
2339
2339
|
e ? i.value = window.innerWidth - 12 : i.value = r;
|
|
2340
2340
|
}, f = (e, t) => {
|
|
2341
2341
|
a.value = t, o.value = t - n;
|
|
2342
2342
|
}, p = () => {
|
|
2343
|
-
|
|
2343
|
+
_(() => {
|
|
2344
2344
|
a.value = window.innerHeight - 48 - 40 + o.value, s.value ? i.value = window.innerWidth - 12 : i.value = window.innerWidth - 48 - 16;
|
|
2345
2345
|
});
|
|
2346
2346
|
};
|
|
2347
|
-
return
|
|
2347
|
+
return S(() => {
|
|
2348
2348
|
window.addEventListener("resize", p), p();
|
|
2349
|
-
}),
|
|
2349
|
+
}), C(() => {
|
|
2350
2350
|
window.removeEventListener("resize", p);
|
|
2351
2351
|
}), {
|
|
2352
2352
|
nimbusWidth: 48,
|
|
@@ -2387,8 +2387,8 @@ function _t(e, t = !1) {
|
|
|
2387
2387
|
}
|
|
2388
2388
|
//#endregion
|
|
2389
2389
|
//#region src/composables/use-panel-container.ts
|
|
2390
|
-
var
|
|
2391
|
-
function
|
|
2390
|
+
var bt = 420;
|
|
2391
|
+
function xt(e) {
|
|
2392
2392
|
let { componentManager: t, chatBotRef: n, forwarders: r, forwardToManager: i } = e, a = async (e) => {
|
|
2393
2393
|
t.showPanel(e), e && n.value && await n.value.switchSession(e);
|
|
2394
2394
|
}, o = async (e) => {
|
|
@@ -2425,7 +2425,7 @@ function yt(e) {
|
|
|
2425
2425
|
t.setCompressed(e);
|
|
2426
2426
|
},
|
|
2427
2427
|
handleExecutionPanelChange: (e) => {
|
|
2428
|
-
e ? t.collapseSidePanel() : t.expandForSidePanel(
|
|
2428
|
+
e ? t.collapseSidePanel() : t.expandForSidePanel(bt);
|
|
2429
2429
|
},
|
|
2430
2430
|
sendMessage: async (e) => {
|
|
2431
2431
|
n.value && await n.value.sendMessage(e);
|
|
@@ -2472,15 +2472,15 @@ function yt(e) {
|
|
|
2472
2472
|
}
|
|
2473
2473
|
//#endregion
|
|
2474
2474
|
//#region src/composables/use-session-handlers.ts
|
|
2475
|
-
function
|
|
2476
|
-
let { chatHelper: t, sessionBusinessManager: n, chatBotRef: r, forwarders: i, handleError: a, currentSession: o } = e, s =
|
|
2475
|
+
function St(e) {
|
|
2476
|
+
let { chatHelper: t, sessionBusinessManager: n, chatBotRef: r, forwarders: i, handleError: a, currentSession: o } = e, s = E(""), c = E(!0), l = E(!1), u = () => t.message.list.value.some((e) => {
|
|
2477
2477
|
if (!("property" in e)) return !0;
|
|
2478
2478
|
let { property: t } = e;
|
|
2479
2479
|
return !t?.extra?.pause;
|
|
2480
2480
|
});
|
|
2481
|
-
return
|
|
2481
|
+
return I(() => o.value, (e) => {
|
|
2482
2482
|
e && (s.value = e.sessionName || "", l.value = (e.sessionContentCount ?? 0) > 0);
|
|
2483
|
-
}, { immediate: !0 }),
|
|
2483
|
+
}, { immediate: !0 }), I(() => t.message.list.value.length, () => {
|
|
2484
2484
|
l.value = u();
|
|
2485
2485
|
}), {
|
|
2486
2486
|
sessionName: s,
|
|
@@ -2555,8 +2555,8 @@ function bt(e) {
|
|
|
2555
2555
|
}
|
|
2556
2556
|
//#endregion
|
|
2557
2557
|
//#region src/composables/use-share-handlers.ts
|
|
2558
|
-
function
|
|
2559
|
-
let { shareBusinessManager: t, chatBotRef: n, forwarders: r, handleError: i } = e, a =
|
|
2558
|
+
function Ct(e) {
|
|
2559
|
+
let { shareBusinessManager: t, chatBotRef: n, forwarders: r, handleError: i } = e, a = E(!1);
|
|
2560
2560
|
return {
|
|
2561
2561
|
isShareLoading: a,
|
|
2562
2562
|
handleShare: () => {
|
|
@@ -2569,7 +2569,7 @@ function xt(e) {
|
|
|
2569
2569
|
a.value = !0;
|
|
2570
2570
|
try {
|
|
2571
2571
|
let { shareUrl: i, userMessageIds: a } = await t.shareMessages(e);
|
|
2572
|
-
await
|
|
2572
|
+
await xe(i), oe({
|
|
2573
2573
|
message: K("分享链接已复制到剪贴板"),
|
|
2574
2574
|
theme: "success"
|
|
2575
2575
|
}), n.value?.exitShareMode(), r.shareMessages(a);
|
|
@@ -2583,12 +2583,12 @@ function xt(e) {
|
|
|
2583
2583
|
}
|
|
2584
2584
|
//#endregion
|
|
2585
2585
|
//#region src/composables/use-tippy.ts
|
|
2586
|
-
function
|
|
2587
|
-
let t =
|
|
2586
|
+
function wt(e = {}) {
|
|
2587
|
+
let t = E([]), n = (n, r, i = {}) => {
|
|
2588
2588
|
try {
|
|
2589
2589
|
let a = typeof n == "string" ? document.querySelector(n) : n;
|
|
2590
2590
|
if (!a) return console.warn(`Tooltip target not found: ${n}`), null;
|
|
2591
|
-
let o =
|
|
2591
|
+
let o = le(a, {
|
|
2592
2592
|
content: r,
|
|
2593
2593
|
placement: "top",
|
|
2594
2594
|
arrow: !0,
|
|
@@ -2618,7 +2618,7 @@ function St(e = {}) {
|
|
|
2618
2618
|
e.destroy();
|
|
2619
2619
|
}), t.value = [];
|
|
2620
2620
|
};
|
|
2621
|
-
return
|
|
2621
|
+
return x(() => {
|
|
2622
2622
|
a();
|
|
2623
2623
|
}), {
|
|
2624
2624
|
instances: t,
|
|
@@ -2636,7 +2636,7 @@ function St(e = {}) {
|
|
|
2636
2636
|
}
|
|
2637
2637
|
//#endregion
|
|
2638
2638
|
//#region src/config/prop-defaults.ts
|
|
2639
|
-
var
|
|
2639
|
+
var Tt = {
|
|
2640
2640
|
url: "",
|
|
2641
2641
|
title: "",
|
|
2642
2642
|
extCls: "",
|
|
@@ -2676,7 +2676,7 @@ var Ct = {
|
|
|
2676
2676
|
showShare: !0
|
|
2677
2677
|
}),
|
|
2678
2678
|
defaultChatInputPosition: void 0
|
|
2679
|
-
},
|
|
2679
|
+
}, Et = class extends W {
|
|
2680
2680
|
eventEmitter;
|
|
2681
2681
|
constructor(e = {}) {
|
|
2682
2682
|
super({
|
|
@@ -2705,9 +2705,9 @@ var Ct = {
|
|
|
2705
2705
|
super.handleToolCallStartEvent(e), this.eventEmitter?.emit("tool-call-start", { event: e });
|
|
2706
2706
|
}
|
|
2707
2707
|
};
|
|
2708
|
-
function
|
|
2708
|
+
function Dt(e = {}) {
|
|
2709
2709
|
let { eventEmitter: t, onStart: n, onMessage: r, onDone: i, onError: a, onTextChunk: o } = e;
|
|
2710
|
-
return new
|
|
2710
|
+
return new W({
|
|
2711
2711
|
onStart: () => {
|
|
2712
2712
|
t?.emit("receive-start", {}), n?.();
|
|
2713
2713
|
},
|
|
@@ -2724,31 +2724,31 @@ function Tt(e = {}) {
|
|
|
2724
2724
|
}
|
|
2725
2725
|
//#endregion
|
|
2726
2726
|
//#region ../../node_modules/.pnpm/vue-draggable-resizable@3.0.0_vue@3.5.25_typescript@5.9.3_/node_modules/vue-draggable-resizable/dist/vue-draggable-resizable.js
|
|
2727
|
-
function
|
|
2727
|
+
function Ot(e) {
|
|
2728
2728
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Function]";
|
|
2729
2729
|
}
|
|
2730
2730
|
function Y(e, t, n, r = 1) {
|
|
2731
2731
|
let [i, a] = typeof r == "number" ? [r, r] : r;
|
|
2732
2732
|
return [Math.round(t / i / e[0]) * e[0], Math.round(n / a / e[1]) * e[1]];
|
|
2733
2733
|
}
|
|
2734
|
-
function
|
|
2734
|
+
function kt(e, t, n) {
|
|
2735
2735
|
return e - t - n;
|
|
2736
2736
|
}
|
|
2737
|
-
function
|
|
2737
|
+
function At(e, t, n) {
|
|
2738
2738
|
return e - t - n;
|
|
2739
2739
|
}
|
|
2740
2740
|
function X(e, t, n) {
|
|
2741
2741
|
return t !== null && e < t ? t : n !== null && n < e ? n : e;
|
|
2742
2742
|
}
|
|
2743
|
-
function
|
|
2743
|
+
function jt(e, t, n) {
|
|
2744
2744
|
let r = e, i = [
|
|
2745
2745
|
"matches",
|
|
2746
2746
|
"webkitMatchesSelector",
|
|
2747
2747
|
"mozMatchesSelector",
|
|
2748
2748
|
"msMatchesSelector",
|
|
2749
2749
|
"oMatchesSelector"
|
|
2750
|
-
].find((e) =>
|
|
2751
|
-
if (!
|
|
2750
|
+
].find((e) => Ot(r[e]));
|
|
2751
|
+
if (!Ot(r[i])) return !1;
|
|
2752
2752
|
do {
|
|
2753
2753
|
if (r[i](t)) return !0;
|
|
2754
2754
|
if (r === n) return !1;
|
|
@@ -2756,7 +2756,7 @@ function kt(e, t, n) {
|
|
|
2756
2756
|
} while (r);
|
|
2757
2757
|
return !1;
|
|
2758
2758
|
}
|
|
2759
|
-
function
|
|
2759
|
+
function Mt(e) {
|
|
2760
2760
|
let t = window.getComputedStyle(e);
|
|
2761
2761
|
return [parseFloat(t.getPropertyValue("width"), 10), parseFloat(t.getPropertyValue("height"), 10)];
|
|
2762
2762
|
}
|
|
@@ -2766,11 +2766,11 @@ function Z(e, t, n) {
|
|
|
2766
2766
|
function Q(e, t, n) {
|
|
2767
2767
|
e && (e.detachEvent ? e.detachEvent("on" + t, n) : e.removeEventListener ? e.removeEventListener(t, n, !0) : e["on" + t] = null);
|
|
2768
2768
|
}
|
|
2769
|
-
var
|
|
2769
|
+
var Nt = (e, t) => {
|
|
2770
2770
|
let n = e.__vccOpts || e;
|
|
2771
2771
|
for (let [e, r] of t) n[e] = r;
|
|
2772
2772
|
return n;
|
|
2773
|
-
},
|
|
2773
|
+
}, Pt = {
|
|
2774
2774
|
mouse: {
|
|
2775
2775
|
start: "mousedown",
|
|
2776
2776
|
move: "mousemove",
|
|
@@ -2781,17 +2781,17 @@ var jt = (e, t) => {
|
|
|
2781
2781
|
move: "touchmove",
|
|
2782
2782
|
stop: "touchend"
|
|
2783
2783
|
}
|
|
2784
|
-
},
|
|
2784
|
+
}, Ft = {
|
|
2785
2785
|
userSelect: "none",
|
|
2786
2786
|
MozUserSelect: "none",
|
|
2787
2787
|
WebkitUserSelect: "none",
|
|
2788
2788
|
MsUserSelect: "none"
|
|
2789
|
-
},
|
|
2789
|
+
}, It = {
|
|
2790
2790
|
userSelect: "auto",
|
|
2791
2791
|
MozUserSelect: "auto",
|
|
2792
2792
|
WebkitUserSelect: "auto",
|
|
2793
2793
|
MsUserSelect: "auto"
|
|
2794
|
-
}, $ =
|
|
2794
|
+
}, $ = Pt.mouse, Lt = {
|
|
2795
2795
|
replace: !0,
|
|
2796
2796
|
name: "vue-draggable-resizable",
|
|
2797
2797
|
props: {
|
|
@@ -2996,7 +2996,7 @@ var jt = (e, t) => {
|
|
|
2996
2996
|
this.enableNativeDrag || (this.$el.ondragstart = () => !1);
|
|
2997
2997
|
let [e, t] = this.getParentSize();
|
|
2998
2998
|
this.parentWidth = e, this.parentHeight = t;
|
|
2999
|
-
let [n, r] =
|
|
2999
|
+
let [n, r] = Mt(this.$el);
|
|
3000
3000
|
this.aspectFactor = (this.w === "auto" ? n : this.w) / (this.h === "auto" ? r : this.h), this.width = this.w === "auto" ? n : this.w, this.height = this.h === "auto" ? r : this.h, this.right = this.parentWidth - this.width - this.left, this.bottom = this.parentHeight - this.height - this.top, this.active && this.$emit("activated"), Z(document.documentElement, "mousedown", this.deselect), Z(document.documentElement, "touchend touchcancel", this.deselect), Z(window, "resize", this.checkParentSize);
|
|
3001
3001
|
},
|
|
3002
3002
|
beforeUnmount: function() {
|
|
@@ -3036,17 +3036,17 @@ var jt = (e, t) => {
|
|
|
3036
3036
|
return [null, null];
|
|
3037
3037
|
},
|
|
3038
3038
|
elementTouchDown(e) {
|
|
3039
|
-
$ =
|
|
3039
|
+
$ = Pt.touch, this.elementDown(e);
|
|
3040
3040
|
},
|
|
3041
3041
|
elementMouseDown(e) {
|
|
3042
|
-
$ =
|
|
3042
|
+
$ = Pt.mouse, this.elementDown(e);
|
|
3043
3043
|
},
|
|
3044
3044
|
elementDown(e) {
|
|
3045
3045
|
if (e instanceof MouseEvent && e.button !== 0) return;
|
|
3046
3046
|
let t = e.target || e.srcElement;
|
|
3047
3047
|
if (this.$el.contains(t)) {
|
|
3048
3048
|
if (this.onDragStart(e) === !1) return;
|
|
3049
|
-
if (this.dragHandle && !
|
|
3049
|
+
if (this.dragHandle && !jt(t, this.dragHandle, this.$el) || this.dragCancel && jt(t, this.dragCancel, this.$el)) {
|
|
3050
3050
|
this.dragging = !1;
|
|
3051
3051
|
return;
|
|
3052
3052
|
}
|
|
@@ -3070,7 +3070,7 @@ var jt = (e, t) => {
|
|
|
3070
3070
|
!this.$el.contains(t) && !n.test(t.className) && (this.enabled && !this.preventDeactivation && (this.enabled = !1, this.$emit("deactivated"), this.$emit("update:active", !1)), Q(document.documentElement, $.move, this.handleResize)), this.resetBoundsAndMouseState();
|
|
3071
3071
|
},
|
|
3072
3072
|
handleTouchDown(e, t) {
|
|
3073
|
-
$ =
|
|
3073
|
+
$ = Pt.touch, this.handleDown(e, t);
|
|
3074
3074
|
},
|
|
3075
3075
|
handleDown(e, t) {
|
|
3076
3076
|
t instanceof MouseEvent && t.which !== 1 || this.onResizeStart(e, t) !== !1 && (t.stopPropagation && t.stopPropagation(), this.lockAspectRatio && !e.includes("m") ? this.handle = "m" + e.substring(1) : this.handle = e, this.resizeEnable = !0, this.mouseClickPosition.mouseX = t.touches ? t.touches[0].pageX : t.pageX, this.mouseClickPosition.mouseY = t.touches ? t.touches[0].pageY : t.pageY, this.mouseClickPosition.left = this.left, this.mouseClickPosition.right = this.right, this.mouseClickPosition.top = this.top, this.mouseClickPosition.bottom = this.bottom, this.bounds = this.calcResizeLimits(), Z(document.documentElement, $.move, this.handleResize), Z(document.documentElement, $.stop, this.handleUp));
|
|
@@ -3112,19 +3112,19 @@ var jt = (e, t) => {
|
|
|
3112
3112
|
!this.widthTouched && s && (this.widthTouched = !0), !this.heightTouched && c && (this.heightTouched = !0);
|
|
3113
3113
|
let [l, u] = Y(this.grid, s, c, this.scale);
|
|
3114
3114
|
this.handle.includes("b") ? (i = X(a.bottom + u, this.bounds.minBottom, this.bounds.maxBottom), this.lockAspectRatio && this.resizingOnY && (r = this.right - (this.bottom - i) * o)) : this.handle.includes("t") && (n = X(a.top - u, this.bounds.minTop, this.bounds.maxTop), this.lockAspectRatio && this.resizingOnY && (t = this.left - (this.top - n) * o)), this.handle.includes("r") ? (r = X(a.right + l, this.bounds.minRight, this.bounds.maxRight), this.lockAspectRatio && this.resizingOnX && (i = this.bottom - (this.right - r) / o)) : this.handle.includes("l") && (t = X(a.left - l, this.bounds.minLeft, this.bounds.maxLeft), this.lockAspectRatio && this.resizingOnX && (n = this.top - (this.left - t) / o));
|
|
3115
|
-
let d =
|
|
3115
|
+
let d = kt(this.parentWidth, t, r), f = At(this.parentHeight, n, i);
|
|
3116
3116
|
this.onResize(this.handle, t, n, d, f) !== !1 && (this.left = t, this.top = n, this.right = r, this.bottom = i, this.width = d, this.height = f, this.$emit("resizing", this.left, this.top, this.width, this.height), this.resizing = !0);
|
|
3117
3117
|
},
|
|
3118
3118
|
changeWidth(e) {
|
|
3119
3119
|
let [t, n] = Y(this.grid, e, 0, 1), r = X(this.parentWidth - t - this.left, this.bounds.minRight, this.bounds.maxRight), i = this.bottom;
|
|
3120
3120
|
this.lockAspectRatio && (i = this.bottom - (this.right - r) / this.aspectFactor);
|
|
3121
|
-
let a =
|
|
3121
|
+
let a = kt(this.parentWidth, this.left, r), o = At(this.parentHeight, this.top, i);
|
|
3122
3122
|
this.right = r, this.bottom = i, this.width = a, this.height = o;
|
|
3123
3123
|
},
|
|
3124
3124
|
changeHeight(e) {
|
|
3125
3125
|
let [t, n] = Y(this.grid, 0, e, 1), r = X(this.parentHeight - n - this.top, this.bounds.minBottom, this.bounds.maxBottom), i = this.right;
|
|
3126
3126
|
this.lockAspectRatio && (i = this.right - (this.bottom - r) * this.aspectFactor);
|
|
3127
|
-
let a =
|
|
3127
|
+
let a = kt(this.parentWidth, this.left, i), o = At(this.parentHeight, this.top, r);
|
|
3128
3128
|
this.right = i, this.bottom = r, this.width = a, this.height = o;
|
|
3129
3129
|
},
|
|
3130
3130
|
handleUp(e) {
|
|
@@ -3138,7 +3138,7 @@ var jt = (e, t) => {
|
|
|
3138
3138
|
width: this.computedWidth,
|
|
3139
3139
|
height: this.computedHeight,
|
|
3140
3140
|
zIndex: this.zIndex,
|
|
3141
|
-
...this.dragging && this.disableUserSelect ?
|
|
3141
|
+
...this.dragging && this.disableUserSelect ? Ft : It
|
|
3142
3142
|
};
|
|
3143
3143
|
},
|
|
3144
3144
|
actualHandles() {
|
|
@@ -3200,11 +3200,11 @@ var jt = (e, t) => {
|
|
|
3200
3200
|
this.resizing || this.dragging || (this.parent && (this.bounds = this.calcResizeLimits()), this.changeHeight(e));
|
|
3201
3201
|
}
|
|
3202
3202
|
}
|
|
3203
|
-
},
|
|
3204
|
-
function
|
|
3205
|
-
return
|
|
3206
|
-
style:
|
|
3207
|
-
class:
|
|
3203
|
+
}, Rt = ["onMousedown", "onTouchstart"];
|
|
3204
|
+
function zt(t, n, r, i, a, s) {
|
|
3205
|
+
return w(), o("div", {
|
|
3206
|
+
style: b(s.style),
|
|
3207
|
+
class: v([{
|
|
3208
3208
|
[r.classNameActive]: t.enabled,
|
|
3209
3209
|
[r.classNameDragging]: t.dragging,
|
|
3210
3210
|
[r.classNameResizing]: t.resizing,
|
|
@@ -3213,73 +3213,73 @@ function Lt(t, n, r, i, o, s) {
|
|
|
3213
3213
|
}, r.className]),
|
|
3214
3214
|
onMousedown: n[0] ||= (...e) => s.elementMouseDown && s.elementMouseDown(...e),
|
|
3215
3215
|
onTouchstart: n[1] ||= (...e) => s.elementTouchDown && s.elementTouchDown(...e)
|
|
3216
|
-
}, [(
|
|
3216
|
+
}, [(w(!0), o(e, null, O(s.actualHandles, (e) => (w(), o("div", {
|
|
3217
3217
|
key: e,
|
|
3218
|
-
class:
|
|
3219
|
-
style:
|
|
3220
|
-
onMousedown:
|
|
3221
|
-
onTouchstart:
|
|
3222
|
-
}, [
|
|
3218
|
+
class: v([r.classNameHandle, r.classNameHandle + "-" + e]),
|
|
3219
|
+
style: b({ display: t.enabled ? "block" : "none" }),
|
|
3220
|
+
onMousedown: z((t) => s.handleDown(e, t), ["stop", "prevent"]),
|
|
3221
|
+
onTouchstart: z((t) => s.handleTouchDown(e, t), ["stop", "prevent"])
|
|
3222
|
+
}, [k(t.$slots, e)], 46, Rt))), 128)), k(t.$slots, "default")], 38);
|
|
3223
3223
|
}
|
|
3224
|
-
var
|
|
3225
|
-
function
|
|
3226
|
-
|
|
3224
|
+
var Bt = /* @__PURE__ */ Nt(Lt, [["render", zt]]);
|
|
3225
|
+
function Vt(e) {
|
|
3226
|
+
Vt.installed || (Vt.installed = !0, e.component("VueDraggableResizable", Bt));
|
|
3227
3227
|
}
|
|
3228
|
-
var
|
|
3229
|
-
typeof window < "u" ?
|
|
3228
|
+
var Ht = { install: Vt }, Ut = null;
|
|
3229
|
+
typeof window < "u" ? Ut = window.Vue : typeof global < "u" && (Ut = global.Vue), Ut && Ut.use(Ht);
|
|
3230
3230
|
//#endregion
|
|
3231
3231
|
//#region src/containers/use-draggable.ts
|
|
3232
|
-
function
|
|
3233
|
-
let n = e.initWidth || 400, r = e.minWidth || 400, i = e.minHeight || 400, a = e.maxWidthPercent || 40, o = e.compressedHeight || 800, s = e.compressedPadding === void 0 ? 0 : e.compressedPadding, c =
|
|
3232
|
+
function Wt(e = {}, t) {
|
|
3233
|
+
let n = e.initWidth || 400, r = e.minWidth || 400, i = e.minHeight || 400, a = e.maxWidthPercent || 40, o = e.compressedHeight || 800, s = e.compressedPadding === void 0 ? 0 : e.compressedPadding, c = E(e.defaultLeft === void 0 ? window.innerWidth - n : e.defaultLeft), l = E(e.defaultTop === void 0 ? 0 : e.defaultTop), u = E(e.defaultHeight === void 0 ? window.innerHeight - (e.defaultTop === void 0 ? 0 : e.defaultTop) : e.defaultHeight), d = E(n), f = E(l.value), p = E(c.value), m = E(d.value), h = E(u.value), g = E(Math.max(window.innerWidth * (a / 100), m.value)), v = E(!1), y = E(0), b = null, C = null, w = E(!1), T = (e) => {
|
|
3234
3234
|
let t = window.innerWidth, n = { ...e };
|
|
3235
3235
|
return n.width > t && (n.width = t), n.x + n.width > t && (n.x = t - n.width), n.x < 0 && (n.x = 0), n;
|
|
3236
3236
|
}, D = () => ({
|
|
3237
3237
|
x: p.value,
|
|
3238
3238
|
y: f.value,
|
|
3239
3239
|
width: m.value,
|
|
3240
|
-
height:
|
|
3240
|
+
height: h.value
|
|
3241
3241
|
}), O = (e, n) => {
|
|
3242
|
-
p.value = e, f.value = n,
|
|
3242
|
+
p.value = e, f.value = n, y.value = e - (window.innerWidth - m.value), t?.onDragging?.(D());
|
|
3243
3243
|
}, k = (e, n, r, i) => {
|
|
3244
|
-
p.value = e, f.value = n, m.value = Math.min(r,
|
|
3244
|
+
p.value = e, f.value = n, m.value = Math.min(r, g.value), h.value = i, t?.onResizing?.(D());
|
|
3245
3245
|
}, A = (e, n) => {
|
|
3246
|
-
p.value = e, f.value = n,
|
|
3246
|
+
p.value = e, f.value = n, y.value = e - (window.innerWidth - m.value), w.value && (C = D()), t?.onDragStop?.(D());
|
|
3247
3247
|
}, j = (e, n, r, i) => {
|
|
3248
|
-
p.value = e, f.value = n, m.value = Math.min(r,
|
|
3248
|
+
p.value = e, f.value = n, m.value = Math.min(r, g.value), h.value = i, w.value && (C = D()), t?.onResizeStop?.(D());
|
|
3249
3249
|
}, M = () => {
|
|
3250
|
-
|
|
3250
|
+
g.value = Math.max(window.innerWidth * (a / 100), m.value), _(() => {
|
|
3251
3251
|
if (v.value) p.value = window.innerWidth - m.value - s, f.value = window.innerHeight - o - s;
|
|
3252
3252
|
else {
|
|
3253
|
-
let e = window.innerWidth - m.value -
|
|
3253
|
+
let e = window.innerWidth - m.value - y.value;
|
|
3254
3254
|
p.value = Math.max(0, e), setTimeout(() => {
|
|
3255
|
-
|
|
3255
|
+
h.value = window.innerHeight - f.value;
|
|
3256
3256
|
}, 0);
|
|
3257
3257
|
}
|
|
3258
|
-
m.value >
|
|
3258
|
+
m.value > g.value && (m.value = g.value);
|
|
3259
3259
|
});
|
|
3260
3260
|
}, N = () => {
|
|
3261
|
-
v.value ? (f.value = l.value,
|
|
3262
|
-
|
|
3263
|
-
})) : (f.value = window.innerHeight - o - s, p.value = c.value - s, m.value = n,
|
|
3261
|
+
v.value ? (f.value = l.value, _(() => {
|
|
3262
|
+
h.value = u.value, p.value = c.value, m.value = d.value;
|
|
3263
|
+
})) : (f.value = window.innerHeight - o - s, p.value = c.value - s, m.value = n, h.value = o), v.value = !v.value;
|
|
3264
3264
|
}, P = (e, t) => {
|
|
3265
|
-
p.value = e, f.value = t,
|
|
3265
|
+
p.value = e, f.value = t, y.value = e - (window.innerWidth - m.value);
|
|
3266
3266
|
}, F = (e, t) => {
|
|
3267
|
-
m.value = Math.max(r, Math.min(e,
|
|
3267
|
+
m.value = Math.max(r, Math.min(e, g.value)), h.value = Math.max(i, t);
|
|
3268
3268
|
};
|
|
3269
|
-
return
|
|
3269
|
+
return S(() => {
|
|
3270
3270
|
window.addEventListener("resize", M);
|
|
3271
|
-
}),
|
|
3271
|
+
}), x(() => {
|
|
3272
3272
|
window.removeEventListener("resize", M);
|
|
3273
3273
|
}), {
|
|
3274
3274
|
minWidth: r,
|
|
3275
3275
|
minHeight: i,
|
|
3276
|
-
maxWidth:
|
|
3276
|
+
maxWidth: g,
|
|
3277
3277
|
top: f,
|
|
3278
3278
|
left: p,
|
|
3279
3279
|
width: m,
|
|
3280
|
-
height:
|
|
3280
|
+
height: h,
|
|
3281
3281
|
isCompressed: v,
|
|
3282
|
-
isSidePanelExpanded:
|
|
3282
|
+
isSidePanelExpanded: w,
|
|
3283
3283
|
handleDragging: O,
|
|
3284
3284
|
handleResizing: k,
|
|
3285
3285
|
handleDragStop: A,
|
|
@@ -3291,30 +3291,30 @@ function Ht(e = {}, t) {
|
|
|
3291
3291
|
P(e, t), F(n, r);
|
|
3292
3292
|
},
|
|
3293
3293
|
expandForSidePanel: (e) => {
|
|
3294
|
-
if (
|
|
3294
|
+
if (w.value) return;
|
|
3295
3295
|
let t = D();
|
|
3296
|
-
|
|
3297
|
-
let n = t.x + t.width, r = C?.width ?? t.width + e, i =
|
|
3296
|
+
b = { ...t }, w.value = !0;
|
|
3297
|
+
let n = t.x + t.width, r = C?.width ?? t.width + e, i = T({
|
|
3298
3298
|
x: n - r,
|
|
3299
3299
|
y: t.y,
|
|
3300
3300
|
width: r,
|
|
3301
3301
|
height: t.height
|
|
3302
3302
|
});
|
|
3303
|
-
P(i.x, i.y),
|
|
3303
|
+
P(i.x, i.y), _(() => {
|
|
3304
3304
|
F(i.width, i.height);
|
|
3305
3305
|
});
|
|
3306
3306
|
},
|
|
3307
3307
|
collapseSidePanel: () => {
|
|
3308
|
-
if (!
|
|
3308
|
+
if (!w.value) return;
|
|
3309
3309
|
let e = D();
|
|
3310
|
-
C = { ...e },
|
|
3311
|
-
let t = e.x + e.width, n =
|
|
3310
|
+
C = { ...e }, w.value = !1;
|
|
3311
|
+
let t = e.x + e.width, n = b?.width ?? e.width, r = T({
|
|
3312
3312
|
x: t - n,
|
|
3313
3313
|
y: e.y,
|
|
3314
3314
|
width: n,
|
|
3315
3315
|
height: e.height
|
|
3316
3316
|
});
|
|
3317
|
-
F(r.width, r.height),
|
|
3317
|
+
F(r.width, r.height), _(() => {
|
|
3318
3318
|
P(r.x, r.y);
|
|
3319
3319
|
});
|
|
3320
3320
|
}
|
|
@@ -3322,7 +3322,7 @@ function Ht(e = {}, t) {
|
|
|
3322
3322
|
}
|
|
3323
3323
|
//#endregion
|
|
3324
3324
|
//#region src/containers/draggable-container.vue?vue&type=script&setup=true&lang.ts
|
|
3325
|
-
var
|
|
3325
|
+
var Gt = { class: "draggable-container-content" }, Kt = /* @__PURE__ */ q(/* @__PURE__ */ d({
|
|
3326
3326
|
__name: "draggable-container",
|
|
3327
3327
|
props: {
|
|
3328
3328
|
className: { default: "" },
|
|
@@ -3358,8 +3358,8 @@ var Ut = { class: "draggable-container-content" }, Wt = /* @__PURE__ */ q(/* @__
|
|
|
3358
3358
|
"resize-stop",
|
|
3359
3359
|
"compression-change"
|
|
3360
3360
|
],
|
|
3361
|
-
setup(e, { expose: t, emit:
|
|
3362
|
-
let a = e,
|
|
3361
|
+
setup(e, { expose: t, emit: r }) {
|
|
3362
|
+
let a = e, o = r, c = E(!1), { minWidth: l, minHeight: u, maxWidth: d, top: f, left: p, width: m, height: h, isCompressed: g, isSidePanelExpanded: _, handleDragging: y, handleResizing: x, handleDragStop: S, handleResizeStop: C, toggleCompression: T, updatePosition: D, updateSize: O, updatePositionAndSize: A, expandForSidePanel: j, collapseSidePanel: M } = Wt({
|
|
3363
3363
|
initWidth: a.defaultWidth,
|
|
3364
3364
|
minWidth: a.minWidth,
|
|
3365
3365
|
minHeight: a.minHeight,
|
|
@@ -3370,71 +3370,71 @@ var Ut = { class: "draggable-container-content" }, Wt = /* @__PURE__ */ q(/* @__
|
|
|
3370
3370
|
defaultLeft: a.defaultX,
|
|
3371
3371
|
compressedPadding: a.compressedPadding
|
|
3372
3372
|
}, {
|
|
3373
|
-
onDragStop: (e) =>
|
|
3374
|
-
onResizeStop: (e) =>
|
|
3375
|
-
onDragging: (e) =>
|
|
3376
|
-
onResizing: (e) =>
|
|
3377
|
-
}),
|
|
3373
|
+
onDragStop: (e) => o("drag-stop", e),
|
|
3374
|
+
onResizeStop: (e) => o("resize-stop", e),
|
|
3375
|
+
onDragging: (e) => o("dragging", e),
|
|
3376
|
+
onResizing: (e) => o("resizing", e)
|
|
3377
|
+
}), P = n(() => {
|
|
3378
3378
|
let e = typeof a.maxWidth == "number" ? `${a.maxWidth}px` : a.maxWidth ?? `${d.value}px`;
|
|
3379
3379
|
return { "--draggable-max-width": e };
|
|
3380
|
-
}),
|
|
3380
|
+
}), z = n(() => ({
|
|
3381
3381
|
x: p.value,
|
|
3382
3382
|
y: f.value,
|
|
3383
3383
|
width: m.value,
|
|
3384
3384
|
height: h.value
|
|
3385
|
-
})),
|
|
3385
|
+
})), ee = () => {
|
|
3386
3386
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
3387
3387
|
e.style.pointerEvents = "none";
|
|
3388
3388
|
});
|
|
3389
|
-
},
|
|
3389
|
+
}, te = () => {
|
|
3390
3390
|
document.querySelectorAll("iframe").forEach((e) => {
|
|
3391
3391
|
e.style.pointerEvents = "";
|
|
3392
3392
|
});
|
|
3393
|
-
},
|
|
3394
|
-
c.value || (c.value = !0,
|
|
3395
|
-
},
|
|
3396
|
-
c.value || (c.value = !0,
|
|
3397
|
-
},
|
|
3398
|
-
|
|
3399
|
-
},
|
|
3400
|
-
|
|
3393
|
+
}, ne = (e, t) => {
|
|
3394
|
+
c.value || (c.value = !0, ee()), y(e, t);
|
|
3395
|
+
}, re = (e, t, n, r) => {
|
|
3396
|
+
c.value || (c.value = !0, ee()), x(e, t, n, r);
|
|
3397
|
+
}, B = (e, t) => {
|
|
3398
|
+
S(e, t), c.value = !1, te();
|
|
3399
|
+
}, V = (e, t, n, r) => {
|
|
3400
|
+
C(e, t, n, r), c.value = !1, te();
|
|
3401
3401
|
};
|
|
3402
|
-
return
|
|
3403
|
-
|
|
3402
|
+
return I(g, (e) => {
|
|
3403
|
+
o("compression-change", e);
|
|
3404
3404
|
}), t({
|
|
3405
|
-
updatePosition:
|
|
3406
|
-
updateSize:
|
|
3405
|
+
updatePosition: D,
|
|
3406
|
+
updateSize: O,
|
|
3407
3407
|
updatePositionAndSize: A,
|
|
3408
|
-
toggleCompression:
|
|
3409
|
-
expandForSidePanel:
|
|
3410
|
-
collapseSidePanel:
|
|
3411
|
-
positionAndSize:
|
|
3412
|
-
isCompressed:
|
|
3413
|
-
isSidePanelExpanded:
|
|
3414
|
-
}), (e, t) =>
|
|
3408
|
+
toggleCompression: T,
|
|
3409
|
+
expandForSidePanel: j,
|
|
3410
|
+
collapseSidePanel: M,
|
|
3411
|
+
positionAndSize: z,
|
|
3412
|
+
isCompressed: g,
|
|
3413
|
+
isSidePanelExpanded: _
|
|
3414
|
+
}), (e, t) => R((w(), i(N(Bt), {
|
|
3415
3415
|
ref: "draggableRef",
|
|
3416
3416
|
active: a.visible,
|
|
3417
|
-
class:
|
|
3417
|
+
class: v(["draggable-container-wrapper", a.className]),
|
|
3418
3418
|
"class-name": "draggable-container-inner",
|
|
3419
3419
|
"drag-handle": a.dragHandle,
|
|
3420
3420
|
draggable: a.draggable,
|
|
3421
|
-
h:
|
|
3422
|
-
"max-width":
|
|
3423
|
-
"min-height":
|
|
3424
|
-
"min-width":
|
|
3421
|
+
h: N(h),
|
|
3422
|
+
"max-width": N(d),
|
|
3423
|
+
"min-height": N(u),
|
|
3424
|
+
"min-width": N(l),
|
|
3425
3425
|
parent: !0,
|
|
3426
3426
|
"prevent-deactivation": !0,
|
|
3427
3427
|
resizable: a.resizable,
|
|
3428
|
-
style:
|
|
3429
|
-
w:
|
|
3430
|
-
x:
|
|
3431
|
-
y:
|
|
3432
|
-
onDragStop:
|
|
3433
|
-
onDragging:
|
|
3434
|
-
onResizeStop:
|
|
3435
|
-
onResizing:
|
|
3428
|
+
style: b(P.value),
|
|
3429
|
+
w: N(m),
|
|
3430
|
+
x: N(p),
|
|
3431
|
+
y: N(f),
|
|
3432
|
+
onDragStop: B,
|
|
3433
|
+
onDragging: ne,
|
|
3434
|
+
onResizeStop: V,
|
|
3435
|
+
onResizing: re
|
|
3436
3436
|
}, {
|
|
3437
|
-
default:
|
|
3437
|
+
default: L(() => [s("div", Gt, [k(e.$slots, "default", {}, void 0, !0)])]),
|
|
3438
3438
|
_: 3
|
|
3439
3439
|
}, 8, [
|
|
3440
3440
|
"active",
|
|
@@ -3450,13 +3450,13 @@ var Ut = { class: "draggable-container-content" }, Wt = /* @__PURE__ */ q(/* @__
|
|
|
3450
3450
|
"w",
|
|
3451
3451
|
"x",
|
|
3452
3452
|
"y"
|
|
3453
|
-
])), [[
|
|
3453
|
+
])), [[F, a.visible]]);
|
|
3454
3454
|
}
|
|
3455
|
-
}), [["__scopeId", "data-v-fbbc62a9"]]),
|
|
3455
|
+
}), [["__scopeId", "data-v-fbbc62a9"]]), qt = { class: "nimbus-bkai-wrapper" }, Jt = [
|
|
3456
3456
|
"width",
|
|
3457
3457
|
"height",
|
|
3458
3458
|
"src"
|
|
3459
|
-
],
|
|
3459
|
+
], Yt = /* @__PURE__ */ q(/* @__PURE__ */ d({
|
|
3460
3460
|
name: "NimbusButton",
|
|
3461
3461
|
__name: "nimbus",
|
|
3462
3462
|
props: {
|
|
@@ -3470,14 +3470,14 @@ var Ut = { class: "draggable-container-content" }, Wt = /* @__PURE__ */ q(/* @__
|
|
|
3470
3470
|
"update:isMinimize"
|
|
3471
3471
|
],
|
|
3472
3472
|
setup(e, { emit: t }) {
|
|
3473
|
-
|
|
3473
|
+
P((e) => ({
|
|
3474
3474
|
v05a8b16e: `${c.value.container}px`,
|
|
3475
3475
|
v4e1cf4ca: `${c.value.wrapper}px`,
|
|
3476
3476
|
v5ab0c513: `${c.value.mini.right}px`,
|
|
3477
3477
|
v40c13a80: `${c.value.mini.size}px`,
|
|
3478
3478
|
v0d35a9ef: `${c.value.mini.fontSize}px`
|
|
3479
3479
|
}));
|
|
3480
|
-
let
|
|
3480
|
+
let r = e, a = t, o = {
|
|
3481
3481
|
small: {
|
|
3482
3482
|
container: 40,
|
|
3483
3483
|
wrapper: 32,
|
|
@@ -3508,31 +3508,31 @@ var Ut = { class: "draggable-container-content" }, Wt = /* @__PURE__ */ q(/* @__
|
|
|
3508
3508
|
right: -6
|
|
3509
3509
|
}
|
|
3510
3510
|
}
|
|
3511
|
-
}, c = n(() =>
|
|
3512
|
-
|
|
3511
|
+
}, c = n(() => o[r.size]), l = E(null), u = E(null), { nimbusLeft: d, nimbusTop: f, isMinimize: p, handleClick: m, handleMinimize: h, handleDragging: g, handleMouseEnter: y, handleMouseLeave: b, handleMouseDown: C, handleMouseUp: T } = yt(a, r.isMinimize);
|
|
3512
|
+
I(p, (e) => {
|
|
3513
3513
|
a("update:isMinimize", e);
|
|
3514
3514
|
});
|
|
3515
|
-
let D = n(() => p.value ? K("恢复默认大小") : K("最小化,将缩成锚点")), { createTooltip: O, destroyAll: k } =
|
|
3515
|
+
let D = n(() => p.value ? K("恢复默认大小") : K("最小化,将缩成锚点")), { createTooltip: O, destroyAll: k } = wt({
|
|
3516
3516
|
theme: "ai-blueking",
|
|
3517
3517
|
delay: [0, 0]
|
|
3518
3518
|
}), A = () => {
|
|
3519
|
-
|
|
3520
|
-
|
|
3519
|
+
_(() => {
|
|
3520
|
+
j();
|
|
3521
3521
|
});
|
|
3522
|
-
},
|
|
3523
|
-
k(), l.value && !p.value && O(l.value,
|
|
3522
|
+
}, j = () => {
|
|
3523
|
+
k(), l.value && !p.value && O(l.value, Ce(), { placement: "left" }), u.value && O(u.value, D.value, { placement: "top" });
|
|
3524
3524
|
};
|
|
3525
|
-
return
|
|
3526
|
-
|
|
3527
|
-
|
|
3525
|
+
return I(() => p.value, () => {
|
|
3526
|
+
_(() => {
|
|
3527
|
+
j();
|
|
3528
3528
|
});
|
|
3529
|
-
}),
|
|
3530
|
-
|
|
3531
|
-
|
|
3529
|
+
}), S(() => {
|
|
3530
|
+
_(() => {
|
|
3531
|
+
j();
|
|
3532
3532
|
}), window.addEventListener("resize", A);
|
|
3533
|
-
}),
|
|
3533
|
+
}), x(() => {
|
|
3534
3534
|
window.removeEventListener("resize", A);
|
|
3535
|
-
}), (t, n) => (
|
|
3535
|
+
}), (t, n) => (w(), i(N(Bt), {
|
|
3536
3536
|
active: !e.isPanelShow,
|
|
3537
3537
|
axis: "y",
|
|
3538
3538
|
draggable: !0,
|
|
@@ -3541,29 +3541,29 @@ var Ut = { class: "draggable-container-content" }, Wt = /* @__PURE__ */ q(/* @__
|
|
|
3541
3541
|
"prevent-deactivation": !0,
|
|
3542
3542
|
resizable: !1,
|
|
3543
3543
|
w: c.value.container,
|
|
3544
|
-
x:
|
|
3545
|
-
y:
|
|
3546
|
-
onDragging:
|
|
3544
|
+
x: N(d),
|
|
3545
|
+
y: N(f),
|
|
3546
|
+
onDragging: N(g)
|
|
3547
3547
|
}, {
|
|
3548
|
-
default:
|
|
3548
|
+
default: L(() => [s("div", {
|
|
3549
3549
|
ref_key: "nimbusContainerRef",
|
|
3550
3550
|
ref: l,
|
|
3551
|
-
class:
|
|
3552
|
-
onClick: n[1] ||= (...e) =>
|
|
3553
|
-
onMousedown: n[2] ||= (...e) =>
|
|
3554
|
-
onMouseenter: n[3] ||= (...e) =>
|
|
3555
|
-
onMouseleave: n[4] ||= (...e) =>
|
|
3556
|
-
onMouseup: n[5] ||= (...e) =>
|
|
3557
|
-
}, [
|
|
3551
|
+
class: v(["nimbus-container", { "is-minimize": N(p) }]),
|
|
3552
|
+
onClick: n[1] ||= (...e) => N(m) && N(m)(...e),
|
|
3553
|
+
onMousedown: n[2] ||= (...e) => N(C) && N(C)(...e),
|
|
3554
|
+
onMouseenter: n[3] ||= (...e) => N(y) && N(y)(...e),
|
|
3555
|
+
onMouseleave: n[4] ||= (...e) => N(b) && N(b)(...e),
|
|
3556
|
+
onMouseup: n[5] ||= (...e) => N(T) && N(T)(...e)
|
|
3557
|
+
}, [s("div", qt, [s("img", {
|
|
3558
3558
|
width: c.value.img,
|
|
3559
3559
|
height: c.value.img,
|
|
3560
|
-
src:
|
|
3560
|
+
src: N(he),
|
|
3561
3561
|
alt: "nimbus"
|
|
3562
|
-
}, null, 8,
|
|
3562
|
+
}, null, 8, Jt)]), s("i", {
|
|
3563
3563
|
ref_key: "minimizeButtonRef",
|
|
3564
3564
|
ref: u,
|
|
3565
|
-
class:
|
|
3566
|
-
onClick: n[0] ||=
|
|
3565
|
+
class: v(["nimbus-mini bkai-icon", N(p) ? "bkai-yinyong" : "bkai-minus-line"]),
|
|
3566
|
+
onClick: n[0] ||= z((...e) => N(h) && N(h)(...e), ["stop"])
|
|
3567
3567
|
}, null, 2)], 34)]),
|
|
3568
3568
|
_: 1
|
|
3569
3569
|
}, 8, [
|
|
@@ -3575,9 +3575,9 @@ var Ut = { class: "draggable-container-content" }, Wt = /* @__PURE__ */ q(/* @__
|
|
|
3575
3575
|
"onDragging"
|
|
3576
3576
|
]));
|
|
3577
3577
|
}
|
|
3578
|
-
}), [["__scopeId", "data-v-26b6f3ea"]]),
|
|
3578
|
+
}), [["__scopeId", "data-v-26b6f3ea"]]), Xt = /* @__PURE__ */ q(/* @__PURE__ */ d({
|
|
3579
3579
|
__name: "ai-blueking",
|
|
3580
|
-
props: /* @__PURE__ */
|
|
3580
|
+
props: /* @__PURE__ */ g({
|
|
3581
3581
|
autoSwitchToInitialSession: { type: Boolean },
|
|
3582
3582
|
defaultChatInputPosition: {},
|
|
3583
3583
|
defaultHeight: {},
|
|
@@ -3615,7 +3615,7 @@ var Ut = { class: "draggable-container-content" }, Wt = /* @__PURE__ */ q(/* @__
|
|
|
3615
3615
|
url: {},
|
|
3616
3616
|
shortcutFilter: { type: Function },
|
|
3617
3617
|
resizeProps: {}
|
|
3618
|
-
},
|
|
3618
|
+
}, Tt),
|
|
3619
3619
|
emits: [
|
|
3620
3620
|
"show",
|
|
3621
3621
|
"close",
|
|
@@ -3640,139 +3640,139 @@ var Ut = { class: "draggable-container-content" }, Wt = /* @__PURE__ */ q(/* @__
|
|
|
3640
3640
|
"rename",
|
|
3641
3641
|
"share"
|
|
3642
3642
|
],
|
|
3643
|
-
setup(e, { expose: n, emit:
|
|
3644
|
-
let
|
|
3645
|
-
props:
|
|
3646
|
-
emit:
|
|
3647
|
-
}), { show:
|
|
3648
|
-
componentManager:
|
|
3649
|
-
chatBotRef:
|
|
3650
|
-
forwarders:
|
|
3643
|
+
setup(e, { expose: n, emit: r }) {
|
|
3644
|
+
let o = e, { chatHelper: l, componentManager: d, sessionBusinessManager: p, shareBusinessManager: m, shortcutManager: g, forwarders: _, forwardToManager: x, chatBotRef: S, draggableContainerRef: C, panelVisible: T, nimbusMinimized: E, normalizedUrl: D, agentName: O, currentSession: A, isCompressed: j, isWelcomeState: M, messageToolsTippyOptions: P, agentResources: F, agentPrompts: I, handleError: R } = _t({
|
|
3645
|
+
props: o,
|
|
3646
|
+
emit: r
|
|
3647
|
+
}), { show: z, hide: te, handleShow: ne, handleClose: re, handleNimbusClick: B, handleDragging: V, handleResizing: H, handleDragStop: ie, handleResizeStop: ae, handleToggleCompression: oe, handleCompressionChange: U, handleExecutionPanelChange: se, sendMessage: ce, handleReceiveStart: le, handleReceiveText: ue, handleReceiveEnd: de, handleStop: W, stopGeneration: fe, setCiteText: pe, focusInput: me, selectShortcut: he, sendShortcut: ge, getChatHelper: _e, updatePosition: ve, updateSize: ye, updatePositionAndSize: be, handleShortcutClick: xe } = xt({
|
|
3648
|
+
componentManager: d,
|
|
3649
|
+
chatBotRef: S,
|
|
3650
|
+
forwarders: _,
|
|
3651
3651
|
forwardToManager: x
|
|
3652
|
-
}), { sessionName:
|
|
3653
|
-
chatHelper:
|
|
3654
|
-
sessionBusinessManager:
|
|
3655
|
-
chatBotRef:
|
|
3656
|
-
forwarders:
|
|
3657
|
-
handleError:
|
|
3652
|
+
}), { sessionName: Se, hasPermission: Ce, hasSessionContents: G, handleNewChat: we, handleHistoryClick: Te, handleHistorySessionSwitch: Ee, handleHistorySessionDelete: De, handleHistorySessionRename: K, handleAutoGenerateName: Oe, handleHelpClick: ke, handleRename: Ae, handleSessionSwitched: je, addNewSession: Me, switchToSession: q, updateSessionName: Ne } = St({
|
|
3653
|
+
chatHelper: l,
|
|
3654
|
+
sessionBusinessManager: p,
|
|
3655
|
+
chatBotRef: S,
|
|
3656
|
+
forwarders: _,
|
|
3657
|
+
handleError: R,
|
|
3658
3658
|
currentSession: A
|
|
3659
|
-
}), { isShareLoading: Pe, handleShare: Fe, handleCancelShare: Ie, handleConfirmShare: Le } =
|
|
3660
|
-
shareBusinessManager:
|
|
3661
|
-
chatBotRef:
|
|
3662
|
-
forwarders:
|
|
3663
|
-
handleError:
|
|
3664
|
-
}), { aiSelectionVisible: Re, filteredPopupShortcuts: ze, handleSelectionChange: Be, handleAiSelectionShortcut: Ve } =
|
|
3665
|
-
shortcutManager:
|
|
3666
|
-
chatBotRef:
|
|
3659
|
+
}), { isShareLoading: Pe, handleShare: Fe, handleCancelShare: Ie, handleConfirmShare: Le } = Ct({
|
|
3660
|
+
shareBusinessManager: m,
|
|
3661
|
+
chatBotRef: S,
|
|
3662
|
+
forwarders: _,
|
|
3663
|
+
handleError: R
|
|
3664
|
+
}), { aiSelectionVisible: Re, filteredPopupShortcuts: ze, handleSelectionChange: Be, handleAiSelectionShortcut: Ve } = vt({
|
|
3665
|
+
shortcutManager: g,
|
|
3666
|
+
chatBotRef: S,
|
|
3667
3667
|
forwardToManager: x,
|
|
3668
|
-
show:
|
|
3669
|
-
props:
|
|
3668
|
+
show: z,
|
|
3669
|
+
props: o
|
|
3670
3670
|
}), He = (e) => {
|
|
3671
|
-
|
|
3671
|
+
G.value = !0, _.sendMessage(e);
|
|
3672
3672
|
};
|
|
3673
3673
|
return n({
|
|
3674
|
-
show:
|
|
3675
|
-
handleShow:
|
|
3676
|
-
handleClose:
|
|
3677
|
-
hide:
|
|
3678
|
-
sendMessage:
|
|
3679
|
-
selectShortcut:
|
|
3680
|
-
sendShortcut:
|
|
3681
|
-
getChatHelper:
|
|
3682
|
-
stopGeneration:
|
|
3683
|
-
addNewSession:
|
|
3684
|
-
switchToSession:
|
|
3674
|
+
show: z,
|
|
3675
|
+
handleShow: ne,
|
|
3676
|
+
handleClose: re,
|
|
3677
|
+
hide: te,
|
|
3678
|
+
sendMessage: ce,
|
|
3679
|
+
selectShortcut: he,
|
|
3680
|
+
sendShortcut: ge,
|
|
3681
|
+
getChatHelper: _e,
|
|
3682
|
+
stopGeneration: fe,
|
|
3683
|
+
addNewSession: Me,
|
|
3684
|
+
switchToSession: q,
|
|
3685
3685
|
updateSessionName: Ne,
|
|
3686
|
-
updatePosition:
|
|
3687
|
-
updateSize:
|
|
3688
|
-
updatePositionAndSize:
|
|
3689
|
-
setCiteText:
|
|
3690
|
-
focusInput:
|
|
3691
|
-
}), (e, n) => (
|
|
3692
|
-
|
|
3693
|
-
|
|
3686
|
+
updatePosition: ve,
|
|
3687
|
+
updateSize: ye,
|
|
3688
|
+
updatePositionAndSize: be,
|
|
3689
|
+
setCiteText: pe,
|
|
3690
|
+
focusInput: me
|
|
3691
|
+
}), (e, n) => (w(), i(t, { to: o.teleportTo }, [s("div", { class: v(["ai-blueking-v2", o.extCls]) }, [
|
|
3692
|
+
a(" 可拖拽容器 "),
|
|
3693
|
+
u(N(Kt), {
|
|
3694
3694
|
ref_key: "draggableContainerRef",
|
|
3695
|
-
ref:
|
|
3696
|
-
"compressed-padding":
|
|
3697
|
-
"default-height":
|
|
3698
|
-
"default-width":
|
|
3699
|
-
"default-x":
|
|
3700
|
-
"default-y":
|
|
3695
|
+
ref: C,
|
|
3696
|
+
"compressed-padding": o.miniPadding,
|
|
3697
|
+
"default-height": o.defaultHeight,
|
|
3698
|
+
"default-width": o.defaultWidth,
|
|
3699
|
+
"default-x": o.defaultLeft,
|
|
3700
|
+
"default-y": o.defaultTop,
|
|
3701
3701
|
"drag-handle": ".drag-handle",
|
|
3702
|
-
draggable:
|
|
3703
|
-
"max-width":
|
|
3702
|
+
draggable: o.draggable,
|
|
3703
|
+
"max-width": o.maxWidth,
|
|
3704
3704
|
"max-width-percent": 80,
|
|
3705
|
-
visible:
|
|
3706
|
-
onCompressionChange:
|
|
3707
|
-
onDragStop:
|
|
3708
|
-
onDragging:
|
|
3709
|
-
onResizeStop:
|
|
3710
|
-
onResizing:
|
|
3705
|
+
visible: N(T),
|
|
3706
|
+
onCompressionChange: N(U),
|
|
3707
|
+
onDragStop: N(ie),
|
|
3708
|
+
onDragging: N(V),
|
|
3709
|
+
onResizeStop: N(ae),
|
|
3710
|
+
onResizing: N(H)
|
|
3711
3711
|
}, {
|
|
3712
|
-
default:
|
|
3713
|
-
|
|
3714
|
-
|
|
3712
|
+
default: L(() => [s("div", { class: v(["ai-blueking-panel", { "has-messages": !N(M) }]) }, [
|
|
3713
|
+
a(" 独立的 Header 组件 "),
|
|
3714
|
+
o.hideHeader ? a("v-if", !0) : (w(), i(Ze, {
|
|
3715
3715
|
key: 0,
|
|
3716
|
-
"agent-name":
|
|
3717
|
-
"chat-helper":
|
|
3718
|
-
draggable:
|
|
3719
|
-
"dropdown-menu-config":
|
|
3720
|
-
"enable-chat-session":
|
|
3721
|
-
"has-permission":
|
|
3722
|
-
"has-session-contents":
|
|
3723
|
-
"is-compression-height": j
|
|
3724
|
-
"session-business-manager":
|
|
3725
|
-
"session-name":
|
|
3726
|
-
"show-compression-icon":
|
|
3727
|
-
"show-history-icon":
|
|
3728
|
-
"show-more-icon":
|
|
3729
|
-
"show-new-chat-icon":
|
|
3730
|
-
title:
|
|
3731
|
-
onAutoGenerateName:
|
|
3732
|
-
onClose:
|
|
3733
|
-
onHelpClick:
|
|
3734
|
-
onHistoryClick:
|
|
3735
|
-
onHistorySessionDelete:
|
|
3736
|
-
onHistorySessionRename:
|
|
3737
|
-
onHistorySessionSwitch:
|
|
3738
|
-
onNewChat:
|
|
3739
|
-
onRename:
|
|
3740
|
-
onShare:
|
|
3741
|
-
onToggleCompression:
|
|
3716
|
+
"agent-name": N(O),
|
|
3717
|
+
"chat-helper": N(l),
|
|
3718
|
+
draggable: o.draggable,
|
|
3719
|
+
"dropdown-menu-config": o.dropdownMenuConfig,
|
|
3720
|
+
"enable-chat-session": o.enableChatSession,
|
|
3721
|
+
"has-permission": N(Ce),
|
|
3722
|
+
"has-session-contents": N(G),
|
|
3723
|
+
"is-compression-height": N(j),
|
|
3724
|
+
"session-business-manager": N(p),
|
|
3725
|
+
"session-name": N(Se),
|
|
3726
|
+
"show-compression-icon": o.showCompressionIcon,
|
|
3727
|
+
"show-history-icon": o.showHistoryIcon,
|
|
3728
|
+
"show-more-icon": o.showMoreIcon,
|
|
3729
|
+
"show-new-chat-icon": o.showNewChatIcon,
|
|
3730
|
+
title: o.title,
|
|
3731
|
+
onAutoGenerateName: N(Oe),
|
|
3732
|
+
onClose: N(re),
|
|
3733
|
+
onHelpClick: N(ke),
|
|
3734
|
+
onHistoryClick: N(Te),
|
|
3735
|
+
onHistorySessionDelete: N(De),
|
|
3736
|
+
onHistorySessionRename: N(K),
|
|
3737
|
+
onHistorySessionSwitch: N(Ee),
|
|
3738
|
+
onNewChat: N(we),
|
|
3739
|
+
onRename: N(Ae),
|
|
3740
|
+
onShare: N(Fe),
|
|
3741
|
+
onToggleCompression: N(oe)
|
|
3742
3742
|
}, null, 8, /* @__PURE__ */ "agent-name.chat-helper.draggable.dropdown-menu-config.enable-chat-session.has-permission.has-session-contents.is-compression-height.session-business-manager.session-name.show-compression-icon.show-history-icon.show-more-icon.show-new-chat-icon.title.onAutoGenerateName.onClose.onHelpClick.onHistoryClick.onHistorySessionDelete.onHistorySessionRename.onHistorySessionSwitch.onNewChat.onRename.onShare.onToggleCompression".split("."))),
|
|
3743
|
-
|
|
3744
|
-
|
|
3743
|
+
a(" ChatBot 核心组件(仅聊天区域) "),
|
|
3744
|
+
u(pt, {
|
|
3745
3745
|
ref_key: "chatBotRef",
|
|
3746
|
-
ref:
|
|
3747
|
-
"auto-load":
|
|
3748
|
-
"chat-helper":
|
|
3749
|
-
"hello-text":
|
|
3750
|
-
"message-tools-tippy-options":
|
|
3751
|
-
placeholder:
|
|
3752
|
-
prompts:
|
|
3753
|
-
"request-options":
|
|
3754
|
-
"resize-props":
|
|
3755
|
-
resources:
|
|
3756
|
-
"session-code":
|
|
3757
|
-
"share-loading":
|
|
3758
|
-
shortcuts:
|
|
3759
|
-
style:
|
|
3760
|
-
url:
|
|
3761
|
-
onCancelShare:
|
|
3762
|
-
onConfirmShare: n[0] ||= (e) =>
|
|
3763
|
-
onError: n[1] ||= (e) =>
|
|
3764
|
-
onExecutionPanelChange:
|
|
3765
|
-
onReceiveEnd:
|
|
3766
|
-
onReceiveStart:
|
|
3767
|
-
onReceiveText:
|
|
3768
|
-
onRequestShare:
|
|
3746
|
+
ref: S,
|
|
3747
|
+
"auto-load": o.loadRecentSessionOnMount,
|
|
3748
|
+
"chat-helper": N(l),
|
|
3749
|
+
"hello-text": o.helloText,
|
|
3750
|
+
"message-tools-tippy-options": N(P),
|
|
3751
|
+
placeholder: o.placeholder,
|
|
3752
|
+
prompts: N(I),
|
|
3753
|
+
"request-options": o.requestOptions,
|
|
3754
|
+
"resize-props": o.resizeProps,
|
|
3755
|
+
resources: N(F),
|
|
3756
|
+
"session-code": o.initialSessionCode,
|
|
3757
|
+
"share-loading": N(Pe),
|
|
3758
|
+
shortcuts: o.shortcuts,
|
|
3759
|
+
style: b({ height: o.hideHeader ? "100%" : "calc(100% - 48px)" }),
|
|
3760
|
+
url: N(D),
|
|
3761
|
+
onCancelShare: N(Ie),
|
|
3762
|
+
onConfirmShare: n[0] ||= (e) => N(Le)(e),
|
|
3763
|
+
onError: n[1] ||= (e) => N(R)(e),
|
|
3764
|
+
onExecutionPanelChange: N(se),
|
|
3765
|
+
onReceiveEnd: N(de),
|
|
3766
|
+
onReceiveStart: N(le),
|
|
3767
|
+
onReceiveText: N(ue),
|
|
3768
|
+
onRequestShare: N(Fe),
|
|
3769
3769
|
onSendMessage: n[2] ||= (e) => He(e),
|
|
3770
|
-
onSessionSwitched: n[3] ||= (e) =>
|
|
3771
|
-
onShortcutClick:
|
|
3772
|
-
onStop:
|
|
3773
|
-
},
|
|
3770
|
+
onSessionSwitched: n[3] ||= (e) => N(je)(e),
|
|
3771
|
+
onShortcutClick: N(xe),
|
|
3772
|
+
onStop: N(W)
|
|
3773
|
+
}, c({ _: 2 }, [e.$slots.codeHeader ? {
|
|
3774
3774
|
name: "codeHeader",
|
|
3775
|
-
fn:
|
|
3775
|
+
fn: L((t) => [k(e.$slots, "codeHeader", y(f(t)), void 0, !0)]),
|
|
3776
3776
|
key: "0"
|
|
3777
3777
|
} : void 0]), 1032, [
|
|
3778
3778
|
"auto-load",
|
|
@@ -3815,16 +3815,16 @@ var Ut = { class: "draggable-container-content" }, Wt = /* @__PURE__ */ q(/* @__
|
|
|
3815
3815
|
"onResizeStop",
|
|
3816
3816
|
"onResizing"
|
|
3817
3817
|
]),
|
|
3818
|
-
|
|
3819
|
-
|
|
3818
|
+
a(" Nimbus 悬浮球 "),
|
|
3819
|
+
o.hideNimbus ? a("v-if", !0) : (w(), i(Yt, {
|
|
3820
3820
|
key: 0,
|
|
3821
|
-
"is-minimize":
|
|
3822
|
-
"onUpdate:isMinimize": n[4] ||= (e) =>
|
|
3823
|
-
"is-panel-show":
|
|
3824
|
-
"onUpdate:isPanelShow": n[5] ||= (e) =>
|
|
3825
|
-
"default-minimize":
|
|
3826
|
-
size:
|
|
3827
|
-
onClick:
|
|
3821
|
+
"is-minimize": N(E),
|
|
3822
|
+
"onUpdate:isMinimize": n[4] ||= (e) => h(E) ? E.value = e : null,
|
|
3823
|
+
"is-panel-show": N(T),
|
|
3824
|
+
"onUpdate:isPanelShow": n[5] ||= (e) => h(T) ? T.value = e : null,
|
|
3825
|
+
"default-minimize": o.defaultMinimize,
|
|
3826
|
+
size: o.nimbusSize,
|
|
3827
|
+
onClick: N(B)
|
|
3828
3828
|
}, null, 8, [
|
|
3829
3829
|
"is-minimize",
|
|
3830
3830
|
"is-panel-show",
|
|
@@ -3832,25 +3832,25 @@ var Ut = { class: "draggable-container-content" }, Wt = /* @__PURE__ */ q(/* @__
|
|
|
3832
3832
|
"size",
|
|
3833
3833
|
"onClick"
|
|
3834
3834
|
])),
|
|
3835
|
-
|
|
3836
|
-
|
|
3835
|
+
a(" 划词选择弹窗(使用 chat-x 的 AiSelection 组件) "),
|
|
3836
|
+
o.enablePopup ? (w(), i(N(ee), {
|
|
3837
3837
|
key: 1,
|
|
3838
|
-
visible:
|
|
3839
|
-
"onUpdate:visible": n[6] ||= (e) =>
|
|
3838
|
+
visible: N(Re),
|
|
3839
|
+
"onUpdate:visible": n[6] ||= (e) => h(Re) ? Re.value = e : null,
|
|
3840
3840
|
"exclude-selectors": [".draggable-container-wrapper"],
|
|
3841
|
-
"max-shortcut-count":
|
|
3842
|
-
shortcuts:
|
|
3843
|
-
onSelectShortcut:
|
|
3844
|
-
onSelectionChange:
|
|
3841
|
+
"max-shortcut-count": o.shortcutLimit,
|
|
3842
|
+
shortcuts: N(ze),
|
|
3843
|
+
onSelectShortcut: N(Ve),
|
|
3844
|
+
onSelectionChange: N(Be)
|
|
3845
3845
|
}, null, 8, [
|
|
3846
3846
|
"visible",
|
|
3847
3847
|
"max-shortcut-count",
|
|
3848
3848
|
"shortcuts",
|
|
3849
3849
|
"onSelectShortcut",
|
|
3850
3850
|
"onSelectionChange"
|
|
3851
|
-
])) :
|
|
3851
|
+
])) : a("v-if", !0)
|
|
3852
3852
|
], 2)], 8, ["to"]));
|
|
3853
3853
|
}
|
|
3854
3854
|
}), [["__scopeId", "data-v-ae11fd9e"]]);
|
|
3855
3855
|
//#endregion
|
|
3856
|
-
export {
|
|
3856
|
+
export { de as AGUIProtocol, Xt as AIBlueking, Xt as default, Et as BluekingProtocol, J as BootstrapPhase, pt as ChatBot, Qe as ChatBusinessManager, nt as ComponentManager, Kt as DraggableContainer, ne as MessageContentType, $e as SessionBusinessManager, tt as ShortcutManager, ot as UIStateManager, r as createApp, Dt as createBluekingProtocol, rt as createComponentManager, Tt as defaultProps, p as h, mt as useChatBootstrap, pe as useChatHelper, Wt as useDraggable };
|