@opentiny/tiny-robot 0.4.2-alpha.3 → 0.4.2-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action-group/index.js +3 -3
- package/dist/anchor/index.js +44 -44
- package/dist/attachments/index.js +95 -95
- package/dist/container/index.js +13 -13
- package/dist/drag-overlay/index.js +1 -1
- package/dist/dropdown-menu/index.js +1 -1
- package/dist/index.d.ts +38 -19
- package/dist/index.js +2 -2
- package/dist/index2.js +139 -121
- package/dist/index3.js +1 -1
- package/dist/index4.js +13 -13
- package/dist/index6.js +19 -19
- package/dist/index7.js +30 -30
- package/dist/index8.js +8 -8
- package/dist/mcp-server-picker/index.js +160 -162
- package/dist/sender/index.js +178 -164
- package/dist/sender-actions/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +1 -1
- package/dist/suggestion-popover/index.js +113 -116
- package/dist/useSlotRefs.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +3 -3
- package/dist/no-data.js +0 -4
package/dist/index2.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { inject as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { IconSend as
|
|
4
|
-
import { TinyTooltip as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { inject as R, isVNode as V, h as F, defineComponent as y, computed as l, openBlock as i, createBlock as f, unref as o, withCtx as S, createElementVNode as k, normalizeStyle as I, normalizeClass as v, renderSlot as B, resolveDynamicComponent as P, createElementBlock as b, createVNode as x, toDisplayString as T, createCommentVNode as h, useSlots as W, Transition as $ } from "vue";
|
|
2
|
+
import { _ as w } from "./_plugin-vue_export-helper.js";
|
|
3
|
+
import { IconSend as N, IconStop as j, IconClose as U } from "@opentiny/tiny-robot-svgs";
|
|
4
|
+
import { TinyTooltip as D } from "@opentiny/vue";
|
|
5
|
+
import { t as G } from "./utils.js";
|
|
6
|
+
const K = Symbol("sender-context");
|
|
7
|
+
function C() {
|
|
8
|
+
const t = R(K);
|
|
8
9
|
if (!t)
|
|
9
10
|
throw new Error("useSenderContext must be used within Sender component");
|
|
10
11
|
return t;
|
|
11
12
|
}
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
return t ? typeof t == "string" ? t.split(/\s+/).includes(
|
|
13
|
+
const A = "tr-sender-tooltip-inner";
|
|
14
|
+
function E(t) {
|
|
15
|
+
return t ? typeof t == "string" ? t.split(/\s+/).includes(A) : Array.isArray(t) ? t.some(E) : typeof t == "object" ? !!t[A] : !1 : !1;
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function z(t) {
|
|
17
18
|
var e;
|
|
18
|
-
return
|
|
19
|
+
return V(t) && E((e = t.props) == null ? void 0 : e.class) ? t : F("div", { class: A }, t);
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
+
function O(t) {
|
|
21
22
|
if (t)
|
|
22
|
-
return typeof t == "string" ? () =>
|
|
23
|
+
return typeof t == "string" ? () => z(t) : () => z(t());
|
|
23
24
|
}
|
|
24
|
-
const
|
|
25
|
+
const M = ["disabled"], X = ["disabled"], Y = /* @__PURE__ */ y({
|
|
25
26
|
__name: "index",
|
|
26
27
|
props: {
|
|
27
28
|
icon: {},
|
|
@@ -32,176 +33,193 @@ const K = ["disabled"], X = ["disabled"], Y = /* @__PURE__ */ y({
|
|
|
32
33
|
size: {}
|
|
33
34
|
},
|
|
34
35
|
setup(t) {
|
|
35
|
-
const e = t,
|
|
36
|
-
|
|
36
|
+
const e = t, n = {
|
|
37
|
+
normal: "32px",
|
|
38
|
+
small: "28px"
|
|
39
|
+
}, a = l(() => O(e.tooltip)), d = (s) => s === "small" ? {
|
|
40
|
+
"--tr-action-button-size": n.small
|
|
41
|
+
} : s === "normal" ? {
|
|
42
|
+
"--tr-action-button-size": n.normal
|
|
43
|
+
} : {
|
|
44
|
+
"--tr-action-button-size": G(s)
|
|
45
|
+
}, c = l(() => e.size ? d(e.size) : {});
|
|
46
|
+
return (s, u) => e.tooltip ? (i(), f(o(D), {
|
|
37
47
|
key: 0,
|
|
38
|
-
"render-content":
|
|
48
|
+
"render-content": a.value,
|
|
39
49
|
placement: e.tooltipPlacement,
|
|
40
50
|
effect: "light",
|
|
41
51
|
"visible-arrow": !1,
|
|
42
52
|
"popper-class": "tr-action-button-tooltip-popper"
|
|
43
53
|
}, {
|
|
44
|
-
default:
|
|
45
|
-
|
|
46
|
-
class:
|
|
54
|
+
default: S(() => [
|
|
55
|
+
k("button", {
|
|
56
|
+
class: v(["tr-action-button", { active: e.active }]),
|
|
57
|
+
style: I(c.value),
|
|
47
58
|
disabled: e.disabled,
|
|
48
|
-
onFocusCapture:
|
|
59
|
+
onFocusCapture: u[0] || (u[0] = (r) => r.stopPropagation())
|
|
49
60
|
}, [
|
|
50
|
-
|
|
51
|
-
(
|
|
52
|
-
style: B(r.value)
|
|
53
|
-
}, null, 8, ["style"]))
|
|
61
|
+
B(s.$slots, "icon", {}, () => [
|
|
62
|
+
(i(), f(P(e.icon)))
|
|
54
63
|
], !0)
|
|
55
|
-
],
|
|
64
|
+
], 46, M)
|
|
56
65
|
]),
|
|
57
66
|
_: 3
|
|
58
|
-
}, 8, ["render-content", "placement"])) : (
|
|
67
|
+
}, 8, ["render-content", "placement"])) : (i(), b("button", {
|
|
59
68
|
key: 1,
|
|
60
|
-
class:
|
|
69
|
+
class: v(["tr-action-button", { active: e.active }]),
|
|
70
|
+
style: I(c.value),
|
|
61
71
|
disabled: e.disabled
|
|
62
72
|
}, [
|
|
63
|
-
|
|
64
|
-
(
|
|
65
|
-
style: B(r.value)
|
|
66
|
-
}, null, 8, ["style"]))
|
|
73
|
+
B(s.$slots, "icon", {}, () => [
|
|
74
|
+
(i(), f(P(e.icon)))
|
|
67
75
|
], !0)
|
|
68
|
-
],
|
|
76
|
+
], 14, X));
|
|
69
77
|
}
|
|
70
|
-
}),
|
|
78
|
+
}), Z = /* @__PURE__ */ w(Y, [["__scopeId", "data-v-875619e6"]]), q = {
|
|
71
79
|
key: 0,
|
|
72
80
|
class: "tr-sender-submit-button__cancel-text"
|
|
73
81
|
}, H = /* @__PURE__ */ y({
|
|
74
82
|
__name: "index",
|
|
75
83
|
setup(t) {
|
|
76
|
-
const { canSubmit: e, loading:
|
|
77
|
-
var
|
|
78
|
-
return (
|
|
79
|
-
}),
|
|
80
|
-
var
|
|
81
|
-
return
|
|
82
|
-
}),
|
|
83
|
-
var
|
|
84
|
-
return ((
|
|
85
|
-
}),
|
|
86
|
-
|
|
84
|
+
const { canSubmit: e, loading: n, defaultActions: a, submit: d, cancel: c, stopText: s } = C(), u = l(() => {
|
|
85
|
+
var _, m;
|
|
86
|
+
return (m = (_ = a.value) == null ? void 0 : _.submit) != null && m.disabled ? !0 : !e.value && !n.value;
|
|
87
|
+
}), r = l(() => {
|
|
88
|
+
var _, m;
|
|
89
|
+
return O((m = (_ = a.value) == null ? void 0 : _.submit) == null ? void 0 : m.tooltip);
|
|
90
|
+
}), p = l(() => {
|
|
91
|
+
var _, m;
|
|
92
|
+
return ((m = (_ = a.value) == null ? void 0 : _.submit) == null ? void 0 : m.tooltipPlacement) ?? "top";
|
|
93
|
+
}), g = () => {
|
|
94
|
+
u.value || (n.value ? c() : d());
|
|
87
95
|
};
|
|
88
|
-
return (
|
|
96
|
+
return (_, m) => r.value && !o(n) ? (i(), f(o(D), {
|
|
89
97
|
key: 0,
|
|
90
|
-
"render-content":
|
|
91
|
-
placement:
|
|
98
|
+
"render-content": r.value,
|
|
99
|
+
placement: p.value,
|
|
92
100
|
effect: "light",
|
|
93
101
|
"visible-arrow": !1,
|
|
94
102
|
"popper-class": "tr-submit-button-tooltip-popper"
|
|
95
103
|
}, {
|
|
96
|
-
default:
|
|
97
|
-
|
|
98
|
-
class:
|
|
104
|
+
default: S(() => [
|
|
105
|
+
k("div", {
|
|
106
|
+
class: v([
|
|
99
107
|
"tr-sender-submit-button",
|
|
100
108
|
{
|
|
101
|
-
"is-disabled":
|
|
102
|
-
"is-loading":
|
|
109
|
+
"is-disabled": u.value,
|
|
110
|
+
"is-loading": o(n)
|
|
103
111
|
}
|
|
104
112
|
]),
|
|
105
|
-
onClick:
|
|
113
|
+
onClick: g
|
|
106
114
|
}, [
|
|
107
|
-
|
|
115
|
+
x(o(N), { class: "tr-sender-submit-button__icon" })
|
|
108
116
|
], 2)
|
|
109
117
|
]),
|
|
110
118
|
_: 1
|
|
111
|
-
}, 8, ["render-content", "placement"])) : (
|
|
119
|
+
}, 8, ["render-content", "placement"])) : (i(), b("div", {
|
|
112
120
|
key: 1,
|
|
113
|
-
class:
|
|
121
|
+
class: v([
|
|
114
122
|
"tr-sender-submit-button",
|
|
115
123
|
{
|
|
116
|
-
"is-disabled":
|
|
117
|
-
"is-loading":
|
|
124
|
+
"is-disabled": u.value,
|
|
125
|
+
"is-loading": o(n)
|
|
118
126
|
}
|
|
119
127
|
]),
|
|
120
|
-
onClick:
|
|
128
|
+
onClick: g
|
|
121
129
|
}, [
|
|
122
|
-
|
|
130
|
+
o(n) ? (i(), b("div", {
|
|
123
131
|
key: 1,
|
|
124
|
-
class:
|
|
132
|
+
class: v(["tr-sender-submit-button__cancel", { "icon-only": !o(s) }])
|
|
125
133
|
}, [
|
|
126
|
-
|
|
127
|
-
s
|
|
128
|
-
], 2)) : (
|
|
134
|
+
x(o(j), { class: "tr-sender-submit-button__cancel-icon" }),
|
|
135
|
+
o(s) ? (i(), b("span", q, T(o(s)), 1)) : h("", !0)
|
|
136
|
+
], 2)) : (i(), f(o(N), {
|
|
129
137
|
key: 0,
|
|
130
138
|
class: "tr-sender-submit-button__icon"
|
|
131
139
|
}))
|
|
132
140
|
], 2));
|
|
133
141
|
}
|
|
134
|
-
}), J = /* @__PURE__ */
|
|
142
|
+
}), J = /* @__PURE__ */ w(H, [["__scopeId", "data-v-a58e69fe"]]), L = () => {
|
|
143
|
+
const { hasContent: t, clearable: e, loading: n, defaultActions: a } = C(), d = l(() => {
|
|
144
|
+
var r, p;
|
|
145
|
+
return ((p = (r = a.value) == null ? void 0 : r.clear) == null ? void 0 : p.disabled) !== void 0 ? a.value.clear.disabled : !1;
|
|
146
|
+
}), c = l(() => {
|
|
147
|
+
var r, p;
|
|
148
|
+
return (p = (r = a.value) == null ? void 0 : r.clear) == null ? void 0 : p.tooltip;
|
|
149
|
+
}), s = l(() => {
|
|
150
|
+
var r, p;
|
|
151
|
+
return ((p = (r = a.value) == null ? void 0 : r.clear) == null ? void 0 : p.tooltipPlacement) ?? "top";
|
|
152
|
+
}), u = l(() => e.value && t.value && !n.value && !d.value);
|
|
153
|
+
return {
|
|
154
|
+
isDisabled: d,
|
|
155
|
+
tooltip: c,
|
|
156
|
+
tooltipPlacement: s,
|
|
157
|
+
show: u
|
|
158
|
+
};
|
|
159
|
+
}, Q = /* @__PURE__ */ y({
|
|
135
160
|
__name: "index",
|
|
136
161
|
setup(t) {
|
|
137
|
-
const {
|
|
138
|
-
|
|
139
|
-
return ((o = (n = l.value) == null ? void 0 : n.clear) == null ? void 0 : o.disabled) !== void 0 ? l.value.clear.disabled : !1;
|
|
140
|
-
}), _ = d(() => {
|
|
141
|
-
var n, o;
|
|
142
|
-
return (o = (n = l.value) == null ? void 0 : n.clear) == null ? void 0 : o.tooltip;
|
|
143
|
-
}), h = d(() => {
|
|
144
|
-
var n, o;
|
|
145
|
-
return ((o = (n = l.value) == null ? void 0 : n.clear) == null ? void 0 : o.tooltipPlacement) ?? "top";
|
|
146
|
-
}), z = d(() => i.value && e.value && !c.value && !u.value), C = () => {
|
|
147
|
-
u.value || r();
|
|
162
|
+
const { clear: e } = C(), { isDisabled: n, tooltip: a, tooltipPlacement: d, show: c } = L(), s = () => {
|
|
163
|
+
n.value || e();
|
|
148
164
|
};
|
|
149
|
-
return (
|
|
165
|
+
return (u, r) => o(c) ? (i(), f(Z, {
|
|
150
166
|
key: 0,
|
|
151
|
-
icon:
|
|
152
|
-
disabled:
|
|
153
|
-
tooltip:
|
|
154
|
-
"tooltip-placement":
|
|
155
|
-
onClick:
|
|
156
|
-
}, null, 8, ["icon", "disabled", "tooltip", "tooltip-placement"])) :
|
|
167
|
+
icon: o(U),
|
|
168
|
+
disabled: o(n),
|
|
169
|
+
tooltip: o(a),
|
|
170
|
+
"tooltip-placement": o(d),
|
|
171
|
+
onClick: s
|
|
172
|
+
}, null, 8, ["icon", "disabled", "tooltip", "tooltip-placement"])) : h("", !0);
|
|
157
173
|
}
|
|
158
|
-
}),
|
|
174
|
+
}), tt = {
|
|
159
175
|
key: 0,
|
|
160
176
|
class: "tr-sender-word-counter"
|
|
161
|
-
},
|
|
177
|
+
}, et = /* @__PURE__ */ y({
|
|
162
178
|
__name: "index",
|
|
163
179
|
setup(t) {
|
|
164
|
-
const { characterCount: e, maxLength:
|
|
165
|
-
return (
|
|
166
|
-
|
|
167
|
-
class:
|
|
168
|
-
},
|
|
169
|
-
|
|
170
|
-
])) :
|
|
180
|
+
const { characterCount: e, maxLength: n, isOverLimit: a, showWordLimit: d } = C(), c = l(() => d.value && n.value !== void 0);
|
|
181
|
+
return (s, u) => c.value ? (i(), b("span", tt, [
|
|
182
|
+
k("span", {
|
|
183
|
+
class: v({ "is-over-limit": o(a) })
|
|
184
|
+
}, T(o(e)), 3),
|
|
185
|
+
k("span", null, "/" + T(o(n)), 1)
|
|
186
|
+
])) : h("", !0);
|
|
171
187
|
}
|
|
172
|
-
}),
|
|
188
|
+
}), ut = /* @__PURE__ */ w(et, [["__scopeId", "data-v-206396cd"]]), ot = {
|
|
189
|
+
key: 0,
|
|
190
|
+
class: "tr-default-action-buttons"
|
|
191
|
+
}, nt = {
|
|
173
192
|
key: 0,
|
|
174
193
|
class: "tr-action-buttons-group"
|
|
175
|
-
},
|
|
194
|
+
}, st = /* @__PURE__ */ y({
|
|
176
195
|
__name: "index",
|
|
177
196
|
setup(t) {
|
|
178
|
-
const { hasContent:
|
|
179
|
-
return (
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
197
|
+
const e = W(), { hasContent: n, loading: a } = C(), { show: d } = L(), c = l(() => !!e.prepend), s = l(() => n.value || a.value), u = l(() => c.value || d.value), r = l(() => c.value || s.value);
|
|
198
|
+
return (p, g) => (i(), f($, { name: "tr-slide-right" }, {
|
|
199
|
+
default: S(() => [
|
|
200
|
+
r.value ? (i(), b("div", ot, [
|
|
201
|
+
u.value ? (i(), b("div", nt, [
|
|
202
|
+
B(p.$slots, "prepend", {}, void 0, !0),
|
|
203
|
+
x($, { name: "tr-slide-right" }, {
|
|
204
|
+
default: S(() => [
|
|
205
|
+
x(Q)
|
|
186
206
|
]),
|
|
187
207
|
_: 1
|
|
188
|
-
})
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
})
|
|
196
|
-
]));
|
|
208
|
+
})
|
|
209
|
+
])) : h("", !0),
|
|
210
|
+
s.value ? (i(), f(J, { key: 1 })) : h("", !0)
|
|
211
|
+
])) : h("", !0)
|
|
212
|
+
]),
|
|
213
|
+
_: 3
|
|
214
|
+
}));
|
|
197
215
|
}
|
|
198
|
-
}),
|
|
216
|
+
}), dt = /* @__PURE__ */ w(st, [["__scopeId", "data-v-e9441989"]]);
|
|
199
217
|
export {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
218
|
+
Z as A,
|
|
219
|
+
dt as D,
|
|
220
|
+
K as S,
|
|
221
|
+
ut as W,
|
|
222
|
+
Q as _,
|
|
223
|
+
J as a,
|
|
224
|
+
C as u
|
|
207
225
|
};
|
package/dist/index3.js
CHANGED
|
@@ -4,7 +4,7 @@ var C = (i, o, e) => D(i, typeof o != "symbol" ? o + "" : o, e);
|
|
|
4
4
|
import { defineComponent as B, toRefs as H, computed as R, watch as F, openBlock as S, createBlock as x, unref as p, ref as V, reactive as A, onUnmounted as P, createElementBlock as j, Fragment as U, normalizeClass as W, createSlots as L, withCtx as y, renderSlot as z, resolveDynamicComponent as M, createCommentVNode as N } from "vue";
|
|
5
5
|
import { e as O } from "./index4.js";
|
|
6
6
|
import { u as I, A as b } from "./index2.js";
|
|
7
|
-
import {
|
|
7
|
+
import { IconImageUpload as T, IconVoice as _, IconRecordingWave as q } from "@opentiny/tiny-robot-svgs";
|
|
8
8
|
import { _ as G } from "./_plugin-vue_export-helper.js";
|
|
9
9
|
const te = /* @__PURE__ */ B({
|
|
10
10
|
__name: "index",
|
package/dist/index4.js
CHANGED
|
@@ -754,20 +754,20 @@ function it(e = {}) {
|
|
|
754
754
|
return { width: r, height: s };
|
|
755
755
|
}
|
|
756
756
|
export {
|
|
757
|
-
|
|
758
|
-
|
|
757
|
+
Ke as a,
|
|
758
|
+
Ze as b,
|
|
759
759
|
et as c,
|
|
760
|
-
|
|
760
|
+
M as d,
|
|
761
761
|
tt as e,
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
762
|
+
de as f,
|
|
763
|
+
ot as g,
|
|
764
|
+
rt as h,
|
|
765
|
+
ve as i,
|
|
766
|
+
nt as j,
|
|
767
|
+
Qe as k,
|
|
768
|
+
it as l,
|
|
769
|
+
qe as m,
|
|
770
770
|
Je as o,
|
|
771
|
-
|
|
772
|
-
|
|
771
|
+
S as u,
|
|
772
|
+
Ue as w
|
|
773
773
|
};
|
package/dist/index6.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as S, openBlock as g, createElementBlock as C, renderSlot as E, ref as L, computed as y, watch as U, unref as B, normalizeClass as K, createVNode as
|
|
1
|
+
import { defineComponent as S, openBlock as g, createElementBlock as C, renderSlot as E, ref as L, computed as y, watch as U, unref as B, normalizeClass as K, createVNode as W, watchEffect as q, nextTick as ee, Fragment as F, createElementVNode as x, mergeProps as $, toDisplayString as z, withDirectives as Z, vShow as Q, createBlock as T, resolveDynamicComponent as Y, normalizeProps as P, guardReactiveProps as D, createCommentVNode as se, useCssModule as je, renderList as j, markRaw as w, inject as I, provide as A, toValue as k, reactive as We, readonly as ze, withCtx as M, onMounted as ve, onUnmounted as Ve } from "vue";
|
|
2
2
|
import { _ as N } from "./_plugin-vue_export-helper.js";
|
|
3
3
|
import { IconLoading as he, IconAtom as Xe, IconArrowDown as ye, IconPlugin as be, IconError as qe, IconCancelled as Ze } from "@opentiny/tiny-robot-svgs";
|
|
4
|
-
import {
|
|
4
|
+
import { j as Qe, m as et, d as tt, u as nt } from "./index4.js";
|
|
5
5
|
const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matches"), Be = Symbol("bubble-box-fallback-renderer"), Ce = Symbol("bubble-box-attributes"), Ee = Symbol(
|
|
6
6
|
"bubble-box-prop-fallback-renderer"
|
|
7
7
|
), ke = Symbol("bubble-content-renderer-matches"), Se = Symbol(
|
|
@@ -67,7 +67,7 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
67
67
|
},
|
|
68
68
|
setup(t) {
|
|
69
69
|
return (e, n) => (g(), C("div", lt, [
|
|
70
|
-
|
|
70
|
+
W(B(he))
|
|
71
71
|
]));
|
|
72
72
|
}
|
|
73
73
|
}), $e = /* @__PURE__ */ N(ct, [["__scopeId", "data-v-bc1b5ff4"]]), ut = { class: "title" }, it = { class: "detail" }, dt = /* @__PURE__ */ S({
|
|
@@ -110,10 +110,10 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
110
110
|
x("div", {
|
|
111
111
|
class: K(["icon-and-text", { thinking: (p = e.message.state) == null ? void 0 : p.thinking }])
|
|
112
112
|
}, [
|
|
113
|
-
|
|
113
|
+
W(B(Xe)),
|
|
114
114
|
x("span", ut, z((f = e.message.state) != null && f.thinking ? "正在思考" : "已思考"), 1)
|
|
115
115
|
], 2),
|
|
116
|
-
|
|
116
|
+
W(B(ye), {
|
|
117
117
|
class: K(["expand-icon", { "-rotate-90": !i.value }])
|
|
118
118
|
}, null, 8, ["class"])
|
|
119
119
|
]),
|
|
@@ -189,7 +189,7 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
189
189
|
} catch {
|
|
190
190
|
}
|
|
191
191
|
return R;
|
|
192
|
-
}, u =
|
|
192
|
+
}, u = je(), b = (_) => _.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), m = (_) => {
|
|
193
193
|
if (!_)
|
|
194
194
|
return "";
|
|
195
195
|
let v = b(_);
|
|
@@ -236,7 +236,7 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
236
236
|
])
|
|
237
237
|
]),
|
|
238
238
|
x("div", vt, [
|
|
239
|
-
|
|
239
|
+
W(B(ye), {
|
|
240
240
|
class: K(["expand-icon", { "-rotate-90": !d.value }]),
|
|
241
241
|
onClick: c
|
|
242
242
|
}, null, 8, ["class"])
|
|
@@ -276,7 +276,7 @@ const xe = Symbol("bubble-message-group"), Re = Symbol("bubble-box-renderer-matc
|
|
|
276
276
|
return (i, s) => (g(), C(F, null, [
|
|
277
277
|
(g(), T(Y(B(r).renderer), P(D({ ...B(r).attributes, ...B(o) })), null, 16)),
|
|
278
278
|
x("div", $({ class: "tr-bubble__tools" }, i.$attrs), [
|
|
279
|
-
(g(!0), C(F, null,
|
|
279
|
+
(g(!0), C(F, null, j(e.message.tool_calls, (a, u) => (g(), T(we, $({
|
|
280
280
|
key: a.id
|
|
281
281
|
}, { ref_for: !0 }, e, { "tool-call-index": u }), null, 16, ["tool-call-index"]))), 128))
|
|
282
282
|
], 16)
|
|
@@ -401,7 +401,7 @@ function ce(t) {
|
|
|
401
401
|
const e = I(oe, void 0);
|
|
402
402
|
if (e)
|
|
403
403
|
return e;
|
|
404
|
-
const n =
|
|
404
|
+
const n = We(t || {});
|
|
405
405
|
return A(oe, n), n;
|
|
406
406
|
}
|
|
407
407
|
function ue() {
|
|
@@ -616,7 +616,7 @@ const Ft = async () => {
|
|
|
616
616
|
class: K(["tr-bubble__avatar", l.$style["tr-bubble__avatar"]])
|
|
617
617
|
}, null, 8, ["class"])) : se("", !0),
|
|
618
618
|
x("div", Ht, [
|
|
619
|
-
m.value ? (g(!0), C(F, { key: 0 },
|
|
619
|
+
m.value ? (g(!0), C(F, { key: 0 }, j(m.value, (h, c) => (g(), T(_e, {
|
|
620
620
|
key: c,
|
|
621
621
|
class: "tr-bubble__box",
|
|
622
622
|
role: n.role,
|
|
@@ -626,7 +626,7 @@ const Ft = async () => {
|
|
|
626
626
|
"content-index": c
|
|
627
627
|
}, {
|
|
628
628
|
default: M(() => [
|
|
629
|
-
|
|
629
|
+
W(me, {
|
|
630
630
|
message: a.value.at(0),
|
|
631
631
|
"content-index": c,
|
|
632
632
|
onStateChange: d[0] || (d[0] = (_) => r("state-change", { ..._, messageIndex: 0 }))
|
|
@@ -646,10 +646,10 @@ const Ft = async () => {
|
|
|
646
646
|
messages: a.value
|
|
647
647
|
}, {
|
|
648
648
|
default: M(() => [
|
|
649
|
-
(g(!0), C(F, null,
|
|
649
|
+
(g(!0), C(F, null, j(a.value, (h, c) => (g(), C(F, {
|
|
650
650
|
key: `message-${c}`
|
|
651
651
|
}, [
|
|
652
|
-
(g(!0), C(F, null,
|
|
652
|
+
(g(!0), C(F, null, j(u(h), (_, v) => (g(), T(me, {
|
|
653
653
|
key: `content-${v}`,
|
|
654
654
|
message: h,
|
|
655
655
|
"content-index": v,
|
|
@@ -690,7 +690,7 @@ function ge(t, e) {
|
|
|
690
690
|
});
|
|
691
691
|
return n;
|
|
692
692
|
}
|
|
693
|
-
function
|
|
693
|
+
function jt(t, e, n) {
|
|
694
694
|
const { scrollOnMount: o = !0, bottomThreshold: r = 20, scrollThrottle: i = 0 } = n ?? {}, s = L(!0);
|
|
695
695
|
let a = !1;
|
|
696
696
|
const u = /* @__PURE__ */ new Set(), b = () => nt(t), { y: m, isScrolling: p, arrivedState: f } = Qe(b, { throttle: i }), l = (c) => c.scrollHeight - c.scrollTop - c.clientHeight <= r, d = async (c = "auto") => {
|
|
@@ -737,7 +737,7 @@ function Wt(t, e, n) {
|
|
|
737
737
|
arrivedState: f
|
|
738
738
|
};
|
|
739
739
|
}
|
|
740
|
-
const
|
|
740
|
+
const Wt = /* @__PURE__ */ S({
|
|
741
741
|
__name: "BubbleItem",
|
|
742
742
|
props: {
|
|
743
743
|
messageGroup: {},
|
|
@@ -792,7 +792,7 @@ const jt = /* @__PURE__ */ S({
|
|
|
792
792
|
let a = async () => {
|
|
793
793
|
};
|
|
794
794
|
if (o.autoScroll) {
|
|
795
|
-
const p = y(() => o.messages.at(-1)), { scrollToBottom: f } =
|
|
795
|
+
const p = y(() => o.messages.at(-1)), { scrollToBottom: f } = jt(s, () => {
|
|
796
796
|
var l, d;
|
|
797
797
|
return [
|
|
798
798
|
o.messages.length,
|
|
@@ -848,9 +848,9 @@ const jt = /* @__PURE__ */ S({
|
|
|
848
848
|
ref_key: "listRef",
|
|
849
849
|
ref: s
|
|
850
850
|
}, [
|
|
851
|
-
(g(!0), C(F, null,
|
|
851
|
+
(g(!0), C(F, null, j(m.value, (l, d) => {
|
|
852
852
|
var h;
|
|
853
|
-
return g(), T(
|
|
853
|
+
return g(), T(Wt, {
|
|
854
854
|
key: d,
|
|
855
855
|
role: l.role || o.fallbackRole,
|
|
856
856
|
"role-config": (h = o.roleConfigs) == null ? void 0 : h[l.role || o.fallbackRole],
|
|
@@ -974,5 +974,5 @@ export {
|
|
|
974
974
|
ie as h,
|
|
975
975
|
Ye as i,
|
|
976
976
|
Pt as j,
|
|
977
|
-
|
|
977
|
+
jt as u
|
|
978
978
|
};
|