@helpai/elements 0.54.3 → 0.55.0
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/configurator.mjs +12 -2
- package/elements-web-component.esm.js +27 -27
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +27 -27
- package/elements.cjs.js.map +4 -4
- package/elements.esm.js +27 -27
- package/elements.esm.js.map +4 -4
- package/elements.js +27 -27
- package/elements.js.map +4 -4
- package/index.d.ts +46 -3
- package/index.mjs +948 -642
- package/package.json +1 -1
- package/schema.d.ts +13 -2
- package/schema.json +54 -6
- package/schema.mjs +13 -2
- package/style.css +1 -1
- package/web-component.mjs +945 -642
package/web-component.mjs
CHANGED
|
@@ -34,8 +34,8 @@ var STRINGS_EN = {
|
|
|
34
34
|
attachmentMimeRejected: "File type not supported",
|
|
35
35
|
attachmentTooLarge: "File is too large",
|
|
36
36
|
attachmentTooMany: "Attachment limit reached",
|
|
37
|
-
conversationClosed: "This
|
|
38
|
-
conversationLoading: "Loading
|
|
37
|
+
conversationClosed: "This chat is closed",
|
|
38
|
+
conversationLoading: "Loading chat\u2026",
|
|
39
39
|
close: "Close",
|
|
40
40
|
collapse: "Collapse",
|
|
41
41
|
collapseSidebar: "Collapse sidebar",
|
|
@@ -54,10 +54,10 @@ var STRINGS_EN = {
|
|
|
54
54
|
fullscreen: "Fullscreen",
|
|
55
55
|
history: "History",
|
|
56
56
|
historyBack: "Back to chat",
|
|
57
|
-
historyEmpty: "No previous
|
|
58
|
-
historyLoading: "Loading your
|
|
59
|
-
historyContinue: "Continue the
|
|
60
|
-
historyTitle: "
|
|
57
|
+
historyEmpty: "No previous chats yet",
|
|
58
|
+
historyLoading: "Loading your chats\u2026",
|
|
59
|
+
historyContinue: "Continue the chat",
|
|
60
|
+
historyTitle: "Chat history",
|
|
61
61
|
language: "Language",
|
|
62
62
|
launcherOpen: "Open chat",
|
|
63
63
|
launcherLabel: "Chat with us",
|
|
@@ -65,14 +65,14 @@ var STRINGS_EN = {
|
|
|
65
65
|
micStop: "Stop voice input",
|
|
66
66
|
micUnsupported: "Voice input is not supported in this browser",
|
|
67
67
|
moreActions: "More actions",
|
|
68
|
-
newConversation: "New
|
|
68
|
+
newConversation: "New chat",
|
|
69
69
|
panelTitle: "Chat",
|
|
70
70
|
resizeHandle: "Drag to resize",
|
|
71
71
|
scrollToBottom: "Scroll to latest",
|
|
72
72
|
send: "Send",
|
|
73
73
|
soundOff: "Sound off",
|
|
74
74
|
soundOn: "Sound on",
|
|
75
|
-
startNewConversation: "Start a new
|
|
75
|
+
startNewConversation: "Start a new chat",
|
|
76
76
|
stop: "Stop",
|
|
77
77
|
theme: "Theme",
|
|
78
78
|
themeAuto: "Auto",
|
|
@@ -88,9 +88,13 @@ var STRINGS_EN = {
|
|
|
88
88
|
usedTool: "Used tool",
|
|
89
89
|
toolResult: "Result",
|
|
90
90
|
sources: "Sources",
|
|
91
|
+
feedbackUp: "Good response",
|
|
92
|
+
feedbackDown: "Bad response",
|
|
93
|
+
feedbackThanks: "Thanks for your feedback",
|
|
94
|
+
newMessages: "New messages",
|
|
91
95
|
// ── Messenger modules ──────────────────────────────────────────
|
|
92
96
|
tabHome: "Home",
|
|
93
|
-
tabConversations: "
|
|
97
|
+
tabConversations: "Chats",
|
|
94
98
|
tabHelp: "Help",
|
|
95
99
|
tabNews: "News",
|
|
96
100
|
modulesEmpty: "Nothing here yet",
|
|
@@ -167,8 +171,8 @@ var STRINGS_FR = {
|
|
|
167
171
|
attachmentMimeRejected: "Type de fichier non pris en charge",
|
|
168
172
|
attachmentTooLarge: "Le fichier est trop volumineux",
|
|
169
173
|
attachmentTooMany: "Limite de pi\xE8ces jointes atteinte",
|
|
170
|
-
conversationClosed: "
|
|
171
|
-
conversationLoading: "Chargement
|
|
174
|
+
conversationClosed: "Ce chat est ferm\xE9",
|
|
175
|
+
conversationLoading: "Chargement du chat\u2026",
|
|
172
176
|
close: "Fermer",
|
|
173
177
|
collapse: "R\xE9duire",
|
|
174
178
|
collapseSidebar: "R\xE9duire la barre lat\xE9rale",
|
|
@@ -187,10 +191,10 @@ var STRINGS_FR = {
|
|
|
187
191
|
fullscreen: "Plein \xE9cran",
|
|
188
192
|
history: "Historique",
|
|
189
193
|
historyBack: "Retour au chat",
|
|
190
|
-
historyEmpty: "
|
|
191
|
-
historyContinue: "Poursuivre
|
|
192
|
-
historyLoading: "Chargement de vos
|
|
193
|
-
historyTitle: "Historique des
|
|
194
|
+
historyEmpty: "Aucun chat pour le moment",
|
|
195
|
+
historyContinue: "Poursuivre le chat",
|
|
196
|
+
historyLoading: "Chargement de vos chats\u2026",
|
|
197
|
+
historyTitle: "Historique des chats",
|
|
194
198
|
language: "Langue",
|
|
195
199
|
launcherOpen: "Ouvrir le chat",
|
|
196
200
|
launcherLabel: "Discuter avec nous",
|
|
@@ -198,14 +202,14 @@ var STRINGS_FR = {
|
|
|
198
202
|
micStop: "Arr\xEAter la saisie vocale",
|
|
199
203
|
micUnsupported: "La saisie vocale n'est pas prise en charge par ce navigateur",
|
|
200
204
|
moreActions: "Plus d'actions",
|
|
201
|
-
newConversation: "
|
|
205
|
+
newConversation: "Nouveau chat",
|
|
202
206
|
panelTitle: "Chat",
|
|
203
207
|
resizeHandle: "Glisser pour redimensionner",
|
|
204
208
|
scrollToBottom: "Aller au plus r\xE9cent",
|
|
205
209
|
send: "Envoyer",
|
|
206
210
|
soundOff: "Son d\xE9sactiv\xE9",
|
|
207
211
|
soundOn: "Son activ\xE9",
|
|
208
|
-
startNewConversation: "D\xE9marrer
|
|
212
|
+
startNewConversation: "D\xE9marrer un nouveau chat",
|
|
209
213
|
stop: "Arr\xEAter",
|
|
210
214
|
theme: "Th\xE8me",
|
|
211
215
|
themeAuto: "Auto",
|
|
@@ -221,9 +225,13 @@ var STRINGS_FR = {
|
|
|
221
225
|
usedTool: "Outil utilis\xE9",
|
|
222
226
|
toolResult: "R\xE9sultat",
|
|
223
227
|
sources: "Sources",
|
|
228
|
+
feedbackUp: "Bonne r\xE9ponse",
|
|
229
|
+
feedbackDown: "Mauvaise r\xE9ponse",
|
|
230
|
+
feedbackThanks: "Merci pour votre retour",
|
|
231
|
+
newMessages: "Nouveaux messages",
|
|
224
232
|
// ── Messenger modules ──────────────────────────────────────────
|
|
225
233
|
tabHome: "Accueil",
|
|
226
|
-
tabConversations: "
|
|
234
|
+
tabConversations: "Chats",
|
|
227
235
|
tabHelp: "Aide",
|
|
228
236
|
tabNews: "Actualit\xE9s",
|
|
229
237
|
modulesEmpty: "Rien pour le moment",
|
|
@@ -300,8 +308,8 @@ var STRINGS_AR = {
|
|
|
300
308
|
attachmentMimeRejected: "\u0646\u0648\u0639 \u0627\u0644\u0645\u0644\u0641 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645",
|
|
301
309
|
attachmentTooLarge: "\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627",
|
|
302
310
|
attachmentTooMany: "\u062A\u0645 \u0628\u0644\u0648\u063A \u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0645\u0631\u0641\u0642\u0627\u062A",
|
|
303
|
-
conversationClosed: "\u062A\u0645 \u0625\u063A\u0644\u0627\u0642 \u0647\u0630\u0647 \u0627\u0644\
|
|
304
|
-
conversationLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\
|
|
311
|
+
conversationClosed: "\u062A\u0645 \u0625\u063A\u0644\u0627\u0642 \u0647\u0630\u0647 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
312
|
+
conversationLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0629\u2026",
|
|
305
313
|
close: "\u0625\u063A\u0644\u0627\u0642",
|
|
306
314
|
collapse: "\u0637\u064A\u0651",
|
|
307
315
|
collapseSidebar: "\u0637\u064A\u0651 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",
|
|
@@ -319,26 +327,26 @@ var STRINGS_AR = {
|
|
|
319
327
|
exitFullscreen: "\u0625\u0646\u0647\u0627\u0621 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
|
|
320
328
|
fullscreen: "\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
|
|
321
329
|
history: "\u0627\u0644\u0633\u062C\u0644",
|
|
322
|
-
historyBack: "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\
|
|
323
|
-
historyEmpty: "\u0644\u0627 \u062A\u0648\u062C\u062F \
|
|
324
|
-
historyContinue: "\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\
|
|
325
|
-
historyLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \
|
|
326
|
-
historyTitle: "\u0633\u062C\u0644 \u0627\u0644\
|
|
330
|
+
historyBack: "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
331
|
+
historyEmpty: "\u0644\u0627 \u062A\u0648\u062C\u062F \u062F\u0631\u062F\u0634\u0627\u062A \u0633\u0627\u0628\u0642\u0629 \u0628\u0639\u062F",
|
|
332
|
+
historyContinue: "\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
333
|
+
historyLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u062F\u0631\u062F\u0634\u0627\u062A\u0643\u2026",
|
|
334
|
+
historyTitle: "\u0633\u062C\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",
|
|
327
335
|
language: "\u0627\u0644\u0644\u063A\u0629",
|
|
328
|
-
launcherOpen: "\u0641\u062A\u062D \u0627\u0644\
|
|
336
|
+
launcherOpen: "\u0641\u062A\u062D \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
329
337
|
launcherLabel: "\u062A\u062D\u062F\u062B \u0645\u0639\u0646\u0627",
|
|
330
338
|
micStart: "\u0628\u062F\u0621 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",
|
|
331
339
|
micStop: "\u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",
|
|
332
340
|
micUnsupported: "\u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645 \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u0645\u062A\u0635\u0641\u062D",
|
|
333
341
|
moreActions: "\u0625\u062C\u0631\u0627\u0621\u0627\u062A \u0625\u0636\u0627\u0641\u064A\u0629",
|
|
334
|
-
newConversation: "\
|
|
335
|
-
panelTitle: "\u0627\u0644\
|
|
342
|
+
newConversation: "\u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",
|
|
343
|
+
panelTitle: "\u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
336
344
|
resizeHandle: "\u0627\u0633\u062D\u0628 \u0644\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062D\u062C\u0645",
|
|
337
345
|
scrollToBottom: "\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0623\u062D\u062F\u062B",
|
|
338
346
|
send: "\u0625\u0631\u0633\u0627\u0644",
|
|
339
347
|
soundOff: "\u0643\u062A\u0645 \u0627\u0644\u0635\u0648\u062A",
|
|
340
348
|
soundOn: "\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0635\u0648\u062A",
|
|
341
|
-
startNewConversation: "\u0628\u062F\u0621 \
|
|
349
|
+
startNewConversation: "\u0628\u062F\u0621 \u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",
|
|
342
350
|
stop: "\u0625\u064A\u0642\u0627\u0641",
|
|
343
351
|
theme: "\u0627\u0644\u0645\u0638\u0647\u0631",
|
|
344
352
|
themeAuto: "\u062A\u0644\u0642\u0627\u0626\u064A",
|
|
@@ -354,9 +362,13 @@ var STRINGS_AR = {
|
|
|
354
362
|
usedTool: "\u0623\u062F\u0627\u0629 \u0645\u064F\u0633\u062A\u062E\u062F\u064E\u0645\u0629",
|
|
355
363
|
toolResult: "\u0627\u0644\u0646\u062A\u064A\u062C\u0629",
|
|
356
364
|
sources: "\u0627\u0644\u0645\u0635\u0627\u062F\u0631",
|
|
365
|
+
feedbackUp: "\u0631\u062F \u062C\u064A\u062F",
|
|
366
|
+
feedbackDown: "\u0631\u062F \u0633\u064A\u0626",
|
|
367
|
+
feedbackThanks: "\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643",
|
|
368
|
+
newMessages: "\u0631\u0633\u0627\u0626\u0644 \u062C\u062F\u064A\u062F\u0629",
|
|
357
369
|
// ── Messenger modules ──────────────────────────────────────────
|
|
358
370
|
tabHome: "\u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629",
|
|
359
|
-
tabConversations: "\u0627\u0644\
|
|
371
|
+
tabConversations: "\u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",
|
|
360
372
|
tabHelp: "\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",
|
|
361
373
|
tabNews: "\u0627\u0644\u0623\u062E\u0628\u0627\u0631",
|
|
362
374
|
modulesEmpty: "\u0644\u0627 \u0634\u064A\u0621 \u0647\u0646\u0627 \u0628\u0639\u062F",
|
|
@@ -433,8 +445,8 @@ var STRINGS_ES = {
|
|
|
433
445
|
attachmentMimeRejected: "Tipo de archivo no admitido",
|
|
434
446
|
attachmentTooLarge: "El archivo es demasiado grande",
|
|
435
447
|
attachmentTooMany: "Se alcanz\xF3 el l\xEDmite de adjuntos",
|
|
436
|
-
conversationClosed: "
|
|
437
|
-
conversationLoading: "Cargando
|
|
448
|
+
conversationClosed: "Este chat est\xE1 cerrado",
|
|
449
|
+
conversationLoading: "Cargando chat\u2026",
|
|
438
450
|
close: "Cerrar",
|
|
439
451
|
collapse: "Contraer",
|
|
440
452
|
collapseSidebar: "Contraer la barra lateral",
|
|
@@ -453,10 +465,10 @@ var STRINGS_ES = {
|
|
|
453
465
|
fullscreen: "Pantalla completa",
|
|
454
466
|
history: "Historial",
|
|
455
467
|
historyBack: "Volver al chat",
|
|
456
|
-
historyEmpty: "A\xFAn no tienes
|
|
457
|
-
historyContinue: "Continuar
|
|
458
|
-
historyLoading: "Cargando tus
|
|
459
|
-
historyTitle: "Historial de
|
|
468
|
+
historyEmpty: "A\xFAn no tienes chats",
|
|
469
|
+
historyContinue: "Continuar el chat",
|
|
470
|
+
historyLoading: "Cargando tus chats\u2026",
|
|
471
|
+
historyTitle: "Historial de chats",
|
|
460
472
|
language: "Idioma",
|
|
461
473
|
launcherOpen: "Abrir el chat",
|
|
462
474
|
launcherLabel: "Chatea con nosotros",
|
|
@@ -464,14 +476,14 @@ var STRINGS_ES = {
|
|
|
464
476
|
micStop: "Detener entrada de voz",
|
|
465
477
|
micUnsupported: "Este navegador no admite la entrada de voz",
|
|
466
478
|
moreActions: "M\xE1s acciones",
|
|
467
|
-
newConversation: "
|
|
479
|
+
newConversation: "Nuevo chat",
|
|
468
480
|
panelTitle: "Chat",
|
|
469
481
|
resizeHandle: "Arrastra para cambiar el tama\xF1o",
|
|
470
482
|
scrollToBottom: "Ir a lo m\xE1s reciente",
|
|
471
483
|
send: "Enviar",
|
|
472
484
|
soundOff: "Sonido desactivado",
|
|
473
485
|
soundOn: "Sonido activado",
|
|
474
|
-
startNewConversation: "Iniciar
|
|
486
|
+
startNewConversation: "Iniciar un chat nuevo",
|
|
475
487
|
stop: "Detener",
|
|
476
488
|
theme: "Tema",
|
|
477
489
|
themeAuto: "Autom\xE1tico",
|
|
@@ -487,9 +499,13 @@ var STRINGS_ES = {
|
|
|
487
499
|
usedTool: "Herramienta usada",
|
|
488
500
|
toolResult: "Resultado",
|
|
489
501
|
sources: "Fuentes",
|
|
502
|
+
feedbackUp: "Buena respuesta",
|
|
503
|
+
feedbackDown: "Mala respuesta",
|
|
504
|
+
feedbackThanks: "Gracias por tu opini\xF3n",
|
|
505
|
+
newMessages: "Mensajes nuevos",
|
|
490
506
|
// ── Messenger modules ──────────────────────────────────────────
|
|
491
507
|
tabHome: "Inicio",
|
|
492
|
-
tabConversations: "
|
|
508
|
+
tabConversations: "Chats",
|
|
493
509
|
tabHelp: "Ayuda",
|
|
494
510
|
tabNews: "Novedades",
|
|
495
511
|
modulesEmpty: "A\xFAn no hay nada aqu\xED",
|
|
@@ -566,8 +582,8 @@ var STRINGS_HE = {
|
|
|
566
582
|
attachmentMimeRejected: "\u05E1\u05D5\u05D2 \u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA",
|
|
567
583
|
attachmentTooLarge: "\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9",
|
|
568
584
|
attachmentTooMany: "\u05D4\u05D2\u05E2\u05EA \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D4\u05DE\u05E8\u05D1\u05D9 \u05E9\u05DC \u05E7\u05D1\u05E6\u05D9\u05DD \u05DE\u05E6\u05D5\u05E8\u05E4\u05D9\u05DD",
|
|
569
|
-
conversationClosed: "\u05D4\
|
|
570
|
-
conversationLoading: "\u05D8\u05D5\u05E2\u05DF \
|
|
585
|
+
conversationClosed: "\u05D4\u05E6\u05F3\u05D0\u05D8 \u05D4\u05D6\u05D4 \u05E0\u05E1\u05D2\u05E8",
|
|
586
|
+
conversationLoading: "\u05D8\u05D5\u05E2\u05DF \u05E6\u05F3\u05D0\u05D8\u2026",
|
|
571
587
|
close: "\u05E1\u05D2\u05D9\u05E8\u05D4",
|
|
572
588
|
collapse: "\u05DB\u05D9\u05D5\u05D5\u05E5",
|
|
573
589
|
collapseSidebar: "\u05DB\u05D9\u05D5\u05D5\u05E5 \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",
|
|
@@ -585,11 +601,11 @@ var STRINGS_HE = {
|
|
|
585
601
|
exitFullscreen: "\u05D9\u05E6\u05D9\u05D0\u05D4 \u05DE\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",
|
|
586
602
|
fullscreen: "\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",
|
|
587
603
|
history: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D4",
|
|
588
|
-
historyBack: "\u05D7\u05D6\u05E8\u05D4 \u05DC\
|
|
589
|
-
historyEmpty: "\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \
|
|
590
|
-
historyContinue: "\u05D4\u05DE\u05E9\u05DA \
|
|
591
|
-
historyLoading: "\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\
|
|
592
|
-
historyTitle: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \
|
|
604
|
+
historyBack: "\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6\u05F3\u05D0\u05D8",
|
|
605
|
+
historyEmpty: "\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E7\u05D5\u05D3\u05DE\u05D9\u05DD",
|
|
606
|
+
historyContinue: "\u05D4\u05DE\u05E9\u05DA \u05E6\u05F3\u05D0\u05D8",
|
|
607
|
+
historyLoading: "\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E9\u05DC\u05DA\u2026",
|
|
608
|
+
historyTitle: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",
|
|
593
609
|
language: "\u05E9\u05E4\u05D4",
|
|
594
610
|
launcherOpen: "\u05E4\u05EA\u05D9\u05D7\u05EA \u05E6\u05F3\u05D0\u05D8",
|
|
595
611
|
launcherLabel: "\u05D3\u05D1\u05E8\u05D5 \u05D0\u05D9\u05EA\u05E0\u05D5",
|
|
@@ -597,14 +613,14 @@ var STRINGS_HE = {
|
|
|
597
613
|
micStop: "\u05E2\u05E6\u05D9\u05E8\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",
|
|
598
614
|
micUnsupported: "\u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA \u05D1\u05D3\u05E4\u05D3\u05E4\u05DF \u05D6\u05D4",
|
|
599
615
|
moreActions: "\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA \u05E0\u05D5\u05E1\u05E4\u05D5\u05EA",
|
|
600
|
-
newConversation: "\
|
|
601
|
-
panelTitle: "\
|
|
616
|
+
newConversation: "\u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",
|
|
617
|
+
panelTitle: "\u05E6\u05F3\u05D0\u05D8",
|
|
602
618
|
resizeHandle: "\u05D2\u05E8\u05D5\u05E8 \u05DC\u05E9\u05D9\u05E0\u05D5\u05D9 \u05D4\u05D2\u05D5\u05D3\u05DC",
|
|
603
619
|
scrollToBottom: "\u05DE\u05E2\u05D1\u05E8 \u05DC\u05D7\u05D3\u05E9 \u05D1\u05D9\u05D5\u05EA\u05E8",
|
|
604
620
|
send: "\u05E9\u05DC\u05D9\u05D7\u05D4",
|
|
605
621
|
soundOff: "\u05D4\u05E9\u05EA\u05E7\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",
|
|
606
622
|
soundOn: "\u05D4\u05E4\u05E2\u05DC\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",
|
|
607
|
-
startNewConversation: "\u05D4\u05EA\u05D7\u05DC\u05EA \
|
|
623
|
+
startNewConversation: "\u05D4\u05EA\u05D7\u05DC\u05EA \u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",
|
|
608
624
|
stop: "\u05E2\u05E6\u05D9\u05E8\u05D4",
|
|
609
625
|
theme: "\u05E2\u05E8\u05DB\u05EA \u05E0\u05D5\u05E9\u05D0",
|
|
610
626
|
themeAuto: "\u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9",
|
|
@@ -620,9 +636,13 @@ var STRINGS_HE = {
|
|
|
620
636
|
usedTool: "\u05DB\u05DC\u05D9 \u05D1\u05E9\u05D9\u05DE\u05D5\u05E9",
|
|
621
637
|
toolResult: "\u05EA\u05D5\u05E6\u05D0\u05D4",
|
|
622
638
|
sources: "\u05DE\u05E7\u05D5\u05E8\u05D5\u05EA",
|
|
639
|
+
feedbackUp: "\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D8\u05D5\u05D1\u05D4",
|
|
640
|
+
feedbackDown: "\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D2\u05E8\u05D5\u05E2\u05D4",
|
|
641
|
+
feedbackThanks: "\u05EA\u05D5\u05D3\u05D4 \u05E2\u05DC \u05D4\u05DE\u05E9\u05D5\u05D1",
|
|
642
|
+
newMessages: "\u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05D7\u05D3\u05E9\u05D5\u05EA",
|
|
623
643
|
// ── Messenger modules ──────────────────────────────────────────
|
|
624
644
|
tabHome: "\u05D1\u05D9\u05EA",
|
|
625
|
-
tabConversations: "\
|
|
645
|
+
tabConversations: "\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",
|
|
626
646
|
tabHelp: "\u05E2\u05D6\u05E8\u05D4",
|
|
627
647
|
tabNews: "\u05D7\u05D3\u05E9\u05D5\u05EA",
|
|
628
648
|
modulesEmpty: "\u05D0\u05D9\u05DF \u05DB\u05D0\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DB\u05DC\u05D5\u05DD",
|
|
@@ -1038,6 +1058,9 @@ function resolveOptions(rawOpts) {
|
|
|
1038
1058
|
showReasoning: behavior.showReasoning ?? false,
|
|
1039
1059
|
showToolCalls: behavior.showToolCalls ?? false,
|
|
1040
1060
|
showSources: behavior.showSources ?? false,
|
|
1061
|
+
scrollFade: behavior.scrollFade ?? true,
|
|
1062
|
+
scrollAnchor: behavior.scrollAnchor ?? "bottom",
|
|
1063
|
+
enableMessageFeedback: behavior.enableMessageFeedback ?? true,
|
|
1041
1064
|
features: {
|
|
1042
1065
|
files: opts.features?.files ?? DEFAULT_FEATURES.files,
|
|
1043
1066
|
voice: opts.features?.voice ?? DEFAULT_FEATURES.voice,
|
|
@@ -1365,7 +1388,8 @@ var BEHAVIOR_ATTRS = [
|
|
|
1365
1388
|
["start-minimized", "startMinimized", boolAttr],
|
|
1366
1389
|
["show-reasoning", "showReasoning", boolAttr],
|
|
1367
1390
|
["show-tool-calls", "showToolCalls", boolAttr],
|
|
1368
|
-
["show-sources", "showSources", boolAttr]
|
|
1391
|
+
["show-sources", "showSources", boolAttr],
|
|
1392
|
+
["enable-message-feedback", "enableMessageFeedback", boolAttr]
|
|
1369
1393
|
];
|
|
1370
1394
|
var I18N_ATTRS = [["locale", "locale"]];
|
|
1371
1395
|
var ACTION_NAMES = new Set(ACTION_NAME_LITERALS);
|
|
@@ -1673,7 +1697,7 @@ var tokens_default = ':host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent
|
|
|
1673
1697
|
var reset_default = '*,*:before,*:after{box-sizing:border-box;margin:0;padding:0;border:0}button{font:inherit;color:inherit;background:none;cursor:pointer;-webkit-appearance:none;appearance:none;line-height:1}button:focus-visible,[tabindex]:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}textarea,input{font:inherit;color:inherit;background:none;border:0;outline:0;resize:none}a{color:var(--__P__-accent);text-decoration:underline;text-underline-offset:2px}img,svg{display:block;max-width:100%}ul,ol{list-style:none}.__P__-app{display:block;width:100%;height:100%;font-family:var(--__P__-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11","ss01","ss03"}.__P__-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n';
|
|
1674
1698
|
|
|
1675
1699
|
// src/styles/panel.css
|
|
1676
|
-
var panel_default = '.__P__-anchor{color-scheme:var(--__P__-color-scheme, light);right:16px;bottom:16px}.__P__-surface{display:contents}.__P__-surface[hidden]{display:none}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:calc(14px * var(--__P__-text-scale))}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:calc(14px * var(--__P__-text-scale));background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:color-mix(in srgb,currentColor 15%,transparent)}.__P__-callout-close:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}@media(prefers-reduced-motion:no-preference){.__P__-panel{transition:width var(--__P__-dur-base) var(--__P__-ease),height var(--__P__-dur-base) var(--__P__-ease),max-width var(--__P__-dur-base) var(--__P__-ease),max-height var(--__P__-dur-base) var(--__P__-ease)}.__P__-panel[data-resizing]{transition:none}}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:0;padding:0;justify-content:flex-end;align-items:flex-end}:host([data-mode="fullscreen"][data-position*="top"]) .__P__-anchor{justify-content:flex-start}:host([data-mode="fullscreen"][data-position*="left"]) .__P__-anchor{align-items:flex-start}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}@media(max-width:640px){:host([data-mode="open"]) .__P__-anchor,:host([data-mode="expanded"]) .__P__-anchor{inset:0;align-items:stretch;padding:0}:host([data-mode="open"]) .__P__-panel,:host([data-mode="expanded"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-inline-start:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list,.__P__-history,.__P__-module-scroll,.__P__-home-scroll,.__P__-help-list,.__P__-toolui-code,.__P__-sidebar-conversations{scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;overscroll-behavior:contain;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar,.__P__-history::-webkit-scrollbar,.__P__-module-scroll::-webkit-scrollbar,.__P__-home-scroll::-webkit-scrollbar,.__P__-help-list::-webkit-scrollbar,.__P__-toolui-code::-webkit-scrollbar,.__P__-sidebar-conversations::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb,.__P__-history::-webkit-scrollbar-thumb,.__P__-module-scroll::-webkit-scrollbar-thumb,.__P__-home-scroll::-webkit-scrollbar-thumb,.__P__-help-list::-webkit-scrollbar-thumb,.__P__-toolui-code::-webkit-scrollbar-thumb,.__P__-sidebar-conversations::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;inset-inline-end:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px}.__P__-list>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-date-divider{display:flex;justify-content:center;margin-block:var(--__P__-space-3)}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:calc(11px * var(--__P__-text-scale));font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card)}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;min-width:0;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:calc(14px * var(--__P__-text-scale));word-wrap:break-word;overflow-wrap:break-word;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-end-end-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-end-start-radius:5px}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui){width:100%}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui) .__P__-bubble{width:100%}@media(max-width:640px){.__P__-bubble-col{max-width:92%}.__P__-toolui:not(.__P__-toolui-collapsible){padding:var(--__P__-space-3);gap:var(--__P__-space-2)}details.__P__-toolui-collapsible>summary{padding:var(--__P__-space-2) var(--__P__-space-3)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-3)}.__P__-toolui-section,.__P__-toolui-desc{padding:var(--__P__-space-2) var(--__P__-space-3)}}.__P__-bubble-time{margin-top:3px;padding:0 4px;font-size:calc(11px * var(--__P__-text-scale));line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-inline-start:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-inline-start:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:calc(12.5px * var(--__P__-text-scale));padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-inline-start:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-start-end-radius:var(--__P__-radius-sm);border-end-end-radius:var(--__P__-radius-sm);color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:start}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-inline-start:var(--__P__-space-3);border-inline-start:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary:hover{color:var(--__P__-fg)}.__P__-reasoning-summary:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;border-radius:var(--__P__-radius-sm)}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;margin-inline-end:6px;padding:var(--__P__-space-1) var(--__P__-space-2);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);text-decoration:none}a.__P__-source:hover{color:var(--__P__-fg);border-color:var(--__P__-accent)}.__P__-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:calc(14px * var(--__P__-text-scale));line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 12px;border-radius:var(--__P__-radius-sm);background:color-mix(in oklab,var(--__P__-danger) 8%,var(--__P__-bg-elevated));border:1px solid color-mix(in oklab,var(--__P__-danger) 20%,transparent);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error span{min-width:0}.__P__-error button{margin-inline-start:auto;flex-shrink:0;border:0;background:none;padding:0;color:var(--__P__-accent);font:inherit;font-size:var(--__P__-text-sm);font-weight:600;text-decoration:underline;white-space:nowrap;cursor:pointer}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-3)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:14px 4px 8px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-card{display:flex;flex-direction:column;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);overflow:hidden}.__P__-history-item{all:unset;display:flex;align-items:center;gap:var(--__P__-space-3);padding:12px var(--__P__-space-3);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item+.__P__-history-item{border-top:1px solid var(--__P__-border)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-avatar{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:color-mix(in oklab,var(--__P__-accent) 12%,transparent);color:var(--__P__-accent)}.__P__-history-avatar svg{width:18px;height:18px}.__P__-history-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.__P__-history-row{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2)}.__P__-history-title{flex:1;min-width:0;font-size:calc(14px * var(--__P__-text-scale));font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-time{flex:none;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-history-preview{flex:1;min-width:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--__P__-accent)}.__P__-history-item[data-unread=true] .__P__-history-title{font-weight:600}.__P__-history-item[data-closed=true] .__P__-history-title{color:var(--__P__-fg-muted)}.__P__-history-item-skeleton{cursor:default;pointer-events:none}.__P__-skeleton{display:block;border-radius:4px;background:linear-gradient(90deg,color-mix(in oklab,var(--__P__-fg) 9%,transparent) 30%,color-mix(in oklab,var(--__P__-fg) 17%,transparent),color-mix(in oklab,var(--__P__-fg) 9%,transparent) 70%);background-size:200% 100%;animation:__P__-skeleton-shimmer 1.8s ease-in-out infinite}.__P__-history-avatar.__P__-skeleton{border-radius:50%}.__P__-skeleton-heading{width:52px;height:8px}.__P__-skeleton-title{width:55%;height:12px}.__P__-skeleton-time{width:34px;height:10px}.__P__-skeleton-preview{width:80%;height:10px}@keyframes __P__-skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.__P__-skeleton{animation:none}}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:calc(11px * var(--__P__-text-scale));line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:calc(11px * var(--__P__-text-scale));letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;inset-inline-end:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent)}.__P__-menu-check svg{width:14px;height:14px}.__P__-menu-item-segmented{cursor:default}.__P__-menu-item-segmented:hover{background:transparent}.__P__-segmented{display:inline-flex;gap:2px;padding:2px;background:var(--__P__-bg-elevated);border-radius:var(--__P__-radius-sm)}.__P__-segment{all:unset;min-width:26px;padding:3px 8px;font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.02em;text-align:center;color:var(--__P__-fg-muted);border-radius:calc(var(--__P__-radius-sm) - 2px);cursor:pointer;transition:color .12s ease,background .12s ease}.__P__-segment:hover{color:var(--__P__-fg)}.__P__-segment[data-on=true]{background:var(--__P__-bg);color:var(--__P__-accent);box-shadow:var(--__P__-shadow-card)}.__P__-segment:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body,.__P__-messenger-pane{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-pane[hidden]{display:none}@keyframes __P__-view-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}@media(prefers-reduced-motion:no-preference){.__P__-module,.__P__-history{animation:__P__-view-in .18s var(--__P__-ease-out)}}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{container-type:inline-size;background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-4px;left:calc(50% + 6px);min-width:16px;height:16px;padding:0 4px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--__P__-accent);color:var(--__P__-on-accent);font-size:calc(10px * var(--__P__-text-scale));font-weight:600;line-height:1}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:clamp(calc(12px * var(--__P__-text-scale)),calc(3.2cqi * var(--__P__-text-scale)),calc(14px * var(--__P__-text-scale)));font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-hero-actions .__P__-icon-btn:hover{background:color-mix(in srgb,#fff 18%,transparent);color:#fff}.__P__-home-hero-actions .__P__-icon-btn:active{background:color-mix(in srgb,#fff 26%,transparent)}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(19px * var(--__P__-text-scale)),calc(5.5cqi * var(--__P__-text-scale)),var(--__P__-text-2xl));font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:10px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(15px * var(--__P__-text-scale)),calc(4.2cqi * var(--__P__-text-scale)),var(--__P__-text-xl));font-weight:600;line-height:1.25;letter-spacing:-.005em;color:color-mix(in srgb,var(--__P__-on-accent) 78%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-inline-start:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-inline-start:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:start;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:start}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:calc(14px * var(--__P__-text-scale));color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:start;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-hover)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:start;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;inset-inline-end:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-4)}.__P__-field{display:flex;flex-direction:column;gap:6px}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-input[type=date],.__P__-field-input[type=time]{appearance:none;-webkit-appearance:none}@media(pointer:coarse){.__P__-field-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:10px;padding-top:2px}.__P__-choice{display:flex;align-items:flex-start;gap:10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}.__P__-form-hint{flex:1 1 auto;min-width:6rem;margin-inline-end:auto;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-form-submit{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled){background:var(--__P__-bg-elevated)}@media(max-width:640px){.__P__-form-hint{flex-basis:100%;margin-inline-end:0;font-size:var(--__P__-text-xs)}.__P__-form-submit,.__P__-form-skip{flex:1 1 0;text-align:center}}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-form-done{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;border:1px dashed var(--__P__-border);border-radius:999px;align-self:center;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted)}.__P__-form-done svg{width:14px;height:14px;color:var(--__P__-success, #22c55e)}.__P__-form-done[data-outcome=skipped] svg{color:var(--__P__-fg-muted)}.__P__-form-done-fill{border:0;background:none;padding:0 2px;cursor:pointer;font:inherit;font-weight:600;color:var(--__P__-accent)}.__P__-form-done-fill:hover{text-decoration:underline}details.__P__-form-done{display:block;padding:0;border-radius:var(--__P__-radius-md)}details[open].__P__-form-done{width:min(100%,420px);background:var(--__P__-surface)}.__P__-form-done-summary{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;cursor:pointer;list-style:none}.__P__-form-done-summary::-webkit-details-marker{display:none}.__P__-form-done-summary>svg:last-child{color:var(--__P__-fg-muted);transition:transform .15s var(--__P__-ease)}details[open]>.__P__-form-done-summary>svg:last-child{transform:rotate(90deg)}.__P__-form-answers{margin:0;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);display:grid;gap:var(--__P__-space-3);text-align:start}.__P__-form-answer{display:grid;gap:6px}.__P__-form-answer dt{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-form-answer dd{margin:0;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);font-size:var(--__P__-text-sm);font-weight:400;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui{margin-block:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);background:var(--__P__-bg-elevated);font-size:var(--__P__-text-sm)}.__P__-toolui:not(.__P__-toolui-collapsible){display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4)}.__P__-toolui-group{display:flex;flex-direction:column;gap:var(--__P__-space-3);margin-block:var(--__P__-space-3)}.__P__-toolui-group>.__P__-toolui{margin-block:0}.__P__-toolui-stale{opacity:.7}details.__P__-toolui-collapsible>summary{display:flex;align-items:center;gap:var(--__P__-space-2);padding:var(--__P__-space-3) var(--__P__-space-4);cursor:pointer;list-style:none}details.__P__-toolui-collapsible>summary::-webkit-details-marker{display:none}details.__P__-toolui-collapsible[open]>summary{border-bottom:1px solid var(--__P__-border)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-4)}details.__P__-toolui-collapsible>.__P__-toolui-section~.__P__-toolui-section{margin-top:calc(-1 * var(--__P__-space-2))}.__P__-toolui-wrench{display:inline-flex;color:var(--__P__-fg-muted)}.__P__-toolui-wrench svg{width:15px;height:15px}.__P__-toolui-title{font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-chevron{display:inline-flex;margin-inline-start:auto;color:var(--__P__-fg-muted);transition:transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-toolui-chevron svg{width:16px;height:16px}details.__P__-toolui-collapsible[open]>summary .__P__-toolui-chevron{transform:rotate(180deg)}.__P__-toolui-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;border:1px solid var(--__P__-border-strong);background:var(--__P__-bg);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;white-space:nowrap}.__P__-toolui-badge-accent{border-color:color-mix(in oklab,var(--__P__-warning, #f59e0b) 55%,transparent);background:color-mix(in oklab,var(--__P__-warning, #f59e0b) 12%,transparent);color:var(--__P__-warning, #f59e0b)}.__P__-toolui-badge-muted{border-color:color-mix(in oklab,var(--__P__-fg-muted) 50%,transparent);background:color-mix(in oklab,var(--__P__-fg-muted) 14%,transparent);color:var(--__P__-fg)}.__P__-toolui-status-icon{display:inline-flex}.__P__-toolui-status-icon svg{width:14px;height:14px}.__P__-toolui-status[data-status=awaiting] .__P__-toolui-status-icon{color:var(--__P__-warning, #f59e0b)}.__P__-toolui-status[data-status=responded] .__P__-toolui-status-icon{color:var(--__P__-accent)}.__P__-toolui-status[data-status=completed] .__P__-toolui-status-icon{color:var(--__P__-success, #16a34a)}.__P__-toolui-status[data-status=denied] .__P__-toolui-status-icon{color:#ea580c}.__P__-toolui-status[data-status=error] .__P__-toolui-status-icon{color:var(--__P__-danger, #dc2626)}.__P__-toolui-head{display:flex;align-items:center;flex-wrap:wrap;gap:var(--__P__-space-2)}.__P__-toolui-desc{margin:0;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-section{display:flex;flex-direction:column;gap:8px;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border)}.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-section,.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-desc{padding:0;background:none;border:0;border-radius:0}.__P__-toolui-label{font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--__P__-fg-muted)}.__P__-toolui-text{margin:0;font-size:var(--__P__-text-base);font-weight:600;color:var(--__P__-fg);line-height:1.55;overflow-wrap:anywhere}.__P__-toolui-code{margin:0;max-height:240px;overflow:auto;color:var(--__P__-fg);font-family:var(--__P__-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:var(--__P__-text-xs);line-height:1.5;white-space:pre-wrap;word-break:break-word}.__P__-toolui-code[data-error=true]{color:var(--__P__-danger, #dc2626)}.__P__-toolui-body{gap:6px}.__P__-toolui-prompt{margin:0;font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-subtle{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}:host([dir="rtl"]) .__P__-icon-dir{transform:scaleX(-1)}:host([dir="rtl"]) .__P__-field-input[type=date],:host([dir="rtl"]) .__P__-field-input[type=time]{position:relative;text-align:right;padding-left:34px}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-datetime-edit,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-datetime-edit{text-align:right}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-calendar-picker-indicator,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-calendar-picker-indicator{position:absolute;left:var(--__P__-space-3);margin:0}\n';
|
|
1700
|
+
var panel_default = '.__P__-anchor{color-scheme:var(--__P__-color-scheme, light);right:16px;bottom:16px}.__P__-surface{display:contents}.__P__-surface[hidden]{display:none}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:calc(14px * var(--__P__-text-scale))}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:calc(14px * var(--__P__-text-scale));background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:color-mix(in srgb,currentColor 15%,transparent)}.__P__-callout-close:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}@media(prefers-reduced-motion:no-preference){.__P__-panel{transition:width var(--__P__-dur-base) var(--__P__-ease),height var(--__P__-dur-base) var(--__P__-ease),max-width var(--__P__-dur-base) var(--__P__-ease),max-height var(--__P__-dur-base) var(--__P__-ease)}.__P__-panel[data-resizing]{transition:none}}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:0;padding:0;justify-content:flex-end;align-items:flex-end}:host([data-mode="fullscreen"][data-position*="top"]) .__P__-anchor{justify-content:flex-start}:host([data-mode="fullscreen"][data-position*="left"]) .__P__-anchor{align-items:flex-start}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}@media(max-width:640px){:host([data-mode="open"]) .__P__-anchor,:host([data-mode="expanded"]) .__P__-anchor{inset:0;align-items:stretch;padding:0}:host([data-mode="open"]) .__P__-panel,:host([data-mode="expanded"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-inline-start:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list,.__P__-history,.__P__-module-scroll,.__P__-home-scroll,.__P__-help-list,.__P__-toolui-code,.__P__-sidebar-conversations{scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;overscroll-behavior:contain;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar,.__P__-history::-webkit-scrollbar,.__P__-module-scroll::-webkit-scrollbar,.__P__-home-scroll::-webkit-scrollbar,.__P__-help-list::-webkit-scrollbar,.__P__-toolui-code::-webkit-scrollbar,.__P__-sidebar-conversations::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb,.__P__-history::-webkit-scrollbar-thumb,.__P__-module-scroll::-webkit-scrollbar-thumb,.__P__-home-scroll::-webkit-scrollbar-thumb,.__P__-help-list::-webkit-scrollbar-thumb,.__P__-toolui-code::-webkit-scrollbar-thumb,.__P__-sidebar-conversations::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;inset-inline-end:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-jump--new{width:auto;gap:5px;padding-inline:11px}.__P__-jump-count{font-size:12px;font-weight:600;line-height:1}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px}.__P__-list--fade{--__P__-fade-size: 20px;--__P__-fade-top: 0px;--__P__-fade-bottom: 0px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 var(--__P__-fade-top),#000 calc(100% - var(--__P__-fade-bottom)),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 var(--__P__-fade-top),#000 calc(100% - var(--__P__-fade-bottom)),transparent 100%)}.__P__-list--fade[data-fade-top=true]{--__P__-fade-top: var(--__P__-fade-size)}.__P__-list--fade[data-fade-bottom=true]{--__P__-fade-bottom: var(--__P__-fade-size)}.__P__-turn-spacer{flex:0 0 auto;min-block-size:0}.__P__-list>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-date-divider{display:flex;justify-content:center;margin-block:var(--__P__-space-3)}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:calc(11px * var(--__P__-text-scale));font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card)}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;min-width:0;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:calc(14px * var(--__P__-text-scale));word-wrap:break-word;overflow-wrap:break-word;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-end-end-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-end-start-radius:5px}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui){width:100%}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui) .__P__-bubble{width:100%}@media(max-width:640px){.__P__-bubble-col{max-width:92%}.__P__-toolui:not(.__P__-toolui-collapsible){padding:var(--__P__-space-3);gap:var(--__P__-space-2)}details.__P__-toolui-collapsible>summary{padding:var(--__P__-space-2) var(--__P__-space-3)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-3)}.__P__-toolui-section,.__P__-toolui-desc{padding:var(--__P__-space-2) var(--__P__-space-3)}}.__P__-bubble-time{margin-top:3px;padding:0 4px;font-size:calc(11px * var(--__P__-text-scale));line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-feedback{display:flex;gap:2px;margin-top:4px;padding:0 2px}.__P__-feedback-btn{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:0;border-radius:var(--__P__-radius-sm);background:transparent;color:var(--__P__-fg-muted);cursor:pointer;opacity:.7;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-feedback-btn:hover{opacity:1;background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-feedback-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-feedback-btn[data-active=true]{opacity:1;color:var(--__P__-accent)}.__P__-feedback-btn svg{width:15px;height:15px}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-inline-start:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-inline-start:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:calc(12.5px * var(--__P__-text-scale));padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-inline-start:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-start-end-radius:var(--__P__-radius-sm);border-end-end-radius:var(--__P__-radius-sm);color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:start}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-inline-start:var(--__P__-space-3);border-inline-start:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary:hover{color:var(--__P__-fg)}.__P__-reasoning-summary:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;border-radius:var(--__P__-radius-sm)}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;margin-inline-end:6px;padding:var(--__P__-space-1) var(--__P__-space-2);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);text-decoration:none}a.__P__-source:hover{color:var(--__P__-fg);border-color:var(--__P__-accent)}.__P__-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:calc(14px * var(--__P__-text-scale));line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 12px;border-radius:var(--__P__-radius-sm);background:color-mix(in oklab,var(--__P__-danger) 8%,var(--__P__-bg-elevated));border:1px solid color-mix(in oklab,var(--__P__-danger) 20%,transparent);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error span{min-width:0}.__P__-error button{margin-inline-start:auto;flex-shrink:0;border:0;background:none;padding:0;color:var(--__P__-accent);font:inherit;font-size:var(--__P__-text-sm);font-weight:600;text-decoration:underline;white-space:nowrap;cursor:pointer}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-3)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:14px 4px 8px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-card{display:flex;flex-direction:column;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);overflow:hidden}.__P__-history-item{all:unset;display:flex;align-items:center;gap:var(--__P__-space-3);padding:12px var(--__P__-space-3);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item+.__P__-history-item{border-top:1px solid var(--__P__-border)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-avatar{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:color-mix(in oklab,var(--__P__-accent) 12%,transparent);color:var(--__P__-accent)}.__P__-history-avatar svg{width:18px;height:18px}.__P__-history-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.__P__-history-row{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2)}.__P__-history-title{flex:1;min-width:0;font-size:calc(14px * var(--__P__-text-scale));font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-time{flex:none;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-history-preview{flex:1;min-width:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--__P__-accent)}.__P__-history-item[data-unread=true] .__P__-history-title{font-weight:600}.__P__-history-item[data-closed=true] .__P__-history-title{color:var(--__P__-fg-muted)}.__P__-history-item-skeleton{cursor:default;pointer-events:none}.__P__-skeleton{display:block;border-radius:4px;background:linear-gradient(90deg,color-mix(in oklab,var(--__P__-fg) 9%,transparent) 30%,color-mix(in oklab,var(--__P__-fg) 17%,transparent),color-mix(in oklab,var(--__P__-fg) 9%,transparent) 70%);background-size:200% 100%;animation:__P__-skeleton-shimmer 1.8s ease-in-out infinite}.__P__-history-avatar.__P__-skeleton{border-radius:50%}.__P__-skeleton-heading{width:52px;height:8px}.__P__-skeleton-title{width:55%;height:12px}.__P__-skeleton-time{width:34px;height:10px}.__P__-skeleton-preview{width:80%;height:10px}@keyframes __P__-skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.__P__-skeleton{animation:none}}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:calc(11px * var(--__P__-text-scale));line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:calc(11px * var(--__P__-text-scale));letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;inset-inline-end:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent)}.__P__-menu-check svg{width:14px;height:14px}.__P__-menu-item-segmented{cursor:default}.__P__-menu-item-segmented:hover{background:transparent}.__P__-segmented{display:inline-flex;gap:2px;padding:2px;background:var(--__P__-bg-elevated);border-radius:var(--__P__-radius-sm)}.__P__-segment{all:unset;min-width:26px;padding:3px 8px;font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.02em;text-align:center;color:var(--__P__-fg-muted);border-radius:calc(var(--__P__-radius-sm) - 2px);cursor:pointer;transition:color .12s ease,background .12s ease}.__P__-segment:hover{color:var(--__P__-fg)}.__P__-segment[data-on=true]{background:var(--__P__-bg);color:var(--__P__-accent);box-shadow:var(--__P__-shadow-card)}.__P__-segment:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body,.__P__-messenger-pane{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-pane[hidden]{display:none}@keyframes __P__-view-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}@media(prefers-reduced-motion:no-preference){.__P__-module,.__P__-history{animation:__P__-view-in .18s var(--__P__-ease-out)}}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{container-type:inline-size;background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-2px;left:calc(50% + 6px);width:8px;height:8px;border-radius:50%;background:var(--__P__-accent);box-shadow:0 0 0 2px var(--__P__-bg-elevated)}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:clamp(calc(12px * var(--__P__-text-scale)),calc(3.2cqi * var(--__P__-text-scale)),calc(14px * var(--__P__-text-scale)));font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-hero-actions .__P__-icon-btn:hover{background:color-mix(in srgb,#fff 18%,transparent);color:#fff}.__P__-home-hero-actions .__P__-icon-btn:active{background:color-mix(in srgb,#fff 26%,transparent)}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(19px * var(--__P__-text-scale)),calc(5.5cqi * var(--__P__-text-scale)),var(--__P__-text-2xl));font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:10px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(15px * var(--__P__-text-scale)),calc(4.2cqi * var(--__P__-text-scale)),var(--__P__-text-xl));font-weight:600;line-height:1.25;letter-spacing:-.005em;color:color-mix(in srgb,var(--__P__-on-accent) 78%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-inline-start:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-inline-start:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:start;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:start}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:calc(14px * var(--__P__-text-scale));color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:start;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-hover)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:start;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;inset-inline-end:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-4)}.__P__-field{display:flex;flex-direction:column;gap:6px}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-input[type=date],.__P__-field-input[type=time]{appearance:none;-webkit-appearance:none}@media(pointer:coarse){.__P__-field-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:10px;padding-top:2px}.__P__-choice{display:flex;align-items:flex-start;gap:10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}.__P__-form-hint{flex:1 1 auto;min-width:6rem;margin-inline-end:auto;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-form-submit{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled){background:var(--__P__-bg-elevated)}@media(max-width:640px){.__P__-form-hint{flex-basis:100%;margin-inline-end:0;font-size:var(--__P__-text-xs)}.__P__-form-submit,.__P__-form-skip{flex:1 1 0;text-align:center}}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-form-done{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;border:1px dashed var(--__P__-border);border-radius:999px;align-self:center;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted)}.__P__-form-done svg{width:14px;height:14px;color:var(--__P__-success, #22c55e)}.__P__-form-done[data-outcome=skipped] svg{color:var(--__P__-fg-muted)}.__P__-form-done-fill{border:0;background:none;padding:0 2px;cursor:pointer;font:inherit;font-weight:600;color:var(--__P__-accent)}.__P__-form-done-fill:hover{text-decoration:underline}details.__P__-form-done{display:block;padding:0;border-radius:var(--__P__-radius-md)}details[open].__P__-form-done{width:min(100%,420px);background:var(--__P__-surface)}.__P__-form-done-summary{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;cursor:pointer;list-style:none}.__P__-form-done-summary::-webkit-details-marker{display:none}.__P__-form-done-summary>svg:last-child{color:var(--__P__-fg-muted);transition:transform .15s var(--__P__-ease)}details[open]>.__P__-form-done-summary>svg:last-child{transform:rotate(90deg)}.__P__-form-answers{margin:0;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);display:grid;gap:var(--__P__-space-3);text-align:start}.__P__-form-answer{display:grid;gap:6px}.__P__-form-answer dt{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-form-answer dd{margin:0;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);font-size:var(--__P__-text-sm);font-weight:400;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui{margin-block:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);background:var(--__P__-bg-elevated);font-size:var(--__P__-text-sm)}.__P__-toolui:not(.__P__-toolui-collapsible){display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4)}.__P__-toolui-group{display:flex;flex-direction:column;gap:var(--__P__-space-3);margin-block:var(--__P__-space-3)}.__P__-toolui-group>.__P__-toolui{margin-block:0}.__P__-toolui-stale{opacity:.7}details.__P__-toolui-collapsible>summary{display:flex;align-items:center;gap:var(--__P__-space-2);padding:var(--__P__-space-3) var(--__P__-space-4);cursor:pointer;list-style:none}details.__P__-toolui-collapsible>summary::-webkit-details-marker{display:none}details.__P__-toolui-collapsible[open]>summary{border-bottom:1px solid var(--__P__-border)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-4)}details.__P__-toolui-collapsible>.__P__-toolui-section~.__P__-toolui-section{margin-top:calc(-1 * var(--__P__-space-2))}.__P__-toolui-wrench{display:inline-flex;color:var(--__P__-fg-muted)}.__P__-toolui-wrench svg{width:15px;height:15px}.__P__-toolui-title{font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-chevron{display:inline-flex;margin-inline-start:auto;color:var(--__P__-fg-muted);transition:transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-toolui-chevron svg{width:16px;height:16px}details.__P__-toolui-collapsible[open]>summary .__P__-toolui-chevron{transform:rotate(180deg)}.__P__-toolui-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;border:1px solid var(--__P__-border-strong);background:var(--__P__-bg);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;white-space:nowrap}.__P__-toolui-badge-accent{border-color:color-mix(in oklab,var(--__P__-warning, #f59e0b) 55%,transparent);background:color-mix(in oklab,var(--__P__-warning, #f59e0b) 12%,transparent);color:var(--__P__-warning, #f59e0b)}.__P__-toolui-badge-muted{border-color:color-mix(in oklab,var(--__P__-fg-muted) 50%,transparent);background:color-mix(in oklab,var(--__P__-fg-muted) 14%,transparent);color:var(--__P__-fg)}.__P__-toolui-status-icon{display:inline-flex}.__P__-toolui-status-icon svg{width:14px;height:14px}.__P__-toolui-status[data-status=awaiting] .__P__-toolui-status-icon{color:var(--__P__-warning, #f59e0b)}.__P__-toolui-status[data-status=responded] .__P__-toolui-status-icon{color:var(--__P__-accent)}.__P__-toolui-status[data-status=completed] .__P__-toolui-status-icon{color:var(--__P__-success, #16a34a)}.__P__-toolui-status[data-status=denied] .__P__-toolui-status-icon{color:#ea580c}.__P__-toolui-status[data-status=error] .__P__-toolui-status-icon{color:var(--__P__-danger, #dc2626)}.__P__-toolui-head{display:flex;align-items:center;flex-wrap:wrap;gap:var(--__P__-space-2)}.__P__-toolui-desc{margin:0;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-section{display:flex;flex-direction:column;gap:8px;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border)}.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-section,.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-desc{padding:0;background:none;border:0;border-radius:0}.__P__-toolui-label{font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--__P__-fg-muted)}.__P__-toolui-text{margin:0;font-size:var(--__P__-text-base);font-weight:600;color:var(--__P__-fg);line-height:1.55;overflow-wrap:anywhere}.__P__-toolui-code{margin:0;max-height:240px;overflow:auto;color:var(--__P__-fg);font-family:var(--__P__-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:var(--__P__-text-xs);line-height:1.5;white-space:pre-wrap;word-break:break-word}.__P__-toolui-code[data-error=true]{color:var(--__P__-danger, #dc2626)}.__P__-toolui-body{gap:6px}.__P__-toolui-prompt{margin:0;font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-subtle{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}:host([dir="rtl"]) .__P__-icon-dir{transform:scaleX(-1)}:host([dir="rtl"]) .__P__-field-input[type=date],:host([dir="rtl"]) .__P__-field-input[type=time]{position:relative;text-align:right;padding-left:34px}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-datetime-edit,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-datetime-edit{text-align:right}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-calendar-picker-indicator,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-calendar-picker-indicator{position:absolute;left:var(--__P__-space-3);margin:0}\n';
|
|
1677
1701
|
|
|
1678
1702
|
// src/styles/standalone.css
|
|
1679
1703
|
var standalone_default = ".__P__-standalone-page{margin:0;height:100vh;background:var(--__P__-bg, #fff);display:grid;place-items:stretch}\n";
|
|
@@ -1761,22 +1785,22 @@ function attachAdoptedSheet(shadow, doc) {
|
|
|
1761
1785
|
}
|
|
1762
1786
|
}
|
|
1763
1787
|
function applyThemeOverrides(host, overrides) {
|
|
1764
|
-
const
|
|
1765
|
-
if (overrides.accent) host.style.setProperty(`--${
|
|
1766
|
-
if (overrides.accentText) host.style.setProperty(`--${
|
|
1767
|
-
if (overrides.radius) host.style.setProperty(`--${
|
|
1768
|
-
if (overrides.fontFamily) host.style.setProperty(`--${
|
|
1788
|
+
const p36 = BRAND.cssPrefix;
|
|
1789
|
+
if (overrides.accent) host.style.setProperty(`--${p36}-accent-user`, overrides.accent);
|
|
1790
|
+
if (overrides.accentText) host.style.setProperty(`--${p36}-accent-text-user`, overrides.accentText);
|
|
1791
|
+
if (overrides.radius) host.style.setProperty(`--${p36}-radius`, overrides.radius);
|
|
1792
|
+
if (overrides.fontFamily) host.style.setProperty(`--${p36}-font`, overrides.fontFamily);
|
|
1769
1793
|
}
|
|
1770
1794
|
function applyThemeMode(host, mode) {
|
|
1771
1795
|
host.dataset.theme = mode;
|
|
1772
1796
|
}
|
|
1773
1797
|
function applySize(host, size) {
|
|
1774
|
-
const
|
|
1775
|
-
if (size.width !== void 0) host.style.setProperty(`--${
|
|
1776
|
-
if (size.height !== void 0) host.style.setProperty(`--${
|
|
1777
|
-
if (size.expanded?.width !== void 0) host.style.setProperty(`--${
|
|
1778
|
-
if (size.expanded?.height !== void 0) host.style.setProperty(`--${
|
|
1779
|
-
if (size.inset !== void 0) host.style.setProperty(`--${
|
|
1798
|
+
const p36 = BRAND.cssPrefix;
|
|
1799
|
+
if (size.width !== void 0) host.style.setProperty(`--${p36}-panel-w`, size.width);
|
|
1800
|
+
if (size.height !== void 0) host.style.setProperty(`--${p36}-panel-h`, size.height);
|
|
1801
|
+
if (size.expanded?.width !== void 0) host.style.setProperty(`--${p36}-expanded-w`, size.expanded.width);
|
|
1802
|
+
if (size.expanded?.height !== void 0) host.style.setProperty(`--${p36}-expanded-h`, size.expanded.height);
|
|
1803
|
+
if (size.inset !== void 0) host.style.setProperty(`--${p36}-panel-inset`, size.inset);
|
|
1780
1804
|
}
|
|
1781
1805
|
function applyPosition(host, pos) {
|
|
1782
1806
|
host.dataset.position = pos;
|
|
@@ -1795,7 +1819,7 @@ function applyHostAttributes(host, resolved) {
|
|
|
1795
1819
|
import { h, render as renderPreact } from "preact";
|
|
1796
1820
|
|
|
1797
1821
|
// src/ui/app.tsx
|
|
1798
|
-
import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as
|
|
1822
|
+
import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as useState14 } from "preact/hooks";
|
|
1799
1823
|
import { batch, useComputed as useComputed9, useSignal } from "@preact/signals";
|
|
1800
1824
|
|
|
1801
1825
|
// src/core/handshake-shape.ts
|
|
@@ -1880,7 +1904,7 @@ function createAuth(opts) {
|
|
|
1880
1904
|
}
|
|
1881
1905
|
|
|
1882
1906
|
// src/core/version.ts
|
|
1883
|
-
var ELEMENTS_VERSION = true ? "0.
|
|
1907
|
+
var ELEMENTS_VERSION = true ? "0.55.0" : "0.0.0-dev";
|
|
1884
1908
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
1885
1909
|
|
|
1886
1910
|
// src/stream/types.ts
|
|
@@ -1965,11 +1989,11 @@ function toBase64Url(json) {
|
|
|
1965
1989
|
var nonEmpty = (ctx) => ctx && Object.keys(ctx).length > 0 ? ctx : void 0;
|
|
1966
1990
|
function encodeContext(user, page) {
|
|
1967
1991
|
const u = nonEmpty(user);
|
|
1968
|
-
const
|
|
1969
|
-
if (!u && !
|
|
1992
|
+
const p36 = nonEmpty(page);
|
|
1993
|
+
if (!u && !p36) return void 0;
|
|
1970
1994
|
const envelope = {};
|
|
1971
1995
|
if (u) envelope.user = u;
|
|
1972
|
-
if (
|
|
1996
|
+
if (p36) envelope.page = p36;
|
|
1973
1997
|
return toBase64Url(JSON.stringify(envelope));
|
|
1974
1998
|
}
|
|
1975
1999
|
|
|
@@ -2013,11 +2037,20 @@ var DEFAULT_PATHS = {
|
|
|
2013
2037
|
updateSettings: "/pai/update-settings",
|
|
2014
2038
|
/**
|
|
2015
2039
|
* Mark a conversation read. POST `{ visitorId, conversationId }` → the server
|
|
2016
|
-
* records `lastReadAt = now` for that (visitor, conversation)
|
|
2017
|
-
* `
|
|
2018
|
-
*
|
|
2040
|
+
* records `lastReadAt = now` for that (visitor, conversation), which clears its
|
|
2041
|
+
* `hasUnread` (returned on `/list-conversations`). Fire-and-forget on the
|
|
2042
|
+
* client; a failure just leaves the dot until the next sync.
|
|
2019
2043
|
*/
|
|
2020
2044
|
markRead: "/pai/mark-read",
|
|
2045
|
+
/**
|
|
2046
|
+
* Record 👍/👎 feedback on an assistant message. POST `{ visitorId,
|
|
2047
|
+
* conversationId, messageId, set: { feedback } }` (`feedback`: `"up"` / `"down"`
|
|
2048
|
+
* / `null` to clear) → the server stores the signal on that message (mirrors the
|
|
2049
|
+
* authenticated `conversation/message/update` `set` shape). Fire-and-forget on
|
|
2050
|
+
* the client; a 404 (backend without the endpoint) is ignored — the UI still
|
|
2051
|
+
* reflects the choice locally and emits the `messageFeedback` event.
|
|
2052
|
+
*/
|
|
2053
|
+
messageFeedback: "/pai/message-feedback",
|
|
2021
2054
|
// ── Data API (module-help-ai-data-api, via `dataApiBaseUrl`) ─────────
|
|
2022
2055
|
/**
|
|
2023
2056
|
* The data module's one ACTIVATION read. `GET
|
|
@@ -2069,8 +2102,8 @@ function buildSendMessageRequest(params) {
|
|
|
2069
2102
|
if (tools?.length) body.data = { tools };
|
|
2070
2103
|
return body;
|
|
2071
2104
|
}
|
|
2072
|
-
function isResolvedToolPart(
|
|
2073
|
-
return
|
|
2105
|
+
function isResolvedToolPart(p36) {
|
|
2106
|
+
return p36.state === "output-available" || p36.state === "output-error" || p36.state === "output-denied" || p36.approval?.approved !== void 0;
|
|
2074
2107
|
}
|
|
2075
2108
|
function normalizeToolRef(ref) {
|
|
2076
2109
|
if (typeof ref === "string") return ref ? { code: ref } : null;
|
|
@@ -2078,29 +2111,29 @@ function normalizeToolRef(ref) {
|
|
|
2078
2111
|
}
|
|
2079
2112
|
function messageToWireParts(m) {
|
|
2080
2113
|
const out = [];
|
|
2081
|
-
for (const
|
|
2082
|
-
if (
|
|
2114
|
+
for (const p36 of m.parts) {
|
|
2115
|
+
if (p36.kind === "step-start") {
|
|
2083
2116
|
out.push({ type: "step-start" });
|
|
2084
2117
|
}
|
|
2085
|
-
if (
|
|
2086
|
-
out.push({ type: "reasoning", text:
|
|
2118
|
+
if (p36.kind === "reasoning" && p36.text) {
|
|
2119
|
+
out.push({ type: "reasoning", text: p36.text, state: p36.done ? "done" : "streaming" });
|
|
2087
2120
|
}
|
|
2088
|
-
if (
|
|
2089
|
-
out.push({ text:
|
|
2121
|
+
if (p36.kind === "text" && p36.text) {
|
|
2122
|
+
out.push({ text: p36.text, type: "text" });
|
|
2090
2123
|
}
|
|
2091
|
-
if (
|
|
2092
|
-
out.push({ mediaType:
|
|
2124
|
+
if (p36.kind === "file" && p36.url) {
|
|
2125
|
+
out.push({ mediaType: p36.mediaType, type: "file", url: p36.url });
|
|
2093
2126
|
}
|
|
2094
|
-
if (
|
|
2127
|
+
if (p36.kind === "tool" && isResolvedToolPart(p36)) {
|
|
2095
2128
|
const part = {
|
|
2096
|
-
type: toolPartType(
|
|
2097
|
-
toolCallId:
|
|
2098
|
-
state:
|
|
2129
|
+
type: toolPartType(p36.toolName),
|
|
2130
|
+
toolCallId: p36.toolCallId,
|
|
2131
|
+
state: p36.state
|
|
2099
2132
|
};
|
|
2100
|
-
if (
|
|
2101
|
-
if (
|
|
2102
|
-
if (
|
|
2103
|
-
if (
|
|
2133
|
+
if (p36.input !== void 0) part.input = p36.input;
|
|
2134
|
+
if (p36.output !== void 0) part.output = p36.output;
|
|
2135
|
+
if (p36.error !== void 0) part.errorText = p36.error;
|
|
2136
|
+
if (p36.approval && p36.approval.approved !== void 0) part.approval = p36.approval;
|
|
2104
2137
|
out.push(part);
|
|
2105
2138
|
}
|
|
2106
2139
|
}
|
|
@@ -2360,7 +2393,7 @@ var AgentTransport = class {
|
|
|
2360
2393
|
lastMessageAt: conversation.lastMessageAt,
|
|
2361
2394
|
preview: conversation.preview,
|
|
2362
2395
|
canContinue: conversation.canContinue,
|
|
2363
|
-
|
|
2396
|
+
hasUnread: conversation.hasUnread
|
|
2364
2397
|
})),
|
|
2365
2398
|
nextCursor: res.nextCursor
|
|
2366
2399
|
};
|
|
@@ -2387,8 +2420,8 @@ var AgentTransport = class {
|
|
|
2387
2420
|
}
|
|
2388
2421
|
/**
|
|
2389
2422
|
* Mark a conversation read up to its latest message. Fire-and-forget — the
|
|
2390
|
-
* server records `lastReadAt` and clears that conversation's `
|
|
2391
|
-
* next `/conversations`. A failure is non-fatal (the
|
|
2423
|
+
* server records `lastReadAt` and clears that conversation's `hasUnread` on the
|
|
2424
|
+
* next `/conversations`. A failure is non-fatal (the dot just lingers until the
|
|
2392
2425
|
* next sync), so callers don't await this.
|
|
2393
2426
|
*/
|
|
2394
2427
|
async markRead(conversationId) {
|
|
@@ -2485,6 +2518,26 @@ var AgentTransport = class {
|
|
|
2485
2518
|
log5.debug("submitForm failed (non-fatal)", { err });
|
|
2486
2519
|
}
|
|
2487
2520
|
}
|
|
2521
|
+
/**
|
|
2522
|
+
* Record 👍/👎 feedback on an assistant message. `POST /pai/message-feedback`
|
|
2523
|
+
* (agent-API). `visitorId` + `conversationId` ride the envelope; `messageId`
|
|
2524
|
+
* (the backend message id) + `set.feedback` are explicit (`null` clears a prior
|
|
2525
|
+
* choice) — the `set` block mirrors the authenticated message-update contract.
|
|
2526
|
+
* Fire-and-forget — a failure (e.g. 404 on a backend without the endpoint) is
|
|
2527
|
+
* non-fatal, so callers don't await; the UI already reflects the choice.
|
|
2528
|
+
*/
|
|
2529
|
+
async submitFeedback(body) {
|
|
2530
|
+
log5.debug("submitFeedback \u2192", { messageId: body.messageId, value: body.value });
|
|
2531
|
+
try {
|
|
2532
|
+
await this.postJson(
|
|
2533
|
+
DEFAULT_PATHS.messageFeedback,
|
|
2534
|
+
{ messageId: body.messageId, set: { feedback: body.value } },
|
|
2535
|
+
"submitFeedback"
|
|
2536
|
+
);
|
|
2537
|
+
} catch (err) {
|
|
2538
|
+
log5.debug("submitFeedback failed (non-fatal)", { err });
|
|
2539
|
+
}
|
|
2540
|
+
}
|
|
2488
2541
|
sendMessage(body) {
|
|
2489
2542
|
this.conversationsCache.clear();
|
|
2490
2543
|
log5.debug("message \u2192", {
|
|
@@ -2810,6 +2863,7 @@ function toReactive(m) {
|
|
|
2810
2863
|
serverMessageId: m.serverMessageId,
|
|
2811
2864
|
ephemeral: m.ephemeral,
|
|
2812
2865
|
attachments: m.attachments,
|
|
2866
|
+
feedback: m.feedback,
|
|
2813
2867
|
partsSig: signal(m.parts.map(partToReactive))
|
|
2814
2868
|
};
|
|
2815
2869
|
}
|
|
@@ -2858,7 +2912,7 @@ function fromWireMessage(w) {
|
|
|
2858
2912
|
};
|
|
2859
2913
|
}
|
|
2860
2914
|
return null;
|
|
2861
|
-
}).filter((
|
|
2915
|
+
}).filter((p36) => p36 !== null);
|
|
2862
2916
|
return {
|
|
2863
2917
|
id: w.id,
|
|
2864
2918
|
role: w.role,
|
|
@@ -2873,6 +2927,8 @@ function fromWireMessage(w) {
|
|
|
2873
2927
|
// `message-bubble`); everything else is a normal completed turn.
|
|
2874
2928
|
status: w.status === "failed" ? "error" : "complete",
|
|
2875
2929
|
canceled: w.status === "canceled",
|
|
2930
|
+
// Restore the persisted 👍/👎 so the feedback control shows the prior choice.
|
|
2931
|
+
feedback: w.feedback ?? null,
|
|
2876
2932
|
partsSig: signal(parts)
|
|
2877
2933
|
};
|
|
2878
2934
|
}
|
|
@@ -2912,7 +2968,7 @@ function assistantText(m) {
|
|
|
2912
2968
|
}
|
|
2913
2969
|
function hasNoVisibleAnswer(m) {
|
|
2914
2970
|
if (assistantText(m).trim() !== "") return false;
|
|
2915
|
-
return !m.partsSig.value.some((
|
|
2971
|
+
return !m.partsSig.value.some((p36) => p36.kind === "tool" || p36.kind === "file" || p36.kind === "source");
|
|
2916
2972
|
}
|
|
2917
2973
|
function isEmptyAssistantReply(m) {
|
|
2918
2974
|
return m.role === "assistant" && m.status !== "streaming" && hasNoVisibleAnswer(m);
|
|
@@ -2920,43 +2976,43 @@ function isEmptyAssistantReply(m) {
|
|
|
2920
2976
|
function isHiddenCanceledTurn(m) {
|
|
2921
2977
|
return m.canceled === true && isEmptyAssistantReply(m);
|
|
2922
2978
|
}
|
|
2923
|
-
function partToReactive(
|
|
2924
|
-
if (
|
|
2925
|
-
return { kind:
|
|
2979
|
+
function partToReactive(p36) {
|
|
2980
|
+
if (p36.kind === "text" || p36.kind === "reasoning") {
|
|
2981
|
+
return { kind: p36.kind, id: p36.id, textSig: signal(p36.text), doneSig: signal(p36.done) };
|
|
2926
2982
|
}
|
|
2927
|
-
if (
|
|
2983
|
+
if (p36.kind === "tool") {
|
|
2928
2984
|
return {
|
|
2929
2985
|
kind: "tool",
|
|
2930
|
-
toolCallId:
|
|
2931
|
-
toolName:
|
|
2932
|
-
inputPartialSig: signal(
|
|
2933
|
-
inputSig: signal(
|
|
2934
|
-
outputSig: signal(
|
|
2935
|
-
errorSig: signal(
|
|
2936
|
-
stateSig: signal(
|
|
2937
|
-
approvalSig: signal(
|
|
2986
|
+
toolCallId: p36.toolCallId,
|
|
2987
|
+
toolName: p36.toolName,
|
|
2988
|
+
inputPartialSig: signal(p36.inputPartial),
|
|
2989
|
+
inputSig: signal(p36.input),
|
|
2990
|
+
outputSig: signal(p36.output),
|
|
2991
|
+
errorSig: signal(p36.error),
|
|
2992
|
+
stateSig: signal(p36.state),
|
|
2993
|
+
approvalSig: signal(p36.approval)
|
|
2938
2994
|
};
|
|
2939
2995
|
}
|
|
2940
|
-
return
|
|
2996
|
+
return p36;
|
|
2941
2997
|
}
|
|
2942
|
-
function partFromReactive(
|
|
2943
|
-
if (
|
|
2944
|
-
return { kind:
|
|
2998
|
+
function partFromReactive(p36) {
|
|
2999
|
+
if (p36.kind === "text" || p36.kind === "reasoning") {
|
|
3000
|
+
return { kind: p36.kind, id: p36.id, text: p36.textSig.value, done: p36.doneSig.value };
|
|
2945
3001
|
}
|
|
2946
|
-
if (
|
|
3002
|
+
if (p36.kind === "tool") {
|
|
2947
3003
|
return {
|
|
2948
3004
|
kind: "tool",
|
|
2949
|
-
toolCallId:
|
|
2950
|
-
toolName:
|
|
2951
|
-
inputPartial:
|
|
2952
|
-
input:
|
|
2953
|
-
output:
|
|
2954
|
-
error:
|
|
2955
|
-
state:
|
|
2956
|
-
approval:
|
|
3005
|
+
toolCallId: p36.toolCallId,
|
|
3006
|
+
toolName: p36.toolName,
|
|
3007
|
+
inputPartial: p36.inputPartialSig.value,
|
|
3008
|
+
input: p36.inputSig.value,
|
|
3009
|
+
output: p36.outputSig.value,
|
|
3010
|
+
error: p36.errorSig.value,
|
|
3011
|
+
state: p36.stateSig.value,
|
|
3012
|
+
approval: p36.approvalSig.value
|
|
2957
3013
|
};
|
|
2958
3014
|
}
|
|
2959
|
-
return
|
|
3015
|
+
return p36;
|
|
2960
3016
|
}
|
|
2961
3017
|
|
|
2962
3018
|
// src/stream/reducer.ts
|
|
@@ -3035,8 +3091,8 @@ var StreamReducer = class {
|
|
|
3035
3091
|
this.ensureTextPart(m, "text", chunk.id);
|
|
3036
3092
|
return;
|
|
3037
3093
|
case "text-delta": {
|
|
3038
|
-
const
|
|
3039
|
-
|
|
3094
|
+
const p36 = this.ensureTextPart(m, "text", chunk.id);
|
|
3095
|
+
p36.textSig.value += chunk.delta;
|
|
3040
3096
|
return;
|
|
3041
3097
|
}
|
|
3042
3098
|
case "text-end":
|
|
@@ -3046,8 +3102,8 @@ var StreamReducer = class {
|
|
|
3046
3102
|
this.ensureTextPart(m, "reasoning", chunk.id).doneSig.value = false;
|
|
3047
3103
|
return;
|
|
3048
3104
|
case "reasoning-delta": {
|
|
3049
|
-
const
|
|
3050
|
-
|
|
3105
|
+
const p36 = this.ensureTextPart(m, "reasoning", chunk.id);
|
|
3106
|
+
p36.textSig.value += chunk.delta;
|
|
3051
3107
|
return;
|
|
3052
3108
|
}
|
|
3053
3109
|
case "reasoning-end":
|
|
@@ -3099,7 +3155,7 @@ var StreamReducer = class {
|
|
|
3099
3155
|
}
|
|
3100
3156
|
};
|
|
3101
3157
|
function ensureToolPart(m, toolCallId, toolName2) {
|
|
3102
|
-
const existing = m.partsSig.value.find((
|
|
3158
|
+
const existing = m.partsSig.value.find((p36) => p36.kind === "tool" && p36.toolCallId === toolCallId);
|
|
3103
3159
|
if (existing) return existing;
|
|
3104
3160
|
const part = {
|
|
3105
3161
|
kind: "tool",
|
|
@@ -3119,7 +3175,7 @@ function appendPart(m, part) {
|
|
|
3119
3175
|
m.partsSig.value = [...m.partsSig.value, part];
|
|
3120
3176
|
}
|
|
3121
3177
|
function appendSource(m, source) {
|
|
3122
|
-
if (m.partsSig.value.some((
|
|
3178
|
+
if (m.partsSig.value.some((p36) => p36.kind === "source" && p36.sourceId === source.sourceId)) return;
|
|
3123
3179
|
appendPart(m, source);
|
|
3124
3180
|
}
|
|
3125
3181
|
function applyTool(m, chunk) {
|
|
@@ -3128,37 +3184,37 @@ function applyTool(m, chunk) {
|
|
|
3128
3184
|
ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3129
3185
|
return;
|
|
3130
3186
|
case "tool-input-delta": {
|
|
3131
|
-
const
|
|
3132
|
-
|
|
3187
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3188
|
+
p36.inputPartialSig.value += chunk.inputTextDelta;
|
|
3133
3189
|
return;
|
|
3134
3190
|
}
|
|
3135
3191
|
case "tool-input-available": {
|
|
3136
|
-
const
|
|
3137
|
-
|
|
3138
|
-
|
|
3192
|
+
const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3193
|
+
p36.inputSig.value = chunk.input;
|
|
3194
|
+
p36.stateSig.value = "input-available";
|
|
3139
3195
|
return;
|
|
3140
3196
|
}
|
|
3141
3197
|
case "tool-approval-request": {
|
|
3142
|
-
const
|
|
3143
|
-
|
|
3144
|
-
|
|
3198
|
+
const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3199
|
+
p36.approvalSig.value = { id: chunk.approvalId };
|
|
3200
|
+
p36.stateSig.value = "approval-requested";
|
|
3145
3201
|
return;
|
|
3146
3202
|
}
|
|
3147
3203
|
case "tool-output-available": {
|
|
3148
|
-
const
|
|
3149
|
-
|
|
3150
|
-
|
|
3204
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3205
|
+
p36.outputSig.value = chunk.output;
|
|
3206
|
+
p36.stateSig.value = "output-available";
|
|
3151
3207
|
return;
|
|
3152
3208
|
}
|
|
3153
3209
|
case "tool-output-error": {
|
|
3154
|
-
const
|
|
3155
|
-
|
|
3156
|
-
|
|
3210
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3211
|
+
p36.errorSig.value = chunk.errorText;
|
|
3212
|
+
p36.stateSig.value = "output-error";
|
|
3157
3213
|
return;
|
|
3158
3214
|
}
|
|
3159
3215
|
case "tool-output-denied": {
|
|
3160
|
-
const
|
|
3161
|
-
|
|
3216
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3217
|
+
p36.stateSig.value = "output-denied";
|
|
3162
3218
|
return;
|
|
3163
3219
|
}
|
|
3164
3220
|
default:
|
|
@@ -3595,6 +3651,14 @@ var WaveIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "tru
|
|
|
3595
3651
|
/* @__PURE__ */ jsx("path", { d: "M13 10V6.5a1.5 1.5 0 0 1 3 0V12" }),
|
|
3596
3652
|
/* @__PURE__ */ jsx("path", { d: "M16 9.5a1.5 1.5 0 0 1 3 0v2.5a7 7 0 0 1-7 7 7 7 0 0 1-6.4-4.2L4 12.5a1.5 1.5 0 0 1 2.6-1.5L7 11" })
|
|
3597
3653
|
] });
|
|
3654
|
+
var ThumbUpIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3655
|
+
/* @__PURE__ */ jsx("path", { d: "M7 10v11H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z" }),
|
|
3656
|
+
/* @__PURE__ */ jsx("path", { d: "M7 10l4-7a2.5 2.5 0 0 1 2.5 2.5V8h5a2 2 0 0 1 2 2.3l-1.2 8A2 2 0 0 1 17.3 20H7" })
|
|
3657
|
+
] });
|
|
3658
|
+
var ThumbDownIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3659
|
+
/* @__PURE__ */ jsx("path", { d: "M17 14V3h3a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1z" }),
|
|
3660
|
+
/* @__PURE__ */ jsx("path", { d: "M17 14l-4 7a2.5 2.5 0 0 1-2.5-2.5V16h-5a2 2 0 0 1-2-2.3l1.2-8A2 2 0 0 1 6.7 4H17" })
|
|
3661
|
+
] });
|
|
3598
3662
|
var WrenchIcon = () => /* @__PURE__ */ jsx("svg", { ...props, "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M14.7 6.3a4 4 0 0 0-5.4 5.3L3 18l3 3 6.4-6.3a4 4 0 0 0 5.3-5.4l-2.7 2.7-2.6-.7-.7-2.6z" }) });
|
|
3599
3663
|
var ClockIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3600
3664
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
@@ -3677,6 +3741,12 @@ var TID = {
|
|
|
3677
3741
|
messageBubble: `${p2}-message`,
|
|
3678
3742
|
/** "Stop" / retry inline button inside an error bubble. */
|
|
3679
3743
|
messageRetry: `${p2}-message-retry`,
|
|
3744
|
+
/** Feedback toolbar under an assistant reply (shown only when `enableMessageFeedback`). */
|
|
3745
|
+
messageFeedback: `${p2}-message-feedback`,
|
|
3746
|
+
/** 👍 "good response" feedback button. */
|
|
3747
|
+
feedbackUp: `${p2}-feedback-up`,
|
|
3748
|
+
/** 👎 "bad response" feedback button. */
|
|
3749
|
+
feedbackDown: `${p2}-feedback-down`,
|
|
3680
3750
|
// ── History pane ────────────────────────────────────────────────
|
|
3681
3751
|
/** History pane root (list view inside the panel). */
|
|
3682
3752
|
historyPane: `${p2}-history-pane`,
|
|
@@ -3870,24 +3940,24 @@ import { useCallback as useCallback2, useEffect as useEffect9, useRef as useRef6
|
|
|
3870
3940
|
import { useEffect as useEffect2, useRef } from "preact/hooks";
|
|
3871
3941
|
import { jsx as jsx3 } from "preact/jsx-runtime";
|
|
3872
3942
|
function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, strings }) {
|
|
3873
|
-
const
|
|
3943
|
+
const p36 = BRAND.cssPrefix;
|
|
3874
3944
|
const dragRef = useRef(null);
|
|
3875
3945
|
useEffect2(() => {
|
|
3876
3946
|
if (!panelEl) return;
|
|
3877
3947
|
const style = panelEl.style;
|
|
3878
|
-
if (resize.minWidth) style.setProperty(`--${
|
|
3879
|
-
if (resize.maxWidth) style.setProperty(`--${
|
|
3880
|
-
if (resize.minHeight) style.setProperty(`--${
|
|
3881
|
-
if (resize.maxHeight) style.setProperty(`--${
|
|
3948
|
+
if (resize.minWidth) style.setProperty(`--${p36}-resize-min-w`, resize.minWidth);
|
|
3949
|
+
if (resize.maxWidth) style.setProperty(`--${p36}-resize-max-w`, resize.maxWidth);
|
|
3950
|
+
if (resize.minHeight) style.setProperty(`--${p36}-resize-min-h`, resize.minHeight);
|
|
3951
|
+
if (resize.maxHeight) style.setProperty(`--${p36}-resize-max-h`, resize.maxHeight);
|
|
3882
3952
|
if (initialSize) {
|
|
3883
|
-
style.setProperty(`--${
|
|
3884
|
-
style.setProperty(`--${
|
|
3953
|
+
style.setProperty(`--${p36}-widget-w`, `${initialSize.width}px`);
|
|
3954
|
+
style.setProperty(`--${p36}-widget-h`, `${initialSize.height}px`);
|
|
3885
3955
|
}
|
|
3886
|
-
}, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight,
|
|
3956
|
+
}, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p36, initialSize]);
|
|
3887
3957
|
if (!panelEl) return null;
|
|
3888
3958
|
const isTop = position.startsWith("top-");
|
|
3889
3959
|
const isRight = position.endsWith("-right");
|
|
3890
|
-
const cornerClass = `${
|
|
3960
|
+
const cornerClass = `${p36}-resize-grip ${p36}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
|
|
3891
3961
|
const onPointerDown = (e) => {
|
|
3892
3962
|
if (!panelEl) return;
|
|
3893
3963
|
const target = e.currentTarget;
|
|
@@ -3912,8 +3982,8 @@ function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, stri
|
|
|
3912
3982
|
if (!d || e.pointerId !== d.pointerId || !panelEl) return;
|
|
3913
3983
|
const dx = (e.clientX - d.startX) * d.dirX;
|
|
3914
3984
|
const dy = (e.clientY - d.startY) * d.dirY;
|
|
3915
|
-
panelEl.style.setProperty(`--${
|
|
3916
|
-
panelEl.style.setProperty(`--${
|
|
3985
|
+
panelEl.style.setProperty(`--${p36}-widget-w`, `${d.startW + dx}px`);
|
|
3986
|
+
panelEl.style.setProperty(`--${p36}-widget-h`, `${d.startH + dy}px`);
|
|
3917
3987
|
};
|
|
3918
3988
|
const onPointerUp = (e) => {
|
|
3919
3989
|
const d = dragRef.current;
|
|
@@ -4650,7 +4720,7 @@ function usePopoverMenu({ itemCount, initialFocusIndex }) {
|
|
|
4650
4720
|
// src/ui/overflow-menu.tsx
|
|
4651
4721
|
import { jsx as jsx8, jsxs as jsxs6 } from "preact/jsx-runtime";
|
|
4652
4722
|
function OverflowMenu({ items, triggerLabel }) {
|
|
4653
|
-
const
|
|
4723
|
+
const p36 = BRAND.cssPrefix;
|
|
4654
4724
|
const menu = usePopoverMenu({ itemCount: items.length });
|
|
4655
4725
|
const handleSelect = (item) => {
|
|
4656
4726
|
if (item.disabled) return;
|
|
@@ -4673,13 +4743,13 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4673
4743
|
e.stopPropagation();
|
|
4674
4744
|
pickSegment(item, segs[next].value);
|
|
4675
4745
|
};
|
|
4676
|
-
return /* @__PURE__ */ jsxs6("div", { class: `${
|
|
4746
|
+
return /* @__PURE__ */ jsxs6("div", { class: `${p36}-menu-wrap`, children: [
|
|
4677
4747
|
/* @__PURE__ */ jsx8(
|
|
4678
4748
|
"button",
|
|
4679
4749
|
{
|
|
4680
4750
|
ref: menu.triggerRef,
|
|
4681
4751
|
type: "button",
|
|
4682
|
-
class: `${
|
|
4752
|
+
class: `${p36}-icon-btn`,
|
|
4683
4753
|
"aria-label": triggerLabel,
|
|
4684
4754
|
"aria-haspopup": "menu",
|
|
4685
4755
|
"aria-expanded": menu.open,
|
|
@@ -4693,7 +4763,7 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4693
4763
|
"div",
|
|
4694
4764
|
{
|
|
4695
4765
|
ref: menu.menuRef,
|
|
4696
|
-
class: `${
|
|
4766
|
+
class: `${p36}-menu`,
|
|
4697
4767
|
role: "menu",
|
|
4698
4768
|
"aria-label": triggerLabel,
|
|
4699
4769
|
onKeyDown: menu.onMenuKey,
|
|
@@ -4703,14 +4773,14 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4703
4773
|
"div",
|
|
4704
4774
|
{
|
|
4705
4775
|
role: "menuitem",
|
|
4706
|
-
class: `${
|
|
4776
|
+
class: `${p36}-menu-item ${p36}-menu-item-segmented`,
|
|
4707
4777
|
"aria-label": item.label,
|
|
4708
4778
|
tabIndex: -1,
|
|
4709
4779
|
onKeyDown: (e) => onSegmentRowKey(e, item),
|
|
4710
4780
|
children: [
|
|
4711
|
-
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4712
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4713
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4781
|
+
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
|
|
4782
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
|
|
4783
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
|
|
4714
4784
|
const active = seg.value === item.value;
|
|
4715
4785
|
return /* @__PURE__ */ jsx8(
|
|
4716
4786
|
"button",
|
|
@@ -4718,7 +4788,7 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4718
4788
|
type: "button",
|
|
4719
4789
|
role: "menuitemradio",
|
|
4720
4790
|
"aria-checked": active,
|
|
4721
|
-
class: `${
|
|
4791
|
+
class: `${p36}-segment`,
|
|
4722
4792
|
"data-on": active ? "true" : void 0,
|
|
4723
4793
|
lang: seg.lang,
|
|
4724
4794
|
title: seg.value,
|
|
@@ -4738,14 +4808,14 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4738
4808
|
{
|
|
4739
4809
|
type: "button",
|
|
4740
4810
|
role: "menuitem",
|
|
4741
|
-
class: `${
|
|
4811
|
+
class: `${p36}-menu-item`,
|
|
4742
4812
|
"aria-pressed": item.type === "switch" ? item.on : void 0,
|
|
4743
4813
|
disabled: item.disabled,
|
|
4744
4814
|
onClick: () => handleSelect(item),
|
|
4745
4815
|
children: [
|
|
4746
|
-
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4747
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4748
|
-
item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4816
|
+
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
|
|
4817
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
|
|
4818
|
+
item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
|
|
4749
4819
|
]
|
|
4750
4820
|
},
|
|
4751
4821
|
item.id
|
|
@@ -4896,7 +4966,7 @@ function HeaderActions({ panelProps, variant }) {
|
|
|
4896
4966
|
}
|
|
4897
4967
|
|
|
4898
4968
|
// src/ui/message-list.tsx
|
|
4899
|
-
import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as
|
|
4969
|
+
import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState7 } from "preact/hooks";
|
|
4900
4970
|
import { useComputed as useComputed7 } from "@preact/signals";
|
|
4901
4971
|
|
|
4902
4972
|
// src/ui/form/dynamic-form.tsx
|
|
@@ -5373,20 +5443,64 @@ function hardenLink(a) {
|
|
|
5373
5443
|
a.rel = [...tokens].join(" ");
|
|
5374
5444
|
}
|
|
5375
5445
|
|
|
5376
|
-
// src/ui/
|
|
5446
|
+
// src/ui/message-feedback.tsx
|
|
5447
|
+
import { useState as useState6 } from "preact/hooks";
|
|
5377
5448
|
import { jsx as jsx13, jsxs as jsxs10 } from "preact/jsx-runtime";
|
|
5378
5449
|
var p12 = BRAND.cssPrefix;
|
|
5450
|
+
function MessageFeedback({ messageId, initial, strings, onFeedback }) {
|
|
5451
|
+
const [value, setValue] = useState6(initial);
|
|
5452
|
+
const choose = (next) => {
|
|
5453
|
+
const resolved = value === next ? null : next;
|
|
5454
|
+
setValue(resolved);
|
|
5455
|
+
onFeedback(messageId, resolved);
|
|
5456
|
+
};
|
|
5457
|
+
return /* @__PURE__ */ jsxs10("div", { class: `${p12}-feedback`, role: "group", "data-testid": TID.messageFeedback, children: [
|
|
5458
|
+
/* @__PURE__ */ jsx13(
|
|
5459
|
+
"button",
|
|
5460
|
+
{
|
|
5461
|
+
type: "button",
|
|
5462
|
+
class: `${p12}-feedback-btn`,
|
|
5463
|
+
"data-active": value === "up" ? "true" : void 0,
|
|
5464
|
+
"aria-pressed": value === "up",
|
|
5465
|
+
"aria-label": strings.feedbackUp,
|
|
5466
|
+
title: strings.feedbackUp,
|
|
5467
|
+
onClick: () => choose("up"),
|
|
5468
|
+
"data-testid": TID.feedbackUp,
|
|
5469
|
+
children: /* @__PURE__ */ jsx13(ThumbUpIcon, {})
|
|
5470
|
+
}
|
|
5471
|
+
),
|
|
5472
|
+
/* @__PURE__ */ jsx13(
|
|
5473
|
+
"button",
|
|
5474
|
+
{
|
|
5475
|
+
type: "button",
|
|
5476
|
+
class: `${p12}-feedback-btn`,
|
|
5477
|
+
"data-active": value === "down" ? "true" : void 0,
|
|
5478
|
+
"aria-pressed": value === "down",
|
|
5479
|
+
"aria-label": strings.feedbackDown,
|
|
5480
|
+
title: strings.feedbackDown,
|
|
5481
|
+
onClick: () => choose("down"),
|
|
5482
|
+
"data-testid": TID.feedbackDown,
|
|
5483
|
+
children: /* @__PURE__ */ jsx13(ThumbDownIcon, {})
|
|
5484
|
+
}
|
|
5485
|
+
),
|
|
5486
|
+
/* @__PURE__ */ jsx13("span", { class: `${p12}-sr-only`, role: "status", "aria-live": "polite", children: value ? strings.feedbackThanks : "" })
|
|
5487
|
+
] });
|
|
5488
|
+
}
|
|
5489
|
+
|
|
5490
|
+
// src/ui/source-view.tsx
|
|
5491
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "preact/jsx-runtime";
|
|
5492
|
+
var p13 = BRAND.cssPrefix;
|
|
5379
5493
|
function SourceView({ part, strings }) {
|
|
5380
5494
|
const label = part.title || part.filename || part.url || strings.sources;
|
|
5381
5495
|
if (part.url) {
|
|
5382
|
-
return /* @__PURE__ */
|
|
5383
|
-
/* @__PURE__ */
|
|
5384
|
-
/* @__PURE__ */
|
|
5496
|
+
return /* @__PURE__ */ jsxs11("a", { class: `${p13}-source`, href: part.url, target: "_blank", rel: "noreferrer noopener", "data-testid": TID.source, children: [
|
|
5497
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-icon`, "aria-hidden": "true", children: "\u{1F517}" }),
|
|
5498
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-label`, children: label })
|
|
5385
5499
|
] });
|
|
5386
5500
|
}
|
|
5387
|
-
return /* @__PURE__ */
|
|
5388
|
-
/* @__PURE__ */
|
|
5389
|
-
/* @__PURE__ */
|
|
5501
|
+
return /* @__PURE__ */ jsxs11("span", { class: `${p13}-source`, "data-testid": TID.source, children: [
|
|
5502
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-icon`, "aria-hidden": "true", children: "\u{1F4C4}" }),
|
|
5503
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-label`, children: label })
|
|
5390
5504
|
] });
|
|
5391
5505
|
}
|
|
5392
5506
|
|
|
@@ -5395,8 +5509,8 @@ import { useComputed as useComputed3 } from "@preact/signals";
|
|
|
5395
5509
|
|
|
5396
5510
|
// src/ui/tool-card.tsx
|
|
5397
5511
|
import { useComputed as useComputed2 } from "@preact/signals";
|
|
5398
|
-
import { Fragment as Fragment2, jsx as
|
|
5399
|
-
var
|
|
5512
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
|
|
5513
|
+
var p14 = BRAND.cssPrefix;
|
|
5400
5514
|
function toolName(raw) {
|
|
5401
5515
|
if (raw.startsWith("tool:")) return raw.slice(5);
|
|
5402
5516
|
if (raw.startsWith("tool-")) return raw.slice(5);
|
|
@@ -5416,9 +5530,9 @@ function statusOf(state, approval) {
|
|
|
5416
5530
|
return "running";
|
|
5417
5531
|
}
|
|
5418
5532
|
function StatusIcon({ status }) {
|
|
5419
|
-
if (status === "denied" || status === "error" || status === "superseded") return /* @__PURE__ */
|
|
5420
|
-
if (status === "completed" || status === "responded") return /* @__PURE__ */
|
|
5421
|
-
return /* @__PURE__ */
|
|
5533
|
+
if (status === "denied" || status === "error" || status === "superseded") return /* @__PURE__ */ jsx15(XCircleIcon, {});
|
|
5534
|
+
if (status === "completed" || status === "responded") return /* @__PURE__ */ jsx15(CheckCircleIcon, {});
|
|
5535
|
+
return /* @__PURE__ */ jsx15(ClockIcon, {});
|
|
5422
5536
|
}
|
|
5423
5537
|
function statusLabel(status, strings) {
|
|
5424
5538
|
switch (status) {
|
|
@@ -5446,8 +5560,8 @@ function ToolStatus({
|
|
|
5446
5560
|
}) {
|
|
5447
5561
|
const base = statusOf(state, approval);
|
|
5448
5562
|
const status = superseded && (base === "awaiting" || base === "running") ? "superseded" : base;
|
|
5449
|
-
return /* @__PURE__ */
|
|
5450
|
-
/* @__PURE__ */
|
|
5563
|
+
return /* @__PURE__ */ jsxs12("span", { class: `${p14}-toolui-badge ${p14}-toolui-status`, "data-status": status, children: [
|
|
5564
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-status-icon`, children: /* @__PURE__ */ jsx15(StatusIcon, { status }) }),
|
|
5451
5565
|
statusLabel(status, strings)
|
|
5452
5566
|
] });
|
|
5453
5567
|
}
|
|
@@ -5458,11 +5572,11 @@ function ToolHeaderRow({
|
|
|
5458
5572
|
strings,
|
|
5459
5573
|
superseded
|
|
5460
5574
|
}) {
|
|
5461
|
-
return /* @__PURE__ */
|
|
5462
|
-
/* @__PURE__ */
|
|
5463
|
-
/* @__PURE__ */
|
|
5464
|
-
/* @__PURE__ */
|
|
5465
|
-
/* @__PURE__ */
|
|
5575
|
+
return /* @__PURE__ */ jsxs12(Fragment2, { children: [
|
|
5576
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-wrench`, children: /* @__PURE__ */ jsx15(WrenchIcon, {}) }),
|
|
5577
|
+
/* @__PURE__ */ jsx15("strong", { class: `${p14}-toolui-title`, children: name }),
|
|
5578
|
+
/* @__PURE__ */ jsx15(ToolStatus, { state, approval, strings, superseded }),
|
|
5579
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-chevron`, children: /* @__PURE__ */ jsx15(ChevronDownIcon, {}) })
|
|
5466
5580
|
] });
|
|
5467
5581
|
}
|
|
5468
5582
|
function ToolCollapsibleCard({
|
|
@@ -5476,8 +5590,8 @@ function ToolCollapsibleCard({
|
|
|
5476
5590
|
const error = useComputed2(() => part.errorSig.value);
|
|
5477
5591
|
const state = useComputed2(() => part.stateSig.value);
|
|
5478
5592
|
const approval = useComputed2(() => part.approvalSig.value);
|
|
5479
|
-
return /* @__PURE__ */
|
|
5480
|
-
/* @__PURE__ */
|
|
5593
|
+
return /* @__PURE__ */ jsxs12("details", { class: `${p14}-toolui ${p14}-toolui-collapsible`, "data-testid": testid, children: [
|
|
5594
|
+
/* @__PURE__ */ jsx15("summary", { class: `${p14}-toolui-head`, children: /* @__PURE__ */ jsx15(
|
|
5481
5595
|
ToolHeaderRow,
|
|
5482
5596
|
{
|
|
5483
5597
|
name: toolName(part.toolName),
|
|
@@ -5487,17 +5601,17 @@ function ToolCollapsibleCard({
|
|
|
5487
5601
|
superseded
|
|
5488
5602
|
}
|
|
5489
5603
|
) }),
|
|
5490
|
-
/* @__PURE__ */
|
|
5491
|
-
output.value !== void 0 ? /* @__PURE__ */
|
|
5492
|
-
error.value ? /* @__PURE__ */
|
|
5604
|
+
/* @__PURE__ */ jsx15(ToolSection, { label: strings.toolParameters, value: input.value }),
|
|
5605
|
+
output.value !== void 0 ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.toolResult, value: output.value }) : null,
|
|
5606
|
+
error.value ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
|
|
5493
5607
|
] });
|
|
5494
5608
|
}
|
|
5495
5609
|
function ToolSection({ label, value, error }) {
|
|
5496
5610
|
const text = error ? String(value ?? "") : pretty(unwrapResult(value));
|
|
5497
5611
|
if (!text) return null;
|
|
5498
|
-
return /* @__PURE__ */
|
|
5499
|
-
/* @__PURE__ */
|
|
5500
|
-
/* @__PURE__ */
|
|
5612
|
+
return /* @__PURE__ */ jsxs12("div", { class: `${p14}-toolui-section`, children: [
|
|
5613
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-label`, children: label }),
|
|
5614
|
+
/* @__PURE__ */ jsx15("pre", { class: `${p14}-toolui-code`, "data-error": error ? "true" : void 0, children: text })
|
|
5501
5615
|
] });
|
|
5502
5616
|
}
|
|
5503
5617
|
function unwrapResult(output) {
|
|
@@ -5519,8 +5633,8 @@ function pretty(value) {
|
|
|
5519
5633
|
}
|
|
5520
5634
|
|
|
5521
5635
|
// src/ui/tool-approval.tsx
|
|
5522
|
-
import { Fragment as Fragment3, jsx as
|
|
5523
|
-
var
|
|
5636
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
|
|
5637
|
+
var p15 = BRAND.cssPrefix;
|
|
5524
5638
|
function ToolApproval({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5525
5639
|
const approval = useComputed3(() => part.approvalSig.value);
|
|
5526
5640
|
const state = useComputed3(() => part.stateSig.value);
|
|
@@ -5530,50 +5644,50 @@ function ToolApproval({ part, strings, active, superseded = false, onDecision, o
|
|
|
5530
5644
|
const editable = responded && active && !terminal;
|
|
5531
5645
|
const skipped = superseded && !decided;
|
|
5532
5646
|
const id = part.toolCallId;
|
|
5533
|
-
return /* @__PURE__ */
|
|
5534
|
-
/* @__PURE__ */
|
|
5535
|
-
skipped || terminal ? null : /* @__PURE__ */
|
|
5647
|
+
return /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui-group`, "data-testid": decided ? TID.toolDecision : TID.toolApproval, children: [
|
|
5648
|
+
/* @__PURE__ */ jsx16(ToolCollapsibleCard, { part, strings, superseded: skipped }),
|
|
5649
|
+
skipped || terminal ? null : /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui ${p15}-toolui-body`, children: [
|
|
5536
5650
|
responded ? (
|
|
5537
5651
|
// DECIDED — lead with the recorded response (no repeated prompt/body), so the card barely
|
|
5538
5652
|
// changes height from the awaiting state and the Edit sits right under the edit hint.
|
|
5539
|
-
/* @__PURE__ */
|
|
5540
|
-
/* @__PURE__ */
|
|
5653
|
+
/* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
5654
|
+
/* @__PURE__ */ jsxs13("p", { class: `${p15}-toolui-prompt`, children: [
|
|
5541
5655
|
strings.approvalYourResponse.replace("{decision}", approved ? strings.approve : strings.reject),
|
|
5542
5656
|
approval.value?.reason ? ` \u2014 ${approval.value.reason}` : ""
|
|
5543
5657
|
] }),
|
|
5544
|
-
editable ? /* @__PURE__ */
|
|
5545
|
-
!editable && !terminal ? /* @__PURE__ */
|
|
5658
|
+
editable ? /* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalEditHint }) : null,
|
|
5659
|
+
!editable && !terminal ? /* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalSubmitting }) : null
|
|
5546
5660
|
] })
|
|
5547
5661
|
) : (
|
|
5548
5662
|
// AWAITING — the prompt + what to do, then Reject / Approve.
|
|
5549
|
-
/* @__PURE__ */
|
|
5550
|
-
/* @__PURE__ */
|
|
5551
|
-
/* @__PURE__ */
|
|
5663
|
+
/* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
5664
|
+
/* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-prompt`, children: strings.approvalPrompt.replace("{tool}", name) }),
|
|
5665
|
+
/* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalBody })
|
|
5552
5666
|
] })
|
|
5553
5667
|
),
|
|
5554
|
-
!decided && active ? /* @__PURE__ */
|
|
5555
|
-
/* @__PURE__ */
|
|
5668
|
+
!decided && active ? /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui-actions`, children: [
|
|
5669
|
+
/* @__PURE__ */ jsx16(
|
|
5556
5670
|
"button",
|
|
5557
5671
|
{
|
|
5558
5672
|
type: "button",
|
|
5559
|
-
class: `${
|
|
5673
|
+
class: `${p15}-form-skip`,
|
|
5560
5674
|
onClick: () => onDecision(id, false),
|
|
5561
5675
|
"data-testid": TID.toolReject,
|
|
5562
5676
|
children: strings.reject
|
|
5563
5677
|
}
|
|
5564
5678
|
),
|
|
5565
|
-
/* @__PURE__ */
|
|
5679
|
+
/* @__PURE__ */ jsx16(
|
|
5566
5680
|
"button",
|
|
5567
5681
|
{
|
|
5568
5682
|
type: "button",
|
|
5569
|
-
class: `${
|
|
5683
|
+
class: `${p15}-form-submit`,
|
|
5570
5684
|
onClick: () => onDecision(id, true),
|
|
5571
5685
|
"data-testid": TID.toolApprove,
|
|
5572
5686
|
children: strings.approve
|
|
5573
5687
|
}
|
|
5574
5688
|
)
|
|
5575
5689
|
] }) : null,
|
|
5576
|
-
editable ? /* @__PURE__ */
|
|
5690
|
+
editable ? /* @__PURE__ */ jsx16("div", { class: `${p15}-toolui-actions`, children: /* @__PURE__ */ jsx16("button", { type: "button", class: `${p15}-form-skip`, onClick: () => onEdit(id), "data-testid": TID.toolEdit, children: strings.edit }) }) : null
|
|
5577
5691
|
] })
|
|
5578
5692
|
] });
|
|
5579
5693
|
}
|
|
@@ -5648,8 +5762,8 @@ function str(v) {
|
|
|
5648
5762
|
}
|
|
5649
5763
|
|
|
5650
5764
|
// src/ui/tool-ask-questions.tsx
|
|
5651
|
-
import { Fragment as Fragment4, jsx as
|
|
5652
|
-
var
|
|
5765
|
+
import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
|
|
5766
|
+
var p16 = BRAND.cssPrefix;
|
|
5653
5767
|
function ToolAskQuestions({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5654
5768
|
const state = useComputed4(() => part.stateSig.value);
|
|
5655
5769
|
const approval = useComputed4(() => part.approvalSig.value);
|
|
@@ -5658,16 +5772,16 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5658
5772
|
const req = request.value;
|
|
5659
5773
|
if (decided) {
|
|
5660
5774
|
const editable = responded && active && !terminal;
|
|
5661
|
-
return /* @__PURE__ */
|
|
5775
|
+
return /* @__PURE__ */ jsx17(DecidedCard, { part, strings, req, editable, onEdit: () => onEdit(part.toolCallId) });
|
|
5662
5776
|
}
|
|
5663
5777
|
const stale = superseded;
|
|
5664
|
-
return /* @__PURE__ */
|
|
5665
|
-
/* @__PURE__ */
|
|
5666
|
-
/* @__PURE__ */
|
|
5667
|
-
/* @__PURE__ */
|
|
5668
|
-
] }) : /* @__PURE__ */
|
|
5669
|
-
req.intro ? /* @__PURE__ */
|
|
5670
|
-
stale ? null : /* @__PURE__ */
|
|
5778
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui${stale ? ` ${p16}-toolui-stale` : ""}`, "data-testid": TID.toolAskQuestions, children: [
|
|
5779
|
+
/* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-head`, children: stale ? /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
5780
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputBadge }),
|
|
5781
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-muted`, children: strings.statusSuperseded })
|
|
5782
|
+
] }) : /* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputRequired }) }),
|
|
5783
|
+
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5784
|
+
stale ? null : /* @__PURE__ */ jsx17(
|
|
5671
5785
|
AskBody,
|
|
5672
5786
|
{
|
|
5673
5787
|
req,
|
|
@@ -5684,7 +5798,7 @@ function AskBody({
|
|
|
5684
5798
|
}) {
|
|
5685
5799
|
const fields = askQuestionsToFields(req, strings.confirmYes, strings.confirmNo);
|
|
5686
5800
|
const loneTextarea = req.questions.length === 1 && req.questions[0]?.type === "text";
|
|
5687
|
-
return /* @__PURE__ */
|
|
5801
|
+
return /* @__PURE__ */ jsx17(
|
|
5688
5802
|
DynamicForm,
|
|
5689
5803
|
{
|
|
5690
5804
|
fields,
|
|
@@ -5719,20 +5833,20 @@ function DecidedCard({
|
|
|
5719
5833
|
const approval = useComputed4(() => part.approvalSig.value);
|
|
5720
5834
|
const skipped = approval.value?.approved === false;
|
|
5721
5835
|
const answers = approval.value?.approved ? parseAnswers(approval.value.reason) : {};
|
|
5722
|
-
return /* @__PURE__ */
|
|
5723
|
-
/* @__PURE__ */
|
|
5724
|
-
/* @__PURE__ */
|
|
5725
|
-
/* @__PURE__ */
|
|
5836
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui`, "data-testid": TID.toolDecision, children: [
|
|
5837
|
+
/* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui-head`, children: [
|
|
5838
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputBadge }),
|
|
5839
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge`, children: skipped ? strings.inputSkipped : strings.inputAnswered })
|
|
5726
5840
|
] }),
|
|
5727
|
-
req.intro ? /* @__PURE__ */
|
|
5841
|
+
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5728
5842
|
req.questions.map((q) => {
|
|
5729
5843
|
const text = skipped ? "" : answers[q.key] ?? "";
|
|
5730
|
-
return /* @__PURE__ */
|
|
5731
|
-
/* @__PURE__ */
|
|
5732
|
-
text ? /* @__PURE__ */
|
|
5844
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui-section`, children: [
|
|
5845
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-label`, children: q.question }),
|
|
5846
|
+
text ? /* @__PURE__ */ jsx17("p", { class: `${p16}-toolui-text`, children: text }) : null
|
|
5733
5847
|
] }, q.key);
|
|
5734
5848
|
}),
|
|
5735
|
-
editable ? /* @__PURE__ */
|
|
5849
|
+
editable ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-actions`, children: /* @__PURE__ */ jsx17("button", { type: "button", class: `${p16}-form-skip`, onClick: onEdit, "data-testid": TID.toolEdit, children: strings.edit }) }) : null
|
|
5736
5850
|
] });
|
|
5737
5851
|
}
|
|
5738
5852
|
function parseAnswers(reason) {
|
|
@@ -5758,19 +5872,19 @@ function parseAnswers(reason) {
|
|
|
5758
5872
|
|
|
5759
5873
|
// src/ui/tool-call.tsx
|
|
5760
5874
|
import { useComputed as useComputed5 } from "@preact/signals";
|
|
5761
|
-
import { jsx as
|
|
5875
|
+
import { jsx as jsx18 } from "preact/jsx-runtime";
|
|
5762
5876
|
function ToolCall({ part, strings }) {
|
|
5763
5877
|
const input = useComputed5(() => part.inputSig.value);
|
|
5764
5878
|
const output = useComputed5(() => part.outputSig.value);
|
|
5765
5879
|
const error = useComputed5(() => part.errorSig.value);
|
|
5766
5880
|
const hasDetails = useComputed5(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
|
|
5767
5881
|
if (!hasDetails.value) return null;
|
|
5768
|
-
return /* @__PURE__ */
|
|
5882
|
+
return /* @__PURE__ */ jsx18(ToolCollapsibleCard, { part, strings, testid: TID.toolCall });
|
|
5769
5883
|
}
|
|
5770
5884
|
|
|
5771
5885
|
// src/ui/message-bubble.tsx
|
|
5772
|
-
import { jsx as
|
|
5773
|
-
var
|
|
5886
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "preact/jsx-runtime";
|
|
5887
|
+
var p17 = BRAND.cssPrefix;
|
|
5774
5888
|
function MessageBubble({
|
|
5775
5889
|
message,
|
|
5776
5890
|
strings,
|
|
@@ -5781,7 +5895,9 @@ function MessageBubble({
|
|
|
5781
5895
|
interactive = false,
|
|
5782
5896
|
superseded = false,
|
|
5783
5897
|
tool,
|
|
5784
|
-
onRetry
|
|
5898
|
+
onRetry,
|
|
5899
|
+
enableMessageFeedback = false,
|
|
5900
|
+
onFeedback
|
|
5785
5901
|
}) {
|
|
5786
5902
|
const parts = useComputed6(() => message.partsSig.value);
|
|
5787
5903
|
const partList = parts.value;
|
|
@@ -5808,31 +5924,50 @@ function MessageBubble({
|
|
|
5808
5924
|
const showStreamDots = streaming && !bufferedHold && !(reasoningVisible.value && working);
|
|
5809
5925
|
if (hideCanceledHusk.value) return null;
|
|
5810
5926
|
const stamp = formatStamp(message.createdAt);
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5927
|
+
const showFeedback = enableMessageFeedback && !!onFeedback && !!message.serverMessageId && message.role === "assistant" && !streaming && message.status !== "error" && !emptyReply.value;
|
|
5928
|
+
return /* @__PURE__ */ jsx19(
|
|
5929
|
+
"div",
|
|
5930
|
+
{
|
|
5931
|
+
class: `${p17}-bubble-row`,
|
|
5932
|
+
"data-role": message.role,
|
|
5933
|
+
"data-mid": message.serverMessageId ?? message.id,
|
|
5934
|
+
"data-testid": tid(TID.messageBubble, message.id),
|
|
5935
|
+
children: /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-col`, children: [
|
|
5936
|
+
/* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble`, children: [
|
|
5937
|
+
bufferedHold ? /* @__PURE__ */ jsx19(LoadingSpinner, { label: strings.loading }) : partList.map((part, index) => /* @__PURE__ */ jsx19(
|
|
5938
|
+
PartView,
|
|
5939
|
+
{
|
|
5940
|
+
part,
|
|
5941
|
+
active: working,
|
|
5942
|
+
strings,
|
|
5943
|
+
showReasoning,
|
|
5944
|
+
showToolCalls,
|
|
5945
|
+
showSources,
|
|
5946
|
+
interactive: interactive && (part.kind !== "tool" || index > lastOutputIdx.value),
|
|
5947
|
+
superseded,
|
|
5948
|
+
tool
|
|
5949
|
+
},
|
|
5950
|
+
partKey(part)
|
|
5951
|
+
)),
|
|
5952
|
+
showStreamDots && /* @__PURE__ */ jsx19(TypingDots, {}),
|
|
5953
|
+
message.status === "error" && message.errorText || emptyReply.value ? /* @__PURE__ */ jsxs15("div", { class: `${p17}-error`, role: "alert", children: [
|
|
5954
|
+
/* @__PURE__ */ jsx19("span", { children: message.errorText ?? strings.errorGeneric }),
|
|
5955
|
+
onRetry ? /* @__PURE__ */ jsx19("button", { type: "button", class: `${p17}-error-retry`, onClick: onRetry, "data-testid": TID.messageRetry, children: strings.errorRetry }) : null
|
|
5956
|
+
] }) : null
|
|
5957
|
+
] }),
|
|
5958
|
+
stamp ? /* @__PURE__ */ jsx19("time", { class: `${p17}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null,
|
|
5959
|
+
showFeedback && message.serverMessageId ? /* @__PURE__ */ jsx19(
|
|
5960
|
+
MessageFeedback,
|
|
5961
|
+
{
|
|
5962
|
+
messageId: message.serverMessageId,
|
|
5963
|
+
initial: message.feedback ?? null,
|
|
5964
|
+
strings,
|
|
5965
|
+
onFeedback
|
|
5966
|
+
}
|
|
5967
|
+
) : null
|
|
5968
|
+
] })
|
|
5969
|
+
}
|
|
5970
|
+
);
|
|
5836
5971
|
}
|
|
5837
5972
|
function formatStamp(createdAt) {
|
|
5838
5973
|
if (typeof createdAt !== "number" || !Number.isFinite(createdAt)) return null;
|
|
@@ -5862,11 +5997,11 @@ function PartView({
|
|
|
5862
5997
|
case "step-start":
|
|
5863
5998
|
return null;
|
|
5864
5999
|
case "text":
|
|
5865
|
-
return /* @__PURE__ */
|
|
6000
|
+
return /* @__PURE__ */ jsx19(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig });
|
|
5866
6001
|
case "reasoning":
|
|
5867
|
-
return showReasoning ? /* @__PURE__ */
|
|
6002
|
+
return showReasoning ? /* @__PURE__ */ jsx19(ReasoningView, { part, active, strings }) : null;
|
|
5868
6003
|
case "tool":
|
|
5869
|
-
return /* @__PURE__ */
|
|
6004
|
+
return /* @__PURE__ */ jsx19(
|
|
5870
6005
|
ToolPartView,
|
|
5871
6006
|
{
|
|
5872
6007
|
part,
|
|
@@ -5879,11 +6014,11 @@ function PartView({
|
|
|
5879
6014
|
);
|
|
5880
6015
|
case "file":
|
|
5881
6016
|
if (part.mediaType.startsWith("image/")) {
|
|
5882
|
-
return /* @__PURE__ */
|
|
6017
|
+
return /* @__PURE__ */ jsx19("img", { src: part.url, alt: "", loading: "lazy" });
|
|
5883
6018
|
}
|
|
5884
|
-
return /* @__PURE__ */
|
|
6019
|
+
return /* @__PURE__ */ jsx19("a", { href: part.url, target: "_blank", rel: "noreferrer noopener", children: part.url });
|
|
5885
6020
|
case "source":
|
|
5886
|
-
return showSources ? /* @__PURE__ */
|
|
6021
|
+
return showSources ? /* @__PURE__ */ jsx19(SourceView, { part, strings }) : null;
|
|
5887
6022
|
}
|
|
5888
6023
|
}
|
|
5889
6024
|
function ToolPartView({
|
|
@@ -5897,7 +6032,7 @@ function ToolPartView({
|
|
|
5897
6032
|
const hasApproval = useComputed6(() => part.approvalSig.value !== void 0);
|
|
5898
6033
|
if (tool?.humanInLoop) {
|
|
5899
6034
|
if (isAskUserQuestionsTool(part.toolName)) {
|
|
5900
|
-
return /* @__PURE__ */
|
|
6035
|
+
return /* @__PURE__ */ jsx19(
|
|
5901
6036
|
ToolAskQuestions,
|
|
5902
6037
|
{
|
|
5903
6038
|
part,
|
|
@@ -5910,7 +6045,7 @@ function ToolPartView({
|
|
|
5910
6045
|
);
|
|
5911
6046
|
}
|
|
5912
6047
|
if (hasApproval.value) {
|
|
5913
|
-
return /* @__PURE__ */
|
|
6048
|
+
return /* @__PURE__ */ jsx19(
|
|
5914
6049
|
ToolApproval,
|
|
5915
6050
|
{
|
|
5916
6051
|
part,
|
|
@@ -5923,16 +6058,16 @@ function ToolPartView({
|
|
|
5923
6058
|
);
|
|
5924
6059
|
}
|
|
5925
6060
|
}
|
|
5926
|
-
return showToolCalls ? /* @__PURE__ */
|
|
6061
|
+
return showToolCalls ? /* @__PURE__ */ jsx19(ToolCall, { part, strings }) : null;
|
|
5927
6062
|
}
|
|
5928
6063
|
function ReasoningView({
|
|
5929
6064
|
part,
|
|
5930
6065
|
active,
|
|
5931
6066
|
strings
|
|
5932
6067
|
}) {
|
|
5933
|
-
return /* @__PURE__ */
|
|
5934
|
-
/* @__PURE__ */
|
|
5935
|
-
/* @__PURE__ */
|
|
6068
|
+
return /* @__PURE__ */ jsxs15("details", { class: `${p17}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
|
|
6069
|
+
/* @__PURE__ */ jsx19("summary", { class: `${p17}-reasoning-summary`, children: /* @__PURE__ */ jsx19("span", { class: `${p17}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
|
|
6070
|
+
/* @__PURE__ */ jsx19("div", { class: `${p17}-reasoning-body`, children: /* @__PURE__ */ jsx19(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
|
|
5936
6071
|
] });
|
|
5937
6072
|
}
|
|
5938
6073
|
function partKey(part) {
|
|
@@ -5950,24 +6085,26 @@ function partKey(part) {
|
|
|
5950
6085
|
}
|
|
5951
6086
|
}
|
|
5952
6087
|
function TypingDots() {
|
|
5953
|
-
return /* @__PURE__ */
|
|
5954
|
-
/* @__PURE__ */
|
|
5955
|
-
/* @__PURE__ */
|
|
5956
|
-
/* @__PURE__ */
|
|
6088
|
+
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-typing`, "aria-hidden": "true", children: [
|
|
6089
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6090
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6091
|
+
/* @__PURE__ */ jsx19("span", {})
|
|
5957
6092
|
] });
|
|
5958
6093
|
}
|
|
5959
6094
|
function LoadingSpinner({ label }) {
|
|
5960
|
-
return /* @__PURE__ */
|
|
5961
|
-
/* @__PURE__ */
|
|
5962
|
-
/* @__PURE__ */
|
|
6095
|
+
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-loading`, role: "status", children: [
|
|
6096
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-spinner`, "aria-hidden": "true" }),
|
|
6097
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-label`, children: label })
|
|
5963
6098
|
] });
|
|
5964
6099
|
}
|
|
5965
6100
|
|
|
5966
6101
|
// src/ui/message-list.tsx
|
|
5967
|
-
import { jsx as
|
|
5968
|
-
var
|
|
6102
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "preact/jsx-runtime";
|
|
6103
|
+
var p18 = BRAND.cssPrefix;
|
|
5969
6104
|
var STICK_THRESHOLD = 120;
|
|
5970
6105
|
var INTERACTION_GRACE_MS = 350;
|
|
6106
|
+
var TURN_TOP_PAD = 12;
|
|
6107
|
+
var TURN_GAP = 8;
|
|
5971
6108
|
function MessageList({
|
|
5972
6109
|
messagesSig,
|
|
5973
6110
|
strings,
|
|
@@ -5975,6 +6112,11 @@ function MessageList({
|
|
|
5975
6112
|
showReasoning,
|
|
5976
6113
|
showToolCalls,
|
|
5977
6114
|
showSources,
|
|
6115
|
+
scrollFade,
|
|
6116
|
+
scrollAnchor,
|
|
6117
|
+
enableMessageFeedback,
|
|
6118
|
+
onFeedback,
|
|
6119
|
+
onMessageSeen,
|
|
5978
6120
|
loading,
|
|
5979
6121
|
idle,
|
|
5980
6122
|
tool,
|
|
@@ -5985,16 +6127,39 @@ function MessageList({
|
|
|
5985
6127
|
}) {
|
|
5986
6128
|
const ref = useRef5(null);
|
|
5987
6129
|
const messages = useComputed7(() => messagesSig.value);
|
|
5988
|
-
const [showJump, setShowJump] =
|
|
6130
|
+
const [showJump, setShowJump] = useState7(false);
|
|
6131
|
+
const spacerRef = useRef5(null);
|
|
6132
|
+
const seenRef = useRef5(/* @__PURE__ */ new Set());
|
|
6133
|
+
const firedSeenRef = useRef5(/* @__PURE__ */ new Set());
|
|
6134
|
+
const [newCount, setNewCount] = useState7(0);
|
|
5989
6135
|
const hasHydratedRef = useRef5(false);
|
|
5990
6136
|
const detachedRef = useRef5(false);
|
|
5991
6137
|
const interactingRef = useRef5(false);
|
|
5992
6138
|
const interactionEndedAtRef = useRef5(0);
|
|
5993
6139
|
const inInteractionGrace = () => interactingRef.current || performance.now() - interactionEndedAtRef.current < INTERACTION_GRACE_MS;
|
|
5994
6140
|
const autoPinAtRef = useRef5(0);
|
|
6141
|
+
const key = (m) => m.serverMessageId ?? m.id;
|
|
6142
|
+
const syncFade = (el) => {
|
|
6143
|
+
if (!scrollFade) return;
|
|
6144
|
+
const overflowing = el.scrollHeight - el.clientHeight > 1;
|
|
6145
|
+
el.dataset.fadeTop = overflowing && el.scrollTop > 1 ? "true" : "false";
|
|
6146
|
+
el.dataset.fadeBottom = overflowing && el.scrollHeight - el.scrollTop - el.clientHeight > 1 ? "true" : "false";
|
|
6147
|
+
};
|
|
6148
|
+
const syncJump = (el) => setShowJump(el.scrollHeight - el.scrollTop - el.clientHeight > STICK_THRESHOLD * 2);
|
|
6149
|
+
const recomputeNewCount = (el) => {
|
|
6150
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight <= STICK_THRESHOLD * 2) return setNewCount(0);
|
|
6151
|
+
let n = 0;
|
|
6152
|
+
for (const m of messages.value) if (m.role === "assistant" && !seenRef.current.has(key(m))) n++;
|
|
6153
|
+
setNewCount(n);
|
|
6154
|
+
};
|
|
6155
|
+
const markAllSeen = () => {
|
|
6156
|
+
for (const m of messages.value) if (m.role === "assistant") seenRef.current.add(key(m));
|
|
6157
|
+
setNewCount(0);
|
|
6158
|
+
};
|
|
5995
6159
|
const pinBottom = (el) => {
|
|
5996
6160
|
autoPinAtRef.current = performance.now();
|
|
5997
6161
|
el.scrollTop = el.scrollHeight;
|
|
6162
|
+
syncFade(el);
|
|
5998
6163
|
};
|
|
5999
6164
|
const pinBottomSoon = (el, frames) => {
|
|
6000
6165
|
pinBottom(el);
|
|
@@ -6031,13 +6196,50 @@ function MessageList({
|
|
|
6031
6196
|
timerId = setTimeout(stop, ms);
|
|
6032
6197
|
return stop;
|
|
6033
6198
|
};
|
|
6199
|
+
const rowTop = (el, row) => row.getBoundingClientRect().top - el.getBoundingClientRect().top + el.scrollTop;
|
|
6200
|
+
const lastUserRow = (el) => {
|
|
6201
|
+
const users = el.querySelectorAll(`.${p18}-bubble-row[data-role="user"]`);
|
|
6202
|
+
return users[users.length - 1];
|
|
6203
|
+
};
|
|
6204
|
+
const updateTurnSpacer = (el) => {
|
|
6205
|
+
const sp = spacerRef.current;
|
|
6206
|
+
if (!sp) return;
|
|
6207
|
+
const lastUser = scrollAnchor === "turn" ? lastUserRow(el) : void 0;
|
|
6208
|
+
if (!lastUser) {
|
|
6209
|
+
sp.style.minBlockSize = "0px";
|
|
6210
|
+
return;
|
|
6211
|
+
}
|
|
6212
|
+
const turnHeight = el.scrollHeight - rowTop(el, lastUser) - sp.offsetHeight;
|
|
6213
|
+
sp.style.minBlockSize = `${Math.max(0, el.clientHeight - turnHeight - TURN_GAP)}px`;
|
|
6214
|
+
};
|
|
6215
|
+
const anchorTurnToTop = (el) => {
|
|
6216
|
+
const lastUser = lastUserRow(el);
|
|
6217
|
+
if (!lastUser) return;
|
|
6218
|
+
updateTurnSpacer(el);
|
|
6219
|
+
autoPinAtRef.current = performance.now();
|
|
6220
|
+
el.scrollTop = Math.max(0, rowTop(el, lastUser) - TURN_TOP_PAD);
|
|
6221
|
+
syncFade(el);
|
|
6222
|
+
};
|
|
6223
|
+
const anchorTurnSoon = (el, frames) => {
|
|
6224
|
+
anchorTurnToTop(el);
|
|
6225
|
+
let left = frames;
|
|
6226
|
+
let raf = 0;
|
|
6227
|
+
const tick = () => {
|
|
6228
|
+
anchorTurnToTop(el);
|
|
6229
|
+
if (--left > 0) raf = requestAnimationFrame(tick);
|
|
6230
|
+
};
|
|
6231
|
+
if (frames > 0) raf = requestAnimationFrame(tick);
|
|
6232
|
+
return () => cancelAnimationFrame(raf);
|
|
6233
|
+
};
|
|
6034
6234
|
const firstMessageId = messages.value[0]?.id;
|
|
6035
6235
|
useLayoutEffect2(() => {
|
|
6036
6236
|
const el = ref.current;
|
|
6037
6237
|
if (!el) return;
|
|
6038
6238
|
if (messages.value.length === 0) return;
|
|
6039
6239
|
hasHydratedRef.current = true;
|
|
6240
|
+
for (const m of messages.value) if (m.role === "assistant") seenRef.current.add(key(m));
|
|
6040
6241
|
if (!messages.value.some((m) => m.role === "user")) return;
|
|
6242
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6041
6243
|
return pinBottomThroughLayout(el, 300);
|
|
6042
6244
|
}, [firstMessageId]);
|
|
6043
6245
|
const prevLengthRef = useRef5(0);
|
|
@@ -6050,10 +6252,17 @@ function MessageList({
|
|
|
6050
6252
|
if (!hasHydratedRef.current) return;
|
|
6051
6253
|
if (list.slice(prevLength).some((m) => m.role === "user")) {
|
|
6052
6254
|
detachedRef.current = false;
|
|
6255
|
+
setNewCount(0);
|
|
6256
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6053
6257
|
return pinBottomSoon(el, 3);
|
|
6054
6258
|
}
|
|
6055
6259
|
if (!list.some((m) => m.role === "user")) return;
|
|
6056
|
-
if (
|
|
6260
|
+
if (scrollAnchor === "turn") {
|
|
6261
|
+
updateTurnSpacer(el);
|
|
6262
|
+
recomputeNewCount(el);
|
|
6263
|
+
return;
|
|
6264
|
+
}
|
|
6265
|
+
if (detachedRef.current || inInteractionGrace()) return recomputeNewCount(el);
|
|
6057
6266
|
const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
6058
6267
|
if (distanceFromBottom < STICK_THRESHOLD) pinBottom(el);
|
|
6059
6268
|
}, [messages.value.length]);
|
|
@@ -6067,6 +6276,7 @@ function MessageList({
|
|
|
6067
6276
|
if (!hasHydratedRef.current) return;
|
|
6068
6277
|
if (!last || last.id !== prevLastId || last.status !== "streaming") return;
|
|
6069
6278
|
detachedRef.current = false;
|
|
6279
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6070
6280
|
return pinBottomSoon(el, 3);
|
|
6071
6281
|
}, [messages.value]);
|
|
6072
6282
|
useEffect7(() => {
|
|
@@ -6075,6 +6285,19 @@ function MessageList({
|
|
|
6075
6285
|
const last = messages.value.at(-1);
|
|
6076
6286
|
if (!last) return;
|
|
6077
6287
|
if (last.status !== "streaming" && !messages.value.some((m) => m.role === "user")) return;
|
|
6288
|
+
if (scrollAnchor === "turn") {
|
|
6289
|
+
const sync = () => {
|
|
6290
|
+
updateTurnSpacer(el);
|
|
6291
|
+
syncFade(el);
|
|
6292
|
+
syncJump(el);
|
|
6293
|
+
recomputeNewCount(el);
|
|
6294
|
+
};
|
|
6295
|
+
sync();
|
|
6296
|
+
if (last.status !== "streaming") return;
|
|
6297
|
+
const obs2 = new MutationObserver(sync);
|
|
6298
|
+
obs2.observe(el, { childList: true, subtree: true, characterData: true });
|
|
6299
|
+
return () => obs2.disconnect();
|
|
6300
|
+
}
|
|
6078
6301
|
const pinIfNear = () => {
|
|
6079
6302
|
if (detachedRef.current || inInteractionGrace()) return;
|
|
6080
6303
|
const distance = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
@@ -6103,9 +6326,11 @@ function MessageList({
|
|
|
6103
6326
|
useEffect7(() => {
|
|
6104
6327
|
const el = ref.current;
|
|
6105
6328
|
if (!el) return;
|
|
6106
|
-
const syncJump = () => setShowJump(el.scrollHeight - el.scrollTop - el.clientHeight > STICK_THRESHOLD * 2);
|
|
6107
6329
|
const onScroll = () => {
|
|
6108
|
-
syncJump();
|
|
6330
|
+
syncJump(el);
|
|
6331
|
+
syncFade(el);
|
|
6332
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight <= 8) markAllSeen();
|
|
6333
|
+
else recomputeNewCount(el);
|
|
6109
6334
|
if (performance.now() - autoPinAtRef.current > 150) {
|
|
6110
6335
|
detachedRef.current = el.scrollHeight - el.scrollTop - el.clientHeight > 8;
|
|
6111
6336
|
}
|
|
@@ -6141,7 +6366,7 @@ function MessageList({
|
|
|
6141
6366
|
el.addEventListener("pointerdown", onPointerDown, { passive: true });
|
|
6142
6367
|
window.addEventListener("pointerup", endInteraction, { passive: true });
|
|
6143
6368
|
window.addEventListener("pointercancel", endInteraction, { passive: true });
|
|
6144
|
-
syncJump();
|
|
6369
|
+
syncJump(el);
|
|
6145
6370
|
return () => {
|
|
6146
6371
|
el.removeEventListener("scroll", onScroll);
|
|
6147
6372
|
el.removeEventListener("wheel", onWheel);
|
|
@@ -6159,7 +6384,35 @@ function MessageList({
|
|
|
6159
6384
|
if (!el) return;
|
|
6160
6385
|
detachedRef.current = false;
|
|
6161
6386
|
pinBottom(el);
|
|
6387
|
+
markAllSeen();
|
|
6162
6388
|
};
|
|
6389
|
+
useEffect7(() => {
|
|
6390
|
+
const el = ref.current;
|
|
6391
|
+
if (!el || typeof IntersectionObserver === "undefined") return;
|
|
6392
|
+
const io = new IntersectionObserver(
|
|
6393
|
+
(entries) => {
|
|
6394
|
+
let changed = false;
|
|
6395
|
+
for (const entry of entries) {
|
|
6396
|
+
if (!entry.isIntersecting) continue;
|
|
6397
|
+
const row = entry.target;
|
|
6398
|
+
const id = row.dataset.mid;
|
|
6399
|
+
if (row.dataset.role !== "assistant" || !id) continue;
|
|
6400
|
+
if (!firedSeenRef.current.has(id)) {
|
|
6401
|
+
firedSeenRef.current.add(id);
|
|
6402
|
+
onMessageSeen?.(id);
|
|
6403
|
+
}
|
|
6404
|
+
if (!seenRef.current.has(id)) {
|
|
6405
|
+
seenRef.current.add(id);
|
|
6406
|
+
changed = true;
|
|
6407
|
+
}
|
|
6408
|
+
}
|
|
6409
|
+
if (changed) recomputeNewCount(el);
|
|
6410
|
+
},
|
|
6411
|
+
{ root: el, threshold: 0.01 }
|
|
6412
|
+
);
|
|
6413
|
+
el.querySelectorAll(`.${p18}-bubble-row[data-role="assistant"]`).forEach((row) => io.observe(row));
|
|
6414
|
+
return () => io.disconnect();
|
|
6415
|
+
}, [messages.value.length]);
|
|
6163
6416
|
const rows = [];
|
|
6164
6417
|
let prevDay = "";
|
|
6165
6418
|
const lastId = messages.value.at(-1)?.id;
|
|
@@ -6168,7 +6421,7 @@ function MessageList({
|
|
|
6168
6421
|
);
|
|
6169
6422
|
const markerRow = (marker) => {
|
|
6170
6423
|
if (form && marker.formId === form.form.id) {
|
|
6171
|
-
return /* @__PURE__ */
|
|
6424
|
+
return /* @__PURE__ */ jsx20(
|
|
6172
6425
|
FormGate,
|
|
6173
6426
|
{
|
|
6174
6427
|
form: form.form,
|
|
@@ -6179,7 +6432,7 @@ function MessageList({
|
|
|
6179
6432
|
`gate:${marker.formId}`
|
|
6180
6433
|
);
|
|
6181
6434
|
}
|
|
6182
|
-
return /* @__PURE__ */
|
|
6435
|
+
return /* @__PURE__ */ jsx20(
|
|
6183
6436
|
FormDoneMarker,
|
|
6184
6437
|
{
|
|
6185
6438
|
marker,
|
|
@@ -6202,12 +6455,12 @@ function MessageList({
|
|
|
6202
6455
|
const day = dayKey(m.createdAt);
|
|
6203
6456
|
if (day && day !== prevDay) {
|
|
6204
6457
|
rows.push(
|
|
6205
|
-
/* @__PURE__ */
|
|
6458
|
+
/* @__PURE__ */ jsx20("div", { class: `${p18}-date-divider`, children: /* @__PURE__ */ jsx20("span", { class: `${p18}-date-pill`, title: fullDate(m.createdAt), children: dayLabel(m.createdAt, strings) }) }, `day:${day}`)
|
|
6206
6459
|
);
|
|
6207
6460
|
prevDay = day;
|
|
6208
6461
|
}
|
|
6209
6462
|
rows.push(
|
|
6210
|
-
/* @__PURE__ */
|
|
6463
|
+
/* @__PURE__ */ jsx20(
|
|
6211
6464
|
MessageBubble,
|
|
6212
6465
|
{
|
|
6213
6466
|
message: m,
|
|
@@ -6219,7 +6472,9 @@ function MessageList({
|
|
|
6219
6472
|
interactive: Boolean(idle) && m.id === lastId,
|
|
6220
6473
|
superseded: m.id !== lastId,
|
|
6221
6474
|
tool,
|
|
6222
|
-
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0
|
|
6475
|
+
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0,
|
|
6476
|
+
enableMessageFeedback,
|
|
6477
|
+
onFeedback
|
|
6223
6478
|
},
|
|
6224
6479
|
m.id
|
|
6225
6480
|
)
|
|
@@ -6228,22 +6483,36 @@ function MessageList({
|
|
|
6228
6483
|
for (const marker of pendingMarkers) {
|
|
6229
6484
|
rows.push(markerRow(marker));
|
|
6230
6485
|
}
|
|
6231
|
-
return /* @__PURE__ */
|
|
6232
|
-
/* @__PURE__ */
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6486
|
+
return /* @__PURE__ */ jsxs16("div", { class: `${p18}-list-wrap`, children: [
|
|
6487
|
+
/* @__PURE__ */ jsxs16(
|
|
6488
|
+
"div",
|
|
6489
|
+
{
|
|
6490
|
+
ref,
|
|
6491
|
+
class: `${p18}-list${scrollFade ? ` ${p18}-list--fade` : ""}`,
|
|
6492
|
+
role: "log",
|
|
6493
|
+
"aria-live": "polite",
|
|
6494
|
+
"aria-relevant": "additions text",
|
|
6495
|
+
children: [
|
|
6496
|
+
loading && messages.value.length === 0 ? /* @__PURE__ */ jsx20("div", { class: `${p18}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
|
|
6497
|
+
rows,
|
|
6498
|
+
form && !inlineForm ? /* @__PURE__ */ jsx20(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null,
|
|
6499
|
+
scrollAnchor === "turn" ? /* @__PURE__ */ jsx20("div", { ref: spacerRef, class: `${p18}-turn-spacer`, "aria-hidden": "true" }) : null
|
|
6500
|
+
]
|
|
6501
|
+
}
|
|
6502
|
+
),
|
|
6503
|
+
showJump ? /* @__PURE__ */ jsxs16(
|
|
6238
6504
|
"button",
|
|
6239
6505
|
{
|
|
6240
6506
|
type: "button",
|
|
6241
|
-
class: `${
|
|
6507
|
+
class: `${p18}-jump${newCount > 0 ? ` ${p18}-jump--new` : ""}`,
|
|
6242
6508
|
onClick: jumpToBottom,
|
|
6243
|
-
"aria-label": strings.scrollToBottom,
|
|
6244
|
-
title: strings.scrollToBottom,
|
|
6509
|
+
"aria-label": newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6510
|
+
title: newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6245
6511
|
"data-testid": TID.scrollToBottom,
|
|
6246
|
-
children:
|
|
6512
|
+
children: [
|
|
6513
|
+
newCount > 0 ? /* @__PURE__ */ jsx20("span", { class: `${p18}-jump-count`, children: newCount }) : null,
|
|
6514
|
+
/* @__PURE__ */ jsx20(ChevronDownIcon, {})
|
|
6515
|
+
]
|
|
6247
6516
|
}
|
|
6248
6517
|
) : null
|
|
6249
6518
|
] });
|
|
@@ -6272,7 +6541,7 @@ function dayLabel(createdAt, strings) {
|
|
|
6272
6541
|
}
|
|
6273
6542
|
|
|
6274
6543
|
// src/ui/conversation-list.tsx
|
|
6275
|
-
import { useEffect as useEffect8, useState as
|
|
6544
|
+
import { useEffect as useEffect8, useState as useState8 } from "preact/hooks";
|
|
6276
6545
|
|
|
6277
6546
|
// src/ui/history-groups.ts
|
|
6278
6547
|
var HISTORY_BUCKETS = ["today", "yesterday", "lastWeek", "older"];
|
|
@@ -6302,7 +6571,7 @@ function startOfDay(ms) {
|
|
|
6302
6571
|
}
|
|
6303
6572
|
|
|
6304
6573
|
// src/ui/conversation-list.tsx
|
|
6305
|
-
import { Fragment as Fragment5, jsx as
|
|
6574
|
+
import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs17 } from "preact/jsx-runtime";
|
|
6306
6575
|
var log11 = logger.scope("history");
|
|
6307
6576
|
var DEFAULT_SKELETON_ROWS = 3;
|
|
6308
6577
|
var MAX_SKELETON_ROWS = 6;
|
|
@@ -6329,10 +6598,10 @@ function ConversationList({
|
|
|
6329
6598
|
onSelect,
|
|
6330
6599
|
onNewConversation
|
|
6331
6600
|
}) {
|
|
6332
|
-
const
|
|
6601
|
+
const p36 = BRAND.cssPrefix;
|
|
6333
6602
|
const seed = transport.peekConversations({ visitorId });
|
|
6334
|
-
const [state, setState] =
|
|
6335
|
-
const [conversations, setChats] =
|
|
6603
|
+
const [state, setState] = useState8(seed ? "loaded" : "loading");
|
|
6604
|
+
const [conversations, setChats] = useState8(seed?.conversations ?? []);
|
|
6336
6605
|
useEffect8(() => {
|
|
6337
6606
|
let cancelled = false;
|
|
6338
6607
|
transport.listConversations({ visitorId }).then((res) => {
|
|
@@ -6350,32 +6619,32 @@ function ConversationList({
|
|
|
6350
6619
|
cancelled = true;
|
|
6351
6620
|
};
|
|
6352
6621
|
}, [transport, visitorId, persistence]);
|
|
6353
|
-
const newChatButton = onNewConversation ? /* @__PURE__ */
|
|
6622
|
+
const newChatButton = onNewConversation ? /* @__PURE__ */ jsx21("div", { class: `${p36}-history-footer`, children: /* @__PURE__ */ jsxs17(
|
|
6354
6623
|
"button",
|
|
6355
6624
|
{
|
|
6356
6625
|
type: "button",
|
|
6357
|
-
class: `${
|
|
6626
|
+
class: `${p36}-history-new`,
|
|
6358
6627
|
onClick: onNewConversation,
|
|
6359
6628
|
"data-testid": TID.sidebarNewConversation,
|
|
6360
6629
|
children: [
|
|
6361
|
-
/* @__PURE__ */
|
|
6630
|
+
/* @__PURE__ */ jsx21(PlusIcon, {}),
|
|
6362
6631
|
strings.newConversation
|
|
6363
6632
|
]
|
|
6364
6633
|
}
|
|
6365
6634
|
) }) : null;
|
|
6366
6635
|
if (state === "loading") {
|
|
6367
6636
|
const rows = Math.min(persistence.loadHistoryCount() ?? DEFAULT_SKELETON_ROWS, MAX_SKELETON_ROWS);
|
|
6368
|
-
return /* @__PURE__ */
|
|
6369
|
-
/* @__PURE__ */
|
|
6370
|
-
/* @__PURE__ */
|
|
6371
|
-
/* @__PURE__ */
|
|
6372
|
-
/* @__PURE__ */
|
|
6373
|
-
/* @__PURE__ */
|
|
6374
|
-
/* @__PURE__ */
|
|
6375
|
-
/* @__PURE__ */
|
|
6376
|
-
/* @__PURE__ */
|
|
6637
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6638
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history`, "aria-busy": "true", "aria-label": strings.historyLoading, children: /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-group`, "aria-hidden": "true", children: [
|
|
6639
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-heading`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-heading` }) }),
|
|
6640
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-card`, children: Array.from({ length: Math.max(1, rows) }, (_, i) => /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-item ${p36}-history-item-skeleton`, children: [
|
|
6641
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-avatar ${p36}-skeleton` }),
|
|
6642
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6643
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6644
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-title`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-title` }) }),
|
|
6645
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-time`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-time` }) })
|
|
6377
6646
|
] }),
|
|
6378
|
-
/* @__PURE__ */
|
|
6647
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-row`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-history-preview`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-preview` }) }) })
|
|
6379
6648
|
] })
|
|
6380
6649
|
] }, i)) })
|
|
6381
6650
|
] }) }),
|
|
@@ -6383,36 +6652,36 @@ function ConversationList({
|
|
|
6383
6652
|
] });
|
|
6384
6653
|
}
|
|
6385
6654
|
if (state === "error" || conversations.length === 0) {
|
|
6386
|
-
return /* @__PURE__ */
|
|
6387
|
-
/* @__PURE__ */
|
|
6655
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6656
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-empty`, children: strings.historyEmpty }),
|
|
6388
6657
|
newChatButton
|
|
6389
6658
|
] });
|
|
6390
6659
|
}
|
|
6391
6660
|
const now = Date.now();
|
|
6392
6661
|
const groups = groupByBucket(now, conversations);
|
|
6393
|
-
return /* @__PURE__ */
|
|
6394
|
-
/* @__PURE__ */
|
|
6395
|
-
/* @__PURE__ */
|
|
6396
|
-
/* @__PURE__ */
|
|
6662
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6663
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-group`, children: [
|
|
6664
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
|
|
6665
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs17(
|
|
6397
6666
|
"button",
|
|
6398
6667
|
{
|
|
6399
6668
|
type: "button",
|
|
6400
6669
|
role: "listitem",
|
|
6401
|
-
class: `${
|
|
6670
|
+
class: `${p36}-history-item`,
|
|
6402
6671
|
onClick: () => onSelect(chat),
|
|
6403
6672
|
"data-closed": chat.canContinue ? void 0 : "true",
|
|
6404
|
-
"data-unread":
|
|
6673
|
+
"data-unread": chat.hasUnread ? "true" : void 0,
|
|
6405
6674
|
"data-testid": tid(TID.historyItem, chat.conversationId),
|
|
6406
6675
|
children: [
|
|
6407
|
-
/* @__PURE__ */
|
|
6408
|
-
/* @__PURE__ */
|
|
6409
|
-
/* @__PURE__ */
|
|
6410
|
-
/* @__PURE__ */
|
|
6411
|
-
/* @__PURE__ */
|
|
6676
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx21(MessageIcon, {}) }),
|
|
6677
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6678
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6679
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-title`, children: chat.title }),
|
|
6680
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
|
|
6412
6681
|
] }),
|
|
6413
|
-
/* @__PURE__ */
|
|
6414
|
-
/* @__PURE__ */
|
|
6415
|
-
|
|
6682
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6683
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
|
|
6684
|
+
chat.hasUnread ? /* @__PURE__ */ jsx21("span", { class: `${p36}-history-dot` }) : null
|
|
6416
6685
|
] })
|
|
6417
6686
|
] })
|
|
6418
6687
|
]
|
|
@@ -6425,15 +6694,15 @@ function ConversationList({
|
|
|
6425
6694
|
}
|
|
6426
6695
|
|
|
6427
6696
|
// src/ui/suggestions.tsx
|
|
6428
|
-
import { jsx as
|
|
6429
|
-
var
|
|
6697
|
+
import { jsx as jsx22 } from "preact/jsx-runtime";
|
|
6698
|
+
var p19 = BRAND.cssPrefix;
|
|
6430
6699
|
function Suggestions({ suggestions, onPick }) {
|
|
6431
6700
|
if (suggestions.length === 0) return null;
|
|
6432
|
-
return /* @__PURE__ */
|
|
6701
|
+
return /* @__PURE__ */ jsx22("div", { class: `${p19}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx22(
|
|
6433
6702
|
"button",
|
|
6434
6703
|
{
|
|
6435
6704
|
type: "button",
|
|
6436
|
-
class: `${
|
|
6705
|
+
class: `${p19}-suggestion`,
|
|
6437
6706
|
onClick: () => onPick(s),
|
|
6438
6707
|
"data-testid": tid(TID.suggestion, i),
|
|
6439
6708
|
children: s.label
|
|
@@ -6443,8 +6712,8 @@ function Suggestions({ suggestions, onPick }) {
|
|
|
6443
6712
|
}
|
|
6444
6713
|
|
|
6445
6714
|
// src/ui/panel.tsx
|
|
6446
|
-
import { Fragment as Fragment6, jsx as
|
|
6447
|
-
var
|
|
6715
|
+
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs18 } from "preact/jsx-runtime";
|
|
6716
|
+
var p20 = BRAND.cssPrefix;
|
|
6448
6717
|
function Panel(props2) {
|
|
6449
6718
|
const { options, onClose } = props2;
|
|
6450
6719
|
const s = options.strings;
|
|
@@ -6468,18 +6737,18 @@ function Panel(props2) {
|
|
|
6468
6737
|
}, []);
|
|
6469
6738
|
const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
|
|
6470
6739
|
useDragMove(containerRef.current, options.mode === "modal");
|
|
6471
|
-
return /* @__PURE__ */
|
|
6740
|
+
return /* @__PURE__ */ jsxs18(
|
|
6472
6741
|
"div",
|
|
6473
6742
|
{
|
|
6474
6743
|
ref: containerRef,
|
|
6475
|
-
class: `${
|
|
6744
|
+
class: `${p20}-panel`,
|
|
6476
6745
|
role: "dialog",
|
|
6477
6746
|
"aria-modal": "false",
|
|
6478
6747
|
"aria-label": s.panelTitle,
|
|
6479
6748
|
style: { position: "relative" },
|
|
6480
6749
|
"data-testid": TID.panel,
|
|
6481
6750
|
children: [
|
|
6482
|
-
/* @__PURE__ */
|
|
6751
|
+
/* @__PURE__ */ jsx23(
|
|
6483
6752
|
PanelContent,
|
|
6484
6753
|
{
|
|
6485
6754
|
...props2,
|
|
@@ -6488,7 +6757,7 @@ function Panel(props2) {
|
|
|
6488
6757
|
composerAttachApiRef
|
|
6489
6758
|
}
|
|
6490
6759
|
),
|
|
6491
|
-
/* @__PURE__ */
|
|
6760
|
+
/* @__PURE__ */ jsx23(PoweredByBar, { poweredBy: props2.options.poweredBy })
|
|
6492
6761
|
]
|
|
6493
6762
|
}
|
|
6494
6763
|
);
|
|
@@ -6527,6 +6796,8 @@ function PanelContent(props2) {
|
|
|
6527
6796
|
onFormFill,
|
|
6528
6797
|
tool,
|
|
6529
6798
|
onRetry,
|
|
6799
|
+
onMessageFeedback,
|
|
6800
|
+
onMessageSeen,
|
|
6530
6801
|
containerEl,
|
|
6531
6802
|
dragOver,
|
|
6532
6803
|
composerAttachApiRef
|
|
@@ -6536,9 +6807,9 @@ function PanelContent(props2) {
|
|
|
6536
6807
|
if (activeForm) {
|
|
6537
6808
|
composerArea = null;
|
|
6538
6809
|
} else if (canSend) {
|
|
6539
|
-
composerArea = /* @__PURE__ */
|
|
6540
|
-
/* @__PURE__ */
|
|
6541
|
-
/* @__PURE__ */
|
|
6810
|
+
composerArea = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6811
|
+
/* @__PURE__ */ jsx23(Suggestions, { suggestions, onPick: onSuggestion }),
|
|
6812
|
+
/* @__PURE__ */ jsx23(
|
|
6542
6813
|
Composer,
|
|
6543
6814
|
{
|
|
6544
6815
|
options,
|
|
@@ -6553,10 +6824,10 @@ function PanelContent(props2) {
|
|
|
6553
6824
|
)
|
|
6554
6825
|
] });
|
|
6555
6826
|
} else {
|
|
6556
|
-
composerArea = /* @__PURE__ */
|
|
6827
|
+
composerArea = /* @__PURE__ */ jsx23(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
|
|
6557
6828
|
}
|
|
6558
|
-
return /* @__PURE__ */
|
|
6559
|
-
view === "history" ? /* @__PURE__ */
|
|
6829
|
+
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6830
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6560
6831
|
HistoryHeader,
|
|
6561
6832
|
{
|
|
6562
6833
|
strings: s,
|
|
@@ -6564,22 +6835,22 @@ function PanelContent(props2) {
|
|
|
6564
6835
|
onClose,
|
|
6565
6836
|
showClose: canShowClose(options.mode, panelSize, options.actions)
|
|
6566
6837
|
}
|
|
6567
|
-
) : /* @__PURE__ */
|
|
6568
|
-
onBack ? /* @__PURE__ */
|
|
6838
|
+
) : /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, "data-testid": TID.panelHeader, children: [
|
|
6839
|
+
onBack ? /* @__PURE__ */ jsx23(
|
|
6569
6840
|
"button",
|
|
6570
6841
|
{
|
|
6571
6842
|
type: "button",
|
|
6572
|
-
class: `${
|
|
6843
|
+
class: `${p20}-icon-btn`,
|
|
6573
6844
|
onClick: onBack,
|
|
6574
6845
|
"aria-label": s.moduleBack,
|
|
6575
6846
|
title: s.moduleBack,
|
|
6576
|
-
children: /* @__PURE__ */
|
|
6847
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6577
6848
|
}
|
|
6578
6849
|
) : null,
|
|
6579
|
-
agent ? /* @__PURE__ */
|
|
6580
|
-
/* @__PURE__ */
|
|
6850
|
+
agent ? /* @__PURE__ */ jsx23(AgentBadge, { agent, strings: s }) : /* @__PURE__ */ jsx23("h1", { children: s.panelTitle }),
|
|
6851
|
+
/* @__PURE__ */ jsx23(HeaderActions, { panelProps: props2, variant: "chat" })
|
|
6581
6852
|
] }),
|
|
6582
|
-
view === "history" ? /* @__PURE__ */
|
|
6853
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6583
6854
|
ConversationList,
|
|
6584
6855
|
{
|
|
6585
6856
|
transport,
|
|
@@ -6590,9 +6861,9 @@ function PanelContent(props2) {
|
|
|
6590
6861
|
onSelect: (conversation) => onSelectHistoryConversation(conversation.conversationId),
|
|
6591
6862
|
onNewConversation
|
|
6592
6863
|
}
|
|
6593
|
-
) : /* @__PURE__ */
|
|
6594
|
-
/* @__PURE__ */
|
|
6595
|
-
/* @__PURE__ */
|
|
6864
|
+
) : /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6865
|
+
/* @__PURE__ */ jsx23(DropZone, { visible: dragOver, strings: s }),
|
|
6866
|
+
/* @__PURE__ */ jsx23(
|
|
6596
6867
|
MessageList,
|
|
6597
6868
|
{
|
|
6598
6869
|
messagesSig,
|
|
@@ -6601,6 +6872,11 @@ function PanelContent(props2) {
|
|
|
6601
6872
|
showReasoning: options.showReasoning,
|
|
6602
6873
|
showToolCalls: options.showToolCalls,
|
|
6603
6874
|
showSources: options.showSources,
|
|
6875
|
+
scrollFade: options.scrollFade,
|
|
6876
|
+
scrollAnchor: options.scrollAnchor,
|
|
6877
|
+
enableMessageFeedback: options.enableMessageFeedback,
|
|
6878
|
+
onFeedback: onMessageFeedback,
|
|
6879
|
+
onMessageSeen,
|
|
6604
6880
|
loading: loadingMessages,
|
|
6605
6881
|
idle: !isStreaming,
|
|
6606
6882
|
tool,
|
|
@@ -6611,9 +6887,9 @@ function PanelContent(props2) {
|
|
|
6611
6887
|
}
|
|
6612
6888
|
),
|
|
6613
6889
|
composerArea,
|
|
6614
|
-
/* @__PURE__ */
|
|
6890
|
+
/* @__PURE__ */ jsx23(ComposerFooter, { disclaimer: options.composerDisclaimer })
|
|
6615
6891
|
] }),
|
|
6616
|
-
options.size.resize?.enabled ? /* @__PURE__ */
|
|
6892
|
+
options.size.resize?.enabled ? /* @__PURE__ */ jsx23(
|
|
6617
6893
|
ResizeGrip,
|
|
6618
6894
|
{
|
|
6619
6895
|
panelEl: containerEl,
|
|
@@ -6632,28 +6908,28 @@ function HistoryHeader({
|
|
|
6632
6908
|
onClose,
|
|
6633
6909
|
showClose
|
|
6634
6910
|
}) {
|
|
6635
|
-
return /* @__PURE__ */
|
|
6636
|
-
/* @__PURE__ */
|
|
6911
|
+
return /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, children: [
|
|
6912
|
+
/* @__PURE__ */ jsx23(
|
|
6637
6913
|
"button",
|
|
6638
6914
|
{
|
|
6639
6915
|
type: "button",
|
|
6640
|
-
class: `${
|
|
6916
|
+
class: `${p20}-icon-btn`,
|
|
6641
6917
|
onClick: onBack,
|
|
6642
6918
|
"aria-label": strings.historyBack,
|
|
6643
6919
|
title: strings.historyBack,
|
|
6644
|
-
children: /* @__PURE__ */
|
|
6920
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6645
6921
|
}
|
|
6646
6922
|
),
|
|
6647
|
-
/* @__PURE__ */
|
|
6648
|
-
showClose ? /* @__PURE__ */
|
|
6923
|
+
/* @__PURE__ */ jsx23("h1", { children: strings.historyTitle }),
|
|
6924
|
+
showClose ? /* @__PURE__ */ jsx23(
|
|
6649
6925
|
"button",
|
|
6650
6926
|
{
|
|
6651
6927
|
type: "button",
|
|
6652
|
-
class: `${
|
|
6928
|
+
class: `${p20}-icon-btn`,
|
|
6653
6929
|
onClick: onClose,
|
|
6654
6930
|
"aria-label": strings.close,
|
|
6655
6931
|
title: strings.close,
|
|
6656
|
-
children: /* @__PURE__ */
|
|
6932
|
+
children: /* @__PURE__ */ jsx23(CloseIcon, {})
|
|
6657
6933
|
}
|
|
6658
6934
|
) : null
|
|
6659
6935
|
] });
|
|
@@ -6663,28 +6939,28 @@ function ReadOnlyBanner({
|
|
|
6663
6939
|
ctaLabel,
|
|
6664
6940
|
onNewConversation
|
|
6665
6941
|
}) {
|
|
6666
|
-
return /* @__PURE__ */
|
|
6667
|
-
/* @__PURE__ */
|
|
6668
|
-
/* @__PURE__ */
|
|
6942
|
+
return /* @__PURE__ */ jsxs18("div", { class: `${p20}-readonly-banner`, role: "note", children: [
|
|
6943
|
+
/* @__PURE__ */ jsx23("span", { class: `${p20}-readonly-label`, children: label }),
|
|
6944
|
+
/* @__PURE__ */ jsx23("button", { type: "button", class: `${p20}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
|
|
6669
6945
|
] });
|
|
6670
6946
|
}
|
|
6671
6947
|
function ComposerFooter({ disclaimer }) {
|
|
6672
6948
|
if (!disclaimer) return null;
|
|
6673
|
-
return /* @__PURE__ */
|
|
6949
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-composer-footer`, children: /* @__PURE__ */ jsx23("div", { class: `${p20}-disclaimer`, children: disclaimer }) });
|
|
6674
6950
|
}
|
|
6675
6951
|
function PoweredByBar({ poweredBy }) {
|
|
6676
6952
|
if (!poweredBy) return null;
|
|
6677
|
-
return /* @__PURE__ */
|
|
6953
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-poweredby-bar`, children: /* @__PURE__ */ jsx23(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
|
|
6678
6954
|
}
|
|
6679
6955
|
function PoweredBy({ logoUrl, text, href }) {
|
|
6680
|
-
const inner = /* @__PURE__ */
|
|
6681
|
-
logoUrl ? /* @__PURE__ */
|
|
6682
|
-
text ? /* @__PURE__ */
|
|
6956
|
+
const inner = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6957
|
+
logoUrl ? /* @__PURE__ */ jsx23("img", { class: `${p20}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
|
|
6958
|
+
text ? /* @__PURE__ */ jsx23("span", { children: text }) : null
|
|
6683
6959
|
] });
|
|
6684
6960
|
if (href) {
|
|
6685
|
-
return /* @__PURE__ */
|
|
6961
|
+
return /* @__PURE__ */ jsx23("a", { class: `${p20}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
|
|
6686
6962
|
}
|
|
6687
|
-
return /* @__PURE__ */
|
|
6963
|
+
return /* @__PURE__ */ jsx23("span", { class: `${p20}-poweredby`, children: inner });
|
|
6688
6964
|
}
|
|
6689
6965
|
|
|
6690
6966
|
// src/ui/form/form-controller.ts
|
|
@@ -6767,34 +7043,34 @@ function whenPasses(form, d) {
|
|
|
6767
7043
|
}
|
|
6768
7044
|
|
|
6769
7045
|
// src/ui/sidebar.tsx
|
|
6770
|
-
import { Fragment as Fragment7, jsx as
|
|
7046
|
+
import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs19 } from "preact/jsx-runtime";
|
|
6771
7047
|
function Sidebar(props2) {
|
|
6772
|
-
const
|
|
7048
|
+
const p36 = BRAND.cssPrefix;
|
|
6773
7049
|
const { site, blocks, strings, collapsed } = props2;
|
|
6774
7050
|
const navigation = blocks?.navigation ?? [];
|
|
6775
7051
|
const linkCards = blocks?.linkCards ?? [];
|
|
6776
7052
|
const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
|
|
6777
|
-
return /* @__PURE__ */
|
|
6778
|
-
/* @__PURE__ */
|
|
6779
|
-
/* @__PURE__ */
|
|
6780
|
-
/* @__PURE__ */
|
|
7053
|
+
return /* @__PURE__ */ jsxs19("aside", { class: `${p36}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
|
|
7054
|
+
/* @__PURE__ */ jsxs19("div", { class: `${p36}-sidebar-header`, children: [
|
|
7055
|
+
/* @__PURE__ */ jsx24(SidebarBrand, { site }),
|
|
7056
|
+
/* @__PURE__ */ jsx24(
|
|
6781
7057
|
"button",
|
|
6782
7058
|
{
|
|
6783
7059
|
type: "button",
|
|
6784
|
-
class: `${
|
|
7060
|
+
class: `${p36}-sidebar-toggle`,
|
|
6785
7061
|
"aria-label": toggleLabel,
|
|
6786
7062
|
"aria-expanded": collapsed ? "false" : "true",
|
|
6787
7063
|
title: toggleLabel,
|
|
6788
7064
|
onClick: props2.onToggleCollapsed,
|
|
6789
7065
|
"data-testid": TID.sidebarToggle,
|
|
6790
|
-
children: /* @__PURE__ */
|
|
7066
|
+
children: /* @__PURE__ */ jsx24(SidebarToggleIcon, { collapsed })
|
|
6791
7067
|
}
|
|
6792
7068
|
)
|
|
6793
7069
|
] }),
|
|
6794
|
-
collapsed ? null : /* @__PURE__ */
|
|
6795
|
-
navigation.length > 0 ? /* @__PURE__ */
|
|
6796
|
-
linkCards.length > 0 ? /* @__PURE__ */
|
|
6797
|
-
props2.showConversations ? /* @__PURE__ */
|
|
7070
|
+
collapsed ? null : /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
7071
|
+
navigation.length > 0 ? /* @__PURE__ */ jsx24("nav", { class: `${p36}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx24(SidebarNav, { items: navigation }) }) : null,
|
|
7072
|
+
linkCards.length > 0 ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx24(SidebarCards, { items: linkCards }) }) : null,
|
|
7073
|
+
props2.showConversations ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-conversations`, children: /* @__PURE__ */ jsx24(
|
|
6798
7074
|
ConversationList,
|
|
6799
7075
|
{
|
|
6800
7076
|
transport: props2.transport,
|
|
@@ -6810,18 +7086,18 @@ function Sidebar(props2) {
|
|
|
6810
7086
|
] });
|
|
6811
7087
|
}
|
|
6812
7088
|
function SidebarBrand({ site }) {
|
|
6813
|
-
const
|
|
7089
|
+
const p36 = BRAND.cssPrefix;
|
|
6814
7090
|
if (site?.logo?.url) {
|
|
6815
7091
|
const alt = site.logo.alt ?? site.title ?? "Logo";
|
|
6816
|
-
return /* @__PURE__ */
|
|
6817
|
-
site.logoDark?.url ? /* @__PURE__ */
|
|
6818
|
-
/* @__PURE__ */
|
|
7092
|
+
return /* @__PURE__ */ jsxs19("picture", { children: [
|
|
7093
|
+
site.logoDark?.url ? /* @__PURE__ */ jsx24("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
|
|
7094
|
+
/* @__PURE__ */ jsx24("img", { class: `${p36}-sidebar-logo`, src: site.logo.url, alt })
|
|
6819
7095
|
] });
|
|
6820
7096
|
}
|
|
6821
|
-
return /* @__PURE__ */
|
|
7097
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-title`, children: site?.title ?? BRAND.name });
|
|
6822
7098
|
}
|
|
6823
7099
|
function SidebarToggleIcon({ collapsed }) {
|
|
6824
|
-
return /* @__PURE__ */
|
|
7100
|
+
return /* @__PURE__ */ jsx24(
|
|
6825
7101
|
"svg",
|
|
6826
7102
|
{
|
|
6827
7103
|
width: "16",
|
|
@@ -6831,38 +7107,38 @@ function SidebarToggleIcon({ collapsed }) {
|
|
|
6831
7107
|
stroke: "currentColor",
|
|
6832
7108
|
"stroke-width": "2",
|
|
6833
7109
|
"aria-hidden": "true",
|
|
6834
|
-
children: collapsed ? /* @__PURE__ */
|
|
7110
|
+
children: collapsed ? /* @__PURE__ */ jsx24("polyline", { points: "9 6 15 12 9 18" }) : /* @__PURE__ */ jsx24("polyline", { points: "15 6 9 12 15 18" })
|
|
6835
7111
|
}
|
|
6836
7112
|
);
|
|
6837
7113
|
}
|
|
6838
7114
|
function SidebarNav({ items }) {
|
|
6839
|
-
const
|
|
6840
|
-
return /* @__PURE__ */
|
|
7115
|
+
const p36 = BRAND.cssPrefix;
|
|
7116
|
+
return /* @__PURE__ */ jsx24("ul", { class: `${p36}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsxs19(
|
|
6841
7117
|
"a",
|
|
6842
7118
|
{
|
|
6843
|
-
class: `${
|
|
7119
|
+
class: `${p36}-sidebar-nav-item`,
|
|
6844
7120
|
href: item.href,
|
|
6845
7121
|
target: item.href ? "_blank" : void 0,
|
|
6846
7122
|
rel: item.href ? "noreferrer" : void 0,
|
|
6847
7123
|
children: [
|
|
6848
|
-
item.icon ? /* @__PURE__ */
|
|
6849
|
-
/* @__PURE__ */
|
|
7124
|
+
item.icon ? /* @__PURE__ */ jsx24("span", { class: `${p36}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
|
|
7125
|
+
/* @__PURE__ */ jsx24("span", { class: `${p36}-sidebar-nav-label`, children: item.label })
|
|
6850
7126
|
]
|
|
6851
7127
|
}
|
|
6852
7128
|
) }, item.id ?? item.label)) });
|
|
6853
7129
|
}
|
|
6854
7130
|
function SidebarCards({ items }) {
|
|
6855
|
-
const
|
|
6856
|
-
return /* @__PURE__ */
|
|
7131
|
+
const p36 = BRAND.cssPrefix;
|
|
7132
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs19(
|
|
6857
7133
|
"a",
|
|
6858
7134
|
{
|
|
6859
|
-
class: `${
|
|
7135
|
+
class: `${p36}-sidebar-card`,
|
|
6860
7136
|
href: item.href,
|
|
6861
7137
|
target: item.href ? "_blank" : void 0,
|
|
6862
7138
|
rel: item.href ? "noreferrer" : void 0,
|
|
6863
7139
|
children: [
|
|
6864
|
-
/* @__PURE__ */
|
|
6865
|
-
item.description ? /* @__PURE__ */
|
|
7140
|
+
/* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-card-label`, children: item.label }),
|
|
7141
|
+
item.description ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-card-desc`, children: item.description }) : null
|
|
6866
7142
|
]
|
|
6867
7143
|
},
|
|
6868
7144
|
item.id ?? item.label
|
|
@@ -6870,11 +7146,11 @@ function SidebarCards({ items }) {
|
|
|
6870
7146
|
}
|
|
6871
7147
|
|
|
6872
7148
|
// src/ui/page-shell.tsx
|
|
6873
|
-
import { jsx as
|
|
6874
|
-
var
|
|
7149
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "preact/jsx-runtime";
|
|
7150
|
+
var p21 = BRAND.cssPrefix;
|
|
6875
7151
|
function PageShell(props2) {
|
|
6876
|
-
return /* @__PURE__ */
|
|
6877
|
-
/* @__PURE__ */
|
|
7152
|
+
return /* @__PURE__ */ jsxs20("main", { class: `${p21}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
|
|
7153
|
+
/* @__PURE__ */ jsx25(
|
|
6878
7154
|
Sidebar,
|
|
6879
7155
|
{
|
|
6880
7156
|
site: props2.site,
|
|
@@ -6891,7 +7167,7 @@ function PageShell(props2) {
|
|
|
6891
7167
|
onToggleCollapsed: props2.onToggleSidebarCollapsed
|
|
6892
7168
|
}
|
|
6893
7169
|
),
|
|
6894
|
-
/* @__PURE__ */
|
|
7170
|
+
/* @__PURE__ */ jsx25("section", { class: `${p21}-page-chat`, "aria-label": "Chat", children: props2.children })
|
|
6895
7171
|
] });
|
|
6896
7172
|
}
|
|
6897
7173
|
|
|
@@ -6938,83 +7214,83 @@ var chatLayout = {
|
|
|
6938
7214
|
};
|
|
6939
7215
|
|
|
6940
7216
|
// src/ui/modules/help.tsx
|
|
6941
|
-
import { useEffect as useEffect10, useMemo as useMemo2, useState as
|
|
7217
|
+
import { useEffect as useEffect10, useMemo as useMemo2, useState as useState9 } from "preact/hooks";
|
|
6942
7218
|
|
|
6943
7219
|
// src/ui/back-header.tsx
|
|
6944
|
-
import { jsx as
|
|
6945
|
-
var
|
|
7220
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "preact/jsx-runtime";
|
|
7221
|
+
var p22 = BRAND.cssPrefix;
|
|
6946
7222
|
function TitleBar({ title, actions }) {
|
|
6947
|
-
return /* @__PURE__ */
|
|
6948
|
-
/* @__PURE__ */
|
|
6949
|
-
/* @__PURE__ */
|
|
6950
|
-
actions ?? /* @__PURE__ */
|
|
7223
|
+
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-variant": "title", children: [
|
|
7224
|
+
/* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" }),
|
|
7225
|
+
/* @__PURE__ */ jsx26("h1", { class: `${p22}-back-title`, children: title }),
|
|
7226
|
+
actions ?? /* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
|
|
6951
7227
|
] });
|
|
6952
7228
|
}
|
|
6953
7229
|
function BackHeader({ title, backLabel, onBack, actions, testid }) {
|
|
6954
|
-
return /* @__PURE__ */
|
|
6955
|
-
/* @__PURE__ */
|
|
6956
|
-
/* @__PURE__ */
|
|
6957
|
-
actions ?? /* @__PURE__ */
|
|
7230
|
+
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-testid": testid, children: [
|
|
7231
|
+
/* @__PURE__ */ jsx26("button", { type: "button", class: `${p22}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx26(BackIcon, {}) }),
|
|
7232
|
+
/* @__PURE__ */ jsx26("h1", { class: `${p22}-back-title`, children: title }),
|
|
7233
|
+
actions ?? /* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
|
|
6958
7234
|
] });
|
|
6959
7235
|
}
|
|
6960
7236
|
|
|
6961
7237
|
// src/ui/home-search.tsx
|
|
6962
|
-
import { jsx as
|
|
6963
|
-
var
|
|
7238
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "preact/jsx-runtime";
|
|
7239
|
+
var p23 = BRAND.cssPrefix;
|
|
6964
7240
|
function HomeSearchButton({ placeholder, onActivate }) {
|
|
6965
|
-
return /* @__PURE__ */
|
|
6966
|
-
/* @__PURE__ */
|
|
6967
|
-
/* @__PURE__ */
|
|
7241
|
+
return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
|
|
7242
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-text`, children: placeholder }),
|
|
7243
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(SearchIcon, {}) })
|
|
6968
7244
|
] });
|
|
6969
7245
|
}
|
|
6970
7246
|
function HelpSearchInput({ placeholder, value, onInput }) {
|
|
6971
|
-
return /* @__PURE__ */
|
|
6972
|
-
/* @__PURE__ */
|
|
7247
|
+
return /* @__PURE__ */ jsxs22("div", { class: `${p23}-home-search`, "data-input": "true", children: [
|
|
7248
|
+
/* @__PURE__ */ jsx27(
|
|
6973
7249
|
"input",
|
|
6974
7250
|
{
|
|
6975
7251
|
type: "search",
|
|
6976
|
-
class: `${
|
|
7252
|
+
class: `${p23}-home-search-input`,
|
|
6977
7253
|
placeholder,
|
|
6978
7254
|
value,
|
|
6979
7255
|
onInput: (e) => onInput(e.currentTarget.value),
|
|
6980
7256
|
"data-testid": TID.helpSearch
|
|
6981
7257
|
}
|
|
6982
7258
|
),
|
|
6983
|
-
/* @__PURE__ */
|
|
7259
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(SearchIcon, {}) })
|
|
6984
7260
|
] });
|
|
6985
7261
|
}
|
|
6986
7262
|
|
|
6987
7263
|
// src/ui/list-row.tsx
|
|
6988
|
-
import { jsx as
|
|
6989
|
-
var
|
|
7264
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "preact/jsx-runtime";
|
|
7265
|
+
var p24 = BRAND.cssPrefix;
|
|
6990
7266
|
function ListRow({ title, subtitle, onClick, testid }) {
|
|
6991
|
-
return /* @__PURE__ */
|
|
6992
|
-
/* @__PURE__ */
|
|
6993
|
-
/* @__PURE__ */
|
|
6994
|
-
subtitle ? /* @__PURE__ */
|
|
7267
|
+
return /* @__PURE__ */ jsxs23("button", { type: "button", class: `${p24}-list-row`, onClick, "data-testid": testid, children: [
|
|
7268
|
+
/* @__PURE__ */ jsxs23("span", { class: `${p24}-list-row-body`, children: [
|
|
7269
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-title`, children: title }),
|
|
7270
|
+
subtitle ? /* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-sub`, children: subtitle }) : null
|
|
6995
7271
|
] }),
|
|
6996
|
-
/* @__PURE__ */
|
|
7272
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx28(ChevronRightIcon, {}) })
|
|
6997
7273
|
] });
|
|
6998
7274
|
}
|
|
6999
7275
|
|
|
7000
7276
|
// src/ui/module-state.tsx
|
|
7001
|
-
import { jsx as
|
|
7002
|
-
var
|
|
7277
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "preact/jsx-runtime";
|
|
7278
|
+
var p25 = BRAND.cssPrefix;
|
|
7003
7279
|
function ModuleState({
|
|
7004
7280
|
tone = "info",
|
|
7005
7281
|
message,
|
|
7006
7282
|
onRetry,
|
|
7007
7283
|
strings
|
|
7008
7284
|
}) {
|
|
7009
|
-
return /* @__PURE__ */
|
|
7010
|
-
/* @__PURE__ */
|
|
7011
|
-
onRetry ? /* @__PURE__ */
|
|
7285
|
+
return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
|
|
7286
|
+
/* @__PURE__ */ jsx29("span", { children: message }),
|
|
7287
|
+
onRetry ? /* @__PURE__ */ jsx29("button", { type: "button", class: `${p25}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
|
|
7012
7288
|
] });
|
|
7013
7289
|
}
|
|
7014
7290
|
|
|
7015
7291
|
// src/ui/modules/help.tsx
|
|
7016
|
-
import { jsx as
|
|
7017
|
-
var
|
|
7292
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "preact/jsx-runtime";
|
|
7293
|
+
var p26 = BRAND.cssPrefix;
|
|
7018
7294
|
var log12 = logger.scope("help");
|
|
7019
7295
|
var openArticle = (nav, a) => a.url ? nav.push({ kind: "iframe", url: a.url, title: a.title }) : nav.push({ kind: "content", id: a.id, title: a.title });
|
|
7020
7296
|
function groupByCategory(items) {
|
|
@@ -7043,7 +7319,7 @@ function fuzzySearch(items, query) {
|
|
|
7043
7319
|
return items.map((item) => ({ item, score: Math.max(fuzzyScore(q, item.title) * 2, fuzzyScore(q, item.description ?? "")) })).filter((r) => r.score > 0).toSorted((a, b) => b.score - a.score).map((r) => r.item);
|
|
7044
7320
|
}
|
|
7045
7321
|
function ArticleRow({ article, nav }) {
|
|
7046
|
-
return /* @__PURE__ */
|
|
7322
|
+
return /* @__PURE__ */ jsx30(
|
|
7047
7323
|
ListRow,
|
|
7048
7324
|
{
|
|
7049
7325
|
title: article.title,
|
|
@@ -7055,11 +7331,11 @@ function ArticleRow({ article, nav }) {
|
|
|
7055
7331
|
}
|
|
7056
7332
|
function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7057
7333
|
const tags = config.contentTags;
|
|
7058
|
-
const [state, setState] =
|
|
7059
|
-
const [errorMsg, setErrorMsg] =
|
|
7060
|
-
const [items, setItems] =
|
|
7061
|
-
const [query, setQuery] =
|
|
7062
|
-
const [reloadKey, setReloadKey] =
|
|
7334
|
+
const [state, setState] = useState9("loading");
|
|
7335
|
+
const [errorMsg, setErrorMsg] = useState9(strings.errorGeneric);
|
|
7336
|
+
const [items, setItems] = useState9([]);
|
|
7337
|
+
const [query, setQuery] = useState9("");
|
|
7338
|
+
const [reloadKey, setReloadKey] = useState9(0);
|
|
7063
7339
|
useEffect10(() => {
|
|
7064
7340
|
let cancelled = false;
|
|
7065
7341
|
setState("loading");
|
|
@@ -7088,46 +7364,46 @@ function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7088
7364
|
}, [query, results, bus]);
|
|
7089
7365
|
function renderBody() {
|
|
7090
7366
|
if (query.trim().length > 0) {
|
|
7091
|
-
if (results.length === 0) return /* @__PURE__ */
|
|
7092
|
-
return /* @__PURE__ */
|
|
7367
|
+
if (results.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpSearchEmpty, strings });
|
|
7368
|
+
return /* @__PURE__ */ jsx30("div", { class: `${p26}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx30(ArticleRow, { article: a, nav }, a.id)) });
|
|
7093
7369
|
}
|
|
7094
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7370
|
+
if (state === "loading") return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpLoading, strings });
|
|
7095
7371
|
if (state === "error") {
|
|
7096
|
-
return /* @__PURE__ */
|
|
7372
|
+
return /* @__PURE__ */ jsx30(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7097
7373
|
}
|
|
7098
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7099
|
-
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */
|
|
7100
|
-
category ? /* @__PURE__ */
|
|
7101
|
-
/* @__PURE__ */
|
|
7374
|
+
if (items.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpEmpty, strings });
|
|
7375
|
+
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs25("section", { class: `${p26}-help-group`, children: [
|
|
7376
|
+
category ? /* @__PURE__ */ jsx30("h2", { class: `${p26}-help-section-title`, children: category }) : null,
|
|
7377
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx30(ArticleRow, { article: a, nav }, a.id)) })
|
|
7102
7378
|
] }, category));
|
|
7103
7379
|
}
|
|
7104
|
-
return /* @__PURE__ */
|
|
7105
|
-
/* @__PURE__ */
|
|
7106
|
-
/* @__PURE__ */
|
|
7107
|
-
/* @__PURE__ */
|
|
7380
|
+
return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
|
|
7381
|
+
/* @__PURE__ */ jsx30(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx30(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
7382
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-module-pad`, children: /* @__PURE__ */ jsx30(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
|
|
7383
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-help-list`, children: renderBody() })
|
|
7108
7384
|
] });
|
|
7109
7385
|
}
|
|
7110
7386
|
var helpLayout = {
|
|
7111
7387
|
Icon: HelpIcon,
|
|
7112
|
-
Root: (props2) => /* @__PURE__ */
|
|
7388
|
+
Root: (props2) => /* @__PURE__ */ jsx30(HelpRoot, { ...props2 })
|
|
7113
7389
|
};
|
|
7114
7390
|
|
|
7115
7391
|
// src/ui/modules/home.tsx
|
|
7116
|
-
import { useEffect as useEffect11, useState as
|
|
7392
|
+
import { useEffect as useEffect11, useState as useState10 } from "preact/hooks";
|
|
7117
7393
|
|
|
7118
7394
|
// src/ui/home-card.tsx
|
|
7119
|
-
import { jsx as
|
|
7120
|
-
var
|
|
7395
|
+
import { jsx as jsx31 } from "preact/jsx-runtime";
|
|
7396
|
+
var p27 = BRAND.cssPrefix;
|
|
7121
7397
|
function HomeCard({ onClick, children, testid }) {
|
|
7122
7398
|
if (onClick) {
|
|
7123
|
-
return /* @__PURE__ */
|
|
7399
|
+
return /* @__PURE__ */ jsx31("button", { type: "button", class: `${p27}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
|
|
7124
7400
|
}
|
|
7125
|
-
return /* @__PURE__ */
|
|
7401
|
+
return /* @__PURE__ */ jsx31("div", { class: `${p27}-home-card`, "data-testid": testid, children });
|
|
7126
7402
|
}
|
|
7127
7403
|
|
|
7128
7404
|
// src/ui/modules/home.tsx
|
|
7129
|
-
import { Fragment as Fragment8, jsx as
|
|
7130
|
-
var
|
|
7405
|
+
import { Fragment as Fragment8, jsx as jsx32, jsxs as jsxs26 } from "preact/jsx-runtime";
|
|
7406
|
+
var p28 = BRAND.cssPrefix;
|
|
7131
7407
|
var log13 = logger.scope("home");
|
|
7132
7408
|
function resolveGreeting(props2) {
|
|
7133
7409
|
const name = props2.options.userContext?.name;
|
|
@@ -7141,8 +7417,8 @@ function resolveGreeting(props2) {
|
|
|
7141
7417
|
var openContent = (nav, item) => item.url ? nav.push({ kind: "iframe", url: item.url, title: item.title }) : nav.push({ kind: "content", id: item.id, title: item.title });
|
|
7142
7418
|
function HomeRoot(props2) {
|
|
7143
7419
|
const { transport, strings, config, nav, bus, panelProps } = props2;
|
|
7144
|
-
const [recent, setRecent] =
|
|
7145
|
-
const [content, setContent] =
|
|
7420
|
+
const [recent, setRecent] = useState10(null);
|
|
7421
|
+
const [content, setContent] = useState10([]);
|
|
7146
7422
|
const tagsKey = config.contentTags?.join(",");
|
|
7147
7423
|
useEffect11(() => {
|
|
7148
7424
|
if (!config.showRecentConversations) return;
|
|
@@ -7170,49 +7446,49 @@ function HomeRoot(props2) {
|
|
|
7170
7446
|
const status = config.status;
|
|
7171
7447
|
const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
|
|
7172
7448
|
const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
|
|
7173
|
-
return /* @__PURE__ */
|
|
7174
|
-
/* @__PURE__ */
|
|
7175
|
-
/* @__PURE__ */
|
|
7176
|
-
config.brandName ? /* @__PURE__ */
|
|
7177
|
-
/* @__PURE__ */
|
|
7178
|
-
avatars.length > 0 ? /* @__PURE__ */
|
|
7179
|
-
/* @__PURE__ */
|
|
7449
|
+
return /* @__PURE__ */ jsx32("div", { class: `${p28}-module ${p28}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-scroll`, children: [
|
|
7450
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero`, children: [
|
|
7451
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-top`, children: [
|
|
7452
|
+
config.brandName ? /* @__PURE__ */ jsx32("span", { class: `${p28}-home-brand`, "data-testid": TID.homeBrand, children: config.brandName }) : /* @__PURE__ */ jsx32("span", { class: `${p28}-home-brand-spacer`, "aria-hidden": "true" }),
|
|
7453
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-actions`, children: [
|
|
7454
|
+
avatars.length > 0 ? /* @__PURE__ */ jsx32("div", { class: `${p28}-home-avatars`, children: avatars.map((a) => /* @__PURE__ */ jsx32("span", { class: `${p28}-home-avatar`, title: a.role ? `${a.name} \xB7 ${a.role}` : a.name, children: a.avatar ? /* @__PURE__ */ jsx32("img", { src: a.avatar, alt: "", loading: "lazy" }) : /* @__PURE__ */ jsx32("span", { children: initials(a.name) }) }, a.name)) }) : null,
|
|
7455
|
+
/* @__PURE__ */ jsx32(HeaderActions, { panelProps, variant: "plain" })
|
|
7180
7456
|
] })
|
|
7181
7457
|
] }),
|
|
7182
|
-
config.showGreeting !== false ? /* @__PURE__ */
|
|
7183
|
-
/* @__PURE__ */
|
|
7184
|
-
greeting.subtitle ? /* @__PURE__ */
|
|
7458
|
+
config.showGreeting !== false ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
|
|
7459
|
+
/* @__PURE__ */ jsx32("h1", { class: `${p28}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
|
|
7460
|
+
greeting.subtitle ? /* @__PURE__ */ jsx32("p", { class: `${p28}-home-lead`, children: greeting.subtitle }) : null
|
|
7185
7461
|
] }) : null
|
|
7186
7462
|
] }),
|
|
7187
|
-
/* @__PURE__ */
|
|
7188
|
-
config.showSearchBar !== false ? /* @__PURE__ */
|
|
7463
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-cards`, children: [
|
|
7464
|
+
config.showSearchBar !== false ? /* @__PURE__ */ jsx32(
|
|
7189
7465
|
HomeSearchButton,
|
|
7190
7466
|
{
|
|
7191
7467
|
placeholder: strings.homeSearchPlaceholder,
|
|
7192
7468
|
onActivate: () => nav.switchToLayout("help")
|
|
7193
7469
|
}
|
|
7194
7470
|
) : null,
|
|
7195
|
-
recent ? /* @__PURE__ */
|
|
7196
|
-
/* @__PURE__ */
|
|
7197
|
-
/* @__PURE__ */
|
|
7198
|
-
/* @__PURE__ */
|
|
7199
|
-
recent.preview ? /* @__PURE__ */
|
|
7471
|
+
recent ? /* @__PURE__ */ jsx32(HomeCard, { onClick: () => nav.selectConversation(recent.conversationId), testid: TID.homeRecent, children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-recent-row`, "data-unread": recent.hasUnread ? "true" : void 0, children: [
|
|
7472
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx32(BubblesIcon, {}) }),
|
|
7473
|
+
/* @__PURE__ */ jsxs26("span", { class: `${p28}-home-recent-body`, children: [
|
|
7474
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-title`, children: recent.title }),
|
|
7475
|
+
recent.preview ? /* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-preview`, children: recent.preview }) : null
|
|
7200
7476
|
] }),
|
|
7201
|
-
|
|
7477
|
+
recent.hasUnread ? /* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-dot`, "aria-label": "Unread" }) : null
|
|
7202
7478
|
] }) }) : null,
|
|
7203
|
-
status ? /* @__PURE__ */
|
|
7479
|
+
status ? /* @__PURE__ */ jsx32(
|
|
7204
7480
|
HomeCard,
|
|
7205
7481
|
{
|
|
7206
7482
|
onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
|
|
7207
|
-
children: /* @__PURE__ */
|
|
7208
|
-
/* @__PURE__ */
|
|
7209
|
-
/* @__PURE__ */
|
|
7483
|
+
children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-status`, "data-level": status.level ?? "operational", children: [
|
|
7484
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx32(StatusOkIcon, {}) }),
|
|
7485
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-status-text`, children: statusText })
|
|
7210
7486
|
] })
|
|
7211
7487
|
}
|
|
7212
7488
|
) : null,
|
|
7213
|
-
content.length > 0 ? /* @__PURE__ */
|
|
7214
|
-
/* @__PURE__ */
|
|
7215
|
-
/* @__PURE__ */
|
|
7489
|
+
content.length > 0 ? /* @__PURE__ */ jsxs26("section", { class: `${p28}-home-content`, children: [
|
|
7490
|
+
/* @__PURE__ */ jsx32("div", { class: `${p28}-home-content-title`, children: contentTitle }),
|
|
7491
|
+
/* @__PURE__ */ jsx32("div", { class: `${p28}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx32(
|
|
7216
7492
|
ListRow,
|
|
7217
7493
|
{
|
|
7218
7494
|
title: item.title,
|
|
@@ -7228,20 +7504,20 @@ function HomeRoot(props2) {
|
|
|
7228
7504
|
}
|
|
7229
7505
|
var homeLayout = {
|
|
7230
7506
|
Icon: HomeIcon,
|
|
7231
|
-
Root: (props2) => /* @__PURE__ */
|
|
7507
|
+
Root: (props2) => /* @__PURE__ */ jsx32(HomeRoot, { ...props2 })
|
|
7232
7508
|
};
|
|
7233
7509
|
|
|
7234
7510
|
// src/ui/modules/news.tsx
|
|
7235
|
-
import { useEffect as useEffect12, useState as
|
|
7236
|
-
import { jsx as
|
|
7237
|
-
var
|
|
7511
|
+
import { useEffect as useEffect12, useState as useState11 } from "preact/hooks";
|
|
7512
|
+
import { jsx as jsx33, jsxs as jsxs27 } from "preact/jsx-runtime";
|
|
7513
|
+
var p29 = BRAND.cssPrefix;
|
|
7238
7514
|
var log14 = logger.scope("news");
|
|
7239
7515
|
function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7240
7516
|
const tags = config.contentTags;
|
|
7241
|
-
const [state, setState] =
|
|
7242
|
-
const [errorMsg, setErrorMsg] =
|
|
7243
|
-
const [items, setItems] =
|
|
7244
|
-
const [reloadKey, setReloadKey] =
|
|
7517
|
+
const [state, setState] = useState11("loading");
|
|
7518
|
+
const [errorMsg, setErrorMsg] = useState11(strings.errorGeneric);
|
|
7519
|
+
const [items, setItems] = useState11([]);
|
|
7520
|
+
const [reloadKey, setReloadKey] = useState11(0);
|
|
7245
7521
|
useEffect12(() => {
|
|
7246
7522
|
let cancelled = false;
|
|
7247
7523
|
setState("loading");
|
|
@@ -7262,37 +7538,37 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7262
7538
|
};
|
|
7263
7539
|
}, [transport, tags, reloadKey, bus]);
|
|
7264
7540
|
function renderBody() {
|
|
7265
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7541
|
+
if (state === "loading") return /* @__PURE__ */ jsx33(ModuleState, { message: strings.newsLoading, strings });
|
|
7266
7542
|
if (state === "error") {
|
|
7267
|
-
return /* @__PURE__ */
|
|
7543
|
+
return /* @__PURE__ */ jsx33(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7268
7544
|
}
|
|
7269
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7270
|
-
return /* @__PURE__ */
|
|
7545
|
+
if (items.length === 0) return /* @__PURE__ */ jsx33(ModuleState, { message: strings.newsEmpty, strings });
|
|
7546
|
+
return /* @__PURE__ */ jsx33("div", { class: `${p29}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs27(
|
|
7271
7547
|
"button",
|
|
7272
7548
|
{
|
|
7273
7549
|
type: "button",
|
|
7274
|
-
class: `${
|
|
7550
|
+
class: `${p29}-news-card`,
|
|
7275
7551
|
onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
|
|
7276
7552
|
"data-testid": tid(TID.newsItem, item.id),
|
|
7277
7553
|
children: [
|
|
7278
|
-
item.image ? /* @__PURE__ */
|
|
7279
|
-
/* @__PURE__ */
|
|
7280
|
-
/* @__PURE__ */
|
|
7281
|
-
item.description ? /* @__PURE__ */
|
|
7554
|
+
item.image ? /* @__PURE__ */ jsx33("img", { class: `${p29}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
7555
|
+
/* @__PURE__ */ jsxs27("span", { class: `${p29}-news-body`, children: [
|
|
7556
|
+
/* @__PURE__ */ jsx33("span", { class: `${p29}-news-title`, children: item.title }),
|
|
7557
|
+
item.description ? /* @__PURE__ */ jsx33("span", { class: `${p29}-news-summary`, children: item.description }) : null
|
|
7282
7558
|
] })
|
|
7283
7559
|
]
|
|
7284
7560
|
},
|
|
7285
7561
|
item.id
|
|
7286
7562
|
)) });
|
|
7287
7563
|
}
|
|
7288
|
-
return /* @__PURE__ */
|
|
7289
|
-
/* @__PURE__ */
|
|
7290
|
-
/* @__PURE__ */
|
|
7564
|
+
return /* @__PURE__ */ jsxs27("div", { class: `${p29}-module`, children: [
|
|
7565
|
+
/* @__PURE__ */ jsx33(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx33(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
7566
|
+
/* @__PURE__ */ jsx33("div", { class: `${p29}-module-scroll`, children: renderBody() })
|
|
7291
7567
|
] });
|
|
7292
7568
|
}
|
|
7293
7569
|
var newsLayout = {
|
|
7294
7570
|
Icon: NewsIcon,
|
|
7295
|
-
Root: (props2) => /* @__PURE__ */
|
|
7571
|
+
Root: (props2) => /* @__PURE__ */ jsx33(NewsRoot, { ...props2 })
|
|
7296
7572
|
};
|
|
7297
7573
|
|
|
7298
7574
|
// src/ui/modules/registry.ts
|
|
@@ -7304,28 +7580,28 @@ var LAYOUTS = {
|
|
|
7304
7580
|
};
|
|
7305
7581
|
|
|
7306
7582
|
// src/ui/home-tab-bar.tsx
|
|
7307
|
-
import { jsx as
|
|
7308
|
-
var
|
|
7309
|
-
function HomeTabBar({ modules, activeTab, strings,
|
|
7310
|
-
return /* @__PURE__ */
|
|
7583
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "preact/jsx-runtime";
|
|
7584
|
+
var p30 = BRAND.cssPrefix;
|
|
7585
|
+
function HomeTabBar({ modules, activeTab, strings, hasUnread, onSelect }) {
|
|
7586
|
+
return /* @__PURE__ */ jsx34("nav", { class: `${p30}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
|
|
7311
7587
|
const Icon = LAYOUTS[m.layout].Icon;
|
|
7312
7588
|
const selected = m.id === activeTab;
|
|
7313
|
-
const
|
|
7314
|
-
return /* @__PURE__ */
|
|
7589
|
+
const showDot = m.layout === "chat" && hasUnread;
|
|
7590
|
+
return /* @__PURE__ */ jsxs28(
|
|
7315
7591
|
"button",
|
|
7316
7592
|
{
|
|
7317
7593
|
type: "button",
|
|
7318
7594
|
role: "tab",
|
|
7319
7595
|
"aria-selected": selected,
|
|
7320
|
-
class: `${
|
|
7596
|
+
class: `${p30}-tab`,
|
|
7321
7597
|
onClick: () => onSelect(m.id),
|
|
7322
7598
|
"data-testid": tid(TID.tab, m.id),
|
|
7323
7599
|
children: [
|
|
7324
|
-
/* @__PURE__ */
|
|
7325
|
-
/* @__PURE__ */
|
|
7326
|
-
|
|
7600
|
+
/* @__PURE__ */ jsxs28("span", { class: `${p30}-tab-icon`, "aria-hidden": "true", children: [
|
|
7601
|
+
/* @__PURE__ */ jsx34(Icon, {}),
|
|
7602
|
+
showDot ? /* @__PURE__ */ jsx34("span", { class: `${p30}-tab-badge`, "data-testid": TID.tabBadge, "aria-label": "Unread" }) : null
|
|
7327
7603
|
] }),
|
|
7328
|
-
/* @__PURE__ */
|
|
7604
|
+
/* @__PURE__ */ jsx34("span", { class: `${p30}-tab-label`, children: localizeText(strings, m.label) })
|
|
7329
7605
|
]
|
|
7330
7606
|
},
|
|
7331
7607
|
m.id
|
|
@@ -7334,12 +7610,12 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
|
7334
7610
|
}
|
|
7335
7611
|
|
|
7336
7612
|
// src/ui/iframe-view.tsx
|
|
7337
|
-
import { jsx as
|
|
7338
|
-
var
|
|
7613
|
+
import { jsx as jsx35, jsxs as jsxs29 } from "preact/jsx-runtime";
|
|
7614
|
+
var p31 = BRAND.cssPrefix;
|
|
7339
7615
|
var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
|
|
7340
7616
|
function IframeView({ url, title, strings, onBack, actions }) {
|
|
7341
|
-
return /* @__PURE__ */
|
|
7342
|
-
/* @__PURE__ */
|
|
7617
|
+
return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
|
|
7618
|
+
/* @__PURE__ */ jsx35(
|
|
7343
7619
|
BackHeader,
|
|
7344
7620
|
{
|
|
7345
7621
|
title: title || strings.moduleBack,
|
|
@@ -7348,10 +7624,10 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7348
7624
|
actions
|
|
7349
7625
|
}
|
|
7350
7626
|
),
|
|
7351
|
-
/* @__PURE__ */
|
|
7627
|
+
/* @__PURE__ */ jsx35(
|
|
7352
7628
|
"iframe",
|
|
7353
7629
|
{
|
|
7354
|
-
class: `${
|
|
7630
|
+
class: `${p31}-content-frame`,
|
|
7355
7631
|
src: url,
|
|
7356
7632
|
title: title || "content",
|
|
7357
7633
|
sandbox: SANDBOX,
|
|
@@ -7364,15 +7640,15 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7364
7640
|
}
|
|
7365
7641
|
|
|
7366
7642
|
// src/ui/content-view.tsx
|
|
7367
|
-
import { useCallback as useCallback3, useEffect as useEffect13, useState as
|
|
7368
|
-
import { jsx as
|
|
7369
|
-
var
|
|
7643
|
+
import { useCallback as useCallback3, useEffect as useEffect13, useState as useState12 } from "preact/hooks";
|
|
7644
|
+
import { jsx as jsx36, jsxs as jsxs30 } from "preact/jsx-runtime";
|
|
7645
|
+
var p32 = BRAND.cssPrefix;
|
|
7370
7646
|
var log15 = logger.scope("content");
|
|
7371
7647
|
var READ_DWELL_MS = 5e3;
|
|
7372
7648
|
function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
7373
|
-
const [item, setItem] =
|
|
7374
|
-
const [failed, setFailed] =
|
|
7375
|
-
const [reloadKey, setReloadKey] =
|
|
7649
|
+
const [item, setItem] = useState12(null);
|
|
7650
|
+
const [failed, setFailed] = useState12(false);
|
|
7651
|
+
const [reloadKey, setReloadKey] = useState12(0);
|
|
7376
7652
|
const retry = useCallback3(() => {
|
|
7377
7653
|
setFailed(false);
|
|
7378
7654
|
setItem(null);
|
|
@@ -7410,16 +7686,16 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7410
7686
|
[bus, id]
|
|
7411
7687
|
);
|
|
7412
7688
|
function renderBody() {
|
|
7413
|
-
if (failed) return /* @__PURE__ */
|
|
7414
|
-
if (item === null) return /* @__PURE__ */
|
|
7415
|
-
return /* @__PURE__ */
|
|
7416
|
-
item.image ? /* @__PURE__ */
|
|
7417
|
-
item.description ? /* @__PURE__ */
|
|
7418
|
-
/* @__PURE__ */
|
|
7689
|
+
if (failed) return /* @__PURE__ */ jsx36(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
|
|
7690
|
+
if (item === null) return /* @__PURE__ */ jsx36(ModuleState, { message: strings.contentLoading, strings });
|
|
7691
|
+
return /* @__PURE__ */ jsxs30("article", { class: `${p32}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
|
|
7692
|
+
item.image ? /* @__PURE__ */ jsx36("img", { class: `${p32}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
7693
|
+
item.description ? /* @__PURE__ */ jsx36("p", { class: `${p32}-content-subtitle`, children: item.description }) : null,
|
|
7694
|
+
/* @__PURE__ */ jsx36(StaticMarkdown, { text: item.content ?? "" })
|
|
7419
7695
|
] });
|
|
7420
7696
|
}
|
|
7421
|
-
return /* @__PURE__ */
|
|
7422
|
-
/* @__PURE__ */
|
|
7697
|
+
return /* @__PURE__ */ jsxs30("div", { class: `${p32}-module`, children: [
|
|
7698
|
+
/* @__PURE__ */ jsx36(
|
|
7423
7699
|
BackHeader,
|
|
7424
7700
|
{
|
|
7425
7701
|
title: item?.title || title || strings.moduleBack,
|
|
@@ -7429,19 +7705,19 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7429
7705
|
testid: TID.backHeader
|
|
7430
7706
|
}
|
|
7431
7707
|
),
|
|
7432
|
-
/* @__PURE__ */
|
|
7708
|
+
/* @__PURE__ */ jsx36("div", { class: `${p32}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
|
|
7433
7709
|
] });
|
|
7434
7710
|
}
|
|
7435
7711
|
|
|
7436
7712
|
// src/ui/messenger-home.tsx
|
|
7437
|
-
import { jsx as
|
|
7438
|
-
var
|
|
7713
|
+
import { jsx as jsx37, jsxs as jsxs31 } from "preact/jsx-runtime";
|
|
7714
|
+
var p33 = BRAND.cssPrefix;
|
|
7439
7715
|
function MessengerHome({
|
|
7440
7716
|
panelProps,
|
|
7441
7717
|
enabledModules,
|
|
7442
7718
|
nav,
|
|
7443
7719
|
bus,
|
|
7444
|
-
|
|
7720
|
+
hasUnread,
|
|
7445
7721
|
onSelectConversation,
|
|
7446
7722
|
onStartNewConversation,
|
|
7447
7723
|
onSetPanelSize
|
|
@@ -7506,12 +7782,12 @@ function MessengerHome({
|
|
|
7506
7782
|
bus,
|
|
7507
7783
|
panelProps
|
|
7508
7784
|
});
|
|
7509
|
-
const plainActions = /* @__PURE__ */
|
|
7785
|
+
const plainActions = /* @__PURE__ */ jsx37(HeaderActions, { panelProps, variant: "plain" });
|
|
7510
7786
|
if (activeModule) visitedRef.current.add(activeModule.id);
|
|
7511
7787
|
const visitedTabs = enabledModules.filter((m) => visitedRef.current.has(m.id));
|
|
7512
7788
|
const tabRoot = (module) => {
|
|
7513
7789
|
if (module.layout === "chat") {
|
|
7514
|
-
return /* @__PURE__ */
|
|
7790
|
+
return /* @__PURE__ */ jsx37(
|
|
7515
7791
|
PanelContent,
|
|
7516
7792
|
{
|
|
7517
7793
|
...panelProps,
|
|
@@ -7522,14 +7798,14 @@ function MessengerHome({
|
|
|
7522
7798
|
);
|
|
7523
7799
|
}
|
|
7524
7800
|
const Root = LAYOUTS[module.layout].Root;
|
|
7525
|
-
return Root ? /* @__PURE__ */
|
|
7801
|
+
return Root ? /* @__PURE__ */ jsx37(Root, { ...screenProps(module) }) : null;
|
|
7526
7802
|
};
|
|
7527
7803
|
const renderReader = () => {
|
|
7528
7804
|
if (top?.kind === "iframe") {
|
|
7529
|
-
return /* @__PURE__ */
|
|
7805
|
+
return /* @__PURE__ */ jsx37(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
|
|
7530
7806
|
}
|
|
7531
7807
|
if (top?.kind === "content") {
|
|
7532
|
-
return /* @__PURE__ */
|
|
7808
|
+
return /* @__PURE__ */ jsx37(
|
|
7533
7809
|
ContentView,
|
|
7534
7810
|
{
|
|
7535
7811
|
id: top.id,
|
|
@@ -7544,33 +7820,33 @@ function MessengerHome({
|
|
|
7544
7820
|
}
|
|
7545
7821
|
return null;
|
|
7546
7822
|
};
|
|
7547
|
-
return /* @__PURE__ */
|
|
7823
|
+
return /* @__PURE__ */ jsxs31(
|
|
7548
7824
|
"div",
|
|
7549
7825
|
{
|
|
7550
7826
|
ref: containerRef,
|
|
7551
|
-
class: `${
|
|
7827
|
+
class: `${p33}-panel ${p33}-messenger`,
|
|
7552
7828
|
role: "dialog",
|
|
7553
7829
|
"aria-modal": "false",
|
|
7554
7830
|
"aria-label": strings.panelTitle,
|
|
7555
7831
|
style: { position: "relative" },
|
|
7556
7832
|
"data-testid": TID.messengerHome,
|
|
7557
7833
|
children: [
|
|
7558
|
-
/* @__PURE__ */
|
|
7559
|
-
visitedTabs.map((m) => /* @__PURE__ */
|
|
7834
|
+
/* @__PURE__ */ jsxs31("div", { class: `${p33}-messenger-body`, children: [
|
|
7835
|
+
visitedTabs.map((m) => /* @__PURE__ */ jsx37("div", { class: `${p33}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
|
|
7560
7836
|
renderReader()
|
|
7561
7837
|
] }),
|
|
7562
|
-
showTabBar ? /* @__PURE__ */
|
|
7838
|
+
showTabBar ? /* @__PURE__ */ jsx37(
|
|
7563
7839
|
HomeTabBar,
|
|
7564
7840
|
{
|
|
7565
7841
|
modules: enabledModules,
|
|
7566
7842
|
activeTab: navState.activeTab,
|
|
7567
7843
|
strings,
|
|
7568
|
-
|
|
7844
|
+
hasUnread,
|
|
7569
7845
|
onSelect: nav.switchTab
|
|
7570
7846
|
}
|
|
7571
7847
|
) : null,
|
|
7572
|
-
/* @__PURE__ */
|
|
7573
|
-
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */
|
|
7848
|
+
/* @__PURE__ */ jsx37(PoweredByBar, { poweredBy: options.poweredBy }),
|
|
7849
|
+
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */ jsx37(
|
|
7574
7850
|
ResizeGrip,
|
|
7575
7851
|
{
|
|
7576
7852
|
panelEl: containerRef.current,
|
|
@@ -7587,40 +7863,40 @@ function MessengerHome({
|
|
|
7587
7863
|
}
|
|
7588
7864
|
|
|
7589
7865
|
// src/ui/modules-empty.tsx
|
|
7590
|
-
import { jsx as
|
|
7591
|
-
var
|
|
7866
|
+
import { jsx as jsx38, jsxs as jsxs32 } from "preact/jsx-runtime";
|
|
7867
|
+
var p34 = BRAND.cssPrefix;
|
|
7592
7868
|
function ModulesEmpty({ strings, onClose }) {
|
|
7593
|
-
return /* @__PURE__ */
|
|
7869
|
+
return /* @__PURE__ */ jsxs32(
|
|
7594
7870
|
"div",
|
|
7595
7871
|
{
|
|
7596
|
-
class: `${
|
|
7872
|
+
class: `${p34}-panel ${p34}-modules-empty`,
|
|
7597
7873
|
role: "dialog",
|
|
7598
7874
|
"aria-label": strings.panelTitle,
|
|
7599
7875
|
"data-testid": TID.modulesEmpty,
|
|
7600
7876
|
children: [
|
|
7601
|
-
onClose ? /* @__PURE__ */
|
|
7877
|
+
onClose ? /* @__PURE__ */ jsx38(
|
|
7602
7878
|
"button",
|
|
7603
7879
|
{
|
|
7604
7880
|
type: "button",
|
|
7605
|
-
class: `${
|
|
7881
|
+
class: `${p34}-icon-btn ${p34}-modules-empty-close`,
|
|
7606
7882
|
onClick: onClose,
|
|
7607
7883
|
"aria-label": strings.close,
|
|
7608
7884
|
title: strings.close,
|
|
7609
|
-
children: /* @__PURE__ */
|
|
7885
|
+
children: /* @__PURE__ */ jsx38(CloseIcon, {})
|
|
7610
7886
|
}
|
|
7611
7887
|
) : null,
|
|
7612
|
-
/* @__PURE__ */
|
|
7888
|
+
/* @__PURE__ */ jsx38("p", { class: `${p34}-modules-empty-text`, children: strings.modulesEmpty })
|
|
7613
7889
|
]
|
|
7614
7890
|
}
|
|
7615
7891
|
);
|
|
7616
7892
|
}
|
|
7617
7893
|
|
|
7618
7894
|
// src/ui/use-launcher-callout.ts
|
|
7619
|
-
import { useCallback as useCallback5, useEffect as useEffect15, useState as
|
|
7895
|
+
import { useCallback as useCallback5, useEffect as useEffect15, useState as useState13 } from "preact/hooks";
|
|
7620
7896
|
function useLauncherCallout({ callout, persistence }) {
|
|
7621
7897
|
const textKey = callout?.text ?? "";
|
|
7622
7898
|
const persistent = callout?.persistent ?? true;
|
|
7623
|
-
const [dismissed, setDismissed] =
|
|
7899
|
+
const [dismissed, setDismissed] = useState13(() => persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7624
7900
|
useEffect15(() => {
|
|
7625
7901
|
setDismissed(persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7626
7902
|
}, [textKey, persistent, persistence]);
|
|
@@ -7632,9 +7908,9 @@ function useLauncherCallout({ callout, persistence }) {
|
|
|
7632
7908
|
}
|
|
7633
7909
|
|
|
7634
7910
|
// src/ui/app.tsx
|
|
7635
|
-
import { jsx as
|
|
7911
|
+
import { jsx as jsx39, jsxs as jsxs33 } from "preact/jsx-runtime";
|
|
7636
7912
|
var log16 = logger.scope("app");
|
|
7637
|
-
var
|
|
7913
|
+
var p35 = BRAND.cssPrefix;
|
|
7638
7914
|
function makeLocalizedWelcome(w, strings) {
|
|
7639
7915
|
return makeInstantWelcomeMessage({ ...w, text: localizeText(strings, w.text) });
|
|
7640
7916
|
}
|
|
@@ -7649,21 +7925,21 @@ function isAbortError(error) {
|
|
|
7649
7925
|
return error instanceof DOMException ? error.name === "AbortError" : error?.name === "AbortError";
|
|
7650
7926
|
}
|
|
7651
7927
|
function App({ options, hostElement, bus }) {
|
|
7652
|
-
const [persistence] =
|
|
7928
|
+
const [persistence] = useState14(
|
|
7653
7929
|
() => createPersistence(options.widgetId, options.storage, options.aiAgentDeploymentId)
|
|
7654
7930
|
);
|
|
7655
|
-
const [visitorId, setVisitorId] =
|
|
7931
|
+
const [visitorId, setVisitorId] = useState14(() => persistence.getVisitorId());
|
|
7656
7932
|
const initialSettings = persistence.loadUserPrefs();
|
|
7657
|
-
const [activeLocale, setActiveLocale] =
|
|
7658
|
-
const [activeThemeMode, setActiveThemeMode] =
|
|
7933
|
+
const [activeLocale, setActiveLocale] = useState14(() => initialSettings.locale ?? options.locale);
|
|
7934
|
+
const [activeThemeMode, setActiveThemeMode] = useState14(
|
|
7659
7935
|
() => initialSettings.themeMode ?? options.themeMode
|
|
7660
7936
|
);
|
|
7661
|
-
const [activeTextSize, setActiveTextSize] =
|
|
7937
|
+
const [activeTextSize, setActiveTextSize] = useState14(() => initialSettings.textSize ?? options.textSize);
|
|
7662
7938
|
const conversationIdSig = useSignal(persistence.loadConversationId());
|
|
7663
7939
|
const messagesSig = useSignal([]);
|
|
7664
|
-
const
|
|
7665
|
-
const [loadingMessages, setLoadingMessages] =
|
|
7666
|
-
const [formMarkers, setFormMarkers] =
|
|
7940
|
+
const hasUnreadSig = useSignal(false);
|
|
7941
|
+
const [loadingMessages, setLoadingMessages] = useState14(false);
|
|
7942
|
+
const [formMarkers, setFormMarkers] = useState14([]);
|
|
7667
7943
|
function landingTab() {
|
|
7668
7944
|
const list = options.modules.list;
|
|
7669
7945
|
const ids = new Set(list.map((m) => m.id));
|
|
@@ -7682,15 +7958,15 @@ function App({ options, hostElement, bus }) {
|
|
|
7682
7958
|
const homeNav = homeNavRef.current;
|
|
7683
7959
|
const chatTabIdRef = useRef9(void 0);
|
|
7684
7960
|
chatTabIdRef.current = chatTabId();
|
|
7685
|
-
const [conversationReady, setConversationReady] =
|
|
7686
|
-
const [remoteForms, setRemoteForms] =
|
|
7687
|
-
const [formsReady, setFormsReady] =
|
|
7961
|
+
const [conversationReady, setConversationReady] = useState14(false);
|
|
7962
|
+
const [remoteForms, setRemoteForms] = useState14(null);
|
|
7963
|
+
const [formsReady, setFormsReady] = useState14(false);
|
|
7688
7964
|
const isInlineLike = options.mode === "standalone" || options.mode === "inline";
|
|
7689
7965
|
const initialPanelRef = useRef9(
|
|
7690
7966
|
resolveInitialPanelState(options, currentViewportWidth(), persistence.loadPanelOpen(), persistence.loadPanelSize())
|
|
7691
7967
|
);
|
|
7692
|
-
const [isOpen, setIsOpen] =
|
|
7693
|
-
const [activated, setActivated] =
|
|
7968
|
+
const [isOpen, setIsOpen] = useState14(initialPanelRef.current.panelOpen);
|
|
7969
|
+
const [activated, setActivated] = useState14(initialPanelRef.current.panelOpen);
|
|
7694
7970
|
const activatedRef = useRef9(activated);
|
|
7695
7971
|
activatedRef.current = activated;
|
|
7696
7972
|
const pendingThreadRef = useRef9(false);
|
|
@@ -7699,7 +7975,7 @@ function App({ options, hostElement, bus }) {
|
|
|
7699
7975
|
if (isOpen) setActivated(true);
|
|
7700
7976
|
}, [isOpen]);
|
|
7701
7977
|
const initialPanelApplied = useRef9(false);
|
|
7702
|
-
const [launcherLeaving, setLauncherLeaving] =
|
|
7978
|
+
const [launcherLeaving, setLauncherLeaving] = useState14(false);
|
|
7703
7979
|
const { dismissed: calloutDismissed, dismissCallout: dismissCalloutRaw } = useLauncherCallout({
|
|
7704
7980
|
callout: options.launcher.callout,
|
|
7705
7981
|
persistence
|
|
@@ -7710,21 +7986,21 @@ function App({ options, hostElement, bus }) {
|
|
|
7710
7986
|
bus.emit("calloutDismiss", void 0);
|
|
7711
7987
|
dismissCalloutRaw();
|
|
7712
7988
|
}, [bus, dismissCalloutRaw]);
|
|
7713
|
-
const [panelSize, setPanelSize] =
|
|
7989
|
+
const [panelSize, setPanelSize] = useState14(initialPanelRef.current.panelSize);
|
|
7714
7990
|
const initialSizeApplied = useRef9(false);
|
|
7715
|
-
const [view, setView] =
|
|
7716
|
-
const [canSend, setCanSend] =
|
|
7717
|
-
const [streaming, setStreaming] =
|
|
7718
|
-
const [agent, setAgent] =
|
|
7719
|
-
const [suggestions, setSuggestions] =
|
|
7720
|
-
const [activeCancel, setActiveCancel] =
|
|
7721
|
-
const [activeDetach, setActiveDetach] =
|
|
7991
|
+
const [view, setView] = useState14("chat");
|
|
7992
|
+
const [canSend, setCanSend] = useState14(true);
|
|
7993
|
+
const [streaming, setStreaming] = useState14(false);
|
|
7994
|
+
const [agent, setAgent] = useState14(null);
|
|
7995
|
+
const [suggestions, setSuggestions] = useState14([]);
|
|
7996
|
+
const [activeCancel, setActiveCancel] = useState14(null);
|
|
7997
|
+
const [activeDetach, setActiveDetach] = useState14(null);
|
|
7722
7998
|
const stringsRef = useRef9(options.strings);
|
|
7723
|
-
const [parsedSite, setParsedSite] =
|
|
7724
|
-
const [parsedBlocks, setParsedBlocks] =
|
|
7725
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
7726
|
-
const [formContext, setFormContext] =
|
|
7727
|
-
const [transport] =
|
|
7999
|
+
const [parsedSite, setParsedSite] = useState14(void 0);
|
|
8000
|
+
const [parsedBlocks, setParsedBlocks] = useState14(void 0);
|
|
8001
|
+
const [sidebarCollapsed, setSidebarCollapsed] = useState14(() => persistence.loadSidebarCollapsed() ?? false);
|
|
8002
|
+
const [formContext, setFormContext] = useState14({});
|
|
8003
|
+
const [transport] = useState14(
|
|
7728
8004
|
() => new AgentTransport({
|
|
7729
8005
|
agentApiBaseUrl: options.agentApiBaseUrl,
|
|
7730
8006
|
dataApiBaseUrl: options.dataApiBaseUrl,
|
|
@@ -7736,8 +8012,8 @@ function App({ options, hostElement, bus }) {
|
|
|
7736
8012
|
endpoints: options.endpoints
|
|
7737
8013
|
})
|
|
7738
8014
|
);
|
|
7739
|
-
const [reducer] =
|
|
7740
|
-
const [feedback] =
|
|
8015
|
+
const [reducer] = useState14(() => new StreamReducer(messagesSig));
|
|
8016
|
+
const [feedback] = useState14(() => new FeedbackBus(options.sound, options.haptics));
|
|
7741
8017
|
const patchAndSync = useCallback6(
|
|
7742
8018
|
(patch) => {
|
|
7743
8019
|
persistence.patchUserPrefs(patch);
|
|
@@ -8312,6 +8588,20 @@ function App({ options, hostElement, bus }) {
|
|
|
8312
8588
|
},
|
|
8313
8589
|
[streaming, messagesSig]
|
|
8314
8590
|
);
|
|
8591
|
+
const handleMessageFeedback = useCallback6(
|
|
8592
|
+
(messageId, value) => {
|
|
8593
|
+
log16.info("messageFeedback", { messageId, value });
|
|
8594
|
+
bus.emit("messageFeedback", { messageId, value });
|
|
8595
|
+
void transport.submitFeedback({ messageId, value });
|
|
8596
|
+
},
|
|
8597
|
+
[bus, transport]
|
|
8598
|
+
);
|
|
8599
|
+
const handleMessageSeen = useCallback6(
|
|
8600
|
+
(messageId) => {
|
|
8601
|
+
bus.emit("messageSeen", { messageId });
|
|
8602
|
+
},
|
|
8603
|
+
[bus]
|
|
8604
|
+
);
|
|
8315
8605
|
const toolInteraction = useMemo3(
|
|
8316
8606
|
() => ({
|
|
8317
8607
|
humanInLoop: options.features.humanInLoop,
|
|
@@ -8443,15 +8733,23 @@ function App({ options, hostElement, bus }) {
|
|
|
8443
8733
|
const refreshUnread = useCallback6(() => {
|
|
8444
8734
|
if (!options.modules.list.some((m) => m.layout === "chat")) return;
|
|
8445
8735
|
transport.listConversations({ limit: 50 }).then((res) => {
|
|
8446
|
-
|
|
8736
|
+
hasUnreadSig.value = res.conversations.some((c) => c.hasUnread);
|
|
8447
8737
|
}).catch((err) => log16.debug("refreshUnread failed (non-fatal)", { err }));
|
|
8448
|
-
}, [transport, options.modules,
|
|
8738
|
+
}, [transport, options.modules, hasUnreadSig]);
|
|
8449
8739
|
const unreadSeeded = useRef9(false);
|
|
8450
8740
|
useEffect16(() => {
|
|
8451
8741
|
if (!activated || !conversationReady || unreadSeeded.current) return;
|
|
8452
8742
|
unreadSeeded.current = true;
|
|
8453
8743
|
refreshUnread();
|
|
8454
8744
|
}, [activated, conversationReady, refreshUnread]);
|
|
8745
|
+
useEffect16(() => {
|
|
8746
|
+
if (!activated) return;
|
|
8747
|
+
const onVisible = () => {
|
|
8748
|
+
if (document.visibilityState === "visible") refreshUnread();
|
|
8749
|
+
};
|
|
8750
|
+
document.addEventListener("visibilitychange", onVisible);
|
|
8751
|
+
return () => document.removeEventListener("visibilitychange", onVisible);
|
|
8752
|
+
}, [activated, refreshUnread]);
|
|
8455
8753
|
const handleOpen = useCallback6(() => {
|
|
8456
8754
|
log16.info("open", { mode: options.mode });
|
|
8457
8755
|
feedback.unlock();
|
|
@@ -8684,7 +8982,9 @@ function App({ options, hostElement, bus }) {
|
|
|
8684
8982
|
// `openForm()` command, so it bypasses frequency dedupe by design.
|
|
8685
8983
|
onFormFill: (formId) => forms.fire("manual", formId),
|
|
8686
8984
|
tool: toolInteraction,
|
|
8687
|
-
onRetry: handleRetry
|
|
8985
|
+
onRetry: handleRetry,
|
|
8986
|
+
onMessageFeedback: handleMessageFeedback,
|
|
8987
|
+
onMessageSeen: handleMessageSeen
|
|
8688
8988
|
};
|
|
8689
8989
|
const onSelectConversation = (conversationId) => {
|
|
8690
8990
|
void handleSelectHistoryConversation(conversationId);
|
|
@@ -8696,19 +8996,19 @@ function App({ options, hostElement, bus }) {
|
|
|
8696
8996
|
const renderSurface = (size) => {
|
|
8697
8997
|
const closeable = isActionVisible("close", effectiveOptions.mode, size);
|
|
8698
8998
|
if (enabledModules.length === 0) {
|
|
8699
|
-
return /* @__PURE__ */
|
|
8999
|
+
return /* @__PURE__ */ jsx39(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
|
|
8700
9000
|
}
|
|
8701
9001
|
if (enabledModules.length === 1 && enabledModules[0]?.layout === "chat") {
|
|
8702
|
-
return /* @__PURE__ */
|
|
9002
|
+
return /* @__PURE__ */ jsx39(Panel, { ...panelProps, panelSize: size });
|
|
8703
9003
|
}
|
|
8704
|
-
return /* @__PURE__ */
|
|
9004
|
+
return /* @__PURE__ */ jsx39(
|
|
8705
9005
|
MessengerHome,
|
|
8706
9006
|
{
|
|
8707
9007
|
panelProps: { ...panelProps, panelSize: size, onClose: closeable ? handleClose : void 0 },
|
|
8708
9008
|
enabledModules,
|
|
8709
9009
|
nav: homeNav,
|
|
8710
9010
|
bus,
|
|
8711
|
-
|
|
9011
|
+
hasUnread: hasUnreadSig.value,
|
|
8712
9012
|
onSelectConversation,
|
|
8713
9013
|
onStartNewConversation: handleNewChat,
|
|
8714
9014
|
onSetPanelSize: setPanelSize
|
|
@@ -8720,7 +9020,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8720
9020
|
void handleSelectHistoryConversation(chat.conversationId);
|
|
8721
9021
|
};
|
|
8722
9022
|
const conversationsEnabled = enabledModules.some((m) => m.layout === "chat");
|
|
8723
|
-
return /* @__PURE__ */
|
|
9023
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: /* @__PURE__ */ jsx39(
|
|
8724
9024
|
PageShell,
|
|
8725
9025
|
{
|
|
8726
9026
|
site: parsedSite,
|
|
@@ -8741,15 +9041,15 @@ function App({ options, hostElement, bus }) {
|
|
|
8741
9041
|
}
|
|
8742
9042
|
if (isInlineLike) {
|
|
8743
9043
|
const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
|
|
8744
|
-
return /* @__PURE__ */
|
|
9044
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: renderSurface(inlineSize) });
|
|
8745
9045
|
}
|
|
8746
9046
|
const drawerEdgeTab = options.mode === "drawer";
|
|
8747
9047
|
const triggerOwnedByPage = options.mode === "modal";
|
|
8748
9048
|
const launcherVisible = !triggerOwnedByPage && !options.launcher.hidden && (!isOpen || launcherLeaving);
|
|
8749
9049
|
const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
|
|
8750
|
-
return /* @__PURE__ */
|
|
8751
|
-
isOpen || activated ? /* @__PURE__ */
|
|
8752
|
-
launcherVisible ? /* @__PURE__ */
|
|
9050
|
+
return /* @__PURE__ */ jsxs33("div", { class: `${p35}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
|
|
9051
|
+
isOpen || activated ? /* @__PURE__ */ jsx39("div", { class: `${p35}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
|
|
9052
|
+
launcherVisible ? /* @__PURE__ */ jsx39(
|
|
8753
9053
|
Launcher,
|
|
8754
9054
|
{
|
|
8755
9055
|
onToggle: handleOpen,
|
|
@@ -8759,7 +9059,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8759
9059
|
edgeTab: drawerEdgeTab
|
|
8760
9060
|
}
|
|
8761
9061
|
) : null,
|
|
8762
|
-
calloutToRender ? /* @__PURE__ */
|
|
9062
|
+
calloutToRender ? /* @__PURE__ */ jsx39(
|
|
8763
9063
|
LauncherCallout,
|
|
8764
9064
|
{
|
|
8765
9065
|
callout: calloutToRender,
|
|
@@ -8824,34 +9124,37 @@ var TRACKED = {
|
|
|
8824
9124
|
expand: (on) => ({ on }),
|
|
8825
9125
|
fullscreen: (on) => ({ on }),
|
|
8826
9126
|
// Conversation funnel. `send` is the key conversion; text never rides.
|
|
8827
|
-
send: (
|
|
8828
|
-
message: (
|
|
9127
|
+
send: (p36) => ({ attachments: p36.attachmentCount }),
|
|
9128
|
+
message: (p36) => ({ role: p36.role }),
|
|
8829
9129
|
stop: () => void 0,
|
|
8830
9130
|
clear: () => void 0,
|
|
8831
9131
|
suggestion: () => void 0,
|
|
8832
|
-
toggleHistory: (
|
|
9132
|
+
toggleHistory: (p36) => ({ view: p36.view }),
|
|
8833
9133
|
handshake: () => void 0,
|
|
8834
9134
|
// Forms + human-in-the-loop — ids and outcomes, never values.
|
|
8835
|
-
formSubmit: (
|
|
9135
|
+
formSubmit: (p36) => ({ formId: p36.formId, skipped: p36.skipped }),
|
|
8836
9136
|
toolResult: () => void 0,
|
|
8837
|
-
toolDecision: (
|
|
9137
|
+
toolDecision: (p36) => ({ approved: p36.approved }),
|
|
9138
|
+
// Feedback + read tracking — outcome only; message text never rides.
|
|
9139
|
+
messageFeedback: (p36) => ({ value: p36.value ?? "none" }),
|
|
9140
|
+
messageSeen: () => void 0,
|
|
8838
9141
|
// Content — ids, tags + counts only; titles/bodies never ride.
|
|
8839
|
-
contentView: (
|
|
8840
|
-
contentOpen: (
|
|
8841
|
-
contentSearch: (
|
|
8842
|
-
contentRead: (
|
|
8843
|
-
contentLinkClick: (
|
|
9142
|
+
contentView: (p36) => ({ section: p36.section, tags: p36.tags, count: p36.count }),
|
|
9143
|
+
contentOpen: (p36) => ({ contentId: p36.contentId, tags: p36.tags }),
|
|
9144
|
+
contentSearch: (p36) => ({ qlen: p36.queryLength, hits: p36.hitCount }),
|
|
9145
|
+
contentRead: (p36) => ({ contentId: p36.contentId }),
|
|
9146
|
+
contentLinkClick: (p36) => ({ contentId: p36.contentId }),
|
|
8844
9147
|
// Composer / attachments / voice.
|
|
8845
|
-
attach: (
|
|
9148
|
+
attach: (p36) => ({ count: p36.count, bytes: p36.totalBytes }),
|
|
8846
9149
|
voiceStart: () => void 0,
|
|
8847
|
-
voiceStop: (
|
|
9150
|
+
voiceStop: (p36) => ({ ms: p36.durationMs }),
|
|
8848
9151
|
voiceCancel: () => void 0,
|
|
8849
9152
|
// Preferences — how visitors tune the surface.
|
|
8850
9153
|
localeChange: (locale) => ({ locale }),
|
|
8851
9154
|
themeChange: (theme) => ({ theme }),
|
|
8852
9155
|
textSizeChange: (size) => ({ size }),
|
|
8853
|
-
soundToggle: (
|
|
8854
|
-
sidebarToggle: (
|
|
9156
|
+
soundToggle: (p36) => ({ muted: p36.muted }),
|
|
9157
|
+
sidebarToggle: (p36) => ({ collapsed: p36.collapsed }),
|
|
8855
9158
|
calloutDismiss: () => void 0,
|
|
8856
9159
|
// Health signal only — the error object itself never leaves the page.
|
|
8857
9160
|
error: () => void 0
|