@opentiny/tiny-robot 0.4.2-alpha.7 → 0.4.2-alpha.9
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/bubble/index.js +10 -9
- package/dist/index.d.ts +1130 -909
- package/dist/index.js +129 -118
- package/dist/index4.js +380 -317
- package/dist/index5.js +240 -187
- package/dist/index6.js +565 -514
- package/dist/layout/index.js +1243 -0
- package/dist/sender/index.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/index6.js
CHANGED
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
import { ref as L, watch as
|
|
1
|
+
import { ref as L, watch as H, toValue as k, onMounted as xe, onUnmounted as We, nextTick as ne, defineComponent as I, openBlock as v, createElementBlock as E, renderSlot as C, computed as x, unref as R, normalizeClass as G, createVNode as V, watchEffect as Z, Fragment as P, createElementVNode as B, mergeProps as O, toDisplayString as z, withDirectives as ee, vShow as te, createBlock as A, resolveDynamicComponent as J, normalizeProps as D, guardReactiveProps as U, createCommentVNode as ae, useCssModule as Ve, renderList as W, markRaw as F, inject as T, provide as M, reactive as ze, readonly as Xe, withCtx as $ } from "vue";
|
|
2
2
|
import { _ as N } from "./_plugin-vue_export-helper.js";
|
|
3
|
-
import { IconLoading as
|
|
4
|
-
import { l as
|
|
5
|
-
function
|
|
6
|
-
const n =
|
|
7
|
-
|
|
3
|
+
import { IconLoading as Be, IconAtom as qe, IconArrowDown as Re, IconPlugin as me, IconError as Ze, IconCancelled as Qe } from "@opentiny/tiny-robot-svgs";
|
|
4
|
+
import { l as et, w as tt, g as nt, a as st } from "./index4.js";
|
|
5
|
+
function _e(t, e) {
|
|
6
|
+
const n = H(t, (s, a) => {
|
|
7
|
+
a === !0 && s === !1 && (e(), n());
|
|
8
8
|
});
|
|
9
9
|
return n;
|
|
10
10
|
}
|
|
11
11
|
function ot(t, e, n) {
|
|
12
|
-
const { scrollOnMount:
|
|
13
|
-
let
|
|
14
|
-
const u = /* @__PURE__ */ new Set(),
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
const
|
|
18
|
-
|
|
12
|
+
const { scrollOnMount: s = !0, bottomThreshold: a = 20, scrollThrottle: i = 0 } = n ?? {}, o = L(!0);
|
|
13
|
+
let l = !1;
|
|
14
|
+
const u = /* @__PURE__ */ new Set(), f = () => st(t), { y: m, isScrolling: h, arrivedState: y } = et(f, { throttle: i }), g = (r) => r.scrollHeight - r.scrollTop - r.clientHeight <= a, c = async (r = "auto") => {
|
|
15
|
+
const d = k(f);
|
|
16
|
+
if (d && (await ne(), d.scrollTo({ top: d.scrollHeight, behavior: r }), r === "smooth" && !g(d))) {
|
|
17
|
+
const _ = _e(h, () => {
|
|
18
|
+
d.scrollTo({ top: d.scrollHeight, behavior: "auto" }), u.delete(_);
|
|
19
19
|
});
|
|
20
|
-
u.add(
|
|
20
|
+
u.add(_);
|
|
21
21
|
}
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
}, p = () => {
|
|
23
|
+
l || !o.value || (l = !0, requestAnimationFrame(async () => {
|
|
24
|
+
l = !1, await c("auto");
|
|
25
25
|
}));
|
|
26
26
|
};
|
|
27
|
-
return
|
|
27
|
+
return H(
|
|
28
28
|
m,
|
|
29
29
|
() => {
|
|
30
|
-
const
|
|
31
|
-
|
|
30
|
+
const r = k(f);
|
|
31
|
+
r && (o.value = g(r));
|
|
32
32
|
},
|
|
33
33
|
{ flush: "post" }
|
|
34
|
-
),
|
|
34
|
+
), tt(
|
|
35
35
|
e,
|
|
36
36
|
() => {
|
|
37
|
-
|
|
37
|
+
p();
|
|
38
38
|
},
|
|
39
39
|
{ flush: "post", throttle: 100 }
|
|
40
|
-
),
|
|
41
|
-
|
|
40
|
+
), xe(() => {
|
|
41
|
+
s && c("smooth");
|
|
42
42
|
}), We(() => {
|
|
43
|
-
u.forEach((
|
|
44
|
-
|
|
43
|
+
u.forEach((r) => {
|
|
44
|
+
r();
|
|
45
45
|
}), u.clear();
|
|
46
|
-
}),
|
|
47
|
-
if (
|
|
48
|
-
const
|
|
49
|
-
|
|
46
|
+
}), nt("keydown", (r) => {
|
|
47
|
+
if (r.key === "End" && !o.value) {
|
|
48
|
+
const d = _e(h, () => {
|
|
49
|
+
c("auto"), u.delete(d);
|
|
50
50
|
});
|
|
51
|
-
u.add(
|
|
51
|
+
u.add(d);
|
|
52
52
|
}
|
|
53
53
|
}), {
|
|
54
|
-
scrollToBottom:
|
|
55
|
-
arrivedState:
|
|
54
|
+
scrollToBottom: c,
|
|
55
|
+
arrivedState: y
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
const
|
|
58
|
+
const Ee = Symbol("bubble-message-group"), Ce = Symbol("bubble-box-renderer-matches"), ke = Symbol("bubble-box-fallback-renderer"), Ie = Symbol("bubble-box-attributes"), Se = Symbol(
|
|
59
59
|
"bubble-box-prop-fallback-renderer"
|
|
60
|
-
),
|
|
60
|
+
), Te = Symbol("bubble-content-renderer-matches"), Ae = Symbol(
|
|
61
61
|
"bubble-content-fallback-renderer"
|
|
62
|
-
),
|
|
62
|
+
), Me = Symbol("bubble-content-attributes"), Le = Symbol(
|
|
63
63
|
"bubble-content-prop-fallback-renderer"
|
|
64
|
-
),
|
|
64
|
+
), re = Symbol("bubble-store"), $e = Symbol("bubble-event-fn"), Oe = Symbol("bubble-list-context"), K = {
|
|
65
65
|
LOADING: -1,
|
|
66
66
|
NORMAL: 0,
|
|
67
67
|
CONTENT: 10,
|
|
68
68
|
ROLE: 20
|
|
69
|
-
},
|
|
69
|
+
}, rt = {
|
|
70
70
|
class: "tr-bubble__box",
|
|
71
71
|
"data-box-type": "box"
|
|
72
|
-
},
|
|
72
|
+
}, at = /* @__PURE__ */ I({
|
|
73
73
|
__name: "Box",
|
|
74
74
|
props: {
|
|
75
75
|
placement: {},
|
|
76
76
|
shape: {}
|
|
77
77
|
},
|
|
78
78
|
setup(t) {
|
|
79
|
-
return (e, n) => (
|
|
80
|
-
|
|
79
|
+
return (e, n) => (v(), E("div", rt, [
|
|
80
|
+
C(e.$slots, "default", {}, void 0, !0)
|
|
81
81
|
]));
|
|
82
82
|
}
|
|
83
|
-
}),
|
|
83
|
+
}), le = /* @__PURE__ */ N(at, [["__scopeId", "data-v-98101726"]]), lt = ["src", "alt"], ct = /* @__PURE__ */ I({
|
|
84
84
|
__name: "Image",
|
|
85
85
|
props: {
|
|
86
86
|
message: {},
|
|
87
87
|
contentIndex: {}
|
|
88
88
|
},
|
|
89
89
|
setup(t) {
|
|
90
|
-
const e = t, n = L(!1),
|
|
91
|
-
|
|
92
|
-
n.value = !1,
|
|
90
|
+
const e = t, n = L(!1), s = L(!1), { content: a } = fe(e), i = x(() => a.value ? typeof a.value.image_url == "string" ? a.value.image_url : a.value.image_url.url : null);
|
|
91
|
+
H(i, () => {
|
|
92
|
+
n.value = !1, s.value = !1;
|
|
93
93
|
});
|
|
94
|
-
const
|
|
95
|
-
n.value = !0,
|
|
96
|
-
},
|
|
97
|
-
|
|
94
|
+
const o = () => {
|
|
95
|
+
n.value = !0, s.value = !1;
|
|
96
|
+
}, l = () => {
|
|
97
|
+
s.value = !0, n.value = !0;
|
|
98
98
|
};
|
|
99
|
-
return (u,
|
|
99
|
+
return (u, f) => {
|
|
100
100
|
var m;
|
|
101
|
-
return
|
|
102
|
-
class:
|
|
101
|
+
return v(), E("img", {
|
|
102
|
+
class: G(["tr-bubble__image", { loading: !n.value }]),
|
|
103
103
|
src: i.value,
|
|
104
|
-
alt: (m =
|
|
104
|
+
alt: (m = R(a)) == null ? void 0 : m.text,
|
|
105
105
|
loading: "lazy",
|
|
106
|
-
onLoad:
|
|
107
|
-
onError:
|
|
106
|
+
onLoad: o,
|
|
107
|
+
onError: l,
|
|
108
108
|
"data-type": "image"
|
|
109
|
-
}, null, 42,
|
|
109
|
+
}, null, 42, lt);
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
}),
|
|
112
|
+
}), Ne = /* @__PURE__ */ N(ct, [["__scopeId", "data-v-e59794cb"]]), ut = {
|
|
113
113
|
class: "tr-bubble__loading",
|
|
114
114
|
"data-type": "loading"
|
|
115
|
-
},
|
|
115
|
+
}, it = /* @__PURE__ */ I({
|
|
116
116
|
__name: "Loading",
|
|
117
117
|
props: {
|
|
118
118
|
message: {},
|
|
119
119
|
contentIndex: {}
|
|
120
120
|
},
|
|
121
121
|
setup(t) {
|
|
122
|
-
return (e, n) => (
|
|
123
|
-
|
|
122
|
+
return (e, n) => (v(), E("div", ut, [
|
|
123
|
+
V(R(Be))
|
|
124
124
|
]));
|
|
125
125
|
}
|
|
126
|
-
}),
|
|
126
|
+
}), we = /* @__PURE__ */ N(it, [["__scopeId", "data-v-bc1b5ff4"]]), dt = { class: "title" }, bt = { class: "detail" }, ft = /* @__PURE__ */ I({
|
|
127
127
|
inheritAttrs: !1,
|
|
128
128
|
__name: "Reasoning",
|
|
129
129
|
props: {
|
|
@@ -131,95 +131,101 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
131
131
|
contentIndex: {}
|
|
132
132
|
},
|
|
133
133
|
setup(t) {
|
|
134
|
-
const e = t, { restMessage: n, restProps:
|
|
135
|
-
|
|
136
|
-
var
|
|
137
|
-
i.value = ((
|
|
134
|
+
const e = t, { restMessage: n, restProps: s } = je(e, ["reasoning_content"]), a = ue(n, e.contentIndex), i = L(!0);
|
|
135
|
+
Z(() => {
|
|
136
|
+
var f;
|
|
137
|
+
i.value = ((f = e.message.state) == null ? void 0 : f.open) ?? !0;
|
|
138
138
|
});
|
|
139
|
-
const
|
|
140
|
-
i.value = !i.value,
|
|
139
|
+
const o = ie(), l = () => {
|
|
140
|
+
i.value = !i.value, o({
|
|
141
|
+
name: "state:update",
|
|
142
|
+
payload: {
|
|
143
|
+
key: "open",
|
|
144
|
+
value: i.value
|
|
145
|
+
}
|
|
146
|
+
});
|
|
141
147
|
}, u = L(null);
|
|
142
|
-
return
|
|
148
|
+
return H(
|
|
143
149
|
() => e.message.reasoning_content,
|
|
144
150
|
() => {
|
|
145
|
-
|
|
151
|
+
ne(() => {
|
|
146
152
|
u.value && u.value.scrollTo({
|
|
147
153
|
top: u.value.scrollHeight,
|
|
148
154
|
behavior: "smooth"
|
|
149
155
|
});
|
|
150
156
|
});
|
|
151
157
|
}
|
|
152
|
-
), (
|
|
153
|
-
var
|
|
154
|
-
return
|
|
155
|
-
|
|
158
|
+
), (f, m) => {
|
|
159
|
+
var h, y;
|
|
160
|
+
return v(), E(P, null, [
|
|
161
|
+
B("div", O({
|
|
156
162
|
class: "tr-bubble__reasoning",
|
|
157
163
|
"data-type": "reasoning"
|
|
158
|
-
},
|
|
159
|
-
|
|
164
|
+
}, f.$attrs), [
|
|
165
|
+
B("div", {
|
|
160
166
|
class: "header",
|
|
161
|
-
onClick:
|
|
167
|
+
onClick: l
|
|
162
168
|
}, [
|
|
163
|
-
|
|
164
|
-
class:
|
|
169
|
+
B("div", {
|
|
170
|
+
class: G(["icon-and-text", { thinking: (h = e.message.state) == null ? void 0 : h.thinking }])
|
|
165
171
|
}, [
|
|
166
|
-
|
|
167
|
-
|
|
172
|
+
V(R(qe)),
|
|
173
|
+
B("span", dt, z((y = e.message.state) != null && y.thinking ? "正在思考" : "已思考"), 1)
|
|
168
174
|
], 2),
|
|
169
|
-
|
|
170
|
-
class:
|
|
175
|
+
V(R(Re), {
|
|
176
|
+
class: G(["expand-icon", { "-rotate-90": !i.value }])
|
|
171
177
|
}, null, 8, ["class"])
|
|
172
178
|
]),
|
|
173
|
-
|
|
174
|
-
m[0] || (m[0] =
|
|
175
|
-
|
|
176
|
-
|
|
179
|
+
ee(B("div", bt, [
|
|
180
|
+
m[0] || (m[0] = B("div", { class: "side-border" }, [
|
|
181
|
+
B("div", { class: "dot-wrapper" }, [
|
|
182
|
+
B("div", { class: "dot" })
|
|
177
183
|
]),
|
|
178
|
-
|
|
184
|
+
B("div", { class: "border-line" })
|
|
179
185
|
], -1)),
|
|
180
|
-
|
|
186
|
+
B("p", {
|
|
181
187
|
class: "detail-content",
|
|
182
188
|
ref_key: "detailRef",
|
|
183
189
|
ref: u
|
|
184
190
|
}, z(e.message.reasoning_content), 513)
|
|
185
191
|
], 512), [
|
|
186
|
-
[
|
|
192
|
+
[te, i.value]
|
|
187
193
|
])
|
|
188
194
|
], 16),
|
|
189
|
-
(
|
|
195
|
+
(v(), A(J(R(a).renderer), D(U({ ...R(a).attributes, ...R(s) })), null, 16))
|
|
190
196
|
], 64);
|
|
191
197
|
};
|
|
192
198
|
}
|
|
193
|
-
}),
|
|
199
|
+
}), Fe = /* @__PURE__ */ N(ft, [["__scopeId", "data-v-4ddaccea"]]), pt = {
|
|
194
200
|
key: 0,
|
|
195
201
|
class: "tr-bubble__text",
|
|
196
202
|
"data-type": "text"
|
|
197
|
-
},
|
|
203
|
+
}, mt = /* @__PURE__ */ I({
|
|
198
204
|
__name: "Text",
|
|
199
205
|
props: {
|
|
200
206
|
message: {},
|
|
201
207
|
contentIndex: {}
|
|
202
208
|
},
|
|
203
209
|
setup(t) {
|
|
204
|
-
const e = t, { contentText: n } =
|
|
205
|
-
return (
|
|
210
|
+
const e = t, { contentText: n } = fe(e);
|
|
211
|
+
return (s, a) => R(n) ? (v(), E("p", pt, z(R(n)), 1)) : ae("", !0);
|
|
206
212
|
}
|
|
207
|
-
}),
|
|
213
|
+
}), ce = /* @__PURE__ */ N(mt, [["__scopeId", "data-v-93592ecb"]]), Pe = /* @__PURE__ */ I({
|
|
208
214
|
__name: "ToolRole",
|
|
209
215
|
props: {
|
|
210
216
|
message: {},
|
|
211
217
|
contentIndex: {}
|
|
212
218
|
},
|
|
213
219
|
setup(t) {
|
|
214
|
-
const e = t, n =
|
|
215
|
-
return
|
|
220
|
+
const e = t, n = be();
|
|
221
|
+
return Z(() => {
|
|
216
222
|
e.message.tool_call_id && (n.toolCallResults || (n.toolCallResults = {}), n.toolCallResults[e.message.tool_call_id] = e.message.content ?? "");
|
|
217
|
-
}), (
|
|
223
|
+
}), (s, a) => ae("", !0);
|
|
218
224
|
}
|
|
219
225
|
}), _t = {
|
|
220
226
|
class: "tr-bubble__tool-call",
|
|
221
227
|
"data-type": "tool-call"
|
|
222
|
-
},
|
|
228
|
+
}, gt = { class: "header" }, vt = { class: "header-left" }, ht = { class: "title" }, yt = { class: "header-right" }, xt = { class: "divider" }, Bt = ["innerHTML"], Rt = /* @__PURE__ */ I({
|
|
223
229
|
__name: "Tool",
|
|
224
230
|
props: {
|
|
225
231
|
message: {},
|
|
@@ -227,97 +233,103 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
227
233
|
toolCallIndex: {}
|
|
228
234
|
},
|
|
229
235
|
setup(t) {
|
|
230
|
-
const e = t, { toolCall: n, toolCallWithResult:
|
|
231
|
-
["running", { text: "正在调用", icon:
|
|
232
|
-
["success", { text: "已调用", icon:
|
|
233
|
-
["failed", { text: "调用失败", icon:
|
|
234
|
-
["cancelled", { text: "已取消", icon:
|
|
235
|
-
]),
|
|
236
|
-
var
|
|
237
|
-
return i.get(((
|
|
238
|
-
}),
|
|
239
|
-
let
|
|
236
|
+
const e = t, { toolCall: n, toolCallWithResult: s, state: a } = Ut(e), i = /* @__PURE__ */ new Map([
|
|
237
|
+
["running", { text: "正在调用", icon: Be }],
|
|
238
|
+
["success", { text: "已调用", icon: me }],
|
|
239
|
+
["failed", { text: "调用失败", icon: Ze }],
|
|
240
|
+
["cancelled", { text: "已取消", icon: Qe }]
|
|
241
|
+
]), o = x(() => {
|
|
242
|
+
var d;
|
|
243
|
+
return i.get(((d = a.value) == null ? void 0 : d.status) || "") || { text: "", icon: me };
|
|
244
|
+
}), l = (d, _ = 2) => {
|
|
245
|
+
let b = "";
|
|
240
246
|
try {
|
|
241
|
-
typeof
|
|
247
|
+
typeof d == "string" ? b = JSON.stringify(JSON.parse(d), null, _) : b = JSON.stringify(d, null, _);
|
|
242
248
|
} catch {
|
|
243
249
|
}
|
|
244
|
-
return
|
|
245
|
-
}, u =
|
|
246
|
-
if (!
|
|
250
|
+
return b;
|
|
251
|
+
}, u = Ve(), f = (d) => d.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), m = (d) => {
|
|
252
|
+
if (!d)
|
|
247
253
|
return "";
|
|
248
|
-
let
|
|
249
|
-
return
|
|
254
|
+
let _ = f(d);
|
|
255
|
+
return _ = _.replace(
|
|
250
256
|
/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g,
|
|
251
|
-
(
|
|
252
|
-
let
|
|
253
|
-
return /^"/.test(
|
|
257
|
+
(b) => {
|
|
258
|
+
let S = "number";
|
|
259
|
+
return /^"/.test(b) ? S = /:$/.test(b) ? "key" : "string" : /true|false/.test(b) ? S = "boolean" : /null/.test(b) && (S = "null"), `<span class="${u[S]}">${b}</span>`;
|
|
254
260
|
}
|
|
255
|
-
),
|
|
256
|
-
},
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
top:
|
|
261
|
+
), _;
|
|
262
|
+
}, h = x(() => l(s.value, 2)), y = x(() => m(h.value)), g = L(null);
|
|
263
|
+
H(h, (d, _) => {
|
|
264
|
+
_ === "" || _ === "{}" || ne(() => {
|
|
265
|
+
g.value && g.value.scrollTo({
|
|
266
|
+
top: g.value.scrollHeight,
|
|
261
267
|
behavior: "smooth"
|
|
262
268
|
});
|
|
263
269
|
});
|
|
264
270
|
});
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
|
|
271
|
+
const c = L(!1);
|
|
272
|
+
Z(() => {
|
|
273
|
+
c.value = a.value.open ?? !1;
|
|
268
274
|
});
|
|
269
|
-
const
|
|
270
|
-
var
|
|
271
|
-
|
|
272
|
-
const
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
275
|
+
const p = ie(), r = () => {
|
|
276
|
+
var _, b;
|
|
277
|
+
c.value = !c.value;
|
|
278
|
+
const d = (_ = n.value) == null ? void 0 : _.id;
|
|
279
|
+
d && p({
|
|
280
|
+
name: "state:update",
|
|
281
|
+
payload: {
|
|
282
|
+
key: "toolCall",
|
|
283
|
+
value: {
|
|
284
|
+
...(b = e.message.state) == null ? void 0 : b.toolCall,
|
|
285
|
+
[d]: { ...a.value, open: c.value }
|
|
286
|
+
}
|
|
287
|
+
}
|
|
276
288
|
});
|
|
277
289
|
};
|
|
278
|
-
return (
|
|
279
|
-
var
|
|
280
|
-
return
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
(
|
|
284
|
-
class:
|
|
290
|
+
return (d, _) => {
|
|
291
|
+
var b;
|
|
292
|
+
return v(), E("div", _t, [
|
|
293
|
+
B("div", gt, [
|
|
294
|
+
B("div", vt, [
|
|
295
|
+
(v(), A(J(o.value.icon), {
|
|
296
|
+
class: G(["header-icon", `icon-${R(a).status}`])
|
|
285
297
|
}, null, 8, ["class"])),
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
298
|
+
B("span", null, [
|
|
299
|
+
B("span", null, z(o.value.text) + " ", 1),
|
|
300
|
+
B("span", ht, z(((b = R(n)) == null ? void 0 : b.function.name) || "Untitled"), 1)
|
|
289
301
|
])
|
|
290
302
|
]),
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
class:
|
|
294
|
-
onClick:
|
|
303
|
+
B("div", yt, [
|
|
304
|
+
V(R(Re), {
|
|
305
|
+
class: G(["expand-icon", { "-rotate-90": !c.value }]),
|
|
306
|
+
onClick: r
|
|
295
307
|
}, null, 8, ["class"])
|
|
296
308
|
])
|
|
297
309
|
]),
|
|
298
|
-
|
|
299
|
-
[
|
|
310
|
+
ee(B("div", xt, null, 512), [
|
|
311
|
+
[te, c.value]
|
|
300
312
|
]),
|
|
301
|
-
|
|
313
|
+
ee(B("div", {
|
|
302
314
|
class: "detail",
|
|
303
|
-
innerHTML:
|
|
315
|
+
innerHTML: y.value,
|
|
304
316
|
ref_key: "detailRef",
|
|
305
|
-
ref:
|
|
306
|
-
}, null, 8,
|
|
307
|
-
[
|
|
317
|
+
ref: g
|
|
318
|
+
}, null, 8, Bt), [
|
|
319
|
+
[te, c.value]
|
|
308
320
|
])
|
|
309
321
|
]);
|
|
310
322
|
};
|
|
311
323
|
}
|
|
312
|
-
}),
|
|
313
|
-
key:
|
|
324
|
+
}), Et = "_key_1b448_2", Ct = "_number_1b448_6", kt = "_string_1b448_10", It = "_boolean_1b448_14", St = {
|
|
325
|
+
key: Et,
|
|
314
326
|
number: Ct,
|
|
315
|
-
string:
|
|
316
|
-
boolean:
|
|
327
|
+
string: kt,
|
|
328
|
+
boolean: It,
|
|
317
329
|
null: "_null_1b448_18"
|
|
318
|
-
},
|
|
330
|
+
}, Tt = {
|
|
319
331
|
$style: St
|
|
320
|
-
},
|
|
332
|
+
}, De = /* @__PURE__ */ N(Rt, [["__cssModules", Tt], ["__scopeId", "data-v-00014a8b"]]), Ue = /* @__PURE__ */ I({
|
|
321
333
|
inheritAttrs: !1,
|
|
322
334
|
__name: "Tools",
|
|
323
335
|
props: {
|
|
@@ -325,247 +337,256 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
325
337
|
contentIndex: {}
|
|
326
338
|
},
|
|
327
339
|
setup(t) {
|
|
328
|
-
const e = t, { restMessage: n, restProps:
|
|
329
|
-
return (i,
|
|
330
|
-
(
|
|
331
|
-
|
|
332
|
-
(
|
|
333
|
-
key:
|
|
340
|
+
const e = t, { restMessage: n, restProps: s } = je(e, ["tool_calls"]), a = ue(n, e.contentIndex);
|
|
341
|
+
return (i, o) => (v(), E(P, null, [
|
|
342
|
+
(v(), A(J(R(a).renderer), D(U({ ...R(a).attributes, ...R(s) })), null, 16)),
|
|
343
|
+
B("div", O({ class: "tr-bubble__tools" }, i.$attrs), [
|
|
344
|
+
(v(!0), E(P, null, W(e.message.tool_calls, (l, u) => (v(), A(De, O({
|
|
345
|
+
key: l.id
|
|
334
346
|
}, { ref_for: !0 }, e, { "tool-call-index": u }), null, 16, ["tool-call-index"]))), 128))
|
|
335
347
|
], 16)
|
|
336
348
|
], 64));
|
|
337
349
|
}
|
|
338
|
-
}),
|
|
350
|
+
}), He = [
|
|
339
351
|
{
|
|
340
352
|
find: (t, e) => (e == null ? void 0 : e.type) === "image_url",
|
|
341
|
-
renderer:
|
|
342
|
-
priority:
|
|
353
|
+
renderer: F(le),
|
|
354
|
+
priority: K.NORMAL,
|
|
343
355
|
attributes: { "data-box-type": "image" }
|
|
344
356
|
}
|
|
345
|
-
],
|
|
357
|
+
], Ke = [
|
|
346
358
|
{
|
|
347
359
|
find: (t) => !!t.loading,
|
|
348
|
-
renderer:
|
|
349
|
-
priority:
|
|
360
|
+
renderer: F(we),
|
|
361
|
+
priority: K.LOADING
|
|
350
362
|
},
|
|
351
363
|
{
|
|
352
364
|
find: (t) => typeof t.reasoning_content == "string" && t.reasoning_content.trim() !== "",
|
|
353
|
-
renderer:
|
|
354
|
-
priority:
|
|
365
|
+
renderer: F(Fe),
|
|
366
|
+
priority: K.NORMAL
|
|
355
367
|
},
|
|
356
368
|
{
|
|
357
369
|
find: (t) => Array.isArray(t.tool_calls) && t.tool_calls.length > 0,
|
|
358
|
-
renderer:
|
|
359
|
-
priority:
|
|
370
|
+
renderer: F(Ue),
|
|
371
|
+
priority: K.NORMAL
|
|
360
372
|
},
|
|
361
373
|
{
|
|
362
374
|
find: (t, e) => e.type === "image_url",
|
|
363
|
-
renderer:
|
|
364
|
-
priority:
|
|
375
|
+
renderer: F(Ne),
|
|
376
|
+
priority: K.CONTENT
|
|
365
377
|
},
|
|
366
378
|
{
|
|
367
379
|
find: (t) => t.role === "tool",
|
|
368
|
-
renderer:
|
|
369
|
-
priority:
|
|
380
|
+
renderer: F(Pe),
|
|
381
|
+
priority: K.ROLE
|
|
370
382
|
}
|
|
371
|
-
],
|
|
372
|
-
const e =
|
|
373
|
-
return !e && t &&
|
|
383
|
+
], Ge = F(le), Ye = F(ce), ge = Symbol("BUBBLE_CONTENT_RESOLVER_KEY"), se = (t) => {
|
|
384
|
+
const e = T(ge, void 0), n = e ?? t;
|
|
385
|
+
return !e && t && M(ge, t), n ? (a) => {
|
|
374
386
|
const i = k(n);
|
|
375
|
-
return i == null ? void 0 : i(
|
|
376
|
-
} : (
|
|
387
|
+
return i == null ? void 0 : i(a);
|
|
388
|
+
} : (a) => a.content;
|
|
377
389
|
};
|
|
378
|
-
function Tt(t) {
|
|
379
|
-
const { boxRendererMatches: e, boxAttributes: n, fallbackBoxRenderer: o } = t;
|
|
380
|
-
e && A(Re, e), n && A(Ce, n), o && A(Be, o);
|
|
381
|
-
}
|
|
382
390
|
function At(t) {
|
|
391
|
+
const { boxRendererMatches: e, boxAttributes: n, fallbackBoxRenderer: s } = t;
|
|
392
|
+
e && M(Ce, e), n && M(Ie, n), s && M(ke, s);
|
|
393
|
+
}
|
|
394
|
+
function Mt(t) {
|
|
383
395
|
const { fallbackBoxRenderer: e } = t;
|
|
384
|
-
e &&
|
|
396
|
+
e && M(Se, e);
|
|
385
397
|
}
|
|
386
398
|
function Lt(t, e) {
|
|
387
|
-
const n =
|
|
399
|
+
const n = T(Ce, He), s = T(Ie, void 0), a = T(ke, void 0), i = T(Se, void 0), o = se();
|
|
388
400
|
if (typeof e == "number" && k(t).length !== 1)
|
|
389
401
|
throw new Error("[BubbleBoxRenderer] When contentIndex is a number, messages array length must be 1");
|
|
390
|
-
const
|
|
391
|
-
if (
|
|
402
|
+
const l = (f) => {
|
|
403
|
+
if (f.length !== 1)
|
|
392
404
|
return { content: void 0, index: void 0 };
|
|
393
|
-
const m =
|
|
405
|
+
const m = o(f.at(0));
|
|
394
406
|
return {
|
|
395
407
|
content: Array.isArray(m) ? m.at(e ?? 0) : { type: "text", text: m || "" },
|
|
396
408
|
index: e ?? 0
|
|
397
409
|
};
|
|
398
|
-
}, u = (
|
|
399
|
-
return
|
|
400
|
-
const
|
|
401
|
-
const
|
|
402
|
-
if (
|
|
403
|
-
return typeof
|
|
404
|
-
})(),
|
|
405
|
-
return
|
|
406
|
-
renderer:
|
|
410
|
+
}, u = (f, m, h, y) => typeof f.attributes == "function" ? f.attributes(m, h, y) : f.attributes;
|
|
411
|
+
return x(() => {
|
|
412
|
+
const f = k(t), { content: m, index: h } = l(f), y = (() => {
|
|
413
|
+
const c = k(s);
|
|
414
|
+
if (c)
|
|
415
|
+
return typeof c == "function" ? c(f, m, h) : c;
|
|
416
|
+
})(), g = k(n).find((c) => c.find(f, m, h));
|
|
417
|
+
return g ? {
|
|
418
|
+
renderer: g.renderer,
|
|
407
419
|
attributes: {
|
|
408
|
-
...
|
|
409
|
-
...u(
|
|
420
|
+
...y,
|
|
421
|
+
...u(g, f, m, h)
|
|
410
422
|
}
|
|
411
423
|
} : {
|
|
412
|
-
renderer: k(i) || k(
|
|
413
|
-
attributes:
|
|
424
|
+
renderer: k(i) || k(a) || Ge,
|
|
425
|
+
attributes: y
|
|
414
426
|
};
|
|
415
427
|
});
|
|
416
428
|
}
|
|
417
|
-
function Mt(t) {
|
|
418
|
-
const { contentRendererMatches: e, contentAttributes: n, fallbackContentRenderer: o } = t;
|
|
419
|
-
e && A(ke, e), n && A(Ie, n), o && A(Se, o);
|
|
420
|
-
}
|
|
421
429
|
function $t(t) {
|
|
430
|
+
const { contentRendererMatches: e, contentAttributes: n, fallbackContentRenderer: s } = t;
|
|
431
|
+
e && M(Te, e), n && M(Me, n), s && M(Ae, s);
|
|
432
|
+
}
|
|
433
|
+
function Ot(t) {
|
|
422
434
|
const { fallbackContentRenderer: e } = t;
|
|
423
|
-
e &&
|
|
435
|
+
e && M(Le, e);
|
|
424
436
|
}
|
|
425
|
-
function
|
|
426
|
-
const n =
|
|
427
|
-
return
|
|
428
|
-
const
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
431
|
-
return typeof
|
|
432
|
-
})(),
|
|
433
|
-
return
|
|
434
|
-
renderer:
|
|
437
|
+
function ue(t, e) {
|
|
438
|
+
const n = T(Te, Ke), s = T(Me, void 0), a = T(Ae, void 0), i = T(Le, void 0), o = se();
|
|
439
|
+
return x(() => {
|
|
440
|
+
const l = k(t), u = o(l), f = Array.isArray(u) ? u.at(e ?? 0) : { type: "text", text: u || "" }, m = (() => {
|
|
441
|
+
const y = k(s);
|
|
442
|
+
if (y)
|
|
443
|
+
return typeof y == "function" ? y(l, f, e) : y;
|
|
444
|
+
})(), h = k(n).find((y) => y.find(l, f, e));
|
|
445
|
+
return h ? {
|
|
446
|
+
renderer: h.renderer,
|
|
435
447
|
attributes: {
|
|
436
448
|
...m,
|
|
437
|
-
...
|
|
449
|
+
...h.attributes
|
|
438
450
|
}
|
|
439
451
|
} : {
|
|
440
|
-
renderer: k(i) || k(
|
|
452
|
+
renderer: k(i) || k(a) || Ye,
|
|
441
453
|
attributes: m
|
|
442
454
|
};
|
|
443
455
|
});
|
|
444
456
|
}
|
|
445
|
-
function
|
|
446
|
-
|
|
457
|
+
function Nt(t) {
|
|
458
|
+
M($e, t);
|
|
447
459
|
}
|
|
448
|
-
function
|
|
449
|
-
return
|
|
450
|
-
console.warn(`[Bubble]
|
|
460
|
+
function ie() {
|
|
461
|
+
return T($e, (t) => {
|
|
462
|
+
console.warn(`[Bubble] Event function not found for event: ${t.name}`);
|
|
451
463
|
});
|
|
452
464
|
}
|
|
453
|
-
function
|
|
454
|
-
const
|
|
465
|
+
function an() {
|
|
466
|
+
const t = ie();
|
|
467
|
+
return (e, n) => {
|
|
468
|
+
t({
|
|
469
|
+
name: "state:update",
|
|
470
|
+
payload: { key: e, value: n }
|
|
471
|
+
});
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
function de(t) {
|
|
475
|
+
const e = T(re, void 0);
|
|
455
476
|
if (e)
|
|
456
477
|
return e;
|
|
457
478
|
const n = ze(t || {});
|
|
458
|
-
return
|
|
479
|
+
return M(re, n), n;
|
|
459
480
|
}
|
|
460
|
-
function
|
|
461
|
-
return
|
|
481
|
+
function be() {
|
|
482
|
+
return T(re, {});
|
|
462
483
|
}
|
|
463
|
-
function
|
|
464
|
-
|
|
484
|
+
function Je(t) {
|
|
485
|
+
H(
|
|
465
486
|
t,
|
|
466
|
-
(e, n,
|
|
487
|
+
(e, n, s) => {
|
|
467
488
|
if (!e) return;
|
|
468
|
-
const
|
|
489
|
+
const a = (i) => {
|
|
469
490
|
var u;
|
|
470
|
-
const
|
|
471
|
-
if (!e.contains((
|
|
491
|
+
const o = window.getSelection();
|
|
492
|
+
if (!e.contains((o == null ? void 0 : o.anchorNode) || null)) return;
|
|
472
493
|
i.preventDefault();
|
|
473
|
-
const
|
|
494
|
+
const l = (o == null ? void 0 : o.toString().replace(/\n{2,}/g, `
|
|
474
495
|
`)) || "";
|
|
475
|
-
(u = i.clipboardData) == null || u.setData("text/plain",
|
|
496
|
+
(u = i.clipboardData) == null || u.setData("text/plain", l);
|
|
476
497
|
};
|
|
477
|
-
e.addEventListener("copy",
|
|
498
|
+
e.addEventListener("copy", a), s(() => e.removeEventListener("copy", a));
|
|
478
499
|
},
|
|
479
500
|
{ immediate: !0, flush: "post" }
|
|
480
501
|
);
|
|
481
502
|
}
|
|
482
|
-
const
|
|
483
|
-
const e =
|
|
484
|
-
const
|
|
485
|
-
return Array.isArray(
|
|
486
|
-
}),
|
|
503
|
+
const fe = (t) => {
|
|
504
|
+
const e = se(), n = x(() => {
|
|
505
|
+
const a = e(t.message);
|
|
506
|
+
return Array.isArray(a) ? a.at(t.contentIndex) : { type: "text", text: a || "" };
|
|
507
|
+
}), s = x(() => n.value.type === "text" ? String(n.value.text) : "");
|
|
487
508
|
return {
|
|
488
509
|
content: n,
|
|
489
|
-
contentText:
|
|
510
|
+
contentText: s
|
|
490
511
|
};
|
|
491
512
|
};
|
|
492
|
-
function
|
|
493
|
-
|
|
513
|
+
function wt(t) {
|
|
514
|
+
M(Ee, t);
|
|
494
515
|
}
|
|
495
|
-
function
|
|
496
|
-
return
|
|
516
|
+
function Ft() {
|
|
517
|
+
return T(Ee, void 0);
|
|
497
518
|
}
|
|
498
|
-
function
|
|
499
|
-
const n =
|
|
500
|
-
const
|
|
501
|
-
return Object.fromEntries(
|
|
502
|
-
}),
|
|
519
|
+
function je(t, e) {
|
|
520
|
+
const n = x(() => {
|
|
521
|
+
const a = Object.entries(t.message).filter(([i]) => !e.includes(i));
|
|
522
|
+
return Object.fromEntries(a);
|
|
523
|
+
}), s = x(() => ({
|
|
503
524
|
...t,
|
|
504
525
|
message: n.value
|
|
505
526
|
}));
|
|
506
527
|
return {
|
|
507
528
|
restMessage: n,
|
|
508
|
-
restProps:
|
|
529
|
+
restProps: s
|
|
509
530
|
};
|
|
510
531
|
}
|
|
511
|
-
let
|
|
512
|
-
const
|
|
513
|
-
let
|
|
514
|
-
const
|
|
515
|
-
if (
|
|
516
|
-
return
|
|
532
|
+
let oe = null;
|
|
533
|
+
const Pt = () => (oe || (oe = import("./index5.js")), oe);
|
|
534
|
+
let j = null;
|
|
535
|
+
const Dt = async () => {
|
|
536
|
+
if (j)
|
|
537
|
+
return j;
|
|
517
538
|
try {
|
|
518
539
|
const [t, e] = await Promise.all([import("markdown-it"), import("dompurify")]);
|
|
519
|
-
return
|
|
540
|
+
return j = { markdown: t.default, dompurify: e.default }, j;
|
|
520
541
|
} catch {
|
|
521
|
-
return console.warn("[BubbleMarkdownRenderer] install markdown-it and dompurify to use markdown renderer"),
|
|
542
|
+
return console.warn("[BubbleMarkdownRenderer] install markdown-it and dompurify to use markdown renderer"), j = null, null;
|
|
522
543
|
}
|
|
523
|
-
},
|
|
524
|
-
const e =
|
|
525
|
-
var
|
|
526
|
-
return (
|
|
527
|
-
}), n =
|
|
528
|
-
var m,
|
|
529
|
-
let
|
|
530
|
-
|
|
531
|
-
const
|
|
544
|
+
}, ve = ["running", "success", "failed", "cancelled"], Ut = (t) => {
|
|
545
|
+
const e = x(() => {
|
|
546
|
+
var o, l;
|
|
547
|
+
return (l = (o = t.message) == null ? void 0 : o.tool_calls) == null ? void 0 : l[t.toolCallIndex];
|
|
548
|
+
}), n = be(), s = x(() => {
|
|
549
|
+
var m, h, y;
|
|
550
|
+
let o = n.toolCallDefaultStatus;
|
|
551
|
+
o && !ve.includes(o) && (o = void 0);
|
|
552
|
+
const l = n.toolCallDefaultOpen;
|
|
532
553
|
let u = {
|
|
533
|
-
status:
|
|
534
|
-
open:
|
|
554
|
+
status: o,
|
|
555
|
+
open: l
|
|
535
556
|
};
|
|
536
|
-
const
|
|
537
|
-
if (
|
|
538
|
-
const
|
|
539
|
-
if (
|
|
540
|
-
const { status:
|
|
541
|
-
|
|
557
|
+
const f = (m = e.value) == null ? void 0 : m.id;
|
|
558
|
+
if (f) {
|
|
559
|
+
const g = (y = (h = t.message.state) == null ? void 0 : h.toolCall) == null ? void 0 : y[f];
|
|
560
|
+
if (g) {
|
|
561
|
+
const { status: c, open: p, ...r } = g;
|
|
562
|
+
c && ve.includes(c) && (u.status = c), p !== void 0 && (u.open = p), u = { ...u, ...r };
|
|
542
563
|
}
|
|
543
564
|
}
|
|
544
565
|
return u;
|
|
545
|
-
}),
|
|
546
|
-
var
|
|
547
|
-
const
|
|
548
|
-
if (
|
|
549
|
-
return (u = n.toolCallResults) == null ? void 0 : u[
|
|
566
|
+
}), a = x(() => {
|
|
567
|
+
var l, u;
|
|
568
|
+
const o = (l = e.value) == null ? void 0 : l.id;
|
|
569
|
+
if (o)
|
|
570
|
+
return (u = n.toolCallResults) == null ? void 0 : u[o];
|
|
550
571
|
}), i = L({});
|
|
551
|
-
return
|
|
572
|
+
return Z(() => {
|
|
552
573
|
var u;
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
const m =
|
|
574
|
+
const o = (u = e.value) == null ? void 0 : u.function.arguments, l = a.value;
|
|
575
|
+
Pt().then(({ jsonrepair: f }) => {
|
|
576
|
+
const m = f(typeof o == "string" ? o || "{}" : JSON.stringify(o));
|
|
556
577
|
i.value = {
|
|
557
578
|
arguments: JSON.parse(m),
|
|
558
|
-
result:
|
|
579
|
+
result: l ? JSON.parse(f(l || "{}")) : void 0
|
|
559
580
|
};
|
|
560
|
-
}).catch((
|
|
561
|
-
console.warn(
|
|
581
|
+
}).catch((f) => {
|
|
582
|
+
console.warn(f);
|
|
562
583
|
});
|
|
563
584
|
}), {
|
|
564
585
|
toolCall: e,
|
|
565
|
-
toolCallWithResult:
|
|
566
|
-
state:
|
|
586
|
+
toolCallWithResult: Xe(i),
|
|
587
|
+
state: s
|
|
567
588
|
};
|
|
568
|
-
},
|
|
589
|
+
}, he = /* @__PURE__ */ I({
|
|
569
590
|
__name: "BubbleBoxWrapper",
|
|
570
591
|
props: {
|
|
571
592
|
role: {},
|
|
@@ -576,39 +597,47 @@ const Pt = async () => {
|
|
|
576
597
|
},
|
|
577
598
|
setup(t) {
|
|
578
599
|
const e = t, n = Lt(() => e.messages, e.contentIndex);
|
|
579
|
-
return (
|
|
600
|
+
return (s, a) => (v(), A(J(R(n).renderer), O(R(n).attributes, {
|
|
580
601
|
"data-role": e.role,
|
|
581
602
|
"data-placement": e.placement,
|
|
582
603
|
"data-shape": e.shape
|
|
583
604
|
}), {
|
|
584
|
-
default:
|
|
585
|
-
|
|
605
|
+
default: $(() => [
|
|
606
|
+
C(s.$slots, "default")
|
|
586
607
|
]),
|
|
587
608
|
_: 3
|
|
588
609
|
}, 16, ["data-role", "data-placement", "data-shape"]));
|
|
589
610
|
}
|
|
590
|
-
}),
|
|
611
|
+
}), ye = /* @__PURE__ */ I({
|
|
591
612
|
__name: "BubbleContentWrapper",
|
|
592
613
|
props: {
|
|
593
614
|
message: {},
|
|
594
615
|
contentIndex: {}
|
|
595
616
|
},
|
|
596
|
-
emits: ["state-change"],
|
|
617
|
+
emits: ["state-change", "bubble-event"],
|
|
597
618
|
setup(t, { emit: e }) {
|
|
598
|
-
const n = t,
|
|
599
|
-
...
|
|
619
|
+
const n = t, s = ue(() => n.message, n.contentIndex), a = x(() => ({
|
|
620
|
+
...s.value.attributes,
|
|
600
621
|
message: n.message,
|
|
601
622
|
contentIndex: n.contentIndex
|
|
602
623
|
})), i = e;
|
|
603
|
-
return
|
|
604
|
-
i("
|
|
605
|
-
|
|
606
|
-
value: u,
|
|
624
|
+
return Nt((l) => {
|
|
625
|
+
if (i("bubble-event", {
|
|
626
|
+
...l,
|
|
607
627
|
contentIndex: n.contentIndex
|
|
608
|
-
})
|
|
609
|
-
|
|
628
|
+
}), l.name === "state:update") {
|
|
629
|
+
const u = l.payload;
|
|
630
|
+
if (!u || typeof u != "object" || !("key" in u) || typeof u.key != "string" || !("value" in u))
|
|
631
|
+
return;
|
|
632
|
+
i("state-change", {
|
|
633
|
+
key: u.key,
|
|
634
|
+
value: u.value,
|
|
635
|
+
contentIndex: n.contentIndex
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
}), (l, u) => (v(), A(J(R(s).renderer), D(U(a.value)), null, 16));
|
|
610
639
|
}
|
|
611
|
-
}),
|
|
640
|
+
}), Ht = ["data-role", "data-placement"], Kt = { class: "tr-bubble__body" }, Gt = { class: "tr-bubble__content" }, Yt = { class: "tr-bubble__after" }, Jt = /* @__PURE__ */ I({
|
|
612
641
|
__name: "Bubble",
|
|
613
642
|
props: {
|
|
614
643
|
content: {},
|
|
@@ -629,114 +658,116 @@ const Pt = async () => {
|
|
|
629
658
|
fallbackBoxRenderer: {},
|
|
630
659
|
fallbackContentRenderer: {}
|
|
631
660
|
},
|
|
632
|
-
emits: ["state-change"],
|
|
661
|
+
emits: ["state-change", "bubble-event"],
|
|
633
662
|
setup(t, { emit: e }) {
|
|
634
|
-
const n = t,
|
|
635
|
-
|
|
636
|
-
const i =
|
|
637
|
-
var
|
|
638
|
-
if ((
|
|
639
|
-
return
|
|
640
|
-
const { role:
|
|
641
|
-
return [{ role:
|
|
642
|
-
}), u = (
|
|
643
|
-
const
|
|
644
|
-
return Array.isArray(
|
|
663
|
+
const n = t, s = se(() => n.contentResolver), a = e;
|
|
664
|
+
de();
|
|
665
|
+
const i = Ft(), o = x(() => k(i)), l = x(() => {
|
|
666
|
+
var Q;
|
|
667
|
+
if ((Q = o.value) != null && Q.messages.length)
|
|
668
|
+
return o.value.messages;
|
|
669
|
+
const { role: g, content: c, reasoning_content: p, tool_calls: r, tool_call_id: d, name: _, id: b, loading: S, state: w } = n;
|
|
670
|
+
return [{ role: g, content: c, reasoning_content: p, tool_calls: r, tool_call_id: d, name: _, id: b, loading: S, state: w }];
|
|
671
|
+
}), u = (g) => {
|
|
672
|
+
const c = s(g);
|
|
673
|
+
return Array.isArray(c) ? c : [{ type: "text", text: c || "" }];
|
|
645
674
|
};
|
|
646
|
-
|
|
647
|
-
const
|
|
648
|
-
if (n.contentRenderMode === "split" &&
|
|
649
|
-
const
|
|
650
|
-
if (Array.isArray(
|
|
651
|
-
return
|
|
675
|
+
Mt({ fallbackBoxRenderer: () => n.fallbackBoxRenderer }), Ot({ fallbackContentRenderer: () => n.fallbackContentRenderer });
|
|
676
|
+
const f = x(() => l.value.length === 0 ? !0 : n.hidden), m = x(() => {
|
|
677
|
+
if (n.contentRenderMode === "split" && l.value.length === 1) {
|
|
678
|
+
const g = s(l.value.at(0));
|
|
679
|
+
if (Array.isArray(g))
|
|
680
|
+
return g;
|
|
652
681
|
}
|
|
653
682
|
return null;
|
|
654
|
-
}),
|
|
655
|
-
return
|
|
683
|
+
}), h = T(Oe, !1), y = L(null);
|
|
684
|
+
return h || Je(y), (g, c) => ee((v(), E("div", {
|
|
656
685
|
class: "tr-bubble",
|
|
657
686
|
ref_key: "bubbleRef",
|
|
658
|
-
ref:
|
|
687
|
+
ref: y,
|
|
659
688
|
"data-role": n.role,
|
|
660
689
|
"data-placement": n.placement
|
|
661
690
|
}, [
|
|
662
|
-
|
|
663
|
-
messages:
|
|
691
|
+
C(g.$slots, "prefix", {
|
|
692
|
+
messages: l.value,
|
|
664
693
|
role: t.role
|
|
665
694
|
}, void 0, !0),
|
|
666
|
-
|
|
667
|
-
n.avatar ? (
|
|
695
|
+
B("div", Kt, [
|
|
696
|
+
n.avatar ? (v(), A(J(n.avatar), {
|
|
668
697
|
key: 0,
|
|
669
|
-
class:
|
|
670
|
-
}, null, 8, ["class"])) :
|
|
671
|
-
|
|
672
|
-
m.value ? (
|
|
673
|
-
key:
|
|
698
|
+
class: G(["tr-bubble__avatar", g.$style["tr-bubble__avatar"]])
|
|
699
|
+
}, null, 8, ["class"])) : ae("", !0),
|
|
700
|
+
B("div", Gt, [
|
|
701
|
+
m.value ? (v(!0), E(P, { key: 0 }, W(m.value, (p, r) => (v(), A(he, {
|
|
702
|
+
key: r,
|
|
674
703
|
class: "tr-bubble__box",
|
|
675
704
|
role: n.role,
|
|
676
705
|
placement: n.placement,
|
|
677
706
|
shape: n.shape,
|
|
678
|
-
messages:
|
|
679
|
-
"content-index":
|
|
707
|
+
messages: l.value,
|
|
708
|
+
"content-index": r
|
|
680
709
|
}, {
|
|
681
|
-
default:
|
|
682
|
-
|
|
683
|
-
message:
|
|
684
|
-
"content-index":
|
|
685
|
-
onStateChange:
|
|
710
|
+
default: $(() => [
|
|
711
|
+
V(ye, {
|
|
712
|
+
message: l.value.at(0),
|
|
713
|
+
"content-index": r,
|
|
714
|
+
onStateChange: c[0] || (c[0] = (d) => a("state-change", { ...d, messageIndex: 0 })),
|
|
715
|
+
onBubbleEvent: c[1] || (c[1] = (d) => a("bubble-event", { ...d, messageIndex: 0 }))
|
|
686
716
|
}, null, 8, ["message", "content-index"]),
|
|
687
|
-
|
|
688
|
-
messages:
|
|
717
|
+
C(g.$slots, "content-footer", {
|
|
718
|
+
messages: l.value,
|
|
689
719
|
role: n.role,
|
|
690
|
-
contentIndex:
|
|
720
|
+
contentIndex: r
|
|
691
721
|
}, void 0, !0)
|
|
692
722
|
]),
|
|
693
723
|
_: 2
|
|
694
|
-
}, 1032, ["role", "placement", "shape", "messages", "content-index"]))), 128)) : (
|
|
724
|
+
}, 1032, ["role", "placement", "shape", "messages", "content-index"]))), 128)) : (v(), A(he, {
|
|
695
725
|
key: 1,
|
|
696
726
|
role: n.role,
|
|
697
727
|
placement: n.placement,
|
|
698
728
|
shape: n.shape,
|
|
699
|
-
messages:
|
|
729
|
+
messages: l.value
|
|
700
730
|
}, {
|
|
701
|
-
default:
|
|
702
|
-
(
|
|
703
|
-
key: `message-${
|
|
731
|
+
default: $(() => [
|
|
732
|
+
(v(!0), E(P, null, W(l.value, (p, r) => (v(), E(P, {
|
|
733
|
+
key: `message-${r}`
|
|
704
734
|
}, [
|
|
705
|
-
(
|
|
706
|
-
key: `content-${
|
|
707
|
-
message:
|
|
708
|
-
"content-index":
|
|
709
|
-
onStateChange: (
|
|
710
|
-
|
|
735
|
+
(v(!0), E(P, null, W(u(p), (d, _) => (v(), A(ye, {
|
|
736
|
+
key: `content-${_}`,
|
|
737
|
+
message: p,
|
|
738
|
+
"content-index": _,
|
|
739
|
+
onStateChange: (b) => a("state-change", { ...b, messageIndex: r }),
|
|
740
|
+
onBubbleEvent: (b) => a("bubble-event", { ...b, messageIndex: r })
|
|
741
|
+
}, null, 8, ["message", "content-index", "onStateChange", "onBubbleEvent"]))), 128))
|
|
711
742
|
], 64))), 128)),
|
|
712
|
-
|
|
713
|
-
messages:
|
|
743
|
+
C(g.$slots, "content-footer", {
|
|
744
|
+
messages: l.value,
|
|
714
745
|
role: n.role
|
|
715
746
|
}, void 0, !0)
|
|
716
747
|
]),
|
|
717
748
|
_: 3
|
|
718
749
|
}, 8, ["role", "placement", "shape", "messages"]))
|
|
719
750
|
]),
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
messages:
|
|
751
|
+
B("div", Yt, [
|
|
752
|
+
C(g.$slots, "after", {
|
|
753
|
+
messages: l.value,
|
|
723
754
|
role: t.role
|
|
724
755
|
}, void 0, !0)
|
|
725
756
|
])
|
|
726
757
|
]),
|
|
727
|
-
|
|
728
|
-
messages:
|
|
758
|
+
C(g.$slots, "suffix", {
|
|
759
|
+
messages: l.value,
|
|
729
760
|
role: t.role
|
|
730
761
|
}, void 0, !0)
|
|
731
|
-
], 8,
|
|
732
|
-
[
|
|
762
|
+
], 8, Ht)), [
|
|
763
|
+
[te, !f.value]
|
|
733
764
|
]);
|
|
734
765
|
}
|
|
735
|
-
}),
|
|
766
|
+
}), jt = {
|
|
736
767
|
"tr-bubble__avatar": "_tr-bubble__avatar_1r87c_2"
|
|
737
768
|
}, Wt = {
|
|
738
|
-
$style:
|
|
739
|
-
},
|
|
769
|
+
$style: jt
|
|
770
|
+
}, Y = /* @__PURE__ */ N(Jt, [["__cssModules", Wt], ["__scopeId", "data-v-d68ceaad"]]), Vt = /* @__PURE__ */ I({
|
|
740
771
|
__name: "BubbleItem",
|
|
741
772
|
props: {
|
|
742
773
|
messageGroup: {},
|
|
@@ -744,31 +775,32 @@ const Pt = async () => {
|
|
|
744
775
|
contentRenderMode: {},
|
|
745
776
|
contentResolver: { type: Function }
|
|
746
777
|
},
|
|
747
|
-
emits: ["state-change"],
|
|
778
|
+
emits: ["state-change", "bubble-event"],
|
|
748
779
|
setup(t, { emit: e }) {
|
|
749
|
-
const n = t,
|
|
750
|
-
return
|
|
780
|
+
const n = t, s = e;
|
|
781
|
+
return wt(() => n.messageGroup), (a, i) => (v(), A(Y, O(t.roleConfig, {
|
|
751
782
|
role: t.messageGroup.role,
|
|
752
783
|
"content-render-mode": t.contentRenderMode,
|
|
753
784
|
"content-resolver": t.contentResolver,
|
|
754
|
-
onStateChange: i[0] || (i[0] = (
|
|
785
|
+
onStateChange: i[0] || (i[0] = (o) => s("state-change", o)),
|
|
786
|
+
onBubbleEvent: i[1] || (i[1] = (o) => s("bubble-event", o))
|
|
755
787
|
}), {
|
|
756
|
-
prefix:
|
|
757
|
-
|
|
788
|
+
prefix: $((o) => [
|
|
789
|
+
C(a.$slots, "prefix", D(U(o)))
|
|
758
790
|
]),
|
|
759
|
-
suffix:
|
|
760
|
-
|
|
791
|
+
suffix: $((o) => [
|
|
792
|
+
C(a.$slots, "suffix", D(U(o)))
|
|
761
793
|
]),
|
|
762
|
-
"content-footer":
|
|
763
|
-
|
|
794
|
+
"content-footer": $((o) => [
|
|
795
|
+
C(a.$slots, "content-footer", D(U(o)))
|
|
764
796
|
]),
|
|
765
|
-
after:
|
|
766
|
-
|
|
797
|
+
after: $((o) => [
|
|
798
|
+
C(a.$slots, "after", D(U(o)))
|
|
767
799
|
]),
|
|
768
800
|
_: 3
|
|
769
801
|
}, 16, ["role", "content-render-mode", "content-resolver"]));
|
|
770
802
|
}
|
|
771
|
-
}), zt = /* @__PURE__ */
|
|
803
|
+
}), zt = /* @__PURE__ */ I({
|
|
772
804
|
__name: "BubbleList",
|
|
773
805
|
props: {
|
|
774
806
|
messages: {},
|
|
@@ -780,110 +812,128 @@ const Pt = async () => {
|
|
|
780
812
|
contentResolver: { type: Function, default: (t) => t.content },
|
|
781
813
|
autoScroll: { type: Boolean }
|
|
782
814
|
},
|
|
783
|
-
emits: ["state-change"],
|
|
815
|
+
emits: ["state-change", "bubble-event"],
|
|
784
816
|
setup(t, { expose: e, emit: n }) {
|
|
785
|
-
const
|
|
786
|
-
|
|
787
|
-
const i = (
|
|
788
|
-
var
|
|
789
|
-
return
|
|
790
|
-
},
|
|
791
|
-
let
|
|
817
|
+
const s = t, a = n;
|
|
818
|
+
de(), M(Oe, !0);
|
|
819
|
+
const i = (c) => {
|
|
820
|
+
var p, r;
|
|
821
|
+
return c ? !!((r = (p = s.roleConfigs) == null ? void 0 : p[c]) != null && r.hidden) : !1;
|
|
822
|
+
}, o = L(null);
|
|
823
|
+
let l = async () => {
|
|
792
824
|
};
|
|
793
|
-
if (
|
|
794
|
-
const
|
|
795
|
-
var
|
|
825
|
+
if (s.autoScroll) {
|
|
826
|
+
const c = x(() => s.messages.at(-1)), { scrollToBottom: p } = ot(o, () => {
|
|
827
|
+
var r, d;
|
|
796
828
|
return [
|
|
797
|
-
|
|
798
|
-
(
|
|
799
|
-
(d =
|
|
829
|
+
s.messages.length,
|
|
830
|
+
(r = c.value) == null ? void 0 : r.content,
|
|
831
|
+
(d = c.value) == null ? void 0 : d.reasoning_content
|
|
800
832
|
];
|
|
801
833
|
});
|
|
802
|
-
|
|
834
|
+
l = p, H(
|
|
803
835
|
() => {
|
|
804
|
-
var
|
|
805
|
-
return (
|
|
836
|
+
var r;
|
|
837
|
+
return (r = c.value) == null ? void 0 : r.role;
|
|
806
838
|
},
|
|
807
|
-
async (
|
|
808
|
-
|
|
839
|
+
async (r) => {
|
|
840
|
+
r === "user" && (await ne(), p("smooth"));
|
|
809
841
|
}
|
|
810
842
|
);
|
|
811
843
|
}
|
|
812
|
-
|
|
813
|
-
const u = (
|
|
814
|
-
const
|
|
815
|
-
let
|
|
816
|
-
for (const [d,
|
|
817
|
-
const
|
|
818
|
-
|
|
819
|
-
role:
|
|
820
|
-
messages: [
|
|
821
|
-
messageIndexes: [d]
|
|
822
|
-
|
|
823
|
-
}), l = v;
|
|
844
|
+
Je(o);
|
|
845
|
+
const u = (c) => {
|
|
846
|
+
const p = [];
|
|
847
|
+
let r = !1;
|
|
848
|
+
for (const [d, _] of c.entries()) {
|
|
849
|
+
const b = p[p.length - 1], S = _.role || "", w = i(_.role);
|
|
850
|
+
b && (r && w || b.role === S && r === w) ? (b.messages.push(_), b.messageIndexes.push(d)) : p.push({
|
|
851
|
+
role: S,
|
|
852
|
+
messages: [_],
|
|
853
|
+
messageIndexes: [d]
|
|
854
|
+
}), r = w;
|
|
824
855
|
}
|
|
825
|
-
return
|
|
826
|
-
},
|
|
827
|
-
const
|
|
856
|
+
return p;
|
|
857
|
+
}, f = (c, p) => {
|
|
858
|
+
const r = [];
|
|
828
859
|
let d = !1;
|
|
829
|
-
for (const [
|
|
830
|
-
const
|
|
831
|
-
|
|
832
|
-
!
|
|
833
|
-
|
|
834
|
-
d ===
|
|
835
|
-
role:
|
|
836
|
-
messages: [
|
|
837
|
-
messageIndexes: [
|
|
838
|
-
|
|
839
|
-
|
|
860
|
+
for (const [_, b] of c.entries()) {
|
|
861
|
+
const S = r[r.length - 1], w = b.role === p, Q = b.role || "", pe = i(b.role);
|
|
862
|
+
S && // divider 消息(分割角色)永远不与任何组进行合并
|
|
863
|
+
!w && // divider 组(分割角色)不允许被追加消息,确保 divider 组永远只有 1 条 message
|
|
864
|
+
S.role !== p && // hidden / 非 hidden 分组隔离
|
|
865
|
+
d === pe ? (S.messages.push(b), S.messageIndexes.push(_)) : r.push({
|
|
866
|
+
role: w ? p : Q,
|
|
867
|
+
messages: [b],
|
|
868
|
+
messageIndexes: [_]
|
|
869
|
+
}), d = pe;
|
|
870
|
+
}
|
|
871
|
+
return r;
|
|
872
|
+
}, m = x(() => s.messages.length === 0 ? [] : typeof s.groupStrategy == "function" ? s.groupStrategy(s.messages, s.dividerRole) : s.groupStrategy === "consecutive" ? u(s.messages) : f(s.messages, s.dividerRole)), h = (c, p) => {
|
|
873
|
+
const r = c.messageIndexes[p];
|
|
874
|
+
if (r === void 0) {
|
|
875
|
+
console.warn(
|
|
876
|
+
"[BubbleList] Missing messageIndexes mapping; event was not emitted. Ensure custom groupStrategy returns messageIndexes aligned with messages.",
|
|
877
|
+
{
|
|
878
|
+
messageIndex: p,
|
|
879
|
+
messageIndexes: c.messageIndexes
|
|
880
|
+
}
|
|
881
|
+
);
|
|
882
|
+
return;
|
|
840
883
|
}
|
|
841
|
-
return
|
|
842
|
-
},
|
|
884
|
+
return r;
|
|
885
|
+
}, y = (c, p) => {
|
|
886
|
+
const r = h(c, p.messageIndex);
|
|
887
|
+
r !== void 0 && a("state-change", { ...p, messageIndex: r });
|
|
888
|
+
}, g = (c, p) => {
|
|
889
|
+
const r = h(c, p.messageIndex);
|
|
890
|
+
r !== void 0 && a("bubble-event", { ...p, messageIndex: r });
|
|
891
|
+
};
|
|
843
892
|
return e({
|
|
844
|
-
scrollToBottom:
|
|
845
|
-
}), (
|
|
893
|
+
scrollToBottom: l
|
|
894
|
+
}), (c, p) => (v(), E("div", {
|
|
846
895
|
class: "tr-bubble-list",
|
|
847
896
|
ref_key: "listRef",
|
|
848
|
-
ref:
|
|
897
|
+
ref: o
|
|
849
898
|
}, [
|
|
850
|
-
(
|
|
851
|
-
var
|
|
852
|
-
return
|
|
899
|
+
(v(!0), E(P, null, W(m.value, (r, d) => {
|
|
900
|
+
var _;
|
|
901
|
+
return v(), A(Vt, {
|
|
853
902
|
key: d,
|
|
854
|
-
role:
|
|
855
|
-
"role-config": (
|
|
856
|
-
"message-group":
|
|
857
|
-
"content-render-mode":
|
|
858
|
-
"content-resolver":
|
|
859
|
-
onStateChange: (
|
|
903
|
+
role: r.role || s.fallbackRole,
|
|
904
|
+
"role-config": (_ = s.roleConfigs) == null ? void 0 : _[r.role || s.fallbackRole],
|
|
905
|
+
"message-group": r,
|
|
906
|
+
"content-render-mode": s.contentRenderMode,
|
|
907
|
+
"content-resolver": s.contentResolver,
|
|
908
|
+
onStateChange: (b) => y(r, b),
|
|
909
|
+
onBubbleEvent: (b) => g(r, b)
|
|
860
910
|
}, {
|
|
861
|
-
prefix:
|
|
862
|
-
|
|
863
|
-
messageIndexes:
|
|
911
|
+
prefix: $((b) => [
|
|
912
|
+
C(c.$slots, "prefix", O({ ref_for: !0 }, b, {
|
|
913
|
+
messageIndexes: r.messageIndexes
|
|
864
914
|
}), void 0, !0)
|
|
865
915
|
]),
|
|
866
|
-
suffix:
|
|
867
|
-
|
|
868
|
-
messageIndexes:
|
|
916
|
+
suffix: $((b) => [
|
|
917
|
+
C(c.$slots, "suffix", O({ ref_for: !0 }, b, {
|
|
918
|
+
messageIndexes: r.messageIndexes
|
|
869
919
|
}), void 0, !0)
|
|
870
920
|
]),
|
|
871
|
-
"content-footer":
|
|
872
|
-
|
|
873
|
-
messageIndexes:
|
|
921
|
+
"content-footer": $((b) => [
|
|
922
|
+
C(c.$slots, "content-footer", O({ ref_for: !0 }, b, {
|
|
923
|
+
messageIndexes: r.messageIndexes
|
|
874
924
|
}), void 0, !0)
|
|
875
925
|
]),
|
|
876
|
-
after:
|
|
877
|
-
|
|
878
|
-
messageIndexes:
|
|
926
|
+
after: $((b) => [
|
|
927
|
+
C(c.$slots, "after", O({ ref_for: !0 }, b, {
|
|
928
|
+
messageIndexes: r.messageIndexes
|
|
879
929
|
}), void 0, !0)
|
|
880
930
|
]),
|
|
881
931
|
_: 2
|
|
882
|
-
}, 1032, ["role", "role-config", "message-group", "content-render-mode", "content-resolver", "onStateChange"]);
|
|
932
|
+
}, 1032, ["role", "role-config", "message-group", "content-render-mode", "content-resolver", "onStateChange", "onBubbleEvent"]);
|
|
883
933
|
}), 128))
|
|
884
934
|
], 512));
|
|
885
935
|
}
|
|
886
|
-
}),
|
|
936
|
+
}), X = /* @__PURE__ */ N(zt, [["__scopeId", "data-v-1d84cbfe"]]), q = /* @__PURE__ */ I({
|
|
887
937
|
__name: "BubbleProvider",
|
|
888
938
|
props: {
|
|
889
939
|
boxRendererMatches: {},
|
|
@@ -896,82 +946,83 @@ const Pt = async () => {
|
|
|
896
946
|
},
|
|
897
947
|
setup(t) {
|
|
898
948
|
const e = t;
|
|
899
|
-
|
|
900
|
-
const n =
|
|
901
|
-
return
|
|
949
|
+
de(e.store);
|
|
950
|
+
const n = x(() => (e.boxRendererMatches || []).concat(He).sort((o, l) => (o.priority ?? 0) - (l.priority ?? 0))), s = x(() => (e.contentRendererMatches || []).concat(Ke).sort((o, l) => (o.priority ?? 0) - (l.priority ?? 0))), a = x(() => e.fallbackBoxRenderer || Ge), i = x(() => e.fallbackContentRenderer || Ye);
|
|
951
|
+
return At({
|
|
902
952
|
boxRendererMatches: n,
|
|
903
953
|
boxAttributes: () => e.boxAttributes,
|
|
904
|
-
fallbackBoxRenderer:
|
|
905
|
-
}),
|
|
906
|
-
contentRendererMatches:
|
|
954
|
+
fallbackBoxRenderer: a
|
|
955
|
+
}), $t({
|
|
956
|
+
contentRendererMatches: s,
|
|
907
957
|
contentAttributes: () => e.contentAttributes,
|
|
908
958
|
fallbackContentRenderer: i
|
|
909
|
-
}), (
|
|
959
|
+
}), (o, l) => C(o.$slots, "default");
|
|
910
960
|
}
|
|
911
|
-
}),
|
|
961
|
+
}), Xt = ["innerHTML"], qt = /* @__PURE__ */ I({
|
|
912
962
|
__name: "Markdown",
|
|
913
963
|
props: {
|
|
914
964
|
message: {},
|
|
915
965
|
contentIndex: {}
|
|
916
966
|
},
|
|
917
967
|
setup(t) {
|
|
918
|
-
const e = t, { contentText: n } =
|
|
919
|
-
|
|
920
|
-
|
|
968
|
+
const e = t, { contentText: n } = fe(e), s = L(null);
|
|
969
|
+
xe(async () => {
|
|
970
|
+
s.value = await Dt();
|
|
921
971
|
});
|
|
922
|
-
const { mdConfig:
|
|
923
|
-
return
|
|
924
|
-
if (
|
|
925
|
-
const { markdown:
|
|
926
|
-
|
|
972
|
+
const { mdConfig: a, dompurifyConfig: i } = be(), o = L("");
|
|
973
|
+
return Z(() => {
|
|
974
|
+
if (s.value) {
|
|
975
|
+
const { markdown: l, dompurify: u } = s.value, f = l(a || {}).render(n.value);
|
|
976
|
+
o.value = u.sanitize(f, i);
|
|
927
977
|
}
|
|
928
|
-
}), (
|
|
978
|
+
}), (l, u) => o.value ? (v(), E("div", {
|
|
929
979
|
key: 0,
|
|
930
980
|
class: "tr-bubble__markdown markdown-body",
|
|
931
981
|
"data-type": "markdown",
|
|
932
|
-
innerHTML:
|
|
933
|
-
}, null, 8,
|
|
982
|
+
innerHTML: o.value
|
|
983
|
+
}, null, 8, Xt)) : (v(), A(ce, D(O({ key: 1 }, e)), null, 16));
|
|
934
984
|
}
|
|
935
|
-
}),
|
|
936
|
-
Box:
|
|
937
|
-
Image:
|
|
938
|
-
Loading:
|
|
939
|
-
Markdown:
|
|
940
|
-
Reasoning:
|
|
941
|
-
Text:
|
|
942
|
-
Tool:
|
|
943
|
-
ToolRole:
|
|
944
|
-
Tools:
|
|
945
|
-
};
|
|
946
|
-
G.name = "TrBubble";
|
|
947
|
-
const Zt = function(t) {
|
|
948
|
-
t.component(G.name, G);
|
|
985
|
+
}), Zt = /* @__PURE__ */ N(qt, [["__scopeId", "data-v-eb1c196f"]]), ln = {
|
|
986
|
+
Box: le,
|
|
987
|
+
Image: Ne,
|
|
988
|
+
Loading: we,
|
|
989
|
+
Markdown: Zt,
|
|
990
|
+
Reasoning: Fe,
|
|
991
|
+
Text: ce,
|
|
992
|
+
Tool: De,
|
|
993
|
+
ToolRole: Pe,
|
|
994
|
+
Tools: Ue
|
|
949
995
|
};
|
|
950
|
-
|
|
951
|
-
const an = G;
|
|
952
|
-
V.name = "TrBubbleList";
|
|
996
|
+
Y.name = "TrBubble";
|
|
953
997
|
const Qt = function(t) {
|
|
954
|
-
t.component(
|
|
998
|
+
t.component(Y.name, Y);
|
|
955
999
|
};
|
|
956
|
-
|
|
957
|
-
const
|
|
958
|
-
X.name = "
|
|
1000
|
+
Y.install = Qt;
|
|
1001
|
+
const cn = Y;
|
|
1002
|
+
X.name = "TrBubbleList";
|
|
959
1003
|
const en = function(t) {
|
|
960
1004
|
t.component(X.name, X);
|
|
961
1005
|
};
|
|
962
1006
|
X.install = en;
|
|
963
|
-
const
|
|
1007
|
+
const un = X;
|
|
1008
|
+
q.name = "TrBubbleProvider";
|
|
1009
|
+
const tn = function(t) {
|
|
1010
|
+
t.component(q.name, q);
|
|
1011
|
+
};
|
|
1012
|
+
q.install = tn;
|
|
1013
|
+
const dn = q;
|
|
964
1014
|
export {
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1015
|
+
cn as B,
|
|
1016
|
+
un as a,
|
|
1017
|
+
dn as b,
|
|
1018
|
+
K as c,
|
|
1019
|
+
ln as d,
|
|
970
1020
|
Lt as e,
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
1021
|
+
ue as f,
|
|
1022
|
+
ie as g,
|
|
1023
|
+
an as h,
|
|
1024
|
+
fe as i,
|
|
1025
|
+
je as j,
|
|
1026
|
+
Ut as k,
|
|
976
1027
|
ot as u
|
|
977
1028
|
};
|