@icanbwell/baileyai-chat-ui 1.0.21 → 1.0.23
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/baileyai-chat-ui.cjs +3 -3
- package/dist/baileyai-chat-ui.css +1 -1
- package/dist/baileyai-chat-ui.js +357 -340
- package/dist/index.d.ts +7 -1
- package/package.json +1 -1
package/dist/baileyai-chat-ui.js
CHANGED
|
@@ -122,7 +122,7 @@ function N(e) {
|
|
|
122
122
|
...e.comment ? { comment: e.comment } : {}
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function P(e) {
|
|
126
126
|
let t = [];
|
|
127
127
|
return e.messages.forEach((e, n) => {
|
|
128
128
|
if (e.hidden || e.role !== "user" && e.role !== "assistant") return;
|
|
@@ -138,14 +138,14 @@ function te(e) {
|
|
|
138
138
|
});
|
|
139
139
|
}), t;
|
|
140
140
|
}
|
|
141
|
-
var
|
|
142
|
-
function
|
|
143
|
-
let t = new Set(e.current.map(
|
|
141
|
+
var F = (e) => e.serverMessageId ?? e.id;
|
|
142
|
+
function te(e) {
|
|
143
|
+
let t = new Set(e.current.map(F)), n = e.earlier.filter((e) => !t.has(F(e)));
|
|
144
144
|
return n.length === 0 ? e.current : [...n, ...e.current];
|
|
145
145
|
}
|
|
146
146
|
//#endregion
|
|
147
147
|
//#region src/logic/conversationId.ts
|
|
148
|
-
function
|
|
148
|
+
function ne(e) {
|
|
149
149
|
let t = e.sub.trim();
|
|
150
150
|
if (!t) return !1;
|
|
151
151
|
let n = `${t}:`;
|
|
@@ -153,15 +153,15 @@ function re(e) {
|
|
|
153
153
|
}
|
|
154
154
|
//#endregion
|
|
155
155
|
//#region src/logic/conversationStorage.ts
|
|
156
|
-
var
|
|
157
|
-
function
|
|
156
|
+
var re = "baileyai-chat-ui:conversation";
|
|
157
|
+
function ie() {
|
|
158
158
|
return {
|
|
159
159
|
get: (e) => window.sessionStorage.getItem(e),
|
|
160
160
|
set: (e, t) => window.sessionStorage.setItem(e, t),
|
|
161
161
|
remove: (e) => window.sessionStorage.removeItem(e)
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function I() {
|
|
165
165
|
let e = /* @__PURE__ */ new Map();
|
|
166
166
|
return {
|
|
167
167
|
get: (t) => e.get(t) ?? null,
|
|
@@ -171,12 +171,12 @@ function F() {
|
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
173
|
//#region src/logic/useBaileyChat.ts
|
|
174
|
-
var
|
|
174
|
+
var ae = 200, oe = 100, se = 15e4, L = () => typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `bailey-${Date.now()}-${Math.random().toString(36).slice(2)}`, ce = (e, t, n) => {
|
|
175
175
|
if (e === 401 || e === 403) return "Bailey isn't reachable with your current login.";
|
|
176
176
|
let r = `Bailey request failed (status ${e ?? "network error"}).`, i = (n || t || "").trim();
|
|
177
|
-
return i ? `${r} ${i.length >
|
|
177
|
+
return i ? `${r} ${i.length > ae ? `${i.slice(0, ae)}…` : i}` : r;
|
|
178
178
|
};
|
|
179
|
-
function
|
|
179
|
+
function le(e, t, n) {
|
|
180
180
|
if (e) try {
|
|
181
181
|
return e.get(t) || void 0;
|
|
182
182
|
} catch (e) {
|
|
@@ -184,97 +184,97 @@ function ce(e, t, n) {
|
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function ue(e, t) {
|
|
188
188
|
t.signal.aborted || typeof e != "string" || (t.historyStatus = e);
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function de(e, t, n, r) {
|
|
191
191
|
try {
|
|
192
192
|
e?.set(t, n);
|
|
193
193
|
} catch (e) {
|
|
194
194
|
r(e, "write");
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function fe(e, t, n) {
|
|
198
198
|
try {
|
|
199
199
|
e?.remove(t);
|
|
200
200
|
} catch (e) {
|
|
201
201
|
n(e, "remove");
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var
|
|
205
|
-
function
|
|
204
|
+
var R = (e, t) => t ? `${e}:${t}` : e;
|
|
205
|
+
function pe(e) {
|
|
206
206
|
let { seed: t, sub: n, storage: r, key: i, report: a } = e;
|
|
207
|
-
if (!n) return t ||
|
|
208
|
-
if (t &&
|
|
207
|
+
if (!n) return t || le(r, i, a);
|
|
208
|
+
if (t && ne({
|
|
209
209
|
conversationId: t,
|
|
210
210
|
sub: n
|
|
211
211
|
})) return t;
|
|
212
|
-
let o =
|
|
212
|
+
let o = le(r, i, a);
|
|
213
213
|
if (o) {
|
|
214
|
-
if (
|
|
214
|
+
if (ne({
|
|
215
215
|
conversationId: o,
|
|
216
216
|
sub: n
|
|
217
217
|
})) return o;
|
|
218
|
-
|
|
218
|
+
fe(r, i, a);
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
var
|
|
222
|
-
let [x, S] = f([]), [C, w] = f([]), [T, E] = f(null), [D, O] = f("idle"), [ee, j] = f(null), M = h !== void 0 && h.trim() === "", N = M ? void 0 : h?.trim() || void 0,
|
|
221
|
+
var z = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i, firstUserMessagePrefix: o, onAssistantMessageComplete: c, idleTimeoutMs: l = se, client: p, conversationId: m, sub: h, storage: g, storageKey: _ = re, sendFullTranscript: v = !1, onStorageError: y, onContextLoss: b }) => {
|
|
222
|
+
let [x, S] = f([]), [C, w] = f([]), [T, E] = f(null), [D, O] = f("idle"), [ee, j] = f(null), M = h !== void 0 && h.trim() === "", N = M ? void 0 : h?.trim() || void 0, F = u(() => ie(), []), I = M ? null : g === void 0 ? F : g || null, ae = d(y), le = d(b);
|
|
223
223
|
s(() => {
|
|
224
|
-
|
|
224
|
+
ae.current = y, le.current = b;
|
|
225
225
|
}, [y, b]);
|
|
226
|
-
let
|
|
226
|
+
let z = a((e, t) => {
|
|
227
227
|
try {
|
|
228
|
-
|
|
228
|
+
ae.current?.(e, t);
|
|
229
229
|
} catch {}
|
|
230
|
-
}, []),
|
|
230
|
+
}, []), B = (e) => pe({
|
|
231
231
|
seed: m,
|
|
232
232
|
sub: N,
|
|
233
|
-
storage:
|
|
234
|
-
key:
|
|
233
|
+
storage: I,
|
|
234
|
+
key: R(_, N),
|
|
235
235
|
report: e
|
|
236
|
-
}), [
|
|
236
|
+
}), [V] = f(() => {
|
|
237
237
|
let e = [];
|
|
238
238
|
return {
|
|
239
|
-
id:
|
|
239
|
+
id: B((t, n) => void e.push({
|
|
240
240
|
error: t,
|
|
241
241
|
operation: n
|
|
242
242
|
})),
|
|
243
243
|
errors: e
|
|
244
244
|
};
|
|
245
|
-
}), [
|
|
246
|
-
|
|
247
|
-
}, [
|
|
245
|
+
}), [H, U] = f(V.id), [me, W] = f(V.errors.length > 0), G = a((e, t) => {
|
|
246
|
+
W(!0), z(e, t);
|
|
247
|
+
}, [z]);
|
|
248
248
|
s(() => {
|
|
249
|
-
|
|
250
|
-
}, [
|
|
251
|
-
M &&
|
|
252
|
-
}, [M,
|
|
253
|
-
let K = d(
|
|
254
|
-
storage:
|
|
255
|
-
key:
|
|
249
|
+
V.errors.forEach(({ error: e, operation: t }) => z(e, t));
|
|
250
|
+
}, [V, z]), s(() => {
|
|
251
|
+
M && z(/* @__PURE__ */ Error("sub is blank"), "key");
|
|
252
|
+
}, [M, z]);
|
|
253
|
+
let K = d(H), q = d({
|
|
254
|
+
storage: I,
|
|
255
|
+
key: R(_, N),
|
|
256
256
|
sub: N,
|
|
257
257
|
sendFullTranscript: v
|
|
258
258
|
});
|
|
259
259
|
s(() => {
|
|
260
260
|
q.current = {
|
|
261
|
-
storage:
|
|
262
|
-
key:
|
|
261
|
+
storage: I,
|
|
262
|
+
key: R(_, N),
|
|
263
263
|
sub: N,
|
|
264
264
|
sendFullTranscript: v
|
|
265
265
|
};
|
|
266
266
|
}, [
|
|
267
|
-
|
|
267
|
+
I,
|
|
268
268
|
_,
|
|
269
269
|
N,
|
|
270
270
|
v
|
|
271
271
|
]);
|
|
272
|
-
let he = g === !1 ? "off" :
|
|
273
|
-
|
|
272
|
+
let he = g === !1 ? "off" : me || M ? "degraded" : "ok", [ge, _e] = f(!1), [ve, J] = f("idle"), [ye, be] = f(!1), Y = d(0), xe = d(null), Se = d(null), X = d(!1), Z = a(() => {
|
|
273
|
+
Y.current += 1, xe.current?.abort(), xe.current = null, Se.current = null, X.current = !1, be(!1), J("idle");
|
|
274
274
|
}, []), Ce = d(p);
|
|
275
275
|
s(() => {
|
|
276
276
|
Ce.current = p;
|
|
277
|
-
}, [p]), s(() => () =>
|
|
277
|
+
}, [p]), s(() => () => xe.current?.abort(), []);
|
|
278
278
|
let we = d(null), Te = d(""), Ee = d(0), De = d([]);
|
|
279
279
|
s(() => {
|
|
280
280
|
De.current = x;
|
|
@@ -296,10 +296,10 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
296
296
|
else return;
|
|
297
297
|
if (n.heldId || e === K.current) return;
|
|
298
298
|
let { sub: r, storage: i, key: a } = q.current;
|
|
299
|
-
r && !
|
|
299
|
+
r && !ne({
|
|
300
300
|
conversationId: e,
|
|
301
301
|
sub: r
|
|
302
|
-
}) || (K.current = e,
|
|
302
|
+
}) || (K.current = e, U(e), de(i, a, e, G));
|
|
303
303
|
}, [G]), Ne = a((e, t, n, r) => {
|
|
304
304
|
let i = (e) => {
|
|
305
305
|
n.push(e), w((t) => [...t, e]);
|
|
@@ -388,13 +388,13 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
388
388
|
reportedId: t.response?.conversation?.id,
|
|
389
389
|
source: "event",
|
|
390
390
|
turn: r
|
|
391
|
-
}),
|
|
391
|
+
}), ue(t.response?.conversation?.history_status, r), !1;
|
|
392
392
|
if (t.type === "response.completed") {
|
|
393
393
|
$({
|
|
394
394
|
reportedId: t.response?.conversation?.id,
|
|
395
395
|
source: "event",
|
|
396
396
|
turn: r
|
|
397
|
-
}),
|
|
397
|
+
}), ue(t.response?.conversation?.history_status, r);
|
|
398
398
|
let n = typeof t.message_id == "string" && t.message_id ? t.message_id : void 0;
|
|
399
399
|
n && S((t) => t.map((t) => t.id === e ? {
|
|
400
400
|
...t,
|
|
@@ -451,7 +451,7 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
451
451
|
O("streaming"), j(null), _e(!1);
|
|
452
452
|
let s = Date.now();
|
|
453
453
|
Ee.current = s;
|
|
454
|
-
let l =
|
|
454
|
+
let l = L(), u = {
|
|
455
455
|
id: l,
|
|
456
456
|
role: "assistant",
|
|
457
457
|
content: "",
|
|
@@ -576,7 +576,7 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
576
576
|
return;
|
|
577
577
|
}
|
|
578
578
|
if (a === void 0 || a >= 400) {
|
|
579
|
-
D(
|
|
579
|
+
D(ce(a, o, u), {
|
|
580
580
|
httpStatus: a,
|
|
581
581
|
rawBody: o || void 0
|
|
582
582
|
});
|
|
@@ -584,9 +584,9 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
584
584
|
}
|
|
585
585
|
let p = _.reportedId, w = p !== m, ee = _.historyStatus === "failed" || _.historyStatus === "empty";
|
|
586
586
|
if (m && !_.signal.aborted && (w || ee)) {
|
|
587
|
-
K.current = void 0,
|
|
587
|
+
K.current = void 0, U(void 0), fe(q.current.storage, q.current.key, G), Z(), _e(!0);
|
|
588
588
|
try {
|
|
589
|
-
|
|
589
|
+
le.current?.({
|
|
590
590
|
sentId: m,
|
|
591
591
|
...p ? { reportedId: p } : {},
|
|
592
592
|
reason: w ? "id" : "history"
|
|
@@ -658,7 +658,7 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
658
658
|
if (!t) return;
|
|
659
659
|
Te.current = t;
|
|
660
660
|
let n = {
|
|
661
|
-
id:
|
|
661
|
+
id: L(),
|
|
662
662
|
role: "user",
|
|
663
663
|
content: t,
|
|
664
664
|
createdAt: Date.now()
|
|
@@ -670,7 +670,7 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
670
670
|
if (!n) return;
|
|
671
671
|
Te.current = n;
|
|
672
672
|
let r = t?.trim(), i = {
|
|
673
|
-
id:
|
|
673
|
+
id: L(),
|
|
674
674
|
role: "user",
|
|
675
675
|
content: n,
|
|
676
676
|
createdAt: Date.now(),
|
|
@@ -695,14 +695,14 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
695
695
|
}, []), He = a(() => {
|
|
696
696
|
we.current?.abort(), Z(), _e(!1), Fe([]), Q.current = [], w([]), E(null), O("idle"), j(null), Te.current = "";
|
|
697
697
|
}, [Z, Fe]), Ue = a(() => {
|
|
698
|
-
He(), K.current = void 0,
|
|
698
|
+
He(), K.current = void 0, U(void 0), fe(q.current.storage, q.current.key, G);
|
|
699
699
|
}, [He, G]), We = d(N);
|
|
700
700
|
s(() => {
|
|
701
701
|
let e = We.current;
|
|
702
702
|
if (e === N) return;
|
|
703
703
|
We.current = N, e !== void 0 && He();
|
|
704
|
-
let t =
|
|
705
|
-
K.current = t,
|
|
704
|
+
let t = B(G);
|
|
705
|
+
K.current = t, U(t);
|
|
706
706
|
}, [N]);
|
|
707
707
|
let Ge = a((e) => {
|
|
708
708
|
we.current?.abort();
|
|
@@ -714,13 +714,13 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
714
714
|
}, [Fe]), Ke = a((e) => {
|
|
715
715
|
Z(), Ge(e);
|
|
716
716
|
}, [Z, Ge]), qe = a((e) => {
|
|
717
|
-
K.current = e,
|
|
717
|
+
K.current = e, U(e), de(q.current.storage, q.current.key, e, G), _e(!1);
|
|
718
718
|
}, [G]), Je = a((e) => {
|
|
719
719
|
let t = e.hasMoreBefore && e.nextBeforeAbsoluteIndex !== null;
|
|
720
|
-
|
|
720
|
+
Se.current = t ? e.nextBeforeAbsoluteIndex : null, be(t);
|
|
721
721
|
}, []);
|
|
722
722
|
return {
|
|
723
|
-
conversationId:
|
|
723
|
+
conversationId: H,
|
|
724
724
|
persistence: he,
|
|
725
725
|
contextLost: ge,
|
|
726
726
|
messages: x,
|
|
@@ -737,24 +737,24 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
737
737
|
newChat: Ue,
|
|
738
738
|
loadMessages: Ke,
|
|
739
739
|
loadConversation: a(async ({ conversationId: e }) => {
|
|
740
|
-
let t = Ce.current, { sub: n } = q.current, r = !!e && (!n ||
|
|
740
|
+
let t = Ce.current, { sub: n } = q.current, r = !!e && (!n || ne({
|
|
741
741
|
conversationId: e,
|
|
742
742
|
sub: n
|
|
743
743
|
}));
|
|
744
744
|
if (!t || !r) throw J("error"), Error(t ? "invalid conversation id" : "no client");
|
|
745
745
|
we.current?.abort(), Z();
|
|
746
|
-
let i =
|
|
747
|
-
|
|
746
|
+
let i = Y.current, a = new AbortController();
|
|
747
|
+
xe.current = a, J("loading");
|
|
748
748
|
try {
|
|
749
749
|
let n = await t.getConversation({
|
|
750
750
|
conversationId: e,
|
|
751
751
|
limit: oe,
|
|
752
752
|
signal: a.signal
|
|
753
753
|
});
|
|
754
|
-
if (i !==
|
|
755
|
-
Ge(
|
|
754
|
+
if (i !== Y.current) return;
|
|
755
|
+
Ge(P({ messages: n.messages })), qe(e), Je(n), J("idle");
|
|
756
756
|
} catch (e) {
|
|
757
|
-
if (i !==
|
|
757
|
+
if (i !== Y.current) return;
|
|
758
758
|
throw J("error"), e;
|
|
759
759
|
}
|
|
760
760
|
}, [
|
|
@@ -764,10 +764,10 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
764
764
|
Ge
|
|
765
765
|
]),
|
|
766
766
|
loadEarlier: a(async () => {
|
|
767
|
-
let e = Ce.current, t = K.current, n =
|
|
768
|
-
if (!e || !t || n === null ||
|
|
769
|
-
let r =
|
|
770
|
-
|
|
767
|
+
let e = Ce.current, t = K.current, n = Se.current;
|
|
768
|
+
if (!e || !t || n === null || X.current) return;
|
|
769
|
+
let r = Y.current, i = new AbortController();
|
|
770
|
+
xe.current = i, X.current = !0, J("loading");
|
|
771
771
|
try {
|
|
772
772
|
let a = await e.getConversation({
|
|
773
773
|
conversationId: t,
|
|
@@ -775,36 +775,36 @@ var V = ({ transport: e, model: t, instructions: n, tools: r = [], toolChoice: i
|
|
|
775
775
|
beforeAbsoluteIndex: n,
|
|
776
776
|
signal: i.signal
|
|
777
777
|
});
|
|
778
|
-
if (r !==
|
|
779
|
-
let o =
|
|
780
|
-
Q.current =
|
|
778
|
+
if (r !== Y.current) return;
|
|
779
|
+
let o = P({ messages: a.messages });
|
|
780
|
+
Q.current = te({
|
|
781
781
|
current: Q.current,
|
|
782
782
|
earlier: o
|
|
783
783
|
}), S((e) => {
|
|
784
|
-
let t =
|
|
784
|
+
let t = te({
|
|
785
785
|
current: e,
|
|
786
786
|
earlier: o
|
|
787
787
|
});
|
|
788
788
|
return De.current = t, t;
|
|
789
789
|
}), Je(a), J("idle");
|
|
790
790
|
} catch (e) {
|
|
791
|
-
if (r !==
|
|
791
|
+
if (r !== Y.current) return;
|
|
792
792
|
throw J("error"), e;
|
|
793
793
|
} finally {
|
|
794
|
-
r ===
|
|
794
|
+
r === Y.current && (X.current = !1);
|
|
795
795
|
}
|
|
796
796
|
}, [Je]),
|
|
797
797
|
hasEarlier: ye,
|
|
798
798
|
historyStatus: ve
|
|
799
799
|
};
|
|
800
|
-
},
|
|
800
|
+
}, B = class extends Error {
|
|
801
801
|
status;
|
|
802
802
|
kind;
|
|
803
803
|
constructor(e) {
|
|
804
|
-
super(e.message ??
|
|
804
|
+
super(e.message ?? V(e), e.cause === void 0 ? void 0 : { cause: e.cause }), this.name = "BaileyApiError", this.status = e.status, this.kind = e.kind;
|
|
805
805
|
}
|
|
806
806
|
};
|
|
807
|
-
function
|
|
807
|
+
function V(e) {
|
|
808
808
|
switch (e.kind) {
|
|
809
809
|
case "http": return `Bailey request failed (status ${e.status})`;
|
|
810
810
|
case "timeout": return "Bailey request timed out";
|
|
@@ -813,16 +813,16 @@ function U(e) {
|
|
|
813
813
|
default: return "Bailey request failed (network error)";
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
|
-
var
|
|
816
|
+
var H = class extends Error {
|
|
817
817
|
operation;
|
|
818
818
|
constructor(e) {
|
|
819
819
|
super(`Bailey cleanup failed (${e.operation})`), this.name = "BaileyCleanupError", this.operation = e.operation;
|
|
820
820
|
}
|
|
821
|
-
},
|
|
821
|
+
}, U = (e) => e instanceof B ? e : new B({
|
|
822
822
|
status: 0,
|
|
823
823
|
kind: "network"
|
|
824
824
|
});
|
|
825
|
-
function
|
|
825
|
+
function me(e) {
|
|
826
826
|
let { pageSize: t, enabled: n = !0 } = e, [r, i] = f([]), [o, c] = f(n ? "loading" : "idle"), [l, u] = f(null), [p, m] = f(null), h = d(e.client), g = d([]);
|
|
827
827
|
s(() => {
|
|
828
828
|
h.current = e.client, g.current = r;
|
|
@@ -845,7 +845,7 @@ function pe(e) {
|
|
|
845
845
|
}), _.current = r.nextCursor, m(r.nextCursor), u(null), c("idle");
|
|
846
846
|
} catch (e) {
|
|
847
847
|
if (n.signal.aborted) return;
|
|
848
|
-
u(
|
|
848
|
+
u(U(e)), c("error");
|
|
849
849
|
}
|
|
850
850
|
}, [t]);
|
|
851
851
|
s(() => {
|
|
@@ -883,7 +883,7 @@ function pe(e) {
|
|
|
883
883
|
}
|
|
884
884
|
//#endregion
|
|
885
885
|
//#region src/client/routes.ts
|
|
886
|
-
function
|
|
886
|
+
function W(e) {
|
|
887
887
|
return e.replace(/\/+$/, "");
|
|
888
888
|
}
|
|
889
889
|
function G(e, t) {
|
|
@@ -894,22 +894,22 @@ function G(e, t) {
|
|
|
894
894
|
}
|
|
895
895
|
var K = {
|
|
896
896
|
responses(e) {
|
|
897
|
-
return `${
|
|
897
|
+
return `${W(e)}/responses`;
|
|
898
898
|
},
|
|
899
899
|
conversations(e, t) {
|
|
900
|
-
return G(`${
|
|
900
|
+
return G(`${W(e)}/conversations`, {
|
|
901
901
|
limit: t.limit,
|
|
902
902
|
cursor: t.cursor
|
|
903
903
|
});
|
|
904
904
|
},
|
|
905
905
|
conversation(e, t, n) {
|
|
906
|
-
return G(`${
|
|
906
|
+
return G(`${W(e)}/conversations/${encodeURIComponent(t)}`, {
|
|
907
907
|
limit: n.limit,
|
|
908
908
|
before_absolute_index: n.beforeAbsoluteIndex
|
|
909
909
|
});
|
|
910
910
|
},
|
|
911
911
|
feedback(e, t, n) {
|
|
912
|
-
return `${
|
|
912
|
+
return `${W(e)}/conversations/${encodeURIComponent(t)}/messages/${encodeURIComponent(n)}/feedback`;
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
915
|
//#endregion
|
|
@@ -934,9 +934,9 @@ function ge(e) {
|
|
|
934
934
|
...e.status === void 0 ? {} : { interrupted: !0 }
|
|
935
935
|
};
|
|
936
936
|
}
|
|
937
|
-
var _e = 3e4, ve = 155e3, J = "x-chat-id", ye = "header",
|
|
937
|
+
var _e = 3e4, ve = 155e3, J = "x-chat-id", ye = "header", be = "body", Y = "x-request-id", xe = "x-conversation-id", Se = "x-message-id", X = (e) => e && typeof e == "object" ? e : {}, Z = (e, t = "") => typeof e == "string" ? e : t, Ce = (e, t = 0) => typeof e == "number" ? e : t;
|
|
938
938
|
function we(e) {
|
|
939
|
-
let t =
|
|
939
|
+
let t = X(e);
|
|
940
940
|
return {
|
|
941
941
|
conversationId: Z(t.conversation_id),
|
|
942
942
|
title: typeof t.title == "string" ? t.title : null,
|
|
@@ -948,7 +948,7 @@ function we(e) {
|
|
|
948
948
|
}
|
|
949
949
|
function Te(e) {
|
|
950
950
|
if (!e || typeof e != "object") return null;
|
|
951
|
-
let t =
|
|
951
|
+
let t = X(e);
|
|
952
952
|
return {
|
|
953
953
|
rating: Z(t.rating),
|
|
954
954
|
reasonCodes: Array.isArray(t.reason_codes) ? t.reason_codes.filter((e) => typeof e == "string") : [],
|
|
@@ -957,7 +957,7 @@ function Te(e) {
|
|
|
957
957
|
};
|
|
958
958
|
}
|
|
959
959
|
function Ee(e) {
|
|
960
|
-
let t =
|
|
960
|
+
let t = X(e);
|
|
961
961
|
return {
|
|
962
962
|
messageId: Z(t.message_id),
|
|
963
963
|
role: Z(t.role),
|
|
@@ -980,22 +980,22 @@ function De(e) {
|
|
|
980
980
|
};
|
|
981
981
|
}
|
|
982
982
|
function Q(e) {
|
|
983
|
-
return e.timedOut() ? new
|
|
983
|
+
return e.timedOut() ? new B({
|
|
984
984
|
status: 0,
|
|
985
985
|
kind: "timeout",
|
|
986
986
|
cause: e.signal.reason
|
|
987
|
-
}) : new
|
|
987
|
+
}) : new B({
|
|
988
988
|
status: 0,
|
|
989
989
|
kind: "aborted"
|
|
990
990
|
});
|
|
991
991
|
}
|
|
992
992
|
function Oe(e) {
|
|
993
993
|
let { baseUrl: t, getHeaders: n, onAuthError: r } = e, i = e.requestTimeoutMs ?? _e, a = e.idleTimeoutMs ?? ve, o = e.conversationVia ?? ye;
|
|
994
|
-
if (o !== ye && o !==
|
|
994
|
+
if (o !== ye && o !== be) throw TypeError("createBaileyClient: conversationVia must be 'header' or 'body'");
|
|
995
995
|
let s = e.fetch ?? ((e, t) => globalThis.fetch(e, t));
|
|
996
996
|
function c(t) {
|
|
997
997
|
try {
|
|
998
|
-
e.onCleanupError?.(new
|
|
998
|
+
e.onCleanupError?.(new H({ operation: t }));
|
|
999
999
|
} catch {}
|
|
1000
1000
|
}
|
|
1001
1001
|
function l(e) {
|
|
@@ -1014,7 +1014,7 @@ function Oe(e) {
|
|
|
1014
1014
|
...await n()
|
|
1015
1015
|
};
|
|
1016
1016
|
} catch {
|
|
1017
|
-
throw new
|
|
1017
|
+
throw new B({
|
|
1018
1018
|
status: 0,
|
|
1019
1019
|
kind: "network"
|
|
1020
1020
|
});
|
|
@@ -1030,18 +1030,18 @@ function Oe(e) {
|
|
|
1030
1030
|
signal: t.signal
|
|
1031
1031
|
});
|
|
1032
1032
|
} catch (e) {
|
|
1033
|
-
throw t.signal.aborted ? Q(t) : new
|
|
1033
|
+
throw t.signal.aborted ? Q(t) : new B({
|
|
1034
1034
|
status: 0,
|
|
1035
1035
|
kind: "network",
|
|
1036
1036
|
cause: e
|
|
1037
1037
|
});
|
|
1038
1038
|
}
|
|
1039
|
-
if (!i.ok) throw i.body?.cancel().catch(() => c("cancel-response-body")), new
|
|
1039
|
+
if (!i.ok) throw i.body?.cancel().catch(() => c("cancel-response-body")), new B({
|
|
1040
1040
|
status: i.status,
|
|
1041
1041
|
kind: "http"
|
|
1042
1042
|
});
|
|
1043
1043
|
if (i.status === 204) {
|
|
1044
|
-
if (e.requireJsonBody) throw new
|
|
1044
|
+
if (e.requireJsonBody) throw new B({
|
|
1045
1045
|
status: 204,
|
|
1046
1046
|
kind: "invalid-response"
|
|
1047
1047
|
});
|
|
@@ -1049,22 +1049,22 @@ function Oe(e) {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
try {
|
|
1051
1051
|
let t = await i.json();
|
|
1052
|
-
if (e.requireJsonBody && (typeof t != "object" || !t || Array.isArray(t))) throw new
|
|
1052
|
+
if (e.requireJsonBody && (typeof t != "object" || !t || Array.isArray(t))) throw new B({
|
|
1053
1053
|
status: i.status,
|
|
1054
1054
|
kind: "invalid-response"
|
|
1055
1055
|
});
|
|
1056
1056
|
return t;
|
|
1057
1057
|
} catch (n) {
|
|
1058
|
-
if (n instanceof
|
|
1058
|
+
if (n instanceof B) throw n;
|
|
1059
1059
|
if (t.timedOut() || t.signal.aborted) throw Q(t);
|
|
1060
|
-
if (e.requireJsonBody) throw new
|
|
1060
|
+
if (e.requireJsonBody) throw new B({
|
|
1061
1061
|
status: i.status,
|
|
1062
1062
|
kind: "invalid-response"
|
|
1063
1063
|
});
|
|
1064
1064
|
return;
|
|
1065
1065
|
}
|
|
1066
1066
|
} catch (e) {
|
|
1067
|
-
throw e instanceof
|
|
1067
|
+
throw e instanceof B && l(e), e;
|
|
1068
1068
|
} finally {
|
|
1069
1069
|
t.dispose();
|
|
1070
1070
|
}
|
|
@@ -1110,7 +1110,7 @@ function Oe(e) {
|
|
|
1110
1110
|
stream: !0,
|
|
1111
1111
|
...Object.keys(u).length > 0 ? { metadata: u } : {}
|
|
1112
1112
|
};
|
|
1113
|
-
e.conversationId && o ===
|
|
1113
|
+
e.conversationId && o === be && (d.conversation = e.conversationId), e.tools.length > 0 && (d.tools = e.tools), e.toolChoice && (d.tool_choice = e.toolChoice);
|
|
1114
1114
|
let m;
|
|
1115
1115
|
try {
|
|
1116
1116
|
m = await s(K.responses(t), {
|
|
@@ -1122,11 +1122,11 @@ function Oe(e) {
|
|
|
1122
1122
|
} catch (e) {
|
|
1123
1123
|
return r.signal.aborted ? p() : q({ cause: e });
|
|
1124
1124
|
}
|
|
1125
|
-
let h = m.headers.get(
|
|
1125
|
+
let h = m.headers.get(Y);
|
|
1126
1126
|
h && e.onRequestId?.(h);
|
|
1127
|
-
let g = m.headers.get(
|
|
1127
|
+
let g = m.headers.get(Se);
|
|
1128
1128
|
if (g && e.onMessageId?.(g), !m.ok) {
|
|
1129
|
-
l(new
|
|
1129
|
+
l(new B({
|
|
1130
1130
|
status: m.status,
|
|
1131
1131
|
kind: "http"
|
|
1132
1132
|
}));
|
|
@@ -1136,7 +1136,7 @@ function Oe(e) {
|
|
|
1136
1136
|
text: e
|
|
1137
1137
|
};
|
|
1138
1138
|
}
|
|
1139
|
-
let _ = m.headers.get(
|
|
1139
|
+
let _ = m.headers.get(xe);
|
|
1140
1140
|
if (_ && e.onConversationId?.(_), !m.body) return {
|
|
1141
1141
|
status: m.status,
|
|
1142
1142
|
text: ""
|
|
@@ -1173,7 +1173,7 @@ function Oe(e) {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
},
|
|
1175
1175
|
async listConversations(e = {}) {
|
|
1176
|
-
let n =
|
|
1176
|
+
let n = X(await u({
|
|
1177
1177
|
method: "GET",
|
|
1178
1178
|
url: K.conversations(t, e),
|
|
1179
1179
|
signal: e.signal,
|
|
@@ -1185,13 +1185,13 @@ function Oe(e) {
|
|
|
1185
1185
|
};
|
|
1186
1186
|
},
|
|
1187
1187
|
async getConversation(e) {
|
|
1188
|
-
let n =
|
|
1188
|
+
let n = X(await u({
|
|
1189
1189
|
method: "GET",
|
|
1190
1190
|
url: K.conversation(t, e.conversationId, e),
|
|
1191
1191
|
signal: e.signal,
|
|
1192
1192
|
requireJsonBody: !0
|
|
1193
1193
|
}));
|
|
1194
|
-
if (!n.conversation || typeof n.conversation != "object") throw new
|
|
1194
|
+
if (!n.conversation || typeof n.conversation != "object") throw new B({
|
|
1195
1195
|
status: 200,
|
|
1196
1196
|
kind: "invalid-response"
|
|
1197
1197
|
});
|
|
@@ -1496,17 +1496,19 @@ function dt(e, t) {
|
|
|
1496
1496
|
callId: r.callId,
|
|
1497
1497
|
toolName: e,
|
|
1498
1498
|
label: r.displayName || e,
|
|
1499
|
-
status: "running"
|
|
1499
|
+
status: "running",
|
|
1500
|
+
startOffsetMs: r.at - t
|
|
1500
1501
|
});
|
|
1501
1502
|
} else if (r.kind === "tool_end") {
|
|
1502
|
-
let e = $(r.name, r.args).name,
|
|
1503
|
-
|
|
1503
|
+
let e = $(r.name, r.args).name, i = r.isError ? "failed" : "done", a = n.find((t) => t.status === "running" && t.callId === r.callId && t.toolName === e);
|
|
1504
|
+
a ? (a.status = i, a.runtimeSeconds = r.runtimeSeconds, a.label = r.displayName || a.label) : n.push({
|
|
1504
1505
|
key: `step-${n.length}`,
|
|
1505
1506
|
callId: r.callId,
|
|
1506
1507
|
toolName: e,
|
|
1507
1508
|
label: r.displayName || e,
|
|
1508
|
-
status:
|
|
1509
|
-
runtimeSeconds: r.runtimeSeconds
|
|
1509
|
+
status: i,
|
|
1510
|
+
runtimeSeconds: r.runtimeSeconds,
|
|
1511
|
+
startOffsetMs: r.runtimeSeconds === void 0 ? void 0 : Math.max(0, r.at - t - r.runtimeSeconds * 1e3)
|
|
1510
1512
|
});
|
|
1511
1513
|
}
|
|
1512
1514
|
}
|
|
@@ -1514,7 +1516,7 @@ function dt(e, t) {
|
|
|
1514
1516
|
}
|
|
1515
1517
|
//#endregion
|
|
1516
1518
|
//#region src/styles.css?inline
|
|
1517
|
-
var ft = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-border-style:solid;--tw-leading:initial;--tw-space-y-reverse:0;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:\"Inter\", -apple-system, \"Segoe UI\", Roboto, Arial, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-green-100:oklch(96.2% .044 156.743);--color-green-700:oklch(52.7% .154 150.069);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-700:oklch(48.8% .243 264.376);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-700:oklch(49.6% .265 301.924);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-semibold:600;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-bailey-accent:#4f46e5;--color-bailey-bubble-bg:#fff;--color-bailey-error:#d32f2f;--color-bailey-border:#e5e5e5;--color-bailey-surface:#fff;--color-bailey-surface-muted:#f9fafb;--color-bailey-text:#000;--color-bailey-text-secondary:#6b6b6b;--color-bailey-tooltip-bg:#000;--color-bailey-tooltip-text:#fff;--color-bailey-page-bg:#eceef4;--color-bailey-heart:#16a34a}}@layer utilities;.bailey-chat-panel{box-sizing:border-box;background-color:var(--color-bailey-page-bg);height:100%;padding:calc(var(--spacing) * 3);font-family:var(--font-sans);flex-direction:column;display:flex;position:relative}.bailey-chat-panel-inner{width:100%;min-height:0;max-width:var(--container-3xl);gap:calc(var(--spacing) * 2);flex-direction:column;flex:1;margin-inline:auto;display:flex;overflow-y:auto}.bailey-chat-transcript{min-height:0;padding:calc(var(--spacing) * 2);padding-bottom:calc(var(--spacing) * 4);flex:1;overflow-y:auto}.bailey-message-row{margin-bottom:calc(var(--spacing) * 3);justify-content:flex-start;display:flex}.bailey-message-row-user{justify-content:flex-end}.bailey-user-message{flex-direction:column;align-items:flex-end;max-width:75%;display:flex}.bailey-message-meta{margin-bottom:var(--spacing);align-items:center;gap:calc(var(--spacing) * 2);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:flex}.bailey-message-meta-name{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-bailey-text)}.bailey-user-bubble{border-radius:var(--radius-2xl);background-color:var(--color-bailey-bubble-bg);max-width:100%;padding-inline:calc(var(--spacing) * 4);padding-block:calc(var(--spacing) * 2);white-space:pre-wrap;color:var(--color-bailey-text);--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.bailey-assistant-message{width:100%;padding-inline:var(--spacing)}.bailey-tool-result-image{margin-top:calc(var(--spacing) * 2);border-radius:var(--radius-lg);max-width:100%;height:auto;display:block}.bailey-mcp-app-frame{margin-top:calc(var(--spacing) * 2);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:0;width:100%;height:480px;display:block}.bailey-thinking-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text-secondary);font-style:italic}.bailey-streaming-hint{margin-top:var(--spacing);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);font-style:italic;display:block}.bailey-message-actions{margin-top:var(--spacing);align-items:center;gap:var(--spacing);flex-wrap:wrap;display:flex}.bailey-empty-state{text-align:center;height:100%;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text-secondary);justify-content:center;align-items:center;display:flex}.bailey-suggestions{gap:calc(var(--spacing) * 3);padding:calc(var(--spacing) * 2);flex-direction:column;display:flex}.bailey-suggestions-title{padding-inline:var(--spacing);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-bailey-text)}.bailey-suggestion-card{cursor:pointer;appearance:none;justify-content:space-between;align-items:center;gap:calc(var(--spacing) * 2);border-radius:var(--radius-2xl);--tw-border-style:none;background-color:var(--color-bailey-surface);padding-inline:calc(var(--spacing) * 4);padding-block:calc(var(--spacing) * 3);text-align:left;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text);--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));border-style:none;display:flex}@media (hover:hover){.bailey-suggestion-card:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.bailey-suggestion-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4);color:var(--color-bailey-text-secondary);flex-shrink:0}.bailey-privacy-note{border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--color-bailey-border);padding-inline:calc(var(--spacing) * 4);padding-top:calc(var(--spacing) * 3);padding-bottom:var(--spacing);text-align:center;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary)}.bailey-privacy-note a{color:var(--color-bailey-text-secondary);text-decoration-line:underline}.bailey-tool-steps-live{margin-top:calc(var(--spacing) * 2);gap:calc(var(--spacing) * 2);flex-direction:column;display:flex}.bailey-activity-line{align-items:center;gap:calc(var(--spacing) * 2);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text-secondary);display:flex}.bailey-activity-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4);color:var(--color-bailey-accent);flex-shrink:0}.bailey-step-spinner{height:calc(var(--spacing) * 3);width:calc(var(--spacing) * 3);border-style:var(--tw-border-style);border-width:2px;border-color:var(--color-bailey-border);border-top-color:var(--color-bailey-accent);border-radius:2147483647px;flex-shrink:0}@media (prefers-reduced-motion:no-preference){.bailey-step-spinner{animation:var(--animate-spin)}}.bailey-tool-steps-summary{margin-bottom:calc(var(--spacing) * 2);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text-secondary)}.bailey-tool-steps-summary>summary{cursor:pointer;-webkit-user-select:none;user-select:none}.bailey-tool-steps-list{margin:0;margin-top:var(--spacing);gap:var(--spacing);flex-direction:column;padding:0;list-style-type:none;display:flex}.bailey-tool-step{align-items:center;gap:calc(var(--spacing) * 2);display:flex}.bailey-tool-step-failed{color:var(--color-bailey-error)}.bailey-error-banner{margin-bottom:calc(var(--spacing) * 2);justify-content:space-between;align-items:center;gap:calc(var(--spacing) * 2);border-radius:var(--radius-md);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-error);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);color:var(--color-bailey-error);display:flex}.bailey-retry-button{cursor:pointer;appearance:none;--tw-border-style:none;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);background-color:#0000;border-style:none;text-decoration-line:underline}.bailey-error-actions{align-items:center;gap:calc(var(--spacing) * 2);display:flex}.bailey-dismiss-button{cursor:pointer;appearance:none;--tw-border-style:none;color:var(--color-bailey-error);background-color:#0000;border-style:none}@media (hover:hover){.bailey-dismiss-button:hover{opacity:.7}}.bailey-input-area{align-items:center;gap:calc(var(--spacing) * 2);display:flex}.bailey-input-row{align-items:center;gap:calc(var(--spacing) * 2);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);min-width:0;padding-inline:calc(var(--spacing) * 2);padding-block:calc(var(--spacing) * 1.5);--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);border-radius:2147483647px;flex:1;display:flex}.bailey-input-row:focus-within{border-color:var(--color-bailey-accent)}.bailey-input{--tw-border-style:none;min-width:0;padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);--tw-outline-style:none;background-color:#0000;border-style:none;outline-style:none;flex:1}.bailey-input:disabled{opacity:.5}.bailey-send-button,.bailey-stop-button{cursor:pointer;appearance:none;background-color:#0000;border-radius:2147483647px;flex-shrink:0;justify-content:center;align-items:center;display:flex}:is(.bailey-send-button,.bailey-stop-button):disabled{cursor:default;opacity:.4}.bailey-send-button{height:calc(var(--spacing) * 9);width:calc(var(--spacing) * 9);--tw-border-style:none;color:var(--color-bailey-heart);border-style:none}@media (hover:hover){.bailey-send-button:hover{background-color:#16a34a1a}@supports (color:color-mix(in lab, red, red)){.bailey-send-button:hover{background-color:color-mix(in oklab, var(--color-bailey-heart) 10%, transparent)}}}.bailey-send-icon{height:calc(var(--spacing) * 5);width:calc(var(--spacing) * 5)}.bailey-stop-button{height:calc(var(--spacing) * 9);width:calc(var(--spacing) * 9);--tw-border-style:none;color:var(--color-bailey-error);border-style:none}@media (hover:hover){.bailey-stop-button:hover{background-color:#d32f2f1a}@supports (color:color-mix(in lab, red, red)){.bailey-stop-button:hover{background-color:color-mix(in oklab, var(--color-bailey-error) 10%, transparent)}}}.bailey-stop-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4)}.bailey-copy-button{height:calc(var(--spacing) * 7);width:calc(var(--spacing) * 7);cursor:pointer;appearance:none;--tw-border-style:none;color:var(--color-bailey-text-secondary);background-color:#0000;border-style:none;border-radius:2147483647px;justify-content:center;align-items:center;display:flex}@media (hover:hover){.bailey-copy-button:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bailey-copy-button:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.bailey-copy-button:hover{color:var(--color-bailey-text)}}.bailey-copy-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4)}.bailey-tooltip-content{padding-inline:calc(var(--spacing) * 2);padding-block:var(--spacing);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));background-color:var(--color-bailey-tooltip-bg,#000);color:var(--color-bailey-tooltip-text,#fff);border-radius:.25rem}.bailey-menu-button{height:calc(var(--spacing) * 13);width:calc(var(--spacing) * 13);cursor:pointer;appearance:none;border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);color:var(--color-bailey-text);--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);border-radius:2147483647px;flex-shrink:0;justify-content:center;align-items:center;display:flex}@media (hover:hover){.bailey-menu-button:hover{background-color:var(--color-gray-50)}}.bailey-menu-icon{height:calc(var(--spacing) * 5);width:calc(var(--spacing) * 5)}.bailey-menu-content{z-index:50;min-width:calc(var(--spacing) * 44);border-radius:var(--radius-2xl);background-color:var(--color-white);padding-block:calc(var(--spacing) * 2);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-black);--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);font-family:var(--font-sans,\"Inter\", -apple-system, \"Segoe UI\", Roboto, Arial, sans-serif)}.bailey-menu-item{cursor:pointer;align-items:center;gap:calc(var(--spacing) * 3);padding-inline:calc(var(--spacing) * 4);padding-block:calc(var(--spacing) * 2);--tw-outline-style:none;outline-style:none;display:flex}.bailey-menu-item[data-highlighted]{background-color:var(--color-gray-100)}.bailey-menu-item-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4);color:var(--color-gray-600)}.bailey-tooltip-arrow{fill:var(--color-bailey-tooltip-bg,#000)}.bailey-markdown-content table{border-collapse:collapse;width:100%;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.bailey-markdown-content th{background-color:var(--color-bailey-surface-muted);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);text-align:left;--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.bailey-markdown-content td{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);vertical-align:top}.bailey-markdown-content tr:nth-child(2n){background-color:var(--color-bailey-surface-muted)}.bailey-markdown-content{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.bailey-markdown-content>:first-child{margin-top:0}.bailey-markdown-content>:last-child{margin-bottom:0}.bailey-markdown-content p{margin-block:calc(var(--spacing) * 2)}.bailey-markdown-content h1{margin-top:calc(var(--spacing) * 4);margin-bottom:calc(var(--spacing) * 2);font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.bailey-markdown-content h2{margin-top:calc(var(--spacing) * 4);margin-bottom:calc(var(--spacing) * 2);font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.bailey-markdown-content h3{margin-top:calc(var(--spacing) * 3);margin-bottom:calc(var(--spacing) * 1.5);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.bailey-markdown-content h4,.bailey-markdown-content h5,.bailey-markdown-content h6{margin-top:calc(var(--spacing) * 3);margin-bottom:calc(var(--spacing) * 1.5);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.bailey-markdown-content ul{margin-block:calc(var(--spacing) * 2);list-style-type:disc}:where(.bailey-markdown-content ul>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.bailey-markdown-content ul{padding-left:calc(var(--spacing) * 5)}.bailey-markdown-content ol{margin-block:calc(var(--spacing) * 2);list-style-type:decimal}:where(.bailey-markdown-content ol>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.bailey-markdown-content ol{padding-left:calc(var(--spacing) * 5)}.bailey-markdown-content a{color:var(--color-bailey-accent);text-underline-offset:2px;text-decoration-line:underline}.bailey-markdown-content code{background-color:var(--color-bailey-surface-muted);padding-inline:var(--spacing);padding-block:calc(var(--spacing) * .5);font-family:var(--font-mono);border-radius:.25rem;font-size:.85em}.bailey-markdown-content pre{margin-block:calc(var(--spacing) * 2);border-radius:var(--radius-md);background-color:var(--color-bailey-surface-muted);padding:calc(var(--spacing) * 2);overflow-x:auto}.bailey-markdown-content pre code{background-color:#0000;padding:0}.bailey-markdown-content blockquote{margin-block:calc(var(--spacing) * 2);border-left-style:var(--tw-border-style);border-left-width:2px;border-color:var(--color-bailey-border);padding-left:calc(var(--spacing) * 3);color:var(--color-bailey-text-secondary);font-style:italic}.bailey-markdown-content hr{margin-block:calc(var(--spacing) * 3);border-color:var(--color-bailey-border)}.bailey-trace-panel{margin-bottom:calc(var(--spacing) * 2)}.bailey-trace-toggle-row{align-items:center;gap:calc(var(--spacing) * 2);display:flex}.bailey-trace-toggle{cursor:pointer;appearance:none;--tw-border-style:none;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-accent);background-color:#0000;border-style:none}@media (hover:hover){.bailey-trace-toggle:hover{text-decoration-line:underline}}.bailey-trace-toggle-error{color:var(--color-bailey-error)}.bailey-trace-summary{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary)}.bailey-trace-summary-error{color:var(--color-bailey-error)}.bailey-trace-body{margin-top:var(--spacing);max-height:calc(var(--spacing) * 80);overflow-y:auto}.bailey-trace-actions-row{justify-content:flex-end;gap:calc(var(--spacing) * 3);display:flex}.bailey-trace-copy-button{cursor:pointer;appearance:none;--tw-border-style:none;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-accent);background-color:#0000;border-style:none;text-decoration-line:underline}@media (hover:hover){.bailey-trace-copy-button:hover{text-decoration-line:none}}.bailey-trace-request-details{margin-bottom:var(--spacing);border-radius:var(--radius-md);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);padding:calc(var(--spacing) * 2)}.bailey-trace-request-meta{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:block}.bailey-trace-rows{gap:var(--spacing);flex-direction:column;display:flex}.bailey-trace-row{border-radius:var(--radius-md);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);padding-inline:calc(var(--spacing) * 2);padding-block:var(--spacing);font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.bailey-trace-row-header{align-items:center;gap:calc(var(--spacing) * 2);flex-wrap:wrap;display:flex}.bailey-trace-row-time{color:var(--color-bailey-text-secondary)}.bailey-trace-row-gap{color:var(--color-gray-400)}.bailey-trace-row-summary{word-break:break-all}.bailey-trace-chip{padding-inline:calc(var(--spacing) * 1.5);padding-block:calc(var(--spacing) * .5);--tw-font-weight:var(--font-weight-semibold);font-size:.65rem;font-weight:var(--font-weight-semibold);border-radius:.25rem}.bailey-trace-chip-default{background-color:var(--color-gray-200);color:var(--color-gray-700)}.bailey-trace-chip-info{background-color:var(--color-blue-100);color:var(--color-blue-700)}.bailey-trace-chip-success{background-color:var(--color-green-100);color:var(--color-green-700)}.bailey-trace-chip-secondary{background-color:var(--color-purple-100);color:var(--color-purple-700)}.bailey-trace-chip-error{background-color:var(--color-red-100);color:var(--color-bailey-error)}.bailey-trace-disclosure{margin-top:var(--spacing)}.bailey-trace-disclosure-summary{cursor:pointer;color:var(--color-bailey-text-secondary);font-size:.7rem}.bailey-trace-disclosure-actions{margin-top:var(--spacing);justify-content:flex-end;display:flex}.bailey-trace-disclosure-content{margin-top:var(--spacing);max-height:calc(var(--spacing) * 48);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface-muted);padding:calc(var(--spacing) * 1.5);word-break:break-all;white-space:pre-wrap;border-radius:.25rem;font-size:.7rem;overflow:auto}.bailey-trace-group{border-radius:var(--radius-md);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);padding-inline:calc(var(--spacing) * 2);padding-block:var(--spacing)}.bailey-trace-group-summary{cursor:pointer;font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.bailey-trace-group-failed{margin-left:var(--spacing);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-error)}.bailey-feedback{align-items:center;gap:var(--spacing);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text);flex-wrap:wrap;display:flex}.bailey-message-actions>.bailey-feedback{display:contents}.bailey-feedback-thumbs{margin-left:var(--spacing);align-items:center;gap:calc(var(--spacing) * .5);border-left-style:var(--tw-border-style);border-left-width:1px;border-color:var(--color-bailey-border);padding-left:calc(var(--spacing) * 2);display:flex}.bailey-feedback-thumb{height:calc(var(--spacing) * 7);width:calc(var(--spacing) * 7);cursor:pointer;appearance:none;border-radius:var(--radius-lg);--tw-border-style:none;color:var(--color-bailey-text-secondary);background-color:#0000;border-style:none;justify-content:center;align-items:center;display:flex}@media (hover:hover){.bailey-feedback-thumb:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bailey-feedback-thumb:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.bailey-feedback-thumb:hover{color:var(--color-bailey-text)}}.bailey-feedback-thumb:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-feedback-thumb:disabled{cursor:default;opacity:.5}.bailey-feedback-thumb[aria-pressed=true]{background-color:#4f46e51a}@supports (color:color-mix(in lab, red, red)){.bailey-feedback-thumb[aria-pressed=true]{background-color:color-mix(in oklab, var(--color-bailey-accent) 10%, transparent)}}.bailey-feedback-thumb[aria-pressed=true]{color:var(--color-bailey-accent)}.bailey-feedback-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4)}.bailey-feedback-status{align-items:center;gap:calc(var(--spacing) * 1.5);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:inline-flex}.bailey-feedback-status:empty{display:none}.bailey-feedback-spinner{height:calc(var(--spacing) * 3);width:calc(var(--spacing) * 3);animation:var(--animate-spin);border-style:var(--tw-border-style);border-width:2px;border-color:var(--color-bailey-border);border-top-color:var(--color-bailey-accent);border-radius:2147483647px;display:inline-block}.bailey-feedback-link{cursor:pointer;appearance:none;--tw-border-style:none;padding-inline:var(--spacing);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-accent);background-color:#0000;border-style:none;text-decoration-line:underline}.bailey-feedback-link:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-feedback-error{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-error)}.bailey-feedback-form{margin-top:calc(var(--spacing) * 2);box-sizing:border-box;border-radius:var(--radius-xl);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);width:100%;padding:calc(var(--spacing) * 3);flex-basis:100%}.bailey-feedback-reasons{margin:0;margin-bottom:calc(var(--spacing) * 2);--tw-border-style:none;border-style:none;min-width:0;padding:0}.bailey-feedback-legend{margin-bottom:calc(var(--spacing) * 1.5);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-bailey-text);padding:0;display:block}.bailey-feedback-chips{gap:calc(var(--spacing) * 1.5);flex-wrap:wrap;display:flex}.bailey-feedback-chip{cursor:pointer;appearance:none;border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);padding-inline:calc(var(--spacing) * 3);padding-block:var(--spacing);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text);border-radius:2147483647px}.bailey-feedback-chip:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-feedback-chip:disabled{cursor:default;opacity:.5}.bailey-feedback-chip[aria-pressed=true]{border-color:var(--color-bailey-accent);background-color:#4f46e51a}@supports (color:color-mix(in lab, red, red)){.bailey-feedback-chip[aria-pressed=true]{background-color:color-mix(in oklab, var(--color-bailey-accent) 10%, transparent)}}.bailey-feedback-chip[aria-pressed=true]{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-bailey-accent)}.bailey-feedback-textarea{box-sizing:border-box;min-height:calc(var(--spacing) * 18);resize:vertical;border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);width:100%;padding-inline:calc(var(--spacing) * 2.5);padding-block:calc(var(--spacing) * 2);font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text);display:block}.bailey-feedback-textarea:disabled{opacity:.5}.bailey-feedback-meta{margin-top:calc(var(--spacing) * 1.5);justify-content:space-between;align-items:flex-start;gap:calc(var(--spacing) * 3);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:flex}.bailey-feedback-buttons{margin-top:calc(var(--spacing) * 2.5);justify-content:flex-end;gap:calc(var(--spacing) * 2);display:flex}.bailey-feedback-button{cursor:pointer;appearance:none;border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);padding-inline:calc(var(--spacing) * 3.5);padding-block:calc(var(--spacing) * 1.5);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text)}.bailey-feedback-button:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-feedback-button:disabled{cursor:default;opacity:.5}.bailey-feedback-button-primary{border-color:var(--color-bailey-accent);background-color:var(--color-bailey-accent);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-white)}.bailey-load-earlier{align-items:center;gap:var(--spacing);padding-bottom:calc(var(--spacing) * 2);flex-direction:column;display:flex}.bailey-load-earlier-button{cursor:pointer;appearance:none;border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);padding-inline:calc(var(--spacing) * 3.5);padding-block:calc(var(--spacing) * 1.5);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text)}.bailey-load-earlier-button:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-load-earlier-button:disabled{cursor:default;opacity:.5}.bailey-load-earlier-error{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-error)}.bailey-history-drawer{z-index:10;background-color:var(--color-bailey-surface);font-family:var(--font-sans);color:var(--color-bailey-text);border-radius:14px;flex-direction:column;display:flex;position:absolute;inset:0;overflow:hidden;container-type:inline-size}.bailey-history-header{align-items:center;gap:calc(var(--spacing) * 2);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-bailey-border);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);display:flex}.bailey-history-heading{text-overflow:ellipsis;white-space:nowrap;--tw-font-weight:var(--font-weight-semibold);min-width:0;font-size:15px;font-weight:var(--font-weight-semibold);--tw-outline-style:none;outline-style:none;flex:1;margin:0;overflow:hidden}.bailey-history-icon-button{height:calc(var(--spacing) * 11);width:calc(var(--spacing) * 11);cursor:pointer;appearance:none;border-radius:var(--radius-lg);--tw-border-style:none;color:var(--color-bailey-text-secondary);background-color:#0000;border-style:none;flex:none;justify-content:center;align-items:center;display:flex}@media (hover:hover){.bailey-history-icon-button:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bailey-history-icon-button:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.bailey-history-icon-button:hover{color:var(--color-bailey-text)}}.bailey-history-icon-button:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-history-icon-button:disabled{cursor:default;opacity:.5}.bailey-history-icon{width:18px;height:18px}.bailey-history-icon-small{height:calc(var(--spacing) * 3.5);width:calc(var(--spacing) * 3.5);flex:none}.bailey-history-button{min-height:calc(var(--spacing) * 11);cursor:pointer;appearance:none;justify-content:center;align-items:center;gap:calc(var(--spacing) * 1.5);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 1.5);white-space:nowrap;color:var(--color-bailey-text);font-size:13px;display:inline-flex}.bailey-history-button:focus-visible{outline-style:var(--tw-outline-style);outline-offset:2px;outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-history-button:disabled{cursor:default;opacity:.5}.bailey-history-button-primary{border-color:var(--color-bailey-accent);background-color:var(--color-bailey-accent);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-white)}.bailey-history-button-danger{border-color:var(--color-bailey-error);background-color:var(--color-bailey-error);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-white)}.bailey-history-button-small{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.bailey-history-body{padding-inline:calc(var(--spacing) * 2);padding-block:calc(var(--spacing) * 1.5);flex:1;overflow-y:auto}.bailey-history-list{margin:0;padding:0;list-style-type:none}.bailey-history-row{border-radius:10px;flex-wrap:wrap;align-items:center;display:flex;position:relative}.bailey-history-row+.bailey-history-row{margin-top:calc(var(--spacing) * .5)}.bailey-history-row:not(.bailey-history-row-active):hover{background-color:var(--color-gray-100)}.bailey-history-row-active{box-shadow:inset 3px 0 0 var(--color-bailey-accent,#4f46e5);background-color:#4f46e514}.bailey-history-select{min-height:calc(var(--spacing) * 11);cursor:pointer;appearance:none;gap:calc(var(--spacing) * .5);--tw-border-style:none;min-width:0;padding-block:calc(var(--spacing) * 2.5);padding-right:calc(var(--spacing) * 2.5);padding-left:calc(var(--spacing) * 3);text-align:left;color:var(--color-bailey-text);background-color:#0000;border-style:none;border-radius:10px;flex-direction:column;flex:1;font-family:inherit;display:flex}.bailey-history-select:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-history-select:disabled{cursor:default;opacity:.6}.bailey-history-row-title{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);overflow:hidden}.bailey-history-meta{align-items:center;gap:calc(var(--spacing) * 1.5);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:flex}.bailey-history-meta>span+.bailey-history-count:before{content:\"·\";margin-right:.375rem}.bailey-history-current{--tw-font-weight:var(--font-weight-semibold);font-size:11px;font-weight:var(--font-weight-semibold);color:var(--color-bailey-accent)}.bailey-history-delete{margin-right:var(--spacing)}.bailey-history-row-confirming{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-200);background-color:var(--color-red-50)}.bailey-history-confirm{align-items:center;gap:calc(var(--spacing) * 2);min-width:0;padding-block:calc(var(--spacing) * 2);padding-right:calc(var(--spacing) * 2.5);padding-left:calc(var(--spacing) * 3);flex-wrap:wrap;flex:1;display:flex}.bailey-history-confirm-question{--tw-font-weight:var(--font-weight-semibold);min-width:7.5rem;font-size:13px;font-weight:var(--font-weight-semibold);flex:1}.bailey-history-confirm-title{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);flex-basis:100%;overflow:hidden}.bailey-history-row-failed{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-200);background-color:#fff7f7}.bailey-history-row-error{align-items:center;gap:calc(var(--spacing) * 2);padding-inline:calc(var(--spacing) * 3);padding-bottom:calc(var(--spacing) * 2.5);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-error);flex-wrap:wrap;flex-basis:100%;display:flex}.bailey-history-state{align-items:center;gap:calc(var(--spacing) * 2);padding-inline:calc(var(--spacing) * 6);padding-block:calc(var(--spacing) * 12);text-align:center;color:var(--color-bailey-text-secondary);flex-direction:column;font-size:13px;display:flex}.bailey-history-state strong{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text)}.bailey-history-state-icon{height:calc(var(--spacing) * 7);width:calc(var(--spacing) * 7);color:var(--color-gray-400)}.bailey-history-state-error .bailey-history-state-icon{color:var(--color-bailey-error)}.bailey-history-more{padding-top:calc(var(--spacing) * 2.5);padding-bottom:calc(var(--spacing) * 1.5);justify-content:center;display:flex}.bailey-history-inline-error{justify-content:center;align-items:center;gap:calc(var(--spacing) * 2);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-error);flex-wrap:wrap;display:flex}.bailey-history-status{min-height:calc(var(--spacing) * 9);align-items:center;gap:calc(var(--spacing) * 2);border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface-muted);padding-inline:calc(var(--spacing) * 3.5);padding-block:calc(var(--spacing) * 2);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:flex}.bailey-history-skeleton{margin-inline:var(--spacing);margin-bottom:calc(var(--spacing) * 1.5);background:linear-gradient(90deg,#f1f1f4 25%,#e6e6ec 50%,#f1f1f4 75%) 0 0/200% 100%;border-radius:10px;height:52px;animation:1.3s infinite bailey-history-shimmer}.bailey-history-spinner{height:calc(var(--spacing) * 3);width:calc(var(--spacing) * 3);border-style:var(--tw-border-style);border-width:2px;border-color:var(--color-bailey-border);border-top-color:var(--color-bailey-accent,#4f46e5);border-radius:2147483647px;animation:.8s linear infinite bailey-history-rotate;display:inline-block}@keyframes bailey-history-shimmer{to{background-position:-200% 0}}@keyframes bailey-history-rotate{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.bailey-history-skeleton,.bailey-history-spinner{animation:none}}@container (width<=340px){.bailey-history-new-chat{width:calc(var(--spacing) * 11);padding-inline:0}.bailey-history-new-chat-text,.bailey-history-count{display:none}}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}", pt = r(void 0), mt = /:root\s*,\s*:host\s*\{/, ht = ".bailey-chat-panel{";
|
|
1519
|
+
var ft = "/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-border-style:solid;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-leading:initial;--tw-space-y-reverse:0;--tw-outline-style:solid}}}@layer theme{:root,:host{--font-sans:\"Inter\", -apple-system, \"Segoe UI\", Roboto, Arial, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-green-100:oklch(96.2% .044 156.743);--color-green-700:oklch(52.7% .154 150.069);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-700:oklch(48.8% .243 264.376);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-700:oklch(49.6% .265 301.924);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--font-weight-medium:500;--font-weight-semibold:600;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-bailey-accent:#4f46e5;--color-bailey-bubble-bg:#fff;--color-bailey-error:#d32f2f;--color-bailey-border:#e5e5e5;--color-bailey-surface:#fff;--color-bailey-surface-muted:#f9fafb;--color-bailey-text:#000;--color-bailey-text-secondary:#6b6b6b;--color-bailey-tooltip-bg:#000;--color-bailey-tooltip-text:#fff;--color-bailey-page-bg:#eceef4;--color-bailey-heart:#16a34a}}@layer utilities;.bailey-chat-panel{box-sizing:border-box;background-color:var(--color-bailey-page-bg);height:100%;padding:calc(var(--spacing) * 3);font-family:var(--font-sans);flex-direction:column;display:flex;position:relative}.bailey-chat-panel-inner{width:100%;min-height:0;max-width:var(--container-3xl);gap:calc(var(--spacing) * 2);flex-direction:column;flex:1;margin-inline:auto;display:flex;overflow-y:auto}.bailey-chat-transcript{min-height:0;padding:calc(var(--spacing) * 2);padding-bottom:calc(var(--spacing) * 4);flex:1;overflow-y:auto}.bailey-message-row{margin-bottom:calc(var(--spacing) * 3);justify-content:flex-start;display:flex}.bailey-message-row-user{justify-content:flex-end}.bailey-user-message{flex-direction:column;align-items:flex-end;max-width:75%;display:flex}.bailey-message-meta{margin-bottom:var(--spacing);align-items:center;gap:calc(var(--spacing) * 2);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:flex}.bailey-message-meta-name{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);color:var(--color-bailey-text)}.bailey-user-bubble{border-radius:var(--radius-2xl);background-color:var(--color-bailey-bubble-bg);max-width:100%;padding-inline:calc(var(--spacing) * 4);padding-block:calc(var(--spacing) * 2);white-space:pre-wrap;color:var(--color-bailey-text);--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.bailey-assistant-message{width:100%;padding-inline:var(--spacing)}.bailey-tool-result-image{margin-top:calc(var(--spacing) * 2);border-radius:var(--radius-lg);max-width:100%;height:auto;display:block}.bailey-mcp-app-frame{margin-top:calc(var(--spacing) * 2);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:0;width:100%;height:480px;display:block}.bailey-thinking-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text-secondary);font-style:italic}.bailey-streaming-hint{margin-top:var(--spacing);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);font-style:italic;display:block}.bailey-message-actions{margin-top:var(--spacing);align-items:center;gap:var(--spacing);flex-wrap:wrap;display:flex}.bailey-empty-state{text-align:center;height:100%;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text-secondary);justify-content:center;align-items:center;display:flex}.bailey-suggestions{gap:calc(var(--spacing) * 3);padding:calc(var(--spacing) * 2);flex-direction:column;display:flex}.bailey-suggestions-title{padding-inline:var(--spacing);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-bailey-text)}.bailey-suggestion-card{cursor:pointer;appearance:none;justify-content:space-between;align-items:center;gap:calc(var(--spacing) * 2);border-radius:var(--radius-2xl);--tw-border-style:none;background-color:var(--color-bailey-surface);padding-inline:calc(var(--spacing) * 4);padding-block:calc(var(--spacing) * 3);text-align:left;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text);--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));border-style:none;display:flex}@media (hover:hover){.bailey-suggestion-card:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}.bailey-suggestion-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4);color:var(--color-bailey-text-secondary);flex-shrink:0}.bailey-privacy-note{border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--color-bailey-border);padding-inline:calc(var(--spacing) * 4);padding-top:calc(var(--spacing) * 3);padding-bottom:var(--spacing);text-align:center;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary)}.bailey-privacy-note a{color:var(--color-bailey-text-secondary);text-decoration-line:underline}.bailey-tool-steps-live{margin-top:calc(var(--spacing) * 2);gap:calc(var(--spacing) * 2);flex-direction:column;display:flex}.bailey-activity-line{align-items:center;gap:calc(var(--spacing) * 2);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text-secondary);display:flex}.bailey-activity-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4);color:var(--color-bailey-accent);flex-shrink:0}.bailey-step-spinner{height:calc(var(--spacing) * 3);width:calc(var(--spacing) * 3);border-style:var(--tw-border-style);border-width:2px;border-color:var(--color-bailey-border);border-top-color:var(--color-bailey-accent);border-radius:2147483647px;flex-shrink:0}@media (prefers-reduced-motion:no-preference){.bailey-step-spinner{animation:var(--animate-spin)}}.bailey-tool-steps-summary{margin-bottom:calc(var(--spacing) * 2);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text-secondary)}.bailey-tool-steps-summary>summary{cursor:pointer;-webkit-user-select:none;user-select:none}.bailey-tool-steps-list{margin:0;margin-top:var(--spacing);gap:var(--spacing);flex-direction:column;padding:0;list-style-type:none;display:flex}.bailey-tool-step{align-items:center;gap:calc(var(--spacing) * 2);display:flex}.bailey-tool-step-start{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.bailey-tool-step-failed{color:var(--color-bailey-error)}.bailey-error-banner{margin-bottom:calc(var(--spacing) * 2);justify-content:space-between;align-items:center;gap:calc(var(--spacing) * 2);border-radius:var(--radius-md);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-error);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);color:var(--color-bailey-error);display:flex}.bailey-retry-button{cursor:pointer;appearance:none;--tw-border-style:none;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);background-color:#0000;border-style:none;text-decoration-line:underline}.bailey-error-actions{align-items:center;gap:calc(var(--spacing) * 2);display:flex}.bailey-dismiss-button{cursor:pointer;appearance:none;--tw-border-style:none;color:var(--color-bailey-error);background-color:#0000;border-style:none}@media (hover:hover){.bailey-dismiss-button:hover{opacity:.7}}.bailey-input-area{align-items:center;gap:calc(var(--spacing) * 2);display:flex}.bailey-input-row{align-items:center;gap:calc(var(--spacing) * 2);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);min-width:0;padding-inline:calc(var(--spacing) * 2);padding-block:calc(var(--spacing) * 1.5);--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);border-radius:2147483647px;flex:1;display:flex}.bailey-input-row:focus-within{border-color:var(--color-bailey-accent)}.bailey-input{--tw-border-style:none;min-width:0;padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);--tw-outline-style:none;background-color:#0000;border-style:none;outline-style:none;flex:1}.bailey-input:disabled{opacity:.5}.bailey-send-button,.bailey-stop-button{cursor:pointer;appearance:none;background-color:#0000;border-radius:2147483647px;flex-shrink:0;justify-content:center;align-items:center;display:flex}:is(.bailey-send-button,.bailey-stop-button):disabled{cursor:default;opacity:.4}.bailey-send-button{height:calc(var(--spacing) * 9);width:calc(var(--spacing) * 9);--tw-border-style:none;color:var(--color-bailey-heart);border-style:none}@media (hover:hover){.bailey-send-button:hover{background-color:#16a34a1a}@supports (color:color-mix(in lab, red, red)){.bailey-send-button:hover{background-color:color-mix(in oklab, var(--color-bailey-heart) 10%, transparent)}}}.bailey-send-icon{height:calc(var(--spacing) * 5);width:calc(var(--spacing) * 5)}.bailey-stop-button{height:calc(var(--spacing) * 9);width:calc(var(--spacing) * 9);--tw-border-style:none;color:var(--color-bailey-error);border-style:none}@media (hover:hover){.bailey-stop-button:hover{background-color:#d32f2f1a}@supports (color:color-mix(in lab, red, red)){.bailey-stop-button:hover{background-color:color-mix(in oklab, var(--color-bailey-error) 10%, transparent)}}}.bailey-stop-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4)}.bailey-copy-button{height:calc(var(--spacing) * 7);width:calc(var(--spacing) * 7);cursor:pointer;appearance:none;--tw-border-style:none;color:var(--color-bailey-text-secondary);background-color:#0000;border-style:none;border-radius:2147483647px;justify-content:center;align-items:center;display:flex}@media (hover:hover){.bailey-copy-button:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bailey-copy-button:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.bailey-copy-button:hover{color:var(--color-bailey-text)}}.bailey-copy-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4)}.bailey-tooltip-content{padding-inline:calc(var(--spacing) * 2);padding-block:var(--spacing);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));background-color:var(--color-bailey-tooltip-bg,#000);color:var(--color-bailey-tooltip-text,#fff);border-radius:.25rem}.bailey-menu-button{height:calc(var(--spacing) * 13);width:calc(var(--spacing) * 13);cursor:pointer;appearance:none;border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);color:var(--color-bailey-text);--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);border-radius:2147483647px;flex-shrink:0;justify-content:center;align-items:center;display:flex}@media (hover:hover){.bailey-menu-button:hover{background-color:var(--color-gray-50)}}.bailey-menu-icon{height:calc(var(--spacing) * 5);width:calc(var(--spacing) * 5)}.bailey-menu-content{z-index:50;min-width:calc(var(--spacing) * 44);border-radius:var(--radius-2xl);background-color:var(--color-white);padding-block:calc(var(--spacing) * 2);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-black);--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);font-family:var(--font-sans,\"Inter\", -apple-system, \"Segoe UI\", Roboto, Arial, sans-serif)}.bailey-menu-item{cursor:pointer;align-items:center;gap:calc(var(--spacing) * 3);padding-inline:calc(var(--spacing) * 4);padding-block:calc(var(--spacing) * 2);--tw-outline-style:none;outline-style:none;display:flex}.bailey-menu-item[data-highlighted]{background-color:var(--color-gray-100)}.bailey-menu-item-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4);color:var(--color-gray-600)}.bailey-tooltip-arrow{fill:var(--color-bailey-tooltip-bg,#000)}.bailey-markdown-content table{border-collapse:collapse;width:100%;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.bailey-markdown-content th{background-color:var(--color-bailey-surface-muted);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);text-align:left;--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.bailey-markdown-content td{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);vertical-align:top}.bailey-markdown-content tr:nth-child(2n){background-color:var(--color-bailey-surface-muted)}.bailey-markdown-content{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.bailey-markdown-content>:first-child{margin-top:0}.bailey-markdown-content>:last-child{margin-bottom:0}.bailey-markdown-content p{margin-block:calc(var(--spacing) * 2)}.bailey-markdown-content h1{margin-top:calc(var(--spacing) * 4);margin-bottom:calc(var(--spacing) * 2);font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.bailey-markdown-content h2{margin-top:calc(var(--spacing) * 4);margin-bottom:calc(var(--spacing) * 2);font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.bailey-markdown-content h3{margin-top:calc(var(--spacing) * 3);margin-bottom:calc(var(--spacing) * 1.5);font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.bailey-markdown-content h4,.bailey-markdown-content h5,.bailey-markdown-content h6{margin-top:calc(var(--spacing) * 3);margin-bottom:calc(var(--spacing) * 1.5);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.bailey-markdown-content ul{margin-block:calc(var(--spacing) * 2);list-style-type:disc}:where(.bailey-markdown-content ul>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.bailey-markdown-content ul{padding-left:calc(var(--spacing) * 5)}.bailey-markdown-content ol{margin-block:calc(var(--spacing) * 2);list-style-type:decimal}:where(.bailey-markdown-content ol>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.bailey-markdown-content ol{padding-left:calc(var(--spacing) * 5)}.bailey-markdown-content a{color:var(--color-bailey-accent);text-underline-offset:2px;text-decoration-line:underline}.bailey-markdown-content code{background-color:var(--color-bailey-surface-muted);padding-inline:var(--spacing);padding-block:calc(var(--spacing) * .5);font-family:var(--font-mono);border-radius:.25rem;font-size:.85em}.bailey-markdown-content pre{margin-block:calc(var(--spacing) * 2);border-radius:var(--radius-md);background-color:var(--color-bailey-surface-muted);padding:calc(var(--spacing) * 2);overflow-x:auto}.bailey-markdown-content pre code{background-color:#0000;padding:0}.bailey-markdown-content blockquote{margin-block:calc(var(--spacing) * 2);border-left-style:var(--tw-border-style);border-left-width:2px;border-color:var(--color-bailey-border);padding-left:calc(var(--spacing) * 3);color:var(--color-bailey-text-secondary);font-style:italic}.bailey-markdown-content hr{margin-block:calc(var(--spacing) * 3);border-color:var(--color-bailey-border)}.bailey-trace-panel{margin-bottom:calc(var(--spacing) * 2)}.bailey-trace-toggle-row{align-items:center;gap:calc(var(--spacing) * 2);display:flex}.bailey-trace-toggle{cursor:pointer;appearance:none;--tw-border-style:none;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-accent);background-color:#0000;border-style:none}@media (hover:hover){.bailey-trace-toggle:hover{text-decoration-line:underline}}.bailey-trace-toggle-error{color:var(--color-bailey-error)}.bailey-trace-summary{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary)}.bailey-trace-summary-error{color:var(--color-bailey-error)}.bailey-trace-body{margin-top:var(--spacing);max-height:calc(var(--spacing) * 80);overflow-y:auto}.bailey-trace-actions-row{justify-content:flex-end;gap:calc(var(--spacing) * 3);display:flex}.bailey-trace-copy-button{cursor:pointer;appearance:none;--tw-border-style:none;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-accent);background-color:#0000;border-style:none;text-decoration-line:underline}@media (hover:hover){.bailey-trace-copy-button:hover{text-decoration-line:none}}.bailey-trace-request-details{margin-bottom:var(--spacing);border-radius:var(--radius-md);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);padding:calc(var(--spacing) * 2)}.bailey-trace-request-meta{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:block}.bailey-trace-rows{gap:var(--spacing);flex-direction:column;display:flex}.bailey-trace-row{border-radius:var(--radius-md);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);padding-inline:calc(var(--spacing) * 2);padding-block:var(--spacing);font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.bailey-trace-row-header{align-items:center;gap:calc(var(--spacing) * 2);flex-wrap:wrap;display:flex}.bailey-trace-row-time{color:var(--color-bailey-text-secondary)}.bailey-trace-row-gap{color:var(--color-gray-400)}.bailey-trace-row-summary{word-break:break-all}.bailey-trace-chip{padding-inline:calc(var(--spacing) * 1.5);padding-block:calc(var(--spacing) * .5);--tw-font-weight:var(--font-weight-semibold);font-size:.65rem;font-weight:var(--font-weight-semibold);border-radius:.25rem}.bailey-trace-chip-default{background-color:var(--color-gray-200);color:var(--color-gray-700)}.bailey-trace-chip-info{background-color:var(--color-blue-100);color:var(--color-blue-700)}.bailey-trace-chip-success{background-color:var(--color-green-100);color:var(--color-green-700)}.bailey-trace-chip-secondary{background-color:var(--color-purple-100);color:var(--color-purple-700)}.bailey-trace-chip-error{background-color:var(--color-red-100);color:var(--color-bailey-error)}.bailey-trace-disclosure{margin-top:var(--spacing)}.bailey-trace-disclosure-summary{cursor:pointer;color:var(--color-bailey-text-secondary);font-size:.7rem}.bailey-trace-disclosure-actions{margin-top:var(--spacing);justify-content:flex-end;display:flex}.bailey-trace-disclosure-content{margin-top:var(--spacing);max-height:calc(var(--spacing) * 48);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface-muted);padding:calc(var(--spacing) * 1.5);word-break:break-all;white-space:pre-wrap;border-radius:.25rem;font-size:.7rem;overflow:auto}.bailey-trace-group{border-radius:var(--radius-md);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);padding-inline:calc(var(--spacing) * 2);padding-block:var(--spacing)}.bailey-trace-group-summary{cursor:pointer;font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.bailey-trace-group-failed{margin-left:var(--spacing);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-error)}.bailey-feedback{align-items:center;gap:var(--spacing);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text);flex-wrap:wrap;display:flex}.bailey-message-actions>.bailey-feedback{display:contents}.bailey-feedback-thumbs{margin-left:var(--spacing);align-items:center;gap:calc(var(--spacing) * .5);border-left-style:var(--tw-border-style);border-left-width:1px;border-color:var(--color-bailey-border);padding-left:calc(var(--spacing) * 2);display:flex}.bailey-feedback-thumb{height:calc(var(--spacing) * 7);width:calc(var(--spacing) * 7);cursor:pointer;appearance:none;border-radius:var(--radius-lg);--tw-border-style:none;color:var(--color-bailey-text-secondary);background-color:#0000;border-style:none;justify-content:center;align-items:center;display:flex}@media (hover:hover){.bailey-feedback-thumb:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bailey-feedback-thumb:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.bailey-feedback-thumb:hover{color:var(--color-bailey-text)}}.bailey-feedback-thumb:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-feedback-thumb:disabled{cursor:default;opacity:.5}.bailey-feedback-thumb[aria-pressed=true]{background-color:#4f46e51a}@supports (color:color-mix(in lab, red, red)){.bailey-feedback-thumb[aria-pressed=true]{background-color:color-mix(in oklab, var(--color-bailey-accent) 10%, transparent)}}.bailey-feedback-thumb[aria-pressed=true]{color:var(--color-bailey-accent)}.bailey-feedback-icon{height:calc(var(--spacing) * 4);width:calc(var(--spacing) * 4)}.bailey-feedback-status{align-items:center;gap:calc(var(--spacing) * 1.5);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:inline-flex}.bailey-feedback-status:empty{display:none}.bailey-feedback-spinner{height:calc(var(--spacing) * 3);width:calc(var(--spacing) * 3);animation:var(--animate-spin);border-style:var(--tw-border-style);border-width:2px;border-color:var(--color-bailey-border);border-top-color:var(--color-bailey-accent);border-radius:2147483647px;display:inline-block}.bailey-feedback-link{cursor:pointer;appearance:none;--tw-border-style:none;padding-inline:var(--spacing);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-accent);background-color:#0000;border-style:none;text-decoration-line:underline}.bailey-feedback-link:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-feedback-error{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-error)}.bailey-feedback-form{margin-top:calc(var(--spacing) * 2);box-sizing:border-box;border-radius:var(--radius-xl);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);width:100%;padding:calc(var(--spacing) * 3);flex-basis:100%}.bailey-feedback-reasons{margin:0;margin-bottom:calc(var(--spacing) * 2);--tw-border-style:none;border-style:none;min-width:0;padding:0}.bailey-feedback-legend{margin-bottom:calc(var(--spacing) * 1.5);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-bailey-text);padding:0;display:block}.bailey-feedback-chips{gap:calc(var(--spacing) * 1.5);flex-wrap:wrap;display:flex}.bailey-feedback-chip{cursor:pointer;appearance:none;border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);padding-inline:calc(var(--spacing) * 3);padding-block:var(--spacing);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text);border-radius:2147483647px}.bailey-feedback-chip:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-feedback-chip:disabled{cursor:default;opacity:.5}.bailey-feedback-chip[aria-pressed=true]{border-color:var(--color-bailey-accent);background-color:#4f46e51a}@supports (color:color-mix(in lab, red, red)){.bailey-feedback-chip[aria-pressed=true]{background-color:color-mix(in oklab, var(--color-bailey-accent) 10%, transparent)}}.bailey-feedback-chip[aria-pressed=true]{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-bailey-accent)}.bailey-feedback-textarea{box-sizing:border-box;min-height:calc(var(--spacing) * 18);resize:vertical;border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);width:100%;padding-inline:calc(var(--spacing) * 2.5);padding-block:calc(var(--spacing) * 2);font-family:var(--font-sans);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text);display:block}.bailey-feedback-textarea:disabled{opacity:.5}.bailey-feedback-meta{margin-top:calc(var(--spacing) * 1.5);justify-content:space-between;align-items:flex-start;gap:calc(var(--spacing) * 3);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:flex}.bailey-feedback-buttons{margin-top:calc(var(--spacing) * 2.5);justify-content:flex-end;gap:calc(var(--spacing) * 2);display:flex}.bailey-feedback-button{cursor:pointer;appearance:none;border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);padding-inline:calc(var(--spacing) * 3.5);padding-block:calc(var(--spacing) * 1.5);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text)}.bailey-feedback-button:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-feedback-button:disabled{cursor:default;opacity:.5}.bailey-feedback-button-primary{border-color:var(--color-bailey-accent);background-color:var(--color-bailey-accent);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-white)}.bailey-load-earlier{align-items:center;gap:var(--spacing);padding-bottom:calc(var(--spacing) * 2);flex-direction:column;display:flex}.bailey-load-earlier-button{cursor:pointer;appearance:none;border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);padding-inline:calc(var(--spacing) * 3.5);padding-block:calc(var(--spacing) * 1.5);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text)}.bailey-load-earlier-button:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-load-earlier-button:disabled{cursor:default;opacity:.5}.bailey-load-earlier-error{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-error)}.bailey-history-drawer{z-index:10;background-color:var(--color-bailey-surface);font-family:var(--font-sans);color:var(--color-bailey-text);border-radius:14px;flex-direction:column;display:flex;position:absolute;inset:0;overflow:hidden;container-type:inline-size}.bailey-history-header{align-items:center;gap:calc(var(--spacing) * 2);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-bailey-border);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);display:flex}.bailey-history-heading{text-overflow:ellipsis;white-space:nowrap;--tw-font-weight:var(--font-weight-semibold);min-width:0;font-size:15px;font-weight:var(--font-weight-semibold);--tw-outline-style:none;outline-style:none;flex:1;margin:0;overflow:hidden}.bailey-history-icon-button{height:calc(var(--spacing) * 11);width:calc(var(--spacing) * 11);cursor:pointer;appearance:none;border-radius:var(--radius-lg);--tw-border-style:none;color:var(--color-bailey-text-secondary);background-color:#0000;border-style:none;flex:none;justify-content:center;align-items:center;display:flex}@media (hover:hover){.bailey-history-icon-button:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bailey-history-icon-button:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.bailey-history-icon-button:hover{color:var(--color-bailey-text)}}.bailey-history-icon-button:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-history-icon-button:disabled{cursor:default;opacity:.5}.bailey-history-icon{width:18px;height:18px}.bailey-history-icon-small{height:calc(var(--spacing) * 3.5);width:calc(var(--spacing) * 3.5);flex:none}.bailey-history-button{min-height:calc(var(--spacing) * 11);cursor:pointer;appearance:none;justify-content:center;align-items:center;gap:calc(var(--spacing) * 1.5);border-radius:var(--radius-lg);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 1.5);white-space:nowrap;color:var(--color-bailey-text);font-size:13px;display:inline-flex}.bailey-history-button:focus-visible{outline-style:var(--tw-outline-style);outline-offset:2px;outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-history-button:disabled{cursor:default;opacity:.5}.bailey-history-button-primary{border-color:var(--color-bailey-accent);background-color:var(--color-bailey-accent);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-white)}.bailey-history-button-danger{border-color:var(--color-bailey-error);background-color:var(--color-bailey-error);--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--color-white)}.bailey-history-button-small{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.bailey-history-body{padding-inline:calc(var(--spacing) * 2);padding-block:calc(var(--spacing) * 1.5);flex:1;overflow-y:auto}.bailey-history-list{margin:0;padding:0;list-style-type:none}.bailey-history-row{border-radius:10px;flex-wrap:wrap;align-items:center;display:flex;position:relative}.bailey-history-row+.bailey-history-row{margin-top:calc(var(--spacing) * .5)}.bailey-history-row:not(.bailey-history-row-active):hover{background-color:var(--color-gray-100)}.bailey-history-row-active{box-shadow:inset 3px 0 0 var(--color-bailey-accent,#4f46e5);background-color:#4f46e514}.bailey-history-select{min-height:calc(var(--spacing) * 11);cursor:pointer;appearance:none;gap:calc(var(--spacing) * .5);--tw-border-style:none;min-width:0;padding-block:calc(var(--spacing) * 2.5);padding-right:calc(var(--spacing) * 2.5);padding-left:calc(var(--spacing) * 3);text-align:left;color:var(--color-bailey-text);background-color:#0000;border-style:none;border-radius:10px;flex-direction:column;flex:1;font-family:inherit;display:flex}.bailey-history-select:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px;outline-color:var(--color-bailey-accent)}.bailey-history-select:disabled{cursor:default;opacity:.6}.bailey-history-row-title{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium);overflow:hidden}.bailey-history-meta{align-items:center;gap:calc(var(--spacing) * 1.5);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:flex}.bailey-history-meta>span+.bailey-history-count:before{content:\"·\";margin-right:.375rem}.bailey-history-current{--tw-font-weight:var(--font-weight-semibold);font-size:11px;font-weight:var(--font-weight-semibold);color:var(--color-bailey-accent)}.bailey-history-delete{margin-right:var(--spacing)}.bailey-history-row-confirming{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-200);background-color:var(--color-red-50)}.bailey-history-confirm{align-items:center;gap:calc(var(--spacing) * 2);min-width:0;padding-block:calc(var(--spacing) * 2);padding-right:calc(var(--spacing) * 2.5);padding-left:calc(var(--spacing) * 3);flex-wrap:wrap;flex:1;display:flex}.bailey-history-confirm-question{--tw-font-weight:var(--font-weight-semibold);min-width:7.5rem;font-size:13px;font-weight:var(--font-weight-semibold);flex:1}.bailey-history-confirm-title{text-overflow:ellipsis;white-space:nowrap;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);flex-basis:100%;overflow:hidden}.bailey-history-row-failed{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-red-200);background-color:#fff7f7}.bailey-history-row-error{align-items:center;gap:calc(var(--spacing) * 2);padding-inline:calc(var(--spacing) * 3);padding-bottom:calc(var(--spacing) * 2.5);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-error);flex-wrap:wrap;flex-basis:100%;display:flex}.bailey-history-state{align-items:center;gap:calc(var(--spacing) * 2);padding-inline:calc(var(--spacing) * 6);padding-block:calc(var(--spacing) * 12);text-align:center;color:var(--color-bailey-text-secondary);flex-direction:column;font-size:13px;display:flex}.bailey-history-state strong{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));color:var(--color-bailey-text)}.bailey-history-state-icon{height:calc(var(--spacing) * 7);width:calc(var(--spacing) * 7);color:var(--color-gray-400)}.bailey-history-state-error .bailey-history-state-icon{color:var(--color-bailey-error)}.bailey-history-more{padding-top:calc(var(--spacing) * 2.5);padding-bottom:calc(var(--spacing) * 1.5);justify-content:center;display:flex}.bailey-history-inline-error{justify-content:center;align-items:center;gap:calc(var(--spacing) * 2);padding-inline:calc(var(--spacing) * 3);padding-block:calc(var(--spacing) * 2);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-error);flex-wrap:wrap;display:flex}.bailey-history-status{min-height:calc(var(--spacing) * 9);align-items:center;gap:calc(var(--spacing) * 2);border-top-style:var(--tw-border-style);border-top-width:1px;border-color:var(--color-bailey-border);background-color:var(--color-bailey-surface-muted);padding-inline:calc(var(--spacing) * 3.5);padding-block:calc(var(--spacing) * 2);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-bailey-text-secondary);display:flex}.bailey-history-skeleton{margin-inline:var(--spacing);margin-bottom:calc(var(--spacing) * 1.5);background:linear-gradient(90deg,#f1f1f4 25%,#e6e6ec 50%,#f1f1f4 75%) 0 0/200% 100%;border-radius:10px;height:52px;animation:1.3s infinite bailey-history-shimmer}.bailey-history-spinner{height:calc(var(--spacing) * 3);width:calc(var(--spacing) * 3);border-style:var(--tw-border-style);border-width:2px;border-color:var(--color-bailey-border);border-top-color:var(--color-bailey-accent,#4f46e5);border-radius:2147483647px;animation:.8s linear infinite bailey-history-rotate;display:inline-block}@keyframes bailey-history-shimmer{to{background-position:-200% 0}}@keyframes bailey-history-rotate{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.bailey-history-skeleton,.bailey-history-spinner{animation:none}}@container (width<=340px){.bailey-history-new-chat{width:calc(var(--spacing) * 11);padding-inline:0}.bailey-history-new-chat-text,.bailey-history-count{display:none}}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-ordinal{syntax:\"*\";inherits:false}@property --tw-slashed-zero{syntax:\"*\";inherits:false}@property --tw-numeric-figure{syntax:\"*\";inherits:false}@property --tw-numeric-spacing{syntax:\"*\";inherits:false}@property --tw-numeric-fraction{syntax:\"*\";inherits:false}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}", pt = r(void 0), mt = /:root\s*,\s*:host\s*\{/, ht = ".bailey-chat-panel,.bailey-menu-content,.bailey-tooltip-content{";
|
|
1518
1520
|
function gt(e) {
|
|
1519
1521
|
let t = e.match(new RegExp(mt, "g"))?.length ?? 0;
|
|
1520
1522
|
if (t !== 1) throw Error(`Expected exactly one ":root, :host {" rule in the compiled styles.css, found ${t}. Tailwind likely changed how @theme compiles — update this rewrite (and its sibling, scripts/scope-theme-vars.js) before shipping.`);
|
|
@@ -2105,7 +2107,17 @@ function cn({ toolName: e, resolveActivityIcon: t }) {
|
|
|
2105
2107
|
children: n
|
|
2106
2108
|
}) : null;
|
|
2107
2109
|
}
|
|
2108
|
-
function ln({
|
|
2110
|
+
function ln({ offsetMs: e, labels: t }) {
|
|
2111
|
+
let n = at(e), r = t.toolStepStartedText?.replace("{offset}", n);
|
|
2112
|
+
return /* @__PURE__ */ v("span", {
|
|
2113
|
+
className: "bailey-tool-step-start",
|
|
2114
|
+
title: r,
|
|
2115
|
+
"aria-label": r,
|
|
2116
|
+
role: r ? "text" : void 0,
|
|
2117
|
+
children: n
|
|
2118
|
+
});
|
|
2119
|
+
}
|
|
2120
|
+
function un({ steps: e, resolveActivityIcon: t }) {
|
|
2109
2121
|
let n = e.filter((e) => e.status === "running");
|
|
2110
2122
|
return n.length === 0 ? null : /* @__PURE__ */ v("div", {
|
|
2111
2123
|
className: "bailey-tool-steps-live",
|
|
@@ -2127,7 +2139,7 @@ function ln({ steps: e, resolveActivityIcon: t }) {
|
|
|
2127
2139
|
}, e.key))
|
|
2128
2140
|
});
|
|
2129
2141
|
}
|
|
2130
|
-
function
|
|
2142
|
+
function dn({ steps: e, labels: t, resolveActivityIcon: n }) {
|
|
2131
2143
|
if (e.length === 0) return null;
|
|
2132
2144
|
let r = e.filter((e) => e.status === "failed").length, i = e.length === 1 ? t.toolStepsSummaryOne : t.toolStepsSummaryMany.replace("{count}", String(e.length)), a = r > 0 ? `${i}${t.toolStepsFailedSuffix.replace("{failed}", String(r))}` : i;
|
|
2133
2145
|
return /* @__PURE__ */ y("details", {
|
|
@@ -2142,6 +2154,10 @@ function un({ steps: e, labels: t, resolveActivityIcon: n }) {
|
|
|
2142
2154
|
resolveActivityIcon: n
|
|
2143
2155
|
}),
|
|
2144
2156
|
/* @__PURE__ */ v("span", { children: e.label }),
|
|
2157
|
+
e.startOffsetMs !== void 0 && /* @__PURE__ */ v(ln, {
|
|
2158
|
+
offsetMs: e.startOffsetMs,
|
|
2159
|
+
labels: t
|
|
2160
|
+
}),
|
|
2145
2161
|
e.runtimeSeconds !== void 0 && /* @__PURE__ */ v("span", { children: `${e.runtimeSeconds.toFixed(1)}s` }),
|
|
2146
2162
|
e.status === "failed" && /* @__PURE__ */ v("span", {
|
|
2147
2163
|
className: "bailey-tool-step-failed",
|
|
@@ -2155,29 +2171,29 @@ function un({ steps: e, labels: t, resolveActivityIcon: n }) {
|
|
|
2155
2171
|
}
|
|
2156
2172
|
//#endregion
|
|
2157
2173
|
//#region src/utils/relativeTime.ts
|
|
2158
|
-
var
|
|
2159
|
-
function gn(e) {
|
|
2160
|
-
return e ? Date.parse(dn.test(e) ? e : `${e}Z`) : NaN;
|
|
2161
|
-
}
|
|
2174
|
+
var fn = /(Z|[+-]\d{2}:?\d{2})$/i, pn = 60, mn = 3600, hn = 24 * mn, gn = 30 * hn * 1e3;
|
|
2162
2175
|
function _n(e) {
|
|
2163
|
-
|
|
2176
|
+
return e ? Date.parse(fn.test(e) ? e : `${e}Z`) : NaN;
|
|
2177
|
+
}
|
|
2178
|
+
function vn(e) {
|
|
2179
|
+
let t = _n(e.iso);
|
|
2164
2180
|
if (Number.isNaN(t)) return "";
|
|
2165
2181
|
let n = e.now ?? Date.now(), r = Math.max(0, n - t);
|
|
2166
2182
|
if (typeof Intl > "u" || typeof Intl.RelativeTimeFormat != "function") return e.justNowText ?? "";
|
|
2167
|
-
if (r >=
|
|
2183
|
+
if (r >= gn) return new Intl.DateTimeFormat(e.locale, { dateStyle: "medium" }).format(t);
|
|
2168
2184
|
let i = r / 1e3, a = new Intl.RelativeTimeFormat(e.locale, { numeric: "auto" });
|
|
2169
|
-
return i <
|
|
2185
|
+
return i < pn ? a.format(0, "second") : i < mn ? a.format(-Math.floor(i / pn), "minute") : i < hn ? a.format(-Math.floor(i / mn), "hour") : a.format(-Math.floor(i / hn), "day");
|
|
2170
2186
|
}
|
|
2171
2187
|
//#endregion
|
|
2172
2188
|
//#region src/ui/BaileyHistoryDrawer.tsx
|
|
2173
|
-
function
|
|
2174
|
-
let s =
|
|
2189
|
+
function yn({ client: e, pageSize: t, chat: n, labels: r, locale: i, onClose: o }) {
|
|
2190
|
+
let s = me({
|
|
2175
2191
|
client: e,
|
|
2176
2192
|
pageSize: t
|
|
2177
2193
|
}), { loadConversation: c, newChat: l } = n, u = a((e) => c ? c(e) : Promise.reject(/* @__PURE__ */ Error("no loadConversation")), [c]), d = a(() => {
|
|
2178
2194
|
l(), o({ restoreFocusTo: "input" });
|
|
2179
2195
|
}, [l, o]);
|
|
2180
|
-
return /* @__PURE__ */ v(
|
|
2196
|
+
return /* @__PURE__ */ v(Sn, {
|
|
2181
2197
|
conversations: s,
|
|
2182
2198
|
activeConversationId: n.conversationId,
|
|
2183
2199
|
selectStatus: n.historyStatus,
|
|
@@ -2189,9 +2205,9 @@ function vn({ client: e, pageSize: t, chat: n, labels: r, locale: i, onClose: o
|
|
|
2189
2205
|
locale: i
|
|
2190
2206
|
});
|
|
2191
2207
|
}
|
|
2192
|
-
var
|
|
2193
|
-
function
|
|
2194
|
-
let { conversations: m, status: h, error: g, hasMore: b, refresh: x, loadMore: S, remove: C } = e, w = c(), T = c(), E = d(null), D = d(null), O = d(null), k = d(/* @__PURE__ */ new Map()), ee = d(/* @__PURE__ */ new Map()), A = d(null), j = d(null), [M, N] = f(null), [
|
|
2208
|
+
var bn = (e, t) => Object.entries(t).reduce((e, [t, n]) => e.split(`{${t}}`).join(String(n)), e), xn = (e) => !e || e.kind !== "http" ? !1 : e.status === 401 || e.status === 403;
|
|
2209
|
+
function Sn({ conversations: e, activeConversationId: t, selectStatus: n, onSelect: r, onActiveDeleted: i, onNewChat: a, onClose: o, labels: l, locale: u, now: p }) {
|
|
2210
|
+
let { conversations: m, status: h, error: g, hasMore: b, refresh: x, loadMore: S, remove: C } = e, w = c(), T = c(), E = d(null), D = d(null), O = d(null), k = d(/* @__PURE__ */ new Map()), ee = d(/* @__PURE__ */ new Map()), A = d(null), j = d(null), [M, N] = f(null), [P, F] = f(null), [te, ne] = f(0), [re, ie] = f(!1), [I, ae] = f(!1), [oe, se] = f(!1), L = u ?? (typeof navigator < "u" ? navigator.language : void 0);
|
|
2195
2211
|
s(() => {
|
|
2196
2212
|
E.current?.focus();
|
|
2197
2213
|
}, []), s(() => {
|
|
@@ -2210,59 +2226,59 @@ function xn({ conversations: e, activeConversationId: t, selectStatus: n, onSele
|
|
|
2210
2226
|
b,
|
|
2211
2227
|
m
|
|
2212
2228
|
]);
|
|
2213
|
-
let
|
|
2229
|
+
let ce = () => {
|
|
2214
2230
|
j.current = m.length, S();
|
|
2215
|
-
},
|
|
2231
|
+
}, le = (e) => {
|
|
2216
2232
|
A.current = {
|
|
2217
2233
|
kind: "delete",
|
|
2218
2234
|
id: e
|
|
2219
2235
|
}, N(null);
|
|
2220
|
-
},
|
|
2236
|
+
}, ue = (e) => {
|
|
2221
2237
|
if (e.key === "Escape") {
|
|
2222
2238
|
if (e.stopPropagation(), M) {
|
|
2223
|
-
|
|
2239
|
+
le(M);
|
|
2224
2240
|
return;
|
|
2225
2241
|
}
|
|
2226
2242
|
o({ restoreFocusTo: "menu" });
|
|
2227
2243
|
}
|
|
2228
|
-
},
|
|
2229
|
-
if (
|
|
2244
|
+
}, de = async (e) => {
|
|
2245
|
+
if (se(!1), e === t) {
|
|
2230
2246
|
o({ restoreFocusTo: "input" });
|
|
2231
2247
|
return;
|
|
2232
2248
|
}
|
|
2233
|
-
|
|
2249
|
+
ae(!0);
|
|
2234
2250
|
try {
|
|
2235
2251
|
await r({ conversationId: e });
|
|
2236
2252
|
} catch {
|
|
2237
2253
|
A.current = {
|
|
2238
2254
|
kind: "select",
|
|
2239
2255
|
id: e
|
|
2240
|
-
},
|
|
2256
|
+
}, se(!0), ae(!1);
|
|
2241
2257
|
return;
|
|
2242
2258
|
}
|
|
2243
|
-
|
|
2244
|
-
},
|
|
2259
|
+
ae(!1), o({ restoreFocusTo: "input" });
|
|
2260
|
+
}, fe = async (e) => {
|
|
2245
2261
|
let n = m.findIndex((t) => t.conversationId === e), r = m[n + 1] ?? m[n - 1];
|
|
2246
2262
|
A.current = r ? {
|
|
2247
2263
|
kind: "select",
|
|
2248
2264
|
id: r.conversationId
|
|
2249
|
-
} : { kind: "newChat" }, N(null),
|
|
2265
|
+
} : { kind: "newChat" }, N(null), F(null), ie(!1), ne((e) => e + 1);
|
|
2250
2266
|
try {
|
|
2251
|
-
await C({ conversationId: e }),
|
|
2267
|
+
await C({ conversationId: e }), ie(!0), e === t && i?.();
|
|
2252
2268
|
} catch {
|
|
2253
2269
|
A.current = {
|
|
2254
2270
|
kind: "delete",
|
|
2255
2271
|
id: e
|
|
2256
|
-
},
|
|
2272
|
+
}, F(e);
|
|
2257
2273
|
} finally {
|
|
2258
|
-
|
|
2274
|
+
ne((e) => e - 1);
|
|
2259
2275
|
}
|
|
2260
|
-
},
|
|
2276
|
+
}, R = h === "loading" && m.length === 0, pe = h === "error" && m.length === 0, z = h === "error" && m.length > 0 && b, B = h === "loading" && m.length > 0, V = I || n === "loading", H = R ? l.historyLoadingText : te > 0 ? l.historyDeletingText : re ? l.historyDeletedText : m.length > 0 ? bn(m.length === 1 ? l.historyCountTextOne : l.historyCountTextMany, { count: m.length }) : "", U = R || te > 0;
|
|
2261
2277
|
return /* @__PURE__ */ y("section", {
|
|
2262
2278
|
role: "region",
|
|
2263
2279
|
"aria-labelledby": w,
|
|
2264
2280
|
className: "bailey-history-drawer",
|
|
2265
|
-
onKeyDown:
|
|
2281
|
+
onKeyDown: ue,
|
|
2266
2282
|
children: [
|
|
2267
2283
|
/* @__PURE__ */ y("div", {
|
|
2268
2284
|
className: "bailey-history-header",
|
|
@@ -2286,7 +2302,7 @@ function xn({ conversations: e, activeConversationId: t, selectStatus: n, onSele
|
|
|
2286
2302
|
type: "button",
|
|
2287
2303
|
className: "bailey-history-button bailey-history-new-chat",
|
|
2288
2304
|
"aria-label": l.newChatButtonText,
|
|
2289
|
-
disabled:
|
|
2305
|
+
disabled: R,
|
|
2290
2306
|
onClick: a,
|
|
2291
2307
|
children: [/* @__PURE__ */ v(Pt, { className: "bailey-history-icon-small" }), /* @__PURE__ */ v("span", {
|
|
2292
2308
|
className: "bailey-history-new-chat-text",
|
|
@@ -2297,9 +2313,9 @@ function xn({ conversations: e, activeConversationId: t, selectStatus: n, onSele
|
|
|
2297
2313
|
}),
|
|
2298
2314
|
/* @__PURE__ */ y("div", {
|
|
2299
2315
|
className: "bailey-history-body",
|
|
2300
|
-
"aria-busy":
|
|
2316
|
+
"aria-busy": R || void 0,
|
|
2301
2317
|
children: [
|
|
2302
|
-
|
|
2318
|
+
R && /* @__PURE__ */ y("div", {
|
|
2303
2319
|
"aria-hidden": "true",
|
|
2304
2320
|
children: [
|
|
2305
2321
|
/* @__PURE__ */ v("div", { className: "bailey-history-skeleton" }),
|
|
@@ -2308,13 +2324,13 @@ function xn({ conversations: e, activeConversationId: t, selectStatus: n, onSele
|
|
|
2308
2324
|
/* @__PURE__ */ v("div", { className: "bailey-history-skeleton" })
|
|
2309
2325
|
]
|
|
2310
2326
|
}),
|
|
2311
|
-
|
|
2327
|
+
pe && /* @__PURE__ */ y("div", {
|
|
2312
2328
|
role: "alert",
|
|
2313
2329
|
className: "bailey-history-state bailey-history-state-error",
|
|
2314
2330
|
children: [
|
|
2315
2331
|
/* @__PURE__ */ v(Vt, { className: "bailey-history-state-icon" }),
|
|
2316
|
-
/* @__PURE__ */ v("strong", { children:
|
|
2317
|
-
/* @__PURE__ */ v("span", { children:
|
|
2332
|
+
/* @__PURE__ */ v("strong", { children: xn(g) ? l.historySessionExpiredTitle : l.historyErrorTitle }),
|
|
2333
|
+
/* @__PURE__ */ v("span", { children: xn(g) ? l.historySessionExpiredDescription : l.historyErrorDescription }),
|
|
2318
2334
|
/* @__PURE__ */ v("button", {
|
|
2319
2335
|
type: "button",
|
|
2320
2336
|
className: "bailey-history-button bailey-history-button-primary",
|
|
@@ -2323,7 +2339,7 @@ function xn({ conversations: e, activeConversationId: t, selectStatus: n, onSele
|
|
|
2323
2339
|
})
|
|
2324
2340
|
]
|
|
2325
2341
|
}),
|
|
2326
|
-
!
|
|
2342
|
+
!R && !pe && m.length === 0 && /* @__PURE__ */ y("div", {
|
|
2327
2343
|
className: "bailey-history-state",
|
|
2328
2344
|
children: [
|
|
2329
2345
|
/* @__PURE__ */ v(jt, { className: "bailey-history-state-icon" }),
|
|
@@ -2360,25 +2376,25 @@ function xn({ conversations: e, activeConversationId: t, selectStatus: n, onSele
|
|
|
2360
2376
|
/* @__PURE__ */ v("button", {
|
|
2361
2377
|
type: "button",
|
|
2362
2378
|
className: "bailey-history-button bailey-history-button-danger",
|
|
2363
|
-
onClick: () => void
|
|
2379
|
+
onClick: () => void fe(n),
|
|
2364
2380
|
children: l.historyDeleteConfirmText
|
|
2365
2381
|
}),
|
|
2366
2382
|
/* @__PURE__ */ v("button", {
|
|
2367
2383
|
ref: O,
|
|
2368
2384
|
type: "button",
|
|
2369
2385
|
className: "bailey-history-button",
|
|
2370
|
-
onClick: () =>
|
|
2386
|
+
onClick: () => le(n),
|
|
2371
2387
|
children: l.historyDeleteCancelText
|
|
2372
2388
|
})
|
|
2373
2389
|
]
|
|
2374
2390
|
})
|
|
2375
2391
|
}, n);
|
|
2376
|
-
let a =
|
|
2392
|
+
let a = vn({
|
|
2377
2393
|
iso: e.updatedAt,
|
|
2378
|
-
locale:
|
|
2394
|
+
locale: L,
|
|
2379
2395
|
now: p?.(),
|
|
2380
2396
|
justNowText: l.historyJustNowText
|
|
2381
|
-
}), o =
|
|
2397
|
+
}), o = bn(e.messageCount === 1 ? l.historyMessageCountOne : l.historyMessageCountMany, { count: e.messageCount }), s = P === n;
|
|
2382
2398
|
return /* @__PURE__ */ y("li", {
|
|
2383
2399
|
className: `bailey-history-row${i ? " bailey-history-row-active" : ""}${s ? " bailey-history-row-failed" : ""}`,
|
|
2384
2400
|
children: [
|
|
@@ -2389,9 +2405,9 @@ function xn({ conversations: e, activeConversationId: t, selectStatus: n, onSele
|
|
|
2389
2405
|
},
|
|
2390
2406
|
className: "bailey-history-select",
|
|
2391
2407
|
"aria-current": i ? "true" : void 0,
|
|
2392
|
-
"aria-disabled":
|
|
2408
|
+
"aria-disabled": V || void 0,
|
|
2393
2409
|
onClick: () => {
|
|
2394
|
-
|
|
2410
|
+
V || de(n);
|
|
2395
2411
|
},
|
|
2396
2412
|
children: [/* @__PURE__ */ v("span", {
|
|
2397
2413
|
className: "bailey-history-row-title",
|
|
@@ -2420,9 +2436,9 @@ function xn({ conversations: e, activeConversationId: t, selectStatus: n, onSele
|
|
|
2420
2436
|
e ? ee.current.set(n, e) : ee.current.delete(n);
|
|
2421
2437
|
},
|
|
2422
2438
|
className: "bailey-history-icon-button bailey-history-delete",
|
|
2423
|
-
"aria-label":
|
|
2439
|
+
"aria-label": bn(l.historyDeleteAriaLabel, { title: r }),
|
|
2424
2440
|
onClick: () => {
|
|
2425
|
-
|
|
2441
|
+
F(null), ie(!1), A.current = { kind: "cancel" }, N(n);
|
|
2426
2442
|
},
|
|
2427
2443
|
children: /* @__PURE__ */ v(Bt, { className: "bailey-history-icon" })
|
|
2428
2444
|
}),
|
|
@@ -2435,13 +2451,13 @@ function xn({ conversations: e, activeConversationId: t, selectStatus: n, onSele
|
|
|
2435
2451
|
/* @__PURE__ */ v("button", {
|
|
2436
2452
|
type: "button",
|
|
2437
2453
|
className: "bailey-history-button bailey-history-button-small",
|
|
2438
|
-
onClick: () => void
|
|
2454
|
+
onClick: () => void fe(n),
|
|
2439
2455
|
children: l.historyDeleteRetryText
|
|
2440
2456
|
}),
|
|
2441
2457
|
/* @__PURE__ */ v("button", {
|
|
2442
2458
|
type: "button",
|
|
2443
2459
|
className: "bailey-history-button bailey-history-button-small",
|
|
2444
|
-
onClick: () =>
|
|
2460
|
+
onClick: () => F(null),
|
|
2445
2461
|
children: l.historyDeleteDismissText
|
|
2446
2462
|
})
|
|
2447
2463
|
]
|
|
@@ -2457,24 +2473,24 @@ function xn({ conversations: e, activeConversationId: t, selectStatus: n, onSele
|
|
|
2457
2473
|
}),
|
|
2458
2474
|
b && m.length > 0 && /* @__PURE__ */ v("div", {
|
|
2459
2475
|
className: "bailey-history-more",
|
|
2460
|
-
children:
|
|
2476
|
+
children: z ? /* @__PURE__ */ y("div", {
|
|
2461
2477
|
role: "alert",
|
|
2462
2478
|
className: "bailey-history-inline-error",
|
|
2463
2479
|
children: [/* @__PURE__ */ v("span", { children: l.historyLoadMoreErrorText }), /* @__PURE__ */ v("button", {
|
|
2464
2480
|
type: "button",
|
|
2465
2481
|
className: "bailey-history-button",
|
|
2466
|
-
onClick:
|
|
2482
|
+
onClick: ce,
|
|
2467
2483
|
children: l.retryButtonText
|
|
2468
2484
|
})]
|
|
2469
2485
|
}) : /* @__PURE__ */ y("button", {
|
|
2470
2486
|
type: "button",
|
|
2471
2487
|
className: "bailey-history-button",
|
|
2472
|
-
disabled:
|
|
2473
|
-
onClick:
|
|
2474
|
-
children: [
|
|
2488
|
+
disabled: B,
|
|
2489
|
+
onClick: ce,
|
|
2490
|
+
children: [B && /* @__PURE__ */ v("span", {
|
|
2475
2491
|
className: "bailey-history-spinner",
|
|
2476
2492
|
"aria-hidden": "true"
|
|
2477
|
-
}),
|
|
2493
|
+
}), B ? l.historyLoadingMoreText : l.historyLoadMoreText]
|
|
2478
2494
|
})
|
|
2479
2495
|
})
|
|
2480
2496
|
]
|
|
@@ -2483,17 +2499,17 @@ function xn({ conversations: e, activeConversationId: t, selectStatus: n, onSele
|
|
|
2483
2499
|
role: "status",
|
|
2484
2500
|
"aria-live": "polite",
|
|
2485
2501
|
className: "bailey-history-status",
|
|
2486
|
-
children: [
|
|
2502
|
+
children: [U && /* @__PURE__ */ v("span", {
|
|
2487
2503
|
className: "bailey-history-spinner",
|
|
2488
2504
|
"aria-hidden": "true"
|
|
2489
|
-
}),
|
|
2505
|
+
}), H]
|
|
2490
2506
|
})
|
|
2491
2507
|
]
|
|
2492
2508
|
});
|
|
2493
2509
|
}
|
|
2494
2510
|
//#endregion
|
|
2495
2511
|
//#region src/ui/historyLabels.ts
|
|
2496
|
-
var
|
|
2512
|
+
var Cn = {
|
|
2497
2513
|
newChatButtonText: "New chat",
|
|
2498
2514
|
retryButtonText: "Retry",
|
|
2499
2515
|
historyTitle: "Chat history",
|
|
@@ -2526,8 +2542,8 @@ var Sn = {
|
|
|
2526
2542
|
historyDeleteRetryText: "Try again",
|
|
2527
2543
|
historyDeleteDismissText: "Dismiss",
|
|
2528
2544
|
historyJustNowText: "just now"
|
|
2529
|
-
},
|
|
2530
|
-
...
|
|
2545
|
+
}, wn = "How can bailey AI help you today?", Tn = "Reply to bailey AI", En = {
|
|
2546
|
+
...Cn,
|
|
2531
2547
|
newChatButtonText: "New chat",
|
|
2532
2548
|
newChatAriaLabel: "new chat",
|
|
2533
2549
|
historyAriaLabel: "conversation history",
|
|
@@ -2550,107 +2566,108 @@ var Sn = {
|
|
|
2550
2566
|
toolStepsFailedSuffix: ", {failed} failed",
|
|
2551
2567
|
toolStepFailedText: "failed",
|
|
2552
2568
|
toolStepStoppedText: "stopped",
|
|
2569
|
+
toolStepStartedText: "started {offset} after send",
|
|
2553
2570
|
mcpAppDefaultTitle: "MCP App",
|
|
2554
2571
|
loadEarlierButtonText: "Load earlier messages",
|
|
2555
2572
|
loadEarlierErrorText: "Couldn't load earlier messages."
|
|
2556
|
-
},
|
|
2573
|
+
}, Dn = [m], On = {
|
|
2557
2574
|
...Tt(),
|
|
2558
2575
|
p: ({ children: e }) => /* @__PURE__ */ v(_, { children: e })
|
|
2559
|
-
},
|
|
2576
|
+
}, kn = i(function({ content: e, components: t }) {
|
|
2560
2577
|
return /* @__PURE__ */ v("div", {
|
|
2561
2578
|
className: "bailey-markdown-content",
|
|
2562
2579
|
children: /* @__PURE__ */ v(p, {
|
|
2563
|
-
remarkPlugins:
|
|
2580
|
+
remarkPlugins: Dn,
|
|
2564
2581
|
components: t,
|
|
2565
2582
|
skipHtml: !0,
|
|
2566
2583
|
children: e
|
|
2567
2584
|
})
|
|
2568
2585
|
});
|
|
2569
2586
|
});
|
|
2570
|
-
function
|
|
2587
|
+
function An(e, t, n) {
|
|
2571
2588
|
if (e !== "streaming") return;
|
|
2572
2589
|
let r = t.filter((e) => e.turnSentAt === n?.sentAt);
|
|
2573
2590
|
return r[r.length - 1];
|
|
2574
2591
|
}
|
|
2575
|
-
function
|
|
2592
|
+
function jn(e) {
|
|
2576
2593
|
if (!(!e || e.kind === "tool_end")) return rt(e);
|
|
2577
2594
|
}
|
|
2578
|
-
function
|
|
2595
|
+
function Mn(e) {
|
|
2579
2596
|
let t = new Date(e), n = t.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), r = t.toLocaleTimeString([], {
|
|
2580
2597
|
hour: "numeric",
|
|
2581
2598
|
minute: "2-digit"
|
|
2582
2599
|
});
|
|
2583
2600
|
return n ? `Today ${r}` : `${t.toLocaleDateString()} ${r}`;
|
|
2584
2601
|
}
|
|
2585
|
-
function
|
|
2586
|
-
let { messages:
|
|
2587
|
-
...
|
|
2588
|
-
...
|
|
2589
|
-
},
|
|
2590
|
-
renderTable:
|
|
2591
|
-
renderChart:
|
|
2592
|
-
}), [
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
]),
|
|
2597
|
-
|
|
2598
|
-
at:
|
|
2599
|
-
length:
|
|
2600
|
-
},
|
|
2601
|
-
let
|
|
2602
|
+
function Nn({ chat: e, placeholder: t, replyPlaceholder: r = Tn, emptyPlaceholder: i, suggestions: o, onHistoryClick: c, history: l, locale: m, privacyNote: _, resolveActivityIcon: b, sendIcon: x, className: S, height: C, width: w, hideDeveloperDetails: T = !1, renderMessageActions: E, renderTable: D, renderChart: O, renderMcpApp: k, labels: ee, formatMessageTime: A }) {
|
|
2603
|
+
let { messages: j, traceEvents: M, lastRequest: N, status: P, error: F, send: te, stop: ne, retryLast: re, clearTrace: ie, clearError: I, newChat: ae } = e, [oe, se] = f(""), L = {
|
|
2604
|
+
...En,
|
|
2605
|
+
...ee
|
|
2606
|
+
}, ce = A ?? Mn, le = d(null), ue = d(null), de = d(null), fe = d(null), [R, pe] = f(!1), z = d(null), B = d(!1), V = !!c || !!l, H = Ct(le), U = d(null), me = d(null), W = d(!0), G = u(() => Tt({
|
|
2607
|
+
renderTable: D,
|
|
2608
|
+
renderChart: O
|
|
2609
|
+
}), [D, O]), K = u(() => An(P, M, N), [
|
|
2610
|
+
P,
|
|
2611
|
+
M,
|
|
2612
|
+
N
|
|
2613
|
+
]), q = jn(K), he = K?.kind === "tool_end" ? K.at : void 0, ge = j[j.length - 1]?.content.length ?? 0, [_e, ve] = f(null), J = _e;
|
|
2614
|
+
he !== void 0 && _e?.at !== he && (J = {
|
|
2615
|
+
at: he,
|
|
2616
|
+
length: ge
|
|
2617
|
+
}, ve(J));
|
|
2618
|
+
let ye = he !== void 0 && J?.at === he && ge <= J.length, be = q ?? (ye ? L.thinkingHint : void 0), Y = j.length === 0, xe = t ?? (Y ? i ?? wn : r);
|
|
2602
2619
|
s(() => {
|
|
2603
|
-
let e =
|
|
2620
|
+
let e = me.current;
|
|
2604
2621
|
if (!e) return;
|
|
2605
2622
|
let t = () => {
|
|
2606
2623
|
let t = e.scrollHeight - e.scrollTop - e.clientHeight;
|
|
2607
|
-
|
|
2624
|
+
W.current = t < 60;
|
|
2608
2625
|
};
|
|
2609
2626
|
return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
|
|
2610
2627
|
}, []), s(() => {
|
|
2611
|
-
|
|
2612
|
-
behavior:
|
|
2628
|
+
W.current && U.current?.scrollIntoView({
|
|
2629
|
+
behavior: P === "streaming" ? "auto" : "smooth",
|
|
2613
2630
|
block: "nearest"
|
|
2614
2631
|
});
|
|
2615
|
-
}, [
|
|
2616
|
-
let
|
|
2617
|
-
|
|
2618
|
-
},
|
|
2619
|
-
let t =
|
|
2620
|
-
|
|
2632
|
+
}, [j, P]);
|
|
2633
|
+
let Se = (e) => {
|
|
2634
|
+
W.current = !0, te(e);
|
|
2635
|
+
}, X = d(null), Z = () => {
|
|
2636
|
+
let t = me.current;
|
|
2637
|
+
W.current = !1, X.current = t ? {
|
|
2621
2638
|
height: t.scrollHeight,
|
|
2622
2639
|
top: t.scrollTop
|
|
2623
2640
|
} : null, e.loadEarlier?.().catch(() => {
|
|
2624
|
-
|
|
2641
|
+
X.current = null;
|
|
2625
2642
|
});
|
|
2626
2643
|
};
|
|
2627
2644
|
s(() => {
|
|
2628
|
-
let e =
|
|
2629
|
-
!e || !t || t.scrollHeight === e.height || (t.scrollTop = e.top + (t.scrollHeight - e.height),
|
|
2630
|
-
}, [
|
|
2631
|
-
|
|
2632
|
-
}, [
|
|
2633
|
-
|
|
2634
|
-
}, [
|
|
2635
|
-
let
|
|
2636
|
-
|
|
2645
|
+
let e = X.current, t = me.current;
|
|
2646
|
+
!e || !t || t.scrollHeight === e.height || (t.scrollTop = e.top + (t.scrollHeight - e.height), X.current = null);
|
|
2647
|
+
}, [j]), s(() => {
|
|
2648
|
+
ue.current?.toggleAttribute("inert", R);
|
|
2649
|
+
}, [R]), s(() => {
|
|
2650
|
+
R || !z.current || ((z.current === "input" ? de.current : fe.current)?.focus(), z.current = null);
|
|
2651
|
+
}, [R]);
|
|
2652
|
+
let Ce = a((e) => {
|
|
2653
|
+
z.current = e.restoreFocusTo, pe(!1);
|
|
2637
2654
|
}, []);
|
|
2638
2655
|
return /* @__PURE__ */ v(pt.Provider, {
|
|
2639
|
-
value:
|
|
2656
|
+
value: H,
|
|
2640
2657
|
children: /* @__PURE__ */ y("div", {
|
|
2641
|
-
ref:
|
|
2642
|
-
className: `bailey-chat-panel${
|
|
2643
|
-
style:
|
|
2644
|
-
height:
|
|
2645
|
-
width:
|
|
2658
|
+
ref: le,
|
|
2659
|
+
className: `bailey-chat-panel${S ? ` ${S}` : ""}`,
|
|
2660
|
+
style: C !== void 0 || w !== void 0 ? {
|
|
2661
|
+
height: C,
|
|
2662
|
+
width: w
|
|
2646
2663
|
} : void 0,
|
|
2647
2664
|
children: [/* @__PURE__ */ y("div", {
|
|
2648
2665
|
className: "bailey-chat-panel-inner",
|
|
2649
|
-
ref:
|
|
2666
|
+
ref: ue,
|
|
2650
2667
|
children: [
|
|
2651
2668
|
/* @__PURE__ */ y("div", {
|
|
2652
2669
|
className: "bailey-chat-transcript",
|
|
2653
|
-
ref:
|
|
2670
|
+
ref: me,
|
|
2654
2671
|
children: [
|
|
2655
2672
|
e.hasEarlier && e.loadEarlier && /* @__PURE__ */ y("div", {
|
|
2656
2673
|
className: "bailey-load-earlier",
|
|
@@ -2658,7 +2675,7 @@ function Mn({ chat: e, placeholder: t, replyPlaceholder: r = wn, emptyPlaceholde
|
|
|
2658
2675
|
type: "button",
|
|
2659
2676
|
className: "bailey-load-earlier-button",
|
|
2660
2677
|
disabled: e.historyStatus === "loading",
|
|
2661
|
-
onClick:
|
|
2678
|
+
onClick: Z,
|
|
2662
2679
|
children: L.loadEarlierButtonText
|
|
2663
2680
|
}), e.historyStatus === "error" && /* @__PURE__ */ v("div", {
|
|
2664
2681
|
role: "alert",
|
|
@@ -2673,7 +2690,7 @@ function Mn({ chat: e, placeholder: t, replyPlaceholder: r = wn, emptyPlaceholde
|
|
|
2673
2690
|
children: L.suggestionsTitle
|
|
2674
2691
|
}), o.map((e, t) => /* @__PURE__ */ y("button", {
|
|
2675
2692
|
type: "button",
|
|
2676
|
-
onClick: () =>
|
|
2693
|
+
onClick: () => Se(e.value ?? e.label),
|
|
2677
2694
|
className: "bailey-suggestion-card",
|
|
2678
2695
|
children: [/* @__PURE__ */ v("span", { children: e.label }), /* @__PURE__ */ v(Ot, { className: "bailey-suggestion-icon" })]
|
|
2679
2696
|
}, `${e.label}-${t}`))]
|
|
@@ -2681,8 +2698,8 @@ function Mn({ chat: e, placeholder: t, replyPlaceholder: r = wn, emptyPlaceholde
|
|
|
2681
2698
|
className: "bailey-empty-state",
|
|
2682
2699
|
children: L.emptyStateMessage
|
|
2683
2700
|
})),
|
|
2684
|
-
|
|
2685
|
-
let r = e.role === "assistant" && t ===
|
|
2701
|
+
j.map((e, t) => {
|
|
2702
|
+
let r = e.role === "assistant" && t === j.length - 1, i = P === "streaming" && r && e.content === "", a = e.role === "assistant" ? dt(M, e.createdAt) : [], o = a.some((e) => e.status === "running");
|
|
2686
2703
|
return /* @__PURE__ */ v("div", {
|
|
2687
2704
|
className: e.role === "user" ? "bailey-message-row bailey-message-row-user" : "bailey-message-row",
|
|
2688
2705
|
children: e.role === "user" ? /* @__PURE__ */ y("div", {
|
|
@@ -2692,43 +2709,43 @@ function Mn({ chat: e, placeholder: t, replyPlaceholder: r = wn, emptyPlaceholde
|
|
|
2692
2709
|
children: [/* @__PURE__ */ v("span", {
|
|
2693
2710
|
className: "bailey-message-meta-name",
|
|
2694
2711
|
children: L.youLabel
|
|
2695
|
-
}), e.createdAt !== void 0 && /* @__PURE__ */ v("span", { children:
|
|
2712
|
+
}), e.createdAt !== void 0 && /* @__PURE__ */ v("span", { children: ce(e.createdAt) })]
|
|
2696
2713
|
}), /* @__PURE__ */ v("div", {
|
|
2697
2714
|
className: "bailey-user-bubble",
|
|
2698
2715
|
children: e.content
|
|
2699
2716
|
})]
|
|
2700
|
-
}) : i ? o ? /* @__PURE__ */ v(
|
|
2717
|
+
}) : i ? o ? /* @__PURE__ */ v(un, {
|
|
2701
2718
|
steps: a,
|
|
2702
2719
|
resolveActivityIcon: b
|
|
2703
2720
|
}) : /* @__PURE__ */ v("div", {
|
|
2704
2721
|
className: "bailey-thinking-hint",
|
|
2705
|
-
children:
|
|
2722
|
+
children: q ?? L.thinkingHint
|
|
2706
2723
|
}) : /* @__PURE__ */ y("div", {
|
|
2707
2724
|
className: "bailey-assistant-message",
|
|
2708
2725
|
children: [
|
|
2709
|
-
!e.streaming && /* @__PURE__ */ v(
|
|
2726
|
+
!e.streaming && /* @__PURE__ */ v(dn, {
|
|
2710
2727
|
steps: a,
|
|
2711
2728
|
labels: L,
|
|
2712
2729
|
resolveActivityIcon: b
|
|
2713
2730
|
}),
|
|
2714
|
-
/* @__PURE__ */ v(
|
|
2731
|
+
/* @__PURE__ */ v(kn, {
|
|
2715
2732
|
content: e.content,
|
|
2716
|
-
components:
|
|
2733
|
+
components: G
|
|
2717
2734
|
}),
|
|
2718
2735
|
e.parts?.map((e, t) => e.type === "image" ? /* @__PURE__ */ v($t, {
|
|
2719
2736
|
src: e.src,
|
|
2720
2737
|
alt: e.alt
|
|
2721
|
-
}, t) : e.type === "mcp_app" ? /* @__PURE__ */ v(n, { children:
|
|
2738
|
+
}, t) : e.type === "mcp_app" ? /* @__PURE__ */ v(n, { children: k ? k(e) : /* @__PURE__ */ v(sn, {
|
|
2722
2739
|
...e,
|
|
2723
2740
|
title: e.title ?? L.mcpAppDefaultTitle
|
|
2724
2741
|
}) }, t) : null),
|
|
2725
|
-
e.streaming && /* @__PURE__ */ v(
|
|
2742
|
+
e.streaming && /* @__PURE__ */ v(un, {
|
|
2726
2743
|
steps: a,
|
|
2727
2744
|
resolveActivityIcon: b
|
|
2728
2745
|
}),
|
|
2729
|
-
e.streaming &&
|
|
2746
|
+
e.streaming && be && !o && /* @__PURE__ */ v("div", {
|
|
2730
2747
|
className: "bailey-streaming-hint",
|
|
2731
|
-
children:
|
|
2748
|
+
children: be
|
|
2732
2749
|
}),
|
|
2733
2750
|
!e.streaming && /* @__PURE__ */ y("div", {
|
|
2734
2751
|
className: "bailey-message-actions",
|
|
@@ -2737,19 +2754,19 @@ function Mn({ chat: e, placeholder: t, replyPlaceholder: r = wn, emptyPlaceholde
|
|
|
2737
2754
|
ariaLabel: L.copyButtonAriaLabel,
|
|
2738
2755
|
tooltipDefaultText: L.copyButtonTooltipDefault,
|
|
2739
2756
|
tooltipCopiedText: L.copyButtonTooltipCopied
|
|
2740
|
-
}),
|
|
2757
|
+
}), E?.(e)]
|
|
2741
2758
|
})
|
|
2742
2759
|
]
|
|
2743
2760
|
})
|
|
2744
2761
|
}, e.id);
|
|
2745
2762
|
}),
|
|
2746
|
-
/* @__PURE__ */ v("div", { ref:
|
|
2763
|
+
/* @__PURE__ */ v("div", { ref: U })
|
|
2747
2764
|
]
|
|
2748
2765
|
}),
|
|
2749
|
-
|
|
2766
|
+
F && /* @__PURE__ */ y("div", {
|
|
2750
2767
|
className: "bailey-error-banner",
|
|
2751
2768
|
role: "alert",
|
|
2752
|
-
children: [/* @__PURE__ */ v("span", { children:
|
|
2769
|
+
children: [/* @__PURE__ */ v("span", { children: F }), /* @__PURE__ */ y("div", {
|
|
2753
2770
|
className: "bailey-error-actions",
|
|
2754
2771
|
children: [/* @__PURE__ */ v("button", {
|
|
2755
2772
|
type: "button",
|
|
@@ -2758,35 +2775,35 @@ function Mn({ chat: e, placeholder: t, replyPlaceholder: r = wn, emptyPlaceholde
|
|
|
2758
2775
|
children: L.retryButtonText
|
|
2759
2776
|
}), /* @__PURE__ */ v("button", {
|
|
2760
2777
|
type: "button",
|
|
2761
|
-
onClick:
|
|
2778
|
+
onClick: I,
|
|
2762
2779
|
"aria-label": L.dismissErrorAriaLabel,
|
|
2763
2780
|
className: "bailey-dismiss-button",
|
|
2764
2781
|
children: "✕"
|
|
2765
2782
|
})]
|
|
2766
2783
|
})]
|
|
2767
2784
|
}),
|
|
2768
|
-
!
|
|
2769
|
-
events:
|
|
2770
|
-
lastRequest:
|
|
2785
|
+
!T && /* @__PURE__ */ v(Qt, {
|
|
2786
|
+
events: M,
|
|
2787
|
+
lastRequest: N,
|
|
2771
2788
|
onClear: ie
|
|
2772
2789
|
}),
|
|
2773
2790
|
/* @__PURE__ */ y("div", {
|
|
2774
2791
|
className: "bailey-input-area",
|
|
2775
2792
|
children: [/* @__PURE__ */ y("form", {
|
|
2776
2793
|
onSubmit: (e) => {
|
|
2777
|
-
e.preventDefault(), !(!
|
|
2794
|
+
e.preventDefault(), !(!oe.trim() || P === "streaming") && (Se(oe), se(""));
|
|
2778
2795
|
},
|
|
2779
2796
|
className: "bailey-input-row",
|
|
2780
2797
|
children: [/* @__PURE__ */ v("input", {
|
|
2781
|
-
ref:
|
|
2798
|
+
ref: de,
|
|
2782
2799
|
type: "text",
|
|
2783
|
-
placeholder:
|
|
2784
|
-
"aria-label":
|
|
2785
|
-
value:
|
|
2786
|
-
onChange: (e) =>
|
|
2787
|
-
disabled:
|
|
2800
|
+
placeholder: xe,
|
|
2801
|
+
"aria-label": xe,
|
|
2802
|
+
value: oe,
|
|
2803
|
+
onChange: (e) => se(e.target.value),
|
|
2804
|
+
disabled: P === "streaming",
|
|
2788
2805
|
className: "bailey-input"
|
|
2789
|
-
}),
|
|
2806
|
+
}), P === "streaming" ? /* @__PURE__ */ v(g.Provider, {
|
|
2790
2807
|
delayDuration: 200,
|
|
2791
2808
|
children: /* @__PURE__ */ y(g.Root, { children: [/* @__PURE__ */ v(g.Trigger, {
|
|
2792
2809
|
asChild: !0,
|
|
@@ -2798,7 +2815,7 @@ function Mn({ chat: e, placeholder: t, replyPlaceholder: r = wn, emptyPlaceholde
|
|
|
2798
2815
|
children: /* @__PURE__ */ v(Dt, { className: "bailey-stop-icon" })
|
|
2799
2816
|
})
|
|
2800
2817
|
}), /* @__PURE__ */ v(g.Portal, {
|
|
2801
|
-
container:
|
|
2818
|
+
container: H instanceof ShadowRoot ? H : void 0,
|
|
2802
2819
|
children: /* @__PURE__ */ y(g.Content, {
|
|
2803
2820
|
side: "top",
|
|
2804
2821
|
className: "bailey-tooltip-content",
|
|
@@ -2808,40 +2825,40 @@ function Mn({ chat: e, placeholder: t, replyPlaceholder: r = wn, emptyPlaceholde
|
|
|
2808
2825
|
}) : /* @__PURE__ */ v("button", {
|
|
2809
2826
|
type: "submit",
|
|
2810
2827
|
"aria-label": L.sendAriaLabel,
|
|
2811
|
-
disabled: !
|
|
2828
|
+
disabled: !oe.trim(),
|
|
2812
2829
|
className: "bailey-send-button",
|
|
2813
|
-
children: /* @__PURE__ */ v(Et, { className: "bailey-send-icon" })
|
|
2830
|
+
children: x ?? /* @__PURE__ */ v(Et, { className: "bailey-send-icon" })
|
|
2814
2831
|
})]
|
|
2815
|
-
}), (!Y ||
|
|
2832
|
+
}), (!Y || V) && /* @__PURE__ */ y(h.Root, { children: [/* @__PURE__ */ v(h.Trigger, {
|
|
2816
2833
|
asChild: !0,
|
|
2817
2834
|
children: /* @__PURE__ */ v("button", {
|
|
2818
2835
|
type: "button",
|
|
2819
|
-
ref:
|
|
2836
|
+
ref: fe,
|
|
2820
2837
|
"aria-label": L.menuAriaLabel,
|
|
2821
2838
|
className: "bailey-menu-button",
|
|
2822
2839
|
children: /* @__PURE__ */ v(Nt, { className: "bailey-menu-icon" })
|
|
2823
2840
|
})
|
|
2824
2841
|
}), /* @__PURE__ */ v(h.Portal, {
|
|
2825
|
-
container:
|
|
2842
|
+
container: H instanceof ShadowRoot ? H : void 0,
|
|
2826
2843
|
children: /* @__PURE__ */ y(h.Content, {
|
|
2827
2844
|
side: "top",
|
|
2828
2845
|
align: "end",
|
|
2829
2846
|
sideOffset: 8,
|
|
2830
2847
|
className: "bailey-menu-content",
|
|
2831
2848
|
onCloseAutoFocus: (e) => {
|
|
2832
|
-
|
|
2849
|
+
B.current &&= (e.preventDefault(), !1);
|
|
2833
2850
|
},
|
|
2834
2851
|
children: [!Y && /* @__PURE__ */ y(h.Item, {
|
|
2835
|
-
onSelect: () =>
|
|
2852
|
+
onSelect: () => ae(),
|
|
2836
2853
|
className: "bailey-menu-item",
|
|
2837
2854
|
children: [/* @__PURE__ */ v(Pt, { className: "bailey-menu-item-icon" }), L.newChatButtonText]
|
|
2838
|
-
}),
|
|
2855
|
+
}), V && /* @__PURE__ */ y(h.Item, {
|
|
2839
2856
|
onSelect: () => {
|
|
2840
2857
|
if (c) {
|
|
2841
2858
|
c();
|
|
2842
2859
|
return;
|
|
2843
2860
|
}
|
|
2844
|
-
|
|
2861
|
+
B.current = !0, pe(!0);
|
|
2845
2862
|
},
|
|
2846
2863
|
className: "bailey-menu-item",
|
|
2847
2864
|
children: [/* @__PURE__ */ v(jt, { className: "bailey-menu-item-icon" }), L.historyMenuItemText]
|
|
@@ -2852,27 +2869,27 @@ function Mn({ chat: e, placeholder: t, replyPlaceholder: r = wn, emptyPlaceholde
|
|
|
2852
2869
|
(Y || _?.alwaysVisible) && _ && /* @__PURE__ */ v("div", {
|
|
2853
2870
|
className: "bailey-privacy-note",
|
|
2854
2871
|
children: /* @__PURE__ */ v(p, {
|
|
2855
|
-
remarkPlugins:
|
|
2856
|
-
components:
|
|
2872
|
+
remarkPlugins: Dn,
|
|
2873
|
+
components: On,
|
|
2857
2874
|
skipHtml: !0,
|
|
2858
2875
|
children: _.markdown
|
|
2859
2876
|
})
|
|
2860
2877
|
})
|
|
2861
2878
|
]
|
|
2862
|
-
}),
|
|
2879
|
+
}), R && l && !c && /* @__PURE__ */ v(yn, {
|
|
2863
2880
|
client: l.client,
|
|
2864
2881
|
pageSize: l.pageSize,
|
|
2865
2882
|
chat: e,
|
|
2866
2883
|
labels: L,
|
|
2867
2884
|
locale: m,
|
|
2868
|
-
onClose:
|
|
2885
|
+
onClose: Ce
|
|
2869
2886
|
})]
|
|
2870
2887
|
})
|
|
2871
2888
|
});
|
|
2872
2889
|
}
|
|
2873
2890
|
//#endregion
|
|
2874
2891
|
//#region src/ui/BaileyFeedbackButtons.tsx
|
|
2875
|
-
var
|
|
2892
|
+
var Pn = {
|
|
2876
2893
|
feedbackGroupLabel: "Rate this response",
|
|
2877
2894
|
feedbackThumbsUpAriaLabel: "Good response",
|
|
2878
2895
|
feedbackThumbsDownAriaLabel: "Bad response",
|
|
@@ -2893,48 +2910,48 @@ var Nn = {
|
|
|
2893
2910
|
feedbackReasonUnsafe: "Unsafe",
|
|
2894
2911
|
feedbackReasonTooLong: "Too long",
|
|
2895
2912
|
feedbackReasonOther: "Other"
|
|
2896
|
-
},
|
|
2913
|
+
}, Fn = 2e3, In = [
|
|
2897
2914
|
"inaccurate",
|
|
2898
2915
|
"unhelpful",
|
|
2899
2916
|
"unsafe",
|
|
2900
2917
|
"too_long",
|
|
2901
2918
|
"other"
|
|
2902
|
-
],
|
|
2919
|
+
], Ln = {
|
|
2903
2920
|
inaccurate: "feedbackReasonInaccurate",
|
|
2904
2921
|
unhelpful: "feedbackReasonUnhelpful",
|
|
2905
2922
|
unsafe: "feedbackReasonUnsafe",
|
|
2906
2923
|
too_long: "feedbackReasonTooLong",
|
|
2907
2924
|
other: "feedbackReasonOther"
|
|
2908
|
-
},
|
|
2909
|
-
function Rn(e) {
|
|
2910
|
-
return Array.from(new Set((e ?? Fn).map(Ln)));
|
|
2911
|
-
}
|
|
2925
|
+
}, Rn = (e) => In.includes(e) ? e : "other";
|
|
2912
2926
|
function zn(e) {
|
|
2913
|
-
return
|
|
2927
|
+
return Array.from(new Set((e ?? In).map(Rn)));
|
|
2928
|
+
}
|
|
2929
|
+
function Bn(e) {
|
|
2930
|
+
return typeof e == "number" && e > 0 ? Math.min(Math.floor(e), Fn) : Fn;
|
|
2914
2931
|
}
|
|
2915
|
-
function
|
|
2932
|
+
function Vn(e, t) {
|
|
2916
2933
|
if (e === null || t === null) return e === t;
|
|
2917
2934
|
let n = e.reasonCodes ?? [], r = t.reasonCodes ?? [];
|
|
2918
2935
|
return e.rating === t.rating && (e.comment ?? "") === (t.comment ?? "") && n.length === r.length && n.every((e, t) => e === r[t]);
|
|
2919
2936
|
}
|
|
2920
|
-
function
|
|
2921
|
-
return e.messageId ? /* @__PURE__ */ v(
|
|
2937
|
+
function Hn(e) {
|
|
2938
|
+
return e.messageId ? /* @__PURE__ */ v(Un, { ...e }, e.messageId) : null;
|
|
2922
2939
|
}
|
|
2923
|
-
function
|
|
2940
|
+
function Un({ messageId: e, onSubmit: t, onClear: n, initialRating: r, reasonOptions: i, maxCommentLength: a, labels: o, className: l }) {
|
|
2924
2941
|
let u = {
|
|
2925
|
-
...
|
|
2942
|
+
...Pn,
|
|
2926
2943
|
...o
|
|
2927
|
-
}, p =
|
|
2928
|
-
s(() => (
|
|
2929
|
-
|
|
2944
|
+
}, p = zn(i), m = Bn(a), h = r ? { rating: r } : null, [b, x] = f(h), [S, C] = f(r ?? null), [w, T] = f(!1), [E, D] = f("down"), [O, k] = f([]), [ee, A] = f(""), [j, M] = f(!1), [N, P] = f(!1), [F, te] = f(!1), [ne, re] = f(!1), ie = d(h), I = d(null), ae = d(0), oe = d(!1), se = d(!0), L = d(null), ce = d(null), le = d(null), ue = d(null), de = d(null), fe = wt(ce), R = c(), pe = `${R}-comment`, z = `${R}-counter`, B = `${R}-privacy`;
|
|
2945
|
+
s(() => (se.current = !0, () => {
|
|
2946
|
+
se.current = !1;
|
|
2930
2947
|
}), []), s(() => {
|
|
2931
|
-
w &&
|
|
2948
|
+
w && de.current?.focus();
|
|
2932
2949
|
}, [w]), s(() => {
|
|
2933
|
-
|
|
2950
|
+
L.current && !F && !w && ((L.current === "up" ? le : ue).current?.focus(), L.current = null);
|
|
2934
2951
|
});
|
|
2935
|
-
let
|
|
2952
|
+
let V = () => {
|
|
2936
2953
|
k([]), A("");
|
|
2937
|
-
},
|
|
2954
|
+
}, H = async (r) => {
|
|
2938
2955
|
try {
|
|
2939
2956
|
return r.kind === "clear" ? await n({ messageId: e }) : await t({
|
|
2940
2957
|
messageId: e,
|
|
@@ -2943,51 +2960,51 @@ function Hn({ messageId: e, onSubmit: t, onClear: n, initialRating: r, reasonOpt
|
|
|
2943
2960
|
} catch {
|
|
2944
2961
|
return !1;
|
|
2945
2962
|
}
|
|
2946
|
-
},
|
|
2963
|
+
}, U = async () => {
|
|
2947
2964
|
if (!oe.current) {
|
|
2948
|
-
oe.current = !0,
|
|
2965
|
+
oe.current = !0, P(!0);
|
|
2949
2966
|
try {
|
|
2950
|
-
for (;
|
|
2951
|
-
let e =
|
|
2952
|
-
if (!
|
|
2953
|
-
let r =
|
|
2954
|
-
!n && r || (n ? (
|
|
2967
|
+
for (; I.current && se.current;) {
|
|
2968
|
+
let e = I.current, t = e.kind === "clear" ? null : e.snapshot, n = !(e.kind === "submit" && e.formSubmit) && Vn(t, ie.current) || await H(e);
|
|
2969
|
+
if (!se.current) return;
|
|
2970
|
+
let r = I.current?.version !== e.version;
|
|
2971
|
+
!n && r || (n ? (ie.current = t, x(t)) : (C(ie.current?.rating ?? null), re(!0)), r || (I.current = null, te(!1), n && e.kind === "submit" && e.formSubmit && (T(!1), M(!0), L.current = e.snapshot.rating)));
|
|
2955
2972
|
}
|
|
2956
2973
|
} finally {
|
|
2957
|
-
oe.current = !1,
|
|
2974
|
+
oe.current = !1, se.current && P(!1);
|
|
2958
2975
|
}
|
|
2959
2976
|
}
|
|
2960
|
-
},
|
|
2961
|
-
|
|
2977
|
+
}, me = (e) => {
|
|
2978
|
+
ae.current += 1, I.current = {
|
|
2962
2979
|
...e,
|
|
2963
|
-
version:
|
|
2964
|
-
},
|
|
2965
|
-
},
|
|
2966
|
-
C(null), T(!1), M(!1),
|
|
2980
|
+
version: ae.current
|
|
2981
|
+
}, re(!1), U();
|
|
2982
|
+
}, W = () => {
|
|
2983
|
+
C(null), T(!1), M(!1), V(), me({ kind: "clear" });
|
|
2967
2984
|
}, G = (e) => {
|
|
2968
|
-
if (!
|
|
2985
|
+
if (!F) {
|
|
2969
2986
|
if (S === e) {
|
|
2970
|
-
|
|
2987
|
+
W();
|
|
2971
2988
|
return;
|
|
2972
2989
|
}
|
|
2973
|
-
C(e), M(!1),
|
|
2990
|
+
C(e), M(!1), V(), e === "down" ? (D("down"), T(!0)) : T(!1), me({
|
|
2974
2991
|
kind: "submit",
|
|
2975
2992
|
snapshot: { rating: e },
|
|
2976
2993
|
formSubmit: !1
|
|
2977
2994
|
});
|
|
2978
2995
|
}
|
|
2979
2996
|
}, K = (e) => {
|
|
2980
|
-
S !== null && (D(S), k((e?.reasonCodes ?? []).map(
|
|
2997
|
+
S !== null && (D(S), k((e?.reasonCodes ?? []).map(Rn)), A(e?.comment ?? ""), re(!1), T(!0));
|
|
2981
2998
|
}, q = () => {
|
|
2982
|
-
|
|
2999
|
+
F || (T(!1), re(!1), V(), L.current = E);
|
|
2983
3000
|
}, he = () => {
|
|
2984
|
-
if (
|
|
3001
|
+
if (F) return;
|
|
2985
3002
|
let e = ee.trim(), t = p.filter((e) => O.includes(e)), n = {
|
|
2986
3003
|
rating: E,
|
|
2987
3004
|
...t.length > 0 ? { reasonCodes: t } : {},
|
|
2988
3005
|
...e ? { comment: e } : {}
|
|
2989
3006
|
};
|
|
2990
|
-
|
|
3007
|
+
te(!0), C(E), me({
|
|
2991
3008
|
kind: "submit",
|
|
2992
3009
|
snapshot: n,
|
|
2993
3010
|
formSubmit: !0
|
|
@@ -2996,18 +3013,18 @@ function Hn({ messageId: e, onSubmit: t, onClear: n, initialRating: r, reasonOpt
|
|
|
2996
3013
|
k((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
2997
3014
|
}, _e = (e) => {
|
|
2998
3015
|
e.key === "Escape" && (e.stopPropagation(), q());
|
|
2999
|
-
}, ve = S !== null && b?.rating === S && !N && !w, J = !!b && (!!b.comment || (b.reasonCodes?.length ?? 0) > 0), ye = N ? u.feedbackSavingText : ve ? u.feedbackThanksText : "",
|
|
3016
|
+
}, ve = S !== null && b?.rating === S && !N && !w, J = !!b && (!!b.comment || (b.reasonCodes?.length ?? 0) > 0), ye = N ? u.feedbackSavingText : ve ? u.feedbackThanksText : "", be = (e) => {
|
|
3000
3017
|
let t = S === e, n = e === "up" ? u.feedbackThumbsUpAriaLabel : u.feedbackThumbsDownAriaLabel, r = e === "up" ? Lt : Rt;
|
|
3001
3018
|
return /* @__PURE__ */ y(g.Root, { children: [/* @__PURE__ */ v(g.Trigger, {
|
|
3002
3019
|
asChild: !0,
|
|
3003
3020
|
children: /* @__PURE__ */ v("button", {
|
|
3004
|
-
ref: e === "up" ?
|
|
3021
|
+
ref: e === "up" ? le : ue,
|
|
3005
3022
|
type: "button",
|
|
3006
3023
|
className: "bailey-feedback-thumb",
|
|
3007
3024
|
"aria-pressed": t,
|
|
3008
3025
|
"aria-label": n,
|
|
3009
3026
|
"aria-busy": t && N ? !0 : void 0,
|
|
3010
|
-
disabled:
|
|
3027
|
+
disabled: F,
|
|
3011
3028
|
onClick: () => G(e),
|
|
3012
3029
|
children: /* @__PURE__ */ v(r, {
|
|
3013
3030
|
className: "bailey-feedback-icon",
|
|
@@ -3015,7 +3032,7 @@ function Hn({ messageId: e, onSubmit: t, onClear: n, initialRating: r, reasonOpt
|
|
|
3015
3032
|
})
|
|
3016
3033
|
})
|
|
3017
3034
|
}), /* @__PURE__ */ v(g.Portal, {
|
|
3018
|
-
container:
|
|
3035
|
+
container: fe instanceof ShadowRoot ? fe : void 0,
|
|
3019
3036
|
children: /* @__PURE__ */ y(g.Content, {
|
|
3020
3037
|
side: "top",
|
|
3021
3038
|
className: "bailey-tooltip-content",
|
|
@@ -3024,7 +3041,7 @@ function Hn({ messageId: e, onSubmit: t, onClear: n, initialRating: r, reasonOpt
|
|
|
3024
3041
|
})] });
|
|
3025
3042
|
};
|
|
3026
3043
|
return /* @__PURE__ */ y("div", {
|
|
3027
|
-
ref:
|
|
3044
|
+
ref: ce,
|
|
3028
3045
|
className: `bailey-feedback${l ? ` ${l}` : ""}`,
|
|
3029
3046
|
children: [
|
|
3030
3047
|
/* @__PURE__ */ v(g.Provider, {
|
|
@@ -3034,7 +3051,7 @@ function Hn({ messageId: e, onSubmit: t, onClear: n, initialRating: r, reasonOpt
|
|
|
3034
3051
|
"aria-label": u.feedbackGroupLabel,
|
|
3035
3052
|
"aria-busy": N ? !0 : void 0,
|
|
3036
3053
|
className: "bailey-feedback-thumbs",
|
|
3037
|
-
children: [
|
|
3054
|
+
children: [be("up"), be("down")]
|
|
3038
3055
|
})
|
|
3039
3056
|
}),
|
|
3040
3057
|
/* @__PURE__ */ y("span", {
|
|
@@ -3053,10 +3070,10 @@ function Hn({ messageId: e, onSubmit: t, onClear: n, initialRating: r, reasonOpt
|
|
|
3053
3070
|
}), /* @__PURE__ */ v("button", {
|
|
3054
3071
|
type: "button",
|
|
3055
3072
|
className: "bailey-feedback-link",
|
|
3056
|
-
onClick:
|
|
3073
|
+
onClick: W,
|
|
3057
3074
|
children: u.feedbackUndoText
|
|
3058
3075
|
})] }),
|
|
3059
|
-
|
|
3076
|
+
ne && /* @__PURE__ */ v("span", {
|
|
3060
3077
|
role: "alert",
|
|
3061
3078
|
className: "bailey-feedback-error",
|
|
3062
3079
|
children: u.feedbackErrorText
|
|
@@ -3074,43 +3091,43 @@ function Hn({ messageId: e, onSubmit: t, onClear: n, initialRating: r, reasonOpt
|
|
|
3074
3091
|
className: "bailey-feedback-chips",
|
|
3075
3092
|
children: p.map((e, t) => /* @__PURE__ */ v("button", {
|
|
3076
3093
|
ref: t === 0 ? (e) => {
|
|
3077
|
-
|
|
3094
|
+
de.current = e;
|
|
3078
3095
|
} : void 0,
|
|
3079
3096
|
type: "button",
|
|
3080
3097
|
className: "bailey-feedback-chip",
|
|
3081
3098
|
"aria-pressed": O.includes(e),
|
|
3082
|
-
disabled:
|
|
3099
|
+
disabled: F,
|
|
3083
3100
|
onClick: () => ge(e),
|
|
3084
|
-
children: u[
|
|
3101
|
+
children: u[Ln[e]]
|
|
3085
3102
|
}, e))
|
|
3086
3103
|
})]
|
|
3087
3104
|
}),
|
|
3088
3105
|
/* @__PURE__ */ v("label", {
|
|
3089
|
-
htmlFor:
|
|
3106
|
+
htmlFor: pe,
|
|
3090
3107
|
className: "bailey-feedback-legend",
|
|
3091
3108
|
children: u.feedbackCommentLabel
|
|
3092
3109
|
}),
|
|
3093
3110
|
/* @__PURE__ */ v("textarea", {
|
|
3094
|
-
id:
|
|
3111
|
+
id: pe,
|
|
3095
3112
|
ref: p.length === 0 ? (e) => {
|
|
3096
|
-
|
|
3113
|
+
de.current = e;
|
|
3097
3114
|
} : void 0,
|
|
3098
3115
|
className: "bailey-feedback-textarea",
|
|
3099
3116
|
value: ee,
|
|
3100
3117
|
maxLength: m,
|
|
3101
3118
|
placeholder: u.feedbackCommentPlaceholder,
|
|
3102
|
-
"aria-describedby": `${
|
|
3103
|
-
disabled:
|
|
3119
|
+
"aria-describedby": `${z} ${B}`,
|
|
3120
|
+
disabled: F,
|
|
3104
3121
|
onChange: (e) => A(e.target.value.slice(0, m))
|
|
3105
3122
|
}),
|
|
3106
3123
|
/* @__PURE__ */ y("div", {
|
|
3107
3124
|
className: "bailey-feedback-meta",
|
|
3108
3125
|
children: [/* @__PURE__ */ v("span", {
|
|
3109
|
-
id:
|
|
3126
|
+
id: B,
|
|
3110
3127
|
className: "bailey-feedback-privacy",
|
|
3111
3128
|
children: u.feedbackPrivacyNote
|
|
3112
3129
|
}), /* @__PURE__ */ v("span", {
|
|
3113
|
-
id:
|
|
3130
|
+
id: z,
|
|
3114
3131
|
className: "bailey-feedback-counter",
|
|
3115
3132
|
children: `${ee.length} / ${m}`
|
|
3116
3133
|
})]
|
|
@@ -3120,15 +3137,15 @@ function Hn({ messageId: e, onSubmit: t, onClear: n, initialRating: r, reasonOpt
|
|
|
3120
3137
|
children: [/* @__PURE__ */ v("button", {
|
|
3121
3138
|
type: "button",
|
|
3122
3139
|
className: "bailey-feedback-button",
|
|
3123
|
-
disabled:
|
|
3140
|
+
disabled: F,
|
|
3124
3141
|
onClick: q,
|
|
3125
3142
|
children: u.feedbackCancelText
|
|
3126
3143
|
}), /* @__PURE__ */ v("button", {
|
|
3127
3144
|
type: "button",
|
|
3128
3145
|
className: "bailey-feedback-button bailey-feedback-button-primary",
|
|
3129
|
-
disabled:
|
|
3146
|
+
disabled: F,
|
|
3130
3147
|
onClick: he,
|
|
3131
|
-
children:
|
|
3148
|
+
children: F ? u.feedbackSavingText : u.feedbackSubmitText
|
|
3132
3149
|
})]
|
|
3133
3150
|
})
|
|
3134
3151
|
]
|
|
@@ -3138,6 +3155,6 @@ function Hn({ messageId: e, onSubmit: t, onClear: n, initialRating: r, reasonOpt
|
|
|
3138
3155
|
}
|
|
3139
3156
|
//#endregion
|
|
3140
3157
|
//#region src/index.ts
|
|
3141
|
-
var
|
|
3158
|
+
var Wn = "0.3.1-pre.2";
|
|
3142
3159
|
//#endregion
|
|
3143
|
-
export { Mt as ActivityIcon, Ot as ArrowUpRightIcon,
|
|
3160
|
+
export { Mt as ActivityIcon, Ot as ArrowUpRightIcon, Wn as BAILEYAI_CHAT_UI_VERSION, Ve as BAILEY_CHART_PROMPT_FRAGMENT, Ne as BAILEY_TABLE_GRID_ROW_THRESHOLD, B as BaileyApiError, Nn as BaileyChatPanel, H as BaileyCleanupError, Hn as BaileyFeedbackButtons, yn as BaileyHistoryDrawer, Qt as BaileyTracePanel, Ut as CopyMarkdownButton, re as DEFAULT_CONVERSATION_STORAGE_KEY, Et as HeartIcon, Ye as TRACE_KIND_LABEL, Rt as ThumbDownIcon, Lt as ThumbUpIcon, Oe as createBaileyClient, ke as createBaileyFeedbackHandlers, Tt as createBaileyMarkdownComponents, I as createMemoryConversationStorage, ie as createSessionConversationStorage, k as extractPseudoToolCalls, ze as extractTableData, vn as formatRelativeTime, at as formatTraceGap, it as formatTraceTime, lt as hasTraceFailure, ne as isConversationIdForSub, e as isSafeMarkdownUrl, Ae as joinInstructions, P as mapTranscript, te as mergeEarlierPage, Je as parseBaileyChartSpec, A as parseSseFrames, $ as resolveToolCall, Be as shouldUseGrid, ut as toActivityLines, dt as toToolSteps, ot as toTraceRows, ct as toTraceSegments, $e as traceEventArgsDetail, rt as traceEventHint, et as traceEventOutputDetail, nt as traceEventRawDetail, Qe as traceEventSummary, Ze as traceEventToolName, st as traceSummaryLine, z as useBaileyChat, me as useBaileyConversations };
|