@helpai/elements 0.54.2 → 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 +787 -485
- 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 +784 -485
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";
|
|
@@ -1795,8 +1819,8 @@ 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
|
|
1799
|
-
import { batch, useComputed as
|
|
1822
|
+
import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as useState14 } from "preact/hooks";
|
|
1823
|
+
import { batch, useComputed as useComputed9, useSignal } from "@preact/signals";
|
|
1800
1824
|
|
|
1801
1825
|
// src/core/handshake-shape.ts
|
|
1802
1826
|
function isPlainObject2(raw) {
|
|
@@ -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
|
|
@@ -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
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -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`,
|
|
@@ -4896,8 +4966,8 @@ 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
|
|
4900
|
-
import { useComputed as
|
|
4969
|
+
import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState7 } from "preact/hooks";
|
|
4970
|
+
import { useComputed as useComputed7 } from "@preact/signals";
|
|
4901
4971
|
|
|
4902
4972
|
// src/ui/form/dynamic-form.tsx
|
|
4903
4973
|
import { useState as useState5 } from "preact/hooks";
|
|
@@ -5293,7 +5363,7 @@ function FormDoneMarker({
|
|
|
5293
5363
|
}
|
|
5294
5364
|
|
|
5295
5365
|
// src/ui/message-bubble.tsx
|
|
5296
|
-
import { useComputed as
|
|
5366
|
+
import { useComputed as useComputed6 } from "@preact/signals";
|
|
5297
5367
|
|
|
5298
5368
|
// src/stream/constants.ts
|
|
5299
5369
|
function isAskUserQuestionsTool(toolName2) {
|
|
@@ -5373,29 +5443,74 @@ 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
|
|
|
5393
5507
|
// src/ui/tool-approval.tsx
|
|
5394
|
-
import { useComputed as
|
|
5508
|
+
import { useComputed as useComputed3 } from "@preact/signals";
|
|
5395
5509
|
|
|
5396
5510
|
// src/ui/tool-card.tsx
|
|
5397
|
-
import {
|
|
5398
|
-
|
|
5511
|
+
import { useComputed as useComputed2 } from "@preact/signals";
|
|
5512
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
|
|
5513
|
+
var p14 = BRAND.cssPrefix;
|
|
5399
5514
|
function toolName(raw) {
|
|
5400
5515
|
if (raw.startsWith("tool:")) return raw.slice(5);
|
|
5401
5516
|
if (raw.startsWith("tool-")) return raw.slice(5);
|
|
@@ -5415,9 +5530,9 @@ function statusOf(state, approval) {
|
|
|
5415
5530
|
return "running";
|
|
5416
5531
|
}
|
|
5417
5532
|
function StatusIcon({ status }) {
|
|
5418
|
-
if (status === "denied" || status === "error" || status === "superseded") return /* @__PURE__ */
|
|
5419
|
-
if (status === "completed" || status === "responded") return /* @__PURE__ */
|
|
5420
|
-
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, {});
|
|
5421
5536
|
}
|
|
5422
5537
|
function statusLabel(status, strings) {
|
|
5423
5538
|
switch (status) {
|
|
@@ -5445,8 +5560,8 @@ function ToolStatus({
|
|
|
5445
5560
|
}) {
|
|
5446
5561
|
const base = statusOf(state, approval);
|
|
5447
5562
|
const status = superseded && (base === "awaiting" || base === "running") ? "superseded" : base;
|
|
5448
|
-
return /* @__PURE__ */
|
|
5449
|
-
/* @__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 }) }),
|
|
5450
5565
|
statusLabel(status, strings)
|
|
5451
5566
|
] });
|
|
5452
5567
|
}
|
|
@@ -5457,19 +5572,46 @@ function ToolHeaderRow({
|
|
|
5457
5572
|
strings,
|
|
5458
5573
|
superseded
|
|
5459
5574
|
}) {
|
|
5460
|
-
return /* @__PURE__ */
|
|
5461
|
-
/* @__PURE__ */
|
|
5462
|
-
/* @__PURE__ */
|
|
5463
|
-
/* @__PURE__ */
|
|
5464
|
-
/* @__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, {}) })
|
|
5580
|
+
] });
|
|
5581
|
+
}
|
|
5582
|
+
function ToolCollapsibleCard({
|
|
5583
|
+
part,
|
|
5584
|
+
strings,
|
|
5585
|
+
testid,
|
|
5586
|
+
superseded
|
|
5587
|
+
}) {
|
|
5588
|
+
const input = useComputed2(() => part.inputSig.value);
|
|
5589
|
+
const output = useComputed2(() => part.outputSig.value);
|
|
5590
|
+
const error = useComputed2(() => part.errorSig.value);
|
|
5591
|
+
const state = useComputed2(() => part.stateSig.value);
|
|
5592
|
+
const approval = useComputed2(() => part.approvalSig.value);
|
|
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(
|
|
5595
|
+
ToolHeaderRow,
|
|
5596
|
+
{
|
|
5597
|
+
name: toolName(part.toolName),
|
|
5598
|
+
state: state.value,
|
|
5599
|
+
approval: approval.value,
|
|
5600
|
+
strings,
|
|
5601
|
+
superseded
|
|
5602
|
+
}
|
|
5603
|
+
) }),
|
|
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
|
|
5465
5607
|
] });
|
|
5466
5608
|
}
|
|
5467
5609
|
function ToolSection({ label, value, error }) {
|
|
5468
5610
|
const text = error ? String(value ?? "") : pretty(unwrapResult(value));
|
|
5469
5611
|
if (!text) return null;
|
|
5470
|
-
return /* @__PURE__ */
|
|
5471
|
-
/* @__PURE__ */
|
|
5472
|
-
/* @__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 })
|
|
5473
5615
|
] });
|
|
5474
5616
|
}
|
|
5475
5617
|
function unwrapResult(output) {
|
|
@@ -5491,83 +5633,67 @@ function pretty(value) {
|
|
|
5491
5633
|
}
|
|
5492
5634
|
|
|
5493
5635
|
// src/ui/tool-approval.tsx
|
|
5494
|
-
import { Fragment as Fragment3, jsx as
|
|
5495
|
-
var
|
|
5636
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
|
|
5637
|
+
var p15 = BRAND.cssPrefix;
|
|
5496
5638
|
function ToolApproval({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5497
|
-
const approval =
|
|
5498
|
-
const state =
|
|
5499
|
-
const input = useComputed2(() => part.inputSig.value);
|
|
5500
|
-
const output = useComputed2(() => part.outputSig.value);
|
|
5501
|
-
const error = useComputed2(() => part.errorSig.value);
|
|
5639
|
+
const approval = useComputed3(() => part.approvalSig.value);
|
|
5640
|
+
const state = useComputed3(() => part.stateSig.value);
|
|
5502
5641
|
const name = toolName(part.toolName);
|
|
5503
5642
|
const approved = approval.value?.approved;
|
|
5504
5643
|
const { terminal, responded, decided } = toolDecisionState(state.value, approval.value);
|
|
5505
5644
|
const editable = responded && active && !terminal;
|
|
5506
5645
|
const skipped = superseded && !decided;
|
|
5507
5646
|
const id = part.toolCallId;
|
|
5508
|
-
return /* @__PURE__ */
|
|
5509
|
-
/* @__PURE__ */
|
|
5510
|
-
|
|
5511
|
-
ToolHeaderRow,
|
|
5512
|
-
{
|
|
5513
|
-
name,
|
|
5514
|
-
state: state.value,
|
|
5515
|
-
approval: approval.value,
|
|
5516
|
-
strings,
|
|
5517
|
-
superseded: skipped
|
|
5518
|
-
}
|
|
5519
|
-
) }),
|
|
5520
|
-
/* @__PURE__ */ jsx15(ToolSection, { label: strings.toolParameters, value: input.value }),
|
|
5521
|
-
output.value !== void 0 ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.toolResult, value: output.value }) : null,
|
|
5522
|
-
error.value ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
|
|
5523
|
-
] }),
|
|
5524
|
-
skipped || terminal ? null : /* @__PURE__ */ jsxs12("div", { class: `${p14}-toolui ${p14}-toolui-body`, children: [
|
|
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: [
|
|
5525
5650
|
responded ? (
|
|
5526
5651
|
// DECIDED — lead with the recorded response (no repeated prompt/body), so the card barely
|
|
5527
5652
|
// changes height from the awaiting state and the Edit sits right under the edit hint.
|
|
5528
|
-
/* @__PURE__ */
|
|
5529
|
-
/* @__PURE__ */
|
|
5653
|
+
/* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
5654
|
+
/* @__PURE__ */ jsxs13("p", { class: `${p15}-toolui-prompt`, children: [
|
|
5530
5655
|
strings.approvalYourResponse.replace("{decision}", approved ? strings.approve : strings.reject),
|
|
5531
5656
|
approval.value?.reason ? ` \u2014 ${approval.value.reason}` : ""
|
|
5532
5657
|
] }),
|
|
5533
|
-
editable ? /* @__PURE__ */
|
|
5534
|
-
!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
|
|
5535
5660
|
] })
|
|
5536
5661
|
) : (
|
|
5537
5662
|
// AWAITING — the prompt + what to do, then Reject / Approve.
|
|
5538
|
-
/* @__PURE__ */
|
|
5539
|
-
/* @__PURE__ */
|
|
5540
|
-
/* @__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 })
|
|
5541
5666
|
] })
|
|
5542
5667
|
),
|
|
5543
|
-
!decided && active ? /* @__PURE__ */
|
|
5544
|
-
/* @__PURE__ */
|
|
5668
|
+
!decided && active ? /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui-actions`, children: [
|
|
5669
|
+
/* @__PURE__ */ jsx16(
|
|
5545
5670
|
"button",
|
|
5546
5671
|
{
|
|
5547
5672
|
type: "button",
|
|
5548
|
-
class: `${
|
|
5673
|
+
class: `${p15}-form-skip`,
|
|
5549
5674
|
onClick: () => onDecision(id, false),
|
|
5550
5675
|
"data-testid": TID.toolReject,
|
|
5551
5676
|
children: strings.reject
|
|
5552
5677
|
}
|
|
5553
5678
|
),
|
|
5554
|
-
/* @__PURE__ */
|
|
5679
|
+
/* @__PURE__ */ jsx16(
|
|
5555
5680
|
"button",
|
|
5556
5681
|
{
|
|
5557
5682
|
type: "button",
|
|
5558
|
-
class: `${
|
|
5683
|
+
class: `${p15}-form-submit`,
|
|
5559
5684
|
onClick: () => onDecision(id, true),
|
|
5560
5685
|
"data-testid": TID.toolApprove,
|
|
5561
5686
|
children: strings.approve
|
|
5562
5687
|
}
|
|
5563
5688
|
)
|
|
5564
|
-
] }) :
|
|
5689
|
+
] }) : null,
|
|
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
|
|
5565
5691
|
] })
|
|
5566
5692
|
] });
|
|
5567
5693
|
}
|
|
5568
5694
|
|
|
5569
5695
|
// src/ui/tool-ask-questions.tsx
|
|
5570
|
-
import { useComputed as
|
|
5696
|
+
import { useComputed as useComputed4 } from "@preact/signals";
|
|
5571
5697
|
|
|
5572
5698
|
// src/ui/form/field.ts
|
|
5573
5699
|
var QUESTION_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -5636,26 +5762,26 @@ function str(v) {
|
|
|
5636
5762
|
}
|
|
5637
5763
|
|
|
5638
5764
|
// src/ui/tool-ask-questions.tsx
|
|
5639
|
-
import { Fragment as Fragment4, jsx as
|
|
5640
|
-
var
|
|
5765
|
+
import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
|
|
5766
|
+
var p16 = BRAND.cssPrefix;
|
|
5641
5767
|
function ToolAskQuestions({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5642
|
-
const state =
|
|
5643
|
-
const approval =
|
|
5644
|
-
const request =
|
|
5768
|
+
const state = useComputed4(() => part.stateSig.value);
|
|
5769
|
+
const approval = useComputed4(() => part.approvalSig.value);
|
|
5770
|
+
const request = useComputed4(() => parseAskUserQuestions(part.inputSig.value));
|
|
5645
5771
|
const { terminal, responded, decided } = toolDecisionState(state.value, approval.value);
|
|
5646
5772
|
const req = request.value;
|
|
5647
5773
|
if (decided) {
|
|
5648
5774
|
const editable = responded && active && !terminal;
|
|
5649
|
-
return /* @__PURE__ */
|
|
5775
|
+
return /* @__PURE__ */ jsx17(DecidedCard, { part, strings, req, editable, onEdit: () => onEdit(part.toolCallId) });
|
|
5650
5776
|
}
|
|
5651
5777
|
const stale = superseded;
|
|
5652
|
-
return /* @__PURE__ */
|
|
5653
|
-
/* @__PURE__ */
|
|
5654
|
-
/* @__PURE__ */
|
|
5655
|
-
/* @__PURE__ */
|
|
5656
|
-
] }) : /* @__PURE__ */
|
|
5657
|
-
req.intro ? /* @__PURE__ */
|
|
5658
|
-
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(
|
|
5659
5785
|
AskBody,
|
|
5660
5786
|
{
|
|
5661
5787
|
req,
|
|
@@ -5672,7 +5798,7 @@ function AskBody({
|
|
|
5672
5798
|
}) {
|
|
5673
5799
|
const fields = askQuestionsToFields(req, strings.confirmYes, strings.confirmNo);
|
|
5674
5800
|
const loneTextarea = req.questions.length === 1 && req.questions[0]?.type === "text";
|
|
5675
|
-
return /* @__PURE__ */
|
|
5801
|
+
return /* @__PURE__ */ jsx17(
|
|
5676
5802
|
DynamicForm,
|
|
5677
5803
|
{
|
|
5678
5804
|
fields,
|
|
@@ -5704,23 +5830,23 @@ function DecidedCard({
|
|
|
5704
5830
|
editable,
|
|
5705
5831
|
onEdit
|
|
5706
5832
|
}) {
|
|
5707
|
-
const approval =
|
|
5833
|
+
const approval = useComputed4(() => part.approvalSig.value);
|
|
5708
5834
|
const skipped = approval.value?.approved === false;
|
|
5709
5835
|
const answers = approval.value?.approved ? parseAnswers(approval.value.reason) : {};
|
|
5710
|
-
return /* @__PURE__ */
|
|
5711
|
-
/* @__PURE__ */
|
|
5712
|
-
/* @__PURE__ */
|
|
5713
|
-
/* @__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 })
|
|
5714
5840
|
] }),
|
|
5715
|
-
req.intro ? /* @__PURE__ */
|
|
5841
|
+
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5716
5842
|
req.questions.map((q) => {
|
|
5717
5843
|
const text = skipped ? "" : answers[q.key] ?? "";
|
|
5718
|
-
return /* @__PURE__ */
|
|
5719
|
-
/* @__PURE__ */
|
|
5720
|
-
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
|
|
5721
5847
|
] }, q.key);
|
|
5722
5848
|
}),
|
|
5723
|
-
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
|
|
5724
5850
|
] });
|
|
5725
5851
|
}
|
|
5726
5852
|
function parseAnswers(reason) {
|
|
@@ -5745,35 +5871,19 @@ function parseAnswers(reason) {
|
|
|
5745
5871
|
}
|
|
5746
5872
|
|
|
5747
5873
|
// src/ui/tool-call.tsx
|
|
5748
|
-
import { useComputed as
|
|
5749
|
-
import { jsx as
|
|
5750
|
-
var p16 = BRAND.cssPrefix;
|
|
5874
|
+
import { useComputed as useComputed5 } from "@preact/signals";
|
|
5875
|
+
import { jsx as jsx18 } from "preact/jsx-runtime";
|
|
5751
5876
|
function ToolCall({ part, strings }) {
|
|
5752
|
-
const input =
|
|
5753
|
-
const output =
|
|
5754
|
-
const error =
|
|
5755
|
-
const
|
|
5756
|
-
const approval = useComputed4(() => part.approvalSig.value);
|
|
5757
|
-
const hasDetails = useComputed4(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
|
|
5877
|
+
const input = useComputed5(() => part.inputSig.value);
|
|
5878
|
+
const output = useComputed5(() => part.outputSig.value);
|
|
5879
|
+
const error = useComputed5(() => part.errorSig.value);
|
|
5880
|
+
const hasDetails = useComputed5(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
|
|
5758
5881
|
if (!hasDetails.value) return null;
|
|
5759
|
-
return /* @__PURE__ */
|
|
5760
|
-
/* @__PURE__ */ jsx17("summary", { class: `${p16}-toolui-head`, children: /* @__PURE__ */ jsx17(
|
|
5761
|
-
ToolHeaderRow,
|
|
5762
|
-
{
|
|
5763
|
-
name: toolName(part.toolName),
|
|
5764
|
-
state: state.value,
|
|
5765
|
-
approval: approval.value,
|
|
5766
|
-
strings
|
|
5767
|
-
}
|
|
5768
|
-
) }),
|
|
5769
|
-
/* @__PURE__ */ jsx17(ToolSection, { label: strings.toolParameters, value: input.value }),
|
|
5770
|
-
output.value !== void 0 ? /* @__PURE__ */ jsx17(ToolSection, { label: strings.toolResult, value: output.value }) : null,
|
|
5771
|
-
error.value ? /* @__PURE__ */ jsx17(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
|
|
5772
|
-
] });
|
|
5882
|
+
return /* @__PURE__ */ jsx18(ToolCollapsibleCard, { part, strings, testid: TID.toolCall });
|
|
5773
5883
|
}
|
|
5774
5884
|
|
|
5775
5885
|
// src/ui/message-bubble.tsx
|
|
5776
|
-
import { jsx as
|
|
5886
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "preact/jsx-runtime";
|
|
5777
5887
|
var p17 = BRAND.cssPrefix;
|
|
5778
5888
|
function MessageBubble({
|
|
5779
5889
|
message,
|
|
@@ -5785,19 +5895,21 @@ function MessageBubble({
|
|
|
5785
5895
|
interactive = false,
|
|
5786
5896
|
superseded = false,
|
|
5787
5897
|
tool,
|
|
5788
|
-
onRetry
|
|
5898
|
+
onRetry,
|
|
5899
|
+
enableMessageFeedback = false,
|
|
5900
|
+
onFeedback
|
|
5789
5901
|
}) {
|
|
5790
|
-
const parts =
|
|
5902
|
+
const parts = useComputed6(() => message.partsSig.value);
|
|
5791
5903
|
const partList = parts.value;
|
|
5792
|
-
const emptyReply =
|
|
5793
|
-
const hideCanceledHusk =
|
|
5794
|
-
const hasAnswerText =
|
|
5904
|
+
const emptyReply = useComputed6(() => isEmptyAssistantReply(message));
|
|
5905
|
+
const hideCanceledHusk = useComputed6(() => isHiddenCanceledTurn(message));
|
|
5906
|
+
const hasAnswerText = useComputed6(
|
|
5795
5907
|
() => message.partsSig.value.some((part) => part.kind === "text" && part.textSig.value.length > 0)
|
|
5796
5908
|
);
|
|
5797
|
-
const reasoningVisible =
|
|
5909
|
+
const reasoningVisible = useComputed6(
|
|
5798
5910
|
() => showReasoning && message.partsSig.value.some((part) => part.kind === "reasoning")
|
|
5799
5911
|
);
|
|
5800
|
-
const lastOutputIdx =
|
|
5912
|
+
const lastOutputIdx = useComputed6(() => {
|
|
5801
5913
|
const list = message.partsSig.value;
|
|
5802
5914
|
let idx = -1;
|
|
5803
5915
|
for (let i = 0; i < list.length; i++) {
|
|
@@ -5812,31 +5924,50 @@ function MessageBubble({
|
|
|
5812
5924
|
const showStreamDots = streaming && !bufferedHold && !(reasoningVisible.value && working);
|
|
5813
5925
|
if (hideCanceledHusk.value) return null;
|
|
5814
5926
|
const stamp = formatStamp(message.createdAt);
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
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
|
+
);
|
|
5840
5971
|
}
|
|
5841
5972
|
function formatStamp(createdAt) {
|
|
5842
5973
|
if (typeof createdAt !== "number" || !Number.isFinite(createdAt)) return null;
|
|
@@ -5866,11 +5997,11 @@ function PartView({
|
|
|
5866
5997
|
case "step-start":
|
|
5867
5998
|
return null;
|
|
5868
5999
|
case "text":
|
|
5869
|
-
return /* @__PURE__ */
|
|
6000
|
+
return /* @__PURE__ */ jsx19(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig });
|
|
5870
6001
|
case "reasoning":
|
|
5871
|
-
return showReasoning ? /* @__PURE__ */
|
|
6002
|
+
return showReasoning ? /* @__PURE__ */ jsx19(ReasoningView, { part, active, strings }) : null;
|
|
5872
6003
|
case "tool":
|
|
5873
|
-
return /* @__PURE__ */
|
|
6004
|
+
return /* @__PURE__ */ jsx19(
|
|
5874
6005
|
ToolPartView,
|
|
5875
6006
|
{
|
|
5876
6007
|
part,
|
|
@@ -5883,11 +6014,11 @@ function PartView({
|
|
|
5883
6014
|
);
|
|
5884
6015
|
case "file":
|
|
5885
6016
|
if (part.mediaType.startsWith("image/")) {
|
|
5886
|
-
return /* @__PURE__ */
|
|
6017
|
+
return /* @__PURE__ */ jsx19("img", { src: part.url, alt: "", loading: "lazy" });
|
|
5887
6018
|
}
|
|
5888
|
-
return /* @__PURE__ */
|
|
6019
|
+
return /* @__PURE__ */ jsx19("a", { href: part.url, target: "_blank", rel: "noreferrer noopener", children: part.url });
|
|
5889
6020
|
case "source":
|
|
5890
|
-
return showSources ? /* @__PURE__ */
|
|
6021
|
+
return showSources ? /* @__PURE__ */ jsx19(SourceView, { part, strings }) : null;
|
|
5891
6022
|
}
|
|
5892
6023
|
}
|
|
5893
6024
|
function ToolPartView({
|
|
@@ -5898,10 +6029,10 @@ function ToolPartView({
|
|
|
5898
6029
|
superseded,
|
|
5899
6030
|
tool
|
|
5900
6031
|
}) {
|
|
5901
|
-
const hasApproval =
|
|
6032
|
+
const hasApproval = useComputed6(() => part.approvalSig.value !== void 0);
|
|
5902
6033
|
if (tool?.humanInLoop) {
|
|
5903
6034
|
if (isAskUserQuestionsTool(part.toolName)) {
|
|
5904
|
-
return /* @__PURE__ */
|
|
6035
|
+
return /* @__PURE__ */ jsx19(
|
|
5905
6036
|
ToolAskQuestions,
|
|
5906
6037
|
{
|
|
5907
6038
|
part,
|
|
@@ -5914,7 +6045,7 @@ function ToolPartView({
|
|
|
5914
6045
|
);
|
|
5915
6046
|
}
|
|
5916
6047
|
if (hasApproval.value) {
|
|
5917
|
-
return /* @__PURE__ */
|
|
6048
|
+
return /* @__PURE__ */ jsx19(
|
|
5918
6049
|
ToolApproval,
|
|
5919
6050
|
{
|
|
5920
6051
|
part,
|
|
@@ -5927,7 +6058,7 @@ function ToolPartView({
|
|
|
5927
6058
|
);
|
|
5928
6059
|
}
|
|
5929
6060
|
}
|
|
5930
|
-
return showToolCalls ? /* @__PURE__ */
|
|
6061
|
+
return showToolCalls ? /* @__PURE__ */ jsx19(ToolCall, { part, strings }) : null;
|
|
5931
6062
|
}
|
|
5932
6063
|
function ReasoningView({
|
|
5933
6064
|
part,
|
|
@@ -5935,8 +6066,8 @@ function ReasoningView({
|
|
|
5935
6066
|
strings
|
|
5936
6067
|
}) {
|
|
5937
6068
|
return /* @__PURE__ */ jsxs15("details", { class: `${p17}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
|
|
5938
|
-
/* @__PURE__ */
|
|
5939
|
-
/* @__PURE__ */
|
|
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 }) })
|
|
5940
6071
|
] });
|
|
5941
6072
|
}
|
|
5942
6073
|
function partKey(part) {
|
|
@@ -5955,23 +6086,25 @@ function partKey(part) {
|
|
|
5955
6086
|
}
|
|
5956
6087
|
function TypingDots() {
|
|
5957
6088
|
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-typing`, "aria-hidden": "true", children: [
|
|
5958
|
-
/* @__PURE__ */
|
|
5959
|
-
/* @__PURE__ */
|
|
5960
|
-
/* @__PURE__ */
|
|
6089
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6090
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6091
|
+
/* @__PURE__ */ jsx19("span", {})
|
|
5961
6092
|
] });
|
|
5962
6093
|
}
|
|
5963
6094
|
function LoadingSpinner({ label }) {
|
|
5964
6095
|
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-loading`, role: "status", children: [
|
|
5965
|
-
/* @__PURE__ */
|
|
5966
|
-
/* @__PURE__ */
|
|
6096
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-spinner`, "aria-hidden": "true" }),
|
|
6097
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-label`, children: label })
|
|
5967
6098
|
] });
|
|
5968
6099
|
}
|
|
5969
6100
|
|
|
5970
6101
|
// src/ui/message-list.tsx
|
|
5971
|
-
import { jsx as
|
|
6102
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "preact/jsx-runtime";
|
|
5972
6103
|
var p18 = BRAND.cssPrefix;
|
|
5973
6104
|
var STICK_THRESHOLD = 120;
|
|
5974
6105
|
var INTERACTION_GRACE_MS = 350;
|
|
6106
|
+
var TURN_TOP_PAD = 12;
|
|
6107
|
+
var TURN_GAP = 8;
|
|
5975
6108
|
function MessageList({
|
|
5976
6109
|
messagesSig,
|
|
5977
6110
|
strings,
|
|
@@ -5979,6 +6112,11 @@ function MessageList({
|
|
|
5979
6112
|
showReasoning,
|
|
5980
6113
|
showToolCalls,
|
|
5981
6114
|
showSources,
|
|
6115
|
+
scrollFade,
|
|
6116
|
+
scrollAnchor,
|
|
6117
|
+
enableMessageFeedback,
|
|
6118
|
+
onFeedback,
|
|
6119
|
+
onMessageSeen,
|
|
5982
6120
|
loading,
|
|
5983
6121
|
idle,
|
|
5984
6122
|
tool,
|
|
@@ -5988,17 +6126,40 @@ function MessageList({
|
|
|
5988
6126
|
onFillForm
|
|
5989
6127
|
}) {
|
|
5990
6128
|
const ref = useRef5(null);
|
|
5991
|
-
const messages =
|
|
5992
|
-
const [showJump, setShowJump] =
|
|
6129
|
+
const messages = useComputed7(() => messagesSig.value);
|
|
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);
|
|
5993
6135
|
const hasHydratedRef = useRef5(false);
|
|
5994
6136
|
const detachedRef = useRef5(false);
|
|
5995
6137
|
const interactingRef = useRef5(false);
|
|
5996
6138
|
const interactionEndedAtRef = useRef5(0);
|
|
5997
6139
|
const inInteractionGrace = () => interactingRef.current || performance.now() - interactionEndedAtRef.current < INTERACTION_GRACE_MS;
|
|
5998
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
|
+
};
|
|
5999
6159
|
const pinBottom = (el) => {
|
|
6000
6160
|
autoPinAtRef.current = performance.now();
|
|
6001
6161
|
el.scrollTop = el.scrollHeight;
|
|
6162
|
+
syncFade(el);
|
|
6002
6163
|
};
|
|
6003
6164
|
const pinBottomSoon = (el, frames) => {
|
|
6004
6165
|
pinBottom(el);
|
|
@@ -6035,13 +6196,50 @@ function MessageList({
|
|
|
6035
6196
|
timerId = setTimeout(stop, ms);
|
|
6036
6197
|
return stop;
|
|
6037
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
|
+
};
|
|
6038
6234
|
const firstMessageId = messages.value[0]?.id;
|
|
6039
6235
|
useLayoutEffect2(() => {
|
|
6040
6236
|
const el = ref.current;
|
|
6041
6237
|
if (!el) return;
|
|
6042
6238
|
if (messages.value.length === 0) return;
|
|
6043
6239
|
hasHydratedRef.current = true;
|
|
6240
|
+
for (const m of messages.value) if (m.role === "assistant") seenRef.current.add(key(m));
|
|
6044
6241
|
if (!messages.value.some((m) => m.role === "user")) return;
|
|
6242
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6045
6243
|
return pinBottomThroughLayout(el, 300);
|
|
6046
6244
|
}, [firstMessageId]);
|
|
6047
6245
|
const prevLengthRef = useRef5(0);
|
|
@@ -6054,10 +6252,17 @@ function MessageList({
|
|
|
6054
6252
|
if (!hasHydratedRef.current) return;
|
|
6055
6253
|
if (list.slice(prevLength).some((m) => m.role === "user")) {
|
|
6056
6254
|
detachedRef.current = false;
|
|
6255
|
+
setNewCount(0);
|
|
6256
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6057
6257
|
return pinBottomSoon(el, 3);
|
|
6058
6258
|
}
|
|
6059
6259
|
if (!list.some((m) => m.role === "user")) return;
|
|
6060
|
-
if (
|
|
6260
|
+
if (scrollAnchor === "turn") {
|
|
6261
|
+
updateTurnSpacer(el);
|
|
6262
|
+
recomputeNewCount(el);
|
|
6263
|
+
return;
|
|
6264
|
+
}
|
|
6265
|
+
if (detachedRef.current || inInteractionGrace()) return recomputeNewCount(el);
|
|
6061
6266
|
const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
6062
6267
|
if (distanceFromBottom < STICK_THRESHOLD) pinBottom(el);
|
|
6063
6268
|
}, [messages.value.length]);
|
|
@@ -6071,6 +6276,7 @@ function MessageList({
|
|
|
6071
6276
|
if (!hasHydratedRef.current) return;
|
|
6072
6277
|
if (!last || last.id !== prevLastId || last.status !== "streaming") return;
|
|
6073
6278
|
detachedRef.current = false;
|
|
6279
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6074
6280
|
return pinBottomSoon(el, 3);
|
|
6075
6281
|
}, [messages.value]);
|
|
6076
6282
|
useEffect7(() => {
|
|
@@ -6079,6 +6285,19 @@ function MessageList({
|
|
|
6079
6285
|
const last = messages.value.at(-1);
|
|
6080
6286
|
if (!last) return;
|
|
6081
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
|
+
}
|
|
6082
6301
|
const pinIfNear = () => {
|
|
6083
6302
|
if (detachedRef.current || inInteractionGrace()) return;
|
|
6084
6303
|
const distance = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
@@ -6107,9 +6326,11 @@ function MessageList({
|
|
|
6107
6326
|
useEffect7(() => {
|
|
6108
6327
|
const el = ref.current;
|
|
6109
6328
|
if (!el) return;
|
|
6110
|
-
const syncJump = () => setShowJump(el.scrollHeight - el.scrollTop - el.clientHeight > STICK_THRESHOLD * 2);
|
|
6111
6329
|
const onScroll = () => {
|
|
6112
|
-
syncJump();
|
|
6330
|
+
syncJump(el);
|
|
6331
|
+
syncFade(el);
|
|
6332
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight <= 8) markAllSeen();
|
|
6333
|
+
else recomputeNewCount(el);
|
|
6113
6334
|
if (performance.now() - autoPinAtRef.current > 150) {
|
|
6114
6335
|
detachedRef.current = el.scrollHeight - el.scrollTop - el.clientHeight > 8;
|
|
6115
6336
|
}
|
|
@@ -6145,7 +6366,7 @@ function MessageList({
|
|
|
6145
6366
|
el.addEventListener("pointerdown", onPointerDown, { passive: true });
|
|
6146
6367
|
window.addEventListener("pointerup", endInteraction, { passive: true });
|
|
6147
6368
|
window.addEventListener("pointercancel", endInteraction, { passive: true });
|
|
6148
|
-
syncJump();
|
|
6369
|
+
syncJump(el);
|
|
6149
6370
|
return () => {
|
|
6150
6371
|
el.removeEventListener("scroll", onScroll);
|
|
6151
6372
|
el.removeEventListener("wheel", onWheel);
|
|
@@ -6163,7 +6384,35 @@ function MessageList({
|
|
|
6163
6384
|
if (!el) return;
|
|
6164
6385
|
detachedRef.current = false;
|
|
6165
6386
|
pinBottom(el);
|
|
6387
|
+
markAllSeen();
|
|
6166
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]);
|
|
6167
6416
|
const rows = [];
|
|
6168
6417
|
let prevDay = "";
|
|
6169
6418
|
const lastId = messages.value.at(-1)?.id;
|
|
@@ -6172,7 +6421,7 @@ function MessageList({
|
|
|
6172
6421
|
);
|
|
6173
6422
|
const markerRow = (marker) => {
|
|
6174
6423
|
if (form && marker.formId === form.form.id) {
|
|
6175
|
-
return /* @__PURE__ */
|
|
6424
|
+
return /* @__PURE__ */ jsx20(
|
|
6176
6425
|
FormGate,
|
|
6177
6426
|
{
|
|
6178
6427
|
form: form.form,
|
|
@@ -6183,7 +6432,7 @@ function MessageList({
|
|
|
6183
6432
|
`gate:${marker.formId}`
|
|
6184
6433
|
);
|
|
6185
6434
|
}
|
|
6186
|
-
return /* @__PURE__ */
|
|
6435
|
+
return /* @__PURE__ */ jsx20(
|
|
6187
6436
|
FormDoneMarker,
|
|
6188
6437
|
{
|
|
6189
6438
|
marker,
|
|
@@ -6206,12 +6455,12 @@ function MessageList({
|
|
|
6206
6455
|
const day = dayKey(m.createdAt);
|
|
6207
6456
|
if (day && day !== prevDay) {
|
|
6208
6457
|
rows.push(
|
|
6209
|
-
/* @__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}`)
|
|
6210
6459
|
);
|
|
6211
6460
|
prevDay = day;
|
|
6212
6461
|
}
|
|
6213
6462
|
rows.push(
|
|
6214
|
-
/* @__PURE__ */
|
|
6463
|
+
/* @__PURE__ */ jsx20(
|
|
6215
6464
|
MessageBubble,
|
|
6216
6465
|
{
|
|
6217
6466
|
message: m,
|
|
@@ -6223,7 +6472,9 @@ function MessageList({
|
|
|
6223
6472
|
interactive: Boolean(idle) && m.id === lastId,
|
|
6224
6473
|
superseded: m.id !== lastId,
|
|
6225
6474
|
tool,
|
|
6226
|
-
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0
|
|
6475
|
+
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0,
|
|
6476
|
+
enableMessageFeedback,
|
|
6477
|
+
onFeedback
|
|
6227
6478
|
},
|
|
6228
6479
|
m.id
|
|
6229
6480
|
)
|
|
@@ -6233,21 +6484,35 @@ function MessageList({
|
|
|
6233
6484
|
rows.push(markerRow(marker));
|
|
6234
6485
|
}
|
|
6235
6486
|
return /* @__PURE__ */ jsxs16("div", { class: `${p18}-list-wrap`, children: [
|
|
6236
|
-
/* @__PURE__ */ jsxs16(
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
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(
|
|
6242
6504
|
"button",
|
|
6243
6505
|
{
|
|
6244
6506
|
type: "button",
|
|
6245
|
-
class: `${p18}-jump`,
|
|
6507
|
+
class: `${p18}-jump${newCount > 0 ? ` ${p18}-jump--new` : ""}`,
|
|
6246
6508
|
onClick: jumpToBottom,
|
|
6247
|
-
"aria-label": strings.scrollToBottom,
|
|
6248
|
-
title: strings.scrollToBottom,
|
|
6509
|
+
"aria-label": newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6510
|
+
title: newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6249
6511
|
"data-testid": TID.scrollToBottom,
|
|
6250
|
-
children:
|
|
6512
|
+
children: [
|
|
6513
|
+
newCount > 0 ? /* @__PURE__ */ jsx20("span", { class: `${p18}-jump-count`, children: newCount }) : null,
|
|
6514
|
+
/* @__PURE__ */ jsx20(ChevronDownIcon, {})
|
|
6515
|
+
]
|
|
6251
6516
|
}
|
|
6252
6517
|
) : null
|
|
6253
6518
|
] });
|
|
@@ -6276,7 +6541,7 @@ function dayLabel(createdAt, strings) {
|
|
|
6276
6541
|
}
|
|
6277
6542
|
|
|
6278
6543
|
// src/ui/conversation-list.tsx
|
|
6279
|
-
import { useEffect as useEffect8, useState as
|
|
6544
|
+
import { useEffect as useEffect8, useState as useState8 } from "preact/hooks";
|
|
6280
6545
|
|
|
6281
6546
|
// src/ui/history-groups.ts
|
|
6282
6547
|
var HISTORY_BUCKETS = ["today", "yesterday", "lastWeek", "older"];
|
|
@@ -6306,7 +6571,7 @@ function startOfDay(ms) {
|
|
|
6306
6571
|
}
|
|
6307
6572
|
|
|
6308
6573
|
// src/ui/conversation-list.tsx
|
|
6309
|
-
import { Fragment as Fragment5, jsx as
|
|
6574
|
+
import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs17 } from "preact/jsx-runtime";
|
|
6310
6575
|
var log11 = logger.scope("history");
|
|
6311
6576
|
var DEFAULT_SKELETON_ROWS = 3;
|
|
6312
6577
|
var MAX_SKELETON_ROWS = 6;
|
|
@@ -6335,8 +6600,8 @@ function ConversationList({
|
|
|
6335
6600
|
}) {
|
|
6336
6601
|
const p36 = BRAND.cssPrefix;
|
|
6337
6602
|
const seed = transport.peekConversations({ visitorId });
|
|
6338
|
-
const [state, setState] =
|
|
6339
|
-
const [conversations, setChats] =
|
|
6603
|
+
const [state, setState] = useState8(seed ? "loaded" : "loading");
|
|
6604
|
+
const [conversations, setChats] = useState8(seed?.conversations ?? []);
|
|
6340
6605
|
useEffect8(() => {
|
|
6341
6606
|
let cancelled = false;
|
|
6342
6607
|
transport.listConversations({ visitorId }).then((res) => {
|
|
@@ -6354,7 +6619,7 @@ function ConversationList({
|
|
|
6354
6619
|
cancelled = true;
|
|
6355
6620
|
};
|
|
6356
6621
|
}, [transport, visitorId, persistence]);
|
|
6357
|
-
const newChatButton = onNewConversation ? /* @__PURE__ */
|
|
6622
|
+
const newChatButton = onNewConversation ? /* @__PURE__ */ jsx21("div", { class: `${p36}-history-footer`, children: /* @__PURE__ */ jsxs17(
|
|
6358
6623
|
"button",
|
|
6359
6624
|
{
|
|
6360
6625
|
type: "button",
|
|
@@ -6362,7 +6627,7 @@ function ConversationList({
|
|
|
6362
6627
|
onClick: onNewConversation,
|
|
6363
6628
|
"data-testid": TID.sidebarNewConversation,
|
|
6364
6629
|
children: [
|
|
6365
|
-
/* @__PURE__ */
|
|
6630
|
+
/* @__PURE__ */ jsx21(PlusIcon, {}),
|
|
6366
6631
|
strings.newConversation
|
|
6367
6632
|
]
|
|
6368
6633
|
}
|
|
@@ -6370,16 +6635,16 @@ function ConversationList({
|
|
|
6370
6635
|
if (state === "loading") {
|
|
6371
6636
|
const rows = Math.min(persistence.loadHistoryCount() ?? DEFAULT_SKELETON_ROWS, MAX_SKELETON_ROWS);
|
|
6372
6637
|
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6373
|
-
/* @__PURE__ */
|
|
6374
|
-
/* @__PURE__ */
|
|
6375
|
-
/* @__PURE__ */
|
|
6376
|
-
/* @__PURE__ */
|
|
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` }),
|
|
6377
6642
|
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6378
6643
|
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6379
|
-
/* @__PURE__ */
|
|
6380
|
-
/* @__PURE__ */
|
|
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` }) })
|
|
6381
6646
|
] }),
|
|
6382
|
-
/* @__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` }) }) })
|
|
6383
6648
|
] })
|
|
6384
6649
|
] }, i)) })
|
|
6385
6650
|
] }) }),
|
|
@@ -6388,16 +6653,16 @@ function ConversationList({
|
|
|
6388
6653
|
}
|
|
6389
6654
|
if (state === "error" || conversations.length === 0) {
|
|
6390
6655
|
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6391
|
-
/* @__PURE__ */
|
|
6656
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-empty`, children: strings.historyEmpty }),
|
|
6392
6657
|
newChatButton
|
|
6393
6658
|
] });
|
|
6394
6659
|
}
|
|
6395
6660
|
const now = Date.now();
|
|
6396
6661
|
const groups = groupByBucket(now, conversations);
|
|
6397
6662
|
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6398
|
-
/* @__PURE__ */
|
|
6399
|
-
/* @__PURE__ */
|
|
6400
|
-
/* @__PURE__ */
|
|
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(
|
|
6401
6666
|
"button",
|
|
6402
6667
|
{
|
|
6403
6668
|
type: "button",
|
|
@@ -6405,18 +6670,18 @@ function ConversationList({
|
|
|
6405
6670
|
class: `${p36}-history-item`,
|
|
6406
6671
|
onClick: () => onSelect(chat),
|
|
6407
6672
|
"data-closed": chat.canContinue ? void 0 : "true",
|
|
6408
|
-
"data-unread":
|
|
6673
|
+
"data-unread": chat.hasUnread ? "true" : void 0,
|
|
6409
6674
|
"data-testid": tid(TID.historyItem, chat.conversationId),
|
|
6410
6675
|
children: [
|
|
6411
|
-
/* @__PURE__ */
|
|
6676
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx21(MessageIcon, {}) }),
|
|
6412
6677
|
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6413
6678
|
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6414
|
-
/* @__PURE__ */
|
|
6415
|
-
/* @__PURE__ */
|
|
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) })
|
|
6416
6681
|
] }),
|
|
6417
6682
|
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6418
|
-
/* @__PURE__ */
|
|
6419
|
-
|
|
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
|
|
6420
6685
|
] })
|
|
6421
6686
|
] })
|
|
6422
6687
|
]
|
|
@@ -6429,11 +6694,11 @@ function ConversationList({
|
|
|
6429
6694
|
}
|
|
6430
6695
|
|
|
6431
6696
|
// src/ui/suggestions.tsx
|
|
6432
|
-
import { jsx as
|
|
6697
|
+
import { jsx as jsx22 } from "preact/jsx-runtime";
|
|
6433
6698
|
var p19 = BRAND.cssPrefix;
|
|
6434
6699
|
function Suggestions({ suggestions, onPick }) {
|
|
6435
6700
|
if (suggestions.length === 0) return null;
|
|
6436
|
-
return /* @__PURE__ */
|
|
6701
|
+
return /* @__PURE__ */ jsx22("div", { class: `${p19}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx22(
|
|
6437
6702
|
"button",
|
|
6438
6703
|
{
|
|
6439
6704
|
type: "button",
|
|
@@ -6447,7 +6712,7 @@ function Suggestions({ suggestions, onPick }) {
|
|
|
6447
6712
|
}
|
|
6448
6713
|
|
|
6449
6714
|
// src/ui/panel.tsx
|
|
6450
|
-
import { Fragment as Fragment6, jsx as
|
|
6715
|
+
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs18 } from "preact/jsx-runtime";
|
|
6451
6716
|
var p20 = BRAND.cssPrefix;
|
|
6452
6717
|
function Panel(props2) {
|
|
6453
6718
|
const { options, onClose } = props2;
|
|
@@ -6483,7 +6748,7 @@ function Panel(props2) {
|
|
|
6483
6748
|
style: { position: "relative" },
|
|
6484
6749
|
"data-testid": TID.panel,
|
|
6485
6750
|
children: [
|
|
6486
|
-
/* @__PURE__ */
|
|
6751
|
+
/* @__PURE__ */ jsx23(
|
|
6487
6752
|
PanelContent,
|
|
6488
6753
|
{
|
|
6489
6754
|
...props2,
|
|
@@ -6492,7 +6757,7 @@ function Panel(props2) {
|
|
|
6492
6757
|
composerAttachApiRef
|
|
6493
6758
|
}
|
|
6494
6759
|
),
|
|
6495
|
-
/* @__PURE__ */
|
|
6760
|
+
/* @__PURE__ */ jsx23(PoweredByBar, { poweredBy: props2.options.poweredBy })
|
|
6496
6761
|
]
|
|
6497
6762
|
}
|
|
6498
6763
|
);
|
|
@@ -6531,6 +6796,8 @@ function PanelContent(props2) {
|
|
|
6531
6796
|
onFormFill,
|
|
6532
6797
|
tool,
|
|
6533
6798
|
onRetry,
|
|
6799
|
+
onMessageFeedback,
|
|
6800
|
+
onMessageSeen,
|
|
6534
6801
|
containerEl,
|
|
6535
6802
|
dragOver,
|
|
6536
6803
|
composerAttachApiRef
|
|
@@ -6541,8 +6808,8 @@ function PanelContent(props2) {
|
|
|
6541
6808
|
composerArea = null;
|
|
6542
6809
|
} else if (canSend) {
|
|
6543
6810
|
composerArea = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6544
|
-
/* @__PURE__ */
|
|
6545
|
-
/* @__PURE__ */
|
|
6811
|
+
/* @__PURE__ */ jsx23(Suggestions, { suggestions, onPick: onSuggestion }),
|
|
6812
|
+
/* @__PURE__ */ jsx23(
|
|
6546
6813
|
Composer,
|
|
6547
6814
|
{
|
|
6548
6815
|
options,
|
|
@@ -6557,10 +6824,10 @@ function PanelContent(props2) {
|
|
|
6557
6824
|
)
|
|
6558
6825
|
] });
|
|
6559
6826
|
} else {
|
|
6560
|
-
composerArea = /* @__PURE__ */
|
|
6827
|
+
composerArea = /* @__PURE__ */ jsx23(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
|
|
6561
6828
|
}
|
|
6562
6829
|
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6563
|
-
view === "history" ? /* @__PURE__ */
|
|
6830
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6564
6831
|
HistoryHeader,
|
|
6565
6832
|
{
|
|
6566
6833
|
strings: s,
|
|
@@ -6569,7 +6836,7 @@ function PanelContent(props2) {
|
|
|
6569
6836
|
showClose: canShowClose(options.mode, panelSize, options.actions)
|
|
6570
6837
|
}
|
|
6571
6838
|
) : /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, "data-testid": TID.panelHeader, children: [
|
|
6572
|
-
onBack ? /* @__PURE__ */
|
|
6839
|
+
onBack ? /* @__PURE__ */ jsx23(
|
|
6573
6840
|
"button",
|
|
6574
6841
|
{
|
|
6575
6842
|
type: "button",
|
|
@@ -6577,13 +6844,13 @@ function PanelContent(props2) {
|
|
|
6577
6844
|
onClick: onBack,
|
|
6578
6845
|
"aria-label": s.moduleBack,
|
|
6579
6846
|
title: s.moduleBack,
|
|
6580
|
-
children: /* @__PURE__ */
|
|
6847
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6581
6848
|
}
|
|
6582
6849
|
) : null,
|
|
6583
|
-
agent ? /* @__PURE__ */
|
|
6584
|
-
/* @__PURE__ */
|
|
6850
|
+
agent ? /* @__PURE__ */ jsx23(AgentBadge, { agent, strings: s }) : /* @__PURE__ */ jsx23("h1", { children: s.panelTitle }),
|
|
6851
|
+
/* @__PURE__ */ jsx23(HeaderActions, { panelProps: props2, variant: "chat" })
|
|
6585
6852
|
] }),
|
|
6586
|
-
view === "history" ? /* @__PURE__ */
|
|
6853
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6587
6854
|
ConversationList,
|
|
6588
6855
|
{
|
|
6589
6856
|
transport,
|
|
@@ -6595,8 +6862,8 @@ function PanelContent(props2) {
|
|
|
6595
6862
|
onNewConversation
|
|
6596
6863
|
}
|
|
6597
6864
|
) : /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6598
|
-
/* @__PURE__ */
|
|
6599
|
-
/* @__PURE__ */
|
|
6865
|
+
/* @__PURE__ */ jsx23(DropZone, { visible: dragOver, strings: s }),
|
|
6866
|
+
/* @__PURE__ */ jsx23(
|
|
6600
6867
|
MessageList,
|
|
6601
6868
|
{
|
|
6602
6869
|
messagesSig,
|
|
@@ -6605,6 +6872,11 @@ function PanelContent(props2) {
|
|
|
6605
6872
|
showReasoning: options.showReasoning,
|
|
6606
6873
|
showToolCalls: options.showToolCalls,
|
|
6607
6874
|
showSources: options.showSources,
|
|
6875
|
+
scrollFade: options.scrollFade,
|
|
6876
|
+
scrollAnchor: options.scrollAnchor,
|
|
6877
|
+
enableMessageFeedback: options.enableMessageFeedback,
|
|
6878
|
+
onFeedback: onMessageFeedback,
|
|
6879
|
+
onMessageSeen,
|
|
6608
6880
|
loading: loadingMessages,
|
|
6609
6881
|
idle: !isStreaming,
|
|
6610
6882
|
tool,
|
|
@@ -6615,9 +6887,9 @@ function PanelContent(props2) {
|
|
|
6615
6887
|
}
|
|
6616
6888
|
),
|
|
6617
6889
|
composerArea,
|
|
6618
|
-
/* @__PURE__ */
|
|
6890
|
+
/* @__PURE__ */ jsx23(ComposerFooter, { disclaimer: options.composerDisclaimer })
|
|
6619
6891
|
] }),
|
|
6620
|
-
options.size.resize?.enabled ? /* @__PURE__ */
|
|
6892
|
+
options.size.resize?.enabled ? /* @__PURE__ */ jsx23(
|
|
6621
6893
|
ResizeGrip,
|
|
6622
6894
|
{
|
|
6623
6895
|
panelEl: containerEl,
|
|
@@ -6637,7 +6909,7 @@ function HistoryHeader({
|
|
|
6637
6909
|
showClose
|
|
6638
6910
|
}) {
|
|
6639
6911
|
return /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, children: [
|
|
6640
|
-
/* @__PURE__ */
|
|
6912
|
+
/* @__PURE__ */ jsx23(
|
|
6641
6913
|
"button",
|
|
6642
6914
|
{
|
|
6643
6915
|
type: "button",
|
|
@@ -6645,11 +6917,11 @@ function HistoryHeader({
|
|
|
6645
6917
|
onClick: onBack,
|
|
6646
6918
|
"aria-label": strings.historyBack,
|
|
6647
6919
|
title: strings.historyBack,
|
|
6648
|
-
children: /* @__PURE__ */
|
|
6920
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6649
6921
|
}
|
|
6650
6922
|
),
|
|
6651
|
-
/* @__PURE__ */
|
|
6652
|
-
showClose ? /* @__PURE__ */
|
|
6923
|
+
/* @__PURE__ */ jsx23("h1", { children: strings.historyTitle }),
|
|
6924
|
+
showClose ? /* @__PURE__ */ jsx23(
|
|
6653
6925
|
"button",
|
|
6654
6926
|
{
|
|
6655
6927
|
type: "button",
|
|
@@ -6657,7 +6929,7 @@ function HistoryHeader({
|
|
|
6657
6929
|
onClick: onClose,
|
|
6658
6930
|
"aria-label": strings.close,
|
|
6659
6931
|
title: strings.close,
|
|
6660
|
-
children: /* @__PURE__ */
|
|
6932
|
+
children: /* @__PURE__ */ jsx23(CloseIcon, {})
|
|
6661
6933
|
}
|
|
6662
6934
|
) : null
|
|
6663
6935
|
] });
|
|
@@ -6668,27 +6940,27 @@ function ReadOnlyBanner({
|
|
|
6668
6940
|
onNewConversation
|
|
6669
6941
|
}) {
|
|
6670
6942
|
return /* @__PURE__ */ jsxs18("div", { class: `${p20}-readonly-banner`, role: "note", children: [
|
|
6671
|
-
/* @__PURE__ */
|
|
6672
|
-
/* @__PURE__ */
|
|
6943
|
+
/* @__PURE__ */ jsx23("span", { class: `${p20}-readonly-label`, children: label }),
|
|
6944
|
+
/* @__PURE__ */ jsx23("button", { type: "button", class: `${p20}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
|
|
6673
6945
|
] });
|
|
6674
6946
|
}
|
|
6675
6947
|
function ComposerFooter({ disclaimer }) {
|
|
6676
6948
|
if (!disclaimer) return null;
|
|
6677
|
-
return /* @__PURE__ */
|
|
6949
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-composer-footer`, children: /* @__PURE__ */ jsx23("div", { class: `${p20}-disclaimer`, children: disclaimer }) });
|
|
6678
6950
|
}
|
|
6679
6951
|
function PoweredByBar({ poweredBy }) {
|
|
6680
6952
|
if (!poweredBy) return null;
|
|
6681
|
-
return /* @__PURE__ */
|
|
6953
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-poweredby-bar`, children: /* @__PURE__ */ jsx23(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
|
|
6682
6954
|
}
|
|
6683
6955
|
function PoweredBy({ logoUrl, text, href }) {
|
|
6684
6956
|
const inner = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6685
|
-
logoUrl ? /* @__PURE__ */
|
|
6686
|
-
text ? /* @__PURE__ */
|
|
6957
|
+
logoUrl ? /* @__PURE__ */ jsx23("img", { class: `${p20}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
|
|
6958
|
+
text ? /* @__PURE__ */ jsx23("span", { children: text }) : null
|
|
6687
6959
|
] });
|
|
6688
6960
|
if (href) {
|
|
6689
|
-
return /* @__PURE__ */
|
|
6961
|
+
return /* @__PURE__ */ jsx23("a", { class: `${p20}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
|
|
6690
6962
|
}
|
|
6691
|
-
return /* @__PURE__ */
|
|
6963
|
+
return /* @__PURE__ */ jsx23("span", { class: `${p20}-poweredby`, children: inner });
|
|
6692
6964
|
}
|
|
6693
6965
|
|
|
6694
6966
|
// src/ui/form/form-controller.ts
|
|
@@ -6771,7 +7043,7 @@ function whenPasses(form, d) {
|
|
|
6771
7043
|
}
|
|
6772
7044
|
|
|
6773
7045
|
// src/ui/sidebar.tsx
|
|
6774
|
-
import { Fragment as Fragment7, jsx as
|
|
7046
|
+
import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs19 } from "preact/jsx-runtime";
|
|
6775
7047
|
function Sidebar(props2) {
|
|
6776
7048
|
const p36 = BRAND.cssPrefix;
|
|
6777
7049
|
const { site, blocks, strings, collapsed } = props2;
|
|
@@ -6780,8 +7052,8 @@ function Sidebar(props2) {
|
|
|
6780
7052
|
const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
|
|
6781
7053
|
return /* @__PURE__ */ jsxs19("aside", { class: `${p36}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
|
|
6782
7054
|
/* @__PURE__ */ jsxs19("div", { class: `${p36}-sidebar-header`, children: [
|
|
6783
|
-
/* @__PURE__ */
|
|
6784
|
-
/* @__PURE__ */
|
|
7055
|
+
/* @__PURE__ */ jsx24(SidebarBrand, { site }),
|
|
7056
|
+
/* @__PURE__ */ jsx24(
|
|
6785
7057
|
"button",
|
|
6786
7058
|
{
|
|
6787
7059
|
type: "button",
|
|
@@ -6791,14 +7063,14 @@ function Sidebar(props2) {
|
|
|
6791
7063
|
title: toggleLabel,
|
|
6792
7064
|
onClick: props2.onToggleCollapsed,
|
|
6793
7065
|
"data-testid": TID.sidebarToggle,
|
|
6794
|
-
children: /* @__PURE__ */
|
|
7066
|
+
children: /* @__PURE__ */ jsx24(SidebarToggleIcon, { collapsed })
|
|
6795
7067
|
}
|
|
6796
7068
|
)
|
|
6797
7069
|
] }),
|
|
6798
7070
|
collapsed ? null : /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
6799
|
-
navigation.length > 0 ? /* @__PURE__ */
|
|
6800
|
-
linkCards.length > 0 ? /* @__PURE__ */
|
|
6801
|
-
props2.showConversations ? /* @__PURE__ */
|
|
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(
|
|
6802
7074
|
ConversationList,
|
|
6803
7075
|
{
|
|
6804
7076
|
transport: props2.transport,
|
|
@@ -6818,14 +7090,14 @@ function SidebarBrand({ site }) {
|
|
|
6818
7090
|
if (site?.logo?.url) {
|
|
6819
7091
|
const alt = site.logo.alt ?? site.title ?? "Logo";
|
|
6820
7092
|
return /* @__PURE__ */ jsxs19("picture", { children: [
|
|
6821
|
-
site.logoDark?.url ? /* @__PURE__ */
|
|
6822
|
-
/* @__PURE__ */
|
|
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 })
|
|
6823
7095
|
] });
|
|
6824
7096
|
}
|
|
6825
|
-
return /* @__PURE__ */
|
|
7097
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-title`, children: site?.title ?? BRAND.name });
|
|
6826
7098
|
}
|
|
6827
7099
|
function SidebarToggleIcon({ collapsed }) {
|
|
6828
|
-
return /* @__PURE__ */
|
|
7100
|
+
return /* @__PURE__ */ jsx24(
|
|
6829
7101
|
"svg",
|
|
6830
7102
|
{
|
|
6831
7103
|
width: "16",
|
|
@@ -6835,13 +7107,13 @@ function SidebarToggleIcon({ collapsed }) {
|
|
|
6835
7107
|
stroke: "currentColor",
|
|
6836
7108
|
"stroke-width": "2",
|
|
6837
7109
|
"aria-hidden": "true",
|
|
6838
|
-
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" })
|
|
6839
7111
|
}
|
|
6840
7112
|
);
|
|
6841
7113
|
}
|
|
6842
7114
|
function SidebarNav({ items }) {
|
|
6843
7115
|
const p36 = BRAND.cssPrefix;
|
|
6844
|
-
return /* @__PURE__ */
|
|
7116
|
+
return /* @__PURE__ */ jsx24("ul", { class: `${p36}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsxs19(
|
|
6845
7117
|
"a",
|
|
6846
7118
|
{
|
|
6847
7119
|
class: `${p36}-sidebar-nav-item`,
|
|
@@ -6849,15 +7121,15 @@ function SidebarNav({ items }) {
|
|
|
6849
7121
|
target: item.href ? "_blank" : void 0,
|
|
6850
7122
|
rel: item.href ? "noreferrer" : void 0,
|
|
6851
7123
|
children: [
|
|
6852
|
-
item.icon ? /* @__PURE__ */
|
|
6853
|
-
/* @__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 })
|
|
6854
7126
|
]
|
|
6855
7127
|
}
|
|
6856
7128
|
) }, item.id ?? item.label)) });
|
|
6857
7129
|
}
|
|
6858
7130
|
function SidebarCards({ items }) {
|
|
6859
7131
|
const p36 = BRAND.cssPrefix;
|
|
6860
|
-
return /* @__PURE__ */
|
|
7132
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs19(
|
|
6861
7133
|
"a",
|
|
6862
7134
|
{
|
|
6863
7135
|
class: `${p36}-sidebar-card`,
|
|
@@ -6865,8 +7137,8 @@ function SidebarCards({ items }) {
|
|
|
6865
7137
|
target: item.href ? "_blank" : void 0,
|
|
6866
7138
|
rel: item.href ? "noreferrer" : void 0,
|
|
6867
7139
|
children: [
|
|
6868
|
-
/* @__PURE__ */
|
|
6869
|
-
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
|
|
6870
7142
|
]
|
|
6871
7143
|
},
|
|
6872
7144
|
item.id ?? item.label
|
|
@@ -6874,11 +7146,11 @@ function SidebarCards({ items }) {
|
|
|
6874
7146
|
}
|
|
6875
7147
|
|
|
6876
7148
|
// src/ui/page-shell.tsx
|
|
6877
|
-
import { jsx as
|
|
7149
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "preact/jsx-runtime";
|
|
6878
7150
|
var p21 = BRAND.cssPrefix;
|
|
6879
7151
|
function PageShell(props2) {
|
|
6880
7152
|
return /* @__PURE__ */ jsxs20("main", { class: `${p21}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
|
|
6881
|
-
/* @__PURE__ */
|
|
7153
|
+
/* @__PURE__ */ jsx25(
|
|
6882
7154
|
Sidebar,
|
|
6883
7155
|
{
|
|
6884
7156
|
site: props2.site,
|
|
@@ -6895,7 +7167,7 @@ function PageShell(props2) {
|
|
|
6895
7167
|
onToggleCollapsed: props2.onToggleSidebarCollapsed
|
|
6896
7168
|
}
|
|
6897
7169
|
),
|
|
6898
|
-
/* @__PURE__ */
|
|
7170
|
+
/* @__PURE__ */ jsx25("section", { class: `${p21}-page-chat`, "aria-label": "Chat", children: props2.children })
|
|
6899
7171
|
] });
|
|
6900
7172
|
}
|
|
6901
7173
|
|
|
@@ -6933,7 +7205,7 @@ var atTabRoot = (s) => activeStack(s).length === 0;
|
|
|
6933
7205
|
|
|
6934
7206
|
// src/ui/messenger-home.tsx
|
|
6935
7207
|
import { useCallback as useCallback4, useEffect as useEffect14, useRef as useRef8 } from "preact/hooks";
|
|
6936
|
-
import { useComputed as
|
|
7208
|
+
import { useComputed as useComputed8 } from "@preact/signals";
|
|
6937
7209
|
|
|
6938
7210
|
// src/ui/modules/chat.tsx
|
|
6939
7211
|
var chatLayout = {
|
|
@@ -6942,38 +7214,38 @@ var chatLayout = {
|
|
|
6942
7214
|
};
|
|
6943
7215
|
|
|
6944
7216
|
// src/ui/modules/help.tsx
|
|
6945
|
-
import { useEffect as useEffect10, useMemo as useMemo2, useState as
|
|
7217
|
+
import { useEffect as useEffect10, useMemo as useMemo2, useState as useState9 } from "preact/hooks";
|
|
6946
7218
|
|
|
6947
7219
|
// src/ui/back-header.tsx
|
|
6948
|
-
import { jsx as
|
|
7220
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "preact/jsx-runtime";
|
|
6949
7221
|
var p22 = BRAND.cssPrefix;
|
|
6950
7222
|
function TitleBar({ title, actions }) {
|
|
6951
7223
|
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-variant": "title", children: [
|
|
6952
|
-
/* @__PURE__ */
|
|
6953
|
-
/* @__PURE__ */
|
|
6954
|
-
actions ?? /* @__PURE__ */
|
|
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" })
|
|
6955
7227
|
] });
|
|
6956
7228
|
}
|
|
6957
7229
|
function BackHeader({ title, backLabel, onBack, actions, testid }) {
|
|
6958
7230
|
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-testid": testid, children: [
|
|
6959
|
-
/* @__PURE__ */
|
|
6960
|
-
/* @__PURE__ */
|
|
6961
|
-
actions ?? /* @__PURE__ */
|
|
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" })
|
|
6962
7234
|
] });
|
|
6963
7235
|
}
|
|
6964
7236
|
|
|
6965
7237
|
// src/ui/home-search.tsx
|
|
6966
|
-
import { jsx as
|
|
7238
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "preact/jsx-runtime";
|
|
6967
7239
|
var p23 = BRAND.cssPrefix;
|
|
6968
7240
|
function HomeSearchButton({ placeholder, onActivate }) {
|
|
6969
7241
|
return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
|
|
6970
|
-
/* @__PURE__ */
|
|
6971
|
-
/* @__PURE__ */
|
|
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, {}) })
|
|
6972
7244
|
] });
|
|
6973
7245
|
}
|
|
6974
7246
|
function HelpSearchInput({ placeholder, value, onInput }) {
|
|
6975
7247
|
return /* @__PURE__ */ jsxs22("div", { class: `${p23}-home-search`, "data-input": "true", children: [
|
|
6976
|
-
/* @__PURE__ */
|
|
7248
|
+
/* @__PURE__ */ jsx27(
|
|
6977
7249
|
"input",
|
|
6978
7250
|
{
|
|
6979
7251
|
type: "search",
|
|
@@ -6984,25 +7256,25 @@ function HelpSearchInput({ placeholder, value, onInput }) {
|
|
|
6984
7256
|
"data-testid": TID.helpSearch
|
|
6985
7257
|
}
|
|
6986
7258
|
),
|
|
6987
|
-
/* @__PURE__ */
|
|
7259
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(SearchIcon, {}) })
|
|
6988
7260
|
] });
|
|
6989
7261
|
}
|
|
6990
7262
|
|
|
6991
7263
|
// src/ui/list-row.tsx
|
|
6992
|
-
import { jsx as
|
|
7264
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "preact/jsx-runtime";
|
|
6993
7265
|
var p24 = BRAND.cssPrefix;
|
|
6994
7266
|
function ListRow({ title, subtitle, onClick, testid }) {
|
|
6995
7267
|
return /* @__PURE__ */ jsxs23("button", { type: "button", class: `${p24}-list-row`, onClick, "data-testid": testid, children: [
|
|
6996
7268
|
/* @__PURE__ */ jsxs23("span", { class: `${p24}-list-row-body`, children: [
|
|
6997
|
-
/* @__PURE__ */
|
|
6998
|
-
subtitle ? /* @__PURE__ */
|
|
7269
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-title`, children: title }),
|
|
7270
|
+
subtitle ? /* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-sub`, children: subtitle }) : null
|
|
6999
7271
|
] }),
|
|
7000
|
-
/* @__PURE__ */
|
|
7272
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx28(ChevronRightIcon, {}) })
|
|
7001
7273
|
] });
|
|
7002
7274
|
}
|
|
7003
7275
|
|
|
7004
7276
|
// src/ui/module-state.tsx
|
|
7005
|
-
import { jsx as
|
|
7277
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "preact/jsx-runtime";
|
|
7006
7278
|
var p25 = BRAND.cssPrefix;
|
|
7007
7279
|
function ModuleState({
|
|
7008
7280
|
tone = "info",
|
|
@@ -7011,13 +7283,13 @@ function ModuleState({
|
|
|
7011
7283
|
strings
|
|
7012
7284
|
}) {
|
|
7013
7285
|
return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
|
|
7014
|
-
/* @__PURE__ */
|
|
7015
|
-
onRetry ? /* @__PURE__ */
|
|
7286
|
+
/* @__PURE__ */ jsx29("span", { children: message }),
|
|
7287
|
+
onRetry ? /* @__PURE__ */ jsx29("button", { type: "button", class: `${p25}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
|
|
7016
7288
|
] });
|
|
7017
7289
|
}
|
|
7018
7290
|
|
|
7019
7291
|
// src/ui/modules/help.tsx
|
|
7020
|
-
import { jsx as
|
|
7292
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "preact/jsx-runtime";
|
|
7021
7293
|
var p26 = BRAND.cssPrefix;
|
|
7022
7294
|
var log12 = logger.scope("help");
|
|
7023
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 });
|
|
@@ -7047,7 +7319,7 @@ function fuzzySearch(items, query) {
|
|
|
7047
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);
|
|
7048
7320
|
}
|
|
7049
7321
|
function ArticleRow({ article, nav }) {
|
|
7050
|
-
return /* @__PURE__ */
|
|
7322
|
+
return /* @__PURE__ */ jsx30(
|
|
7051
7323
|
ListRow,
|
|
7052
7324
|
{
|
|
7053
7325
|
title: article.title,
|
|
@@ -7059,11 +7331,11 @@ function ArticleRow({ article, nav }) {
|
|
|
7059
7331
|
}
|
|
7060
7332
|
function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7061
7333
|
const tags = config.contentTags;
|
|
7062
|
-
const [state, setState] =
|
|
7063
|
-
const [errorMsg, setErrorMsg] =
|
|
7064
|
-
const [items, setItems] =
|
|
7065
|
-
const [query, setQuery] =
|
|
7066
|
-
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);
|
|
7067
7339
|
useEffect10(() => {
|
|
7068
7340
|
let cancelled = false;
|
|
7069
7341
|
setState("loading");
|
|
@@ -7092,45 +7364,45 @@ function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7092
7364
|
}, [query, results, bus]);
|
|
7093
7365
|
function renderBody() {
|
|
7094
7366
|
if (query.trim().length > 0) {
|
|
7095
|
-
if (results.length === 0) return /* @__PURE__ */
|
|
7096
|
-
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)) });
|
|
7097
7369
|
}
|
|
7098
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7370
|
+
if (state === "loading") return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpLoading, strings });
|
|
7099
7371
|
if (state === "error") {
|
|
7100
|
-
return /* @__PURE__ */
|
|
7372
|
+
return /* @__PURE__ */ jsx30(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7101
7373
|
}
|
|
7102
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7374
|
+
if (items.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpEmpty, strings });
|
|
7103
7375
|
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs25("section", { class: `${p26}-help-group`, children: [
|
|
7104
|
-
category ? /* @__PURE__ */
|
|
7105
|
-
/* @__PURE__ */
|
|
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)) })
|
|
7106
7378
|
] }, category));
|
|
7107
7379
|
}
|
|
7108
7380
|
return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
|
|
7109
|
-
/* @__PURE__ */
|
|
7110
|
-
/* @__PURE__ */
|
|
7111
|
-
/* @__PURE__ */
|
|
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() })
|
|
7112
7384
|
] });
|
|
7113
7385
|
}
|
|
7114
7386
|
var helpLayout = {
|
|
7115
7387
|
Icon: HelpIcon,
|
|
7116
|
-
Root: (props2) => /* @__PURE__ */
|
|
7388
|
+
Root: (props2) => /* @__PURE__ */ jsx30(HelpRoot, { ...props2 })
|
|
7117
7389
|
};
|
|
7118
7390
|
|
|
7119
7391
|
// src/ui/modules/home.tsx
|
|
7120
|
-
import { useEffect as useEffect11, useState as
|
|
7392
|
+
import { useEffect as useEffect11, useState as useState10 } from "preact/hooks";
|
|
7121
7393
|
|
|
7122
7394
|
// src/ui/home-card.tsx
|
|
7123
|
-
import { jsx as
|
|
7395
|
+
import { jsx as jsx31 } from "preact/jsx-runtime";
|
|
7124
7396
|
var p27 = BRAND.cssPrefix;
|
|
7125
7397
|
function HomeCard({ onClick, children, testid }) {
|
|
7126
7398
|
if (onClick) {
|
|
7127
|
-
return /* @__PURE__ */
|
|
7399
|
+
return /* @__PURE__ */ jsx31("button", { type: "button", class: `${p27}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
|
|
7128
7400
|
}
|
|
7129
|
-
return /* @__PURE__ */
|
|
7401
|
+
return /* @__PURE__ */ jsx31("div", { class: `${p27}-home-card`, "data-testid": testid, children });
|
|
7130
7402
|
}
|
|
7131
7403
|
|
|
7132
7404
|
// src/ui/modules/home.tsx
|
|
7133
|
-
import { Fragment as Fragment8, jsx as
|
|
7405
|
+
import { Fragment as Fragment8, jsx as jsx32, jsxs as jsxs26 } from "preact/jsx-runtime";
|
|
7134
7406
|
var p28 = BRAND.cssPrefix;
|
|
7135
7407
|
var log13 = logger.scope("home");
|
|
7136
7408
|
function resolveGreeting(props2) {
|
|
@@ -7145,8 +7417,8 @@ function resolveGreeting(props2) {
|
|
|
7145
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 });
|
|
7146
7418
|
function HomeRoot(props2) {
|
|
7147
7419
|
const { transport, strings, config, nav, bus, panelProps } = props2;
|
|
7148
|
-
const [recent, setRecent] =
|
|
7149
|
-
const [content, setContent] =
|
|
7420
|
+
const [recent, setRecent] = useState10(null);
|
|
7421
|
+
const [content, setContent] = useState10([]);
|
|
7150
7422
|
const tagsKey = config.contentTags?.join(",");
|
|
7151
7423
|
useEffect11(() => {
|
|
7152
7424
|
if (!config.showRecentConversations) return;
|
|
@@ -7174,49 +7446,49 @@ function HomeRoot(props2) {
|
|
|
7174
7446
|
const status = config.status;
|
|
7175
7447
|
const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
|
|
7176
7448
|
const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
|
|
7177
|
-
return /* @__PURE__ */
|
|
7449
|
+
return /* @__PURE__ */ jsx32("div", { class: `${p28}-module ${p28}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-scroll`, children: [
|
|
7178
7450
|
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero`, children: [
|
|
7179
7451
|
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-top`, children: [
|
|
7180
|
-
config.brandName ? /* @__PURE__ */
|
|
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" }),
|
|
7181
7453
|
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-actions`, children: [
|
|
7182
|
-
avatars.length > 0 ? /* @__PURE__ */
|
|
7183
|
-
/* @__PURE__ */
|
|
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" })
|
|
7184
7456
|
] })
|
|
7185
7457
|
] }),
|
|
7186
7458
|
config.showGreeting !== false ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
|
|
7187
|
-
/* @__PURE__ */
|
|
7188
|
-
greeting.subtitle ? /* @__PURE__ */
|
|
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
|
|
7189
7461
|
] }) : null
|
|
7190
7462
|
] }),
|
|
7191
7463
|
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-cards`, children: [
|
|
7192
|
-
config.showSearchBar !== false ? /* @__PURE__ */
|
|
7464
|
+
config.showSearchBar !== false ? /* @__PURE__ */ jsx32(
|
|
7193
7465
|
HomeSearchButton,
|
|
7194
7466
|
{
|
|
7195
7467
|
placeholder: strings.homeSearchPlaceholder,
|
|
7196
7468
|
onActivate: () => nav.switchToLayout("help")
|
|
7197
7469
|
}
|
|
7198
7470
|
) : null,
|
|
7199
|
-
recent ? /* @__PURE__ */
|
|
7200
|
-
/* @__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, {}) }),
|
|
7201
7473
|
/* @__PURE__ */ jsxs26("span", { class: `${p28}-home-recent-body`, children: [
|
|
7202
|
-
/* @__PURE__ */
|
|
7203
|
-
recent.preview ? /* @__PURE__ */
|
|
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
|
|
7204
7476
|
] }),
|
|
7205
|
-
|
|
7477
|
+
recent.hasUnread ? /* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-dot`, "aria-label": "Unread" }) : null
|
|
7206
7478
|
] }) }) : null,
|
|
7207
|
-
status ? /* @__PURE__ */
|
|
7479
|
+
status ? /* @__PURE__ */ jsx32(
|
|
7208
7480
|
HomeCard,
|
|
7209
7481
|
{
|
|
7210
7482
|
onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
|
|
7211
7483
|
children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-status`, "data-level": status.level ?? "operational", children: [
|
|
7212
|
-
/* @__PURE__ */
|
|
7213
|
-
/* @__PURE__ */
|
|
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 })
|
|
7214
7486
|
] })
|
|
7215
7487
|
}
|
|
7216
7488
|
) : null,
|
|
7217
7489
|
content.length > 0 ? /* @__PURE__ */ jsxs26("section", { class: `${p28}-home-content`, children: [
|
|
7218
|
-
/* @__PURE__ */
|
|
7219
|
-
/* @__PURE__ */
|
|
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(
|
|
7220
7492
|
ListRow,
|
|
7221
7493
|
{
|
|
7222
7494
|
title: item.title,
|
|
@@ -7232,20 +7504,20 @@ function HomeRoot(props2) {
|
|
|
7232
7504
|
}
|
|
7233
7505
|
var homeLayout = {
|
|
7234
7506
|
Icon: HomeIcon,
|
|
7235
|
-
Root: (props2) => /* @__PURE__ */
|
|
7507
|
+
Root: (props2) => /* @__PURE__ */ jsx32(HomeRoot, { ...props2 })
|
|
7236
7508
|
};
|
|
7237
7509
|
|
|
7238
7510
|
// src/ui/modules/news.tsx
|
|
7239
|
-
import { useEffect as useEffect12, useState as
|
|
7240
|
-
import { jsx as
|
|
7511
|
+
import { useEffect as useEffect12, useState as useState11 } from "preact/hooks";
|
|
7512
|
+
import { jsx as jsx33, jsxs as jsxs27 } from "preact/jsx-runtime";
|
|
7241
7513
|
var p29 = BRAND.cssPrefix;
|
|
7242
7514
|
var log14 = logger.scope("news");
|
|
7243
7515
|
function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7244
7516
|
const tags = config.contentTags;
|
|
7245
|
-
const [state, setState] =
|
|
7246
|
-
const [errorMsg, setErrorMsg] =
|
|
7247
|
-
const [items, setItems] =
|
|
7248
|
-
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);
|
|
7249
7521
|
useEffect12(() => {
|
|
7250
7522
|
let cancelled = false;
|
|
7251
7523
|
setState("loading");
|
|
@@ -7266,12 +7538,12 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7266
7538
|
};
|
|
7267
7539
|
}, [transport, tags, reloadKey, bus]);
|
|
7268
7540
|
function renderBody() {
|
|
7269
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7541
|
+
if (state === "loading") return /* @__PURE__ */ jsx33(ModuleState, { message: strings.newsLoading, strings });
|
|
7270
7542
|
if (state === "error") {
|
|
7271
|
-
return /* @__PURE__ */
|
|
7543
|
+
return /* @__PURE__ */ jsx33(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7272
7544
|
}
|
|
7273
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7274
|
-
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(
|
|
7275
7547
|
"button",
|
|
7276
7548
|
{
|
|
7277
7549
|
type: "button",
|
|
@@ -7279,10 +7551,10 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7279
7551
|
onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
|
|
7280
7552
|
"data-testid": tid(TID.newsItem, item.id),
|
|
7281
7553
|
children: [
|
|
7282
|
-
item.image ? /* @__PURE__ */
|
|
7554
|
+
item.image ? /* @__PURE__ */ jsx33("img", { class: `${p29}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
7283
7555
|
/* @__PURE__ */ jsxs27("span", { class: `${p29}-news-body`, children: [
|
|
7284
|
-
/* @__PURE__ */
|
|
7285
|
-
item.description ? /* @__PURE__ */
|
|
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
|
|
7286
7558
|
] })
|
|
7287
7559
|
]
|
|
7288
7560
|
},
|
|
@@ -7290,13 +7562,13 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7290
7562
|
)) });
|
|
7291
7563
|
}
|
|
7292
7564
|
return /* @__PURE__ */ jsxs27("div", { class: `${p29}-module`, children: [
|
|
7293
|
-
/* @__PURE__ */
|
|
7294
|
-
/* @__PURE__ */
|
|
7565
|
+
/* @__PURE__ */ jsx33(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx33(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
7566
|
+
/* @__PURE__ */ jsx33("div", { class: `${p29}-module-scroll`, children: renderBody() })
|
|
7295
7567
|
] });
|
|
7296
7568
|
}
|
|
7297
7569
|
var newsLayout = {
|
|
7298
7570
|
Icon: NewsIcon,
|
|
7299
|
-
Root: (props2) => /* @__PURE__ */
|
|
7571
|
+
Root: (props2) => /* @__PURE__ */ jsx33(NewsRoot, { ...props2 })
|
|
7300
7572
|
};
|
|
7301
7573
|
|
|
7302
7574
|
// src/ui/modules/registry.ts
|
|
@@ -7308,13 +7580,13 @@ var LAYOUTS = {
|
|
|
7308
7580
|
};
|
|
7309
7581
|
|
|
7310
7582
|
// src/ui/home-tab-bar.tsx
|
|
7311
|
-
import { jsx as
|
|
7583
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "preact/jsx-runtime";
|
|
7312
7584
|
var p30 = BRAND.cssPrefix;
|
|
7313
|
-
function HomeTabBar({ modules, activeTab, strings,
|
|
7314
|
-
return /* @__PURE__ */
|
|
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) => {
|
|
7315
7587
|
const Icon = LAYOUTS[m.layout].Icon;
|
|
7316
7588
|
const selected = m.id === activeTab;
|
|
7317
|
-
const
|
|
7589
|
+
const showDot = m.layout === "chat" && hasUnread;
|
|
7318
7590
|
return /* @__PURE__ */ jsxs28(
|
|
7319
7591
|
"button",
|
|
7320
7592
|
{
|
|
@@ -7326,10 +7598,10 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
|
7326
7598
|
"data-testid": tid(TID.tab, m.id),
|
|
7327
7599
|
children: [
|
|
7328
7600
|
/* @__PURE__ */ jsxs28("span", { class: `${p30}-tab-icon`, "aria-hidden": "true", children: [
|
|
7329
|
-
/* @__PURE__ */
|
|
7330
|
-
|
|
7601
|
+
/* @__PURE__ */ jsx34(Icon, {}),
|
|
7602
|
+
showDot ? /* @__PURE__ */ jsx34("span", { class: `${p30}-tab-badge`, "data-testid": TID.tabBadge, "aria-label": "Unread" }) : null
|
|
7331
7603
|
] }),
|
|
7332
|
-
/* @__PURE__ */
|
|
7604
|
+
/* @__PURE__ */ jsx34("span", { class: `${p30}-tab-label`, children: localizeText(strings, m.label) })
|
|
7333
7605
|
]
|
|
7334
7606
|
},
|
|
7335
7607
|
m.id
|
|
@@ -7338,12 +7610,12 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
|
7338
7610
|
}
|
|
7339
7611
|
|
|
7340
7612
|
// src/ui/iframe-view.tsx
|
|
7341
|
-
import { jsx as
|
|
7613
|
+
import { jsx as jsx35, jsxs as jsxs29 } from "preact/jsx-runtime";
|
|
7342
7614
|
var p31 = BRAND.cssPrefix;
|
|
7343
7615
|
var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
|
|
7344
7616
|
function IframeView({ url, title, strings, onBack, actions }) {
|
|
7345
7617
|
return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
|
|
7346
|
-
/* @__PURE__ */
|
|
7618
|
+
/* @__PURE__ */ jsx35(
|
|
7347
7619
|
BackHeader,
|
|
7348
7620
|
{
|
|
7349
7621
|
title: title || strings.moduleBack,
|
|
@@ -7352,7 +7624,7 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7352
7624
|
actions
|
|
7353
7625
|
}
|
|
7354
7626
|
),
|
|
7355
|
-
/* @__PURE__ */
|
|
7627
|
+
/* @__PURE__ */ jsx35(
|
|
7356
7628
|
"iframe",
|
|
7357
7629
|
{
|
|
7358
7630
|
class: `${p31}-content-frame`,
|
|
@@ -7368,15 +7640,15 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7368
7640
|
}
|
|
7369
7641
|
|
|
7370
7642
|
// src/ui/content-view.tsx
|
|
7371
|
-
import { useCallback as useCallback3, useEffect as useEffect13, useState as
|
|
7372
|
-
import { jsx as
|
|
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";
|
|
7373
7645
|
var p32 = BRAND.cssPrefix;
|
|
7374
7646
|
var log15 = logger.scope("content");
|
|
7375
7647
|
var READ_DWELL_MS = 5e3;
|
|
7376
7648
|
function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
7377
|
-
const [item, setItem] =
|
|
7378
|
-
const [failed, setFailed] =
|
|
7379
|
-
const [reloadKey, setReloadKey] =
|
|
7649
|
+
const [item, setItem] = useState12(null);
|
|
7650
|
+
const [failed, setFailed] = useState12(false);
|
|
7651
|
+
const [reloadKey, setReloadKey] = useState12(0);
|
|
7380
7652
|
const retry = useCallback3(() => {
|
|
7381
7653
|
setFailed(false);
|
|
7382
7654
|
setItem(null);
|
|
@@ -7414,16 +7686,16 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7414
7686
|
[bus, id]
|
|
7415
7687
|
);
|
|
7416
7688
|
function renderBody() {
|
|
7417
|
-
if (failed) return /* @__PURE__ */
|
|
7418
|
-
if (item === null) return /* @__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 });
|
|
7419
7691
|
return /* @__PURE__ */ jsxs30("article", { class: `${p32}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
|
|
7420
|
-
item.image ? /* @__PURE__ */
|
|
7421
|
-
item.description ? /* @__PURE__ */
|
|
7422
|
-
/* @__PURE__ */
|
|
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 ?? "" })
|
|
7423
7695
|
] });
|
|
7424
7696
|
}
|
|
7425
7697
|
return /* @__PURE__ */ jsxs30("div", { class: `${p32}-module`, children: [
|
|
7426
|
-
/* @__PURE__ */
|
|
7698
|
+
/* @__PURE__ */ jsx36(
|
|
7427
7699
|
BackHeader,
|
|
7428
7700
|
{
|
|
7429
7701
|
title: item?.title || title || strings.moduleBack,
|
|
@@ -7433,19 +7705,19 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7433
7705
|
testid: TID.backHeader
|
|
7434
7706
|
}
|
|
7435
7707
|
),
|
|
7436
|
-
/* @__PURE__ */
|
|
7708
|
+
/* @__PURE__ */ jsx36("div", { class: `${p32}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
|
|
7437
7709
|
] });
|
|
7438
7710
|
}
|
|
7439
7711
|
|
|
7440
7712
|
// src/ui/messenger-home.tsx
|
|
7441
|
-
import { jsx as
|
|
7713
|
+
import { jsx as jsx37, jsxs as jsxs31 } from "preact/jsx-runtime";
|
|
7442
7714
|
var p33 = BRAND.cssPrefix;
|
|
7443
7715
|
function MessengerHome({
|
|
7444
7716
|
panelProps,
|
|
7445
7717
|
enabledModules,
|
|
7446
7718
|
nav,
|
|
7447
7719
|
bus,
|
|
7448
|
-
|
|
7720
|
+
hasUnread,
|
|
7449
7721
|
onSelectConversation,
|
|
7450
7722
|
onStartNewConversation,
|
|
7451
7723
|
onSetPanelSize
|
|
@@ -7473,7 +7745,7 @@ function MessengerHome({
|
|
|
7473
7745
|
}, []);
|
|
7474
7746
|
const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
|
|
7475
7747
|
useDragMove(containerRef.current, options.mode === "modal");
|
|
7476
|
-
const navState =
|
|
7748
|
+
const navState = useComputed8(() => nav.sig.value).value;
|
|
7477
7749
|
const top = topScreen(navState);
|
|
7478
7750
|
const activeModule = options.modules.byId[navState.activeTab];
|
|
7479
7751
|
const isReader = top?.kind === "iframe" || top?.kind === "content";
|
|
@@ -7510,12 +7782,12 @@ function MessengerHome({
|
|
|
7510
7782
|
bus,
|
|
7511
7783
|
panelProps
|
|
7512
7784
|
});
|
|
7513
|
-
const plainActions = /* @__PURE__ */
|
|
7785
|
+
const plainActions = /* @__PURE__ */ jsx37(HeaderActions, { panelProps, variant: "plain" });
|
|
7514
7786
|
if (activeModule) visitedRef.current.add(activeModule.id);
|
|
7515
7787
|
const visitedTabs = enabledModules.filter((m) => visitedRef.current.has(m.id));
|
|
7516
7788
|
const tabRoot = (module) => {
|
|
7517
7789
|
if (module.layout === "chat") {
|
|
7518
|
-
return /* @__PURE__ */
|
|
7790
|
+
return /* @__PURE__ */ jsx37(
|
|
7519
7791
|
PanelContent,
|
|
7520
7792
|
{
|
|
7521
7793
|
...panelProps,
|
|
@@ -7526,14 +7798,14 @@ function MessengerHome({
|
|
|
7526
7798
|
);
|
|
7527
7799
|
}
|
|
7528
7800
|
const Root = LAYOUTS[module.layout].Root;
|
|
7529
|
-
return Root ? /* @__PURE__ */
|
|
7801
|
+
return Root ? /* @__PURE__ */ jsx37(Root, { ...screenProps(module) }) : null;
|
|
7530
7802
|
};
|
|
7531
7803
|
const renderReader = () => {
|
|
7532
7804
|
if (top?.kind === "iframe") {
|
|
7533
|
-
return /* @__PURE__ */
|
|
7805
|
+
return /* @__PURE__ */ jsx37(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
|
|
7534
7806
|
}
|
|
7535
7807
|
if (top?.kind === "content") {
|
|
7536
|
-
return /* @__PURE__ */
|
|
7808
|
+
return /* @__PURE__ */ jsx37(
|
|
7537
7809
|
ContentView,
|
|
7538
7810
|
{
|
|
7539
7811
|
id: top.id,
|
|
@@ -7560,21 +7832,21 @@ function MessengerHome({
|
|
|
7560
7832
|
"data-testid": TID.messengerHome,
|
|
7561
7833
|
children: [
|
|
7562
7834
|
/* @__PURE__ */ jsxs31("div", { class: `${p33}-messenger-body`, children: [
|
|
7563
|
-
visitedTabs.map((m) => /* @__PURE__ */
|
|
7835
|
+
visitedTabs.map((m) => /* @__PURE__ */ jsx37("div", { class: `${p33}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
|
|
7564
7836
|
renderReader()
|
|
7565
7837
|
] }),
|
|
7566
|
-
showTabBar ? /* @__PURE__ */
|
|
7838
|
+
showTabBar ? /* @__PURE__ */ jsx37(
|
|
7567
7839
|
HomeTabBar,
|
|
7568
7840
|
{
|
|
7569
7841
|
modules: enabledModules,
|
|
7570
7842
|
activeTab: navState.activeTab,
|
|
7571
7843
|
strings,
|
|
7572
|
-
|
|
7844
|
+
hasUnread,
|
|
7573
7845
|
onSelect: nav.switchTab
|
|
7574
7846
|
}
|
|
7575
7847
|
) : null,
|
|
7576
|
-
/* @__PURE__ */
|
|
7577
|
-
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(
|
|
7578
7850
|
ResizeGrip,
|
|
7579
7851
|
{
|
|
7580
7852
|
panelEl: containerRef.current,
|
|
@@ -7591,7 +7863,7 @@ function MessengerHome({
|
|
|
7591
7863
|
}
|
|
7592
7864
|
|
|
7593
7865
|
// src/ui/modules-empty.tsx
|
|
7594
|
-
import { jsx as
|
|
7866
|
+
import { jsx as jsx38, jsxs as jsxs32 } from "preact/jsx-runtime";
|
|
7595
7867
|
var p34 = BRAND.cssPrefix;
|
|
7596
7868
|
function ModulesEmpty({ strings, onClose }) {
|
|
7597
7869
|
return /* @__PURE__ */ jsxs32(
|
|
@@ -7602,7 +7874,7 @@ function ModulesEmpty({ strings, onClose }) {
|
|
|
7602
7874
|
"aria-label": strings.panelTitle,
|
|
7603
7875
|
"data-testid": TID.modulesEmpty,
|
|
7604
7876
|
children: [
|
|
7605
|
-
onClose ? /* @__PURE__ */
|
|
7877
|
+
onClose ? /* @__PURE__ */ jsx38(
|
|
7606
7878
|
"button",
|
|
7607
7879
|
{
|
|
7608
7880
|
type: "button",
|
|
@@ -7610,21 +7882,21 @@ function ModulesEmpty({ strings, onClose }) {
|
|
|
7610
7882
|
onClick: onClose,
|
|
7611
7883
|
"aria-label": strings.close,
|
|
7612
7884
|
title: strings.close,
|
|
7613
|
-
children: /* @__PURE__ */
|
|
7885
|
+
children: /* @__PURE__ */ jsx38(CloseIcon, {})
|
|
7614
7886
|
}
|
|
7615
7887
|
) : null,
|
|
7616
|
-
/* @__PURE__ */
|
|
7888
|
+
/* @__PURE__ */ jsx38("p", { class: `${p34}-modules-empty-text`, children: strings.modulesEmpty })
|
|
7617
7889
|
]
|
|
7618
7890
|
}
|
|
7619
7891
|
);
|
|
7620
7892
|
}
|
|
7621
7893
|
|
|
7622
7894
|
// src/ui/use-launcher-callout.ts
|
|
7623
|
-
import { useCallback as useCallback5, useEffect as useEffect15, useState as
|
|
7895
|
+
import { useCallback as useCallback5, useEffect as useEffect15, useState as useState13 } from "preact/hooks";
|
|
7624
7896
|
function useLauncherCallout({ callout, persistence }) {
|
|
7625
7897
|
const textKey = callout?.text ?? "";
|
|
7626
7898
|
const persistent = callout?.persistent ?? true;
|
|
7627
|
-
const [dismissed, setDismissed] =
|
|
7899
|
+
const [dismissed, setDismissed] = useState13(() => persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7628
7900
|
useEffect15(() => {
|
|
7629
7901
|
setDismissed(persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7630
7902
|
}, [textKey, persistent, persistence]);
|
|
@@ -7636,7 +7908,7 @@ function useLauncherCallout({ callout, persistence }) {
|
|
|
7636
7908
|
}
|
|
7637
7909
|
|
|
7638
7910
|
// src/ui/app.tsx
|
|
7639
|
-
import { jsx as
|
|
7911
|
+
import { jsx as jsx39, jsxs as jsxs33 } from "preact/jsx-runtime";
|
|
7640
7912
|
var log16 = logger.scope("app");
|
|
7641
7913
|
var p35 = BRAND.cssPrefix;
|
|
7642
7914
|
function makeLocalizedWelcome(w, strings) {
|
|
@@ -7653,21 +7925,21 @@ function isAbortError(error) {
|
|
|
7653
7925
|
return error instanceof DOMException ? error.name === "AbortError" : error?.name === "AbortError";
|
|
7654
7926
|
}
|
|
7655
7927
|
function App({ options, hostElement, bus }) {
|
|
7656
|
-
const [persistence] =
|
|
7928
|
+
const [persistence] = useState14(
|
|
7657
7929
|
() => createPersistence(options.widgetId, options.storage, options.aiAgentDeploymentId)
|
|
7658
7930
|
);
|
|
7659
|
-
const [visitorId, setVisitorId] =
|
|
7931
|
+
const [visitorId, setVisitorId] = useState14(() => persistence.getVisitorId());
|
|
7660
7932
|
const initialSettings = persistence.loadUserPrefs();
|
|
7661
|
-
const [activeLocale, setActiveLocale] =
|
|
7662
|
-
const [activeThemeMode, setActiveThemeMode] =
|
|
7933
|
+
const [activeLocale, setActiveLocale] = useState14(() => initialSettings.locale ?? options.locale);
|
|
7934
|
+
const [activeThemeMode, setActiveThemeMode] = useState14(
|
|
7663
7935
|
() => initialSettings.themeMode ?? options.themeMode
|
|
7664
7936
|
);
|
|
7665
|
-
const [activeTextSize, setActiveTextSize] =
|
|
7937
|
+
const [activeTextSize, setActiveTextSize] = useState14(() => initialSettings.textSize ?? options.textSize);
|
|
7666
7938
|
const conversationIdSig = useSignal(persistence.loadConversationId());
|
|
7667
7939
|
const messagesSig = useSignal([]);
|
|
7668
|
-
const
|
|
7669
|
-
const [loadingMessages, setLoadingMessages] =
|
|
7670
|
-
const [formMarkers, setFormMarkers] =
|
|
7940
|
+
const hasUnreadSig = useSignal(false);
|
|
7941
|
+
const [loadingMessages, setLoadingMessages] = useState14(false);
|
|
7942
|
+
const [formMarkers, setFormMarkers] = useState14([]);
|
|
7671
7943
|
function landingTab() {
|
|
7672
7944
|
const list = options.modules.list;
|
|
7673
7945
|
const ids = new Set(list.map((m) => m.id));
|
|
@@ -7686,15 +7958,15 @@ function App({ options, hostElement, bus }) {
|
|
|
7686
7958
|
const homeNav = homeNavRef.current;
|
|
7687
7959
|
const chatTabIdRef = useRef9(void 0);
|
|
7688
7960
|
chatTabIdRef.current = chatTabId();
|
|
7689
|
-
const [conversationReady, setConversationReady] =
|
|
7690
|
-
const [remoteForms, setRemoteForms] =
|
|
7691
|
-
const [formsReady, setFormsReady] =
|
|
7961
|
+
const [conversationReady, setConversationReady] = useState14(false);
|
|
7962
|
+
const [remoteForms, setRemoteForms] = useState14(null);
|
|
7963
|
+
const [formsReady, setFormsReady] = useState14(false);
|
|
7692
7964
|
const isInlineLike = options.mode === "standalone" || options.mode === "inline";
|
|
7693
7965
|
const initialPanelRef = useRef9(
|
|
7694
7966
|
resolveInitialPanelState(options, currentViewportWidth(), persistence.loadPanelOpen(), persistence.loadPanelSize())
|
|
7695
7967
|
);
|
|
7696
|
-
const [isOpen, setIsOpen] =
|
|
7697
|
-
const [activated, setActivated] =
|
|
7968
|
+
const [isOpen, setIsOpen] = useState14(initialPanelRef.current.panelOpen);
|
|
7969
|
+
const [activated, setActivated] = useState14(initialPanelRef.current.panelOpen);
|
|
7698
7970
|
const activatedRef = useRef9(activated);
|
|
7699
7971
|
activatedRef.current = activated;
|
|
7700
7972
|
const pendingThreadRef = useRef9(false);
|
|
@@ -7703,7 +7975,7 @@ function App({ options, hostElement, bus }) {
|
|
|
7703
7975
|
if (isOpen) setActivated(true);
|
|
7704
7976
|
}, [isOpen]);
|
|
7705
7977
|
const initialPanelApplied = useRef9(false);
|
|
7706
|
-
const [launcherLeaving, setLauncherLeaving] =
|
|
7978
|
+
const [launcherLeaving, setLauncherLeaving] = useState14(false);
|
|
7707
7979
|
const { dismissed: calloutDismissed, dismissCallout: dismissCalloutRaw } = useLauncherCallout({
|
|
7708
7980
|
callout: options.launcher.callout,
|
|
7709
7981
|
persistence
|
|
@@ -7714,21 +7986,21 @@ function App({ options, hostElement, bus }) {
|
|
|
7714
7986
|
bus.emit("calloutDismiss", void 0);
|
|
7715
7987
|
dismissCalloutRaw();
|
|
7716
7988
|
}, [bus, dismissCalloutRaw]);
|
|
7717
|
-
const [panelSize, setPanelSize] =
|
|
7989
|
+
const [panelSize, setPanelSize] = useState14(initialPanelRef.current.panelSize);
|
|
7718
7990
|
const initialSizeApplied = useRef9(false);
|
|
7719
|
-
const [view, setView] =
|
|
7720
|
-
const [canSend, setCanSend] =
|
|
7721
|
-
const [streaming, setStreaming] =
|
|
7722
|
-
const [agent, setAgent] =
|
|
7723
|
-
const [suggestions, setSuggestions] =
|
|
7724
|
-
const [activeCancel, setActiveCancel] =
|
|
7725
|
-
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);
|
|
7726
7998
|
const stringsRef = useRef9(options.strings);
|
|
7727
|
-
const [parsedSite, setParsedSite] =
|
|
7728
|
-
const [parsedBlocks, setParsedBlocks] =
|
|
7729
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
7730
|
-
const [formContext, setFormContext] =
|
|
7731
|
-
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(
|
|
7732
8004
|
() => new AgentTransport({
|
|
7733
8005
|
agentApiBaseUrl: options.agentApiBaseUrl,
|
|
7734
8006
|
dataApiBaseUrl: options.dataApiBaseUrl,
|
|
@@ -7740,8 +8012,8 @@ function App({ options, hostElement, bus }) {
|
|
|
7740
8012
|
endpoints: options.endpoints
|
|
7741
8013
|
})
|
|
7742
8014
|
);
|
|
7743
|
-
const [reducer] =
|
|
7744
|
-
const [feedback] =
|
|
8015
|
+
const [reducer] = useState14(() => new StreamReducer(messagesSig));
|
|
8016
|
+
const [feedback] = useState14(() => new FeedbackBus(options.sound, options.haptics));
|
|
7745
8017
|
const patchAndSync = useCallback6(
|
|
7746
8018
|
(patch) => {
|
|
7747
8019
|
persistence.patchUserPrefs(patch);
|
|
@@ -8243,7 +8515,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8243
8515
|
);
|
|
8244
8516
|
const regenerateDanglingTurn = useCallback6(() => {
|
|
8245
8517
|
if (streaming || regenInFlightRef.current || resumeBubbleRef.current) return;
|
|
8246
|
-
const last = messagesSig.value.
|
|
8518
|
+
const last = messagesSig.value.findLast((m) => !m.ephemeral);
|
|
8247
8519
|
if (last?.role !== "user") return;
|
|
8248
8520
|
regenInFlightRef.current = true;
|
|
8249
8521
|
log16.info("regenerating dangling user turn (needs-generation)");
|
|
@@ -8316,6 +8588,20 @@ function App({ options, hostElement, bus }) {
|
|
|
8316
8588
|
},
|
|
8317
8589
|
[streaming, messagesSig]
|
|
8318
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
|
+
);
|
|
8319
8605
|
const toolInteraction = useMemo3(
|
|
8320
8606
|
() => ({
|
|
8321
8607
|
humanInLoop: options.features.humanInLoop,
|
|
@@ -8361,12 +8647,12 @@ function App({ options, hostElement, bus }) {
|
|
|
8361
8647
|
void transport.submitForm({ formId: form.id, conversationId: activeConversationId, trigger, values, skipped });
|
|
8362
8648
|
}
|
|
8363
8649
|
});
|
|
8364
|
-
const activeForm =
|
|
8650
|
+
const activeForm = useComputed9(() => forms.activeForm.value);
|
|
8365
8651
|
useEffect16(() => {
|
|
8366
8652
|
forms.refresh();
|
|
8367
8653
|
}, [effectiveForms, forms]);
|
|
8368
8654
|
const pageArea = options.pageContext?.area ? String(options.pageContext.area) : void 0;
|
|
8369
|
-
const msgCount =
|
|
8655
|
+
const msgCount = useComputed9(() => messagesSig.value.length);
|
|
8370
8656
|
useEffect16(() => {
|
|
8371
8657
|
if (conversationReady && formsReady) forms.fire("pre-chat");
|
|
8372
8658
|
}, [conversationReady, formsReady, forms]);
|
|
@@ -8447,15 +8733,23 @@ function App({ options, hostElement, bus }) {
|
|
|
8447
8733
|
const refreshUnread = useCallback6(() => {
|
|
8448
8734
|
if (!options.modules.list.some((m) => m.layout === "chat")) return;
|
|
8449
8735
|
transport.listConversations({ limit: 50 }).then((res) => {
|
|
8450
|
-
|
|
8736
|
+
hasUnreadSig.value = res.conversations.some((c) => c.hasUnread);
|
|
8451
8737
|
}).catch((err) => log16.debug("refreshUnread failed (non-fatal)", { err }));
|
|
8452
|
-
}, [transport, options.modules,
|
|
8738
|
+
}, [transport, options.modules, hasUnreadSig]);
|
|
8453
8739
|
const unreadSeeded = useRef9(false);
|
|
8454
8740
|
useEffect16(() => {
|
|
8455
8741
|
if (!activated || !conversationReady || unreadSeeded.current) return;
|
|
8456
8742
|
unreadSeeded.current = true;
|
|
8457
8743
|
refreshUnread();
|
|
8458
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]);
|
|
8459
8753
|
const handleOpen = useCallback6(() => {
|
|
8460
8754
|
log16.info("open", { mode: options.mode });
|
|
8461
8755
|
feedback.unlock();
|
|
@@ -8688,7 +8982,9 @@ function App({ options, hostElement, bus }) {
|
|
|
8688
8982
|
// `openForm()` command, so it bypasses frequency dedupe by design.
|
|
8689
8983
|
onFormFill: (formId) => forms.fire("manual", formId),
|
|
8690
8984
|
tool: toolInteraction,
|
|
8691
|
-
onRetry: handleRetry
|
|
8985
|
+
onRetry: handleRetry,
|
|
8986
|
+
onMessageFeedback: handleMessageFeedback,
|
|
8987
|
+
onMessageSeen: handleMessageSeen
|
|
8692
8988
|
};
|
|
8693
8989
|
const onSelectConversation = (conversationId) => {
|
|
8694
8990
|
void handleSelectHistoryConversation(conversationId);
|
|
@@ -8700,19 +8996,19 @@ function App({ options, hostElement, bus }) {
|
|
|
8700
8996
|
const renderSurface = (size) => {
|
|
8701
8997
|
const closeable = isActionVisible("close", effectiveOptions.mode, size);
|
|
8702
8998
|
if (enabledModules.length === 0) {
|
|
8703
|
-
return /* @__PURE__ */
|
|
8999
|
+
return /* @__PURE__ */ jsx39(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
|
|
8704
9000
|
}
|
|
8705
9001
|
if (enabledModules.length === 1 && enabledModules[0]?.layout === "chat") {
|
|
8706
|
-
return /* @__PURE__ */
|
|
9002
|
+
return /* @__PURE__ */ jsx39(Panel, { ...panelProps, panelSize: size });
|
|
8707
9003
|
}
|
|
8708
|
-
return /* @__PURE__ */
|
|
9004
|
+
return /* @__PURE__ */ jsx39(
|
|
8709
9005
|
MessengerHome,
|
|
8710
9006
|
{
|
|
8711
9007
|
panelProps: { ...panelProps, panelSize: size, onClose: closeable ? handleClose : void 0 },
|
|
8712
9008
|
enabledModules,
|
|
8713
9009
|
nav: homeNav,
|
|
8714
9010
|
bus,
|
|
8715
|
-
|
|
9011
|
+
hasUnread: hasUnreadSig.value,
|
|
8716
9012
|
onSelectConversation,
|
|
8717
9013
|
onStartNewConversation: handleNewChat,
|
|
8718
9014
|
onSetPanelSize: setPanelSize
|
|
@@ -8724,7 +9020,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8724
9020
|
void handleSelectHistoryConversation(chat.conversationId);
|
|
8725
9021
|
};
|
|
8726
9022
|
const conversationsEnabled = enabledModules.some((m) => m.layout === "chat");
|
|
8727
|
-
return /* @__PURE__ */
|
|
9023
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: /* @__PURE__ */ jsx39(
|
|
8728
9024
|
PageShell,
|
|
8729
9025
|
{
|
|
8730
9026
|
site: parsedSite,
|
|
@@ -8745,15 +9041,15 @@ function App({ options, hostElement, bus }) {
|
|
|
8745
9041
|
}
|
|
8746
9042
|
if (isInlineLike) {
|
|
8747
9043
|
const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
|
|
8748
|
-
return /* @__PURE__ */
|
|
9044
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: renderSurface(inlineSize) });
|
|
8749
9045
|
}
|
|
8750
9046
|
const drawerEdgeTab = options.mode === "drawer";
|
|
8751
9047
|
const triggerOwnedByPage = options.mode === "modal";
|
|
8752
9048
|
const launcherVisible = !triggerOwnedByPage && !options.launcher.hidden && (!isOpen || launcherLeaving);
|
|
8753
9049
|
const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
|
|
8754
9050
|
return /* @__PURE__ */ jsxs33("div", { class: `${p35}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
|
|
8755
|
-
isOpen || activated ? /* @__PURE__ */
|
|
8756
|
-
launcherVisible ? /* @__PURE__ */
|
|
9051
|
+
isOpen || activated ? /* @__PURE__ */ jsx39("div", { class: `${p35}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
|
|
9052
|
+
launcherVisible ? /* @__PURE__ */ jsx39(
|
|
8757
9053
|
Launcher,
|
|
8758
9054
|
{
|
|
8759
9055
|
onToggle: handleOpen,
|
|
@@ -8763,7 +9059,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8763
9059
|
edgeTab: drawerEdgeTab
|
|
8764
9060
|
}
|
|
8765
9061
|
) : null,
|
|
8766
|
-
calloutToRender ? /* @__PURE__ */
|
|
9062
|
+
calloutToRender ? /* @__PURE__ */ jsx39(
|
|
8767
9063
|
LauncherCallout,
|
|
8768
9064
|
{
|
|
8769
9065
|
callout: calloutToRender,
|
|
@@ -8839,6 +9135,9 @@ var TRACKED = {
|
|
|
8839
9135
|
formSubmit: (p36) => ({ formId: p36.formId, skipped: p36.skipped }),
|
|
8840
9136
|
toolResult: () => void 0,
|
|
8841
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,
|
|
8842
9141
|
// Content — ids, tags + counts only; titles/bodies never ride.
|
|
8843
9142
|
contentView: (p36) => ({ section: p36.section, tags: p36.tags, count: p36.count }),
|
|
8844
9143
|
contentOpen: (p36) => ({ contentId: p36.contentId, tags: p36.tags }),
|