@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/index.mjs
CHANGED
|
@@ -29,7 +29,7 @@ var BRAND = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// src/core/version.ts
|
|
32
|
-
var ELEMENTS_VERSION = true ? "0.
|
|
32
|
+
var ELEMENTS_VERSION = true ? "0.55.0" : "0.0.0-dev";
|
|
33
33
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
34
34
|
|
|
35
35
|
// src/i18n/strings.ts
|
|
@@ -38,8 +38,8 @@ var STRINGS_EN = {
|
|
|
38
38
|
attachmentMimeRejected: "File type not supported",
|
|
39
39
|
attachmentTooLarge: "File is too large",
|
|
40
40
|
attachmentTooMany: "Attachment limit reached",
|
|
41
|
-
conversationClosed: "This
|
|
42
|
-
conversationLoading: "Loading
|
|
41
|
+
conversationClosed: "This chat is closed",
|
|
42
|
+
conversationLoading: "Loading chat\u2026",
|
|
43
43
|
close: "Close",
|
|
44
44
|
collapse: "Collapse",
|
|
45
45
|
collapseSidebar: "Collapse sidebar",
|
|
@@ -58,10 +58,10 @@ var STRINGS_EN = {
|
|
|
58
58
|
fullscreen: "Fullscreen",
|
|
59
59
|
history: "History",
|
|
60
60
|
historyBack: "Back to chat",
|
|
61
|
-
historyEmpty: "No previous
|
|
62
|
-
historyLoading: "Loading your
|
|
63
|
-
historyContinue: "Continue the
|
|
64
|
-
historyTitle: "
|
|
61
|
+
historyEmpty: "No previous chats yet",
|
|
62
|
+
historyLoading: "Loading your chats\u2026",
|
|
63
|
+
historyContinue: "Continue the chat",
|
|
64
|
+
historyTitle: "Chat history",
|
|
65
65
|
language: "Language",
|
|
66
66
|
launcherOpen: "Open chat",
|
|
67
67
|
launcherLabel: "Chat with us",
|
|
@@ -69,14 +69,14 @@ var STRINGS_EN = {
|
|
|
69
69
|
micStop: "Stop voice input",
|
|
70
70
|
micUnsupported: "Voice input is not supported in this browser",
|
|
71
71
|
moreActions: "More actions",
|
|
72
|
-
newConversation: "New
|
|
72
|
+
newConversation: "New chat",
|
|
73
73
|
panelTitle: "Chat",
|
|
74
74
|
resizeHandle: "Drag to resize",
|
|
75
75
|
scrollToBottom: "Scroll to latest",
|
|
76
76
|
send: "Send",
|
|
77
77
|
soundOff: "Sound off",
|
|
78
78
|
soundOn: "Sound on",
|
|
79
|
-
startNewConversation: "Start a new
|
|
79
|
+
startNewConversation: "Start a new chat",
|
|
80
80
|
stop: "Stop",
|
|
81
81
|
theme: "Theme",
|
|
82
82
|
themeAuto: "Auto",
|
|
@@ -92,9 +92,13 @@ var STRINGS_EN = {
|
|
|
92
92
|
usedTool: "Used tool",
|
|
93
93
|
toolResult: "Result",
|
|
94
94
|
sources: "Sources",
|
|
95
|
+
feedbackUp: "Good response",
|
|
96
|
+
feedbackDown: "Bad response",
|
|
97
|
+
feedbackThanks: "Thanks for your feedback",
|
|
98
|
+
newMessages: "New messages",
|
|
95
99
|
// ── Messenger modules ──────────────────────────────────────────
|
|
96
100
|
tabHome: "Home",
|
|
97
|
-
tabConversations: "
|
|
101
|
+
tabConversations: "Chats",
|
|
98
102
|
tabHelp: "Help",
|
|
99
103
|
tabNews: "News",
|
|
100
104
|
modulesEmpty: "Nothing here yet",
|
|
@@ -171,8 +175,8 @@ var STRINGS_FR = {
|
|
|
171
175
|
attachmentMimeRejected: "Type de fichier non pris en charge",
|
|
172
176
|
attachmentTooLarge: "Le fichier est trop volumineux",
|
|
173
177
|
attachmentTooMany: "Limite de pi\xE8ces jointes atteinte",
|
|
174
|
-
conversationClosed: "
|
|
175
|
-
conversationLoading: "Chargement
|
|
178
|
+
conversationClosed: "Ce chat est ferm\xE9",
|
|
179
|
+
conversationLoading: "Chargement du chat\u2026",
|
|
176
180
|
close: "Fermer",
|
|
177
181
|
collapse: "R\xE9duire",
|
|
178
182
|
collapseSidebar: "R\xE9duire la barre lat\xE9rale",
|
|
@@ -191,10 +195,10 @@ var STRINGS_FR = {
|
|
|
191
195
|
fullscreen: "Plein \xE9cran",
|
|
192
196
|
history: "Historique",
|
|
193
197
|
historyBack: "Retour au chat",
|
|
194
|
-
historyEmpty: "
|
|
195
|
-
historyContinue: "Poursuivre
|
|
196
|
-
historyLoading: "Chargement de vos
|
|
197
|
-
historyTitle: "Historique des
|
|
198
|
+
historyEmpty: "Aucun chat pour le moment",
|
|
199
|
+
historyContinue: "Poursuivre le chat",
|
|
200
|
+
historyLoading: "Chargement de vos chats\u2026",
|
|
201
|
+
historyTitle: "Historique des chats",
|
|
198
202
|
language: "Langue",
|
|
199
203
|
launcherOpen: "Ouvrir le chat",
|
|
200
204
|
launcherLabel: "Discuter avec nous",
|
|
@@ -202,14 +206,14 @@ var STRINGS_FR = {
|
|
|
202
206
|
micStop: "Arr\xEAter la saisie vocale",
|
|
203
207
|
micUnsupported: "La saisie vocale n'est pas prise en charge par ce navigateur",
|
|
204
208
|
moreActions: "Plus d'actions",
|
|
205
|
-
newConversation: "
|
|
209
|
+
newConversation: "Nouveau chat",
|
|
206
210
|
panelTitle: "Chat",
|
|
207
211
|
resizeHandle: "Glisser pour redimensionner",
|
|
208
212
|
scrollToBottom: "Aller au plus r\xE9cent",
|
|
209
213
|
send: "Envoyer",
|
|
210
214
|
soundOff: "Son d\xE9sactiv\xE9",
|
|
211
215
|
soundOn: "Son activ\xE9",
|
|
212
|
-
startNewConversation: "D\xE9marrer
|
|
216
|
+
startNewConversation: "D\xE9marrer un nouveau chat",
|
|
213
217
|
stop: "Arr\xEAter",
|
|
214
218
|
theme: "Th\xE8me",
|
|
215
219
|
themeAuto: "Auto",
|
|
@@ -225,9 +229,13 @@ var STRINGS_FR = {
|
|
|
225
229
|
usedTool: "Outil utilis\xE9",
|
|
226
230
|
toolResult: "R\xE9sultat",
|
|
227
231
|
sources: "Sources",
|
|
232
|
+
feedbackUp: "Bonne r\xE9ponse",
|
|
233
|
+
feedbackDown: "Mauvaise r\xE9ponse",
|
|
234
|
+
feedbackThanks: "Merci pour votre retour",
|
|
235
|
+
newMessages: "Nouveaux messages",
|
|
228
236
|
// ── Messenger modules ──────────────────────────────────────────
|
|
229
237
|
tabHome: "Accueil",
|
|
230
|
-
tabConversations: "
|
|
238
|
+
tabConversations: "Chats",
|
|
231
239
|
tabHelp: "Aide",
|
|
232
240
|
tabNews: "Actualit\xE9s",
|
|
233
241
|
modulesEmpty: "Rien pour le moment",
|
|
@@ -304,8 +312,8 @@ var STRINGS_AR = {
|
|
|
304
312
|
attachmentMimeRejected: "\u0646\u0648\u0639 \u0627\u0644\u0645\u0644\u0641 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645",
|
|
305
313
|
attachmentTooLarge: "\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627",
|
|
306
314
|
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",
|
|
307
|
-
conversationClosed: "\u062A\u0645 \u0625\u063A\u0644\u0627\u0642 \u0647\u0630\u0647 \u0627\u0644\
|
|
308
|
-
conversationLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\
|
|
315
|
+
conversationClosed: "\u062A\u0645 \u0625\u063A\u0644\u0627\u0642 \u0647\u0630\u0647 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
316
|
+
conversationLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0629\u2026",
|
|
309
317
|
close: "\u0625\u063A\u0644\u0627\u0642",
|
|
310
318
|
collapse: "\u0637\u064A\u0651",
|
|
311
319
|
collapseSidebar: "\u0637\u064A\u0651 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",
|
|
@@ -323,26 +331,26 @@ var STRINGS_AR = {
|
|
|
323
331
|
exitFullscreen: "\u0625\u0646\u0647\u0627\u0621 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
|
|
324
332
|
fullscreen: "\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
|
|
325
333
|
history: "\u0627\u0644\u0633\u062C\u0644",
|
|
326
|
-
historyBack: "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\
|
|
327
|
-
historyEmpty: "\u0644\u0627 \u062A\u0648\u062C\u062F \
|
|
328
|
-
historyContinue: "\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\
|
|
329
|
-
historyLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \
|
|
330
|
-
historyTitle: "\u0633\u062C\u0644 \u0627\u0644\
|
|
334
|
+
historyBack: "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
335
|
+
historyEmpty: "\u0644\u0627 \u062A\u0648\u062C\u062F \u062F\u0631\u062F\u0634\u0627\u062A \u0633\u0627\u0628\u0642\u0629 \u0628\u0639\u062F",
|
|
336
|
+
historyContinue: "\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
337
|
+
historyLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u062F\u0631\u062F\u0634\u0627\u062A\u0643\u2026",
|
|
338
|
+
historyTitle: "\u0633\u062C\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",
|
|
331
339
|
language: "\u0627\u0644\u0644\u063A\u0629",
|
|
332
|
-
launcherOpen: "\u0641\u062A\u062D \u0627\u0644\
|
|
340
|
+
launcherOpen: "\u0641\u062A\u062D \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
333
341
|
launcherLabel: "\u062A\u062D\u062F\u062B \u0645\u0639\u0646\u0627",
|
|
334
342
|
micStart: "\u0628\u062F\u0621 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",
|
|
335
343
|
micStop: "\u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",
|
|
336
344
|
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",
|
|
337
345
|
moreActions: "\u0625\u062C\u0631\u0627\u0621\u0627\u062A \u0625\u0636\u0627\u0641\u064A\u0629",
|
|
338
|
-
newConversation: "\
|
|
339
|
-
panelTitle: "\u0627\u0644\
|
|
346
|
+
newConversation: "\u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",
|
|
347
|
+
panelTitle: "\u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
340
348
|
resizeHandle: "\u0627\u0633\u062D\u0628 \u0644\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062D\u062C\u0645",
|
|
341
349
|
scrollToBottom: "\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0623\u062D\u062F\u062B",
|
|
342
350
|
send: "\u0625\u0631\u0633\u0627\u0644",
|
|
343
351
|
soundOff: "\u0643\u062A\u0645 \u0627\u0644\u0635\u0648\u062A",
|
|
344
352
|
soundOn: "\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0635\u0648\u062A",
|
|
345
|
-
startNewConversation: "\u0628\u062F\u0621 \
|
|
353
|
+
startNewConversation: "\u0628\u062F\u0621 \u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",
|
|
346
354
|
stop: "\u0625\u064A\u0642\u0627\u0641",
|
|
347
355
|
theme: "\u0627\u0644\u0645\u0638\u0647\u0631",
|
|
348
356
|
themeAuto: "\u062A\u0644\u0642\u0627\u0626\u064A",
|
|
@@ -358,9 +366,13 @@ var STRINGS_AR = {
|
|
|
358
366
|
usedTool: "\u0623\u062F\u0627\u0629 \u0645\u064F\u0633\u062A\u062E\u062F\u064E\u0645\u0629",
|
|
359
367
|
toolResult: "\u0627\u0644\u0646\u062A\u064A\u062C\u0629",
|
|
360
368
|
sources: "\u0627\u0644\u0645\u0635\u0627\u062F\u0631",
|
|
369
|
+
feedbackUp: "\u0631\u062F \u062C\u064A\u062F",
|
|
370
|
+
feedbackDown: "\u0631\u062F \u0633\u064A\u0626",
|
|
371
|
+
feedbackThanks: "\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643",
|
|
372
|
+
newMessages: "\u0631\u0633\u0627\u0626\u0644 \u062C\u062F\u064A\u062F\u0629",
|
|
361
373
|
// ── Messenger modules ──────────────────────────────────────────
|
|
362
374
|
tabHome: "\u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629",
|
|
363
|
-
tabConversations: "\u0627\u0644\
|
|
375
|
+
tabConversations: "\u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",
|
|
364
376
|
tabHelp: "\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",
|
|
365
377
|
tabNews: "\u0627\u0644\u0623\u062E\u0628\u0627\u0631",
|
|
366
378
|
modulesEmpty: "\u0644\u0627 \u0634\u064A\u0621 \u0647\u0646\u0627 \u0628\u0639\u062F",
|
|
@@ -437,8 +449,8 @@ var STRINGS_ES = {
|
|
|
437
449
|
attachmentMimeRejected: "Tipo de archivo no admitido",
|
|
438
450
|
attachmentTooLarge: "El archivo es demasiado grande",
|
|
439
451
|
attachmentTooMany: "Se alcanz\xF3 el l\xEDmite de adjuntos",
|
|
440
|
-
conversationClosed: "
|
|
441
|
-
conversationLoading: "Cargando
|
|
452
|
+
conversationClosed: "Este chat est\xE1 cerrado",
|
|
453
|
+
conversationLoading: "Cargando chat\u2026",
|
|
442
454
|
close: "Cerrar",
|
|
443
455
|
collapse: "Contraer",
|
|
444
456
|
collapseSidebar: "Contraer la barra lateral",
|
|
@@ -457,10 +469,10 @@ var STRINGS_ES = {
|
|
|
457
469
|
fullscreen: "Pantalla completa",
|
|
458
470
|
history: "Historial",
|
|
459
471
|
historyBack: "Volver al chat",
|
|
460
|
-
historyEmpty: "A\xFAn no tienes
|
|
461
|
-
historyContinue: "Continuar
|
|
462
|
-
historyLoading: "Cargando tus
|
|
463
|
-
historyTitle: "Historial de
|
|
472
|
+
historyEmpty: "A\xFAn no tienes chats",
|
|
473
|
+
historyContinue: "Continuar el chat",
|
|
474
|
+
historyLoading: "Cargando tus chats\u2026",
|
|
475
|
+
historyTitle: "Historial de chats",
|
|
464
476
|
language: "Idioma",
|
|
465
477
|
launcherOpen: "Abrir el chat",
|
|
466
478
|
launcherLabel: "Chatea con nosotros",
|
|
@@ -468,14 +480,14 @@ var STRINGS_ES = {
|
|
|
468
480
|
micStop: "Detener entrada de voz",
|
|
469
481
|
micUnsupported: "Este navegador no admite la entrada de voz",
|
|
470
482
|
moreActions: "M\xE1s acciones",
|
|
471
|
-
newConversation: "
|
|
483
|
+
newConversation: "Nuevo chat",
|
|
472
484
|
panelTitle: "Chat",
|
|
473
485
|
resizeHandle: "Arrastra para cambiar el tama\xF1o",
|
|
474
486
|
scrollToBottom: "Ir a lo m\xE1s reciente",
|
|
475
487
|
send: "Enviar",
|
|
476
488
|
soundOff: "Sonido desactivado",
|
|
477
489
|
soundOn: "Sonido activado",
|
|
478
|
-
startNewConversation: "Iniciar
|
|
490
|
+
startNewConversation: "Iniciar un chat nuevo",
|
|
479
491
|
stop: "Detener",
|
|
480
492
|
theme: "Tema",
|
|
481
493
|
themeAuto: "Autom\xE1tico",
|
|
@@ -491,9 +503,13 @@ var STRINGS_ES = {
|
|
|
491
503
|
usedTool: "Herramienta usada",
|
|
492
504
|
toolResult: "Resultado",
|
|
493
505
|
sources: "Fuentes",
|
|
506
|
+
feedbackUp: "Buena respuesta",
|
|
507
|
+
feedbackDown: "Mala respuesta",
|
|
508
|
+
feedbackThanks: "Gracias por tu opini\xF3n",
|
|
509
|
+
newMessages: "Mensajes nuevos",
|
|
494
510
|
// ── Messenger modules ──────────────────────────────────────────
|
|
495
511
|
tabHome: "Inicio",
|
|
496
|
-
tabConversations: "
|
|
512
|
+
tabConversations: "Chats",
|
|
497
513
|
tabHelp: "Ayuda",
|
|
498
514
|
tabNews: "Novedades",
|
|
499
515
|
modulesEmpty: "A\xFAn no hay nada aqu\xED",
|
|
@@ -570,8 +586,8 @@ var STRINGS_HE = {
|
|
|
570
586
|
attachmentMimeRejected: "\u05E1\u05D5\u05D2 \u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA",
|
|
571
587
|
attachmentTooLarge: "\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9",
|
|
572
588
|
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",
|
|
573
|
-
conversationClosed: "\u05D4\
|
|
574
|
-
conversationLoading: "\u05D8\u05D5\u05E2\u05DF \
|
|
589
|
+
conversationClosed: "\u05D4\u05E6\u05F3\u05D0\u05D8 \u05D4\u05D6\u05D4 \u05E0\u05E1\u05D2\u05E8",
|
|
590
|
+
conversationLoading: "\u05D8\u05D5\u05E2\u05DF \u05E6\u05F3\u05D0\u05D8\u2026",
|
|
575
591
|
close: "\u05E1\u05D2\u05D9\u05E8\u05D4",
|
|
576
592
|
collapse: "\u05DB\u05D9\u05D5\u05D5\u05E5",
|
|
577
593
|
collapseSidebar: "\u05DB\u05D9\u05D5\u05D5\u05E5 \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",
|
|
@@ -589,11 +605,11 @@ var STRINGS_HE = {
|
|
|
589
605
|
exitFullscreen: "\u05D9\u05E6\u05D9\u05D0\u05D4 \u05DE\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",
|
|
590
606
|
fullscreen: "\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",
|
|
591
607
|
history: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D4",
|
|
592
|
-
historyBack: "\u05D7\u05D6\u05E8\u05D4 \u05DC\
|
|
593
|
-
historyEmpty: "\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \
|
|
594
|
-
historyContinue: "\u05D4\u05DE\u05E9\u05DA \
|
|
595
|
-
historyLoading: "\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\
|
|
596
|
-
historyTitle: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \
|
|
608
|
+
historyBack: "\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6\u05F3\u05D0\u05D8",
|
|
609
|
+
historyEmpty: "\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E7\u05D5\u05D3\u05DE\u05D9\u05DD",
|
|
610
|
+
historyContinue: "\u05D4\u05DE\u05E9\u05DA \u05E6\u05F3\u05D0\u05D8",
|
|
611
|
+
historyLoading: "\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E9\u05DC\u05DA\u2026",
|
|
612
|
+
historyTitle: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",
|
|
597
613
|
language: "\u05E9\u05E4\u05D4",
|
|
598
614
|
launcherOpen: "\u05E4\u05EA\u05D9\u05D7\u05EA \u05E6\u05F3\u05D0\u05D8",
|
|
599
615
|
launcherLabel: "\u05D3\u05D1\u05E8\u05D5 \u05D0\u05D9\u05EA\u05E0\u05D5",
|
|
@@ -601,14 +617,14 @@ var STRINGS_HE = {
|
|
|
601
617
|
micStop: "\u05E2\u05E6\u05D9\u05E8\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",
|
|
602
618
|
micUnsupported: "\u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA \u05D1\u05D3\u05E4\u05D3\u05E4\u05DF \u05D6\u05D4",
|
|
603
619
|
moreActions: "\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA \u05E0\u05D5\u05E1\u05E4\u05D5\u05EA",
|
|
604
|
-
newConversation: "\
|
|
605
|
-
panelTitle: "\
|
|
620
|
+
newConversation: "\u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",
|
|
621
|
+
panelTitle: "\u05E6\u05F3\u05D0\u05D8",
|
|
606
622
|
resizeHandle: "\u05D2\u05E8\u05D5\u05E8 \u05DC\u05E9\u05D9\u05E0\u05D5\u05D9 \u05D4\u05D2\u05D5\u05D3\u05DC",
|
|
607
623
|
scrollToBottom: "\u05DE\u05E2\u05D1\u05E8 \u05DC\u05D7\u05D3\u05E9 \u05D1\u05D9\u05D5\u05EA\u05E8",
|
|
608
624
|
send: "\u05E9\u05DC\u05D9\u05D7\u05D4",
|
|
609
625
|
soundOff: "\u05D4\u05E9\u05EA\u05E7\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",
|
|
610
626
|
soundOn: "\u05D4\u05E4\u05E2\u05DC\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",
|
|
611
|
-
startNewConversation: "\u05D4\u05EA\u05D7\u05DC\u05EA \
|
|
627
|
+
startNewConversation: "\u05D4\u05EA\u05D7\u05DC\u05EA \u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",
|
|
612
628
|
stop: "\u05E2\u05E6\u05D9\u05E8\u05D4",
|
|
613
629
|
theme: "\u05E2\u05E8\u05DB\u05EA \u05E0\u05D5\u05E9\u05D0",
|
|
614
630
|
themeAuto: "\u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9",
|
|
@@ -624,9 +640,13 @@ var STRINGS_HE = {
|
|
|
624
640
|
usedTool: "\u05DB\u05DC\u05D9 \u05D1\u05E9\u05D9\u05DE\u05D5\u05E9",
|
|
625
641
|
toolResult: "\u05EA\u05D5\u05E6\u05D0\u05D4",
|
|
626
642
|
sources: "\u05DE\u05E7\u05D5\u05E8\u05D5\u05EA",
|
|
643
|
+
feedbackUp: "\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D8\u05D5\u05D1\u05D4",
|
|
644
|
+
feedbackDown: "\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D2\u05E8\u05D5\u05E2\u05D4",
|
|
645
|
+
feedbackThanks: "\u05EA\u05D5\u05D3\u05D4 \u05E2\u05DC \u05D4\u05DE\u05E9\u05D5\u05D1",
|
|
646
|
+
newMessages: "\u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05D7\u05D3\u05E9\u05D5\u05EA",
|
|
627
647
|
// ── Messenger modules ──────────────────────────────────────────
|
|
628
648
|
tabHome: "\u05D1\u05D9\u05EA",
|
|
629
|
-
tabConversations: "\
|
|
649
|
+
tabConversations: "\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",
|
|
630
650
|
tabHelp: "\u05E2\u05D6\u05E8\u05D4",
|
|
631
651
|
tabNews: "\u05D7\u05D3\u05E9\u05D5\u05EA",
|
|
632
652
|
modulesEmpty: "\u05D0\u05D9\u05DF \u05DB\u05D0\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DB\u05DC\u05D5\u05DD",
|
|
@@ -1057,6 +1077,9 @@ function resolveOptions(rawOpts) {
|
|
|
1057
1077
|
showReasoning: behavior.showReasoning ?? false,
|
|
1058
1078
|
showToolCalls: behavior.showToolCalls ?? false,
|
|
1059
1079
|
showSources: behavior.showSources ?? false,
|
|
1080
|
+
scrollFade: behavior.scrollFade ?? true,
|
|
1081
|
+
scrollAnchor: behavior.scrollAnchor ?? "bottom",
|
|
1082
|
+
enableMessageFeedback: behavior.enableMessageFeedback ?? true,
|
|
1060
1083
|
features: {
|
|
1061
1084
|
files: opts.features?.files ?? DEFAULT_FEATURES.files,
|
|
1062
1085
|
voice: opts.features?.voice ?? DEFAULT_FEATURES.voice,
|
|
@@ -1384,7 +1407,8 @@ var BEHAVIOR_ATTRS = [
|
|
|
1384
1407
|
["start-minimized", "startMinimized", boolAttr],
|
|
1385
1408
|
["show-reasoning", "showReasoning", boolAttr],
|
|
1386
1409
|
["show-tool-calls", "showToolCalls", boolAttr],
|
|
1387
|
-
["show-sources", "showSources", boolAttr]
|
|
1410
|
+
["show-sources", "showSources", boolAttr],
|
|
1411
|
+
["enable-message-feedback", "enableMessageFeedback", boolAttr]
|
|
1388
1412
|
];
|
|
1389
1413
|
var I18N_ATTRS = [["locale", "locale"]];
|
|
1390
1414
|
var ACTION_NAMES = new Set(ACTION_NAME_LITERALS);
|
|
@@ -1639,7 +1663,7 @@ var tokens_default = ':host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent
|
|
|
1639
1663
|
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';
|
|
1640
1664
|
|
|
1641
1665
|
// src/styles/panel.css
|
|
1642
|
-
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';
|
|
1666
|
+
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';
|
|
1643
1667
|
|
|
1644
1668
|
// src/styles/standalone.css
|
|
1645
1669
|
var standalone_default = ".__P__-standalone-page{margin:0;height:100vh;background:var(--__P__-bg, #fff);display:grid;place-items:stretch}\n";
|
|
@@ -1857,8 +1881,8 @@ var EventBus = class {
|
|
|
1857
1881
|
import { h, render as renderPreact } from "preact";
|
|
1858
1882
|
|
|
1859
1883
|
// src/ui/app.tsx
|
|
1860
|
-
import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as
|
|
1861
|
-
import { batch, useComputed as
|
|
1884
|
+
import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as useState14 } from "preact/hooks";
|
|
1885
|
+
import { batch, useComputed as useComputed9, useSignal } from "@preact/signals";
|
|
1862
1886
|
|
|
1863
1887
|
// src/core/handshake-shape.ts
|
|
1864
1888
|
function isPlainObject2(raw) {
|
|
@@ -2054,11 +2078,20 @@ var DEFAULT_PATHS = {
|
|
|
2054
2078
|
updateSettings: "/pai/update-settings",
|
|
2055
2079
|
/**
|
|
2056
2080
|
* Mark a conversation read. POST `{ visitorId, conversationId }` → the server
|
|
2057
|
-
* records `lastReadAt = now` for that (visitor, conversation)
|
|
2058
|
-
* `
|
|
2059
|
-
*
|
|
2081
|
+
* records `lastReadAt = now` for that (visitor, conversation), which clears its
|
|
2082
|
+
* `hasUnread` (returned on `/list-conversations`). Fire-and-forget on the
|
|
2083
|
+
* client; a failure just leaves the dot until the next sync.
|
|
2060
2084
|
*/
|
|
2061
2085
|
markRead: "/pai/mark-read",
|
|
2086
|
+
/**
|
|
2087
|
+
* Record 👍/👎 feedback on an assistant message. POST `{ visitorId,
|
|
2088
|
+
* conversationId, messageId, set: { feedback } }` (`feedback`: `"up"` / `"down"`
|
|
2089
|
+
* / `null` to clear) → the server stores the signal on that message (mirrors the
|
|
2090
|
+
* authenticated `conversation/message/update` `set` shape). Fire-and-forget on
|
|
2091
|
+
* the client; a 404 (backend without the endpoint) is ignored — the UI still
|
|
2092
|
+
* reflects the choice locally and emits the `messageFeedback` event.
|
|
2093
|
+
*/
|
|
2094
|
+
messageFeedback: "/pai/message-feedback",
|
|
2062
2095
|
// ── Data API (module-help-ai-data-api, via `dataApiBaseUrl`) ─────────
|
|
2063
2096
|
/**
|
|
2064
2097
|
* The data module's one ACTIVATION read. `GET
|
|
@@ -2401,7 +2434,7 @@ var AgentTransport = class {
|
|
|
2401
2434
|
lastMessageAt: conversation.lastMessageAt,
|
|
2402
2435
|
preview: conversation.preview,
|
|
2403
2436
|
canContinue: conversation.canContinue,
|
|
2404
|
-
|
|
2437
|
+
hasUnread: conversation.hasUnread
|
|
2405
2438
|
})),
|
|
2406
2439
|
nextCursor: res.nextCursor
|
|
2407
2440
|
};
|
|
@@ -2428,8 +2461,8 @@ var AgentTransport = class {
|
|
|
2428
2461
|
}
|
|
2429
2462
|
/**
|
|
2430
2463
|
* Mark a conversation read up to its latest message. Fire-and-forget — the
|
|
2431
|
-
* server records `lastReadAt` and clears that conversation's `
|
|
2432
|
-
* next `/conversations`. A failure is non-fatal (the
|
|
2464
|
+
* server records `lastReadAt` and clears that conversation's `hasUnread` on the
|
|
2465
|
+
* next `/conversations`. A failure is non-fatal (the dot just lingers until the
|
|
2433
2466
|
* next sync), so callers don't await this.
|
|
2434
2467
|
*/
|
|
2435
2468
|
async markRead(conversationId) {
|
|
@@ -2526,6 +2559,26 @@ var AgentTransport = class {
|
|
|
2526
2559
|
log6.debug("submitForm failed (non-fatal)", { err });
|
|
2527
2560
|
}
|
|
2528
2561
|
}
|
|
2562
|
+
/**
|
|
2563
|
+
* Record 👍/👎 feedback on an assistant message. `POST /pai/message-feedback`
|
|
2564
|
+
* (agent-API). `visitorId` + `conversationId` ride the envelope; `messageId`
|
|
2565
|
+
* (the backend message id) + `set.feedback` are explicit (`null` clears a prior
|
|
2566
|
+
* choice) — the `set` block mirrors the authenticated message-update contract.
|
|
2567
|
+
* Fire-and-forget — a failure (e.g. 404 on a backend without the endpoint) is
|
|
2568
|
+
* non-fatal, so callers don't await; the UI already reflects the choice.
|
|
2569
|
+
*/
|
|
2570
|
+
async submitFeedback(body) {
|
|
2571
|
+
log6.debug("submitFeedback \u2192", { messageId: body.messageId, value: body.value });
|
|
2572
|
+
try {
|
|
2573
|
+
await this.postJson(
|
|
2574
|
+
DEFAULT_PATHS.messageFeedback,
|
|
2575
|
+
{ messageId: body.messageId, set: { feedback: body.value } },
|
|
2576
|
+
"submitFeedback"
|
|
2577
|
+
);
|
|
2578
|
+
} catch (err) {
|
|
2579
|
+
log6.debug("submitFeedback failed (non-fatal)", { err });
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2529
2582
|
sendMessage(body) {
|
|
2530
2583
|
this.conversationsCache.clear();
|
|
2531
2584
|
log6.debug("message \u2192", {
|
|
@@ -2851,6 +2904,7 @@ function toReactive(m) {
|
|
|
2851
2904
|
serverMessageId: m.serverMessageId,
|
|
2852
2905
|
ephemeral: m.ephemeral,
|
|
2853
2906
|
attachments: m.attachments,
|
|
2907
|
+
feedback: m.feedback,
|
|
2854
2908
|
partsSig: signal(m.parts.map(partToReactive))
|
|
2855
2909
|
};
|
|
2856
2910
|
}
|
|
@@ -2914,6 +2968,8 @@ function fromWireMessage(w) {
|
|
|
2914
2968
|
// `message-bubble`); everything else is a normal completed turn.
|
|
2915
2969
|
status: w.status === "failed" ? "error" : "complete",
|
|
2916
2970
|
canceled: w.status === "canceled",
|
|
2971
|
+
// Restore the persisted 👍/👎 so the feedback control shows the prior choice.
|
|
2972
|
+
feedback: w.feedback ?? null,
|
|
2917
2973
|
partsSig: signal(parts)
|
|
2918
2974
|
};
|
|
2919
2975
|
}
|
|
@@ -3636,6 +3692,14 @@ var WaveIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "tru
|
|
|
3636
3692
|
/* @__PURE__ */ jsx("path", { d: "M13 10V6.5a1.5 1.5 0 0 1 3 0V12" }),
|
|
3637
3693
|
/* @__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" })
|
|
3638
3694
|
] });
|
|
3695
|
+
var ThumbUpIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3696
|
+
/* @__PURE__ */ jsx("path", { d: "M7 10v11H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z" }),
|
|
3697
|
+
/* @__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" })
|
|
3698
|
+
] });
|
|
3699
|
+
var ThumbDownIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3700
|
+
/* @__PURE__ */ jsx("path", { d: "M17 14V3h3a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1z" }),
|
|
3701
|
+
/* @__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" })
|
|
3702
|
+
] });
|
|
3639
3703
|
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" }) });
|
|
3640
3704
|
var ClockIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3641
3705
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
@@ -3718,6 +3782,12 @@ var TID = {
|
|
|
3718
3782
|
messageBubble: `${p2}-message`,
|
|
3719
3783
|
/** "Stop" / retry inline button inside an error bubble. */
|
|
3720
3784
|
messageRetry: `${p2}-message-retry`,
|
|
3785
|
+
/** Feedback toolbar under an assistant reply (shown only when `enableMessageFeedback`). */
|
|
3786
|
+
messageFeedback: `${p2}-message-feedback`,
|
|
3787
|
+
/** 👍 "good response" feedback button. */
|
|
3788
|
+
feedbackUp: `${p2}-feedback-up`,
|
|
3789
|
+
/** 👎 "bad response" feedback button. */
|
|
3790
|
+
feedbackDown: `${p2}-feedback-down`,
|
|
3721
3791
|
// ── History pane ────────────────────────────────────────────────
|
|
3722
3792
|
/** History pane root (list view inside the panel). */
|
|
3723
3793
|
historyPane: `${p2}-history-pane`,
|
|
@@ -4937,8 +5007,8 @@ function HeaderActions({ panelProps, variant }) {
|
|
|
4937
5007
|
}
|
|
4938
5008
|
|
|
4939
5009
|
// src/ui/message-list.tsx
|
|
4940
|
-
import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as
|
|
4941
|
-
import { useComputed as
|
|
5010
|
+
import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState7 } from "preact/hooks";
|
|
5011
|
+
import { useComputed as useComputed7 } from "@preact/signals";
|
|
4942
5012
|
|
|
4943
5013
|
// src/ui/form/dynamic-form.tsx
|
|
4944
5014
|
import { useState as useState5 } from "preact/hooks";
|
|
@@ -5334,7 +5404,7 @@ function FormDoneMarker({
|
|
|
5334
5404
|
}
|
|
5335
5405
|
|
|
5336
5406
|
// src/ui/message-bubble.tsx
|
|
5337
|
-
import { useComputed as
|
|
5407
|
+
import { useComputed as useComputed6 } from "@preact/signals";
|
|
5338
5408
|
|
|
5339
5409
|
// src/stream/constants.ts
|
|
5340
5410
|
function isAskUserQuestionsTool(toolName2) {
|
|
@@ -5414,29 +5484,74 @@ function hardenLink(a) {
|
|
|
5414
5484
|
a.rel = [...tokens].join(" ");
|
|
5415
5485
|
}
|
|
5416
5486
|
|
|
5417
|
-
// src/ui/
|
|
5487
|
+
// src/ui/message-feedback.tsx
|
|
5488
|
+
import { useState as useState6 } from "preact/hooks";
|
|
5418
5489
|
import { jsx as jsx13, jsxs as jsxs10 } from "preact/jsx-runtime";
|
|
5419
5490
|
var p12 = BRAND.cssPrefix;
|
|
5491
|
+
function MessageFeedback({ messageId, initial, strings, onFeedback }) {
|
|
5492
|
+
const [value, setValue] = useState6(initial);
|
|
5493
|
+
const choose = (next) => {
|
|
5494
|
+
const resolved = value === next ? null : next;
|
|
5495
|
+
setValue(resolved);
|
|
5496
|
+
onFeedback(messageId, resolved);
|
|
5497
|
+
};
|
|
5498
|
+
return /* @__PURE__ */ jsxs10("div", { class: `${p12}-feedback`, role: "group", "data-testid": TID.messageFeedback, children: [
|
|
5499
|
+
/* @__PURE__ */ jsx13(
|
|
5500
|
+
"button",
|
|
5501
|
+
{
|
|
5502
|
+
type: "button",
|
|
5503
|
+
class: `${p12}-feedback-btn`,
|
|
5504
|
+
"data-active": value === "up" ? "true" : void 0,
|
|
5505
|
+
"aria-pressed": value === "up",
|
|
5506
|
+
"aria-label": strings.feedbackUp,
|
|
5507
|
+
title: strings.feedbackUp,
|
|
5508
|
+
onClick: () => choose("up"),
|
|
5509
|
+
"data-testid": TID.feedbackUp,
|
|
5510
|
+
children: /* @__PURE__ */ jsx13(ThumbUpIcon, {})
|
|
5511
|
+
}
|
|
5512
|
+
),
|
|
5513
|
+
/* @__PURE__ */ jsx13(
|
|
5514
|
+
"button",
|
|
5515
|
+
{
|
|
5516
|
+
type: "button",
|
|
5517
|
+
class: `${p12}-feedback-btn`,
|
|
5518
|
+
"data-active": value === "down" ? "true" : void 0,
|
|
5519
|
+
"aria-pressed": value === "down",
|
|
5520
|
+
"aria-label": strings.feedbackDown,
|
|
5521
|
+
title: strings.feedbackDown,
|
|
5522
|
+
onClick: () => choose("down"),
|
|
5523
|
+
"data-testid": TID.feedbackDown,
|
|
5524
|
+
children: /* @__PURE__ */ jsx13(ThumbDownIcon, {})
|
|
5525
|
+
}
|
|
5526
|
+
),
|
|
5527
|
+
/* @__PURE__ */ jsx13("span", { class: `${p12}-sr-only`, role: "status", "aria-live": "polite", children: value ? strings.feedbackThanks : "" })
|
|
5528
|
+
] });
|
|
5529
|
+
}
|
|
5530
|
+
|
|
5531
|
+
// src/ui/source-view.tsx
|
|
5532
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "preact/jsx-runtime";
|
|
5533
|
+
var p13 = BRAND.cssPrefix;
|
|
5420
5534
|
function SourceView({ part, strings }) {
|
|
5421
5535
|
const label = part.title || part.filename || part.url || strings.sources;
|
|
5422
5536
|
if (part.url) {
|
|
5423
|
-
return /* @__PURE__ */
|
|
5424
|
-
/* @__PURE__ */
|
|
5425
|
-
/* @__PURE__ */
|
|
5537
|
+
return /* @__PURE__ */ jsxs11("a", { class: `${p13}-source`, href: part.url, target: "_blank", rel: "noreferrer noopener", "data-testid": TID.source, children: [
|
|
5538
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-icon`, "aria-hidden": "true", children: "\u{1F517}" }),
|
|
5539
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-label`, children: label })
|
|
5426
5540
|
] });
|
|
5427
5541
|
}
|
|
5428
|
-
return /* @__PURE__ */
|
|
5429
|
-
/* @__PURE__ */
|
|
5430
|
-
/* @__PURE__ */
|
|
5542
|
+
return /* @__PURE__ */ jsxs11("span", { class: `${p13}-source`, "data-testid": TID.source, children: [
|
|
5543
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-icon`, "aria-hidden": "true", children: "\u{1F4C4}" }),
|
|
5544
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-label`, children: label })
|
|
5431
5545
|
] });
|
|
5432
5546
|
}
|
|
5433
5547
|
|
|
5434
5548
|
// src/ui/tool-approval.tsx
|
|
5435
|
-
import { useComputed as
|
|
5549
|
+
import { useComputed as useComputed3 } from "@preact/signals";
|
|
5436
5550
|
|
|
5437
5551
|
// src/ui/tool-card.tsx
|
|
5438
|
-
import {
|
|
5439
|
-
|
|
5552
|
+
import { useComputed as useComputed2 } from "@preact/signals";
|
|
5553
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
|
|
5554
|
+
var p14 = BRAND.cssPrefix;
|
|
5440
5555
|
function toolName(raw) {
|
|
5441
5556
|
if (raw.startsWith("tool:")) return raw.slice(5);
|
|
5442
5557
|
if (raw.startsWith("tool-")) return raw.slice(5);
|
|
@@ -5456,9 +5571,9 @@ function statusOf(state, approval) {
|
|
|
5456
5571
|
return "running";
|
|
5457
5572
|
}
|
|
5458
5573
|
function StatusIcon({ status }) {
|
|
5459
|
-
if (status === "denied" || status === "error" || status === "superseded") return /* @__PURE__ */
|
|
5460
|
-
if (status === "completed" || status === "responded") return /* @__PURE__ */
|
|
5461
|
-
return /* @__PURE__ */
|
|
5574
|
+
if (status === "denied" || status === "error" || status === "superseded") return /* @__PURE__ */ jsx15(XCircleIcon, {});
|
|
5575
|
+
if (status === "completed" || status === "responded") return /* @__PURE__ */ jsx15(CheckCircleIcon, {});
|
|
5576
|
+
return /* @__PURE__ */ jsx15(ClockIcon, {});
|
|
5462
5577
|
}
|
|
5463
5578
|
function statusLabel(status, strings) {
|
|
5464
5579
|
switch (status) {
|
|
@@ -5486,8 +5601,8 @@ function ToolStatus({
|
|
|
5486
5601
|
}) {
|
|
5487
5602
|
const base = statusOf(state, approval);
|
|
5488
5603
|
const status = superseded && (base === "awaiting" || base === "running") ? "superseded" : base;
|
|
5489
|
-
return /* @__PURE__ */
|
|
5490
|
-
/* @__PURE__ */
|
|
5604
|
+
return /* @__PURE__ */ jsxs12("span", { class: `${p14}-toolui-badge ${p14}-toolui-status`, "data-status": status, children: [
|
|
5605
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-status-icon`, children: /* @__PURE__ */ jsx15(StatusIcon, { status }) }),
|
|
5491
5606
|
statusLabel(status, strings)
|
|
5492
5607
|
] });
|
|
5493
5608
|
}
|
|
@@ -5498,19 +5613,46 @@ function ToolHeaderRow({
|
|
|
5498
5613
|
strings,
|
|
5499
5614
|
superseded
|
|
5500
5615
|
}) {
|
|
5501
|
-
return /* @__PURE__ */
|
|
5502
|
-
/* @__PURE__ */
|
|
5503
|
-
/* @__PURE__ */
|
|
5504
|
-
/* @__PURE__ */
|
|
5505
|
-
/* @__PURE__ */
|
|
5616
|
+
return /* @__PURE__ */ jsxs12(Fragment2, { children: [
|
|
5617
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-wrench`, children: /* @__PURE__ */ jsx15(WrenchIcon, {}) }),
|
|
5618
|
+
/* @__PURE__ */ jsx15("strong", { class: `${p14}-toolui-title`, children: name }),
|
|
5619
|
+
/* @__PURE__ */ jsx15(ToolStatus, { state, approval, strings, superseded }),
|
|
5620
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-chevron`, children: /* @__PURE__ */ jsx15(ChevronDownIcon, {}) })
|
|
5621
|
+
] });
|
|
5622
|
+
}
|
|
5623
|
+
function ToolCollapsibleCard({
|
|
5624
|
+
part,
|
|
5625
|
+
strings,
|
|
5626
|
+
testid,
|
|
5627
|
+
superseded
|
|
5628
|
+
}) {
|
|
5629
|
+
const input = useComputed2(() => part.inputSig.value);
|
|
5630
|
+
const output = useComputed2(() => part.outputSig.value);
|
|
5631
|
+
const error = useComputed2(() => part.errorSig.value);
|
|
5632
|
+
const state = useComputed2(() => part.stateSig.value);
|
|
5633
|
+
const approval = useComputed2(() => part.approvalSig.value);
|
|
5634
|
+
return /* @__PURE__ */ jsxs12("details", { class: `${p14}-toolui ${p14}-toolui-collapsible`, "data-testid": testid, children: [
|
|
5635
|
+
/* @__PURE__ */ jsx15("summary", { class: `${p14}-toolui-head`, children: /* @__PURE__ */ jsx15(
|
|
5636
|
+
ToolHeaderRow,
|
|
5637
|
+
{
|
|
5638
|
+
name: toolName(part.toolName),
|
|
5639
|
+
state: state.value,
|
|
5640
|
+
approval: approval.value,
|
|
5641
|
+
strings,
|
|
5642
|
+
superseded
|
|
5643
|
+
}
|
|
5644
|
+
) }),
|
|
5645
|
+
/* @__PURE__ */ jsx15(ToolSection, { label: strings.toolParameters, value: input.value }),
|
|
5646
|
+
output.value !== void 0 ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.toolResult, value: output.value }) : null,
|
|
5647
|
+
error.value ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
|
|
5506
5648
|
] });
|
|
5507
5649
|
}
|
|
5508
5650
|
function ToolSection({ label, value, error }) {
|
|
5509
5651
|
const text = error ? String(value ?? "") : pretty(unwrapResult(value));
|
|
5510
5652
|
if (!text) return null;
|
|
5511
|
-
return /* @__PURE__ */
|
|
5512
|
-
/* @__PURE__ */
|
|
5513
|
-
/* @__PURE__ */
|
|
5653
|
+
return /* @__PURE__ */ jsxs12("div", { class: `${p14}-toolui-section`, children: [
|
|
5654
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-label`, children: label }),
|
|
5655
|
+
/* @__PURE__ */ jsx15("pre", { class: `${p14}-toolui-code`, "data-error": error ? "true" : void 0, children: text })
|
|
5514
5656
|
] });
|
|
5515
5657
|
}
|
|
5516
5658
|
function unwrapResult(output) {
|
|
@@ -5532,83 +5674,67 @@ function pretty(value) {
|
|
|
5532
5674
|
}
|
|
5533
5675
|
|
|
5534
5676
|
// src/ui/tool-approval.tsx
|
|
5535
|
-
import { Fragment as Fragment3, jsx as
|
|
5536
|
-
var
|
|
5677
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
|
|
5678
|
+
var p15 = BRAND.cssPrefix;
|
|
5537
5679
|
function ToolApproval({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5538
|
-
const approval =
|
|
5539
|
-
const state =
|
|
5540
|
-
const input = useComputed2(() => part.inputSig.value);
|
|
5541
|
-
const output = useComputed2(() => part.outputSig.value);
|
|
5542
|
-
const error = useComputed2(() => part.errorSig.value);
|
|
5680
|
+
const approval = useComputed3(() => part.approvalSig.value);
|
|
5681
|
+
const state = useComputed3(() => part.stateSig.value);
|
|
5543
5682
|
const name = toolName(part.toolName);
|
|
5544
5683
|
const approved = approval.value?.approved;
|
|
5545
5684
|
const { terminal, responded, decided } = toolDecisionState(state.value, approval.value);
|
|
5546
5685
|
const editable = responded && active && !terminal;
|
|
5547
5686
|
const skipped = superseded && !decided;
|
|
5548
5687
|
const id = part.toolCallId;
|
|
5549
|
-
return /* @__PURE__ */
|
|
5550
|
-
/* @__PURE__ */
|
|
5551
|
-
|
|
5552
|
-
ToolHeaderRow,
|
|
5553
|
-
{
|
|
5554
|
-
name,
|
|
5555
|
-
state: state.value,
|
|
5556
|
-
approval: approval.value,
|
|
5557
|
-
strings,
|
|
5558
|
-
superseded: skipped
|
|
5559
|
-
}
|
|
5560
|
-
) }),
|
|
5561
|
-
/* @__PURE__ */ jsx15(ToolSection, { label: strings.toolParameters, value: input.value }),
|
|
5562
|
-
output.value !== void 0 ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.toolResult, value: output.value }) : null,
|
|
5563
|
-
error.value ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
|
|
5564
|
-
] }),
|
|
5565
|
-
skipped || terminal ? null : /* @__PURE__ */ jsxs12("div", { class: `${p14}-toolui ${p14}-toolui-body`, children: [
|
|
5688
|
+
return /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui-group`, "data-testid": decided ? TID.toolDecision : TID.toolApproval, children: [
|
|
5689
|
+
/* @__PURE__ */ jsx16(ToolCollapsibleCard, { part, strings, superseded: skipped }),
|
|
5690
|
+
skipped || terminal ? null : /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui ${p15}-toolui-body`, children: [
|
|
5566
5691
|
responded ? (
|
|
5567
5692
|
// DECIDED — lead with the recorded response (no repeated prompt/body), so the card barely
|
|
5568
5693
|
// changes height from the awaiting state and the Edit sits right under the edit hint.
|
|
5569
|
-
/* @__PURE__ */
|
|
5570
|
-
/* @__PURE__ */
|
|
5694
|
+
/* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
5695
|
+
/* @__PURE__ */ jsxs13("p", { class: `${p15}-toolui-prompt`, children: [
|
|
5571
5696
|
strings.approvalYourResponse.replace("{decision}", approved ? strings.approve : strings.reject),
|
|
5572
5697
|
approval.value?.reason ? ` \u2014 ${approval.value.reason}` : ""
|
|
5573
5698
|
] }),
|
|
5574
|
-
editable ? /* @__PURE__ */
|
|
5575
|
-
!editable && !terminal ? /* @__PURE__ */
|
|
5699
|
+
editable ? /* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalEditHint }) : null,
|
|
5700
|
+
!editable && !terminal ? /* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalSubmitting }) : null
|
|
5576
5701
|
] })
|
|
5577
5702
|
) : (
|
|
5578
5703
|
// AWAITING — the prompt + what to do, then Reject / Approve.
|
|
5579
|
-
/* @__PURE__ */
|
|
5580
|
-
/* @__PURE__ */
|
|
5581
|
-
/* @__PURE__ */
|
|
5704
|
+
/* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
5705
|
+
/* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-prompt`, children: strings.approvalPrompt.replace("{tool}", name) }),
|
|
5706
|
+
/* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalBody })
|
|
5582
5707
|
] })
|
|
5583
5708
|
),
|
|
5584
|
-
!decided && active ? /* @__PURE__ */
|
|
5585
|
-
/* @__PURE__ */
|
|
5709
|
+
!decided && active ? /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui-actions`, children: [
|
|
5710
|
+
/* @__PURE__ */ jsx16(
|
|
5586
5711
|
"button",
|
|
5587
5712
|
{
|
|
5588
5713
|
type: "button",
|
|
5589
|
-
class: `${
|
|
5714
|
+
class: `${p15}-form-skip`,
|
|
5590
5715
|
onClick: () => onDecision(id, false),
|
|
5591
5716
|
"data-testid": TID.toolReject,
|
|
5592
5717
|
children: strings.reject
|
|
5593
5718
|
}
|
|
5594
5719
|
),
|
|
5595
|
-
/* @__PURE__ */
|
|
5720
|
+
/* @__PURE__ */ jsx16(
|
|
5596
5721
|
"button",
|
|
5597
5722
|
{
|
|
5598
5723
|
type: "button",
|
|
5599
|
-
class: `${
|
|
5724
|
+
class: `${p15}-form-submit`,
|
|
5600
5725
|
onClick: () => onDecision(id, true),
|
|
5601
5726
|
"data-testid": TID.toolApprove,
|
|
5602
5727
|
children: strings.approve
|
|
5603
5728
|
}
|
|
5604
5729
|
)
|
|
5605
|
-
] }) :
|
|
5730
|
+
] }) : null,
|
|
5731
|
+
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
|
|
5606
5732
|
] })
|
|
5607
5733
|
] });
|
|
5608
5734
|
}
|
|
5609
5735
|
|
|
5610
5736
|
// src/ui/tool-ask-questions.tsx
|
|
5611
|
-
import { useComputed as
|
|
5737
|
+
import { useComputed as useComputed4 } from "@preact/signals";
|
|
5612
5738
|
|
|
5613
5739
|
// src/ui/form/field.ts
|
|
5614
5740
|
var QUESTION_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -5677,26 +5803,26 @@ function str(v) {
|
|
|
5677
5803
|
}
|
|
5678
5804
|
|
|
5679
5805
|
// src/ui/tool-ask-questions.tsx
|
|
5680
|
-
import { Fragment as Fragment4, jsx as
|
|
5681
|
-
var
|
|
5806
|
+
import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
|
|
5807
|
+
var p16 = BRAND.cssPrefix;
|
|
5682
5808
|
function ToolAskQuestions({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5683
|
-
const state =
|
|
5684
|
-
const approval =
|
|
5685
|
-
const request =
|
|
5809
|
+
const state = useComputed4(() => part.stateSig.value);
|
|
5810
|
+
const approval = useComputed4(() => part.approvalSig.value);
|
|
5811
|
+
const request = useComputed4(() => parseAskUserQuestions(part.inputSig.value));
|
|
5686
5812
|
const { terminal, responded, decided } = toolDecisionState(state.value, approval.value);
|
|
5687
5813
|
const req = request.value;
|
|
5688
5814
|
if (decided) {
|
|
5689
5815
|
const editable = responded && active && !terminal;
|
|
5690
|
-
return /* @__PURE__ */
|
|
5816
|
+
return /* @__PURE__ */ jsx17(DecidedCard, { part, strings, req, editable, onEdit: () => onEdit(part.toolCallId) });
|
|
5691
5817
|
}
|
|
5692
5818
|
const stale = superseded;
|
|
5693
|
-
return /* @__PURE__ */
|
|
5694
|
-
/* @__PURE__ */
|
|
5695
|
-
/* @__PURE__ */
|
|
5696
|
-
/* @__PURE__ */
|
|
5697
|
-
] }) : /* @__PURE__ */
|
|
5698
|
-
req.intro ? /* @__PURE__ */
|
|
5699
|
-
stale ? null : /* @__PURE__ */
|
|
5819
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui${stale ? ` ${p16}-toolui-stale` : ""}`, "data-testid": TID.toolAskQuestions, children: [
|
|
5820
|
+
/* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-head`, children: stale ? /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
5821
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputBadge }),
|
|
5822
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-muted`, children: strings.statusSuperseded })
|
|
5823
|
+
] }) : /* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputRequired }) }),
|
|
5824
|
+
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5825
|
+
stale ? null : /* @__PURE__ */ jsx17(
|
|
5700
5826
|
AskBody,
|
|
5701
5827
|
{
|
|
5702
5828
|
req,
|
|
@@ -5713,7 +5839,7 @@ function AskBody({
|
|
|
5713
5839
|
}) {
|
|
5714
5840
|
const fields = askQuestionsToFields(req, strings.confirmYes, strings.confirmNo);
|
|
5715
5841
|
const loneTextarea = req.questions.length === 1 && req.questions[0]?.type === "text";
|
|
5716
|
-
return /* @__PURE__ */
|
|
5842
|
+
return /* @__PURE__ */ jsx17(
|
|
5717
5843
|
DynamicForm,
|
|
5718
5844
|
{
|
|
5719
5845
|
fields,
|
|
@@ -5745,23 +5871,23 @@ function DecidedCard({
|
|
|
5745
5871
|
editable,
|
|
5746
5872
|
onEdit
|
|
5747
5873
|
}) {
|
|
5748
|
-
const approval =
|
|
5874
|
+
const approval = useComputed4(() => part.approvalSig.value);
|
|
5749
5875
|
const skipped = approval.value?.approved === false;
|
|
5750
5876
|
const answers = approval.value?.approved ? parseAnswers(approval.value.reason) : {};
|
|
5751
|
-
return /* @__PURE__ */
|
|
5752
|
-
/* @__PURE__ */
|
|
5753
|
-
/* @__PURE__ */
|
|
5754
|
-
/* @__PURE__ */
|
|
5877
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui`, "data-testid": TID.toolDecision, children: [
|
|
5878
|
+
/* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui-head`, children: [
|
|
5879
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputBadge }),
|
|
5880
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge`, children: skipped ? strings.inputSkipped : strings.inputAnswered })
|
|
5755
5881
|
] }),
|
|
5756
|
-
req.intro ? /* @__PURE__ */
|
|
5882
|
+
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5757
5883
|
req.questions.map((q) => {
|
|
5758
5884
|
const text = skipped ? "" : answers[q.key] ?? "";
|
|
5759
|
-
return /* @__PURE__ */
|
|
5760
|
-
/* @__PURE__ */
|
|
5761
|
-
text ? /* @__PURE__ */
|
|
5885
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui-section`, children: [
|
|
5886
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-label`, children: q.question }),
|
|
5887
|
+
text ? /* @__PURE__ */ jsx17("p", { class: `${p16}-toolui-text`, children: text }) : null
|
|
5762
5888
|
] }, q.key);
|
|
5763
5889
|
}),
|
|
5764
|
-
editable ? /* @__PURE__ */
|
|
5890
|
+
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
|
|
5765
5891
|
] });
|
|
5766
5892
|
}
|
|
5767
5893
|
function parseAnswers(reason) {
|
|
@@ -5786,35 +5912,19 @@ function parseAnswers(reason) {
|
|
|
5786
5912
|
}
|
|
5787
5913
|
|
|
5788
5914
|
// src/ui/tool-call.tsx
|
|
5789
|
-
import { useComputed as
|
|
5790
|
-
import { jsx as
|
|
5791
|
-
var p16 = BRAND.cssPrefix;
|
|
5915
|
+
import { useComputed as useComputed5 } from "@preact/signals";
|
|
5916
|
+
import { jsx as jsx18 } from "preact/jsx-runtime";
|
|
5792
5917
|
function ToolCall({ part, strings }) {
|
|
5793
|
-
const input =
|
|
5794
|
-
const output =
|
|
5795
|
-
const error =
|
|
5796
|
-
const
|
|
5797
|
-
const approval = useComputed4(() => part.approvalSig.value);
|
|
5798
|
-
const hasDetails = useComputed4(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
|
|
5918
|
+
const input = useComputed5(() => part.inputSig.value);
|
|
5919
|
+
const output = useComputed5(() => part.outputSig.value);
|
|
5920
|
+
const error = useComputed5(() => part.errorSig.value);
|
|
5921
|
+
const hasDetails = useComputed5(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
|
|
5799
5922
|
if (!hasDetails.value) return null;
|
|
5800
|
-
return /* @__PURE__ */
|
|
5801
|
-
/* @__PURE__ */ jsx17("summary", { class: `${p16}-toolui-head`, children: /* @__PURE__ */ jsx17(
|
|
5802
|
-
ToolHeaderRow,
|
|
5803
|
-
{
|
|
5804
|
-
name: toolName(part.toolName),
|
|
5805
|
-
state: state.value,
|
|
5806
|
-
approval: approval.value,
|
|
5807
|
-
strings
|
|
5808
|
-
}
|
|
5809
|
-
) }),
|
|
5810
|
-
/* @__PURE__ */ jsx17(ToolSection, { label: strings.toolParameters, value: input.value }),
|
|
5811
|
-
output.value !== void 0 ? /* @__PURE__ */ jsx17(ToolSection, { label: strings.toolResult, value: output.value }) : null,
|
|
5812
|
-
error.value ? /* @__PURE__ */ jsx17(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
|
|
5813
|
-
] });
|
|
5923
|
+
return /* @__PURE__ */ jsx18(ToolCollapsibleCard, { part, strings, testid: TID.toolCall });
|
|
5814
5924
|
}
|
|
5815
5925
|
|
|
5816
5926
|
// src/ui/message-bubble.tsx
|
|
5817
|
-
import { jsx as
|
|
5927
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "preact/jsx-runtime";
|
|
5818
5928
|
var p17 = BRAND.cssPrefix;
|
|
5819
5929
|
function MessageBubble({
|
|
5820
5930
|
message,
|
|
@@ -5826,19 +5936,21 @@ function MessageBubble({
|
|
|
5826
5936
|
interactive = false,
|
|
5827
5937
|
superseded = false,
|
|
5828
5938
|
tool,
|
|
5829
|
-
onRetry
|
|
5939
|
+
onRetry,
|
|
5940
|
+
enableMessageFeedback = false,
|
|
5941
|
+
onFeedback
|
|
5830
5942
|
}) {
|
|
5831
|
-
const parts =
|
|
5943
|
+
const parts = useComputed6(() => message.partsSig.value);
|
|
5832
5944
|
const partList = parts.value;
|
|
5833
|
-
const emptyReply =
|
|
5834
|
-
const hideCanceledHusk =
|
|
5835
|
-
const hasAnswerText =
|
|
5945
|
+
const emptyReply = useComputed6(() => isEmptyAssistantReply(message));
|
|
5946
|
+
const hideCanceledHusk = useComputed6(() => isHiddenCanceledTurn(message));
|
|
5947
|
+
const hasAnswerText = useComputed6(
|
|
5836
5948
|
() => message.partsSig.value.some((part) => part.kind === "text" && part.textSig.value.length > 0)
|
|
5837
5949
|
);
|
|
5838
|
-
const reasoningVisible =
|
|
5950
|
+
const reasoningVisible = useComputed6(
|
|
5839
5951
|
() => showReasoning && message.partsSig.value.some((part) => part.kind === "reasoning")
|
|
5840
5952
|
);
|
|
5841
|
-
const lastOutputIdx =
|
|
5953
|
+
const lastOutputIdx = useComputed6(() => {
|
|
5842
5954
|
const list = message.partsSig.value;
|
|
5843
5955
|
let idx = -1;
|
|
5844
5956
|
for (let i = 0; i < list.length; i++) {
|
|
@@ -5853,31 +5965,50 @@ function MessageBubble({
|
|
|
5853
5965
|
const showStreamDots = streaming && !bufferedHold && !(reasoningVisible.value && working);
|
|
5854
5966
|
if (hideCanceledHusk.value) return null;
|
|
5855
5967
|
const stamp = formatStamp(message.createdAt);
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5968
|
+
const showFeedback = enableMessageFeedback && !!onFeedback && !!message.serverMessageId && message.role === "assistant" && !streaming && message.status !== "error" && !emptyReply.value;
|
|
5969
|
+
return /* @__PURE__ */ jsx19(
|
|
5970
|
+
"div",
|
|
5971
|
+
{
|
|
5972
|
+
class: `${p17}-bubble-row`,
|
|
5973
|
+
"data-role": message.role,
|
|
5974
|
+
"data-mid": message.serverMessageId ?? message.id,
|
|
5975
|
+
"data-testid": tid(TID.messageBubble, message.id),
|
|
5976
|
+
children: /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-col`, children: [
|
|
5977
|
+
/* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble`, children: [
|
|
5978
|
+
bufferedHold ? /* @__PURE__ */ jsx19(LoadingSpinner, { label: strings.loading }) : partList.map((part, index) => /* @__PURE__ */ jsx19(
|
|
5979
|
+
PartView,
|
|
5980
|
+
{
|
|
5981
|
+
part,
|
|
5982
|
+
active: working,
|
|
5983
|
+
strings,
|
|
5984
|
+
showReasoning,
|
|
5985
|
+
showToolCalls,
|
|
5986
|
+
showSources,
|
|
5987
|
+
interactive: interactive && (part.kind !== "tool" || index > lastOutputIdx.value),
|
|
5988
|
+
superseded,
|
|
5989
|
+
tool
|
|
5990
|
+
},
|
|
5991
|
+
partKey(part)
|
|
5992
|
+
)),
|
|
5993
|
+
showStreamDots && /* @__PURE__ */ jsx19(TypingDots, {}),
|
|
5994
|
+
message.status === "error" && message.errorText || emptyReply.value ? /* @__PURE__ */ jsxs15("div", { class: `${p17}-error`, role: "alert", children: [
|
|
5995
|
+
/* @__PURE__ */ jsx19("span", { children: message.errorText ?? strings.errorGeneric }),
|
|
5996
|
+
onRetry ? /* @__PURE__ */ jsx19("button", { type: "button", class: `${p17}-error-retry`, onClick: onRetry, "data-testid": TID.messageRetry, children: strings.errorRetry }) : null
|
|
5997
|
+
] }) : null
|
|
5998
|
+
] }),
|
|
5999
|
+
stamp ? /* @__PURE__ */ jsx19("time", { class: `${p17}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null,
|
|
6000
|
+
showFeedback && message.serverMessageId ? /* @__PURE__ */ jsx19(
|
|
6001
|
+
MessageFeedback,
|
|
6002
|
+
{
|
|
6003
|
+
messageId: message.serverMessageId,
|
|
6004
|
+
initial: message.feedback ?? null,
|
|
6005
|
+
strings,
|
|
6006
|
+
onFeedback
|
|
6007
|
+
}
|
|
6008
|
+
) : null
|
|
6009
|
+
] })
|
|
6010
|
+
}
|
|
6011
|
+
);
|
|
5881
6012
|
}
|
|
5882
6013
|
function formatStamp(createdAt) {
|
|
5883
6014
|
if (typeof createdAt !== "number" || !Number.isFinite(createdAt)) return null;
|
|
@@ -5907,11 +6038,11 @@ function PartView({
|
|
|
5907
6038
|
case "step-start":
|
|
5908
6039
|
return null;
|
|
5909
6040
|
case "text":
|
|
5910
|
-
return /* @__PURE__ */
|
|
6041
|
+
return /* @__PURE__ */ jsx19(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig });
|
|
5911
6042
|
case "reasoning":
|
|
5912
|
-
return showReasoning ? /* @__PURE__ */
|
|
6043
|
+
return showReasoning ? /* @__PURE__ */ jsx19(ReasoningView, { part, active, strings }) : null;
|
|
5913
6044
|
case "tool":
|
|
5914
|
-
return /* @__PURE__ */
|
|
6045
|
+
return /* @__PURE__ */ jsx19(
|
|
5915
6046
|
ToolPartView,
|
|
5916
6047
|
{
|
|
5917
6048
|
part,
|
|
@@ -5924,11 +6055,11 @@ function PartView({
|
|
|
5924
6055
|
);
|
|
5925
6056
|
case "file":
|
|
5926
6057
|
if (part.mediaType.startsWith("image/")) {
|
|
5927
|
-
return /* @__PURE__ */
|
|
6058
|
+
return /* @__PURE__ */ jsx19("img", { src: part.url, alt: "", loading: "lazy" });
|
|
5928
6059
|
}
|
|
5929
|
-
return /* @__PURE__ */
|
|
6060
|
+
return /* @__PURE__ */ jsx19("a", { href: part.url, target: "_blank", rel: "noreferrer noopener", children: part.url });
|
|
5930
6061
|
case "source":
|
|
5931
|
-
return showSources ? /* @__PURE__ */
|
|
6062
|
+
return showSources ? /* @__PURE__ */ jsx19(SourceView, { part, strings }) : null;
|
|
5932
6063
|
}
|
|
5933
6064
|
}
|
|
5934
6065
|
function ToolPartView({
|
|
@@ -5939,10 +6070,10 @@ function ToolPartView({
|
|
|
5939
6070
|
superseded,
|
|
5940
6071
|
tool
|
|
5941
6072
|
}) {
|
|
5942
|
-
const hasApproval =
|
|
6073
|
+
const hasApproval = useComputed6(() => part.approvalSig.value !== void 0);
|
|
5943
6074
|
if (tool?.humanInLoop) {
|
|
5944
6075
|
if (isAskUserQuestionsTool(part.toolName)) {
|
|
5945
|
-
return /* @__PURE__ */
|
|
6076
|
+
return /* @__PURE__ */ jsx19(
|
|
5946
6077
|
ToolAskQuestions,
|
|
5947
6078
|
{
|
|
5948
6079
|
part,
|
|
@@ -5955,7 +6086,7 @@ function ToolPartView({
|
|
|
5955
6086
|
);
|
|
5956
6087
|
}
|
|
5957
6088
|
if (hasApproval.value) {
|
|
5958
|
-
return /* @__PURE__ */
|
|
6089
|
+
return /* @__PURE__ */ jsx19(
|
|
5959
6090
|
ToolApproval,
|
|
5960
6091
|
{
|
|
5961
6092
|
part,
|
|
@@ -5968,7 +6099,7 @@ function ToolPartView({
|
|
|
5968
6099
|
);
|
|
5969
6100
|
}
|
|
5970
6101
|
}
|
|
5971
|
-
return showToolCalls ? /* @__PURE__ */
|
|
6102
|
+
return showToolCalls ? /* @__PURE__ */ jsx19(ToolCall, { part, strings }) : null;
|
|
5972
6103
|
}
|
|
5973
6104
|
function ReasoningView({
|
|
5974
6105
|
part,
|
|
@@ -5976,8 +6107,8 @@ function ReasoningView({
|
|
|
5976
6107
|
strings
|
|
5977
6108
|
}) {
|
|
5978
6109
|
return /* @__PURE__ */ jsxs15("details", { class: `${p17}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
|
|
5979
|
-
/* @__PURE__ */
|
|
5980
|
-
/* @__PURE__ */
|
|
6110
|
+
/* @__PURE__ */ jsx19("summary", { class: `${p17}-reasoning-summary`, children: /* @__PURE__ */ jsx19("span", { class: `${p17}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
|
|
6111
|
+
/* @__PURE__ */ jsx19("div", { class: `${p17}-reasoning-body`, children: /* @__PURE__ */ jsx19(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
|
|
5981
6112
|
] });
|
|
5982
6113
|
}
|
|
5983
6114
|
function partKey(part) {
|
|
@@ -5996,23 +6127,25 @@ function partKey(part) {
|
|
|
5996
6127
|
}
|
|
5997
6128
|
function TypingDots() {
|
|
5998
6129
|
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-typing`, "aria-hidden": "true", children: [
|
|
5999
|
-
/* @__PURE__ */
|
|
6000
|
-
/* @__PURE__ */
|
|
6001
|
-
/* @__PURE__ */
|
|
6130
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6131
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6132
|
+
/* @__PURE__ */ jsx19("span", {})
|
|
6002
6133
|
] });
|
|
6003
6134
|
}
|
|
6004
6135
|
function LoadingSpinner({ label }) {
|
|
6005
6136
|
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-loading`, role: "status", children: [
|
|
6006
|
-
/* @__PURE__ */
|
|
6007
|
-
/* @__PURE__ */
|
|
6137
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-spinner`, "aria-hidden": "true" }),
|
|
6138
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-label`, children: label })
|
|
6008
6139
|
] });
|
|
6009
6140
|
}
|
|
6010
6141
|
|
|
6011
6142
|
// src/ui/message-list.tsx
|
|
6012
|
-
import { jsx as
|
|
6143
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "preact/jsx-runtime";
|
|
6013
6144
|
var p18 = BRAND.cssPrefix;
|
|
6014
6145
|
var STICK_THRESHOLD = 120;
|
|
6015
6146
|
var INTERACTION_GRACE_MS = 350;
|
|
6147
|
+
var TURN_TOP_PAD = 12;
|
|
6148
|
+
var TURN_GAP = 8;
|
|
6016
6149
|
function MessageList({
|
|
6017
6150
|
messagesSig,
|
|
6018
6151
|
strings,
|
|
@@ -6020,6 +6153,11 @@ function MessageList({
|
|
|
6020
6153
|
showReasoning,
|
|
6021
6154
|
showToolCalls,
|
|
6022
6155
|
showSources,
|
|
6156
|
+
scrollFade,
|
|
6157
|
+
scrollAnchor,
|
|
6158
|
+
enableMessageFeedback,
|
|
6159
|
+
onFeedback,
|
|
6160
|
+
onMessageSeen,
|
|
6023
6161
|
loading,
|
|
6024
6162
|
idle,
|
|
6025
6163
|
tool,
|
|
@@ -6029,17 +6167,40 @@ function MessageList({
|
|
|
6029
6167
|
onFillForm
|
|
6030
6168
|
}) {
|
|
6031
6169
|
const ref = useRef5(null);
|
|
6032
|
-
const messages =
|
|
6033
|
-
const [showJump, setShowJump] =
|
|
6170
|
+
const messages = useComputed7(() => messagesSig.value);
|
|
6171
|
+
const [showJump, setShowJump] = useState7(false);
|
|
6172
|
+
const spacerRef = useRef5(null);
|
|
6173
|
+
const seenRef = useRef5(/* @__PURE__ */ new Set());
|
|
6174
|
+
const firedSeenRef = useRef5(/* @__PURE__ */ new Set());
|
|
6175
|
+
const [newCount, setNewCount] = useState7(0);
|
|
6034
6176
|
const hasHydratedRef = useRef5(false);
|
|
6035
6177
|
const detachedRef = useRef5(false);
|
|
6036
6178
|
const interactingRef = useRef5(false);
|
|
6037
6179
|
const interactionEndedAtRef = useRef5(0);
|
|
6038
6180
|
const inInteractionGrace = () => interactingRef.current || performance.now() - interactionEndedAtRef.current < INTERACTION_GRACE_MS;
|
|
6039
6181
|
const autoPinAtRef = useRef5(0);
|
|
6182
|
+
const key = (m) => m.serverMessageId ?? m.id;
|
|
6183
|
+
const syncFade = (el) => {
|
|
6184
|
+
if (!scrollFade) return;
|
|
6185
|
+
const overflowing = el.scrollHeight - el.clientHeight > 1;
|
|
6186
|
+
el.dataset.fadeTop = overflowing && el.scrollTop > 1 ? "true" : "false";
|
|
6187
|
+
el.dataset.fadeBottom = overflowing && el.scrollHeight - el.scrollTop - el.clientHeight > 1 ? "true" : "false";
|
|
6188
|
+
};
|
|
6189
|
+
const syncJump = (el) => setShowJump(el.scrollHeight - el.scrollTop - el.clientHeight > STICK_THRESHOLD * 2);
|
|
6190
|
+
const recomputeNewCount = (el) => {
|
|
6191
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight <= STICK_THRESHOLD * 2) return setNewCount(0);
|
|
6192
|
+
let n = 0;
|
|
6193
|
+
for (const m of messages.value) if (m.role === "assistant" && !seenRef.current.has(key(m))) n++;
|
|
6194
|
+
setNewCount(n);
|
|
6195
|
+
};
|
|
6196
|
+
const markAllSeen = () => {
|
|
6197
|
+
for (const m of messages.value) if (m.role === "assistant") seenRef.current.add(key(m));
|
|
6198
|
+
setNewCount(0);
|
|
6199
|
+
};
|
|
6040
6200
|
const pinBottom = (el) => {
|
|
6041
6201
|
autoPinAtRef.current = performance.now();
|
|
6042
6202
|
el.scrollTop = el.scrollHeight;
|
|
6203
|
+
syncFade(el);
|
|
6043
6204
|
};
|
|
6044
6205
|
const pinBottomSoon = (el, frames) => {
|
|
6045
6206
|
pinBottom(el);
|
|
@@ -6076,13 +6237,50 @@ function MessageList({
|
|
|
6076
6237
|
timerId = setTimeout(stop, ms);
|
|
6077
6238
|
return stop;
|
|
6078
6239
|
};
|
|
6240
|
+
const rowTop = (el, row) => row.getBoundingClientRect().top - el.getBoundingClientRect().top + el.scrollTop;
|
|
6241
|
+
const lastUserRow = (el) => {
|
|
6242
|
+
const users = el.querySelectorAll(`.${p18}-bubble-row[data-role="user"]`);
|
|
6243
|
+
return users[users.length - 1];
|
|
6244
|
+
};
|
|
6245
|
+
const updateTurnSpacer = (el) => {
|
|
6246
|
+
const sp = spacerRef.current;
|
|
6247
|
+
if (!sp) return;
|
|
6248
|
+
const lastUser = scrollAnchor === "turn" ? lastUserRow(el) : void 0;
|
|
6249
|
+
if (!lastUser) {
|
|
6250
|
+
sp.style.minBlockSize = "0px";
|
|
6251
|
+
return;
|
|
6252
|
+
}
|
|
6253
|
+
const turnHeight = el.scrollHeight - rowTop(el, lastUser) - sp.offsetHeight;
|
|
6254
|
+
sp.style.minBlockSize = `${Math.max(0, el.clientHeight - turnHeight - TURN_GAP)}px`;
|
|
6255
|
+
};
|
|
6256
|
+
const anchorTurnToTop = (el) => {
|
|
6257
|
+
const lastUser = lastUserRow(el);
|
|
6258
|
+
if (!lastUser) return;
|
|
6259
|
+
updateTurnSpacer(el);
|
|
6260
|
+
autoPinAtRef.current = performance.now();
|
|
6261
|
+
el.scrollTop = Math.max(0, rowTop(el, lastUser) - TURN_TOP_PAD);
|
|
6262
|
+
syncFade(el);
|
|
6263
|
+
};
|
|
6264
|
+
const anchorTurnSoon = (el, frames) => {
|
|
6265
|
+
anchorTurnToTop(el);
|
|
6266
|
+
let left = frames;
|
|
6267
|
+
let raf = 0;
|
|
6268
|
+
const tick = () => {
|
|
6269
|
+
anchorTurnToTop(el);
|
|
6270
|
+
if (--left > 0) raf = requestAnimationFrame(tick);
|
|
6271
|
+
};
|
|
6272
|
+
if (frames > 0) raf = requestAnimationFrame(tick);
|
|
6273
|
+
return () => cancelAnimationFrame(raf);
|
|
6274
|
+
};
|
|
6079
6275
|
const firstMessageId = messages.value[0]?.id;
|
|
6080
6276
|
useLayoutEffect2(() => {
|
|
6081
6277
|
const el = ref.current;
|
|
6082
6278
|
if (!el) return;
|
|
6083
6279
|
if (messages.value.length === 0) return;
|
|
6084
6280
|
hasHydratedRef.current = true;
|
|
6281
|
+
for (const m of messages.value) if (m.role === "assistant") seenRef.current.add(key(m));
|
|
6085
6282
|
if (!messages.value.some((m) => m.role === "user")) return;
|
|
6283
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6086
6284
|
return pinBottomThroughLayout(el, 300);
|
|
6087
6285
|
}, [firstMessageId]);
|
|
6088
6286
|
const prevLengthRef = useRef5(0);
|
|
@@ -6095,10 +6293,17 @@ function MessageList({
|
|
|
6095
6293
|
if (!hasHydratedRef.current) return;
|
|
6096
6294
|
if (list.slice(prevLength).some((m) => m.role === "user")) {
|
|
6097
6295
|
detachedRef.current = false;
|
|
6296
|
+
setNewCount(0);
|
|
6297
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6098
6298
|
return pinBottomSoon(el, 3);
|
|
6099
6299
|
}
|
|
6100
6300
|
if (!list.some((m) => m.role === "user")) return;
|
|
6101
|
-
if (
|
|
6301
|
+
if (scrollAnchor === "turn") {
|
|
6302
|
+
updateTurnSpacer(el);
|
|
6303
|
+
recomputeNewCount(el);
|
|
6304
|
+
return;
|
|
6305
|
+
}
|
|
6306
|
+
if (detachedRef.current || inInteractionGrace()) return recomputeNewCount(el);
|
|
6102
6307
|
const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
6103
6308
|
if (distanceFromBottom < STICK_THRESHOLD) pinBottom(el);
|
|
6104
6309
|
}, [messages.value.length]);
|
|
@@ -6112,6 +6317,7 @@ function MessageList({
|
|
|
6112
6317
|
if (!hasHydratedRef.current) return;
|
|
6113
6318
|
if (!last || last.id !== prevLastId || last.status !== "streaming") return;
|
|
6114
6319
|
detachedRef.current = false;
|
|
6320
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6115
6321
|
return pinBottomSoon(el, 3);
|
|
6116
6322
|
}, [messages.value]);
|
|
6117
6323
|
useEffect7(() => {
|
|
@@ -6120,6 +6326,19 @@ function MessageList({
|
|
|
6120
6326
|
const last = messages.value.at(-1);
|
|
6121
6327
|
if (!last) return;
|
|
6122
6328
|
if (last.status !== "streaming" && !messages.value.some((m) => m.role === "user")) return;
|
|
6329
|
+
if (scrollAnchor === "turn") {
|
|
6330
|
+
const sync = () => {
|
|
6331
|
+
updateTurnSpacer(el);
|
|
6332
|
+
syncFade(el);
|
|
6333
|
+
syncJump(el);
|
|
6334
|
+
recomputeNewCount(el);
|
|
6335
|
+
};
|
|
6336
|
+
sync();
|
|
6337
|
+
if (last.status !== "streaming") return;
|
|
6338
|
+
const obs2 = new MutationObserver(sync);
|
|
6339
|
+
obs2.observe(el, { childList: true, subtree: true, characterData: true });
|
|
6340
|
+
return () => obs2.disconnect();
|
|
6341
|
+
}
|
|
6123
6342
|
const pinIfNear = () => {
|
|
6124
6343
|
if (detachedRef.current || inInteractionGrace()) return;
|
|
6125
6344
|
const distance = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
@@ -6148,9 +6367,11 @@ function MessageList({
|
|
|
6148
6367
|
useEffect7(() => {
|
|
6149
6368
|
const el = ref.current;
|
|
6150
6369
|
if (!el) return;
|
|
6151
|
-
const syncJump = () => setShowJump(el.scrollHeight - el.scrollTop - el.clientHeight > STICK_THRESHOLD * 2);
|
|
6152
6370
|
const onScroll = () => {
|
|
6153
|
-
syncJump();
|
|
6371
|
+
syncJump(el);
|
|
6372
|
+
syncFade(el);
|
|
6373
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight <= 8) markAllSeen();
|
|
6374
|
+
else recomputeNewCount(el);
|
|
6154
6375
|
if (performance.now() - autoPinAtRef.current > 150) {
|
|
6155
6376
|
detachedRef.current = el.scrollHeight - el.scrollTop - el.clientHeight > 8;
|
|
6156
6377
|
}
|
|
@@ -6186,7 +6407,7 @@ function MessageList({
|
|
|
6186
6407
|
el.addEventListener("pointerdown", onPointerDown, { passive: true });
|
|
6187
6408
|
window.addEventListener("pointerup", endInteraction, { passive: true });
|
|
6188
6409
|
window.addEventListener("pointercancel", endInteraction, { passive: true });
|
|
6189
|
-
syncJump();
|
|
6410
|
+
syncJump(el);
|
|
6190
6411
|
return () => {
|
|
6191
6412
|
el.removeEventListener("scroll", onScroll);
|
|
6192
6413
|
el.removeEventListener("wheel", onWheel);
|
|
@@ -6204,7 +6425,35 @@ function MessageList({
|
|
|
6204
6425
|
if (!el) return;
|
|
6205
6426
|
detachedRef.current = false;
|
|
6206
6427
|
pinBottom(el);
|
|
6428
|
+
markAllSeen();
|
|
6207
6429
|
};
|
|
6430
|
+
useEffect7(() => {
|
|
6431
|
+
const el = ref.current;
|
|
6432
|
+
if (!el || typeof IntersectionObserver === "undefined") return;
|
|
6433
|
+
const io = new IntersectionObserver(
|
|
6434
|
+
(entries2) => {
|
|
6435
|
+
let changed = false;
|
|
6436
|
+
for (const entry of entries2) {
|
|
6437
|
+
if (!entry.isIntersecting) continue;
|
|
6438
|
+
const row = entry.target;
|
|
6439
|
+
const id = row.dataset.mid;
|
|
6440
|
+
if (row.dataset.role !== "assistant" || !id) continue;
|
|
6441
|
+
if (!firedSeenRef.current.has(id)) {
|
|
6442
|
+
firedSeenRef.current.add(id);
|
|
6443
|
+
onMessageSeen?.(id);
|
|
6444
|
+
}
|
|
6445
|
+
if (!seenRef.current.has(id)) {
|
|
6446
|
+
seenRef.current.add(id);
|
|
6447
|
+
changed = true;
|
|
6448
|
+
}
|
|
6449
|
+
}
|
|
6450
|
+
if (changed) recomputeNewCount(el);
|
|
6451
|
+
},
|
|
6452
|
+
{ root: el, threshold: 0.01 }
|
|
6453
|
+
);
|
|
6454
|
+
el.querySelectorAll(`.${p18}-bubble-row[data-role="assistant"]`).forEach((row) => io.observe(row));
|
|
6455
|
+
return () => io.disconnect();
|
|
6456
|
+
}, [messages.value.length]);
|
|
6208
6457
|
const rows = [];
|
|
6209
6458
|
let prevDay = "";
|
|
6210
6459
|
const lastId = messages.value.at(-1)?.id;
|
|
@@ -6213,7 +6462,7 @@ function MessageList({
|
|
|
6213
6462
|
);
|
|
6214
6463
|
const markerRow = (marker) => {
|
|
6215
6464
|
if (form && marker.formId === form.form.id) {
|
|
6216
|
-
return /* @__PURE__ */
|
|
6465
|
+
return /* @__PURE__ */ jsx20(
|
|
6217
6466
|
FormGate,
|
|
6218
6467
|
{
|
|
6219
6468
|
form: form.form,
|
|
@@ -6224,7 +6473,7 @@ function MessageList({
|
|
|
6224
6473
|
`gate:${marker.formId}`
|
|
6225
6474
|
);
|
|
6226
6475
|
}
|
|
6227
|
-
return /* @__PURE__ */
|
|
6476
|
+
return /* @__PURE__ */ jsx20(
|
|
6228
6477
|
FormDoneMarker,
|
|
6229
6478
|
{
|
|
6230
6479
|
marker,
|
|
@@ -6247,12 +6496,12 @@ function MessageList({
|
|
|
6247
6496
|
const day = dayKey(m.createdAt);
|
|
6248
6497
|
if (day && day !== prevDay) {
|
|
6249
6498
|
rows.push(
|
|
6250
|
-
/* @__PURE__ */
|
|
6499
|
+
/* @__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}`)
|
|
6251
6500
|
);
|
|
6252
6501
|
prevDay = day;
|
|
6253
6502
|
}
|
|
6254
6503
|
rows.push(
|
|
6255
|
-
/* @__PURE__ */
|
|
6504
|
+
/* @__PURE__ */ jsx20(
|
|
6256
6505
|
MessageBubble,
|
|
6257
6506
|
{
|
|
6258
6507
|
message: m,
|
|
@@ -6264,7 +6513,9 @@ function MessageList({
|
|
|
6264
6513
|
interactive: Boolean(idle) && m.id === lastId,
|
|
6265
6514
|
superseded: m.id !== lastId,
|
|
6266
6515
|
tool,
|
|
6267
|
-
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0
|
|
6516
|
+
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0,
|
|
6517
|
+
enableMessageFeedback,
|
|
6518
|
+
onFeedback
|
|
6268
6519
|
},
|
|
6269
6520
|
m.id
|
|
6270
6521
|
)
|
|
@@ -6274,21 +6525,35 @@ function MessageList({
|
|
|
6274
6525
|
rows.push(markerRow(marker));
|
|
6275
6526
|
}
|
|
6276
6527
|
return /* @__PURE__ */ jsxs16("div", { class: `${p18}-list-wrap`, children: [
|
|
6277
|
-
/* @__PURE__ */ jsxs16(
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6528
|
+
/* @__PURE__ */ jsxs16(
|
|
6529
|
+
"div",
|
|
6530
|
+
{
|
|
6531
|
+
ref,
|
|
6532
|
+
class: `${p18}-list${scrollFade ? ` ${p18}-list--fade` : ""}`,
|
|
6533
|
+
role: "log",
|
|
6534
|
+
"aria-live": "polite",
|
|
6535
|
+
"aria-relevant": "additions text",
|
|
6536
|
+
children: [
|
|
6537
|
+
loading && messages.value.length === 0 ? /* @__PURE__ */ jsx20("div", { class: `${p18}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
|
|
6538
|
+
rows,
|
|
6539
|
+
form && !inlineForm ? /* @__PURE__ */ jsx20(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null,
|
|
6540
|
+
scrollAnchor === "turn" ? /* @__PURE__ */ jsx20("div", { ref: spacerRef, class: `${p18}-turn-spacer`, "aria-hidden": "true" }) : null
|
|
6541
|
+
]
|
|
6542
|
+
}
|
|
6543
|
+
),
|
|
6544
|
+
showJump ? /* @__PURE__ */ jsxs16(
|
|
6283
6545
|
"button",
|
|
6284
6546
|
{
|
|
6285
6547
|
type: "button",
|
|
6286
|
-
class: `${p18}-jump`,
|
|
6548
|
+
class: `${p18}-jump${newCount > 0 ? ` ${p18}-jump--new` : ""}`,
|
|
6287
6549
|
onClick: jumpToBottom,
|
|
6288
|
-
"aria-label": strings.scrollToBottom,
|
|
6289
|
-
title: strings.scrollToBottom,
|
|
6550
|
+
"aria-label": newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6551
|
+
title: newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6290
6552
|
"data-testid": TID.scrollToBottom,
|
|
6291
|
-
children:
|
|
6553
|
+
children: [
|
|
6554
|
+
newCount > 0 ? /* @__PURE__ */ jsx20("span", { class: `${p18}-jump-count`, children: newCount }) : null,
|
|
6555
|
+
/* @__PURE__ */ jsx20(ChevronDownIcon, {})
|
|
6556
|
+
]
|
|
6292
6557
|
}
|
|
6293
6558
|
) : null
|
|
6294
6559
|
] });
|
|
@@ -6317,7 +6582,7 @@ function dayLabel(createdAt, strings) {
|
|
|
6317
6582
|
}
|
|
6318
6583
|
|
|
6319
6584
|
// src/ui/conversation-list.tsx
|
|
6320
|
-
import { useEffect as useEffect8, useState as
|
|
6585
|
+
import { useEffect as useEffect8, useState as useState8 } from "preact/hooks";
|
|
6321
6586
|
|
|
6322
6587
|
// src/ui/history-groups.ts
|
|
6323
6588
|
var HISTORY_BUCKETS = ["today", "yesterday", "lastWeek", "older"];
|
|
@@ -6347,7 +6612,7 @@ function startOfDay(ms) {
|
|
|
6347
6612
|
}
|
|
6348
6613
|
|
|
6349
6614
|
// src/ui/conversation-list.tsx
|
|
6350
|
-
import { Fragment as Fragment5, jsx as
|
|
6615
|
+
import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs17 } from "preact/jsx-runtime";
|
|
6351
6616
|
var log12 = logger.scope("history");
|
|
6352
6617
|
var DEFAULT_SKELETON_ROWS = 3;
|
|
6353
6618
|
var MAX_SKELETON_ROWS = 6;
|
|
@@ -6376,8 +6641,8 @@ function ConversationList({
|
|
|
6376
6641
|
}) {
|
|
6377
6642
|
const p36 = BRAND.cssPrefix;
|
|
6378
6643
|
const seed = transport.peekConversations({ visitorId });
|
|
6379
|
-
const [state, setState] =
|
|
6380
|
-
const [conversations, setChats] =
|
|
6644
|
+
const [state, setState] = useState8(seed ? "loaded" : "loading");
|
|
6645
|
+
const [conversations, setChats] = useState8(seed?.conversations ?? []);
|
|
6381
6646
|
useEffect8(() => {
|
|
6382
6647
|
let cancelled = false;
|
|
6383
6648
|
transport.listConversations({ visitorId }).then((res) => {
|
|
@@ -6395,7 +6660,7 @@ function ConversationList({
|
|
|
6395
6660
|
cancelled = true;
|
|
6396
6661
|
};
|
|
6397
6662
|
}, [transport, visitorId, persistence]);
|
|
6398
|
-
const newChatButton = onNewConversation ? /* @__PURE__ */
|
|
6663
|
+
const newChatButton = onNewConversation ? /* @__PURE__ */ jsx21("div", { class: `${p36}-history-footer`, children: /* @__PURE__ */ jsxs17(
|
|
6399
6664
|
"button",
|
|
6400
6665
|
{
|
|
6401
6666
|
type: "button",
|
|
@@ -6403,7 +6668,7 @@ function ConversationList({
|
|
|
6403
6668
|
onClick: onNewConversation,
|
|
6404
6669
|
"data-testid": TID.sidebarNewConversation,
|
|
6405
6670
|
children: [
|
|
6406
|
-
/* @__PURE__ */
|
|
6671
|
+
/* @__PURE__ */ jsx21(PlusIcon, {}),
|
|
6407
6672
|
strings.newConversation
|
|
6408
6673
|
]
|
|
6409
6674
|
}
|
|
@@ -6411,16 +6676,16 @@ function ConversationList({
|
|
|
6411
6676
|
if (state === "loading") {
|
|
6412
6677
|
const rows = Math.min(persistence.loadHistoryCount() ?? DEFAULT_SKELETON_ROWS, MAX_SKELETON_ROWS);
|
|
6413
6678
|
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6414
|
-
/* @__PURE__ */
|
|
6415
|
-
/* @__PURE__ */
|
|
6416
|
-
/* @__PURE__ */
|
|
6417
|
-
/* @__PURE__ */
|
|
6679
|
+
/* @__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: [
|
|
6680
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-heading`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-heading` }) }),
|
|
6681
|
+
/* @__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: [
|
|
6682
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-avatar ${p36}-skeleton` }),
|
|
6418
6683
|
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6419
6684
|
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6420
|
-
/* @__PURE__ */
|
|
6421
|
-
/* @__PURE__ */
|
|
6685
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-title`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-title` }) }),
|
|
6686
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-time`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-time` }) })
|
|
6422
6687
|
] }),
|
|
6423
|
-
/* @__PURE__ */
|
|
6688
|
+
/* @__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` }) }) })
|
|
6424
6689
|
] })
|
|
6425
6690
|
] }, i)) })
|
|
6426
6691
|
] }) }),
|
|
@@ -6429,16 +6694,16 @@ function ConversationList({
|
|
|
6429
6694
|
}
|
|
6430
6695
|
if (state === "error" || conversations.length === 0) {
|
|
6431
6696
|
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6432
|
-
/* @__PURE__ */
|
|
6697
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-empty`, children: strings.historyEmpty }),
|
|
6433
6698
|
newChatButton
|
|
6434
6699
|
] });
|
|
6435
6700
|
}
|
|
6436
6701
|
const now = Date.now();
|
|
6437
6702
|
const groups = groupByBucket(now, conversations);
|
|
6438
6703
|
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6439
|
-
/* @__PURE__ */
|
|
6440
|
-
/* @__PURE__ */
|
|
6441
|
-
/* @__PURE__ */
|
|
6704
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-group`, children: [
|
|
6705
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
|
|
6706
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs17(
|
|
6442
6707
|
"button",
|
|
6443
6708
|
{
|
|
6444
6709
|
type: "button",
|
|
@@ -6446,18 +6711,18 @@ function ConversationList({
|
|
|
6446
6711
|
class: `${p36}-history-item`,
|
|
6447
6712
|
onClick: () => onSelect(chat),
|
|
6448
6713
|
"data-closed": chat.canContinue ? void 0 : "true",
|
|
6449
|
-
"data-unread":
|
|
6714
|
+
"data-unread": chat.hasUnread ? "true" : void 0,
|
|
6450
6715
|
"data-testid": tid(TID.historyItem, chat.conversationId),
|
|
6451
6716
|
children: [
|
|
6452
|
-
/* @__PURE__ */
|
|
6717
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx21(MessageIcon, {}) }),
|
|
6453
6718
|
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6454
6719
|
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6455
|
-
/* @__PURE__ */
|
|
6456
|
-
/* @__PURE__ */
|
|
6720
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-title`, children: chat.title }),
|
|
6721
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
|
|
6457
6722
|
] }),
|
|
6458
6723
|
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6459
|
-
/* @__PURE__ */
|
|
6460
|
-
|
|
6724
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
|
|
6725
|
+
chat.hasUnread ? /* @__PURE__ */ jsx21("span", { class: `${p36}-history-dot` }) : null
|
|
6461
6726
|
] })
|
|
6462
6727
|
] })
|
|
6463
6728
|
]
|
|
@@ -6470,11 +6735,11 @@ function ConversationList({
|
|
|
6470
6735
|
}
|
|
6471
6736
|
|
|
6472
6737
|
// src/ui/suggestions.tsx
|
|
6473
|
-
import { jsx as
|
|
6738
|
+
import { jsx as jsx22 } from "preact/jsx-runtime";
|
|
6474
6739
|
var p19 = BRAND.cssPrefix;
|
|
6475
6740
|
function Suggestions({ suggestions, onPick }) {
|
|
6476
6741
|
if (suggestions.length === 0) return null;
|
|
6477
|
-
return /* @__PURE__ */
|
|
6742
|
+
return /* @__PURE__ */ jsx22("div", { class: `${p19}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx22(
|
|
6478
6743
|
"button",
|
|
6479
6744
|
{
|
|
6480
6745
|
type: "button",
|
|
@@ -6488,7 +6753,7 @@ function Suggestions({ suggestions, onPick }) {
|
|
|
6488
6753
|
}
|
|
6489
6754
|
|
|
6490
6755
|
// src/ui/panel.tsx
|
|
6491
|
-
import { Fragment as Fragment6, jsx as
|
|
6756
|
+
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs18 } from "preact/jsx-runtime";
|
|
6492
6757
|
var p20 = BRAND.cssPrefix;
|
|
6493
6758
|
function Panel(props2) {
|
|
6494
6759
|
const { options, onClose } = props2;
|
|
@@ -6524,7 +6789,7 @@ function Panel(props2) {
|
|
|
6524
6789
|
style: { position: "relative" },
|
|
6525
6790
|
"data-testid": TID.panel,
|
|
6526
6791
|
children: [
|
|
6527
|
-
/* @__PURE__ */
|
|
6792
|
+
/* @__PURE__ */ jsx23(
|
|
6528
6793
|
PanelContent,
|
|
6529
6794
|
{
|
|
6530
6795
|
...props2,
|
|
@@ -6533,7 +6798,7 @@ function Panel(props2) {
|
|
|
6533
6798
|
composerAttachApiRef
|
|
6534
6799
|
}
|
|
6535
6800
|
),
|
|
6536
|
-
/* @__PURE__ */
|
|
6801
|
+
/* @__PURE__ */ jsx23(PoweredByBar, { poweredBy: props2.options.poweredBy })
|
|
6537
6802
|
]
|
|
6538
6803
|
}
|
|
6539
6804
|
);
|
|
@@ -6572,6 +6837,8 @@ function PanelContent(props2) {
|
|
|
6572
6837
|
onFormFill,
|
|
6573
6838
|
tool,
|
|
6574
6839
|
onRetry,
|
|
6840
|
+
onMessageFeedback,
|
|
6841
|
+
onMessageSeen,
|
|
6575
6842
|
containerEl,
|
|
6576
6843
|
dragOver,
|
|
6577
6844
|
composerAttachApiRef
|
|
@@ -6582,8 +6849,8 @@ function PanelContent(props2) {
|
|
|
6582
6849
|
composerArea = null;
|
|
6583
6850
|
} else if (canSend) {
|
|
6584
6851
|
composerArea = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6585
|
-
/* @__PURE__ */
|
|
6586
|
-
/* @__PURE__ */
|
|
6852
|
+
/* @__PURE__ */ jsx23(Suggestions, { suggestions, onPick: onSuggestion }),
|
|
6853
|
+
/* @__PURE__ */ jsx23(
|
|
6587
6854
|
Composer,
|
|
6588
6855
|
{
|
|
6589
6856
|
options,
|
|
@@ -6598,10 +6865,10 @@ function PanelContent(props2) {
|
|
|
6598
6865
|
)
|
|
6599
6866
|
] });
|
|
6600
6867
|
} else {
|
|
6601
|
-
composerArea = /* @__PURE__ */
|
|
6868
|
+
composerArea = /* @__PURE__ */ jsx23(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
|
|
6602
6869
|
}
|
|
6603
6870
|
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6604
|
-
view === "history" ? /* @__PURE__ */
|
|
6871
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6605
6872
|
HistoryHeader,
|
|
6606
6873
|
{
|
|
6607
6874
|
strings: s,
|
|
@@ -6610,7 +6877,7 @@ function PanelContent(props2) {
|
|
|
6610
6877
|
showClose: canShowClose(options.mode, panelSize, options.actions)
|
|
6611
6878
|
}
|
|
6612
6879
|
) : /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, "data-testid": TID.panelHeader, children: [
|
|
6613
|
-
onBack ? /* @__PURE__ */
|
|
6880
|
+
onBack ? /* @__PURE__ */ jsx23(
|
|
6614
6881
|
"button",
|
|
6615
6882
|
{
|
|
6616
6883
|
type: "button",
|
|
@@ -6618,13 +6885,13 @@ function PanelContent(props2) {
|
|
|
6618
6885
|
onClick: onBack,
|
|
6619
6886
|
"aria-label": s.moduleBack,
|
|
6620
6887
|
title: s.moduleBack,
|
|
6621
|
-
children: /* @__PURE__ */
|
|
6888
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6622
6889
|
}
|
|
6623
6890
|
) : null,
|
|
6624
|
-
agent ? /* @__PURE__ */
|
|
6625
|
-
/* @__PURE__ */
|
|
6891
|
+
agent ? /* @__PURE__ */ jsx23(AgentBadge, { agent, strings: s }) : /* @__PURE__ */ jsx23("h1", { children: s.panelTitle }),
|
|
6892
|
+
/* @__PURE__ */ jsx23(HeaderActions, { panelProps: props2, variant: "chat" })
|
|
6626
6893
|
] }),
|
|
6627
|
-
view === "history" ? /* @__PURE__ */
|
|
6894
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6628
6895
|
ConversationList,
|
|
6629
6896
|
{
|
|
6630
6897
|
transport,
|
|
@@ -6636,8 +6903,8 @@ function PanelContent(props2) {
|
|
|
6636
6903
|
onNewConversation
|
|
6637
6904
|
}
|
|
6638
6905
|
) : /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6639
|
-
/* @__PURE__ */
|
|
6640
|
-
/* @__PURE__ */
|
|
6906
|
+
/* @__PURE__ */ jsx23(DropZone, { visible: dragOver, strings: s }),
|
|
6907
|
+
/* @__PURE__ */ jsx23(
|
|
6641
6908
|
MessageList,
|
|
6642
6909
|
{
|
|
6643
6910
|
messagesSig,
|
|
@@ -6646,6 +6913,11 @@ function PanelContent(props2) {
|
|
|
6646
6913
|
showReasoning: options.showReasoning,
|
|
6647
6914
|
showToolCalls: options.showToolCalls,
|
|
6648
6915
|
showSources: options.showSources,
|
|
6916
|
+
scrollFade: options.scrollFade,
|
|
6917
|
+
scrollAnchor: options.scrollAnchor,
|
|
6918
|
+
enableMessageFeedback: options.enableMessageFeedback,
|
|
6919
|
+
onFeedback: onMessageFeedback,
|
|
6920
|
+
onMessageSeen,
|
|
6649
6921
|
loading: loadingMessages,
|
|
6650
6922
|
idle: !isStreaming,
|
|
6651
6923
|
tool,
|
|
@@ -6656,9 +6928,9 @@ function PanelContent(props2) {
|
|
|
6656
6928
|
}
|
|
6657
6929
|
),
|
|
6658
6930
|
composerArea,
|
|
6659
|
-
/* @__PURE__ */
|
|
6931
|
+
/* @__PURE__ */ jsx23(ComposerFooter, { disclaimer: options.composerDisclaimer })
|
|
6660
6932
|
] }),
|
|
6661
|
-
options.size.resize?.enabled ? /* @__PURE__ */
|
|
6933
|
+
options.size.resize?.enabled ? /* @__PURE__ */ jsx23(
|
|
6662
6934
|
ResizeGrip,
|
|
6663
6935
|
{
|
|
6664
6936
|
panelEl: containerEl,
|
|
@@ -6678,7 +6950,7 @@ function HistoryHeader({
|
|
|
6678
6950
|
showClose
|
|
6679
6951
|
}) {
|
|
6680
6952
|
return /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, children: [
|
|
6681
|
-
/* @__PURE__ */
|
|
6953
|
+
/* @__PURE__ */ jsx23(
|
|
6682
6954
|
"button",
|
|
6683
6955
|
{
|
|
6684
6956
|
type: "button",
|
|
@@ -6686,11 +6958,11 @@ function HistoryHeader({
|
|
|
6686
6958
|
onClick: onBack,
|
|
6687
6959
|
"aria-label": strings.historyBack,
|
|
6688
6960
|
title: strings.historyBack,
|
|
6689
|
-
children: /* @__PURE__ */
|
|
6961
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6690
6962
|
}
|
|
6691
6963
|
),
|
|
6692
|
-
/* @__PURE__ */
|
|
6693
|
-
showClose ? /* @__PURE__ */
|
|
6964
|
+
/* @__PURE__ */ jsx23("h1", { children: strings.historyTitle }),
|
|
6965
|
+
showClose ? /* @__PURE__ */ jsx23(
|
|
6694
6966
|
"button",
|
|
6695
6967
|
{
|
|
6696
6968
|
type: "button",
|
|
@@ -6698,7 +6970,7 @@ function HistoryHeader({
|
|
|
6698
6970
|
onClick: onClose,
|
|
6699
6971
|
"aria-label": strings.close,
|
|
6700
6972
|
title: strings.close,
|
|
6701
|
-
children: /* @__PURE__ */
|
|
6973
|
+
children: /* @__PURE__ */ jsx23(CloseIcon, {})
|
|
6702
6974
|
}
|
|
6703
6975
|
) : null
|
|
6704
6976
|
] });
|
|
@@ -6709,27 +6981,27 @@ function ReadOnlyBanner({
|
|
|
6709
6981
|
onNewConversation
|
|
6710
6982
|
}) {
|
|
6711
6983
|
return /* @__PURE__ */ jsxs18("div", { class: `${p20}-readonly-banner`, role: "note", children: [
|
|
6712
|
-
/* @__PURE__ */
|
|
6713
|
-
/* @__PURE__ */
|
|
6984
|
+
/* @__PURE__ */ jsx23("span", { class: `${p20}-readonly-label`, children: label }),
|
|
6985
|
+
/* @__PURE__ */ jsx23("button", { type: "button", class: `${p20}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
|
|
6714
6986
|
] });
|
|
6715
6987
|
}
|
|
6716
6988
|
function ComposerFooter({ disclaimer }) {
|
|
6717
6989
|
if (!disclaimer) return null;
|
|
6718
|
-
return /* @__PURE__ */
|
|
6990
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-composer-footer`, children: /* @__PURE__ */ jsx23("div", { class: `${p20}-disclaimer`, children: disclaimer }) });
|
|
6719
6991
|
}
|
|
6720
6992
|
function PoweredByBar({ poweredBy }) {
|
|
6721
6993
|
if (!poweredBy) return null;
|
|
6722
|
-
return /* @__PURE__ */
|
|
6994
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-poweredby-bar`, children: /* @__PURE__ */ jsx23(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
|
|
6723
6995
|
}
|
|
6724
6996
|
function PoweredBy({ logoUrl, text, href }) {
|
|
6725
6997
|
const inner = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6726
|
-
logoUrl ? /* @__PURE__ */
|
|
6727
|
-
text ? /* @__PURE__ */
|
|
6998
|
+
logoUrl ? /* @__PURE__ */ jsx23("img", { class: `${p20}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
|
|
6999
|
+
text ? /* @__PURE__ */ jsx23("span", { children: text }) : null
|
|
6728
7000
|
] });
|
|
6729
7001
|
if (href) {
|
|
6730
|
-
return /* @__PURE__ */
|
|
7002
|
+
return /* @__PURE__ */ jsx23("a", { class: `${p20}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
|
|
6731
7003
|
}
|
|
6732
|
-
return /* @__PURE__ */
|
|
7004
|
+
return /* @__PURE__ */ jsx23("span", { class: `${p20}-poweredby`, children: inner });
|
|
6733
7005
|
}
|
|
6734
7006
|
|
|
6735
7007
|
// src/ui/form/form-controller.ts
|
|
@@ -6812,7 +7084,7 @@ function whenPasses(form, d) {
|
|
|
6812
7084
|
}
|
|
6813
7085
|
|
|
6814
7086
|
// src/ui/sidebar.tsx
|
|
6815
|
-
import { Fragment as Fragment7, jsx as
|
|
7087
|
+
import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs19 } from "preact/jsx-runtime";
|
|
6816
7088
|
function Sidebar(props2) {
|
|
6817
7089
|
const p36 = BRAND.cssPrefix;
|
|
6818
7090
|
const { site, blocks, strings, collapsed } = props2;
|
|
@@ -6821,8 +7093,8 @@ function Sidebar(props2) {
|
|
|
6821
7093
|
const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
|
|
6822
7094
|
return /* @__PURE__ */ jsxs19("aside", { class: `${p36}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
|
|
6823
7095
|
/* @__PURE__ */ jsxs19("div", { class: `${p36}-sidebar-header`, children: [
|
|
6824
|
-
/* @__PURE__ */
|
|
6825
|
-
/* @__PURE__ */
|
|
7096
|
+
/* @__PURE__ */ jsx24(SidebarBrand, { site }),
|
|
7097
|
+
/* @__PURE__ */ jsx24(
|
|
6826
7098
|
"button",
|
|
6827
7099
|
{
|
|
6828
7100
|
type: "button",
|
|
@@ -6832,14 +7104,14 @@ function Sidebar(props2) {
|
|
|
6832
7104
|
title: toggleLabel,
|
|
6833
7105
|
onClick: props2.onToggleCollapsed,
|
|
6834
7106
|
"data-testid": TID.sidebarToggle,
|
|
6835
|
-
children: /* @__PURE__ */
|
|
7107
|
+
children: /* @__PURE__ */ jsx24(SidebarToggleIcon, { collapsed })
|
|
6836
7108
|
}
|
|
6837
7109
|
)
|
|
6838
7110
|
] }),
|
|
6839
7111
|
collapsed ? null : /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
6840
|
-
navigation.length > 0 ? /* @__PURE__ */
|
|
6841
|
-
linkCards.length > 0 ? /* @__PURE__ */
|
|
6842
|
-
props2.showConversations ? /* @__PURE__ */
|
|
7112
|
+
navigation.length > 0 ? /* @__PURE__ */ jsx24("nav", { class: `${p36}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx24(SidebarNav, { items: navigation }) }) : null,
|
|
7113
|
+
linkCards.length > 0 ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx24(SidebarCards, { items: linkCards }) }) : null,
|
|
7114
|
+
props2.showConversations ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-conversations`, children: /* @__PURE__ */ jsx24(
|
|
6843
7115
|
ConversationList,
|
|
6844
7116
|
{
|
|
6845
7117
|
transport: props2.transport,
|
|
@@ -6859,14 +7131,14 @@ function SidebarBrand({ site }) {
|
|
|
6859
7131
|
if (site?.logo?.url) {
|
|
6860
7132
|
const alt = site.logo.alt ?? site.title ?? "Logo";
|
|
6861
7133
|
return /* @__PURE__ */ jsxs19("picture", { children: [
|
|
6862
|
-
site.logoDark?.url ? /* @__PURE__ */
|
|
6863
|
-
/* @__PURE__ */
|
|
7134
|
+
site.logoDark?.url ? /* @__PURE__ */ jsx24("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
|
|
7135
|
+
/* @__PURE__ */ jsx24("img", { class: `${p36}-sidebar-logo`, src: site.logo.url, alt })
|
|
6864
7136
|
] });
|
|
6865
7137
|
}
|
|
6866
|
-
return /* @__PURE__ */
|
|
7138
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-title`, children: site?.title ?? BRAND.name });
|
|
6867
7139
|
}
|
|
6868
7140
|
function SidebarToggleIcon({ collapsed }) {
|
|
6869
|
-
return /* @__PURE__ */
|
|
7141
|
+
return /* @__PURE__ */ jsx24(
|
|
6870
7142
|
"svg",
|
|
6871
7143
|
{
|
|
6872
7144
|
width: "16",
|
|
@@ -6876,13 +7148,13 @@ function SidebarToggleIcon({ collapsed }) {
|
|
|
6876
7148
|
stroke: "currentColor",
|
|
6877
7149
|
"stroke-width": "2",
|
|
6878
7150
|
"aria-hidden": "true",
|
|
6879
|
-
children: collapsed ? /* @__PURE__ */
|
|
7151
|
+
children: collapsed ? /* @__PURE__ */ jsx24("polyline", { points: "9 6 15 12 9 18" }) : /* @__PURE__ */ jsx24("polyline", { points: "15 6 9 12 15 18" })
|
|
6880
7152
|
}
|
|
6881
7153
|
);
|
|
6882
7154
|
}
|
|
6883
7155
|
function SidebarNav({ items }) {
|
|
6884
7156
|
const p36 = BRAND.cssPrefix;
|
|
6885
|
-
return /* @__PURE__ */
|
|
7157
|
+
return /* @__PURE__ */ jsx24("ul", { class: `${p36}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsxs19(
|
|
6886
7158
|
"a",
|
|
6887
7159
|
{
|
|
6888
7160
|
class: `${p36}-sidebar-nav-item`,
|
|
@@ -6890,15 +7162,15 @@ function SidebarNav({ items }) {
|
|
|
6890
7162
|
target: item.href ? "_blank" : void 0,
|
|
6891
7163
|
rel: item.href ? "noreferrer" : void 0,
|
|
6892
7164
|
children: [
|
|
6893
|
-
item.icon ? /* @__PURE__ */
|
|
6894
|
-
/* @__PURE__ */
|
|
7165
|
+
item.icon ? /* @__PURE__ */ jsx24("span", { class: `${p36}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
|
|
7166
|
+
/* @__PURE__ */ jsx24("span", { class: `${p36}-sidebar-nav-label`, children: item.label })
|
|
6895
7167
|
]
|
|
6896
7168
|
}
|
|
6897
7169
|
) }, item.id ?? item.label)) });
|
|
6898
7170
|
}
|
|
6899
7171
|
function SidebarCards({ items }) {
|
|
6900
7172
|
const p36 = BRAND.cssPrefix;
|
|
6901
|
-
return /* @__PURE__ */
|
|
7173
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs19(
|
|
6902
7174
|
"a",
|
|
6903
7175
|
{
|
|
6904
7176
|
class: `${p36}-sidebar-card`,
|
|
@@ -6906,8 +7178,8 @@ function SidebarCards({ items }) {
|
|
|
6906
7178
|
target: item.href ? "_blank" : void 0,
|
|
6907
7179
|
rel: item.href ? "noreferrer" : void 0,
|
|
6908
7180
|
children: [
|
|
6909
|
-
/* @__PURE__ */
|
|
6910
|
-
item.description ? /* @__PURE__ */
|
|
7181
|
+
/* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-card-label`, children: item.label }),
|
|
7182
|
+
item.description ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-card-desc`, children: item.description }) : null
|
|
6911
7183
|
]
|
|
6912
7184
|
},
|
|
6913
7185
|
item.id ?? item.label
|
|
@@ -6915,11 +7187,11 @@ function SidebarCards({ items }) {
|
|
|
6915
7187
|
}
|
|
6916
7188
|
|
|
6917
7189
|
// src/ui/page-shell.tsx
|
|
6918
|
-
import { jsx as
|
|
7190
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "preact/jsx-runtime";
|
|
6919
7191
|
var p21 = BRAND.cssPrefix;
|
|
6920
7192
|
function PageShell(props2) {
|
|
6921
7193
|
return /* @__PURE__ */ jsxs20("main", { class: `${p21}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
|
|
6922
|
-
/* @__PURE__ */
|
|
7194
|
+
/* @__PURE__ */ jsx25(
|
|
6923
7195
|
Sidebar,
|
|
6924
7196
|
{
|
|
6925
7197
|
site: props2.site,
|
|
@@ -6936,7 +7208,7 @@ function PageShell(props2) {
|
|
|
6936
7208
|
onToggleCollapsed: props2.onToggleSidebarCollapsed
|
|
6937
7209
|
}
|
|
6938
7210
|
),
|
|
6939
|
-
/* @__PURE__ */
|
|
7211
|
+
/* @__PURE__ */ jsx25("section", { class: `${p21}-page-chat`, "aria-label": "Chat", children: props2.children })
|
|
6940
7212
|
] });
|
|
6941
7213
|
}
|
|
6942
7214
|
|
|
@@ -6974,7 +7246,7 @@ var atTabRoot = (s) => activeStack(s).length === 0;
|
|
|
6974
7246
|
|
|
6975
7247
|
// src/ui/messenger-home.tsx
|
|
6976
7248
|
import { useCallback as useCallback4, useEffect as useEffect14, useRef as useRef8 } from "preact/hooks";
|
|
6977
|
-
import { useComputed as
|
|
7249
|
+
import { useComputed as useComputed8 } from "@preact/signals";
|
|
6978
7250
|
|
|
6979
7251
|
// src/ui/modules/chat.tsx
|
|
6980
7252
|
var chatLayout = {
|
|
@@ -6983,38 +7255,38 @@ var chatLayout = {
|
|
|
6983
7255
|
};
|
|
6984
7256
|
|
|
6985
7257
|
// src/ui/modules/help.tsx
|
|
6986
|
-
import { useEffect as useEffect10, useMemo as useMemo2, useState as
|
|
7258
|
+
import { useEffect as useEffect10, useMemo as useMemo2, useState as useState9 } from "preact/hooks";
|
|
6987
7259
|
|
|
6988
7260
|
// src/ui/back-header.tsx
|
|
6989
|
-
import { jsx as
|
|
7261
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "preact/jsx-runtime";
|
|
6990
7262
|
var p22 = BRAND.cssPrefix;
|
|
6991
7263
|
function TitleBar({ title, actions }) {
|
|
6992
7264
|
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-variant": "title", children: [
|
|
6993
|
-
/* @__PURE__ */
|
|
6994
|
-
/* @__PURE__ */
|
|
6995
|
-
actions ?? /* @__PURE__ */
|
|
7265
|
+
/* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" }),
|
|
7266
|
+
/* @__PURE__ */ jsx26("h1", { class: `${p22}-back-title`, children: title }),
|
|
7267
|
+
actions ?? /* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
|
|
6996
7268
|
] });
|
|
6997
7269
|
}
|
|
6998
7270
|
function BackHeader({ title, backLabel, onBack, actions, testid }) {
|
|
6999
7271
|
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-testid": testid, children: [
|
|
7000
|
-
/* @__PURE__ */
|
|
7001
|
-
/* @__PURE__ */
|
|
7002
|
-
actions ?? /* @__PURE__ */
|
|
7272
|
+
/* @__PURE__ */ jsx26("button", { type: "button", class: `${p22}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx26(BackIcon, {}) }),
|
|
7273
|
+
/* @__PURE__ */ jsx26("h1", { class: `${p22}-back-title`, children: title }),
|
|
7274
|
+
actions ?? /* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
|
|
7003
7275
|
] });
|
|
7004
7276
|
}
|
|
7005
7277
|
|
|
7006
7278
|
// src/ui/home-search.tsx
|
|
7007
|
-
import { jsx as
|
|
7279
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "preact/jsx-runtime";
|
|
7008
7280
|
var p23 = BRAND.cssPrefix;
|
|
7009
7281
|
function HomeSearchButton({ placeholder, onActivate }) {
|
|
7010
7282
|
return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
|
|
7011
|
-
/* @__PURE__ */
|
|
7012
|
-
/* @__PURE__ */
|
|
7283
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-text`, children: placeholder }),
|
|
7284
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(SearchIcon, {}) })
|
|
7013
7285
|
] });
|
|
7014
7286
|
}
|
|
7015
7287
|
function HelpSearchInput({ placeholder, value, onInput }) {
|
|
7016
7288
|
return /* @__PURE__ */ jsxs22("div", { class: `${p23}-home-search`, "data-input": "true", children: [
|
|
7017
|
-
/* @__PURE__ */
|
|
7289
|
+
/* @__PURE__ */ jsx27(
|
|
7018
7290
|
"input",
|
|
7019
7291
|
{
|
|
7020
7292
|
type: "search",
|
|
@@ -7025,25 +7297,25 @@ function HelpSearchInput({ placeholder, value, onInput }) {
|
|
|
7025
7297
|
"data-testid": TID.helpSearch
|
|
7026
7298
|
}
|
|
7027
7299
|
),
|
|
7028
|
-
/* @__PURE__ */
|
|
7300
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(SearchIcon, {}) })
|
|
7029
7301
|
] });
|
|
7030
7302
|
}
|
|
7031
7303
|
|
|
7032
7304
|
// src/ui/list-row.tsx
|
|
7033
|
-
import { jsx as
|
|
7305
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "preact/jsx-runtime";
|
|
7034
7306
|
var p24 = BRAND.cssPrefix;
|
|
7035
7307
|
function ListRow({ title, subtitle, onClick, testid }) {
|
|
7036
7308
|
return /* @__PURE__ */ jsxs23("button", { type: "button", class: `${p24}-list-row`, onClick, "data-testid": testid, children: [
|
|
7037
7309
|
/* @__PURE__ */ jsxs23("span", { class: `${p24}-list-row-body`, children: [
|
|
7038
|
-
/* @__PURE__ */
|
|
7039
|
-
subtitle ? /* @__PURE__ */
|
|
7310
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-title`, children: title }),
|
|
7311
|
+
subtitle ? /* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-sub`, children: subtitle }) : null
|
|
7040
7312
|
] }),
|
|
7041
|
-
/* @__PURE__ */
|
|
7313
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx28(ChevronRightIcon, {}) })
|
|
7042
7314
|
] });
|
|
7043
7315
|
}
|
|
7044
7316
|
|
|
7045
7317
|
// src/ui/module-state.tsx
|
|
7046
|
-
import { jsx as
|
|
7318
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "preact/jsx-runtime";
|
|
7047
7319
|
var p25 = BRAND.cssPrefix;
|
|
7048
7320
|
function ModuleState({
|
|
7049
7321
|
tone = "info",
|
|
@@ -7052,13 +7324,13 @@ function ModuleState({
|
|
|
7052
7324
|
strings
|
|
7053
7325
|
}) {
|
|
7054
7326
|
return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
|
|
7055
|
-
/* @__PURE__ */
|
|
7056
|
-
onRetry ? /* @__PURE__ */
|
|
7327
|
+
/* @__PURE__ */ jsx29("span", { children: message }),
|
|
7328
|
+
onRetry ? /* @__PURE__ */ jsx29("button", { type: "button", class: `${p25}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
|
|
7057
7329
|
] });
|
|
7058
7330
|
}
|
|
7059
7331
|
|
|
7060
7332
|
// src/ui/modules/help.tsx
|
|
7061
|
-
import { jsx as
|
|
7333
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "preact/jsx-runtime";
|
|
7062
7334
|
var p26 = BRAND.cssPrefix;
|
|
7063
7335
|
var log13 = logger.scope("help");
|
|
7064
7336
|
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 });
|
|
@@ -7088,7 +7360,7 @@ function fuzzySearch(items, query) {
|
|
|
7088
7360
|
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);
|
|
7089
7361
|
}
|
|
7090
7362
|
function ArticleRow({ article, nav }) {
|
|
7091
|
-
return /* @__PURE__ */
|
|
7363
|
+
return /* @__PURE__ */ jsx30(
|
|
7092
7364
|
ListRow,
|
|
7093
7365
|
{
|
|
7094
7366
|
title: article.title,
|
|
@@ -7100,11 +7372,11 @@ function ArticleRow({ article, nav }) {
|
|
|
7100
7372
|
}
|
|
7101
7373
|
function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7102
7374
|
const tags = config.contentTags;
|
|
7103
|
-
const [state, setState] =
|
|
7104
|
-
const [errorMsg, setErrorMsg] =
|
|
7105
|
-
const [items, setItems] =
|
|
7106
|
-
const [query, setQuery] =
|
|
7107
|
-
const [reloadKey, setReloadKey] =
|
|
7375
|
+
const [state, setState] = useState9("loading");
|
|
7376
|
+
const [errorMsg, setErrorMsg] = useState9(strings.errorGeneric);
|
|
7377
|
+
const [items, setItems] = useState9([]);
|
|
7378
|
+
const [query, setQuery] = useState9("");
|
|
7379
|
+
const [reloadKey, setReloadKey] = useState9(0);
|
|
7108
7380
|
useEffect10(() => {
|
|
7109
7381
|
let cancelled = false;
|
|
7110
7382
|
setState("loading");
|
|
@@ -7133,45 +7405,45 @@ function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7133
7405
|
}, [query, results, bus]);
|
|
7134
7406
|
function renderBody() {
|
|
7135
7407
|
if (query.trim().length > 0) {
|
|
7136
|
-
if (results.length === 0) return /* @__PURE__ */
|
|
7137
|
-
return /* @__PURE__ */
|
|
7408
|
+
if (results.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpSearchEmpty, strings });
|
|
7409
|
+
return /* @__PURE__ */ jsx30("div", { class: `${p26}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx30(ArticleRow, { article: a, nav }, a.id)) });
|
|
7138
7410
|
}
|
|
7139
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7411
|
+
if (state === "loading") return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpLoading, strings });
|
|
7140
7412
|
if (state === "error") {
|
|
7141
|
-
return /* @__PURE__ */
|
|
7413
|
+
return /* @__PURE__ */ jsx30(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7142
7414
|
}
|
|
7143
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7415
|
+
if (items.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpEmpty, strings });
|
|
7144
7416
|
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs25("section", { class: `${p26}-help-group`, children: [
|
|
7145
|
-
category ? /* @__PURE__ */
|
|
7146
|
-
/* @__PURE__ */
|
|
7417
|
+
category ? /* @__PURE__ */ jsx30("h2", { class: `${p26}-help-section-title`, children: category }) : null,
|
|
7418
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx30(ArticleRow, { article: a, nav }, a.id)) })
|
|
7147
7419
|
] }, category));
|
|
7148
7420
|
}
|
|
7149
7421
|
return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
|
|
7150
|
-
/* @__PURE__ */
|
|
7151
|
-
/* @__PURE__ */
|
|
7152
|
-
/* @__PURE__ */
|
|
7422
|
+
/* @__PURE__ */ jsx30(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx30(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
7423
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-module-pad`, children: /* @__PURE__ */ jsx30(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
|
|
7424
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-help-list`, children: renderBody() })
|
|
7153
7425
|
] });
|
|
7154
7426
|
}
|
|
7155
7427
|
var helpLayout = {
|
|
7156
7428
|
Icon: HelpIcon,
|
|
7157
|
-
Root: (props2) => /* @__PURE__ */
|
|
7429
|
+
Root: (props2) => /* @__PURE__ */ jsx30(HelpRoot, { ...props2 })
|
|
7158
7430
|
};
|
|
7159
7431
|
|
|
7160
7432
|
// src/ui/modules/home.tsx
|
|
7161
|
-
import { useEffect as useEffect11, useState as
|
|
7433
|
+
import { useEffect as useEffect11, useState as useState10 } from "preact/hooks";
|
|
7162
7434
|
|
|
7163
7435
|
// src/ui/home-card.tsx
|
|
7164
|
-
import { jsx as
|
|
7436
|
+
import { jsx as jsx31 } from "preact/jsx-runtime";
|
|
7165
7437
|
var p27 = BRAND.cssPrefix;
|
|
7166
7438
|
function HomeCard({ onClick, children, testid }) {
|
|
7167
7439
|
if (onClick) {
|
|
7168
|
-
return /* @__PURE__ */
|
|
7440
|
+
return /* @__PURE__ */ jsx31("button", { type: "button", class: `${p27}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
|
|
7169
7441
|
}
|
|
7170
|
-
return /* @__PURE__ */
|
|
7442
|
+
return /* @__PURE__ */ jsx31("div", { class: `${p27}-home-card`, "data-testid": testid, children });
|
|
7171
7443
|
}
|
|
7172
7444
|
|
|
7173
7445
|
// src/ui/modules/home.tsx
|
|
7174
|
-
import { Fragment as Fragment8, jsx as
|
|
7446
|
+
import { Fragment as Fragment8, jsx as jsx32, jsxs as jsxs26 } from "preact/jsx-runtime";
|
|
7175
7447
|
var p28 = BRAND.cssPrefix;
|
|
7176
7448
|
var log14 = logger.scope("home");
|
|
7177
7449
|
function resolveGreeting(props2) {
|
|
@@ -7186,8 +7458,8 @@ function resolveGreeting(props2) {
|
|
|
7186
7458
|
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 });
|
|
7187
7459
|
function HomeRoot(props2) {
|
|
7188
7460
|
const { transport, strings, config, nav, bus, panelProps } = props2;
|
|
7189
|
-
const [recent, setRecent] =
|
|
7190
|
-
const [content, setContent] =
|
|
7461
|
+
const [recent, setRecent] = useState10(null);
|
|
7462
|
+
const [content, setContent] = useState10([]);
|
|
7191
7463
|
const tagsKey = config.contentTags?.join(",");
|
|
7192
7464
|
useEffect11(() => {
|
|
7193
7465
|
if (!config.showRecentConversations) return;
|
|
@@ -7215,49 +7487,49 @@ function HomeRoot(props2) {
|
|
|
7215
7487
|
const status = config.status;
|
|
7216
7488
|
const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
|
|
7217
7489
|
const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
|
|
7218
|
-
return /* @__PURE__ */
|
|
7490
|
+
return /* @__PURE__ */ jsx32("div", { class: `${p28}-module ${p28}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-scroll`, children: [
|
|
7219
7491
|
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero`, children: [
|
|
7220
7492
|
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-top`, children: [
|
|
7221
|
-
config.brandName ? /* @__PURE__ */
|
|
7493
|
+
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" }),
|
|
7222
7494
|
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-actions`, children: [
|
|
7223
|
-
avatars.length > 0 ? /* @__PURE__ */
|
|
7224
|
-
/* @__PURE__ */
|
|
7495
|
+
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,
|
|
7496
|
+
/* @__PURE__ */ jsx32(HeaderActions, { panelProps, variant: "plain" })
|
|
7225
7497
|
] })
|
|
7226
7498
|
] }),
|
|
7227
7499
|
config.showGreeting !== false ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
|
|
7228
|
-
/* @__PURE__ */
|
|
7229
|
-
greeting.subtitle ? /* @__PURE__ */
|
|
7500
|
+
/* @__PURE__ */ jsx32("h1", { class: `${p28}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
|
|
7501
|
+
greeting.subtitle ? /* @__PURE__ */ jsx32("p", { class: `${p28}-home-lead`, children: greeting.subtitle }) : null
|
|
7230
7502
|
] }) : null
|
|
7231
7503
|
] }),
|
|
7232
7504
|
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-cards`, children: [
|
|
7233
|
-
config.showSearchBar !== false ? /* @__PURE__ */
|
|
7505
|
+
config.showSearchBar !== false ? /* @__PURE__ */ jsx32(
|
|
7234
7506
|
HomeSearchButton,
|
|
7235
7507
|
{
|
|
7236
7508
|
placeholder: strings.homeSearchPlaceholder,
|
|
7237
7509
|
onActivate: () => nav.switchToLayout("help")
|
|
7238
7510
|
}
|
|
7239
7511
|
) : null,
|
|
7240
|
-
recent ? /* @__PURE__ */
|
|
7241
|
-
/* @__PURE__ */
|
|
7512
|
+
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: [
|
|
7513
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx32(BubblesIcon, {}) }),
|
|
7242
7514
|
/* @__PURE__ */ jsxs26("span", { class: `${p28}-home-recent-body`, children: [
|
|
7243
|
-
/* @__PURE__ */
|
|
7244
|
-
recent.preview ? /* @__PURE__ */
|
|
7515
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-title`, children: recent.title }),
|
|
7516
|
+
recent.preview ? /* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-preview`, children: recent.preview }) : null
|
|
7245
7517
|
] }),
|
|
7246
|
-
|
|
7518
|
+
recent.hasUnread ? /* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-dot`, "aria-label": "Unread" }) : null
|
|
7247
7519
|
] }) }) : null,
|
|
7248
|
-
status ? /* @__PURE__ */
|
|
7520
|
+
status ? /* @__PURE__ */ jsx32(
|
|
7249
7521
|
HomeCard,
|
|
7250
7522
|
{
|
|
7251
7523
|
onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
|
|
7252
7524
|
children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-status`, "data-level": status.level ?? "operational", children: [
|
|
7253
|
-
/* @__PURE__ */
|
|
7254
|
-
/* @__PURE__ */
|
|
7525
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx32(StatusOkIcon, {}) }),
|
|
7526
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-status-text`, children: statusText })
|
|
7255
7527
|
] })
|
|
7256
7528
|
}
|
|
7257
7529
|
) : null,
|
|
7258
7530
|
content.length > 0 ? /* @__PURE__ */ jsxs26("section", { class: `${p28}-home-content`, children: [
|
|
7259
|
-
/* @__PURE__ */
|
|
7260
|
-
/* @__PURE__ */
|
|
7531
|
+
/* @__PURE__ */ jsx32("div", { class: `${p28}-home-content-title`, children: contentTitle }),
|
|
7532
|
+
/* @__PURE__ */ jsx32("div", { class: `${p28}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx32(
|
|
7261
7533
|
ListRow,
|
|
7262
7534
|
{
|
|
7263
7535
|
title: item.title,
|
|
@@ -7273,20 +7545,20 @@ function HomeRoot(props2) {
|
|
|
7273
7545
|
}
|
|
7274
7546
|
var homeLayout = {
|
|
7275
7547
|
Icon: HomeIcon,
|
|
7276
|
-
Root: (props2) => /* @__PURE__ */
|
|
7548
|
+
Root: (props2) => /* @__PURE__ */ jsx32(HomeRoot, { ...props2 })
|
|
7277
7549
|
};
|
|
7278
7550
|
|
|
7279
7551
|
// src/ui/modules/news.tsx
|
|
7280
|
-
import { useEffect as useEffect12, useState as
|
|
7281
|
-
import { jsx as
|
|
7552
|
+
import { useEffect as useEffect12, useState as useState11 } from "preact/hooks";
|
|
7553
|
+
import { jsx as jsx33, jsxs as jsxs27 } from "preact/jsx-runtime";
|
|
7282
7554
|
var p29 = BRAND.cssPrefix;
|
|
7283
7555
|
var log15 = logger.scope("news");
|
|
7284
7556
|
function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7285
7557
|
const tags = config.contentTags;
|
|
7286
|
-
const [state, setState] =
|
|
7287
|
-
const [errorMsg, setErrorMsg] =
|
|
7288
|
-
const [items, setItems] =
|
|
7289
|
-
const [reloadKey, setReloadKey] =
|
|
7558
|
+
const [state, setState] = useState11("loading");
|
|
7559
|
+
const [errorMsg, setErrorMsg] = useState11(strings.errorGeneric);
|
|
7560
|
+
const [items, setItems] = useState11([]);
|
|
7561
|
+
const [reloadKey, setReloadKey] = useState11(0);
|
|
7290
7562
|
useEffect12(() => {
|
|
7291
7563
|
let cancelled = false;
|
|
7292
7564
|
setState("loading");
|
|
@@ -7307,12 +7579,12 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7307
7579
|
};
|
|
7308
7580
|
}, [transport, tags, reloadKey, bus]);
|
|
7309
7581
|
function renderBody() {
|
|
7310
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7582
|
+
if (state === "loading") return /* @__PURE__ */ jsx33(ModuleState, { message: strings.newsLoading, strings });
|
|
7311
7583
|
if (state === "error") {
|
|
7312
|
-
return /* @__PURE__ */
|
|
7584
|
+
return /* @__PURE__ */ jsx33(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7313
7585
|
}
|
|
7314
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7315
|
-
return /* @__PURE__ */
|
|
7586
|
+
if (items.length === 0) return /* @__PURE__ */ jsx33(ModuleState, { message: strings.newsEmpty, strings });
|
|
7587
|
+
return /* @__PURE__ */ jsx33("div", { class: `${p29}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs27(
|
|
7316
7588
|
"button",
|
|
7317
7589
|
{
|
|
7318
7590
|
type: "button",
|
|
@@ -7320,10 +7592,10 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7320
7592
|
onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
|
|
7321
7593
|
"data-testid": tid(TID.newsItem, item.id),
|
|
7322
7594
|
children: [
|
|
7323
|
-
item.image ? /* @__PURE__ */
|
|
7595
|
+
item.image ? /* @__PURE__ */ jsx33("img", { class: `${p29}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
7324
7596
|
/* @__PURE__ */ jsxs27("span", { class: `${p29}-news-body`, children: [
|
|
7325
|
-
/* @__PURE__ */
|
|
7326
|
-
item.description ? /* @__PURE__ */
|
|
7597
|
+
/* @__PURE__ */ jsx33("span", { class: `${p29}-news-title`, children: item.title }),
|
|
7598
|
+
item.description ? /* @__PURE__ */ jsx33("span", { class: `${p29}-news-summary`, children: item.description }) : null
|
|
7327
7599
|
] })
|
|
7328
7600
|
]
|
|
7329
7601
|
},
|
|
@@ -7331,13 +7603,13 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7331
7603
|
)) });
|
|
7332
7604
|
}
|
|
7333
7605
|
return /* @__PURE__ */ jsxs27("div", { class: `${p29}-module`, children: [
|
|
7334
|
-
/* @__PURE__ */
|
|
7335
|
-
/* @__PURE__ */
|
|
7606
|
+
/* @__PURE__ */ jsx33(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx33(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
7607
|
+
/* @__PURE__ */ jsx33("div", { class: `${p29}-module-scroll`, children: renderBody() })
|
|
7336
7608
|
] });
|
|
7337
7609
|
}
|
|
7338
7610
|
var newsLayout = {
|
|
7339
7611
|
Icon: NewsIcon,
|
|
7340
|
-
Root: (props2) => /* @__PURE__ */
|
|
7612
|
+
Root: (props2) => /* @__PURE__ */ jsx33(NewsRoot, { ...props2 })
|
|
7341
7613
|
};
|
|
7342
7614
|
|
|
7343
7615
|
// src/ui/modules/registry.ts
|
|
@@ -7349,13 +7621,13 @@ var LAYOUTS = {
|
|
|
7349
7621
|
};
|
|
7350
7622
|
|
|
7351
7623
|
// src/ui/home-tab-bar.tsx
|
|
7352
|
-
import { jsx as
|
|
7624
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "preact/jsx-runtime";
|
|
7353
7625
|
var p30 = BRAND.cssPrefix;
|
|
7354
|
-
function HomeTabBar({ modules, activeTab, strings,
|
|
7355
|
-
return /* @__PURE__ */
|
|
7626
|
+
function HomeTabBar({ modules, activeTab, strings, hasUnread, onSelect }) {
|
|
7627
|
+
return /* @__PURE__ */ jsx34("nav", { class: `${p30}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
|
|
7356
7628
|
const Icon = LAYOUTS[m.layout].Icon;
|
|
7357
7629
|
const selected = m.id === activeTab;
|
|
7358
|
-
const
|
|
7630
|
+
const showDot = m.layout === "chat" && hasUnread;
|
|
7359
7631
|
return /* @__PURE__ */ jsxs28(
|
|
7360
7632
|
"button",
|
|
7361
7633
|
{
|
|
@@ -7367,10 +7639,10 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
|
7367
7639
|
"data-testid": tid(TID.tab, m.id),
|
|
7368
7640
|
children: [
|
|
7369
7641
|
/* @__PURE__ */ jsxs28("span", { class: `${p30}-tab-icon`, "aria-hidden": "true", children: [
|
|
7370
|
-
/* @__PURE__ */
|
|
7371
|
-
|
|
7642
|
+
/* @__PURE__ */ jsx34(Icon, {}),
|
|
7643
|
+
showDot ? /* @__PURE__ */ jsx34("span", { class: `${p30}-tab-badge`, "data-testid": TID.tabBadge, "aria-label": "Unread" }) : null
|
|
7372
7644
|
] }),
|
|
7373
|
-
/* @__PURE__ */
|
|
7645
|
+
/* @__PURE__ */ jsx34("span", { class: `${p30}-tab-label`, children: localizeText(strings, m.label) })
|
|
7374
7646
|
]
|
|
7375
7647
|
},
|
|
7376
7648
|
m.id
|
|
@@ -7379,12 +7651,12 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
|
7379
7651
|
}
|
|
7380
7652
|
|
|
7381
7653
|
// src/ui/iframe-view.tsx
|
|
7382
|
-
import { jsx as
|
|
7654
|
+
import { jsx as jsx35, jsxs as jsxs29 } from "preact/jsx-runtime";
|
|
7383
7655
|
var p31 = BRAND.cssPrefix;
|
|
7384
7656
|
var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
|
|
7385
7657
|
function IframeView({ url, title, strings, onBack, actions }) {
|
|
7386
7658
|
return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
|
|
7387
|
-
/* @__PURE__ */
|
|
7659
|
+
/* @__PURE__ */ jsx35(
|
|
7388
7660
|
BackHeader,
|
|
7389
7661
|
{
|
|
7390
7662
|
title: title || strings.moduleBack,
|
|
@@ -7393,7 +7665,7 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7393
7665
|
actions
|
|
7394
7666
|
}
|
|
7395
7667
|
),
|
|
7396
|
-
/* @__PURE__ */
|
|
7668
|
+
/* @__PURE__ */ jsx35(
|
|
7397
7669
|
"iframe",
|
|
7398
7670
|
{
|
|
7399
7671
|
class: `${p31}-content-frame`,
|
|
@@ -7409,15 +7681,15 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7409
7681
|
}
|
|
7410
7682
|
|
|
7411
7683
|
// src/ui/content-view.tsx
|
|
7412
|
-
import { useCallback as useCallback3, useEffect as useEffect13, useState as
|
|
7413
|
-
import { jsx as
|
|
7684
|
+
import { useCallback as useCallback3, useEffect as useEffect13, useState as useState12 } from "preact/hooks";
|
|
7685
|
+
import { jsx as jsx36, jsxs as jsxs30 } from "preact/jsx-runtime";
|
|
7414
7686
|
var p32 = BRAND.cssPrefix;
|
|
7415
7687
|
var log16 = logger.scope("content");
|
|
7416
7688
|
var READ_DWELL_MS = 5e3;
|
|
7417
7689
|
function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
7418
|
-
const [item, setItem] =
|
|
7419
|
-
const [failed, setFailed] =
|
|
7420
|
-
const [reloadKey, setReloadKey] =
|
|
7690
|
+
const [item, setItem] = useState12(null);
|
|
7691
|
+
const [failed, setFailed] = useState12(false);
|
|
7692
|
+
const [reloadKey, setReloadKey] = useState12(0);
|
|
7421
7693
|
const retry = useCallback3(() => {
|
|
7422
7694
|
setFailed(false);
|
|
7423
7695
|
setItem(null);
|
|
@@ -7455,16 +7727,16 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7455
7727
|
[bus, id]
|
|
7456
7728
|
);
|
|
7457
7729
|
function renderBody() {
|
|
7458
|
-
if (failed) return /* @__PURE__ */
|
|
7459
|
-
if (item === null) return /* @__PURE__ */
|
|
7730
|
+
if (failed) return /* @__PURE__ */ jsx36(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
|
|
7731
|
+
if (item === null) return /* @__PURE__ */ jsx36(ModuleState, { message: strings.contentLoading, strings });
|
|
7460
7732
|
return /* @__PURE__ */ jsxs30("article", { class: `${p32}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
|
|
7461
|
-
item.image ? /* @__PURE__ */
|
|
7462
|
-
item.description ? /* @__PURE__ */
|
|
7463
|
-
/* @__PURE__ */
|
|
7733
|
+
item.image ? /* @__PURE__ */ jsx36("img", { class: `${p32}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
7734
|
+
item.description ? /* @__PURE__ */ jsx36("p", { class: `${p32}-content-subtitle`, children: item.description }) : null,
|
|
7735
|
+
/* @__PURE__ */ jsx36(StaticMarkdown, { text: item.content ?? "" })
|
|
7464
7736
|
] });
|
|
7465
7737
|
}
|
|
7466
7738
|
return /* @__PURE__ */ jsxs30("div", { class: `${p32}-module`, children: [
|
|
7467
|
-
/* @__PURE__ */
|
|
7739
|
+
/* @__PURE__ */ jsx36(
|
|
7468
7740
|
BackHeader,
|
|
7469
7741
|
{
|
|
7470
7742
|
title: item?.title || title || strings.moduleBack,
|
|
@@ -7474,19 +7746,19 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7474
7746
|
testid: TID.backHeader
|
|
7475
7747
|
}
|
|
7476
7748
|
),
|
|
7477
|
-
/* @__PURE__ */
|
|
7749
|
+
/* @__PURE__ */ jsx36("div", { class: `${p32}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
|
|
7478
7750
|
] });
|
|
7479
7751
|
}
|
|
7480
7752
|
|
|
7481
7753
|
// src/ui/messenger-home.tsx
|
|
7482
|
-
import { jsx as
|
|
7754
|
+
import { jsx as jsx37, jsxs as jsxs31 } from "preact/jsx-runtime";
|
|
7483
7755
|
var p33 = BRAND.cssPrefix;
|
|
7484
7756
|
function MessengerHome({
|
|
7485
7757
|
panelProps,
|
|
7486
7758
|
enabledModules,
|
|
7487
7759
|
nav,
|
|
7488
7760
|
bus,
|
|
7489
|
-
|
|
7761
|
+
hasUnread,
|
|
7490
7762
|
onSelectConversation,
|
|
7491
7763
|
onStartNewConversation,
|
|
7492
7764
|
onSetPanelSize
|
|
@@ -7514,7 +7786,7 @@ function MessengerHome({
|
|
|
7514
7786
|
}, []);
|
|
7515
7787
|
const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
|
|
7516
7788
|
useDragMove(containerRef.current, options.mode === "modal");
|
|
7517
|
-
const navState =
|
|
7789
|
+
const navState = useComputed8(() => nav.sig.value).value;
|
|
7518
7790
|
const top = topScreen(navState);
|
|
7519
7791
|
const activeModule = options.modules.byId[navState.activeTab];
|
|
7520
7792
|
const isReader = top?.kind === "iframe" || top?.kind === "content";
|
|
@@ -7551,12 +7823,12 @@ function MessengerHome({
|
|
|
7551
7823
|
bus,
|
|
7552
7824
|
panelProps
|
|
7553
7825
|
});
|
|
7554
|
-
const plainActions = /* @__PURE__ */
|
|
7826
|
+
const plainActions = /* @__PURE__ */ jsx37(HeaderActions, { panelProps, variant: "plain" });
|
|
7555
7827
|
if (activeModule) visitedRef.current.add(activeModule.id);
|
|
7556
7828
|
const visitedTabs = enabledModules.filter((m) => visitedRef.current.has(m.id));
|
|
7557
7829
|
const tabRoot = (module) => {
|
|
7558
7830
|
if (module.layout === "chat") {
|
|
7559
|
-
return /* @__PURE__ */
|
|
7831
|
+
return /* @__PURE__ */ jsx37(
|
|
7560
7832
|
PanelContent,
|
|
7561
7833
|
{
|
|
7562
7834
|
...panelProps,
|
|
@@ -7567,14 +7839,14 @@ function MessengerHome({
|
|
|
7567
7839
|
);
|
|
7568
7840
|
}
|
|
7569
7841
|
const Root = LAYOUTS[module.layout].Root;
|
|
7570
|
-
return Root ? /* @__PURE__ */
|
|
7842
|
+
return Root ? /* @__PURE__ */ jsx37(Root, { ...screenProps(module) }) : null;
|
|
7571
7843
|
};
|
|
7572
7844
|
const renderReader = () => {
|
|
7573
7845
|
if (top?.kind === "iframe") {
|
|
7574
|
-
return /* @__PURE__ */
|
|
7846
|
+
return /* @__PURE__ */ jsx37(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
|
|
7575
7847
|
}
|
|
7576
7848
|
if (top?.kind === "content") {
|
|
7577
|
-
return /* @__PURE__ */
|
|
7849
|
+
return /* @__PURE__ */ jsx37(
|
|
7578
7850
|
ContentView,
|
|
7579
7851
|
{
|
|
7580
7852
|
id: top.id,
|
|
@@ -7601,21 +7873,21 @@ function MessengerHome({
|
|
|
7601
7873
|
"data-testid": TID.messengerHome,
|
|
7602
7874
|
children: [
|
|
7603
7875
|
/* @__PURE__ */ jsxs31("div", { class: `${p33}-messenger-body`, children: [
|
|
7604
|
-
visitedTabs.map((m) => /* @__PURE__ */
|
|
7876
|
+
visitedTabs.map((m) => /* @__PURE__ */ jsx37("div", { class: `${p33}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
|
|
7605
7877
|
renderReader()
|
|
7606
7878
|
] }),
|
|
7607
|
-
showTabBar ? /* @__PURE__ */
|
|
7879
|
+
showTabBar ? /* @__PURE__ */ jsx37(
|
|
7608
7880
|
HomeTabBar,
|
|
7609
7881
|
{
|
|
7610
7882
|
modules: enabledModules,
|
|
7611
7883
|
activeTab: navState.activeTab,
|
|
7612
7884
|
strings,
|
|
7613
|
-
|
|
7885
|
+
hasUnread,
|
|
7614
7886
|
onSelect: nav.switchTab
|
|
7615
7887
|
}
|
|
7616
7888
|
) : null,
|
|
7617
|
-
/* @__PURE__ */
|
|
7618
|
-
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */
|
|
7889
|
+
/* @__PURE__ */ jsx37(PoweredByBar, { poweredBy: options.poweredBy }),
|
|
7890
|
+
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */ jsx37(
|
|
7619
7891
|
ResizeGrip,
|
|
7620
7892
|
{
|
|
7621
7893
|
panelEl: containerRef.current,
|
|
@@ -7632,7 +7904,7 @@ function MessengerHome({
|
|
|
7632
7904
|
}
|
|
7633
7905
|
|
|
7634
7906
|
// src/ui/modules-empty.tsx
|
|
7635
|
-
import { jsx as
|
|
7907
|
+
import { jsx as jsx38, jsxs as jsxs32 } from "preact/jsx-runtime";
|
|
7636
7908
|
var p34 = BRAND.cssPrefix;
|
|
7637
7909
|
function ModulesEmpty({ strings, onClose }) {
|
|
7638
7910
|
return /* @__PURE__ */ jsxs32(
|
|
@@ -7643,7 +7915,7 @@ function ModulesEmpty({ strings, onClose }) {
|
|
|
7643
7915
|
"aria-label": strings.panelTitle,
|
|
7644
7916
|
"data-testid": TID.modulesEmpty,
|
|
7645
7917
|
children: [
|
|
7646
|
-
onClose ? /* @__PURE__ */
|
|
7918
|
+
onClose ? /* @__PURE__ */ jsx38(
|
|
7647
7919
|
"button",
|
|
7648
7920
|
{
|
|
7649
7921
|
type: "button",
|
|
@@ -7651,21 +7923,21 @@ function ModulesEmpty({ strings, onClose }) {
|
|
|
7651
7923
|
onClick: onClose,
|
|
7652
7924
|
"aria-label": strings.close,
|
|
7653
7925
|
title: strings.close,
|
|
7654
|
-
children: /* @__PURE__ */
|
|
7926
|
+
children: /* @__PURE__ */ jsx38(CloseIcon, {})
|
|
7655
7927
|
}
|
|
7656
7928
|
) : null,
|
|
7657
|
-
/* @__PURE__ */
|
|
7929
|
+
/* @__PURE__ */ jsx38("p", { class: `${p34}-modules-empty-text`, children: strings.modulesEmpty })
|
|
7658
7930
|
]
|
|
7659
7931
|
}
|
|
7660
7932
|
);
|
|
7661
7933
|
}
|
|
7662
7934
|
|
|
7663
7935
|
// src/ui/use-launcher-callout.ts
|
|
7664
|
-
import { useCallback as useCallback5, useEffect as useEffect15, useState as
|
|
7936
|
+
import { useCallback as useCallback5, useEffect as useEffect15, useState as useState13 } from "preact/hooks";
|
|
7665
7937
|
function useLauncherCallout({ callout, persistence }) {
|
|
7666
7938
|
const textKey = callout?.text ?? "";
|
|
7667
7939
|
const persistent = callout?.persistent ?? true;
|
|
7668
|
-
const [dismissed, setDismissed] =
|
|
7940
|
+
const [dismissed, setDismissed] = useState13(() => persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7669
7941
|
useEffect15(() => {
|
|
7670
7942
|
setDismissed(persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7671
7943
|
}, [textKey, persistent, persistence]);
|
|
@@ -7677,7 +7949,7 @@ function useLauncherCallout({ callout, persistence }) {
|
|
|
7677
7949
|
}
|
|
7678
7950
|
|
|
7679
7951
|
// src/ui/app.tsx
|
|
7680
|
-
import { jsx as
|
|
7952
|
+
import { jsx as jsx39, jsxs as jsxs33 } from "preact/jsx-runtime";
|
|
7681
7953
|
var log17 = logger.scope("app");
|
|
7682
7954
|
var p35 = BRAND.cssPrefix;
|
|
7683
7955
|
function makeLocalizedWelcome(w, strings) {
|
|
@@ -7694,21 +7966,21 @@ function isAbortError(error) {
|
|
|
7694
7966
|
return error instanceof DOMException ? error.name === "AbortError" : error?.name === "AbortError";
|
|
7695
7967
|
}
|
|
7696
7968
|
function App({ options, hostElement, bus }) {
|
|
7697
|
-
const [persistence] =
|
|
7969
|
+
const [persistence] = useState14(
|
|
7698
7970
|
() => createPersistence(options.widgetId, options.storage, options.aiAgentDeploymentId)
|
|
7699
7971
|
);
|
|
7700
|
-
const [visitorId, setVisitorId] =
|
|
7972
|
+
const [visitorId, setVisitorId] = useState14(() => persistence.getVisitorId());
|
|
7701
7973
|
const initialSettings = persistence.loadUserPrefs();
|
|
7702
|
-
const [activeLocale, setActiveLocale] =
|
|
7703
|
-
const [activeThemeMode, setActiveThemeMode] =
|
|
7974
|
+
const [activeLocale, setActiveLocale] = useState14(() => initialSettings.locale ?? options.locale);
|
|
7975
|
+
const [activeThemeMode, setActiveThemeMode] = useState14(
|
|
7704
7976
|
() => initialSettings.themeMode ?? options.themeMode
|
|
7705
7977
|
);
|
|
7706
|
-
const [activeTextSize, setActiveTextSize] =
|
|
7978
|
+
const [activeTextSize, setActiveTextSize] = useState14(() => initialSettings.textSize ?? options.textSize);
|
|
7707
7979
|
const conversationIdSig = useSignal(persistence.loadConversationId());
|
|
7708
7980
|
const messagesSig = useSignal([]);
|
|
7709
|
-
const
|
|
7710
|
-
const [loadingMessages, setLoadingMessages] =
|
|
7711
|
-
const [formMarkers, setFormMarkers] =
|
|
7981
|
+
const hasUnreadSig = useSignal(false);
|
|
7982
|
+
const [loadingMessages, setLoadingMessages] = useState14(false);
|
|
7983
|
+
const [formMarkers, setFormMarkers] = useState14([]);
|
|
7712
7984
|
function landingTab() {
|
|
7713
7985
|
const list = options.modules.list;
|
|
7714
7986
|
const ids = new Set(list.map((m) => m.id));
|
|
@@ -7727,15 +7999,15 @@ function App({ options, hostElement, bus }) {
|
|
|
7727
7999
|
const homeNav = homeNavRef.current;
|
|
7728
8000
|
const chatTabIdRef = useRef9(void 0);
|
|
7729
8001
|
chatTabIdRef.current = chatTabId();
|
|
7730
|
-
const [conversationReady, setConversationReady] =
|
|
7731
|
-
const [remoteForms, setRemoteForms] =
|
|
7732
|
-
const [formsReady, setFormsReady] =
|
|
8002
|
+
const [conversationReady, setConversationReady] = useState14(false);
|
|
8003
|
+
const [remoteForms, setRemoteForms] = useState14(null);
|
|
8004
|
+
const [formsReady, setFormsReady] = useState14(false);
|
|
7733
8005
|
const isInlineLike = options.mode === "standalone" || options.mode === "inline";
|
|
7734
8006
|
const initialPanelRef = useRef9(
|
|
7735
8007
|
resolveInitialPanelState(options, currentViewportWidth(), persistence.loadPanelOpen(), persistence.loadPanelSize())
|
|
7736
8008
|
);
|
|
7737
|
-
const [isOpen, setIsOpen] =
|
|
7738
|
-
const [activated, setActivated] =
|
|
8009
|
+
const [isOpen, setIsOpen] = useState14(initialPanelRef.current.panelOpen);
|
|
8010
|
+
const [activated, setActivated] = useState14(initialPanelRef.current.panelOpen);
|
|
7739
8011
|
const activatedRef = useRef9(activated);
|
|
7740
8012
|
activatedRef.current = activated;
|
|
7741
8013
|
const pendingThreadRef = useRef9(false);
|
|
@@ -7744,7 +8016,7 @@ function App({ options, hostElement, bus }) {
|
|
|
7744
8016
|
if (isOpen) setActivated(true);
|
|
7745
8017
|
}, [isOpen]);
|
|
7746
8018
|
const initialPanelApplied = useRef9(false);
|
|
7747
|
-
const [launcherLeaving, setLauncherLeaving] =
|
|
8019
|
+
const [launcherLeaving, setLauncherLeaving] = useState14(false);
|
|
7748
8020
|
const { dismissed: calloutDismissed, dismissCallout: dismissCalloutRaw } = useLauncherCallout({
|
|
7749
8021
|
callout: options.launcher.callout,
|
|
7750
8022
|
persistence
|
|
@@ -7755,21 +8027,21 @@ function App({ options, hostElement, bus }) {
|
|
|
7755
8027
|
bus.emit("calloutDismiss", void 0);
|
|
7756
8028
|
dismissCalloutRaw();
|
|
7757
8029
|
}, [bus, dismissCalloutRaw]);
|
|
7758
|
-
const [panelSize, setPanelSize] =
|
|
8030
|
+
const [panelSize, setPanelSize] = useState14(initialPanelRef.current.panelSize);
|
|
7759
8031
|
const initialSizeApplied = useRef9(false);
|
|
7760
|
-
const [view, setView] =
|
|
7761
|
-
const [canSend, setCanSend] =
|
|
7762
|
-
const [streaming, setStreaming] =
|
|
7763
|
-
const [agent, setAgent] =
|
|
7764
|
-
const [suggestions, setSuggestions] =
|
|
7765
|
-
const [activeCancel, setActiveCancel] =
|
|
7766
|
-
const [activeDetach, setActiveDetach] =
|
|
8032
|
+
const [view, setView] = useState14("chat");
|
|
8033
|
+
const [canSend, setCanSend] = useState14(true);
|
|
8034
|
+
const [streaming, setStreaming] = useState14(false);
|
|
8035
|
+
const [agent, setAgent] = useState14(null);
|
|
8036
|
+
const [suggestions, setSuggestions] = useState14([]);
|
|
8037
|
+
const [activeCancel, setActiveCancel] = useState14(null);
|
|
8038
|
+
const [activeDetach, setActiveDetach] = useState14(null);
|
|
7767
8039
|
const stringsRef = useRef9(options.strings);
|
|
7768
|
-
const [parsedSite, setParsedSite] =
|
|
7769
|
-
const [parsedBlocks, setParsedBlocks] =
|
|
7770
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
7771
|
-
const [formContext, setFormContext] =
|
|
7772
|
-
const [transport] =
|
|
8040
|
+
const [parsedSite, setParsedSite] = useState14(void 0);
|
|
8041
|
+
const [parsedBlocks, setParsedBlocks] = useState14(void 0);
|
|
8042
|
+
const [sidebarCollapsed, setSidebarCollapsed] = useState14(() => persistence.loadSidebarCollapsed() ?? false);
|
|
8043
|
+
const [formContext, setFormContext] = useState14({});
|
|
8044
|
+
const [transport] = useState14(
|
|
7773
8045
|
() => new AgentTransport({
|
|
7774
8046
|
agentApiBaseUrl: options.agentApiBaseUrl,
|
|
7775
8047
|
dataApiBaseUrl: options.dataApiBaseUrl,
|
|
@@ -7781,8 +8053,8 @@ function App({ options, hostElement, bus }) {
|
|
|
7781
8053
|
endpoints: options.endpoints
|
|
7782
8054
|
})
|
|
7783
8055
|
);
|
|
7784
|
-
const [reducer] =
|
|
7785
|
-
const [feedback] =
|
|
8056
|
+
const [reducer] = useState14(() => new StreamReducer(messagesSig));
|
|
8057
|
+
const [feedback] = useState14(() => new FeedbackBus(options.sound, options.haptics));
|
|
7786
8058
|
const patchAndSync = useCallback6(
|
|
7787
8059
|
(patch) => {
|
|
7788
8060
|
persistence.patchUserPrefs(patch);
|
|
@@ -8284,7 +8556,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8284
8556
|
);
|
|
8285
8557
|
const regenerateDanglingTurn = useCallback6(() => {
|
|
8286
8558
|
if (streaming || regenInFlightRef.current || resumeBubbleRef.current) return;
|
|
8287
|
-
const last = messagesSig.value.
|
|
8559
|
+
const last = messagesSig.value.findLast((m) => !m.ephemeral);
|
|
8288
8560
|
if (last?.role !== "user") return;
|
|
8289
8561
|
regenInFlightRef.current = true;
|
|
8290
8562
|
log17.info("regenerating dangling user turn (needs-generation)");
|
|
@@ -8357,6 +8629,20 @@ function App({ options, hostElement, bus }) {
|
|
|
8357
8629
|
},
|
|
8358
8630
|
[streaming, messagesSig]
|
|
8359
8631
|
);
|
|
8632
|
+
const handleMessageFeedback = useCallback6(
|
|
8633
|
+
(messageId, value) => {
|
|
8634
|
+
log17.info("messageFeedback", { messageId, value });
|
|
8635
|
+
bus.emit("messageFeedback", { messageId, value });
|
|
8636
|
+
void transport.submitFeedback({ messageId, value });
|
|
8637
|
+
},
|
|
8638
|
+
[bus, transport]
|
|
8639
|
+
);
|
|
8640
|
+
const handleMessageSeen = useCallback6(
|
|
8641
|
+
(messageId) => {
|
|
8642
|
+
bus.emit("messageSeen", { messageId });
|
|
8643
|
+
},
|
|
8644
|
+
[bus]
|
|
8645
|
+
);
|
|
8360
8646
|
const toolInteraction = useMemo3(
|
|
8361
8647
|
() => ({
|
|
8362
8648
|
humanInLoop: options.features.humanInLoop,
|
|
@@ -8402,12 +8688,12 @@ function App({ options, hostElement, bus }) {
|
|
|
8402
8688
|
void transport.submitForm({ formId: form.id, conversationId: activeConversationId, trigger, values, skipped });
|
|
8403
8689
|
}
|
|
8404
8690
|
});
|
|
8405
|
-
const activeForm =
|
|
8691
|
+
const activeForm = useComputed9(() => forms.activeForm.value);
|
|
8406
8692
|
useEffect16(() => {
|
|
8407
8693
|
forms.refresh();
|
|
8408
8694
|
}, [effectiveForms, forms]);
|
|
8409
8695
|
const pageArea = options.pageContext?.area ? String(options.pageContext.area) : void 0;
|
|
8410
|
-
const msgCount =
|
|
8696
|
+
const msgCount = useComputed9(() => messagesSig.value.length);
|
|
8411
8697
|
useEffect16(() => {
|
|
8412
8698
|
if (conversationReady && formsReady) forms.fire("pre-chat");
|
|
8413
8699
|
}, [conversationReady, formsReady, forms]);
|
|
@@ -8488,15 +8774,23 @@ function App({ options, hostElement, bus }) {
|
|
|
8488
8774
|
const refreshUnread = useCallback6(() => {
|
|
8489
8775
|
if (!options.modules.list.some((m) => m.layout === "chat")) return;
|
|
8490
8776
|
transport.listConversations({ limit: 50 }).then((res) => {
|
|
8491
|
-
|
|
8777
|
+
hasUnreadSig.value = res.conversations.some((c) => c.hasUnread);
|
|
8492
8778
|
}).catch((err) => log17.debug("refreshUnread failed (non-fatal)", { err }));
|
|
8493
|
-
}, [transport, options.modules,
|
|
8779
|
+
}, [transport, options.modules, hasUnreadSig]);
|
|
8494
8780
|
const unreadSeeded = useRef9(false);
|
|
8495
8781
|
useEffect16(() => {
|
|
8496
8782
|
if (!activated || !conversationReady || unreadSeeded.current) return;
|
|
8497
8783
|
unreadSeeded.current = true;
|
|
8498
8784
|
refreshUnread();
|
|
8499
8785
|
}, [activated, conversationReady, refreshUnread]);
|
|
8786
|
+
useEffect16(() => {
|
|
8787
|
+
if (!activated) return;
|
|
8788
|
+
const onVisible = () => {
|
|
8789
|
+
if (document.visibilityState === "visible") refreshUnread();
|
|
8790
|
+
};
|
|
8791
|
+
document.addEventListener("visibilitychange", onVisible);
|
|
8792
|
+
return () => document.removeEventListener("visibilitychange", onVisible);
|
|
8793
|
+
}, [activated, refreshUnread]);
|
|
8500
8794
|
const handleOpen = useCallback6(() => {
|
|
8501
8795
|
log17.info("open", { mode: options.mode });
|
|
8502
8796
|
feedback.unlock();
|
|
@@ -8729,7 +9023,9 @@ function App({ options, hostElement, bus }) {
|
|
|
8729
9023
|
// `openForm()` command, so it bypasses frequency dedupe by design.
|
|
8730
9024
|
onFormFill: (formId) => forms.fire("manual", formId),
|
|
8731
9025
|
tool: toolInteraction,
|
|
8732
|
-
onRetry: handleRetry
|
|
9026
|
+
onRetry: handleRetry,
|
|
9027
|
+
onMessageFeedback: handleMessageFeedback,
|
|
9028
|
+
onMessageSeen: handleMessageSeen
|
|
8733
9029
|
};
|
|
8734
9030
|
const onSelectConversation = (conversationId) => {
|
|
8735
9031
|
void handleSelectHistoryConversation(conversationId);
|
|
@@ -8741,19 +9037,19 @@ function App({ options, hostElement, bus }) {
|
|
|
8741
9037
|
const renderSurface = (size) => {
|
|
8742
9038
|
const closeable = isActionVisible("close", effectiveOptions.mode, size);
|
|
8743
9039
|
if (enabledModules.length === 0) {
|
|
8744
|
-
return /* @__PURE__ */
|
|
9040
|
+
return /* @__PURE__ */ jsx39(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
|
|
8745
9041
|
}
|
|
8746
9042
|
if (enabledModules.length === 1 && enabledModules[0]?.layout === "chat") {
|
|
8747
|
-
return /* @__PURE__ */
|
|
9043
|
+
return /* @__PURE__ */ jsx39(Panel, { ...panelProps, panelSize: size });
|
|
8748
9044
|
}
|
|
8749
|
-
return /* @__PURE__ */
|
|
9045
|
+
return /* @__PURE__ */ jsx39(
|
|
8750
9046
|
MessengerHome,
|
|
8751
9047
|
{
|
|
8752
9048
|
panelProps: { ...panelProps, panelSize: size, onClose: closeable ? handleClose : void 0 },
|
|
8753
9049
|
enabledModules,
|
|
8754
9050
|
nav: homeNav,
|
|
8755
9051
|
bus,
|
|
8756
|
-
|
|
9052
|
+
hasUnread: hasUnreadSig.value,
|
|
8757
9053
|
onSelectConversation,
|
|
8758
9054
|
onStartNewConversation: handleNewChat,
|
|
8759
9055
|
onSetPanelSize: setPanelSize
|
|
@@ -8765,7 +9061,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8765
9061
|
void handleSelectHistoryConversation(chat.conversationId);
|
|
8766
9062
|
};
|
|
8767
9063
|
const conversationsEnabled = enabledModules.some((m) => m.layout === "chat");
|
|
8768
|
-
return /* @__PURE__ */
|
|
9064
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: /* @__PURE__ */ jsx39(
|
|
8769
9065
|
PageShell,
|
|
8770
9066
|
{
|
|
8771
9067
|
site: parsedSite,
|
|
@@ -8786,15 +9082,15 @@ function App({ options, hostElement, bus }) {
|
|
|
8786
9082
|
}
|
|
8787
9083
|
if (isInlineLike) {
|
|
8788
9084
|
const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
|
|
8789
|
-
return /* @__PURE__ */
|
|
9085
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: renderSurface(inlineSize) });
|
|
8790
9086
|
}
|
|
8791
9087
|
const drawerEdgeTab = options.mode === "drawer";
|
|
8792
9088
|
const triggerOwnedByPage = options.mode === "modal";
|
|
8793
9089
|
const launcherVisible = !triggerOwnedByPage && !options.launcher.hidden && (!isOpen || launcherLeaving);
|
|
8794
9090
|
const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
|
|
8795
9091
|
return /* @__PURE__ */ jsxs33("div", { class: `${p35}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
|
|
8796
|
-
isOpen || activated ? /* @__PURE__ */
|
|
8797
|
-
launcherVisible ? /* @__PURE__ */
|
|
9092
|
+
isOpen || activated ? /* @__PURE__ */ jsx39("div", { class: `${p35}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
|
|
9093
|
+
launcherVisible ? /* @__PURE__ */ jsx39(
|
|
8798
9094
|
Launcher,
|
|
8799
9095
|
{
|
|
8800
9096
|
onToggle: handleOpen,
|
|
@@ -8804,7 +9100,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8804
9100
|
edgeTab: drawerEdgeTab
|
|
8805
9101
|
}
|
|
8806
9102
|
) : null,
|
|
8807
|
-
calloutToRender ? /* @__PURE__ */
|
|
9103
|
+
calloutToRender ? /* @__PURE__ */ jsx39(
|
|
8808
9104
|
LauncherCallout,
|
|
8809
9105
|
{
|
|
8810
9106
|
callout: calloutToRender,
|
|
@@ -8880,6 +9176,9 @@ var TRACKED = {
|
|
|
8880
9176
|
formSubmit: (p36) => ({ formId: p36.formId, skipped: p36.skipped }),
|
|
8881
9177
|
toolResult: () => void 0,
|
|
8882
9178
|
toolDecision: (p36) => ({ approved: p36.approved }),
|
|
9179
|
+
// Feedback + read tracking — outcome only; message text never rides.
|
|
9180
|
+
messageFeedback: (p36) => ({ value: p36.value ?? "none" }),
|
|
9181
|
+
messageSeen: () => void 0,
|
|
8883
9182
|
// Content — ids, tags + counts only; titles/bodies never ride.
|
|
8884
9183
|
contentView: (p36) => ({ section: p36.section, tags: p36.tags, count: p36.count }),
|
|
8885
9184
|
contentOpen: (p36) => ({ contentId: p36.contentId, tags: p36.tags }),
|
|
@@ -9105,6 +9404,9 @@ var EVENT_NAMES = [
|
|
|
9105
9404
|
"formSubmit",
|
|
9106
9405
|
"toolResult",
|
|
9107
9406
|
"toolDecision",
|
|
9407
|
+
// Feedback + read tracking
|
|
9408
|
+
"messageFeedback",
|
|
9409
|
+
"messageSeen",
|
|
9108
9410
|
// Content (news / help / home articles)
|
|
9109
9411
|
"contentView",
|
|
9110
9412
|
"contentOpen",
|