@helpai/elements 0.54.3 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configurator.mjs +12 -2
- package/elements-web-component.esm.js +27 -27
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +27 -27
- package/elements.cjs.js.map +4 -4
- package/elements.esm.js +27 -27
- package/elements.esm.js.map +4 -4
- package/elements.js +27 -27
- package/elements.js.map +4 -4
- package/index.d.ts +46 -3
- package/index.mjs +948 -642
- package/package.json +1 -1
- package/schema.d.ts +13 -2
- package/schema.json +54 -6
- package/schema.mjs +13 -2
- package/style.css +1 -1
- package/web-component.mjs +945 -642
package/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";
|
|
@@ -1727,22 +1751,22 @@ function attachAdoptedSheet(shadow, doc) {
|
|
|
1727
1751
|
}
|
|
1728
1752
|
}
|
|
1729
1753
|
function applyThemeOverrides(host, overrides) {
|
|
1730
|
-
const
|
|
1731
|
-
if (overrides.accent) host.style.setProperty(`--${
|
|
1732
|
-
if (overrides.accentText) host.style.setProperty(`--${
|
|
1733
|
-
if (overrides.radius) host.style.setProperty(`--${
|
|
1734
|
-
if (overrides.fontFamily) host.style.setProperty(`--${
|
|
1754
|
+
const p36 = BRAND.cssPrefix;
|
|
1755
|
+
if (overrides.accent) host.style.setProperty(`--${p36}-accent-user`, overrides.accent);
|
|
1756
|
+
if (overrides.accentText) host.style.setProperty(`--${p36}-accent-text-user`, overrides.accentText);
|
|
1757
|
+
if (overrides.radius) host.style.setProperty(`--${p36}-radius`, overrides.radius);
|
|
1758
|
+
if (overrides.fontFamily) host.style.setProperty(`--${p36}-font`, overrides.fontFamily);
|
|
1735
1759
|
}
|
|
1736
1760
|
function applyThemeMode(host, mode) {
|
|
1737
1761
|
host.dataset.theme = mode;
|
|
1738
1762
|
}
|
|
1739
1763
|
function applySize(host, size) {
|
|
1740
|
-
const
|
|
1741
|
-
if (size.width !== void 0) host.style.setProperty(`--${
|
|
1742
|
-
if (size.height !== void 0) host.style.setProperty(`--${
|
|
1743
|
-
if (size.expanded?.width !== void 0) host.style.setProperty(`--${
|
|
1744
|
-
if (size.expanded?.height !== void 0) host.style.setProperty(`--${
|
|
1745
|
-
if (size.inset !== void 0) host.style.setProperty(`--${
|
|
1764
|
+
const p36 = BRAND.cssPrefix;
|
|
1765
|
+
if (size.width !== void 0) host.style.setProperty(`--${p36}-panel-w`, size.width);
|
|
1766
|
+
if (size.height !== void 0) host.style.setProperty(`--${p36}-panel-h`, size.height);
|
|
1767
|
+
if (size.expanded?.width !== void 0) host.style.setProperty(`--${p36}-expanded-w`, size.expanded.width);
|
|
1768
|
+
if (size.expanded?.height !== void 0) host.style.setProperty(`--${p36}-expanded-h`, size.expanded.height);
|
|
1769
|
+
if (size.inset !== void 0) host.style.setProperty(`--${p36}-panel-inset`, size.inset);
|
|
1746
1770
|
}
|
|
1747
1771
|
function applyPosition(host, pos) {
|
|
1748
1772
|
host.dataset.position = pos;
|
|
@@ -1857,7 +1881,7 @@ 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
|
|
1884
|
+
import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as useState14 } from "preact/hooks";
|
|
1861
1885
|
import { batch, useComputed as useComputed9, useSignal } from "@preact/signals";
|
|
1862
1886
|
|
|
1863
1887
|
// src/core/handshake-shape.ts
|
|
@@ -2006,11 +2030,11 @@ function toBase64Url(json) {
|
|
|
2006
2030
|
var nonEmpty = (ctx) => ctx && Object.keys(ctx).length > 0 ? ctx : void 0;
|
|
2007
2031
|
function encodeContext(user, page) {
|
|
2008
2032
|
const u = nonEmpty(user);
|
|
2009
|
-
const
|
|
2010
|
-
if (!u && !
|
|
2033
|
+
const p36 = nonEmpty(page);
|
|
2034
|
+
if (!u && !p36) return void 0;
|
|
2011
2035
|
const envelope = {};
|
|
2012
2036
|
if (u) envelope.user = u;
|
|
2013
|
-
if (
|
|
2037
|
+
if (p36) envelope.page = p36;
|
|
2014
2038
|
return toBase64Url(JSON.stringify(envelope));
|
|
2015
2039
|
}
|
|
2016
2040
|
|
|
@@ -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
|
|
@@ -2110,8 +2143,8 @@ function buildSendMessageRequest(params) {
|
|
|
2110
2143
|
if (tools?.length) body.data = { tools };
|
|
2111
2144
|
return body;
|
|
2112
2145
|
}
|
|
2113
|
-
function isResolvedToolPart(
|
|
2114
|
-
return
|
|
2146
|
+
function isResolvedToolPart(p36) {
|
|
2147
|
+
return p36.state === "output-available" || p36.state === "output-error" || p36.state === "output-denied" || p36.approval?.approved !== void 0;
|
|
2115
2148
|
}
|
|
2116
2149
|
function normalizeToolRef(ref) {
|
|
2117
2150
|
if (typeof ref === "string") return ref ? { code: ref } : null;
|
|
@@ -2119,29 +2152,29 @@ function normalizeToolRef(ref) {
|
|
|
2119
2152
|
}
|
|
2120
2153
|
function messageToWireParts(m) {
|
|
2121
2154
|
const out = [];
|
|
2122
|
-
for (const
|
|
2123
|
-
if (
|
|
2155
|
+
for (const p36 of m.parts) {
|
|
2156
|
+
if (p36.kind === "step-start") {
|
|
2124
2157
|
out.push({ type: "step-start" });
|
|
2125
2158
|
}
|
|
2126
|
-
if (
|
|
2127
|
-
out.push({ type: "reasoning", text:
|
|
2159
|
+
if (p36.kind === "reasoning" && p36.text) {
|
|
2160
|
+
out.push({ type: "reasoning", text: p36.text, state: p36.done ? "done" : "streaming" });
|
|
2128
2161
|
}
|
|
2129
|
-
if (
|
|
2130
|
-
out.push({ text:
|
|
2162
|
+
if (p36.kind === "text" && p36.text) {
|
|
2163
|
+
out.push({ text: p36.text, type: "text" });
|
|
2131
2164
|
}
|
|
2132
|
-
if (
|
|
2133
|
-
out.push({ mediaType:
|
|
2165
|
+
if (p36.kind === "file" && p36.url) {
|
|
2166
|
+
out.push({ mediaType: p36.mediaType, type: "file", url: p36.url });
|
|
2134
2167
|
}
|
|
2135
|
-
if (
|
|
2168
|
+
if (p36.kind === "tool" && isResolvedToolPart(p36)) {
|
|
2136
2169
|
const part = {
|
|
2137
|
-
type: toolPartType(
|
|
2138
|
-
toolCallId:
|
|
2139
|
-
state:
|
|
2170
|
+
type: toolPartType(p36.toolName),
|
|
2171
|
+
toolCallId: p36.toolCallId,
|
|
2172
|
+
state: p36.state
|
|
2140
2173
|
};
|
|
2141
|
-
if (
|
|
2142
|
-
if (
|
|
2143
|
-
if (
|
|
2144
|
-
if (
|
|
2174
|
+
if (p36.input !== void 0) part.input = p36.input;
|
|
2175
|
+
if (p36.output !== void 0) part.output = p36.output;
|
|
2176
|
+
if (p36.error !== void 0) part.errorText = p36.error;
|
|
2177
|
+
if (p36.approval && p36.approval.approved !== void 0) part.approval = p36.approval;
|
|
2145
2178
|
out.push(part);
|
|
2146
2179
|
}
|
|
2147
2180
|
}
|
|
@@ -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
|
}
|
|
@@ -2899,7 +2953,7 @@ function fromWireMessage(w) {
|
|
|
2899
2953
|
};
|
|
2900
2954
|
}
|
|
2901
2955
|
return null;
|
|
2902
|
-
}).filter((
|
|
2956
|
+
}).filter((p36) => p36 !== null);
|
|
2903
2957
|
return {
|
|
2904
2958
|
id: w.id,
|
|
2905
2959
|
role: w.role,
|
|
@@ -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
|
}
|
|
@@ -2953,7 +3009,7 @@ function assistantText(m) {
|
|
|
2953
3009
|
}
|
|
2954
3010
|
function hasNoVisibleAnswer(m) {
|
|
2955
3011
|
if (assistantText(m).trim() !== "") return false;
|
|
2956
|
-
return !m.partsSig.value.some((
|
|
3012
|
+
return !m.partsSig.value.some((p36) => p36.kind === "tool" || p36.kind === "file" || p36.kind === "source");
|
|
2957
3013
|
}
|
|
2958
3014
|
function isEmptyAssistantReply(m) {
|
|
2959
3015
|
return m.role === "assistant" && m.status !== "streaming" && hasNoVisibleAnswer(m);
|
|
@@ -2961,43 +3017,43 @@ function isEmptyAssistantReply(m) {
|
|
|
2961
3017
|
function isHiddenCanceledTurn(m) {
|
|
2962
3018
|
return m.canceled === true && isEmptyAssistantReply(m);
|
|
2963
3019
|
}
|
|
2964
|
-
function partToReactive(
|
|
2965
|
-
if (
|
|
2966
|
-
return { kind:
|
|
3020
|
+
function partToReactive(p36) {
|
|
3021
|
+
if (p36.kind === "text" || p36.kind === "reasoning") {
|
|
3022
|
+
return { kind: p36.kind, id: p36.id, textSig: signal(p36.text), doneSig: signal(p36.done) };
|
|
2967
3023
|
}
|
|
2968
|
-
if (
|
|
3024
|
+
if (p36.kind === "tool") {
|
|
2969
3025
|
return {
|
|
2970
3026
|
kind: "tool",
|
|
2971
|
-
toolCallId:
|
|
2972
|
-
toolName:
|
|
2973
|
-
inputPartialSig: signal(
|
|
2974
|
-
inputSig: signal(
|
|
2975
|
-
outputSig: signal(
|
|
2976
|
-
errorSig: signal(
|
|
2977
|
-
stateSig: signal(
|
|
2978
|
-
approvalSig: signal(
|
|
3027
|
+
toolCallId: p36.toolCallId,
|
|
3028
|
+
toolName: p36.toolName,
|
|
3029
|
+
inputPartialSig: signal(p36.inputPartial),
|
|
3030
|
+
inputSig: signal(p36.input),
|
|
3031
|
+
outputSig: signal(p36.output),
|
|
3032
|
+
errorSig: signal(p36.error),
|
|
3033
|
+
stateSig: signal(p36.state),
|
|
3034
|
+
approvalSig: signal(p36.approval)
|
|
2979
3035
|
};
|
|
2980
3036
|
}
|
|
2981
|
-
return
|
|
3037
|
+
return p36;
|
|
2982
3038
|
}
|
|
2983
|
-
function partFromReactive(
|
|
2984
|
-
if (
|
|
2985
|
-
return { kind:
|
|
3039
|
+
function partFromReactive(p36) {
|
|
3040
|
+
if (p36.kind === "text" || p36.kind === "reasoning") {
|
|
3041
|
+
return { kind: p36.kind, id: p36.id, text: p36.textSig.value, done: p36.doneSig.value };
|
|
2986
3042
|
}
|
|
2987
|
-
if (
|
|
3043
|
+
if (p36.kind === "tool") {
|
|
2988
3044
|
return {
|
|
2989
3045
|
kind: "tool",
|
|
2990
|
-
toolCallId:
|
|
2991
|
-
toolName:
|
|
2992
|
-
inputPartial:
|
|
2993
|
-
input:
|
|
2994
|
-
output:
|
|
2995
|
-
error:
|
|
2996
|
-
state:
|
|
2997
|
-
approval:
|
|
3046
|
+
toolCallId: p36.toolCallId,
|
|
3047
|
+
toolName: p36.toolName,
|
|
3048
|
+
inputPartial: p36.inputPartialSig.value,
|
|
3049
|
+
input: p36.inputSig.value,
|
|
3050
|
+
output: p36.outputSig.value,
|
|
3051
|
+
error: p36.errorSig.value,
|
|
3052
|
+
state: p36.stateSig.value,
|
|
3053
|
+
approval: p36.approvalSig.value
|
|
2998
3054
|
};
|
|
2999
3055
|
}
|
|
3000
|
-
return
|
|
3056
|
+
return p36;
|
|
3001
3057
|
}
|
|
3002
3058
|
|
|
3003
3059
|
// src/stream/reducer.ts
|
|
@@ -3076,8 +3132,8 @@ var StreamReducer = class {
|
|
|
3076
3132
|
this.ensureTextPart(m, "text", chunk.id);
|
|
3077
3133
|
return;
|
|
3078
3134
|
case "text-delta": {
|
|
3079
|
-
const
|
|
3080
|
-
|
|
3135
|
+
const p36 = this.ensureTextPart(m, "text", chunk.id);
|
|
3136
|
+
p36.textSig.value += chunk.delta;
|
|
3081
3137
|
return;
|
|
3082
3138
|
}
|
|
3083
3139
|
case "text-end":
|
|
@@ -3087,8 +3143,8 @@ var StreamReducer = class {
|
|
|
3087
3143
|
this.ensureTextPart(m, "reasoning", chunk.id).doneSig.value = false;
|
|
3088
3144
|
return;
|
|
3089
3145
|
case "reasoning-delta": {
|
|
3090
|
-
const
|
|
3091
|
-
|
|
3146
|
+
const p36 = this.ensureTextPart(m, "reasoning", chunk.id);
|
|
3147
|
+
p36.textSig.value += chunk.delta;
|
|
3092
3148
|
return;
|
|
3093
3149
|
}
|
|
3094
3150
|
case "reasoning-end":
|
|
@@ -3140,7 +3196,7 @@ var StreamReducer = class {
|
|
|
3140
3196
|
}
|
|
3141
3197
|
};
|
|
3142
3198
|
function ensureToolPart(m, toolCallId, toolName2) {
|
|
3143
|
-
const existing = m.partsSig.value.find((
|
|
3199
|
+
const existing = m.partsSig.value.find((p36) => p36.kind === "tool" && p36.toolCallId === toolCallId);
|
|
3144
3200
|
if (existing) return existing;
|
|
3145
3201
|
const part = {
|
|
3146
3202
|
kind: "tool",
|
|
@@ -3160,7 +3216,7 @@ function appendPart(m, part) {
|
|
|
3160
3216
|
m.partsSig.value = [...m.partsSig.value, part];
|
|
3161
3217
|
}
|
|
3162
3218
|
function appendSource(m, source) {
|
|
3163
|
-
if (m.partsSig.value.some((
|
|
3219
|
+
if (m.partsSig.value.some((p36) => p36.kind === "source" && p36.sourceId === source.sourceId)) return;
|
|
3164
3220
|
appendPart(m, source);
|
|
3165
3221
|
}
|
|
3166
3222
|
function applyTool(m, chunk) {
|
|
@@ -3169,37 +3225,37 @@ function applyTool(m, chunk) {
|
|
|
3169
3225
|
ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3170
3226
|
return;
|
|
3171
3227
|
case "tool-input-delta": {
|
|
3172
|
-
const
|
|
3173
|
-
|
|
3228
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3229
|
+
p36.inputPartialSig.value += chunk.inputTextDelta;
|
|
3174
3230
|
return;
|
|
3175
3231
|
}
|
|
3176
3232
|
case "tool-input-available": {
|
|
3177
|
-
const
|
|
3178
|
-
|
|
3179
|
-
|
|
3233
|
+
const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3234
|
+
p36.inputSig.value = chunk.input;
|
|
3235
|
+
p36.stateSig.value = "input-available";
|
|
3180
3236
|
return;
|
|
3181
3237
|
}
|
|
3182
3238
|
case "tool-approval-request": {
|
|
3183
|
-
const
|
|
3184
|
-
|
|
3185
|
-
|
|
3239
|
+
const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3240
|
+
p36.approvalSig.value = { id: chunk.approvalId };
|
|
3241
|
+
p36.stateSig.value = "approval-requested";
|
|
3186
3242
|
return;
|
|
3187
3243
|
}
|
|
3188
3244
|
case "tool-output-available": {
|
|
3189
|
-
const
|
|
3190
|
-
|
|
3191
|
-
|
|
3245
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3246
|
+
p36.outputSig.value = chunk.output;
|
|
3247
|
+
p36.stateSig.value = "output-available";
|
|
3192
3248
|
return;
|
|
3193
3249
|
}
|
|
3194
3250
|
case "tool-output-error": {
|
|
3195
|
-
const
|
|
3196
|
-
|
|
3197
|
-
|
|
3251
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3252
|
+
p36.errorSig.value = chunk.errorText;
|
|
3253
|
+
p36.stateSig.value = "output-error";
|
|
3198
3254
|
return;
|
|
3199
3255
|
}
|
|
3200
3256
|
case "tool-output-denied": {
|
|
3201
|
-
const
|
|
3202
|
-
|
|
3257
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3258
|
+
p36.stateSig.value = "output-denied";
|
|
3203
3259
|
return;
|
|
3204
3260
|
}
|
|
3205
3261
|
default:
|
|
@@ -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`,
|
|
@@ -3911,24 +3981,24 @@ import { useCallback as useCallback2, useEffect as useEffect9, useRef as useRef6
|
|
|
3911
3981
|
import { useEffect as useEffect2, useRef } from "preact/hooks";
|
|
3912
3982
|
import { jsx as jsx3 } from "preact/jsx-runtime";
|
|
3913
3983
|
function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, strings }) {
|
|
3914
|
-
const
|
|
3984
|
+
const p36 = BRAND.cssPrefix;
|
|
3915
3985
|
const dragRef = useRef(null);
|
|
3916
3986
|
useEffect2(() => {
|
|
3917
3987
|
if (!panelEl) return;
|
|
3918
3988
|
const style = panelEl.style;
|
|
3919
|
-
if (resize.minWidth) style.setProperty(`--${
|
|
3920
|
-
if (resize.maxWidth) style.setProperty(`--${
|
|
3921
|
-
if (resize.minHeight) style.setProperty(`--${
|
|
3922
|
-
if (resize.maxHeight) style.setProperty(`--${
|
|
3989
|
+
if (resize.minWidth) style.setProperty(`--${p36}-resize-min-w`, resize.minWidth);
|
|
3990
|
+
if (resize.maxWidth) style.setProperty(`--${p36}-resize-max-w`, resize.maxWidth);
|
|
3991
|
+
if (resize.minHeight) style.setProperty(`--${p36}-resize-min-h`, resize.minHeight);
|
|
3992
|
+
if (resize.maxHeight) style.setProperty(`--${p36}-resize-max-h`, resize.maxHeight);
|
|
3923
3993
|
if (initialSize) {
|
|
3924
|
-
style.setProperty(`--${
|
|
3925
|
-
style.setProperty(`--${
|
|
3994
|
+
style.setProperty(`--${p36}-widget-w`, `${initialSize.width}px`);
|
|
3995
|
+
style.setProperty(`--${p36}-widget-h`, `${initialSize.height}px`);
|
|
3926
3996
|
}
|
|
3927
|
-
}, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight,
|
|
3997
|
+
}, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p36, initialSize]);
|
|
3928
3998
|
if (!panelEl) return null;
|
|
3929
3999
|
const isTop = position.startsWith("top-");
|
|
3930
4000
|
const isRight = position.endsWith("-right");
|
|
3931
|
-
const cornerClass = `${
|
|
4001
|
+
const cornerClass = `${p36}-resize-grip ${p36}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
|
|
3932
4002
|
const onPointerDown = (e) => {
|
|
3933
4003
|
if (!panelEl) return;
|
|
3934
4004
|
const target = e.currentTarget;
|
|
@@ -3953,8 +4023,8 @@ function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, stri
|
|
|
3953
4023
|
if (!d || e.pointerId !== d.pointerId || !panelEl) return;
|
|
3954
4024
|
const dx = (e.clientX - d.startX) * d.dirX;
|
|
3955
4025
|
const dy = (e.clientY - d.startY) * d.dirY;
|
|
3956
|
-
panelEl.style.setProperty(`--${
|
|
3957
|
-
panelEl.style.setProperty(`--${
|
|
4026
|
+
panelEl.style.setProperty(`--${p36}-widget-w`, `${d.startW + dx}px`);
|
|
4027
|
+
panelEl.style.setProperty(`--${p36}-widget-h`, `${d.startH + dy}px`);
|
|
3958
4028
|
};
|
|
3959
4029
|
const onPointerUp = (e) => {
|
|
3960
4030
|
const d = dragRef.current;
|
|
@@ -4691,7 +4761,7 @@ function usePopoverMenu({ itemCount, initialFocusIndex }) {
|
|
|
4691
4761
|
// src/ui/overflow-menu.tsx
|
|
4692
4762
|
import { jsx as jsx8, jsxs as jsxs6 } from "preact/jsx-runtime";
|
|
4693
4763
|
function OverflowMenu({ items, triggerLabel }) {
|
|
4694
|
-
const
|
|
4764
|
+
const p36 = BRAND.cssPrefix;
|
|
4695
4765
|
const menu = usePopoverMenu({ itemCount: items.length });
|
|
4696
4766
|
const handleSelect = (item) => {
|
|
4697
4767
|
if (item.disabled) return;
|
|
@@ -4714,13 +4784,13 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4714
4784
|
e.stopPropagation();
|
|
4715
4785
|
pickSegment(item, segs[next].value);
|
|
4716
4786
|
};
|
|
4717
|
-
return /* @__PURE__ */ jsxs6("div", { class: `${
|
|
4787
|
+
return /* @__PURE__ */ jsxs6("div", { class: `${p36}-menu-wrap`, children: [
|
|
4718
4788
|
/* @__PURE__ */ jsx8(
|
|
4719
4789
|
"button",
|
|
4720
4790
|
{
|
|
4721
4791
|
ref: menu.triggerRef,
|
|
4722
4792
|
type: "button",
|
|
4723
|
-
class: `${
|
|
4793
|
+
class: `${p36}-icon-btn`,
|
|
4724
4794
|
"aria-label": triggerLabel,
|
|
4725
4795
|
"aria-haspopup": "menu",
|
|
4726
4796
|
"aria-expanded": menu.open,
|
|
@@ -4734,7 +4804,7 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4734
4804
|
"div",
|
|
4735
4805
|
{
|
|
4736
4806
|
ref: menu.menuRef,
|
|
4737
|
-
class: `${
|
|
4807
|
+
class: `${p36}-menu`,
|
|
4738
4808
|
role: "menu",
|
|
4739
4809
|
"aria-label": triggerLabel,
|
|
4740
4810
|
onKeyDown: menu.onMenuKey,
|
|
@@ -4744,14 +4814,14 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4744
4814
|
"div",
|
|
4745
4815
|
{
|
|
4746
4816
|
role: "menuitem",
|
|
4747
|
-
class: `${
|
|
4817
|
+
class: `${p36}-menu-item ${p36}-menu-item-segmented`,
|
|
4748
4818
|
"aria-label": item.label,
|
|
4749
4819
|
tabIndex: -1,
|
|
4750
4820
|
onKeyDown: (e) => onSegmentRowKey(e, item),
|
|
4751
4821
|
children: [
|
|
4752
|
-
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4753
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4754
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4822
|
+
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
|
|
4823
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
|
|
4824
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
|
|
4755
4825
|
const active = seg.value === item.value;
|
|
4756
4826
|
return /* @__PURE__ */ jsx8(
|
|
4757
4827
|
"button",
|
|
@@ -4759,7 +4829,7 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4759
4829
|
type: "button",
|
|
4760
4830
|
role: "menuitemradio",
|
|
4761
4831
|
"aria-checked": active,
|
|
4762
|
-
class: `${
|
|
4832
|
+
class: `${p36}-segment`,
|
|
4763
4833
|
"data-on": active ? "true" : void 0,
|
|
4764
4834
|
lang: seg.lang,
|
|
4765
4835
|
title: seg.value,
|
|
@@ -4779,14 +4849,14 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4779
4849
|
{
|
|
4780
4850
|
type: "button",
|
|
4781
4851
|
role: "menuitem",
|
|
4782
|
-
class: `${
|
|
4852
|
+
class: `${p36}-menu-item`,
|
|
4783
4853
|
"aria-pressed": item.type === "switch" ? item.on : void 0,
|
|
4784
4854
|
disabled: item.disabled,
|
|
4785
4855
|
onClick: () => handleSelect(item),
|
|
4786
4856
|
children: [
|
|
4787
|
-
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4788
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4789
|
-
item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4857
|
+
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
|
|
4858
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
|
|
4859
|
+
item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
|
|
4790
4860
|
]
|
|
4791
4861
|
},
|
|
4792
4862
|
item.id
|
|
@@ -4937,7 +5007,7 @@ 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
|
|
5010
|
+
import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState7 } from "preact/hooks";
|
|
4941
5011
|
import { useComputed as useComputed7 } from "@preact/signals";
|
|
4942
5012
|
|
|
4943
5013
|
// src/ui/form/dynamic-form.tsx
|
|
@@ -5414,20 +5484,64 @@ 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
|
|
|
@@ -5436,8 +5550,8 @@ import { useComputed as useComputed3 } from "@preact/signals";
|
|
|
5436
5550
|
|
|
5437
5551
|
// src/ui/tool-card.tsx
|
|
5438
5552
|
import { useComputed as useComputed2 } from "@preact/signals";
|
|
5439
|
-
import { Fragment as Fragment2, jsx as
|
|
5440
|
-
var
|
|
5553
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
|
|
5554
|
+
var p14 = BRAND.cssPrefix;
|
|
5441
5555
|
function toolName(raw) {
|
|
5442
5556
|
if (raw.startsWith("tool:")) return raw.slice(5);
|
|
5443
5557
|
if (raw.startsWith("tool-")) return raw.slice(5);
|
|
@@ -5457,9 +5571,9 @@ function statusOf(state, approval) {
|
|
|
5457
5571
|
return "running";
|
|
5458
5572
|
}
|
|
5459
5573
|
function StatusIcon({ status }) {
|
|
5460
|
-
if (status === "denied" || status === "error" || status === "superseded") return /* @__PURE__ */
|
|
5461
|
-
if (status === "completed" || status === "responded") return /* @__PURE__ */
|
|
5462
|
-
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, {});
|
|
5463
5577
|
}
|
|
5464
5578
|
function statusLabel(status, strings) {
|
|
5465
5579
|
switch (status) {
|
|
@@ -5487,8 +5601,8 @@ function ToolStatus({
|
|
|
5487
5601
|
}) {
|
|
5488
5602
|
const base = statusOf(state, approval);
|
|
5489
5603
|
const status = superseded && (base === "awaiting" || base === "running") ? "superseded" : base;
|
|
5490
|
-
return /* @__PURE__ */
|
|
5491
|
-
/* @__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 }) }),
|
|
5492
5606
|
statusLabel(status, strings)
|
|
5493
5607
|
] });
|
|
5494
5608
|
}
|
|
@@ -5499,11 +5613,11 @@ function ToolHeaderRow({
|
|
|
5499
5613
|
strings,
|
|
5500
5614
|
superseded
|
|
5501
5615
|
}) {
|
|
5502
|
-
return /* @__PURE__ */
|
|
5503
|
-
/* @__PURE__ */
|
|
5504
|
-
/* @__PURE__ */
|
|
5505
|
-
/* @__PURE__ */
|
|
5506
|
-
/* @__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, {}) })
|
|
5507
5621
|
] });
|
|
5508
5622
|
}
|
|
5509
5623
|
function ToolCollapsibleCard({
|
|
@@ -5517,8 +5631,8 @@ function ToolCollapsibleCard({
|
|
|
5517
5631
|
const error = useComputed2(() => part.errorSig.value);
|
|
5518
5632
|
const state = useComputed2(() => part.stateSig.value);
|
|
5519
5633
|
const approval = useComputed2(() => part.approvalSig.value);
|
|
5520
|
-
return /* @__PURE__ */
|
|
5521
|
-
/* @__PURE__ */
|
|
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(
|
|
5522
5636
|
ToolHeaderRow,
|
|
5523
5637
|
{
|
|
5524
5638
|
name: toolName(part.toolName),
|
|
@@ -5528,17 +5642,17 @@ function ToolCollapsibleCard({
|
|
|
5528
5642
|
superseded
|
|
5529
5643
|
}
|
|
5530
5644
|
) }),
|
|
5531
|
-
/* @__PURE__ */
|
|
5532
|
-
output.value !== void 0 ? /* @__PURE__ */
|
|
5533
|
-
error.value ? /* @__PURE__ */
|
|
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
|
|
5534
5648
|
] });
|
|
5535
5649
|
}
|
|
5536
5650
|
function ToolSection({ label, value, error }) {
|
|
5537
5651
|
const text = error ? String(value ?? "") : pretty(unwrapResult(value));
|
|
5538
5652
|
if (!text) return null;
|
|
5539
|
-
return /* @__PURE__ */
|
|
5540
|
-
/* @__PURE__ */
|
|
5541
|
-
/* @__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 })
|
|
5542
5656
|
] });
|
|
5543
5657
|
}
|
|
5544
5658
|
function unwrapResult(output) {
|
|
@@ -5560,8 +5674,8 @@ function pretty(value) {
|
|
|
5560
5674
|
}
|
|
5561
5675
|
|
|
5562
5676
|
// src/ui/tool-approval.tsx
|
|
5563
|
-
import { Fragment as Fragment3, jsx as
|
|
5564
|
-
var
|
|
5677
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
|
|
5678
|
+
var p15 = BRAND.cssPrefix;
|
|
5565
5679
|
function ToolApproval({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5566
5680
|
const approval = useComputed3(() => part.approvalSig.value);
|
|
5567
5681
|
const state = useComputed3(() => part.stateSig.value);
|
|
@@ -5571,50 +5685,50 @@ function ToolApproval({ part, strings, active, superseded = false, onDecision, o
|
|
|
5571
5685
|
const editable = responded && active && !terminal;
|
|
5572
5686
|
const skipped = superseded && !decided;
|
|
5573
5687
|
const id = part.toolCallId;
|
|
5574
|
-
return /* @__PURE__ */
|
|
5575
|
-
/* @__PURE__ */
|
|
5576
|
-
skipped || terminal ? null : /* @__PURE__ */
|
|
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: [
|
|
5577
5691
|
responded ? (
|
|
5578
5692
|
// DECIDED — lead with the recorded response (no repeated prompt/body), so the card barely
|
|
5579
5693
|
// changes height from the awaiting state and the Edit sits right under the edit hint.
|
|
5580
|
-
/* @__PURE__ */
|
|
5581
|
-
/* @__PURE__ */
|
|
5694
|
+
/* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
5695
|
+
/* @__PURE__ */ jsxs13("p", { class: `${p15}-toolui-prompt`, children: [
|
|
5582
5696
|
strings.approvalYourResponse.replace("{decision}", approved ? strings.approve : strings.reject),
|
|
5583
5697
|
approval.value?.reason ? ` \u2014 ${approval.value.reason}` : ""
|
|
5584
5698
|
] }),
|
|
5585
|
-
editable ? /* @__PURE__ */
|
|
5586
|
-
!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
|
|
5587
5701
|
] })
|
|
5588
5702
|
) : (
|
|
5589
5703
|
// AWAITING — the prompt + what to do, then Reject / Approve.
|
|
5590
|
-
/* @__PURE__ */
|
|
5591
|
-
/* @__PURE__ */
|
|
5592
|
-
/* @__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 })
|
|
5593
5707
|
] })
|
|
5594
5708
|
),
|
|
5595
|
-
!decided && active ? /* @__PURE__ */
|
|
5596
|
-
/* @__PURE__ */
|
|
5709
|
+
!decided && active ? /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui-actions`, children: [
|
|
5710
|
+
/* @__PURE__ */ jsx16(
|
|
5597
5711
|
"button",
|
|
5598
5712
|
{
|
|
5599
5713
|
type: "button",
|
|
5600
|
-
class: `${
|
|
5714
|
+
class: `${p15}-form-skip`,
|
|
5601
5715
|
onClick: () => onDecision(id, false),
|
|
5602
5716
|
"data-testid": TID.toolReject,
|
|
5603
5717
|
children: strings.reject
|
|
5604
5718
|
}
|
|
5605
5719
|
),
|
|
5606
|
-
/* @__PURE__ */
|
|
5720
|
+
/* @__PURE__ */ jsx16(
|
|
5607
5721
|
"button",
|
|
5608
5722
|
{
|
|
5609
5723
|
type: "button",
|
|
5610
|
-
class: `${
|
|
5724
|
+
class: `${p15}-form-submit`,
|
|
5611
5725
|
onClick: () => onDecision(id, true),
|
|
5612
5726
|
"data-testid": TID.toolApprove,
|
|
5613
5727
|
children: strings.approve
|
|
5614
5728
|
}
|
|
5615
5729
|
)
|
|
5616
5730
|
] }) : null,
|
|
5617
|
-
editable ? /* @__PURE__ */
|
|
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
|
|
5618
5732
|
] })
|
|
5619
5733
|
] });
|
|
5620
5734
|
}
|
|
@@ -5689,8 +5803,8 @@ function str(v) {
|
|
|
5689
5803
|
}
|
|
5690
5804
|
|
|
5691
5805
|
// src/ui/tool-ask-questions.tsx
|
|
5692
|
-
import { Fragment as Fragment4, jsx as
|
|
5693
|
-
var
|
|
5806
|
+
import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
|
|
5807
|
+
var p16 = BRAND.cssPrefix;
|
|
5694
5808
|
function ToolAskQuestions({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5695
5809
|
const state = useComputed4(() => part.stateSig.value);
|
|
5696
5810
|
const approval = useComputed4(() => part.approvalSig.value);
|
|
@@ -5699,16 +5813,16 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5699
5813
|
const req = request.value;
|
|
5700
5814
|
if (decided) {
|
|
5701
5815
|
const editable = responded && active && !terminal;
|
|
5702
|
-
return /* @__PURE__ */
|
|
5816
|
+
return /* @__PURE__ */ jsx17(DecidedCard, { part, strings, req, editable, onEdit: () => onEdit(part.toolCallId) });
|
|
5703
5817
|
}
|
|
5704
5818
|
const stale = superseded;
|
|
5705
|
-
return /* @__PURE__ */
|
|
5706
|
-
/* @__PURE__ */
|
|
5707
|
-
/* @__PURE__ */
|
|
5708
|
-
/* @__PURE__ */
|
|
5709
|
-
] }) : /* @__PURE__ */
|
|
5710
|
-
req.intro ? /* @__PURE__ */
|
|
5711
|
-
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(
|
|
5712
5826
|
AskBody,
|
|
5713
5827
|
{
|
|
5714
5828
|
req,
|
|
@@ -5725,7 +5839,7 @@ function AskBody({
|
|
|
5725
5839
|
}) {
|
|
5726
5840
|
const fields = askQuestionsToFields(req, strings.confirmYes, strings.confirmNo);
|
|
5727
5841
|
const loneTextarea = req.questions.length === 1 && req.questions[0]?.type === "text";
|
|
5728
|
-
return /* @__PURE__ */
|
|
5842
|
+
return /* @__PURE__ */ jsx17(
|
|
5729
5843
|
DynamicForm,
|
|
5730
5844
|
{
|
|
5731
5845
|
fields,
|
|
@@ -5760,20 +5874,20 @@ function DecidedCard({
|
|
|
5760
5874
|
const approval = useComputed4(() => part.approvalSig.value);
|
|
5761
5875
|
const skipped = approval.value?.approved === false;
|
|
5762
5876
|
const answers = approval.value?.approved ? parseAnswers(approval.value.reason) : {};
|
|
5763
|
-
return /* @__PURE__ */
|
|
5764
|
-
/* @__PURE__ */
|
|
5765
|
-
/* @__PURE__ */
|
|
5766
|
-
/* @__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 })
|
|
5767
5881
|
] }),
|
|
5768
|
-
req.intro ? /* @__PURE__ */
|
|
5882
|
+
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5769
5883
|
req.questions.map((q) => {
|
|
5770
5884
|
const text = skipped ? "" : answers[q.key] ?? "";
|
|
5771
|
-
return /* @__PURE__ */
|
|
5772
|
-
/* @__PURE__ */
|
|
5773
|
-
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
|
|
5774
5888
|
] }, q.key);
|
|
5775
5889
|
}),
|
|
5776
|
-
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
|
|
5777
5891
|
] });
|
|
5778
5892
|
}
|
|
5779
5893
|
function parseAnswers(reason) {
|
|
@@ -5799,19 +5913,19 @@ function parseAnswers(reason) {
|
|
|
5799
5913
|
|
|
5800
5914
|
// src/ui/tool-call.tsx
|
|
5801
5915
|
import { useComputed as useComputed5 } from "@preact/signals";
|
|
5802
|
-
import { jsx as
|
|
5916
|
+
import { jsx as jsx18 } from "preact/jsx-runtime";
|
|
5803
5917
|
function ToolCall({ part, strings }) {
|
|
5804
5918
|
const input = useComputed5(() => part.inputSig.value);
|
|
5805
5919
|
const output = useComputed5(() => part.outputSig.value);
|
|
5806
5920
|
const error = useComputed5(() => part.errorSig.value);
|
|
5807
5921
|
const hasDetails = useComputed5(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
|
|
5808
5922
|
if (!hasDetails.value) return null;
|
|
5809
|
-
return /* @__PURE__ */
|
|
5923
|
+
return /* @__PURE__ */ jsx18(ToolCollapsibleCard, { part, strings, testid: TID.toolCall });
|
|
5810
5924
|
}
|
|
5811
5925
|
|
|
5812
5926
|
// src/ui/message-bubble.tsx
|
|
5813
|
-
import { jsx as
|
|
5814
|
-
var
|
|
5927
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "preact/jsx-runtime";
|
|
5928
|
+
var p17 = BRAND.cssPrefix;
|
|
5815
5929
|
function MessageBubble({
|
|
5816
5930
|
message,
|
|
5817
5931
|
strings,
|
|
@@ -5822,7 +5936,9 @@ function MessageBubble({
|
|
|
5822
5936
|
interactive = false,
|
|
5823
5937
|
superseded = false,
|
|
5824
5938
|
tool,
|
|
5825
|
-
onRetry
|
|
5939
|
+
onRetry,
|
|
5940
|
+
enableMessageFeedback = false,
|
|
5941
|
+
onFeedback
|
|
5826
5942
|
}) {
|
|
5827
5943
|
const parts = useComputed6(() => message.partsSig.value);
|
|
5828
5944
|
const partList = parts.value;
|
|
@@ -5849,31 +5965,50 @@ function MessageBubble({
|
|
|
5849
5965
|
const showStreamDots = streaming && !bufferedHold && !(reasoningVisible.value && working);
|
|
5850
5966
|
if (hideCanceledHusk.value) return null;
|
|
5851
5967
|
const stamp = formatStamp(message.createdAt);
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
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
|
+
);
|
|
5877
6012
|
}
|
|
5878
6013
|
function formatStamp(createdAt) {
|
|
5879
6014
|
if (typeof createdAt !== "number" || !Number.isFinite(createdAt)) return null;
|
|
@@ -5903,11 +6038,11 @@ function PartView({
|
|
|
5903
6038
|
case "step-start":
|
|
5904
6039
|
return null;
|
|
5905
6040
|
case "text":
|
|
5906
|
-
return /* @__PURE__ */
|
|
6041
|
+
return /* @__PURE__ */ jsx19(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig });
|
|
5907
6042
|
case "reasoning":
|
|
5908
|
-
return showReasoning ? /* @__PURE__ */
|
|
6043
|
+
return showReasoning ? /* @__PURE__ */ jsx19(ReasoningView, { part, active, strings }) : null;
|
|
5909
6044
|
case "tool":
|
|
5910
|
-
return /* @__PURE__ */
|
|
6045
|
+
return /* @__PURE__ */ jsx19(
|
|
5911
6046
|
ToolPartView,
|
|
5912
6047
|
{
|
|
5913
6048
|
part,
|
|
@@ -5920,11 +6055,11 @@ function PartView({
|
|
|
5920
6055
|
);
|
|
5921
6056
|
case "file":
|
|
5922
6057
|
if (part.mediaType.startsWith("image/")) {
|
|
5923
|
-
return /* @__PURE__ */
|
|
6058
|
+
return /* @__PURE__ */ jsx19("img", { src: part.url, alt: "", loading: "lazy" });
|
|
5924
6059
|
}
|
|
5925
|
-
return /* @__PURE__ */
|
|
6060
|
+
return /* @__PURE__ */ jsx19("a", { href: part.url, target: "_blank", rel: "noreferrer noopener", children: part.url });
|
|
5926
6061
|
case "source":
|
|
5927
|
-
return showSources ? /* @__PURE__ */
|
|
6062
|
+
return showSources ? /* @__PURE__ */ jsx19(SourceView, { part, strings }) : null;
|
|
5928
6063
|
}
|
|
5929
6064
|
}
|
|
5930
6065
|
function ToolPartView({
|
|
@@ -5938,7 +6073,7 @@ function ToolPartView({
|
|
|
5938
6073
|
const hasApproval = useComputed6(() => part.approvalSig.value !== void 0);
|
|
5939
6074
|
if (tool?.humanInLoop) {
|
|
5940
6075
|
if (isAskUserQuestionsTool(part.toolName)) {
|
|
5941
|
-
return /* @__PURE__ */
|
|
6076
|
+
return /* @__PURE__ */ jsx19(
|
|
5942
6077
|
ToolAskQuestions,
|
|
5943
6078
|
{
|
|
5944
6079
|
part,
|
|
@@ -5951,7 +6086,7 @@ function ToolPartView({
|
|
|
5951
6086
|
);
|
|
5952
6087
|
}
|
|
5953
6088
|
if (hasApproval.value) {
|
|
5954
|
-
return /* @__PURE__ */
|
|
6089
|
+
return /* @__PURE__ */ jsx19(
|
|
5955
6090
|
ToolApproval,
|
|
5956
6091
|
{
|
|
5957
6092
|
part,
|
|
@@ -5964,16 +6099,16 @@ function ToolPartView({
|
|
|
5964
6099
|
);
|
|
5965
6100
|
}
|
|
5966
6101
|
}
|
|
5967
|
-
return showToolCalls ? /* @__PURE__ */
|
|
6102
|
+
return showToolCalls ? /* @__PURE__ */ jsx19(ToolCall, { part, strings }) : null;
|
|
5968
6103
|
}
|
|
5969
6104
|
function ReasoningView({
|
|
5970
6105
|
part,
|
|
5971
6106
|
active,
|
|
5972
6107
|
strings
|
|
5973
6108
|
}) {
|
|
5974
|
-
return /* @__PURE__ */
|
|
5975
|
-
/* @__PURE__ */
|
|
5976
|
-
/* @__PURE__ */
|
|
6109
|
+
return /* @__PURE__ */ jsxs15("details", { class: `${p17}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
|
|
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 }) })
|
|
5977
6112
|
] });
|
|
5978
6113
|
}
|
|
5979
6114
|
function partKey(part) {
|
|
@@ -5991,24 +6126,26 @@ function partKey(part) {
|
|
|
5991
6126
|
}
|
|
5992
6127
|
}
|
|
5993
6128
|
function TypingDots() {
|
|
5994
|
-
return /* @__PURE__ */
|
|
5995
|
-
/* @__PURE__ */
|
|
5996
|
-
/* @__PURE__ */
|
|
5997
|
-
/* @__PURE__ */
|
|
6129
|
+
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-typing`, "aria-hidden": "true", children: [
|
|
6130
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6131
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6132
|
+
/* @__PURE__ */ jsx19("span", {})
|
|
5998
6133
|
] });
|
|
5999
6134
|
}
|
|
6000
6135
|
function LoadingSpinner({ label }) {
|
|
6001
|
-
return /* @__PURE__ */
|
|
6002
|
-
/* @__PURE__ */
|
|
6003
|
-
/* @__PURE__ */
|
|
6136
|
+
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-loading`, role: "status", children: [
|
|
6137
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-spinner`, "aria-hidden": "true" }),
|
|
6138
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-label`, children: label })
|
|
6004
6139
|
] });
|
|
6005
6140
|
}
|
|
6006
6141
|
|
|
6007
6142
|
// src/ui/message-list.tsx
|
|
6008
|
-
import { jsx as
|
|
6009
|
-
var
|
|
6143
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "preact/jsx-runtime";
|
|
6144
|
+
var p18 = BRAND.cssPrefix;
|
|
6010
6145
|
var STICK_THRESHOLD = 120;
|
|
6011
6146
|
var INTERACTION_GRACE_MS = 350;
|
|
6147
|
+
var TURN_TOP_PAD = 12;
|
|
6148
|
+
var TURN_GAP = 8;
|
|
6012
6149
|
function MessageList({
|
|
6013
6150
|
messagesSig,
|
|
6014
6151
|
strings,
|
|
@@ -6016,6 +6153,11 @@ function MessageList({
|
|
|
6016
6153
|
showReasoning,
|
|
6017
6154
|
showToolCalls,
|
|
6018
6155
|
showSources,
|
|
6156
|
+
scrollFade,
|
|
6157
|
+
scrollAnchor,
|
|
6158
|
+
enableMessageFeedback,
|
|
6159
|
+
onFeedback,
|
|
6160
|
+
onMessageSeen,
|
|
6019
6161
|
loading,
|
|
6020
6162
|
idle,
|
|
6021
6163
|
tool,
|
|
@@ -6026,16 +6168,39 @@ function MessageList({
|
|
|
6026
6168
|
}) {
|
|
6027
6169
|
const ref = useRef5(null);
|
|
6028
6170
|
const messages = useComputed7(() => messagesSig.value);
|
|
6029
|
-
const [showJump, setShowJump] =
|
|
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);
|
|
6030
6176
|
const hasHydratedRef = useRef5(false);
|
|
6031
6177
|
const detachedRef = useRef5(false);
|
|
6032
6178
|
const interactingRef = useRef5(false);
|
|
6033
6179
|
const interactionEndedAtRef = useRef5(0);
|
|
6034
6180
|
const inInteractionGrace = () => interactingRef.current || performance.now() - interactionEndedAtRef.current < INTERACTION_GRACE_MS;
|
|
6035
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
|
+
};
|
|
6036
6200
|
const pinBottom = (el) => {
|
|
6037
6201
|
autoPinAtRef.current = performance.now();
|
|
6038
6202
|
el.scrollTop = el.scrollHeight;
|
|
6203
|
+
syncFade(el);
|
|
6039
6204
|
};
|
|
6040
6205
|
const pinBottomSoon = (el, frames) => {
|
|
6041
6206
|
pinBottom(el);
|
|
@@ -6072,13 +6237,50 @@ function MessageList({
|
|
|
6072
6237
|
timerId = setTimeout(stop, ms);
|
|
6073
6238
|
return stop;
|
|
6074
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
|
+
};
|
|
6075
6275
|
const firstMessageId = messages.value[0]?.id;
|
|
6076
6276
|
useLayoutEffect2(() => {
|
|
6077
6277
|
const el = ref.current;
|
|
6078
6278
|
if (!el) return;
|
|
6079
6279
|
if (messages.value.length === 0) return;
|
|
6080
6280
|
hasHydratedRef.current = true;
|
|
6281
|
+
for (const m of messages.value) if (m.role === "assistant") seenRef.current.add(key(m));
|
|
6081
6282
|
if (!messages.value.some((m) => m.role === "user")) return;
|
|
6283
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6082
6284
|
return pinBottomThroughLayout(el, 300);
|
|
6083
6285
|
}, [firstMessageId]);
|
|
6084
6286
|
const prevLengthRef = useRef5(0);
|
|
@@ -6091,10 +6293,17 @@ function MessageList({
|
|
|
6091
6293
|
if (!hasHydratedRef.current) return;
|
|
6092
6294
|
if (list.slice(prevLength).some((m) => m.role === "user")) {
|
|
6093
6295
|
detachedRef.current = false;
|
|
6296
|
+
setNewCount(0);
|
|
6297
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6094
6298
|
return pinBottomSoon(el, 3);
|
|
6095
6299
|
}
|
|
6096
6300
|
if (!list.some((m) => m.role === "user")) return;
|
|
6097
|
-
if (
|
|
6301
|
+
if (scrollAnchor === "turn") {
|
|
6302
|
+
updateTurnSpacer(el);
|
|
6303
|
+
recomputeNewCount(el);
|
|
6304
|
+
return;
|
|
6305
|
+
}
|
|
6306
|
+
if (detachedRef.current || inInteractionGrace()) return recomputeNewCount(el);
|
|
6098
6307
|
const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
6099
6308
|
if (distanceFromBottom < STICK_THRESHOLD) pinBottom(el);
|
|
6100
6309
|
}, [messages.value.length]);
|
|
@@ -6108,6 +6317,7 @@ function MessageList({
|
|
|
6108
6317
|
if (!hasHydratedRef.current) return;
|
|
6109
6318
|
if (!last || last.id !== prevLastId || last.status !== "streaming") return;
|
|
6110
6319
|
detachedRef.current = false;
|
|
6320
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6111
6321
|
return pinBottomSoon(el, 3);
|
|
6112
6322
|
}, [messages.value]);
|
|
6113
6323
|
useEffect7(() => {
|
|
@@ -6116,6 +6326,19 @@ function MessageList({
|
|
|
6116
6326
|
const last = messages.value.at(-1);
|
|
6117
6327
|
if (!last) return;
|
|
6118
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
|
+
}
|
|
6119
6342
|
const pinIfNear = () => {
|
|
6120
6343
|
if (detachedRef.current || inInteractionGrace()) return;
|
|
6121
6344
|
const distance = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
@@ -6144,9 +6367,11 @@ function MessageList({
|
|
|
6144
6367
|
useEffect7(() => {
|
|
6145
6368
|
const el = ref.current;
|
|
6146
6369
|
if (!el) return;
|
|
6147
|
-
const syncJump = () => setShowJump(el.scrollHeight - el.scrollTop - el.clientHeight > STICK_THRESHOLD * 2);
|
|
6148
6370
|
const onScroll = () => {
|
|
6149
|
-
syncJump();
|
|
6371
|
+
syncJump(el);
|
|
6372
|
+
syncFade(el);
|
|
6373
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight <= 8) markAllSeen();
|
|
6374
|
+
else recomputeNewCount(el);
|
|
6150
6375
|
if (performance.now() - autoPinAtRef.current > 150) {
|
|
6151
6376
|
detachedRef.current = el.scrollHeight - el.scrollTop - el.clientHeight > 8;
|
|
6152
6377
|
}
|
|
@@ -6182,7 +6407,7 @@ function MessageList({
|
|
|
6182
6407
|
el.addEventListener("pointerdown", onPointerDown, { passive: true });
|
|
6183
6408
|
window.addEventListener("pointerup", endInteraction, { passive: true });
|
|
6184
6409
|
window.addEventListener("pointercancel", endInteraction, { passive: true });
|
|
6185
|
-
syncJump();
|
|
6410
|
+
syncJump(el);
|
|
6186
6411
|
return () => {
|
|
6187
6412
|
el.removeEventListener("scroll", onScroll);
|
|
6188
6413
|
el.removeEventListener("wheel", onWheel);
|
|
@@ -6200,7 +6425,35 @@ function MessageList({
|
|
|
6200
6425
|
if (!el) return;
|
|
6201
6426
|
detachedRef.current = false;
|
|
6202
6427
|
pinBottom(el);
|
|
6428
|
+
markAllSeen();
|
|
6203
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]);
|
|
6204
6457
|
const rows = [];
|
|
6205
6458
|
let prevDay = "";
|
|
6206
6459
|
const lastId = messages.value.at(-1)?.id;
|
|
@@ -6209,7 +6462,7 @@ function MessageList({
|
|
|
6209
6462
|
);
|
|
6210
6463
|
const markerRow = (marker) => {
|
|
6211
6464
|
if (form && marker.formId === form.form.id) {
|
|
6212
|
-
return /* @__PURE__ */
|
|
6465
|
+
return /* @__PURE__ */ jsx20(
|
|
6213
6466
|
FormGate,
|
|
6214
6467
|
{
|
|
6215
6468
|
form: form.form,
|
|
@@ -6220,7 +6473,7 @@ function MessageList({
|
|
|
6220
6473
|
`gate:${marker.formId}`
|
|
6221
6474
|
);
|
|
6222
6475
|
}
|
|
6223
|
-
return /* @__PURE__ */
|
|
6476
|
+
return /* @__PURE__ */ jsx20(
|
|
6224
6477
|
FormDoneMarker,
|
|
6225
6478
|
{
|
|
6226
6479
|
marker,
|
|
@@ -6243,12 +6496,12 @@ function MessageList({
|
|
|
6243
6496
|
const day = dayKey(m.createdAt);
|
|
6244
6497
|
if (day && day !== prevDay) {
|
|
6245
6498
|
rows.push(
|
|
6246
|
-
/* @__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}`)
|
|
6247
6500
|
);
|
|
6248
6501
|
prevDay = day;
|
|
6249
6502
|
}
|
|
6250
6503
|
rows.push(
|
|
6251
|
-
/* @__PURE__ */
|
|
6504
|
+
/* @__PURE__ */ jsx20(
|
|
6252
6505
|
MessageBubble,
|
|
6253
6506
|
{
|
|
6254
6507
|
message: m,
|
|
@@ -6260,7 +6513,9 @@ function MessageList({
|
|
|
6260
6513
|
interactive: Boolean(idle) && m.id === lastId,
|
|
6261
6514
|
superseded: m.id !== lastId,
|
|
6262
6515
|
tool,
|
|
6263
|
-
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0
|
|
6516
|
+
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0,
|
|
6517
|
+
enableMessageFeedback,
|
|
6518
|
+
onFeedback
|
|
6264
6519
|
},
|
|
6265
6520
|
m.id
|
|
6266
6521
|
)
|
|
@@ -6269,22 +6524,36 @@ function MessageList({
|
|
|
6269
6524
|
for (const marker of pendingMarkers) {
|
|
6270
6525
|
rows.push(markerRow(marker));
|
|
6271
6526
|
}
|
|
6272
|
-
return /* @__PURE__ */
|
|
6273
|
-
/* @__PURE__ */
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6527
|
+
return /* @__PURE__ */ jsxs16("div", { class: `${p18}-list-wrap`, children: [
|
|
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(
|
|
6279
6545
|
"button",
|
|
6280
6546
|
{
|
|
6281
6547
|
type: "button",
|
|
6282
|
-
class: `${
|
|
6548
|
+
class: `${p18}-jump${newCount > 0 ? ` ${p18}-jump--new` : ""}`,
|
|
6283
6549
|
onClick: jumpToBottom,
|
|
6284
|
-
"aria-label": strings.scrollToBottom,
|
|
6285
|
-
title: strings.scrollToBottom,
|
|
6550
|
+
"aria-label": newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6551
|
+
title: newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6286
6552
|
"data-testid": TID.scrollToBottom,
|
|
6287
|
-
children:
|
|
6553
|
+
children: [
|
|
6554
|
+
newCount > 0 ? /* @__PURE__ */ jsx20("span", { class: `${p18}-jump-count`, children: newCount }) : null,
|
|
6555
|
+
/* @__PURE__ */ jsx20(ChevronDownIcon, {})
|
|
6556
|
+
]
|
|
6288
6557
|
}
|
|
6289
6558
|
) : null
|
|
6290
6559
|
] });
|
|
@@ -6313,7 +6582,7 @@ function dayLabel(createdAt, strings) {
|
|
|
6313
6582
|
}
|
|
6314
6583
|
|
|
6315
6584
|
// src/ui/conversation-list.tsx
|
|
6316
|
-
import { useEffect as useEffect8, useState as
|
|
6585
|
+
import { useEffect as useEffect8, useState as useState8 } from "preact/hooks";
|
|
6317
6586
|
|
|
6318
6587
|
// src/ui/history-groups.ts
|
|
6319
6588
|
var HISTORY_BUCKETS = ["today", "yesterday", "lastWeek", "older"];
|
|
@@ -6343,7 +6612,7 @@ function startOfDay(ms) {
|
|
|
6343
6612
|
}
|
|
6344
6613
|
|
|
6345
6614
|
// src/ui/conversation-list.tsx
|
|
6346
|
-
import { Fragment as Fragment5, jsx as
|
|
6615
|
+
import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs17 } from "preact/jsx-runtime";
|
|
6347
6616
|
var log12 = logger.scope("history");
|
|
6348
6617
|
var DEFAULT_SKELETON_ROWS = 3;
|
|
6349
6618
|
var MAX_SKELETON_ROWS = 6;
|
|
@@ -6370,10 +6639,10 @@ function ConversationList({
|
|
|
6370
6639
|
onSelect,
|
|
6371
6640
|
onNewConversation
|
|
6372
6641
|
}) {
|
|
6373
|
-
const
|
|
6642
|
+
const p36 = BRAND.cssPrefix;
|
|
6374
6643
|
const seed = transport.peekConversations({ visitorId });
|
|
6375
|
-
const [state, setState] =
|
|
6376
|
-
const [conversations, setChats] =
|
|
6644
|
+
const [state, setState] = useState8(seed ? "loaded" : "loading");
|
|
6645
|
+
const [conversations, setChats] = useState8(seed?.conversations ?? []);
|
|
6377
6646
|
useEffect8(() => {
|
|
6378
6647
|
let cancelled = false;
|
|
6379
6648
|
transport.listConversations({ visitorId }).then((res) => {
|
|
@@ -6391,32 +6660,32 @@ function ConversationList({
|
|
|
6391
6660
|
cancelled = true;
|
|
6392
6661
|
};
|
|
6393
6662
|
}, [transport, visitorId, persistence]);
|
|
6394
|
-
const newChatButton = onNewConversation ? /* @__PURE__ */
|
|
6663
|
+
const newChatButton = onNewConversation ? /* @__PURE__ */ jsx21("div", { class: `${p36}-history-footer`, children: /* @__PURE__ */ jsxs17(
|
|
6395
6664
|
"button",
|
|
6396
6665
|
{
|
|
6397
6666
|
type: "button",
|
|
6398
|
-
class: `${
|
|
6667
|
+
class: `${p36}-history-new`,
|
|
6399
6668
|
onClick: onNewConversation,
|
|
6400
6669
|
"data-testid": TID.sidebarNewConversation,
|
|
6401
6670
|
children: [
|
|
6402
|
-
/* @__PURE__ */
|
|
6671
|
+
/* @__PURE__ */ jsx21(PlusIcon, {}),
|
|
6403
6672
|
strings.newConversation
|
|
6404
6673
|
]
|
|
6405
6674
|
}
|
|
6406
6675
|
) }) : null;
|
|
6407
6676
|
if (state === "loading") {
|
|
6408
6677
|
const rows = Math.min(persistence.loadHistoryCount() ?? DEFAULT_SKELETON_ROWS, MAX_SKELETON_ROWS);
|
|
6409
|
-
return /* @__PURE__ */
|
|
6410
|
-
/* @__PURE__ */
|
|
6411
|
-
/* @__PURE__ */
|
|
6412
|
-
/* @__PURE__ */
|
|
6413
|
-
/* @__PURE__ */
|
|
6414
|
-
/* @__PURE__ */
|
|
6415
|
-
/* @__PURE__ */
|
|
6416
|
-
/* @__PURE__ */
|
|
6417
|
-
/* @__PURE__ */
|
|
6678
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
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` }),
|
|
6683
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6684
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
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` }) })
|
|
6418
6687
|
] }),
|
|
6419
|
-
/* @__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` }) }) })
|
|
6420
6689
|
] })
|
|
6421
6690
|
] }, i)) })
|
|
6422
6691
|
] }) }),
|
|
@@ -6424,36 +6693,36 @@ function ConversationList({
|
|
|
6424
6693
|
] });
|
|
6425
6694
|
}
|
|
6426
6695
|
if (state === "error" || conversations.length === 0) {
|
|
6427
|
-
return /* @__PURE__ */
|
|
6428
|
-
/* @__PURE__ */
|
|
6696
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6697
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-empty`, children: strings.historyEmpty }),
|
|
6429
6698
|
newChatButton
|
|
6430
6699
|
] });
|
|
6431
6700
|
}
|
|
6432
6701
|
const now = Date.now();
|
|
6433
6702
|
const groups = groupByBucket(now, conversations);
|
|
6434
|
-
return /* @__PURE__ */
|
|
6435
|
-
/* @__PURE__ */
|
|
6436
|
-
/* @__PURE__ */
|
|
6437
|
-
/* @__PURE__ */
|
|
6703
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
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(
|
|
6438
6707
|
"button",
|
|
6439
6708
|
{
|
|
6440
6709
|
type: "button",
|
|
6441
6710
|
role: "listitem",
|
|
6442
|
-
class: `${
|
|
6711
|
+
class: `${p36}-history-item`,
|
|
6443
6712
|
onClick: () => onSelect(chat),
|
|
6444
6713
|
"data-closed": chat.canContinue ? void 0 : "true",
|
|
6445
|
-
"data-unread":
|
|
6714
|
+
"data-unread": chat.hasUnread ? "true" : void 0,
|
|
6446
6715
|
"data-testid": tid(TID.historyItem, chat.conversationId),
|
|
6447
6716
|
children: [
|
|
6448
|
-
/* @__PURE__ */
|
|
6449
|
-
/* @__PURE__ */
|
|
6450
|
-
/* @__PURE__ */
|
|
6451
|
-
/* @__PURE__ */
|
|
6452
|
-
/* @__PURE__ */
|
|
6717
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx21(MessageIcon, {}) }),
|
|
6718
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6719
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
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) })
|
|
6453
6722
|
] }),
|
|
6454
|
-
/* @__PURE__ */
|
|
6455
|
-
/* @__PURE__ */
|
|
6456
|
-
|
|
6723
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
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
|
|
6457
6726
|
] })
|
|
6458
6727
|
] })
|
|
6459
6728
|
]
|
|
@@ -6466,15 +6735,15 @@ function ConversationList({
|
|
|
6466
6735
|
}
|
|
6467
6736
|
|
|
6468
6737
|
// src/ui/suggestions.tsx
|
|
6469
|
-
import { jsx as
|
|
6470
|
-
var
|
|
6738
|
+
import { jsx as jsx22 } from "preact/jsx-runtime";
|
|
6739
|
+
var p19 = BRAND.cssPrefix;
|
|
6471
6740
|
function Suggestions({ suggestions, onPick }) {
|
|
6472
6741
|
if (suggestions.length === 0) return null;
|
|
6473
|
-
return /* @__PURE__ */
|
|
6742
|
+
return /* @__PURE__ */ jsx22("div", { class: `${p19}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx22(
|
|
6474
6743
|
"button",
|
|
6475
6744
|
{
|
|
6476
6745
|
type: "button",
|
|
6477
|
-
class: `${
|
|
6746
|
+
class: `${p19}-suggestion`,
|
|
6478
6747
|
onClick: () => onPick(s),
|
|
6479
6748
|
"data-testid": tid(TID.suggestion, i),
|
|
6480
6749
|
children: s.label
|
|
@@ -6484,8 +6753,8 @@ function Suggestions({ suggestions, onPick }) {
|
|
|
6484
6753
|
}
|
|
6485
6754
|
|
|
6486
6755
|
// src/ui/panel.tsx
|
|
6487
|
-
import { Fragment as Fragment6, jsx as
|
|
6488
|
-
var
|
|
6756
|
+
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs18 } from "preact/jsx-runtime";
|
|
6757
|
+
var p20 = BRAND.cssPrefix;
|
|
6489
6758
|
function Panel(props2) {
|
|
6490
6759
|
const { options, onClose } = props2;
|
|
6491
6760
|
const s = options.strings;
|
|
@@ -6509,18 +6778,18 @@ function Panel(props2) {
|
|
|
6509
6778
|
}, []);
|
|
6510
6779
|
const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
|
|
6511
6780
|
useDragMove(containerRef.current, options.mode === "modal");
|
|
6512
|
-
return /* @__PURE__ */
|
|
6781
|
+
return /* @__PURE__ */ jsxs18(
|
|
6513
6782
|
"div",
|
|
6514
6783
|
{
|
|
6515
6784
|
ref: containerRef,
|
|
6516
|
-
class: `${
|
|
6785
|
+
class: `${p20}-panel`,
|
|
6517
6786
|
role: "dialog",
|
|
6518
6787
|
"aria-modal": "false",
|
|
6519
6788
|
"aria-label": s.panelTitle,
|
|
6520
6789
|
style: { position: "relative" },
|
|
6521
6790
|
"data-testid": TID.panel,
|
|
6522
6791
|
children: [
|
|
6523
|
-
/* @__PURE__ */
|
|
6792
|
+
/* @__PURE__ */ jsx23(
|
|
6524
6793
|
PanelContent,
|
|
6525
6794
|
{
|
|
6526
6795
|
...props2,
|
|
@@ -6529,7 +6798,7 @@ function Panel(props2) {
|
|
|
6529
6798
|
composerAttachApiRef
|
|
6530
6799
|
}
|
|
6531
6800
|
),
|
|
6532
|
-
/* @__PURE__ */
|
|
6801
|
+
/* @__PURE__ */ jsx23(PoweredByBar, { poweredBy: props2.options.poweredBy })
|
|
6533
6802
|
]
|
|
6534
6803
|
}
|
|
6535
6804
|
);
|
|
@@ -6568,6 +6837,8 @@ function PanelContent(props2) {
|
|
|
6568
6837
|
onFormFill,
|
|
6569
6838
|
tool,
|
|
6570
6839
|
onRetry,
|
|
6840
|
+
onMessageFeedback,
|
|
6841
|
+
onMessageSeen,
|
|
6571
6842
|
containerEl,
|
|
6572
6843
|
dragOver,
|
|
6573
6844
|
composerAttachApiRef
|
|
@@ -6577,9 +6848,9 @@ function PanelContent(props2) {
|
|
|
6577
6848
|
if (activeForm) {
|
|
6578
6849
|
composerArea = null;
|
|
6579
6850
|
} else if (canSend) {
|
|
6580
|
-
composerArea = /* @__PURE__ */
|
|
6581
|
-
/* @__PURE__ */
|
|
6582
|
-
/* @__PURE__ */
|
|
6851
|
+
composerArea = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6852
|
+
/* @__PURE__ */ jsx23(Suggestions, { suggestions, onPick: onSuggestion }),
|
|
6853
|
+
/* @__PURE__ */ jsx23(
|
|
6583
6854
|
Composer,
|
|
6584
6855
|
{
|
|
6585
6856
|
options,
|
|
@@ -6594,10 +6865,10 @@ function PanelContent(props2) {
|
|
|
6594
6865
|
)
|
|
6595
6866
|
] });
|
|
6596
6867
|
} else {
|
|
6597
|
-
composerArea = /* @__PURE__ */
|
|
6868
|
+
composerArea = /* @__PURE__ */ jsx23(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
|
|
6598
6869
|
}
|
|
6599
|
-
return /* @__PURE__ */
|
|
6600
|
-
view === "history" ? /* @__PURE__ */
|
|
6870
|
+
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6871
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6601
6872
|
HistoryHeader,
|
|
6602
6873
|
{
|
|
6603
6874
|
strings: s,
|
|
@@ -6605,22 +6876,22 @@ function PanelContent(props2) {
|
|
|
6605
6876
|
onClose,
|
|
6606
6877
|
showClose: canShowClose(options.mode, panelSize, options.actions)
|
|
6607
6878
|
}
|
|
6608
|
-
) : /* @__PURE__ */
|
|
6609
|
-
onBack ? /* @__PURE__ */
|
|
6879
|
+
) : /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, "data-testid": TID.panelHeader, children: [
|
|
6880
|
+
onBack ? /* @__PURE__ */ jsx23(
|
|
6610
6881
|
"button",
|
|
6611
6882
|
{
|
|
6612
6883
|
type: "button",
|
|
6613
|
-
class: `${
|
|
6884
|
+
class: `${p20}-icon-btn`,
|
|
6614
6885
|
onClick: onBack,
|
|
6615
6886
|
"aria-label": s.moduleBack,
|
|
6616
6887
|
title: s.moduleBack,
|
|
6617
|
-
children: /* @__PURE__ */
|
|
6888
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6618
6889
|
}
|
|
6619
6890
|
) : null,
|
|
6620
|
-
agent ? /* @__PURE__ */
|
|
6621
|
-
/* @__PURE__ */
|
|
6891
|
+
agent ? /* @__PURE__ */ jsx23(AgentBadge, { agent, strings: s }) : /* @__PURE__ */ jsx23("h1", { children: s.panelTitle }),
|
|
6892
|
+
/* @__PURE__ */ jsx23(HeaderActions, { panelProps: props2, variant: "chat" })
|
|
6622
6893
|
] }),
|
|
6623
|
-
view === "history" ? /* @__PURE__ */
|
|
6894
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6624
6895
|
ConversationList,
|
|
6625
6896
|
{
|
|
6626
6897
|
transport,
|
|
@@ -6631,9 +6902,9 @@ function PanelContent(props2) {
|
|
|
6631
6902
|
onSelect: (conversation) => onSelectHistoryConversation(conversation.conversationId),
|
|
6632
6903
|
onNewConversation
|
|
6633
6904
|
}
|
|
6634
|
-
) : /* @__PURE__ */
|
|
6635
|
-
/* @__PURE__ */
|
|
6636
|
-
/* @__PURE__ */
|
|
6905
|
+
) : /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6906
|
+
/* @__PURE__ */ jsx23(DropZone, { visible: dragOver, strings: s }),
|
|
6907
|
+
/* @__PURE__ */ jsx23(
|
|
6637
6908
|
MessageList,
|
|
6638
6909
|
{
|
|
6639
6910
|
messagesSig,
|
|
@@ -6642,6 +6913,11 @@ function PanelContent(props2) {
|
|
|
6642
6913
|
showReasoning: options.showReasoning,
|
|
6643
6914
|
showToolCalls: options.showToolCalls,
|
|
6644
6915
|
showSources: options.showSources,
|
|
6916
|
+
scrollFade: options.scrollFade,
|
|
6917
|
+
scrollAnchor: options.scrollAnchor,
|
|
6918
|
+
enableMessageFeedback: options.enableMessageFeedback,
|
|
6919
|
+
onFeedback: onMessageFeedback,
|
|
6920
|
+
onMessageSeen,
|
|
6645
6921
|
loading: loadingMessages,
|
|
6646
6922
|
idle: !isStreaming,
|
|
6647
6923
|
tool,
|
|
@@ -6652,9 +6928,9 @@ function PanelContent(props2) {
|
|
|
6652
6928
|
}
|
|
6653
6929
|
),
|
|
6654
6930
|
composerArea,
|
|
6655
|
-
/* @__PURE__ */
|
|
6931
|
+
/* @__PURE__ */ jsx23(ComposerFooter, { disclaimer: options.composerDisclaimer })
|
|
6656
6932
|
] }),
|
|
6657
|
-
options.size.resize?.enabled ? /* @__PURE__ */
|
|
6933
|
+
options.size.resize?.enabled ? /* @__PURE__ */ jsx23(
|
|
6658
6934
|
ResizeGrip,
|
|
6659
6935
|
{
|
|
6660
6936
|
panelEl: containerEl,
|
|
@@ -6673,28 +6949,28 @@ function HistoryHeader({
|
|
|
6673
6949
|
onClose,
|
|
6674
6950
|
showClose
|
|
6675
6951
|
}) {
|
|
6676
|
-
return /* @__PURE__ */
|
|
6677
|
-
/* @__PURE__ */
|
|
6952
|
+
return /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, children: [
|
|
6953
|
+
/* @__PURE__ */ jsx23(
|
|
6678
6954
|
"button",
|
|
6679
6955
|
{
|
|
6680
6956
|
type: "button",
|
|
6681
|
-
class: `${
|
|
6957
|
+
class: `${p20}-icon-btn`,
|
|
6682
6958
|
onClick: onBack,
|
|
6683
6959
|
"aria-label": strings.historyBack,
|
|
6684
6960
|
title: strings.historyBack,
|
|
6685
|
-
children: /* @__PURE__ */
|
|
6961
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6686
6962
|
}
|
|
6687
6963
|
),
|
|
6688
|
-
/* @__PURE__ */
|
|
6689
|
-
showClose ? /* @__PURE__ */
|
|
6964
|
+
/* @__PURE__ */ jsx23("h1", { children: strings.historyTitle }),
|
|
6965
|
+
showClose ? /* @__PURE__ */ jsx23(
|
|
6690
6966
|
"button",
|
|
6691
6967
|
{
|
|
6692
6968
|
type: "button",
|
|
6693
|
-
class: `${
|
|
6969
|
+
class: `${p20}-icon-btn`,
|
|
6694
6970
|
onClick: onClose,
|
|
6695
6971
|
"aria-label": strings.close,
|
|
6696
6972
|
title: strings.close,
|
|
6697
|
-
children: /* @__PURE__ */
|
|
6973
|
+
children: /* @__PURE__ */ jsx23(CloseIcon, {})
|
|
6698
6974
|
}
|
|
6699
6975
|
) : null
|
|
6700
6976
|
] });
|
|
@@ -6704,28 +6980,28 @@ function ReadOnlyBanner({
|
|
|
6704
6980
|
ctaLabel,
|
|
6705
6981
|
onNewConversation
|
|
6706
6982
|
}) {
|
|
6707
|
-
return /* @__PURE__ */
|
|
6708
|
-
/* @__PURE__ */
|
|
6709
|
-
/* @__PURE__ */
|
|
6983
|
+
return /* @__PURE__ */ jsxs18("div", { class: `${p20}-readonly-banner`, role: "note", children: [
|
|
6984
|
+
/* @__PURE__ */ jsx23("span", { class: `${p20}-readonly-label`, children: label }),
|
|
6985
|
+
/* @__PURE__ */ jsx23("button", { type: "button", class: `${p20}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
|
|
6710
6986
|
] });
|
|
6711
6987
|
}
|
|
6712
6988
|
function ComposerFooter({ disclaimer }) {
|
|
6713
6989
|
if (!disclaimer) return null;
|
|
6714
|
-
return /* @__PURE__ */
|
|
6990
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-composer-footer`, children: /* @__PURE__ */ jsx23("div", { class: `${p20}-disclaimer`, children: disclaimer }) });
|
|
6715
6991
|
}
|
|
6716
6992
|
function PoweredByBar({ poweredBy }) {
|
|
6717
6993
|
if (!poweredBy) return null;
|
|
6718
|
-
return /* @__PURE__ */
|
|
6994
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-poweredby-bar`, children: /* @__PURE__ */ jsx23(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
|
|
6719
6995
|
}
|
|
6720
6996
|
function PoweredBy({ logoUrl, text, href }) {
|
|
6721
|
-
const inner = /* @__PURE__ */
|
|
6722
|
-
logoUrl ? /* @__PURE__ */
|
|
6723
|
-
text ? /* @__PURE__ */
|
|
6997
|
+
const inner = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6998
|
+
logoUrl ? /* @__PURE__ */ jsx23("img", { class: `${p20}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
|
|
6999
|
+
text ? /* @__PURE__ */ jsx23("span", { children: text }) : null
|
|
6724
7000
|
] });
|
|
6725
7001
|
if (href) {
|
|
6726
|
-
return /* @__PURE__ */
|
|
7002
|
+
return /* @__PURE__ */ jsx23("a", { class: `${p20}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
|
|
6727
7003
|
}
|
|
6728
|
-
return /* @__PURE__ */
|
|
7004
|
+
return /* @__PURE__ */ jsx23("span", { class: `${p20}-poweredby`, children: inner });
|
|
6729
7005
|
}
|
|
6730
7006
|
|
|
6731
7007
|
// src/ui/form/form-controller.ts
|
|
@@ -6808,34 +7084,34 @@ function whenPasses(form, d) {
|
|
|
6808
7084
|
}
|
|
6809
7085
|
|
|
6810
7086
|
// src/ui/sidebar.tsx
|
|
6811
|
-
import { Fragment as Fragment7, jsx as
|
|
7087
|
+
import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs19 } from "preact/jsx-runtime";
|
|
6812
7088
|
function Sidebar(props2) {
|
|
6813
|
-
const
|
|
7089
|
+
const p36 = BRAND.cssPrefix;
|
|
6814
7090
|
const { site, blocks, strings, collapsed } = props2;
|
|
6815
7091
|
const navigation = blocks?.navigation ?? [];
|
|
6816
7092
|
const linkCards = blocks?.linkCards ?? [];
|
|
6817
7093
|
const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
|
|
6818
|
-
return /* @__PURE__ */
|
|
6819
|
-
/* @__PURE__ */
|
|
6820
|
-
/* @__PURE__ */
|
|
6821
|
-
/* @__PURE__ */
|
|
7094
|
+
return /* @__PURE__ */ jsxs19("aside", { class: `${p36}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
|
|
7095
|
+
/* @__PURE__ */ jsxs19("div", { class: `${p36}-sidebar-header`, children: [
|
|
7096
|
+
/* @__PURE__ */ jsx24(SidebarBrand, { site }),
|
|
7097
|
+
/* @__PURE__ */ jsx24(
|
|
6822
7098
|
"button",
|
|
6823
7099
|
{
|
|
6824
7100
|
type: "button",
|
|
6825
|
-
class: `${
|
|
7101
|
+
class: `${p36}-sidebar-toggle`,
|
|
6826
7102
|
"aria-label": toggleLabel,
|
|
6827
7103
|
"aria-expanded": collapsed ? "false" : "true",
|
|
6828
7104
|
title: toggleLabel,
|
|
6829
7105
|
onClick: props2.onToggleCollapsed,
|
|
6830
7106
|
"data-testid": TID.sidebarToggle,
|
|
6831
|
-
children: /* @__PURE__ */
|
|
7107
|
+
children: /* @__PURE__ */ jsx24(SidebarToggleIcon, { collapsed })
|
|
6832
7108
|
}
|
|
6833
7109
|
)
|
|
6834
7110
|
] }),
|
|
6835
|
-
collapsed ? null : /* @__PURE__ */
|
|
6836
|
-
navigation.length > 0 ? /* @__PURE__ */
|
|
6837
|
-
linkCards.length > 0 ? /* @__PURE__ */
|
|
6838
|
-
props2.showConversations ? /* @__PURE__ */
|
|
7111
|
+
collapsed ? null : /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
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(
|
|
6839
7115
|
ConversationList,
|
|
6840
7116
|
{
|
|
6841
7117
|
transport: props2.transport,
|
|
@@ -6851,18 +7127,18 @@ function Sidebar(props2) {
|
|
|
6851
7127
|
] });
|
|
6852
7128
|
}
|
|
6853
7129
|
function SidebarBrand({ site }) {
|
|
6854
|
-
const
|
|
7130
|
+
const p36 = BRAND.cssPrefix;
|
|
6855
7131
|
if (site?.logo?.url) {
|
|
6856
7132
|
const alt = site.logo.alt ?? site.title ?? "Logo";
|
|
6857
|
-
return /* @__PURE__ */
|
|
6858
|
-
site.logoDark?.url ? /* @__PURE__ */
|
|
6859
|
-
/* @__PURE__ */
|
|
7133
|
+
return /* @__PURE__ */ jsxs19("picture", { children: [
|
|
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 })
|
|
6860
7136
|
] });
|
|
6861
7137
|
}
|
|
6862
|
-
return /* @__PURE__ */
|
|
7138
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-title`, children: site?.title ?? BRAND.name });
|
|
6863
7139
|
}
|
|
6864
7140
|
function SidebarToggleIcon({ collapsed }) {
|
|
6865
|
-
return /* @__PURE__ */
|
|
7141
|
+
return /* @__PURE__ */ jsx24(
|
|
6866
7142
|
"svg",
|
|
6867
7143
|
{
|
|
6868
7144
|
width: "16",
|
|
@@ -6872,38 +7148,38 @@ function SidebarToggleIcon({ collapsed }) {
|
|
|
6872
7148
|
stroke: "currentColor",
|
|
6873
7149
|
"stroke-width": "2",
|
|
6874
7150
|
"aria-hidden": "true",
|
|
6875
|
-
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" })
|
|
6876
7152
|
}
|
|
6877
7153
|
);
|
|
6878
7154
|
}
|
|
6879
7155
|
function SidebarNav({ items }) {
|
|
6880
|
-
const
|
|
6881
|
-
return /* @__PURE__ */
|
|
7156
|
+
const p36 = BRAND.cssPrefix;
|
|
7157
|
+
return /* @__PURE__ */ jsx24("ul", { class: `${p36}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsxs19(
|
|
6882
7158
|
"a",
|
|
6883
7159
|
{
|
|
6884
|
-
class: `${
|
|
7160
|
+
class: `${p36}-sidebar-nav-item`,
|
|
6885
7161
|
href: item.href,
|
|
6886
7162
|
target: item.href ? "_blank" : void 0,
|
|
6887
7163
|
rel: item.href ? "noreferrer" : void 0,
|
|
6888
7164
|
children: [
|
|
6889
|
-
item.icon ? /* @__PURE__ */
|
|
6890
|
-
/* @__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 })
|
|
6891
7167
|
]
|
|
6892
7168
|
}
|
|
6893
7169
|
) }, item.id ?? item.label)) });
|
|
6894
7170
|
}
|
|
6895
7171
|
function SidebarCards({ items }) {
|
|
6896
|
-
const
|
|
6897
|
-
return /* @__PURE__ */
|
|
7172
|
+
const p36 = BRAND.cssPrefix;
|
|
7173
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs19(
|
|
6898
7174
|
"a",
|
|
6899
7175
|
{
|
|
6900
|
-
class: `${
|
|
7176
|
+
class: `${p36}-sidebar-card`,
|
|
6901
7177
|
href: item.href,
|
|
6902
7178
|
target: item.href ? "_blank" : void 0,
|
|
6903
7179
|
rel: item.href ? "noreferrer" : void 0,
|
|
6904
7180
|
children: [
|
|
6905
|
-
/* @__PURE__ */
|
|
6906
|
-
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
|
|
6907
7183
|
]
|
|
6908
7184
|
},
|
|
6909
7185
|
item.id ?? item.label
|
|
@@ -6911,11 +7187,11 @@ function SidebarCards({ items }) {
|
|
|
6911
7187
|
}
|
|
6912
7188
|
|
|
6913
7189
|
// src/ui/page-shell.tsx
|
|
6914
|
-
import { jsx as
|
|
6915
|
-
var
|
|
7190
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "preact/jsx-runtime";
|
|
7191
|
+
var p21 = BRAND.cssPrefix;
|
|
6916
7192
|
function PageShell(props2) {
|
|
6917
|
-
return /* @__PURE__ */
|
|
6918
|
-
/* @__PURE__ */
|
|
7193
|
+
return /* @__PURE__ */ jsxs20("main", { class: `${p21}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
|
|
7194
|
+
/* @__PURE__ */ jsx25(
|
|
6919
7195
|
Sidebar,
|
|
6920
7196
|
{
|
|
6921
7197
|
site: props2.site,
|
|
@@ -6932,7 +7208,7 @@ function PageShell(props2) {
|
|
|
6932
7208
|
onToggleCollapsed: props2.onToggleSidebarCollapsed
|
|
6933
7209
|
}
|
|
6934
7210
|
),
|
|
6935
|
-
/* @__PURE__ */
|
|
7211
|
+
/* @__PURE__ */ jsx25("section", { class: `${p21}-page-chat`, "aria-label": "Chat", children: props2.children })
|
|
6936
7212
|
] });
|
|
6937
7213
|
}
|
|
6938
7214
|
|
|
@@ -6979,83 +7255,83 @@ var chatLayout = {
|
|
|
6979
7255
|
};
|
|
6980
7256
|
|
|
6981
7257
|
// src/ui/modules/help.tsx
|
|
6982
|
-
import { useEffect as useEffect10, useMemo as useMemo2, useState as
|
|
7258
|
+
import { useEffect as useEffect10, useMemo as useMemo2, useState as useState9 } from "preact/hooks";
|
|
6983
7259
|
|
|
6984
7260
|
// src/ui/back-header.tsx
|
|
6985
|
-
import { jsx as
|
|
6986
|
-
var
|
|
7261
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "preact/jsx-runtime";
|
|
7262
|
+
var p22 = BRAND.cssPrefix;
|
|
6987
7263
|
function TitleBar({ title, actions }) {
|
|
6988
|
-
return /* @__PURE__ */
|
|
6989
|
-
/* @__PURE__ */
|
|
6990
|
-
/* @__PURE__ */
|
|
6991
|
-
actions ?? /* @__PURE__ */
|
|
7264
|
+
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-variant": "title", children: [
|
|
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" })
|
|
6992
7268
|
] });
|
|
6993
7269
|
}
|
|
6994
7270
|
function BackHeader({ title, backLabel, onBack, actions, testid }) {
|
|
6995
|
-
return /* @__PURE__ */
|
|
6996
|
-
/* @__PURE__ */
|
|
6997
|
-
/* @__PURE__ */
|
|
6998
|
-
actions ?? /* @__PURE__ */
|
|
7271
|
+
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-testid": testid, children: [
|
|
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" })
|
|
6999
7275
|
] });
|
|
7000
7276
|
}
|
|
7001
7277
|
|
|
7002
7278
|
// src/ui/home-search.tsx
|
|
7003
|
-
import { jsx as
|
|
7004
|
-
var
|
|
7279
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "preact/jsx-runtime";
|
|
7280
|
+
var p23 = BRAND.cssPrefix;
|
|
7005
7281
|
function HomeSearchButton({ placeholder, onActivate }) {
|
|
7006
|
-
return /* @__PURE__ */
|
|
7007
|
-
/* @__PURE__ */
|
|
7008
|
-
/* @__PURE__ */
|
|
7282
|
+
return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
|
|
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, {}) })
|
|
7009
7285
|
] });
|
|
7010
7286
|
}
|
|
7011
7287
|
function HelpSearchInput({ placeholder, value, onInput }) {
|
|
7012
|
-
return /* @__PURE__ */
|
|
7013
|
-
/* @__PURE__ */
|
|
7288
|
+
return /* @__PURE__ */ jsxs22("div", { class: `${p23}-home-search`, "data-input": "true", children: [
|
|
7289
|
+
/* @__PURE__ */ jsx27(
|
|
7014
7290
|
"input",
|
|
7015
7291
|
{
|
|
7016
7292
|
type: "search",
|
|
7017
|
-
class: `${
|
|
7293
|
+
class: `${p23}-home-search-input`,
|
|
7018
7294
|
placeholder,
|
|
7019
7295
|
value,
|
|
7020
7296
|
onInput: (e) => onInput(e.currentTarget.value),
|
|
7021
7297
|
"data-testid": TID.helpSearch
|
|
7022
7298
|
}
|
|
7023
7299
|
),
|
|
7024
|
-
/* @__PURE__ */
|
|
7300
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(SearchIcon, {}) })
|
|
7025
7301
|
] });
|
|
7026
7302
|
}
|
|
7027
7303
|
|
|
7028
7304
|
// src/ui/list-row.tsx
|
|
7029
|
-
import { jsx as
|
|
7030
|
-
var
|
|
7305
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "preact/jsx-runtime";
|
|
7306
|
+
var p24 = BRAND.cssPrefix;
|
|
7031
7307
|
function ListRow({ title, subtitle, onClick, testid }) {
|
|
7032
|
-
return /* @__PURE__ */
|
|
7033
|
-
/* @__PURE__ */
|
|
7034
|
-
/* @__PURE__ */
|
|
7035
|
-
subtitle ? /* @__PURE__ */
|
|
7308
|
+
return /* @__PURE__ */ jsxs23("button", { type: "button", class: `${p24}-list-row`, onClick, "data-testid": testid, children: [
|
|
7309
|
+
/* @__PURE__ */ jsxs23("span", { class: `${p24}-list-row-body`, children: [
|
|
7310
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-title`, children: title }),
|
|
7311
|
+
subtitle ? /* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-sub`, children: subtitle }) : null
|
|
7036
7312
|
] }),
|
|
7037
|
-
/* @__PURE__ */
|
|
7313
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx28(ChevronRightIcon, {}) })
|
|
7038
7314
|
] });
|
|
7039
7315
|
}
|
|
7040
7316
|
|
|
7041
7317
|
// src/ui/module-state.tsx
|
|
7042
|
-
import { jsx as
|
|
7043
|
-
var
|
|
7318
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "preact/jsx-runtime";
|
|
7319
|
+
var p25 = BRAND.cssPrefix;
|
|
7044
7320
|
function ModuleState({
|
|
7045
7321
|
tone = "info",
|
|
7046
7322
|
message,
|
|
7047
7323
|
onRetry,
|
|
7048
7324
|
strings
|
|
7049
7325
|
}) {
|
|
7050
|
-
return /* @__PURE__ */
|
|
7051
|
-
/* @__PURE__ */
|
|
7052
|
-
onRetry ? /* @__PURE__ */
|
|
7326
|
+
return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
|
|
7327
|
+
/* @__PURE__ */ jsx29("span", { children: message }),
|
|
7328
|
+
onRetry ? /* @__PURE__ */ jsx29("button", { type: "button", class: `${p25}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
|
|
7053
7329
|
] });
|
|
7054
7330
|
}
|
|
7055
7331
|
|
|
7056
7332
|
// src/ui/modules/help.tsx
|
|
7057
|
-
import { jsx as
|
|
7058
|
-
var
|
|
7333
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "preact/jsx-runtime";
|
|
7334
|
+
var p26 = BRAND.cssPrefix;
|
|
7059
7335
|
var log13 = logger.scope("help");
|
|
7060
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 });
|
|
7061
7337
|
function groupByCategory(items) {
|
|
@@ -7084,7 +7360,7 @@ function fuzzySearch(items, query) {
|
|
|
7084
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);
|
|
7085
7361
|
}
|
|
7086
7362
|
function ArticleRow({ article, nav }) {
|
|
7087
|
-
return /* @__PURE__ */
|
|
7363
|
+
return /* @__PURE__ */ jsx30(
|
|
7088
7364
|
ListRow,
|
|
7089
7365
|
{
|
|
7090
7366
|
title: article.title,
|
|
@@ -7096,11 +7372,11 @@ function ArticleRow({ article, nav }) {
|
|
|
7096
7372
|
}
|
|
7097
7373
|
function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7098
7374
|
const tags = config.contentTags;
|
|
7099
|
-
const [state, setState] =
|
|
7100
|
-
const [errorMsg, setErrorMsg] =
|
|
7101
|
-
const [items, setItems] =
|
|
7102
|
-
const [query, setQuery] =
|
|
7103
|
-
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);
|
|
7104
7380
|
useEffect10(() => {
|
|
7105
7381
|
let cancelled = false;
|
|
7106
7382
|
setState("loading");
|
|
@@ -7129,46 +7405,46 @@ function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7129
7405
|
}, [query, results, bus]);
|
|
7130
7406
|
function renderBody() {
|
|
7131
7407
|
if (query.trim().length > 0) {
|
|
7132
|
-
if (results.length === 0) return /* @__PURE__ */
|
|
7133
|
-
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)) });
|
|
7134
7410
|
}
|
|
7135
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7411
|
+
if (state === "loading") return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpLoading, strings });
|
|
7136
7412
|
if (state === "error") {
|
|
7137
|
-
return /* @__PURE__ */
|
|
7413
|
+
return /* @__PURE__ */ jsx30(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7138
7414
|
}
|
|
7139
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7140
|
-
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */
|
|
7141
|
-
category ? /* @__PURE__ */
|
|
7142
|
-
/* @__PURE__ */
|
|
7415
|
+
if (items.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpEmpty, strings });
|
|
7416
|
+
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs25("section", { class: `${p26}-help-group`, children: [
|
|
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)) })
|
|
7143
7419
|
] }, category));
|
|
7144
7420
|
}
|
|
7145
|
-
return /* @__PURE__ */
|
|
7146
|
-
/* @__PURE__ */
|
|
7147
|
-
/* @__PURE__ */
|
|
7148
|
-
/* @__PURE__ */
|
|
7421
|
+
return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
|
|
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() })
|
|
7149
7425
|
] });
|
|
7150
7426
|
}
|
|
7151
7427
|
var helpLayout = {
|
|
7152
7428
|
Icon: HelpIcon,
|
|
7153
|
-
Root: (props2) => /* @__PURE__ */
|
|
7429
|
+
Root: (props2) => /* @__PURE__ */ jsx30(HelpRoot, { ...props2 })
|
|
7154
7430
|
};
|
|
7155
7431
|
|
|
7156
7432
|
// src/ui/modules/home.tsx
|
|
7157
|
-
import { useEffect as useEffect11, useState as
|
|
7433
|
+
import { useEffect as useEffect11, useState as useState10 } from "preact/hooks";
|
|
7158
7434
|
|
|
7159
7435
|
// src/ui/home-card.tsx
|
|
7160
|
-
import { jsx as
|
|
7161
|
-
var
|
|
7436
|
+
import { jsx as jsx31 } from "preact/jsx-runtime";
|
|
7437
|
+
var p27 = BRAND.cssPrefix;
|
|
7162
7438
|
function HomeCard({ onClick, children, testid }) {
|
|
7163
7439
|
if (onClick) {
|
|
7164
|
-
return /* @__PURE__ */
|
|
7440
|
+
return /* @__PURE__ */ jsx31("button", { type: "button", class: `${p27}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
|
|
7165
7441
|
}
|
|
7166
|
-
return /* @__PURE__ */
|
|
7442
|
+
return /* @__PURE__ */ jsx31("div", { class: `${p27}-home-card`, "data-testid": testid, children });
|
|
7167
7443
|
}
|
|
7168
7444
|
|
|
7169
7445
|
// src/ui/modules/home.tsx
|
|
7170
|
-
import { Fragment as Fragment8, jsx as
|
|
7171
|
-
var
|
|
7446
|
+
import { Fragment as Fragment8, jsx as jsx32, jsxs as jsxs26 } from "preact/jsx-runtime";
|
|
7447
|
+
var p28 = BRAND.cssPrefix;
|
|
7172
7448
|
var log14 = logger.scope("home");
|
|
7173
7449
|
function resolveGreeting(props2) {
|
|
7174
7450
|
const name = props2.options.userContext?.name;
|
|
@@ -7182,8 +7458,8 @@ function resolveGreeting(props2) {
|
|
|
7182
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 });
|
|
7183
7459
|
function HomeRoot(props2) {
|
|
7184
7460
|
const { transport, strings, config, nav, bus, panelProps } = props2;
|
|
7185
|
-
const [recent, setRecent] =
|
|
7186
|
-
const [content, setContent] =
|
|
7461
|
+
const [recent, setRecent] = useState10(null);
|
|
7462
|
+
const [content, setContent] = useState10([]);
|
|
7187
7463
|
const tagsKey = config.contentTags?.join(",");
|
|
7188
7464
|
useEffect11(() => {
|
|
7189
7465
|
if (!config.showRecentConversations) return;
|
|
@@ -7211,49 +7487,49 @@ function HomeRoot(props2) {
|
|
|
7211
7487
|
const status = config.status;
|
|
7212
7488
|
const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
|
|
7213
7489
|
const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
|
|
7214
|
-
return /* @__PURE__ */
|
|
7215
|
-
/* @__PURE__ */
|
|
7216
|
-
/* @__PURE__ */
|
|
7217
|
-
config.brandName ? /* @__PURE__ */
|
|
7218
|
-
/* @__PURE__ */
|
|
7219
|
-
avatars.length > 0 ? /* @__PURE__ */
|
|
7220
|
-
/* @__PURE__ */
|
|
7490
|
+
return /* @__PURE__ */ jsx32("div", { class: `${p28}-module ${p28}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-scroll`, children: [
|
|
7491
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero`, children: [
|
|
7492
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-top`, children: [
|
|
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" }),
|
|
7494
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-actions`, children: [
|
|
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" })
|
|
7221
7497
|
] })
|
|
7222
7498
|
] }),
|
|
7223
|
-
config.showGreeting !== false ? /* @__PURE__ */
|
|
7224
|
-
/* @__PURE__ */
|
|
7225
|
-
greeting.subtitle ? /* @__PURE__ */
|
|
7499
|
+
config.showGreeting !== false ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
|
|
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
|
|
7226
7502
|
] }) : null
|
|
7227
7503
|
] }),
|
|
7228
|
-
/* @__PURE__ */
|
|
7229
|
-
config.showSearchBar !== false ? /* @__PURE__ */
|
|
7504
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-cards`, children: [
|
|
7505
|
+
config.showSearchBar !== false ? /* @__PURE__ */ jsx32(
|
|
7230
7506
|
HomeSearchButton,
|
|
7231
7507
|
{
|
|
7232
7508
|
placeholder: strings.homeSearchPlaceholder,
|
|
7233
7509
|
onActivate: () => nav.switchToLayout("help")
|
|
7234
7510
|
}
|
|
7235
7511
|
) : null,
|
|
7236
|
-
recent ? /* @__PURE__ */
|
|
7237
|
-
/* @__PURE__ */
|
|
7238
|
-
/* @__PURE__ */
|
|
7239
|
-
/* @__PURE__ */
|
|
7240
|
-
recent.preview ? /* @__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, {}) }),
|
|
7514
|
+
/* @__PURE__ */ jsxs26("span", { class: `${p28}-home-recent-body`, children: [
|
|
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
|
|
7241
7517
|
] }),
|
|
7242
|
-
|
|
7518
|
+
recent.hasUnread ? /* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-dot`, "aria-label": "Unread" }) : null
|
|
7243
7519
|
] }) }) : null,
|
|
7244
|
-
status ? /* @__PURE__ */
|
|
7520
|
+
status ? /* @__PURE__ */ jsx32(
|
|
7245
7521
|
HomeCard,
|
|
7246
7522
|
{
|
|
7247
7523
|
onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
|
|
7248
|
-
children: /* @__PURE__ */
|
|
7249
|
-
/* @__PURE__ */
|
|
7250
|
-
/* @__PURE__ */
|
|
7524
|
+
children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-status`, "data-level": status.level ?? "operational", children: [
|
|
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 })
|
|
7251
7527
|
] })
|
|
7252
7528
|
}
|
|
7253
7529
|
) : null,
|
|
7254
|
-
content.length > 0 ? /* @__PURE__ */
|
|
7255
|
-
/* @__PURE__ */
|
|
7256
|
-
/* @__PURE__ */
|
|
7530
|
+
content.length > 0 ? /* @__PURE__ */ jsxs26("section", { class: `${p28}-home-content`, children: [
|
|
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(
|
|
7257
7533
|
ListRow,
|
|
7258
7534
|
{
|
|
7259
7535
|
title: item.title,
|
|
@@ -7269,20 +7545,20 @@ function HomeRoot(props2) {
|
|
|
7269
7545
|
}
|
|
7270
7546
|
var homeLayout = {
|
|
7271
7547
|
Icon: HomeIcon,
|
|
7272
|
-
Root: (props2) => /* @__PURE__ */
|
|
7548
|
+
Root: (props2) => /* @__PURE__ */ jsx32(HomeRoot, { ...props2 })
|
|
7273
7549
|
};
|
|
7274
7550
|
|
|
7275
7551
|
// src/ui/modules/news.tsx
|
|
7276
|
-
import { useEffect as useEffect12, useState as
|
|
7277
|
-
import { jsx as
|
|
7278
|
-
var
|
|
7552
|
+
import { useEffect as useEffect12, useState as useState11 } from "preact/hooks";
|
|
7553
|
+
import { jsx as jsx33, jsxs as jsxs27 } from "preact/jsx-runtime";
|
|
7554
|
+
var p29 = BRAND.cssPrefix;
|
|
7279
7555
|
var log15 = logger.scope("news");
|
|
7280
7556
|
function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7281
7557
|
const tags = config.contentTags;
|
|
7282
|
-
const [state, setState] =
|
|
7283
|
-
const [errorMsg, setErrorMsg] =
|
|
7284
|
-
const [items, setItems] =
|
|
7285
|
-
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);
|
|
7286
7562
|
useEffect12(() => {
|
|
7287
7563
|
let cancelled = false;
|
|
7288
7564
|
setState("loading");
|
|
@@ -7303,37 +7579,37 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7303
7579
|
};
|
|
7304
7580
|
}, [transport, tags, reloadKey, bus]);
|
|
7305
7581
|
function renderBody() {
|
|
7306
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7582
|
+
if (state === "loading") return /* @__PURE__ */ jsx33(ModuleState, { message: strings.newsLoading, strings });
|
|
7307
7583
|
if (state === "error") {
|
|
7308
|
-
return /* @__PURE__ */
|
|
7584
|
+
return /* @__PURE__ */ jsx33(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7309
7585
|
}
|
|
7310
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7311
|
-
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(
|
|
7312
7588
|
"button",
|
|
7313
7589
|
{
|
|
7314
7590
|
type: "button",
|
|
7315
|
-
class: `${
|
|
7591
|
+
class: `${p29}-news-card`,
|
|
7316
7592
|
onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
|
|
7317
7593
|
"data-testid": tid(TID.newsItem, item.id),
|
|
7318
7594
|
children: [
|
|
7319
|
-
item.image ? /* @__PURE__ */
|
|
7320
|
-
/* @__PURE__ */
|
|
7321
|
-
/* @__PURE__ */
|
|
7322
|
-
item.description ? /* @__PURE__ */
|
|
7595
|
+
item.image ? /* @__PURE__ */ jsx33("img", { class: `${p29}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
7596
|
+
/* @__PURE__ */ jsxs27("span", { class: `${p29}-news-body`, children: [
|
|
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
|
|
7323
7599
|
] })
|
|
7324
7600
|
]
|
|
7325
7601
|
},
|
|
7326
7602
|
item.id
|
|
7327
7603
|
)) });
|
|
7328
7604
|
}
|
|
7329
|
-
return /* @__PURE__ */
|
|
7330
|
-
/* @__PURE__ */
|
|
7331
|
-
/* @__PURE__ */
|
|
7605
|
+
return /* @__PURE__ */ jsxs27("div", { class: `${p29}-module`, children: [
|
|
7606
|
+
/* @__PURE__ */ jsx33(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx33(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
7607
|
+
/* @__PURE__ */ jsx33("div", { class: `${p29}-module-scroll`, children: renderBody() })
|
|
7332
7608
|
] });
|
|
7333
7609
|
}
|
|
7334
7610
|
var newsLayout = {
|
|
7335
7611
|
Icon: NewsIcon,
|
|
7336
|
-
Root: (props2) => /* @__PURE__ */
|
|
7612
|
+
Root: (props2) => /* @__PURE__ */ jsx33(NewsRoot, { ...props2 })
|
|
7337
7613
|
};
|
|
7338
7614
|
|
|
7339
7615
|
// src/ui/modules/registry.ts
|
|
@@ -7345,28 +7621,28 @@ var LAYOUTS = {
|
|
|
7345
7621
|
};
|
|
7346
7622
|
|
|
7347
7623
|
// src/ui/home-tab-bar.tsx
|
|
7348
|
-
import { jsx as
|
|
7349
|
-
var
|
|
7350
|
-
function HomeTabBar({ modules, activeTab, strings,
|
|
7351
|
-
return /* @__PURE__ */
|
|
7624
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "preact/jsx-runtime";
|
|
7625
|
+
var p30 = BRAND.cssPrefix;
|
|
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) => {
|
|
7352
7628
|
const Icon = LAYOUTS[m.layout].Icon;
|
|
7353
7629
|
const selected = m.id === activeTab;
|
|
7354
|
-
const
|
|
7355
|
-
return /* @__PURE__ */
|
|
7630
|
+
const showDot = m.layout === "chat" && hasUnread;
|
|
7631
|
+
return /* @__PURE__ */ jsxs28(
|
|
7356
7632
|
"button",
|
|
7357
7633
|
{
|
|
7358
7634
|
type: "button",
|
|
7359
7635
|
role: "tab",
|
|
7360
7636
|
"aria-selected": selected,
|
|
7361
|
-
class: `${
|
|
7637
|
+
class: `${p30}-tab`,
|
|
7362
7638
|
onClick: () => onSelect(m.id),
|
|
7363
7639
|
"data-testid": tid(TID.tab, m.id),
|
|
7364
7640
|
children: [
|
|
7365
|
-
/* @__PURE__ */
|
|
7366
|
-
/* @__PURE__ */
|
|
7367
|
-
|
|
7641
|
+
/* @__PURE__ */ jsxs28("span", { class: `${p30}-tab-icon`, "aria-hidden": "true", children: [
|
|
7642
|
+
/* @__PURE__ */ jsx34(Icon, {}),
|
|
7643
|
+
showDot ? /* @__PURE__ */ jsx34("span", { class: `${p30}-tab-badge`, "data-testid": TID.tabBadge, "aria-label": "Unread" }) : null
|
|
7368
7644
|
] }),
|
|
7369
|
-
/* @__PURE__ */
|
|
7645
|
+
/* @__PURE__ */ jsx34("span", { class: `${p30}-tab-label`, children: localizeText(strings, m.label) })
|
|
7370
7646
|
]
|
|
7371
7647
|
},
|
|
7372
7648
|
m.id
|
|
@@ -7375,12 +7651,12 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
|
7375
7651
|
}
|
|
7376
7652
|
|
|
7377
7653
|
// src/ui/iframe-view.tsx
|
|
7378
|
-
import { jsx as
|
|
7379
|
-
var
|
|
7654
|
+
import { jsx as jsx35, jsxs as jsxs29 } from "preact/jsx-runtime";
|
|
7655
|
+
var p31 = BRAND.cssPrefix;
|
|
7380
7656
|
var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
|
|
7381
7657
|
function IframeView({ url, title, strings, onBack, actions }) {
|
|
7382
|
-
return /* @__PURE__ */
|
|
7383
|
-
/* @__PURE__ */
|
|
7658
|
+
return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
|
|
7659
|
+
/* @__PURE__ */ jsx35(
|
|
7384
7660
|
BackHeader,
|
|
7385
7661
|
{
|
|
7386
7662
|
title: title || strings.moduleBack,
|
|
@@ -7389,10 +7665,10 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7389
7665
|
actions
|
|
7390
7666
|
}
|
|
7391
7667
|
),
|
|
7392
|
-
/* @__PURE__ */
|
|
7668
|
+
/* @__PURE__ */ jsx35(
|
|
7393
7669
|
"iframe",
|
|
7394
7670
|
{
|
|
7395
|
-
class: `${
|
|
7671
|
+
class: `${p31}-content-frame`,
|
|
7396
7672
|
src: url,
|
|
7397
7673
|
title: title || "content",
|
|
7398
7674
|
sandbox: SANDBOX,
|
|
@@ -7405,15 +7681,15 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7405
7681
|
}
|
|
7406
7682
|
|
|
7407
7683
|
// src/ui/content-view.tsx
|
|
7408
|
-
import { useCallback as useCallback3, useEffect as useEffect13, useState as
|
|
7409
|
-
import { jsx as
|
|
7410
|
-
var
|
|
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";
|
|
7686
|
+
var p32 = BRAND.cssPrefix;
|
|
7411
7687
|
var log16 = logger.scope("content");
|
|
7412
7688
|
var READ_DWELL_MS = 5e3;
|
|
7413
7689
|
function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
7414
|
-
const [item, setItem] =
|
|
7415
|
-
const [failed, setFailed] =
|
|
7416
|
-
const [reloadKey, setReloadKey] =
|
|
7690
|
+
const [item, setItem] = useState12(null);
|
|
7691
|
+
const [failed, setFailed] = useState12(false);
|
|
7692
|
+
const [reloadKey, setReloadKey] = useState12(0);
|
|
7417
7693
|
const retry = useCallback3(() => {
|
|
7418
7694
|
setFailed(false);
|
|
7419
7695
|
setItem(null);
|
|
@@ -7451,16 +7727,16 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7451
7727
|
[bus, id]
|
|
7452
7728
|
);
|
|
7453
7729
|
function renderBody() {
|
|
7454
|
-
if (failed) return /* @__PURE__ */
|
|
7455
|
-
if (item === null) return /* @__PURE__ */
|
|
7456
|
-
return /* @__PURE__ */
|
|
7457
|
-
item.image ? /* @__PURE__ */
|
|
7458
|
-
item.description ? /* @__PURE__ */
|
|
7459
|
-
/* @__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 });
|
|
7732
|
+
return /* @__PURE__ */ jsxs30("article", { class: `${p32}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
|
|
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 ?? "" })
|
|
7460
7736
|
] });
|
|
7461
7737
|
}
|
|
7462
|
-
return /* @__PURE__ */
|
|
7463
|
-
/* @__PURE__ */
|
|
7738
|
+
return /* @__PURE__ */ jsxs30("div", { class: `${p32}-module`, children: [
|
|
7739
|
+
/* @__PURE__ */ jsx36(
|
|
7464
7740
|
BackHeader,
|
|
7465
7741
|
{
|
|
7466
7742
|
title: item?.title || title || strings.moduleBack,
|
|
@@ -7470,19 +7746,19 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7470
7746
|
testid: TID.backHeader
|
|
7471
7747
|
}
|
|
7472
7748
|
),
|
|
7473
|
-
/* @__PURE__ */
|
|
7749
|
+
/* @__PURE__ */ jsx36("div", { class: `${p32}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
|
|
7474
7750
|
] });
|
|
7475
7751
|
}
|
|
7476
7752
|
|
|
7477
7753
|
// src/ui/messenger-home.tsx
|
|
7478
|
-
import { jsx as
|
|
7479
|
-
var
|
|
7754
|
+
import { jsx as jsx37, jsxs as jsxs31 } from "preact/jsx-runtime";
|
|
7755
|
+
var p33 = BRAND.cssPrefix;
|
|
7480
7756
|
function MessengerHome({
|
|
7481
7757
|
panelProps,
|
|
7482
7758
|
enabledModules,
|
|
7483
7759
|
nav,
|
|
7484
7760
|
bus,
|
|
7485
|
-
|
|
7761
|
+
hasUnread,
|
|
7486
7762
|
onSelectConversation,
|
|
7487
7763
|
onStartNewConversation,
|
|
7488
7764
|
onSetPanelSize
|
|
@@ -7547,12 +7823,12 @@ function MessengerHome({
|
|
|
7547
7823
|
bus,
|
|
7548
7824
|
panelProps
|
|
7549
7825
|
});
|
|
7550
|
-
const plainActions = /* @__PURE__ */
|
|
7826
|
+
const plainActions = /* @__PURE__ */ jsx37(HeaderActions, { panelProps, variant: "plain" });
|
|
7551
7827
|
if (activeModule) visitedRef.current.add(activeModule.id);
|
|
7552
7828
|
const visitedTabs = enabledModules.filter((m) => visitedRef.current.has(m.id));
|
|
7553
7829
|
const tabRoot = (module) => {
|
|
7554
7830
|
if (module.layout === "chat") {
|
|
7555
|
-
return /* @__PURE__ */
|
|
7831
|
+
return /* @__PURE__ */ jsx37(
|
|
7556
7832
|
PanelContent,
|
|
7557
7833
|
{
|
|
7558
7834
|
...panelProps,
|
|
@@ -7563,14 +7839,14 @@ function MessengerHome({
|
|
|
7563
7839
|
);
|
|
7564
7840
|
}
|
|
7565
7841
|
const Root = LAYOUTS[module.layout].Root;
|
|
7566
|
-
return Root ? /* @__PURE__ */
|
|
7842
|
+
return Root ? /* @__PURE__ */ jsx37(Root, { ...screenProps(module) }) : null;
|
|
7567
7843
|
};
|
|
7568
7844
|
const renderReader = () => {
|
|
7569
7845
|
if (top?.kind === "iframe") {
|
|
7570
|
-
return /* @__PURE__ */
|
|
7846
|
+
return /* @__PURE__ */ jsx37(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
|
|
7571
7847
|
}
|
|
7572
7848
|
if (top?.kind === "content") {
|
|
7573
|
-
return /* @__PURE__ */
|
|
7849
|
+
return /* @__PURE__ */ jsx37(
|
|
7574
7850
|
ContentView,
|
|
7575
7851
|
{
|
|
7576
7852
|
id: top.id,
|
|
@@ -7585,33 +7861,33 @@ function MessengerHome({
|
|
|
7585
7861
|
}
|
|
7586
7862
|
return null;
|
|
7587
7863
|
};
|
|
7588
|
-
return /* @__PURE__ */
|
|
7864
|
+
return /* @__PURE__ */ jsxs31(
|
|
7589
7865
|
"div",
|
|
7590
7866
|
{
|
|
7591
7867
|
ref: containerRef,
|
|
7592
|
-
class: `${
|
|
7868
|
+
class: `${p33}-panel ${p33}-messenger`,
|
|
7593
7869
|
role: "dialog",
|
|
7594
7870
|
"aria-modal": "false",
|
|
7595
7871
|
"aria-label": strings.panelTitle,
|
|
7596
7872
|
style: { position: "relative" },
|
|
7597
7873
|
"data-testid": TID.messengerHome,
|
|
7598
7874
|
children: [
|
|
7599
|
-
/* @__PURE__ */
|
|
7600
|
-
visitedTabs.map((m) => /* @__PURE__ */
|
|
7875
|
+
/* @__PURE__ */ jsxs31("div", { class: `${p33}-messenger-body`, children: [
|
|
7876
|
+
visitedTabs.map((m) => /* @__PURE__ */ jsx37("div", { class: `${p33}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
|
|
7601
7877
|
renderReader()
|
|
7602
7878
|
] }),
|
|
7603
|
-
showTabBar ? /* @__PURE__ */
|
|
7879
|
+
showTabBar ? /* @__PURE__ */ jsx37(
|
|
7604
7880
|
HomeTabBar,
|
|
7605
7881
|
{
|
|
7606
7882
|
modules: enabledModules,
|
|
7607
7883
|
activeTab: navState.activeTab,
|
|
7608
7884
|
strings,
|
|
7609
|
-
|
|
7885
|
+
hasUnread,
|
|
7610
7886
|
onSelect: nav.switchTab
|
|
7611
7887
|
}
|
|
7612
7888
|
) : null,
|
|
7613
|
-
/* @__PURE__ */
|
|
7614
|
-
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(
|
|
7615
7891
|
ResizeGrip,
|
|
7616
7892
|
{
|
|
7617
7893
|
panelEl: containerRef.current,
|
|
@@ -7628,40 +7904,40 @@ function MessengerHome({
|
|
|
7628
7904
|
}
|
|
7629
7905
|
|
|
7630
7906
|
// src/ui/modules-empty.tsx
|
|
7631
|
-
import { jsx as
|
|
7632
|
-
var
|
|
7907
|
+
import { jsx as jsx38, jsxs as jsxs32 } from "preact/jsx-runtime";
|
|
7908
|
+
var p34 = BRAND.cssPrefix;
|
|
7633
7909
|
function ModulesEmpty({ strings, onClose }) {
|
|
7634
|
-
return /* @__PURE__ */
|
|
7910
|
+
return /* @__PURE__ */ jsxs32(
|
|
7635
7911
|
"div",
|
|
7636
7912
|
{
|
|
7637
|
-
class: `${
|
|
7913
|
+
class: `${p34}-panel ${p34}-modules-empty`,
|
|
7638
7914
|
role: "dialog",
|
|
7639
7915
|
"aria-label": strings.panelTitle,
|
|
7640
7916
|
"data-testid": TID.modulesEmpty,
|
|
7641
7917
|
children: [
|
|
7642
|
-
onClose ? /* @__PURE__ */
|
|
7918
|
+
onClose ? /* @__PURE__ */ jsx38(
|
|
7643
7919
|
"button",
|
|
7644
7920
|
{
|
|
7645
7921
|
type: "button",
|
|
7646
|
-
class: `${
|
|
7922
|
+
class: `${p34}-icon-btn ${p34}-modules-empty-close`,
|
|
7647
7923
|
onClick: onClose,
|
|
7648
7924
|
"aria-label": strings.close,
|
|
7649
7925
|
title: strings.close,
|
|
7650
|
-
children: /* @__PURE__ */
|
|
7926
|
+
children: /* @__PURE__ */ jsx38(CloseIcon, {})
|
|
7651
7927
|
}
|
|
7652
7928
|
) : null,
|
|
7653
|
-
/* @__PURE__ */
|
|
7929
|
+
/* @__PURE__ */ jsx38("p", { class: `${p34}-modules-empty-text`, children: strings.modulesEmpty })
|
|
7654
7930
|
]
|
|
7655
7931
|
}
|
|
7656
7932
|
);
|
|
7657
7933
|
}
|
|
7658
7934
|
|
|
7659
7935
|
// src/ui/use-launcher-callout.ts
|
|
7660
|
-
import { useCallback as useCallback5, useEffect as useEffect15, useState as
|
|
7936
|
+
import { useCallback as useCallback5, useEffect as useEffect15, useState as useState13 } from "preact/hooks";
|
|
7661
7937
|
function useLauncherCallout({ callout, persistence }) {
|
|
7662
7938
|
const textKey = callout?.text ?? "";
|
|
7663
7939
|
const persistent = callout?.persistent ?? true;
|
|
7664
|
-
const [dismissed, setDismissed] =
|
|
7940
|
+
const [dismissed, setDismissed] = useState13(() => persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7665
7941
|
useEffect15(() => {
|
|
7666
7942
|
setDismissed(persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7667
7943
|
}, [textKey, persistent, persistence]);
|
|
@@ -7673,9 +7949,9 @@ function useLauncherCallout({ callout, persistence }) {
|
|
|
7673
7949
|
}
|
|
7674
7950
|
|
|
7675
7951
|
// src/ui/app.tsx
|
|
7676
|
-
import { jsx as
|
|
7952
|
+
import { jsx as jsx39, jsxs as jsxs33 } from "preact/jsx-runtime";
|
|
7677
7953
|
var log17 = logger.scope("app");
|
|
7678
|
-
var
|
|
7954
|
+
var p35 = BRAND.cssPrefix;
|
|
7679
7955
|
function makeLocalizedWelcome(w, strings) {
|
|
7680
7956
|
return makeInstantWelcomeMessage({ ...w, text: localizeText(strings, w.text) });
|
|
7681
7957
|
}
|
|
@@ -7690,21 +7966,21 @@ function isAbortError(error) {
|
|
|
7690
7966
|
return error instanceof DOMException ? error.name === "AbortError" : error?.name === "AbortError";
|
|
7691
7967
|
}
|
|
7692
7968
|
function App({ options, hostElement, bus }) {
|
|
7693
|
-
const [persistence] =
|
|
7969
|
+
const [persistence] = useState14(
|
|
7694
7970
|
() => createPersistence(options.widgetId, options.storage, options.aiAgentDeploymentId)
|
|
7695
7971
|
);
|
|
7696
|
-
const [visitorId, setVisitorId] =
|
|
7972
|
+
const [visitorId, setVisitorId] = useState14(() => persistence.getVisitorId());
|
|
7697
7973
|
const initialSettings = persistence.loadUserPrefs();
|
|
7698
|
-
const [activeLocale, setActiveLocale] =
|
|
7699
|
-
const [activeThemeMode, setActiveThemeMode] =
|
|
7974
|
+
const [activeLocale, setActiveLocale] = useState14(() => initialSettings.locale ?? options.locale);
|
|
7975
|
+
const [activeThemeMode, setActiveThemeMode] = useState14(
|
|
7700
7976
|
() => initialSettings.themeMode ?? options.themeMode
|
|
7701
7977
|
);
|
|
7702
|
-
const [activeTextSize, setActiveTextSize] =
|
|
7978
|
+
const [activeTextSize, setActiveTextSize] = useState14(() => initialSettings.textSize ?? options.textSize);
|
|
7703
7979
|
const conversationIdSig = useSignal(persistence.loadConversationId());
|
|
7704
7980
|
const messagesSig = useSignal([]);
|
|
7705
|
-
const
|
|
7706
|
-
const [loadingMessages, setLoadingMessages] =
|
|
7707
|
-
const [formMarkers, setFormMarkers] =
|
|
7981
|
+
const hasUnreadSig = useSignal(false);
|
|
7982
|
+
const [loadingMessages, setLoadingMessages] = useState14(false);
|
|
7983
|
+
const [formMarkers, setFormMarkers] = useState14([]);
|
|
7708
7984
|
function landingTab() {
|
|
7709
7985
|
const list = options.modules.list;
|
|
7710
7986
|
const ids = new Set(list.map((m) => m.id));
|
|
@@ -7723,15 +7999,15 @@ function App({ options, hostElement, bus }) {
|
|
|
7723
7999
|
const homeNav = homeNavRef.current;
|
|
7724
8000
|
const chatTabIdRef = useRef9(void 0);
|
|
7725
8001
|
chatTabIdRef.current = chatTabId();
|
|
7726
|
-
const [conversationReady, setConversationReady] =
|
|
7727
|
-
const [remoteForms, setRemoteForms] =
|
|
7728
|
-
const [formsReady, setFormsReady] =
|
|
8002
|
+
const [conversationReady, setConversationReady] = useState14(false);
|
|
8003
|
+
const [remoteForms, setRemoteForms] = useState14(null);
|
|
8004
|
+
const [formsReady, setFormsReady] = useState14(false);
|
|
7729
8005
|
const isInlineLike = options.mode === "standalone" || options.mode === "inline";
|
|
7730
8006
|
const initialPanelRef = useRef9(
|
|
7731
8007
|
resolveInitialPanelState(options, currentViewportWidth(), persistence.loadPanelOpen(), persistence.loadPanelSize())
|
|
7732
8008
|
);
|
|
7733
|
-
const [isOpen, setIsOpen] =
|
|
7734
|
-
const [activated, setActivated] =
|
|
8009
|
+
const [isOpen, setIsOpen] = useState14(initialPanelRef.current.panelOpen);
|
|
8010
|
+
const [activated, setActivated] = useState14(initialPanelRef.current.panelOpen);
|
|
7735
8011
|
const activatedRef = useRef9(activated);
|
|
7736
8012
|
activatedRef.current = activated;
|
|
7737
8013
|
const pendingThreadRef = useRef9(false);
|
|
@@ -7740,7 +8016,7 @@ function App({ options, hostElement, bus }) {
|
|
|
7740
8016
|
if (isOpen) setActivated(true);
|
|
7741
8017
|
}, [isOpen]);
|
|
7742
8018
|
const initialPanelApplied = useRef9(false);
|
|
7743
|
-
const [launcherLeaving, setLauncherLeaving] =
|
|
8019
|
+
const [launcherLeaving, setLauncherLeaving] = useState14(false);
|
|
7744
8020
|
const { dismissed: calloutDismissed, dismissCallout: dismissCalloutRaw } = useLauncherCallout({
|
|
7745
8021
|
callout: options.launcher.callout,
|
|
7746
8022
|
persistence
|
|
@@ -7751,21 +8027,21 @@ function App({ options, hostElement, bus }) {
|
|
|
7751
8027
|
bus.emit("calloutDismiss", void 0);
|
|
7752
8028
|
dismissCalloutRaw();
|
|
7753
8029
|
}, [bus, dismissCalloutRaw]);
|
|
7754
|
-
const [panelSize, setPanelSize] =
|
|
8030
|
+
const [panelSize, setPanelSize] = useState14(initialPanelRef.current.panelSize);
|
|
7755
8031
|
const initialSizeApplied = useRef9(false);
|
|
7756
|
-
const [view, setView] =
|
|
7757
|
-
const [canSend, setCanSend] =
|
|
7758
|
-
const [streaming, setStreaming] =
|
|
7759
|
-
const [agent, setAgent] =
|
|
7760
|
-
const [suggestions, setSuggestions] =
|
|
7761
|
-
const [activeCancel, setActiveCancel] =
|
|
7762
|
-
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);
|
|
7763
8039
|
const stringsRef = useRef9(options.strings);
|
|
7764
|
-
const [parsedSite, setParsedSite] =
|
|
7765
|
-
const [parsedBlocks, setParsedBlocks] =
|
|
7766
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
7767
|
-
const [formContext, setFormContext] =
|
|
7768
|
-
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(
|
|
7769
8045
|
() => new AgentTransport({
|
|
7770
8046
|
agentApiBaseUrl: options.agentApiBaseUrl,
|
|
7771
8047
|
dataApiBaseUrl: options.dataApiBaseUrl,
|
|
@@ -7777,8 +8053,8 @@ function App({ options, hostElement, bus }) {
|
|
|
7777
8053
|
endpoints: options.endpoints
|
|
7778
8054
|
})
|
|
7779
8055
|
);
|
|
7780
|
-
const [reducer] =
|
|
7781
|
-
const [feedback] =
|
|
8056
|
+
const [reducer] = useState14(() => new StreamReducer(messagesSig));
|
|
8057
|
+
const [feedback] = useState14(() => new FeedbackBus(options.sound, options.haptics));
|
|
7782
8058
|
const patchAndSync = useCallback6(
|
|
7783
8059
|
(patch) => {
|
|
7784
8060
|
persistence.patchUserPrefs(patch);
|
|
@@ -8353,6 +8629,20 @@ function App({ options, hostElement, bus }) {
|
|
|
8353
8629
|
},
|
|
8354
8630
|
[streaming, messagesSig]
|
|
8355
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
|
+
);
|
|
8356
8646
|
const toolInteraction = useMemo3(
|
|
8357
8647
|
() => ({
|
|
8358
8648
|
humanInLoop: options.features.humanInLoop,
|
|
@@ -8484,15 +8774,23 @@ function App({ options, hostElement, bus }) {
|
|
|
8484
8774
|
const refreshUnread = useCallback6(() => {
|
|
8485
8775
|
if (!options.modules.list.some((m) => m.layout === "chat")) return;
|
|
8486
8776
|
transport.listConversations({ limit: 50 }).then((res) => {
|
|
8487
|
-
|
|
8777
|
+
hasUnreadSig.value = res.conversations.some((c) => c.hasUnread);
|
|
8488
8778
|
}).catch((err) => log17.debug("refreshUnread failed (non-fatal)", { err }));
|
|
8489
|
-
}, [transport, options.modules,
|
|
8779
|
+
}, [transport, options.modules, hasUnreadSig]);
|
|
8490
8780
|
const unreadSeeded = useRef9(false);
|
|
8491
8781
|
useEffect16(() => {
|
|
8492
8782
|
if (!activated || !conversationReady || unreadSeeded.current) return;
|
|
8493
8783
|
unreadSeeded.current = true;
|
|
8494
8784
|
refreshUnread();
|
|
8495
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]);
|
|
8496
8794
|
const handleOpen = useCallback6(() => {
|
|
8497
8795
|
log17.info("open", { mode: options.mode });
|
|
8498
8796
|
feedback.unlock();
|
|
@@ -8725,7 +9023,9 @@ function App({ options, hostElement, bus }) {
|
|
|
8725
9023
|
// `openForm()` command, so it bypasses frequency dedupe by design.
|
|
8726
9024
|
onFormFill: (formId) => forms.fire("manual", formId),
|
|
8727
9025
|
tool: toolInteraction,
|
|
8728
|
-
onRetry: handleRetry
|
|
9026
|
+
onRetry: handleRetry,
|
|
9027
|
+
onMessageFeedback: handleMessageFeedback,
|
|
9028
|
+
onMessageSeen: handleMessageSeen
|
|
8729
9029
|
};
|
|
8730
9030
|
const onSelectConversation = (conversationId) => {
|
|
8731
9031
|
void handleSelectHistoryConversation(conversationId);
|
|
@@ -8737,19 +9037,19 @@ function App({ options, hostElement, bus }) {
|
|
|
8737
9037
|
const renderSurface = (size) => {
|
|
8738
9038
|
const closeable = isActionVisible("close", effectiveOptions.mode, size);
|
|
8739
9039
|
if (enabledModules.length === 0) {
|
|
8740
|
-
return /* @__PURE__ */
|
|
9040
|
+
return /* @__PURE__ */ jsx39(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
|
|
8741
9041
|
}
|
|
8742
9042
|
if (enabledModules.length === 1 && enabledModules[0]?.layout === "chat") {
|
|
8743
|
-
return /* @__PURE__ */
|
|
9043
|
+
return /* @__PURE__ */ jsx39(Panel, { ...panelProps, panelSize: size });
|
|
8744
9044
|
}
|
|
8745
|
-
return /* @__PURE__ */
|
|
9045
|
+
return /* @__PURE__ */ jsx39(
|
|
8746
9046
|
MessengerHome,
|
|
8747
9047
|
{
|
|
8748
9048
|
panelProps: { ...panelProps, panelSize: size, onClose: closeable ? handleClose : void 0 },
|
|
8749
9049
|
enabledModules,
|
|
8750
9050
|
nav: homeNav,
|
|
8751
9051
|
bus,
|
|
8752
|
-
|
|
9052
|
+
hasUnread: hasUnreadSig.value,
|
|
8753
9053
|
onSelectConversation,
|
|
8754
9054
|
onStartNewConversation: handleNewChat,
|
|
8755
9055
|
onSetPanelSize: setPanelSize
|
|
@@ -8761,7 +9061,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8761
9061
|
void handleSelectHistoryConversation(chat.conversationId);
|
|
8762
9062
|
};
|
|
8763
9063
|
const conversationsEnabled = enabledModules.some((m) => m.layout === "chat");
|
|
8764
|
-
return /* @__PURE__ */
|
|
9064
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: /* @__PURE__ */ jsx39(
|
|
8765
9065
|
PageShell,
|
|
8766
9066
|
{
|
|
8767
9067
|
site: parsedSite,
|
|
@@ -8782,15 +9082,15 @@ function App({ options, hostElement, bus }) {
|
|
|
8782
9082
|
}
|
|
8783
9083
|
if (isInlineLike) {
|
|
8784
9084
|
const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
|
|
8785
|
-
return /* @__PURE__ */
|
|
9085
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: renderSurface(inlineSize) });
|
|
8786
9086
|
}
|
|
8787
9087
|
const drawerEdgeTab = options.mode === "drawer";
|
|
8788
9088
|
const triggerOwnedByPage = options.mode === "modal";
|
|
8789
9089
|
const launcherVisible = !triggerOwnedByPage && !options.launcher.hidden && (!isOpen || launcherLeaving);
|
|
8790
9090
|
const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
|
|
8791
|
-
return /* @__PURE__ */
|
|
8792
|
-
isOpen || activated ? /* @__PURE__ */
|
|
8793
|
-
launcherVisible ? /* @__PURE__ */
|
|
9091
|
+
return /* @__PURE__ */ jsxs33("div", { class: `${p35}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
|
|
9092
|
+
isOpen || activated ? /* @__PURE__ */ jsx39("div", { class: `${p35}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
|
|
9093
|
+
launcherVisible ? /* @__PURE__ */ jsx39(
|
|
8794
9094
|
Launcher,
|
|
8795
9095
|
{
|
|
8796
9096
|
onToggle: handleOpen,
|
|
@@ -8800,7 +9100,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8800
9100
|
edgeTab: drawerEdgeTab
|
|
8801
9101
|
}
|
|
8802
9102
|
) : null,
|
|
8803
|
-
calloutToRender ? /* @__PURE__ */
|
|
9103
|
+
calloutToRender ? /* @__PURE__ */ jsx39(
|
|
8804
9104
|
LauncherCallout,
|
|
8805
9105
|
{
|
|
8806
9106
|
callout: calloutToRender,
|
|
@@ -8865,34 +9165,37 @@ var TRACKED = {
|
|
|
8865
9165
|
expand: (on) => ({ on }),
|
|
8866
9166
|
fullscreen: (on) => ({ on }),
|
|
8867
9167
|
// Conversation funnel. `send` is the key conversion; text never rides.
|
|
8868
|
-
send: (
|
|
8869
|
-
message: (
|
|
9168
|
+
send: (p36) => ({ attachments: p36.attachmentCount }),
|
|
9169
|
+
message: (p36) => ({ role: p36.role }),
|
|
8870
9170
|
stop: () => void 0,
|
|
8871
9171
|
clear: () => void 0,
|
|
8872
9172
|
suggestion: () => void 0,
|
|
8873
|
-
toggleHistory: (
|
|
9173
|
+
toggleHistory: (p36) => ({ view: p36.view }),
|
|
8874
9174
|
handshake: () => void 0,
|
|
8875
9175
|
// Forms + human-in-the-loop — ids and outcomes, never values.
|
|
8876
|
-
formSubmit: (
|
|
9176
|
+
formSubmit: (p36) => ({ formId: p36.formId, skipped: p36.skipped }),
|
|
8877
9177
|
toolResult: () => void 0,
|
|
8878
|
-
toolDecision: (
|
|
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,
|
|
8879
9182
|
// Content — ids, tags + counts only; titles/bodies never ride.
|
|
8880
|
-
contentView: (
|
|
8881
|
-
contentOpen: (
|
|
8882
|
-
contentSearch: (
|
|
8883
|
-
contentRead: (
|
|
8884
|
-
contentLinkClick: (
|
|
9183
|
+
contentView: (p36) => ({ section: p36.section, tags: p36.tags, count: p36.count }),
|
|
9184
|
+
contentOpen: (p36) => ({ contentId: p36.contentId, tags: p36.tags }),
|
|
9185
|
+
contentSearch: (p36) => ({ qlen: p36.queryLength, hits: p36.hitCount }),
|
|
9186
|
+
contentRead: (p36) => ({ contentId: p36.contentId }),
|
|
9187
|
+
contentLinkClick: (p36) => ({ contentId: p36.contentId }),
|
|
8885
9188
|
// Composer / attachments / voice.
|
|
8886
|
-
attach: (
|
|
9189
|
+
attach: (p36) => ({ count: p36.count, bytes: p36.totalBytes }),
|
|
8887
9190
|
voiceStart: () => void 0,
|
|
8888
|
-
voiceStop: (
|
|
9191
|
+
voiceStop: (p36) => ({ ms: p36.durationMs }),
|
|
8889
9192
|
voiceCancel: () => void 0,
|
|
8890
9193
|
// Preferences — how visitors tune the surface.
|
|
8891
9194
|
localeChange: (locale) => ({ locale }),
|
|
8892
9195
|
themeChange: (theme) => ({ theme }),
|
|
8893
9196
|
textSizeChange: (size) => ({ size }),
|
|
8894
|
-
soundToggle: (
|
|
8895
|
-
sidebarToggle: (
|
|
9197
|
+
soundToggle: (p36) => ({ muted: p36.muted }),
|
|
9198
|
+
sidebarToggle: (p36) => ({ collapsed: p36.collapsed }),
|
|
8896
9199
|
calloutDismiss: () => void 0,
|
|
8897
9200
|
// Health signal only — the error object itself never leaves the page.
|
|
8898
9201
|
error: () => void 0
|
|
@@ -9101,6 +9404,9 @@ var EVENT_NAMES = [
|
|
|
9101
9404
|
"formSubmit",
|
|
9102
9405
|
"toolResult",
|
|
9103
9406
|
"toolDecision",
|
|
9407
|
+
// Feedback + read tracking
|
|
9408
|
+
"messageFeedback",
|
|
9409
|
+
"messageSeen",
|
|
9104
9410
|
// Content (news / help / home articles)
|
|
9105
9411
|
"contentView",
|
|
9106
9412
|
"contentOpen",
|