@helpai/elements 0.54.3 → 0.56.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 +29 -27
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +29 -27
- package/elements.cjs.js.map +4 -4
- package/elements.esm.js +29 -27
- package/elements.esm.js.map +4 -4
- package/elements.js +29 -27
- package/elements.js.map +4 -4
- package/index.d.ts +46 -3
- package/index.mjs +1002 -643
- 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 +999 -643
package/web-component.mjs
CHANGED
|
@@ -34,8 +34,8 @@ var STRINGS_EN = {
|
|
|
34
34
|
attachmentMimeRejected: "File type not supported",
|
|
35
35
|
attachmentTooLarge: "File is too large",
|
|
36
36
|
attachmentTooMany: "Attachment limit reached",
|
|
37
|
-
conversationClosed: "This
|
|
38
|
-
conversationLoading: "Loading
|
|
37
|
+
conversationClosed: "This chat is closed",
|
|
38
|
+
conversationLoading: "Loading chat\u2026",
|
|
39
39
|
close: "Close",
|
|
40
40
|
collapse: "Collapse",
|
|
41
41
|
collapseSidebar: "Collapse sidebar",
|
|
@@ -54,10 +54,10 @@ var STRINGS_EN = {
|
|
|
54
54
|
fullscreen: "Fullscreen",
|
|
55
55
|
history: "History",
|
|
56
56
|
historyBack: "Back to chat",
|
|
57
|
-
historyEmpty: "No previous
|
|
58
|
-
historyLoading: "Loading your
|
|
59
|
-
historyContinue: "Continue the
|
|
60
|
-
historyTitle: "
|
|
57
|
+
historyEmpty: "No previous chats yet",
|
|
58
|
+
historyLoading: "Loading your chats\u2026",
|
|
59
|
+
historyContinue: "Continue the chat",
|
|
60
|
+
historyTitle: "Chat history",
|
|
61
61
|
language: "Language",
|
|
62
62
|
launcherOpen: "Open chat",
|
|
63
63
|
launcherLabel: "Chat with us",
|
|
@@ -65,14 +65,14 @@ var STRINGS_EN = {
|
|
|
65
65
|
micStop: "Stop voice input",
|
|
66
66
|
micUnsupported: "Voice input is not supported in this browser",
|
|
67
67
|
moreActions: "More actions",
|
|
68
|
-
newConversation: "New
|
|
68
|
+
newConversation: "New chat",
|
|
69
69
|
panelTitle: "Chat",
|
|
70
70
|
resizeHandle: "Drag to resize",
|
|
71
71
|
scrollToBottom: "Scroll to latest",
|
|
72
72
|
send: "Send",
|
|
73
73
|
soundOff: "Sound off",
|
|
74
74
|
soundOn: "Sound on",
|
|
75
|
-
startNewConversation: "Start a new
|
|
75
|
+
startNewConversation: "Start a new chat",
|
|
76
76
|
stop: "Stop",
|
|
77
77
|
theme: "Theme",
|
|
78
78
|
themeAuto: "Auto",
|
|
@@ -88,9 +88,15 @@ var STRINGS_EN = {
|
|
|
88
88
|
usedTool: "Used tool",
|
|
89
89
|
toolResult: "Result",
|
|
90
90
|
sources: "Sources",
|
|
91
|
+
feedbackUp: "Good response",
|
|
92
|
+
feedbackDown: "Bad response",
|
|
93
|
+
feedbackThanks: "Thanks for your feedback",
|
|
94
|
+
copy: "Copy",
|
|
95
|
+
copied: "Copied",
|
|
96
|
+
newMessages: "New messages",
|
|
91
97
|
// ── Messenger modules ──────────────────────────────────────────
|
|
92
98
|
tabHome: "Home",
|
|
93
|
-
tabConversations: "
|
|
99
|
+
tabConversations: "Chats",
|
|
94
100
|
tabHelp: "Help",
|
|
95
101
|
tabNews: "News",
|
|
96
102
|
modulesEmpty: "Nothing here yet",
|
|
@@ -167,8 +173,8 @@ var STRINGS_FR = {
|
|
|
167
173
|
attachmentMimeRejected: "Type de fichier non pris en charge",
|
|
168
174
|
attachmentTooLarge: "Le fichier est trop volumineux",
|
|
169
175
|
attachmentTooMany: "Limite de pi\xE8ces jointes atteinte",
|
|
170
|
-
conversationClosed: "
|
|
171
|
-
conversationLoading: "Chargement
|
|
176
|
+
conversationClosed: "Ce chat est ferm\xE9",
|
|
177
|
+
conversationLoading: "Chargement du chat\u2026",
|
|
172
178
|
close: "Fermer",
|
|
173
179
|
collapse: "R\xE9duire",
|
|
174
180
|
collapseSidebar: "R\xE9duire la barre lat\xE9rale",
|
|
@@ -187,10 +193,10 @@ var STRINGS_FR = {
|
|
|
187
193
|
fullscreen: "Plein \xE9cran",
|
|
188
194
|
history: "Historique",
|
|
189
195
|
historyBack: "Retour au chat",
|
|
190
|
-
historyEmpty: "
|
|
191
|
-
historyContinue: "Poursuivre
|
|
192
|
-
historyLoading: "Chargement de vos
|
|
193
|
-
historyTitle: "Historique des
|
|
196
|
+
historyEmpty: "Aucun chat pour le moment",
|
|
197
|
+
historyContinue: "Poursuivre le chat",
|
|
198
|
+
historyLoading: "Chargement de vos chats\u2026",
|
|
199
|
+
historyTitle: "Historique des chats",
|
|
194
200
|
language: "Langue",
|
|
195
201
|
launcherOpen: "Ouvrir le chat",
|
|
196
202
|
launcherLabel: "Discuter avec nous",
|
|
@@ -198,14 +204,14 @@ var STRINGS_FR = {
|
|
|
198
204
|
micStop: "Arr\xEAter la saisie vocale",
|
|
199
205
|
micUnsupported: "La saisie vocale n'est pas prise en charge par ce navigateur",
|
|
200
206
|
moreActions: "Plus d'actions",
|
|
201
|
-
newConversation: "
|
|
207
|
+
newConversation: "Nouveau chat",
|
|
202
208
|
panelTitle: "Chat",
|
|
203
209
|
resizeHandle: "Glisser pour redimensionner",
|
|
204
210
|
scrollToBottom: "Aller au plus r\xE9cent",
|
|
205
211
|
send: "Envoyer",
|
|
206
212
|
soundOff: "Son d\xE9sactiv\xE9",
|
|
207
213
|
soundOn: "Son activ\xE9",
|
|
208
|
-
startNewConversation: "D\xE9marrer
|
|
214
|
+
startNewConversation: "D\xE9marrer un nouveau chat",
|
|
209
215
|
stop: "Arr\xEAter",
|
|
210
216
|
theme: "Th\xE8me",
|
|
211
217
|
themeAuto: "Auto",
|
|
@@ -221,9 +227,15 @@ var STRINGS_FR = {
|
|
|
221
227
|
usedTool: "Outil utilis\xE9",
|
|
222
228
|
toolResult: "R\xE9sultat",
|
|
223
229
|
sources: "Sources",
|
|
230
|
+
feedbackUp: "Bonne r\xE9ponse",
|
|
231
|
+
feedbackDown: "Mauvaise r\xE9ponse",
|
|
232
|
+
feedbackThanks: "Merci pour votre retour",
|
|
233
|
+
copy: "Copier",
|
|
234
|
+
copied: "Copi\xE9",
|
|
235
|
+
newMessages: "Nouveaux messages",
|
|
224
236
|
// ── Messenger modules ──────────────────────────────────────────
|
|
225
237
|
tabHome: "Accueil",
|
|
226
|
-
tabConversations: "
|
|
238
|
+
tabConversations: "Chats",
|
|
227
239
|
tabHelp: "Aide",
|
|
228
240
|
tabNews: "Actualit\xE9s",
|
|
229
241
|
modulesEmpty: "Rien pour le moment",
|
|
@@ -300,8 +312,8 @@ var STRINGS_AR = {
|
|
|
300
312
|
attachmentMimeRejected: "\u0646\u0648\u0639 \u0627\u0644\u0645\u0644\u0641 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645",
|
|
301
313
|
attachmentTooLarge: "\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627",
|
|
302
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",
|
|
303
|
-
conversationClosed: "\u062A\u0645 \u0625\u063A\u0644\u0627\u0642 \u0647\u0630\u0647 \u0627\u0644\
|
|
304
|
-
conversationLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\
|
|
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",
|
|
305
317
|
close: "\u0625\u063A\u0644\u0627\u0642",
|
|
306
318
|
collapse: "\u0637\u064A\u0651",
|
|
307
319
|
collapseSidebar: "\u0637\u064A\u0651 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",
|
|
@@ -319,26 +331,26 @@ var STRINGS_AR = {
|
|
|
319
331
|
exitFullscreen: "\u0625\u0646\u0647\u0627\u0621 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
|
|
320
332
|
fullscreen: "\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
|
|
321
333
|
history: "\u0627\u0644\u0633\u062C\u0644",
|
|
322
|
-
historyBack: "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\
|
|
323
|
-
historyEmpty: "\u0644\u0627 \u062A\u0648\u062C\u062F \
|
|
324
|
-
historyContinue: "\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\
|
|
325
|
-
historyLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \
|
|
326
|
-
historyTitle: "\u0633\u062C\u0644 \u0627\u0644\
|
|
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",
|
|
327
339
|
language: "\u0627\u0644\u0644\u063A\u0629",
|
|
328
|
-
launcherOpen: "\u0641\u062A\u062D \u0627\u0644\
|
|
340
|
+
launcherOpen: "\u0641\u062A\u062D \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
329
341
|
launcherLabel: "\u062A\u062D\u062F\u062B \u0645\u0639\u0646\u0627",
|
|
330
342
|
micStart: "\u0628\u062F\u0621 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",
|
|
331
343
|
micStop: "\u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",
|
|
332
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",
|
|
333
345
|
moreActions: "\u0625\u062C\u0631\u0627\u0621\u0627\u062A \u0625\u0636\u0627\u0641\u064A\u0629",
|
|
334
|
-
newConversation: "\
|
|
335
|
-
panelTitle: "\u0627\u0644\
|
|
346
|
+
newConversation: "\u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",
|
|
347
|
+
panelTitle: "\u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
336
348
|
resizeHandle: "\u0627\u0633\u062D\u0628 \u0644\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062D\u062C\u0645",
|
|
337
349
|
scrollToBottom: "\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0623\u062D\u062F\u062B",
|
|
338
350
|
send: "\u0625\u0631\u0633\u0627\u0644",
|
|
339
351
|
soundOff: "\u0643\u062A\u0645 \u0627\u0644\u0635\u0648\u062A",
|
|
340
352
|
soundOn: "\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0635\u0648\u062A",
|
|
341
|
-
startNewConversation: "\u0628\u062F\u0621 \
|
|
353
|
+
startNewConversation: "\u0628\u062F\u0621 \u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",
|
|
342
354
|
stop: "\u0625\u064A\u0642\u0627\u0641",
|
|
343
355
|
theme: "\u0627\u0644\u0645\u0638\u0647\u0631",
|
|
344
356
|
themeAuto: "\u062A\u0644\u0642\u0627\u0626\u064A",
|
|
@@ -354,9 +366,15 @@ var STRINGS_AR = {
|
|
|
354
366
|
usedTool: "\u0623\u062F\u0627\u0629 \u0645\u064F\u0633\u062A\u062E\u062F\u064E\u0645\u0629",
|
|
355
367
|
toolResult: "\u0627\u0644\u0646\u062A\u064A\u062C\u0629",
|
|
356
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
|
+
copy: "\u0646\u0633\u062E",
|
|
373
|
+
copied: "\u062A\u0645 \u0627\u0644\u0646\u0633\u062E",
|
|
374
|
+
newMessages: "\u0631\u0633\u0627\u0626\u0644 \u062C\u062F\u064A\u062F\u0629",
|
|
357
375
|
// ── Messenger modules ──────────────────────────────────────────
|
|
358
376
|
tabHome: "\u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629",
|
|
359
|
-
tabConversations: "\u0627\u0644\
|
|
377
|
+
tabConversations: "\u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",
|
|
360
378
|
tabHelp: "\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",
|
|
361
379
|
tabNews: "\u0627\u0644\u0623\u062E\u0628\u0627\u0631",
|
|
362
380
|
modulesEmpty: "\u0644\u0627 \u0634\u064A\u0621 \u0647\u0646\u0627 \u0628\u0639\u062F",
|
|
@@ -433,8 +451,8 @@ var STRINGS_ES = {
|
|
|
433
451
|
attachmentMimeRejected: "Tipo de archivo no admitido",
|
|
434
452
|
attachmentTooLarge: "El archivo es demasiado grande",
|
|
435
453
|
attachmentTooMany: "Se alcanz\xF3 el l\xEDmite de adjuntos",
|
|
436
|
-
conversationClosed: "
|
|
437
|
-
conversationLoading: "Cargando
|
|
454
|
+
conversationClosed: "Este chat est\xE1 cerrado",
|
|
455
|
+
conversationLoading: "Cargando chat\u2026",
|
|
438
456
|
close: "Cerrar",
|
|
439
457
|
collapse: "Contraer",
|
|
440
458
|
collapseSidebar: "Contraer la barra lateral",
|
|
@@ -453,10 +471,10 @@ var STRINGS_ES = {
|
|
|
453
471
|
fullscreen: "Pantalla completa",
|
|
454
472
|
history: "Historial",
|
|
455
473
|
historyBack: "Volver al chat",
|
|
456
|
-
historyEmpty: "A\xFAn no tienes
|
|
457
|
-
historyContinue: "Continuar
|
|
458
|
-
historyLoading: "Cargando tus
|
|
459
|
-
historyTitle: "Historial de
|
|
474
|
+
historyEmpty: "A\xFAn no tienes chats",
|
|
475
|
+
historyContinue: "Continuar el chat",
|
|
476
|
+
historyLoading: "Cargando tus chats\u2026",
|
|
477
|
+
historyTitle: "Historial de chats",
|
|
460
478
|
language: "Idioma",
|
|
461
479
|
launcherOpen: "Abrir el chat",
|
|
462
480
|
launcherLabel: "Chatea con nosotros",
|
|
@@ -464,14 +482,14 @@ var STRINGS_ES = {
|
|
|
464
482
|
micStop: "Detener entrada de voz",
|
|
465
483
|
micUnsupported: "Este navegador no admite la entrada de voz",
|
|
466
484
|
moreActions: "M\xE1s acciones",
|
|
467
|
-
newConversation: "
|
|
485
|
+
newConversation: "Nuevo chat",
|
|
468
486
|
panelTitle: "Chat",
|
|
469
487
|
resizeHandle: "Arrastra para cambiar el tama\xF1o",
|
|
470
488
|
scrollToBottom: "Ir a lo m\xE1s reciente",
|
|
471
489
|
send: "Enviar",
|
|
472
490
|
soundOff: "Sonido desactivado",
|
|
473
491
|
soundOn: "Sonido activado",
|
|
474
|
-
startNewConversation: "Iniciar
|
|
492
|
+
startNewConversation: "Iniciar un chat nuevo",
|
|
475
493
|
stop: "Detener",
|
|
476
494
|
theme: "Tema",
|
|
477
495
|
themeAuto: "Autom\xE1tico",
|
|
@@ -487,9 +505,15 @@ var STRINGS_ES = {
|
|
|
487
505
|
usedTool: "Herramienta usada",
|
|
488
506
|
toolResult: "Resultado",
|
|
489
507
|
sources: "Fuentes",
|
|
508
|
+
feedbackUp: "Buena respuesta",
|
|
509
|
+
feedbackDown: "Mala respuesta",
|
|
510
|
+
feedbackThanks: "Gracias por tu opini\xF3n",
|
|
511
|
+
copy: "Copiar",
|
|
512
|
+
copied: "Copiado",
|
|
513
|
+
newMessages: "Mensajes nuevos",
|
|
490
514
|
// ── Messenger modules ──────────────────────────────────────────
|
|
491
515
|
tabHome: "Inicio",
|
|
492
|
-
tabConversations: "
|
|
516
|
+
tabConversations: "Chats",
|
|
493
517
|
tabHelp: "Ayuda",
|
|
494
518
|
tabNews: "Novedades",
|
|
495
519
|
modulesEmpty: "A\xFAn no hay nada aqu\xED",
|
|
@@ -566,8 +590,8 @@ var STRINGS_HE = {
|
|
|
566
590
|
attachmentMimeRejected: "\u05E1\u05D5\u05D2 \u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA",
|
|
567
591
|
attachmentTooLarge: "\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9",
|
|
568
592
|
attachmentTooMany: "\u05D4\u05D2\u05E2\u05EA \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D4\u05DE\u05E8\u05D1\u05D9 \u05E9\u05DC \u05E7\u05D1\u05E6\u05D9\u05DD \u05DE\u05E6\u05D5\u05E8\u05E4\u05D9\u05DD",
|
|
569
|
-
conversationClosed: "\u05D4\
|
|
570
|
-
conversationLoading: "\u05D8\u05D5\u05E2\u05DF \
|
|
593
|
+
conversationClosed: "\u05D4\u05E6\u05F3\u05D0\u05D8 \u05D4\u05D6\u05D4 \u05E0\u05E1\u05D2\u05E8",
|
|
594
|
+
conversationLoading: "\u05D8\u05D5\u05E2\u05DF \u05E6\u05F3\u05D0\u05D8\u2026",
|
|
571
595
|
close: "\u05E1\u05D2\u05D9\u05E8\u05D4",
|
|
572
596
|
collapse: "\u05DB\u05D9\u05D5\u05D5\u05E5",
|
|
573
597
|
collapseSidebar: "\u05DB\u05D9\u05D5\u05D5\u05E5 \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",
|
|
@@ -585,11 +609,11 @@ var STRINGS_HE = {
|
|
|
585
609
|
exitFullscreen: "\u05D9\u05E6\u05D9\u05D0\u05D4 \u05DE\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",
|
|
586
610
|
fullscreen: "\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",
|
|
587
611
|
history: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D4",
|
|
588
|
-
historyBack: "\u05D7\u05D6\u05E8\u05D4 \u05DC\
|
|
589
|
-
historyEmpty: "\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \
|
|
590
|
-
historyContinue: "\u05D4\u05DE\u05E9\u05DA \
|
|
591
|
-
historyLoading: "\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\
|
|
592
|
-
historyTitle: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \
|
|
612
|
+
historyBack: "\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6\u05F3\u05D0\u05D8",
|
|
613
|
+
historyEmpty: "\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E7\u05D5\u05D3\u05DE\u05D9\u05DD",
|
|
614
|
+
historyContinue: "\u05D4\u05DE\u05E9\u05DA \u05E6\u05F3\u05D0\u05D8",
|
|
615
|
+
historyLoading: "\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E9\u05DC\u05DA\u2026",
|
|
616
|
+
historyTitle: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",
|
|
593
617
|
language: "\u05E9\u05E4\u05D4",
|
|
594
618
|
launcherOpen: "\u05E4\u05EA\u05D9\u05D7\u05EA \u05E6\u05F3\u05D0\u05D8",
|
|
595
619
|
launcherLabel: "\u05D3\u05D1\u05E8\u05D5 \u05D0\u05D9\u05EA\u05E0\u05D5",
|
|
@@ -597,14 +621,14 @@ var STRINGS_HE = {
|
|
|
597
621
|
micStop: "\u05E2\u05E6\u05D9\u05E8\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",
|
|
598
622
|
micUnsupported: "\u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA \u05D1\u05D3\u05E4\u05D3\u05E4\u05DF \u05D6\u05D4",
|
|
599
623
|
moreActions: "\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA \u05E0\u05D5\u05E1\u05E4\u05D5\u05EA",
|
|
600
|
-
newConversation: "\
|
|
601
|
-
panelTitle: "\
|
|
624
|
+
newConversation: "\u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",
|
|
625
|
+
panelTitle: "\u05E6\u05F3\u05D0\u05D8",
|
|
602
626
|
resizeHandle: "\u05D2\u05E8\u05D5\u05E8 \u05DC\u05E9\u05D9\u05E0\u05D5\u05D9 \u05D4\u05D2\u05D5\u05D3\u05DC",
|
|
603
627
|
scrollToBottom: "\u05DE\u05E2\u05D1\u05E8 \u05DC\u05D7\u05D3\u05E9 \u05D1\u05D9\u05D5\u05EA\u05E8",
|
|
604
628
|
send: "\u05E9\u05DC\u05D9\u05D7\u05D4",
|
|
605
629
|
soundOff: "\u05D4\u05E9\u05EA\u05E7\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",
|
|
606
630
|
soundOn: "\u05D4\u05E4\u05E2\u05DC\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",
|
|
607
|
-
startNewConversation: "\u05D4\u05EA\u05D7\u05DC\u05EA \
|
|
631
|
+
startNewConversation: "\u05D4\u05EA\u05D7\u05DC\u05EA \u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",
|
|
608
632
|
stop: "\u05E2\u05E6\u05D9\u05E8\u05D4",
|
|
609
633
|
theme: "\u05E2\u05E8\u05DB\u05EA \u05E0\u05D5\u05E9\u05D0",
|
|
610
634
|
themeAuto: "\u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9",
|
|
@@ -620,9 +644,15 @@ var STRINGS_HE = {
|
|
|
620
644
|
usedTool: "\u05DB\u05DC\u05D9 \u05D1\u05E9\u05D9\u05DE\u05D5\u05E9",
|
|
621
645
|
toolResult: "\u05EA\u05D5\u05E6\u05D0\u05D4",
|
|
622
646
|
sources: "\u05DE\u05E7\u05D5\u05E8\u05D5\u05EA",
|
|
647
|
+
feedbackUp: "\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D8\u05D5\u05D1\u05D4",
|
|
648
|
+
feedbackDown: "\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D2\u05E8\u05D5\u05E2\u05D4",
|
|
649
|
+
feedbackThanks: "\u05EA\u05D5\u05D3\u05D4 \u05E2\u05DC \u05D4\u05DE\u05E9\u05D5\u05D1",
|
|
650
|
+
copy: "\u05D4\u05E2\u05EA\u05E7",
|
|
651
|
+
copied: "\u05D4\u05D5\u05E2\u05EA\u05E7",
|
|
652
|
+
newMessages: "\u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05D7\u05D3\u05E9\u05D5\u05EA",
|
|
623
653
|
// ── Messenger modules ──────────────────────────────────────────
|
|
624
654
|
tabHome: "\u05D1\u05D9\u05EA",
|
|
625
|
-
tabConversations: "\
|
|
655
|
+
tabConversations: "\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",
|
|
626
656
|
tabHelp: "\u05E2\u05D6\u05E8\u05D4",
|
|
627
657
|
tabNews: "\u05D7\u05D3\u05E9\u05D5\u05EA",
|
|
628
658
|
modulesEmpty: "\u05D0\u05D9\u05DF \u05DB\u05D0\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DB\u05DC\u05D5\u05DD",
|
|
@@ -1038,6 +1068,9 @@ function resolveOptions(rawOpts) {
|
|
|
1038
1068
|
showReasoning: behavior.showReasoning ?? false,
|
|
1039
1069
|
showToolCalls: behavior.showToolCalls ?? false,
|
|
1040
1070
|
showSources: behavior.showSources ?? false,
|
|
1071
|
+
scrollFade: behavior.scrollFade ?? true,
|
|
1072
|
+
scrollAnchor: behavior.scrollAnchor ?? "bottom",
|
|
1073
|
+
enableMessageFeedback: behavior.enableMessageFeedback ?? true,
|
|
1041
1074
|
features: {
|
|
1042
1075
|
files: opts.features?.files ?? DEFAULT_FEATURES.files,
|
|
1043
1076
|
voice: opts.features?.voice ?? DEFAULT_FEATURES.voice,
|
|
@@ -1365,7 +1398,8 @@ var BEHAVIOR_ATTRS = [
|
|
|
1365
1398
|
["start-minimized", "startMinimized", boolAttr],
|
|
1366
1399
|
["show-reasoning", "showReasoning", boolAttr],
|
|
1367
1400
|
["show-tool-calls", "showToolCalls", boolAttr],
|
|
1368
|
-
["show-sources", "showSources", boolAttr]
|
|
1401
|
+
["show-sources", "showSources", boolAttr],
|
|
1402
|
+
["enable-message-feedback", "enableMessageFeedback", boolAttr]
|
|
1369
1403
|
];
|
|
1370
1404
|
var I18N_ATTRS = [["locale", "locale"]];
|
|
1371
1405
|
var ACTION_NAMES = new Set(ACTION_NAME_LITERALS);
|
|
@@ -1673,7 +1707,7 @@ var tokens_default = ':host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent
|
|
|
1673
1707
|
var reset_default = '*,*:before,*:after{box-sizing:border-box;margin:0;padding:0;border:0}button{font:inherit;color:inherit;background:none;cursor:pointer;-webkit-appearance:none;appearance:none;line-height:1}button:focus-visible,[tabindex]:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}textarea,input{font:inherit;color:inherit;background:none;border:0;outline:0;resize:none}a{color:var(--__P__-accent);text-decoration:underline;text-underline-offset:2px}img,svg{display:block;max-width:100%}ul,ol{list-style:none}.__P__-app{display:block;width:100%;height:100%;font-family:var(--__P__-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11","ss01","ss03"}.__P__-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n';
|
|
1674
1708
|
|
|
1675
1709
|
// src/styles/panel.css
|
|
1676
|
-
var panel_default = '.__P__-anchor{color-scheme:var(--__P__-color-scheme, light);right:16px;bottom:16px}.__P__-surface{display:contents}.__P__-surface[hidden]{display:none}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:calc(14px * var(--__P__-text-scale))}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:calc(14px * var(--__P__-text-scale));background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:color-mix(in srgb,currentColor 15%,transparent)}.__P__-callout-close:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}@media(prefers-reduced-motion:no-preference){.__P__-panel{transition:width var(--__P__-dur-base) var(--__P__-ease),height var(--__P__-dur-base) var(--__P__-ease),max-width var(--__P__-dur-base) var(--__P__-ease),max-height var(--__P__-dur-base) var(--__P__-ease)}.__P__-panel[data-resizing]{transition:none}}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:0;padding:0;justify-content:flex-end;align-items:flex-end}:host([data-mode="fullscreen"][data-position*="top"]) .__P__-anchor{justify-content:flex-start}:host([data-mode="fullscreen"][data-position*="left"]) .__P__-anchor{align-items:flex-start}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}@media(max-width:640px){:host([data-mode="open"]) .__P__-anchor,:host([data-mode="expanded"]) .__P__-anchor{inset:0;align-items:stretch;padding:0}:host([data-mode="open"]) .__P__-panel,:host([data-mode="expanded"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-inline-start:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list,.__P__-history,.__P__-module-scroll,.__P__-home-scroll,.__P__-help-list,.__P__-toolui-code,.__P__-sidebar-conversations{scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;overscroll-behavior:contain;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar,.__P__-history::-webkit-scrollbar,.__P__-module-scroll::-webkit-scrollbar,.__P__-home-scroll::-webkit-scrollbar,.__P__-help-list::-webkit-scrollbar,.__P__-toolui-code::-webkit-scrollbar,.__P__-sidebar-conversations::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb,.__P__-history::-webkit-scrollbar-thumb,.__P__-module-scroll::-webkit-scrollbar-thumb,.__P__-home-scroll::-webkit-scrollbar-thumb,.__P__-help-list::-webkit-scrollbar-thumb,.__P__-toolui-code::-webkit-scrollbar-thumb,.__P__-sidebar-conversations::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;inset-inline-end:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px}.__P__-list>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-date-divider{display:flex;justify-content:center;margin-block:var(--__P__-space-3)}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:calc(11px * var(--__P__-text-scale));font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card)}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;min-width:0;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:calc(14px * var(--__P__-text-scale));word-wrap:break-word;overflow-wrap:break-word;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-end-end-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-end-start-radius:5px}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui){width:100%}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui) .__P__-bubble{width:100%}@media(max-width:640px){.__P__-bubble-col{max-width:92%}.__P__-toolui:not(.__P__-toolui-collapsible){padding:var(--__P__-space-3);gap:var(--__P__-space-2)}details.__P__-toolui-collapsible>summary{padding:var(--__P__-space-2) var(--__P__-space-3)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-3)}.__P__-toolui-section,.__P__-toolui-desc{padding:var(--__P__-space-2) var(--__P__-space-3)}}.__P__-bubble-time{margin-top:3px;padding:0 4px;font-size:calc(11px * var(--__P__-text-scale));line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-inline-start:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-inline-start:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:calc(12.5px * var(--__P__-text-scale));padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-inline-start:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-start-end-radius:var(--__P__-radius-sm);border-end-end-radius:var(--__P__-radius-sm);color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:start}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-inline-start:var(--__P__-space-3);border-inline-start:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary:hover{color:var(--__P__-fg)}.__P__-reasoning-summary:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;border-radius:var(--__P__-radius-sm)}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;margin-inline-end:6px;padding:var(--__P__-space-1) var(--__P__-space-2);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);text-decoration:none}a.__P__-source:hover{color:var(--__P__-fg);border-color:var(--__P__-accent)}.__P__-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:calc(14px * var(--__P__-text-scale));line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 12px;border-radius:var(--__P__-radius-sm);background:color-mix(in oklab,var(--__P__-danger) 8%,var(--__P__-bg-elevated));border:1px solid color-mix(in oklab,var(--__P__-danger) 20%,transparent);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error span{min-width:0}.__P__-error button{margin-inline-start:auto;flex-shrink:0;border:0;background:none;padding:0;color:var(--__P__-accent);font:inherit;font-size:var(--__P__-text-sm);font-weight:600;text-decoration:underline;white-space:nowrap;cursor:pointer}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-3)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:14px 4px 8px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-card{display:flex;flex-direction:column;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);overflow:hidden}.__P__-history-item{all:unset;display:flex;align-items:center;gap:var(--__P__-space-3);padding:12px var(--__P__-space-3);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item+.__P__-history-item{border-top:1px solid var(--__P__-border)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-avatar{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:color-mix(in oklab,var(--__P__-accent) 12%,transparent);color:var(--__P__-accent)}.__P__-history-avatar svg{width:18px;height:18px}.__P__-history-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.__P__-history-row{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2)}.__P__-history-title{flex:1;min-width:0;font-size:calc(14px * var(--__P__-text-scale));font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-time{flex:none;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-history-preview{flex:1;min-width:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--__P__-accent)}.__P__-history-item[data-unread=true] .__P__-history-title{font-weight:600}.__P__-history-item[data-closed=true] .__P__-history-title{color:var(--__P__-fg-muted)}.__P__-history-item-skeleton{cursor:default;pointer-events:none}.__P__-skeleton{display:block;border-radius:4px;background:linear-gradient(90deg,color-mix(in oklab,var(--__P__-fg) 9%,transparent) 30%,color-mix(in oklab,var(--__P__-fg) 17%,transparent),color-mix(in oklab,var(--__P__-fg) 9%,transparent) 70%);background-size:200% 100%;animation:__P__-skeleton-shimmer 1.8s ease-in-out infinite}.__P__-history-avatar.__P__-skeleton{border-radius:50%}.__P__-skeleton-heading{width:52px;height:8px}.__P__-skeleton-title{width:55%;height:12px}.__P__-skeleton-time{width:34px;height:10px}.__P__-skeleton-preview{width:80%;height:10px}@keyframes __P__-skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.__P__-skeleton{animation:none}}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:calc(11px * var(--__P__-text-scale));line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:calc(11px * var(--__P__-text-scale));letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;inset-inline-end:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent)}.__P__-menu-check svg{width:14px;height:14px}.__P__-menu-item-segmented{cursor:default}.__P__-menu-item-segmented:hover{background:transparent}.__P__-segmented{display:inline-flex;gap:2px;padding:2px;background:var(--__P__-bg-elevated);border-radius:var(--__P__-radius-sm)}.__P__-segment{all:unset;min-width:26px;padding:3px 8px;font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.02em;text-align:center;color:var(--__P__-fg-muted);border-radius:calc(var(--__P__-radius-sm) - 2px);cursor:pointer;transition:color .12s ease,background .12s ease}.__P__-segment:hover{color:var(--__P__-fg)}.__P__-segment[data-on=true]{background:var(--__P__-bg);color:var(--__P__-accent);box-shadow:var(--__P__-shadow-card)}.__P__-segment:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body,.__P__-messenger-pane{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-pane[hidden]{display:none}@keyframes __P__-view-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}@media(prefers-reduced-motion:no-preference){.__P__-module,.__P__-history{animation:__P__-view-in .18s var(--__P__-ease-out)}}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{container-type:inline-size;background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-4px;left:calc(50% + 6px);min-width:16px;height:16px;padding:0 4px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--__P__-accent);color:var(--__P__-on-accent);font-size:calc(10px * var(--__P__-text-scale));font-weight:600;line-height:1}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:clamp(calc(12px * var(--__P__-text-scale)),calc(3.2cqi * var(--__P__-text-scale)),calc(14px * var(--__P__-text-scale)));font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-hero-actions .__P__-icon-btn:hover{background:color-mix(in srgb,#fff 18%,transparent);color:#fff}.__P__-home-hero-actions .__P__-icon-btn:active{background:color-mix(in srgb,#fff 26%,transparent)}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(19px * var(--__P__-text-scale)),calc(5.5cqi * var(--__P__-text-scale)),var(--__P__-text-2xl));font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:10px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(15px * var(--__P__-text-scale)),calc(4.2cqi * var(--__P__-text-scale)),var(--__P__-text-xl));font-weight:600;line-height:1.25;letter-spacing:-.005em;color:color-mix(in srgb,var(--__P__-on-accent) 78%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-inline-start:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-inline-start:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:start;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:start}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:calc(14px * var(--__P__-text-scale));color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:start;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-hover)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:start;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;inset-inline-end:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-4)}.__P__-field{display:flex;flex-direction:column;gap:6px}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-input[type=date],.__P__-field-input[type=time]{appearance:none;-webkit-appearance:none}@media(pointer:coarse){.__P__-field-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:10px;padding-top:2px}.__P__-choice{display:flex;align-items:flex-start;gap:10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}.__P__-form-hint{flex:1 1 auto;min-width:6rem;margin-inline-end:auto;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-form-submit{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled){background:var(--__P__-bg-elevated)}@media(max-width:640px){.__P__-form-hint{flex-basis:100%;margin-inline-end:0;font-size:var(--__P__-text-xs)}.__P__-form-submit,.__P__-form-skip{flex:1 1 0;text-align:center}}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-form-done{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;border:1px dashed var(--__P__-border);border-radius:999px;align-self:center;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted)}.__P__-form-done svg{width:14px;height:14px;color:var(--__P__-success, #22c55e)}.__P__-form-done[data-outcome=skipped] svg{color:var(--__P__-fg-muted)}.__P__-form-done-fill{border:0;background:none;padding:0 2px;cursor:pointer;font:inherit;font-weight:600;color:var(--__P__-accent)}.__P__-form-done-fill:hover{text-decoration:underline}details.__P__-form-done{display:block;padding:0;border-radius:var(--__P__-radius-md)}details[open].__P__-form-done{width:min(100%,420px);background:var(--__P__-surface)}.__P__-form-done-summary{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;cursor:pointer;list-style:none}.__P__-form-done-summary::-webkit-details-marker{display:none}.__P__-form-done-summary>svg:last-child{color:var(--__P__-fg-muted);transition:transform .15s var(--__P__-ease)}details[open]>.__P__-form-done-summary>svg:last-child{transform:rotate(90deg)}.__P__-form-answers{margin:0;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);display:grid;gap:var(--__P__-space-3);text-align:start}.__P__-form-answer{display:grid;gap:6px}.__P__-form-answer dt{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-form-answer dd{margin:0;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);font-size:var(--__P__-text-sm);font-weight:400;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui{margin-block:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);background:var(--__P__-bg-elevated);font-size:var(--__P__-text-sm)}.__P__-toolui:not(.__P__-toolui-collapsible){display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4)}.__P__-toolui-group{display:flex;flex-direction:column;gap:var(--__P__-space-3);margin-block:var(--__P__-space-3)}.__P__-toolui-group>.__P__-toolui{margin-block:0}.__P__-toolui-stale{opacity:.7}details.__P__-toolui-collapsible>summary{display:flex;align-items:center;gap:var(--__P__-space-2);padding:var(--__P__-space-3) var(--__P__-space-4);cursor:pointer;list-style:none}details.__P__-toolui-collapsible>summary::-webkit-details-marker{display:none}details.__P__-toolui-collapsible[open]>summary{border-bottom:1px solid var(--__P__-border)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-4)}details.__P__-toolui-collapsible>.__P__-toolui-section~.__P__-toolui-section{margin-top:calc(-1 * var(--__P__-space-2))}.__P__-toolui-wrench{display:inline-flex;color:var(--__P__-fg-muted)}.__P__-toolui-wrench svg{width:15px;height:15px}.__P__-toolui-title{font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-chevron{display:inline-flex;margin-inline-start:auto;color:var(--__P__-fg-muted);transition:transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-toolui-chevron svg{width:16px;height:16px}details.__P__-toolui-collapsible[open]>summary .__P__-toolui-chevron{transform:rotate(180deg)}.__P__-toolui-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;border:1px solid var(--__P__-border-strong);background:var(--__P__-bg);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;white-space:nowrap}.__P__-toolui-badge-accent{border-color:color-mix(in oklab,var(--__P__-warning, #f59e0b) 55%,transparent);background:color-mix(in oklab,var(--__P__-warning, #f59e0b) 12%,transparent);color:var(--__P__-warning, #f59e0b)}.__P__-toolui-badge-muted{border-color:color-mix(in oklab,var(--__P__-fg-muted) 50%,transparent);background:color-mix(in oklab,var(--__P__-fg-muted) 14%,transparent);color:var(--__P__-fg)}.__P__-toolui-status-icon{display:inline-flex}.__P__-toolui-status-icon svg{width:14px;height:14px}.__P__-toolui-status[data-status=awaiting] .__P__-toolui-status-icon{color:var(--__P__-warning, #f59e0b)}.__P__-toolui-status[data-status=responded] .__P__-toolui-status-icon{color:var(--__P__-accent)}.__P__-toolui-status[data-status=completed] .__P__-toolui-status-icon{color:var(--__P__-success, #16a34a)}.__P__-toolui-status[data-status=denied] .__P__-toolui-status-icon{color:#ea580c}.__P__-toolui-status[data-status=error] .__P__-toolui-status-icon{color:var(--__P__-danger, #dc2626)}.__P__-toolui-head{display:flex;align-items:center;flex-wrap:wrap;gap:var(--__P__-space-2)}.__P__-toolui-desc{margin:0;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-section{display:flex;flex-direction:column;gap:8px;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border)}.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-section,.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-desc{padding:0;background:none;border:0;border-radius:0}.__P__-toolui-label{font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--__P__-fg-muted)}.__P__-toolui-text{margin:0;font-size:var(--__P__-text-base);font-weight:600;color:var(--__P__-fg);line-height:1.55;overflow-wrap:anywhere}.__P__-toolui-code{margin:0;max-height:240px;overflow:auto;color:var(--__P__-fg);font-family:var(--__P__-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:var(--__P__-text-xs);line-height:1.5;white-space:pre-wrap;word-break:break-word}.__P__-toolui-code[data-error=true]{color:var(--__P__-danger, #dc2626)}.__P__-toolui-body{gap:6px}.__P__-toolui-prompt{margin:0;font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-subtle{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}:host([dir="rtl"]) .__P__-icon-dir{transform:scaleX(-1)}:host([dir="rtl"]) .__P__-field-input[type=date],:host([dir="rtl"]) .__P__-field-input[type=time]{position:relative;text-align:right;padding-left:34px}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-datetime-edit,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-datetime-edit{text-align:right}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-calendar-picker-indicator,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-calendar-picker-indicator{position:absolute;left:var(--__P__-space-3);margin:0}\n';
|
|
1710
|
+
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-meta{display:flex;align-items:center;gap:8px;margin-top:2px;padding:0 2px;min-height:24px}.__P__-bubble-actions{display:flex;align-items:center;gap:2px}.__P__-bubble-time{font-size:calc(11px * var(--__P__-text-scale));line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-feedback{display:flex;align-items:center;gap:2px}.__P__-msg-action{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:0;border-radius:var(--__P__-radius-sm);background:transparent;color:var(--__P__-fg-muted);cursor:pointer;opacity:.65;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__-msg-action:hover{opacity:1;background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-msg-action:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-msg-action[data-active=true]{opacity:1;color:var(--__P__-accent)}.__P__-msg-action svg{width:15px;height:15px}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-inline-start:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-inline-start:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:calc(12.5px * var(--__P__-text-scale));padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-inline-start:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-start-end-radius:var(--__P__-radius-sm);border-end-end-radius:var(--__P__-radius-sm);color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:start}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-inline-start:var(--__P__-space-3);border-inline-start:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary:hover{color:var(--__P__-fg)}.__P__-reasoning-summary:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;border-radius:var(--__P__-radius-sm)}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;margin-inline-end:6px;padding:var(--__P__-space-1) var(--__P__-space-2);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);text-decoration:none}a.__P__-source:hover{color:var(--__P__-fg);border-color:var(--__P__-accent)}.__P__-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:calc(14px * var(--__P__-text-scale));line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 12px;border-radius:var(--__P__-radius-sm);background:color-mix(in oklab,var(--__P__-danger) 8%,var(--__P__-bg-elevated));border:1px solid color-mix(in oklab,var(--__P__-danger) 20%,transparent);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error span{min-width:0}.__P__-error button{margin-inline-start:auto;flex-shrink:0;border:0;background:none;padding:0;color:var(--__P__-accent);font:inherit;font-size:var(--__P__-text-sm);font-weight:600;text-decoration:underline;white-space:nowrap;cursor:pointer}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-3)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:14px 4px 8px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-card{display:flex;flex-direction:column;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);overflow:hidden}.__P__-history-item{all:unset;display:flex;align-items:center;gap:var(--__P__-space-3);padding:12px var(--__P__-space-3);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item+.__P__-history-item{border-top:1px solid var(--__P__-border)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-avatar{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:color-mix(in oklab,var(--__P__-accent) 12%,transparent);color:var(--__P__-accent)}.__P__-history-avatar svg{width:18px;height:18px}.__P__-history-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.__P__-history-row{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2)}.__P__-history-title{flex:1;min-width:0;font-size:calc(14px * var(--__P__-text-scale));font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-time{flex:none;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-history-preview{flex:1;min-width:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--__P__-accent)}.__P__-history-item[data-unread=true] .__P__-history-title{font-weight:600}.__P__-history-item[data-closed=true] .__P__-history-title{color:var(--__P__-fg-muted)}.__P__-history-item-skeleton{cursor:default;pointer-events:none}.__P__-skeleton{display:block;border-radius:4px;background:linear-gradient(90deg,color-mix(in oklab,var(--__P__-fg) 9%,transparent) 30%,color-mix(in oklab,var(--__P__-fg) 17%,transparent),color-mix(in oklab,var(--__P__-fg) 9%,transparent) 70%);background-size:200% 100%;animation:__P__-skeleton-shimmer 1.8s ease-in-out infinite}.__P__-history-avatar.__P__-skeleton{border-radius:50%}.__P__-skeleton-heading{width:52px;height:8px}.__P__-skeleton-title{width:55%;height:12px}.__P__-skeleton-time{width:34px;height:10px}.__P__-skeleton-preview{width:80%;height:10px}@keyframes __P__-skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.__P__-skeleton{animation:none}}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:calc(11px * var(--__P__-text-scale));line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:calc(11px * var(--__P__-text-scale));letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;inset-inline-end:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent)}.__P__-menu-check svg{width:14px;height:14px}.__P__-menu-item-segmented{cursor:default}.__P__-menu-item-segmented:hover{background:transparent}.__P__-segmented{display:inline-flex;gap:2px;padding:2px;background:var(--__P__-bg-elevated);border-radius:var(--__P__-radius-sm)}.__P__-segment{all:unset;min-width:26px;padding:3px 8px;font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.02em;text-align:center;color:var(--__P__-fg-muted);border-radius:calc(var(--__P__-radius-sm) - 2px);cursor:pointer;transition:color .12s ease,background .12s ease}.__P__-segment:hover{color:var(--__P__-fg)}.__P__-segment[data-on=true]{background:var(--__P__-bg);color:var(--__P__-accent);box-shadow:var(--__P__-shadow-card)}.__P__-segment:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body,.__P__-messenger-pane{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-pane[hidden]{display:none}@keyframes __P__-view-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}@media(prefers-reduced-motion:no-preference){.__P__-module,.__P__-history{animation:__P__-view-in .18s var(--__P__-ease-out)}}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{container-type:inline-size;background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-2px;left:calc(50% + 6px);width:8px;height:8px;border-radius:50%;background:var(--__P__-accent);box-shadow:0 0 0 2px var(--__P__-bg-elevated)}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:clamp(calc(12px * var(--__P__-text-scale)),calc(3.2cqi * var(--__P__-text-scale)),calc(14px * var(--__P__-text-scale)));font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-hero-actions .__P__-icon-btn:hover{background:color-mix(in srgb,#fff 18%,transparent);color:#fff}.__P__-home-hero-actions .__P__-icon-btn:active{background:color-mix(in srgb,#fff 26%,transparent)}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(19px * var(--__P__-text-scale)),calc(5.5cqi * var(--__P__-text-scale)),var(--__P__-text-2xl));font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:10px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(15px * var(--__P__-text-scale)),calc(4.2cqi * var(--__P__-text-scale)),var(--__P__-text-xl));font-weight:600;line-height:1.25;letter-spacing:-.005em;color:color-mix(in srgb,var(--__P__-on-accent) 78%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-inline-start:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-inline-start:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:start;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:start}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:calc(14px * var(--__P__-text-scale));color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:start;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-hover)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:start;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;inset-inline-end:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-4)}.__P__-field{display:flex;flex-direction:column;gap:6px}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-input[type=date],.__P__-field-input[type=time]{appearance:none;-webkit-appearance:none}@media(pointer:coarse){.__P__-field-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:10px;padding-top:2px}.__P__-choice{display:flex;align-items:flex-start;gap:10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}.__P__-form-hint{flex:1 1 auto;min-width:6rem;margin-inline-end:auto;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-form-submit{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled){background:var(--__P__-bg-elevated)}@media(max-width:640px){.__P__-form-hint{flex-basis:100%;margin-inline-end:0;font-size:var(--__P__-text-xs)}.__P__-form-submit,.__P__-form-skip{flex:1 1 0;text-align:center}}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-form-done{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;border:1px dashed var(--__P__-border);border-radius:999px;align-self:center;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted)}.__P__-form-done svg{width:14px;height:14px;color:var(--__P__-success, #22c55e)}.__P__-form-done[data-outcome=skipped] svg{color:var(--__P__-fg-muted)}.__P__-form-done-fill{border:0;background:none;padding:0 2px;cursor:pointer;font:inherit;font-weight:600;color:var(--__P__-accent)}.__P__-form-done-fill:hover{text-decoration:underline}details.__P__-form-done{display:block;padding:0;border-radius:var(--__P__-radius-md)}details[open].__P__-form-done{width:min(100%,420px);background:var(--__P__-surface)}.__P__-form-done-summary{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;cursor:pointer;list-style:none}.__P__-form-done-summary::-webkit-details-marker{display:none}.__P__-form-done-summary>svg:last-child{color:var(--__P__-fg-muted);transition:transform .15s var(--__P__-ease)}details[open]>.__P__-form-done-summary>svg:last-child{transform:rotate(90deg)}.__P__-form-answers{margin:0;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);display:grid;gap:var(--__P__-space-3);text-align:start}.__P__-form-answer{display:grid;gap:6px}.__P__-form-answer dt{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-form-answer dd{margin:0;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);font-size:var(--__P__-text-sm);font-weight:400;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui{margin-block:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);background:var(--__P__-bg-elevated);font-size:var(--__P__-text-sm)}.__P__-toolui:not(.__P__-toolui-collapsible){display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4)}.__P__-toolui-group{display:flex;flex-direction:column;gap:var(--__P__-space-3);margin-block:var(--__P__-space-3)}.__P__-toolui-group>.__P__-toolui{margin-block:0}.__P__-toolui-stale{opacity:.7}details.__P__-toolui-collapsible>summary{display:flex;align-items:center;gap:var(--__P__-space-2);padding:var(--__P__-space-3) var(--__P__-space-4);cursor:pointer;list-style:none}details.__P__-toolui-collapsible>summary::-webkit-details-marker{display:none}details.__P__-toolui-collapsible[open]>summary{border-bottom:1px solid var(--__P__-border)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-4)}details.__P__-toolui-collapsible>.__P__-toolui-section~.__P__-toolui-section{margin-top:calc(-1 * var(--__P__-space-2))}.__P__-toolui-wrench{display:inline-flex;color:var(--__P__-fg-muted)}.__P__-toolui-wrench svg{width:15px;height:15px}.__P__-toolui-title{font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-chevron{display:inline-flex;margin-inline-start:auto;color:var(--__P__-fg-muted);transition:transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-toolui-chevron svg{width:16px;height:16px}details.__P__-toolui-collapsible[open]>summary .__P__-toolui-chevron{transform:rotate(180deg)}.__P__-toolui-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;border:1px solid var(--__P__-border-strong);background:var(--__P__-bg);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;white-space:nowrap}.__P__-toolui-badge-accent{border-color:color-mix(in oklab,var(--__P__-warning, #f59e0b) 55%,transparent);background:color-mix(in oklab,var(--__P__-warning, #f59e0b) 12%,transparent);color:var(--__P__-warning, #f59e0b)}.__P__-toolui-badge-muted{border-color:color-mix(in oklab,var(--__P__-fg-muted) 50%,transparent);background:color-mix(in oklab,var(--__P__-fg-muted) 14%,transparent);color:var(--__P__-fg)}.__P__-toolui-status-icon{display:inline-flex}.__P__-toolui-status-icon svg{width:14px;height:14px}.__P__-toolui-status[data-status=awaiting] .__P__-toolui-status-icon{color:var(--__P__-warning, #f59e0b)}.__P__-toolui-status[data-status=responded] .__P__-toolui-status-icon{color:var(--__P__-accent)}.__P__-toolui-status[data-status=completed] .__P__-toolui-status-icon{color:var(--__P__-success, #16a34a)}.__P__-toolui-status[data-status=denied] .__P__-toolui-status-icon{color:#ea580c}.__P__-toolui-status[data-status=error] .__P__-toolui-status-icon{color:var(--__P__-danger, #dc2626)}.__P__-toolui-head{display:flex;align-items:center;flex-wrap:wrap;gap:var(--__P__-space-2)}.__P__-toolui-desc{margin:0;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-section{display:flex;flex-direction:column;gap:8px;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border)}.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-section,.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-desc{padding:0;background:none;border:0;border-radius:0}.__P__-toolui-label{font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--__P__-fg-muted)}.__P__-toolui-text{margin:0;font-size:var(--__P__-text-base);font-weight:600;color:var(--__P__-fg);line-height:1.55;overflow-wrap:anywhere}.__P__-toolui-code{margin:0;max-height:240px;overflow:auto;color:var(--__P__-fg);font-family:var(--__P__-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:var(--__P__-text-xs);line-height:1.5;white-space:pre-wrap;word-break:break-word}.__P__-toolui-code[data-error=true]{color:var(--__P__-danger, #dc2626)}.__P__-toolui-body{gap:6px}.__P__-toolui-prompt{margin:0;font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-subtle{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}:host([dir="rtl"]) .__P__-icon-dir{transform:scaleX(-1)}:host([dir="rtl"]) .__P__-field-input[type=date],:host([dir="rtl"]) .__P__-field-input[type=time]{position:relative;text-align:right;padding-left:34px}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-datetime-edit,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-datetime-edit{text-align:right}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-calendar-picker-indicator,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-calendar-picker-indicator{position:absolute;left:var(--__P__-space-3);margin:0}\n';
|
|
1677
1711
|
|
|
1678
1712
|
// src/styles/standalone.css
|
|
1679
1713
|
var standalone_default = ".__P__-standalone-page{margin:0;height:100vh;background:var(--__P__-bg, #fff);display:grid;place-items:stretch}\n";
|
|
@@ -1761,22 +1795,22 @@ function attachAdoptedSheet(shadow, doc) {
|
|
|
1761
1795
|
}
|
|
1762
1796
|
}
|
|
1763
1797
|
function applyThemeOverrides(host, overrides) {
|
|
1764
|
-
const
|
|
1765
|
-
if (overrides.accent) host.style.setProperty(`--${
|
|
1766
|
-
if (overrides.accentText) host.style.setProperty(`--${
|
|
1767
|
-
if (overrides.radius) host.style.setProperty(`--${
|
|
1768
|
-
if (overrides.fontFamily) host.style.setProperty(`--${
|
|
1798
|
+
const p36 = BRAND.cssPrefix;
|
|
1799
|
+
if (overrides.accent) host.style.setProperty(`--${p36}-accent-user`, overrides.accent);
|
|
1800
|
+
if (overrides.accentText) host.style.setProperty(`--${p36}-accent-text-user`, overrides.accentText);
|
|
1801
|
+
if (overrides.radius) host.style.setProperty(`--${p36}-radius`, overrides.radius);
|
|
1802
|
+
if (overrides.fontFamily) host.style.setProperty(`--${p36}-font`, overrides.fontFamily);
|
|
1769
1803
|
}
|
|
1770
1804
|
function applyThemeMode(host, mode) {
|
|
1771
1805
|
host.dataset.theme = mode;
|
|
1772
1806
|
}
|
|
1773
1807
|
function applySize(host, size) {
|
|
1774
|
-
const
|
|
1775
|
-
if (size.width !== void 0) host.style.setProperty(`--${
|
|
1776
|
-
if (size.height !== void 0) host.style.setProperty(`--${
|
|
1777
|
-
if (size.expanded?.width !== void 0) host.style.setProperty(`--${
|
|
1778
|
-
if (size.expanded?.height !== void 0) host.style.setProperty(`--${
|
|
1779
|
-
if (size.inset !== void 0) host.style.setProperty(`--${
|
|
1808
|
+
const p36 = BRAND.cssPrefix;
|
|
1809
|
+
if (size.width !== void 0) host.style.setProperty(`--${p36}-panel-w`, size.width);
|
|
1810
|
+
if (size.height !== void 0) host.style.setProperty(`--${p36}-panel-h`, size.height);
|
|
1811
|
+
if (size.expanded?.width !== void 0) host.style.setProperty(`--${p36}-expanded-w`, size.expanded.width);
|
|
1812
|
+
if (size.expanded?.height !== void 0) host.style.setProperty(`--${p36}-expanded-h`, size.expanded.height);
|
|
1813
|
+
if (size.inset !== void 0) host.style.setProperty(`--${p36}-panel-inset`, size.inset);
|
|
1780
1814
|
}
|
|
1781
1815
|
function applyPosition(host, pos) {
|
|
1782
1816
|
host.dataset.position = pos;
|
|
@@ -1795,7 +1829,7 @@ function applyHostAttributes(host, resolved) {
|
|
|
1795
1829
|
import { h, render as renderPreact } from "preact";
|
|
1796
1830
|
|
|
1797
1831
|
// src/ui/app.tsx
|
|
1798
|
-
import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as
|
|
1832
|
+
import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as useState15 } from "preact/hooks";
|
|
1799
1833
|
import { batch, useComputed as useComputed9, useSignal } from "@preact/signals";
|
|
1800
1834
|
|
|
1801
1835
|
// src/core/handshake-shape.ts
|
|
@@ -1880,7 +1914,7 @@ function createAuth(opts) {
|
|
|
1880
1914
|
}
|
|
1881
1915
|
|
|
1882
1916
|
// src/core/version.ts
|
|
1883
|
-
var ELEMENTS_VERSION = true ? "0.
|
|
1917
|
+
var ELEMENTS_VERSION = true ? "0.56.0" : "0.0.0-dev";
|
|
1884
1918
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
1885
1919
|
|
|
1886
1920
|
// src/stream/types.ts
|
|
@@ -1965,11 +1999,11 @@ function toBase64Url(json) {
|
|
|
1965
1999
|
var nonEmpty = (ctx) => ctx && Object.keys(ctx).length > 0 ? ctx : void 0;
|
|
1966
2000
|
function encodeContext(user, page) {
|
|
1967
2001
|
const u = nonEmpty(user);
|
|
1968
|
-
const
|
|
1969
|
-
if (!u && !
|
|
2002
|
+
const p36 = nonEmpty(page);
|
|
2003
|
+
if (!u && !p36) return void 0;
|
|
1970
2004
|
const envelope = {};
|
|
1971
2005
|
if (u) envelope.user = u;
|
|
1972
|
-
if (
|
|
2006
|
+
if (p36) envelope.page = p36;
|
|
1973
2007
|
return toBase64Url(JSON.stringify(envelope));
|
|
1974
2008
|
}
|
|
1975
2009
|
|
|
@@ -2013,11 +2047,20 @@ var DEFAULT_PATHS = {
|
|
|
2013
2047
|
updateSettings: "/pai/update-settings",
|
|
2014
2048
|
/**
|
|
2015
2049
|
* Mark a conversation read. POST `{ visitorId, conversationId }` → the server
|
|
2016
|
-
* records `lastReadAt = now` for that (visitor, conversation)
|
|
2017
|
-
* `
|
|
2018
|
-
*
|
|
2050
|
+
* records `lastReadAt = now` for that (visitor, conversation), which clears its
|
|
2051
|
+
* `hasUnread` (returned on `/list-conversations`). Fire-and-forget on the
|
|
2052
|
+
* client; a failure just leaves the dot until the next sync.
|
|
2019
2053
|
*/
|
|
2020
2054
|
markRead: "/pai/mark-read",
|
|
2055
|
+
/**
|
|
2056
|
+
* Record 👍/👎 feedback on an assistant message. POST `{ visitorId,
|
|
2057
|
+
* conversationId, messageId, set: { feedback } }` (`feedback`: `"up"` / `"down"`
|
|
2058
|
+
* / `null` to clear) → the server stores the signal on that message (mirrors the
|
|
2059
|
+
* authenticated `conversation/message/update` `set` shape). Fire-and-forget on
|
|
2060
|
+
* the client; a 404 (backend without the endpoint) is ignored — the UI still
|
|
2061
|
+
* reflects the choice locally and emits the `messageFeedback` event.
|
|
2062
|
+
*/
|
|
2063
|
+
messageFeedback: "/pai/message-feedback",
|
|
2021
2064
|
// ── Data API (module-help-ai-data-api, via `dataApiBaseUrl`) ─────────
|
|
2022
2065
|
/**
|
|
2023
2066
|
* The data module's one ACTIVATION read. `GET
|
|
@@ -2069,8 +2112,8 @@ function buildSendMessageRequest(params) {
|
|
|
2069
2112
|
if (tools?.length) body.data = { tools };
|
|
2070
2113
|
return body;
|
|
2071
2114
|
}
|
|
2072
|
-
function isResolvedToolPart(
|
|
2073
|
-
return
|
|
2115
|
+
function isResolvedToolPart(p36) {
|
|
2116
|
+
return p36.state === "output-available" || p36.state === "output-error" || p36.state === "output-denied" || p36.approval?.approved !== void 0;
|
|
2074
2117
|
}
|
|
2075
2118
|
function normalizeToolRef(ref) {
|
|
2076
2119
|
if (typeof ref === "string") return ref ? { code: ref } : null;
|
|
@@ -2078,29 +2121,29 @@ function normalizeToolRef(ref) {
|
|
|
2078
2121
|
}
|
|
2079
2122
|
function messageToWireParts(m) {
|
|
2080
2123
|
const out = [];
|
|
2081
|
-
for (const
|
|
2082
|
-
if (
|
|
2124
|
+
for (const p36 of m.parts) {
|
|
2125
|
+
if (p36.kind === "step-start") {
|
|
2083
2126
|
out.push({ type: "step-start" });
|
|
2084
2127
|
}
|
|
2085
|
-
if (
|
|
2086
|
-
out.push({ type: "reasoning", text:
|
|
2128
|
+
if (p36.kind === "reasoning" && p36.text) {
|
|
2129
|
+
out.push({ type: "reasoning", text: p36.text, state: p36.done ? "done" : "streaming" });
|
|
2087
2130
|
}
|
|
2088
|
-
if (
|
|
2089
|
-
out.push({ text:
|
|
2131
|
+
if (p36.kind === "text" && p36.text) {
|
|
2132
|
+
out.push({ text: p36.text, type: "text" });
|
|
2090
2133
|
}
|
|
2091
|
-
if (
|
|
2092
|
-
out.push({ mediaType:
|
|
2134
|
+
if (p36.kind === "file" && p36.url) {
|
|
2135
|
+
out.push({ mediaType: p36.mediaType, type: "file", url: p36.url });
|
|
2093
2136
|
}
|
|
2094
|
-
if (
|
|
2137
|
+
if (p36.kind === "tool" && isResolvedToolPart(p36)) {
|
|
2095
2138
|
const part = {
|
|
2096
|
-
type: toolPartType(
|
|
2097
|
-
toolCallId:
|
|
2098
|
-
state:
|
|
2139
|
+
type: toolPartType(p36.toolName),
|
|
2140
|
+
toolCallId: p36.toolCallId,
|
|
2141
|
+
state: p36.state
|
|
2099
2142
|
};
|
|
2100
|
-
if (
|
|
2101
|
-
if (
|
|
2102
|
-
if (
|
|
2103
|
-
if (
|
|
2143
|
+
if (p36.input !== void 0) part.input = p36.input;
|
|
2144
|
+
if (p36.output !== void 0) part.output = p36.output;
|
|
2145
|
+
if (p36.error !== void 0) part.errorText = p36.error;
|
|
2146
|
+
if (p36.approval && p36.approval.approved !== void 0) part.approval = p36.approval;
|
|
2104
2147
|
out.push(part);
|
|
2105
2148
|
}
|
|
2106
2149
|
}
|
|
@@ -2360,7 +2403,7 @@ var AgentTransport = class {
|
|
|
2360
2403
|
lastMessageAt: conversation.lastMessageAt,
|
|
2361
2404
|
preview: conversation.preview,
|
|
2362
2405
|
canContinue: conversation.canContinue,
|
|
2363
|
-
|
|
2406
|
+
hasUnread: conversation.hasUnread
|
|
2364
2407
|
})),
|
|
2365
2408
|
nextCursor: res.nextCursor
|
|
2366
2409
|
};
|
|
@@ -2387,8 +2430,8 @@ var AgentTransport = class {
|
|
|
2387
2430
|
}
|
|
2388
2431
|
/**
|
|
2389
2432
|
* Mark a conversation read up to its latest message. Fire-and-forget — the
|
|
2390
|
-
* server records `lastReadAt` and clears that conversation's `
|
|
2391
|
-
* next `/conversations`. A failure is non-fatal (the
|
|
2433
|
+
* server records `lastReadAt` and clears that conversation's `hasUnread` on the
|
|
2434
|
+
* next `/conversations`. A failure is non-fatal (the dot just lingers until the
|
|
2392
2435
|
* next sync), so callers don't await this.
|
|
2393
2436
|
*/
|
|
2394
2437
|
async markRead(conversationId) {
|
|
@@ -2485,6 +2528,26 @@ var AgentTransport = class {
|
|
|
2485
2528
|
log5.debug("submitForm failed (non-fatal)", { err });
|
|
2486
2529
|
}
|
|
2487
2530
|
}
|
|
2531
|
+
/**
|
|
2532
|
+
* Record 👍/👎 feedback on an assistant message. `POST /pai/message-feedback`
|
|
2533
|
+
* (agent-API). `visitorId` + `conversationId` ride the envelope; `messageId`
|
|
2534
|
+
* (the backend message id) + `set.feedback` are explicit (`null` clears a prior
|
|
2535
|
+
* choice) — the `set` block mirrors the authenticated message-update contract.
|
|
2536
|
+
* Fire-and-forget — a failure (e.g. 404 on a backend without the endpoint) is
|
|
2537
|
+
* non-fatal, so callers don't await; the UI already reflects the choice.
|
|
2538
|
+
*/
|
|
2539
|
+
async submitFeedback(body) {
|
|
2540
|
+
log5.debug("submitFeedback \u2192", { messageId: body.messageId, value: body.value });
|
|
2541
|
+
try {
|
|
2542
|
+
await this.postJson(
|
|
2543
|
+
DEFAULT_PATHS.messageFeedback,
|
|
2544
|
+
{ messageId: body.messageId, set: { feedback: body.value } },
|
|
2545
|
+
"submitFeedback"
|
|
2546
|
+
);
|
|
2547
|
+
} catch (err) {
|
|
2548
|
+
log5.debug("submitFeedback failed (non-fatal)", { err });
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2488
2551
|
sendMessage(body) {
|
|
2489
2552
|
this.conversationsCache.clear();
|
|
2490
2553
|
log5.debug("message \u2192", {
|
|
@@ -2810,6 +2873,7 @@ function toReactive(m) {
|
|
|
2810
2873
|
serverMessageId: m.serverMessageId,
|
|
2811
2874
|
ephemeral: m.ephemeral,
|
|
2812
2875
|
attachments: m.attachments,
|
|
2876
|
+
feedback: m.feedback,
|
|
2813
2877
|
partsSig: signal(m.parts.map(partToReactive))
|
|
2814
2878
|
};
|
|
2815
2879
|
}
|
|
@@ -2858,7 +2922,7 @@ function fromWireMessage(w) {
|
|
|
2858
2922
|
};
|
|
2859
2923
|
}
|
|
2860
2924
|
return null;
|
|
2861
|
-
}).filter((
|
|
2925
|
+
}).filter((p36) => p36 !== null);
|
|
2862
2926
|
return {
|
|
2863
2927
|
id: w.id,
|
|
2864
2928
|
role: w.role,
|
|
@@ -2873,6 +2937,8 @@ function fromWireMessage(w) {
|
|
|
2873
2937
|
// `message-bubble`); everything else is a normal completed turn.
|
|
2874
2938
|
status: w.status === "failed" ? "error" : "complete",
|
|
2875
2939
|
canceled: w.status === "canceled",
|
|
2940
|
+
// Restore the persisted 👍/👎 so the feedback control shows the prior choice.
|
|
2941
|
+
feedback: w.feedback ?? null,
|
|
2876
2942
|
partsSig: signal(parts)
|
|
2877
2943
|
};
|
|
2878
2944
|
}
|
|
@@ -2912,7 +2978,7 @@ function assistantText(m) {
|
|
|
2912
2978
|
}
|
|
2913
2979
|
function hasNoVisibleAnswer(m) {
|
|
2914
2980
|
if (assistantText(m).trim() !== "") return false;
|
|
2915
|
-
return !m.partsSig.value.some((
|
|
2981
|
+
return !m.partsSig.value.some((p36) => p36.kind === "tool" || p36.kind === "file" || p36.kind === "source");
|
|
2916
2982
|
}
|
|
2917
2983
|
function isEmptyAssistantReply(m) {
|
|
2918
2984
|
return m.role === "assistant" && m.status !== "streaming" && hasNoVisibleAnswer(m);
|
|
@@ -2920,43 +2986,43 @@ function isEmptyAssistantReply(m) {
|
|
|
2920
2986
|
function isHiddenCanceledTurn(m) {
|
|
2921
2987
|
return m.canceled === true && isEmptyAssistantReply(m);
|
|
2922
2988
|
}
|
|
2923
|
-
function partToReactive(
|
|
2924
|
-
if (
|
|
2925
|
-
return { kind:
|
|
2989
|
+
function partToReactive(p36) {
|
|
2990
|
+
if (p36.kind === "text" || p36.kind === "reasoning") {
|
|
2991
|
+
return { kind: p36.kind, id: p36.id, textSig: signal(p36.text), doneSig: signal(p36.done) };
|
|
2926
2992
|
}
|
|
2927
|
-
if (
|
|
2993
|
+
if (p36.kind === "tool") {
|
|
2928
2994
|
return {
|
|
2929
2995
|
kind: "tool",
|
|
2930
|
-
toolCallId:
|
|
2931
|
-
toolName:
|
|
2932
|
-
inputPartialSig: signal(
|
|
2933
|
-
inputSig: signal(
|
|
2934
|
-
outputSig: signal(
|
|
2935
|
-
errorSig: signal(
|
|
2936
|
-
stateSig: signal(
|
|
2937
|
-
approvalSig: signal(
|
|
2996
|
+
toolCallId: p36.toolCallId,
|
|
2997
|
+
toolName: p36.toolName,
|
|
2998
|
+
inputPartialSig: signal(p36.inputPartial),
|
|
2999
|
+
inputSig: signal(p36.input),
|
|
3000
|
+
outputSig: signal(p36.output),
|
|
3001
|
+
errorSig: signal(p36.error),
|
|
3002
|
+
stateSig: signal(p36.state),
|
|
3003
|
+
approvalSig: signal(p36.approval)
|
|
2938
3004
|
};
|
|
2939
3005
|
}
|
|
2940
|
-
return
|
|
3006
|
+
return p36;
|
|
2941
3007
|
}
|
|
2942
|
-
function partFromReactive(
|
|
2943
|
-
if (
|
|
2944
|
-
return { kind:
|
|
3008
|
+
function partFromReactive(p36) {
|
|
3009
|
+
if (p36.kind === "text" || p36.kind === "reasoning") {
|
|
3010
|
+
return { kind: p36.kind, id: p36.id, text: p36.textSig.value, done: p36.doneSig.value };
|
|
2945
3011
|
}
|
|
2946
|
-
if (
|
|
3012
|
+
if (p36.kind === "tool") {
|
|
2947
3013
|
return {
|
|
2948
3014
|
kind: "tool",
|
|
2949
|
-
toolCallId:
|
|
2950
|
-
toolName:
|
|
2951
|
-
inputPartial:
|
|
2952
|
-
input:
|
|
2953
|
-
output:
|
|
2954
|
-
error:
|
|
2955
|
-
state:
|
|
2956
|
-
approval:
|
|
3015
|
+
toolCallId: p36.toolCallId,
|
|
3016
|
+
toolName: p36.toolName,
|
|
3017
|
+
inputPartial: p36.inputPartialSig.value,
|
|
3018
|
+
input: p36.inputSig.value,
|
|
3019
|
+
output: p36.outputSig.value,
|
|
3020
|
+
error: p36.errorSig.value,
|
|
3021
|
+
state: p36.stateSig.value,
|
|
3022
|
+
approval: p36.approvalSig.value
|
|
2957
3023
|
};
|
|
2958
3024
|
}
|
|
2959
|
-
return
|
|
3025
|
+
return p36;
|
|
2960
3026
|
}
|
|
2961
3027
|
|
|
2962
3028
|
// src/stream/reducer.ts
|
|
@@ -3035,8 +3101,8 @@ var StreamReducer = class {
|
|
|
3035
3101
|
this.ensureTextPart(m, "text", chunk.id);
|
|
3036
3102
|
return;
|
|
3037
3103
|
case "text-delta": {
|
|
3038
|
-
const
|
|
3039
|
-
|
|
3104
|
+
const p36 = this.ensureTextPart(m, "text", chunk.id);
|
|
3105
|
+
p36.textSig.value += chunk.delta;
|
|
3040
3106
|
return;
|
|
3041
3107
|
}
|
|
3042
3108
|
case "text-end":
|
|
@@ -3046,8 +3112,8 @@ var StreamReducer = class {
|
|
|
3046
3112
|
this.ensureTextPart(m, "reasoning", chunk.id).doneSig.value = false;
|
|
3047
3113
|
return;
|
|
3048
3114
|
case "reasoning-delta": {
|
|
3049
|
-
const
|
|
3050
|
-
|
|
3115
|
+
const p36 = this.ensureTextPart(m, "reasoning", chunk.id);
|
|
3116
|
+
p36.textSig.value += chunk.delta;
|
|
3051
3117
|
return;
|
|
3052
3118
|
}
|
|
3053
3119
|
case "reasoning-end":
|
|
@@ -3099,7 +3165,7 @@ var StreamReducer = class {
|
|
|
3099
3165
|
}
|
|
3100
3166
|
};
|
|
3101
3167
|
function ensureToolPart(m, toolCallId, toolName2) {
|
|
3102
|
-
const existing = m.partsSig.value.find((
|
|
3168
|
+
const existing = m.partsSig.value.find((p36) => p36.kind === "tool" && p36.toolCallId === toolCallId);
|
|
3103
3169
|
if (existing) return existing;
|
|
3104
3170
|
const part = {
|
|
3105
3171
|
kind: "tool",
|
|
@@ -3119,7 +3185,7 @@ function appendPart(m, part) {
|
|
|
3119
3185
|
m.partsSig.value = [...m.partsSig.value, part];
|
|
3120
3186
|
}
|
|
3121
3187
|
function appendSource(m, source) {
|
|
3122
|
-
if (m.partsSig.value.some((
|
|
3188
|
+
if (m.partsSig.value.some((p36) => p36.kind === "source" && p36.sourceId === source.sourceId)) return;
|
|
3123
3189
|
appendPart(m, source);
|
|
3124
3190
|
}
|
|
3125
3191
|
function applyTool(m, chunk) {
|
|
@@ -3128,37 +3194,37 @@ function applyTool(m, chunk) {
|
|
|
3128
3194
|
ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3129
3195
|
return;
|
|
3130
3196
|
case "tool-input-delta": {
|
|
3131
|
-
const
|
|
3132
|
-
|
|
3197
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3198
|
+
p36.inputPartialSig.value += chunk.inputTextDelta;
|
|
3133
3199
|
return;
|
|
3134
3200
|
}
|
|
3135
3201
|
case "tool-input-available": {
|
|
3136
|
-
const
|
|
3137
|
-
|
|
3138
|
-
|
|
3202
|
+
const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3203
|
+
p36.inputSig.value = chunk.input;
|
|
3204
|
+
p36.stateSig.value = "input-available";
|
|
3139
3205
|
return;
|
|
3140
3206
|
}
|
|
3141
3207
|
case "tool-approval-request": {
|
|
3142
|
-
const
|
|
3143
|
-
|
|
3144
|
-
|
|
3208
|
+
const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3209
|
+
p36.approvalSig.value = { id: chunk.approvalId };
|
|
3210
|
+
p36.stateSig.value = "approval-requested";
|
|
3145
3211
|
return;
|
|
3146
3212
|
}
|
|
3147
3213
|
case "tool-output-available": {
|
|
3148
|
-
const
|
|
3149
|
-
|
|
3150
|
-
|
|
3214
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3215
|
+
p36.outputSig.value = chunk.output;
|
|
3216
|
+
p36.stateSig.value = "output-available";
|
|
3151
3217
|
return;
|
|
3152
3218
|
}
|
|
3153
3219
|
case "tool-output-error": {
|
|
3154
|
-
const
|
|
3155
|
-
|
|
3156
|
-
|
|
3220
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3221
|
+
p36.errorSig.value = chunk.errorText;
|
|
3222
|
+
p36.stateSig.value = "output-error";
|
|
3157
3223
|
return;
|
|
3158
3224
|
}
|
|
3159
3225
|
case "tool-output-denied": {
|
|
3160
|
-
const
|
|
3161
|
-
|
|
3226
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3227
|
+
p36.stateSig.value = "output-denied";
|
|
3162
3228
|
return;
|
|
3163
3229
|
}
|
|
3164
3230
|
default:
|
|
@@ -3595,6 +3661,18 @@ var WaveIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "tru
|
|
|
3595
3661
|
/* @__PURE__ */ jsx("path", { d: "M13 10V6.5a1.5 1.5 0 0 1 3 0V12" }),
|
|
3596
3662
|
/* @__PURE__ */ jsx("path", { d: "M16 9.5a1.5 1.5 0 0 1 3 0v2.5a7 7 0 0 1-7 7 7 7 0 0 1-6.4-4.2L4 12.5a1.5 1.5 0 0 1 2.6-1.5L7 11" })
|
|
3597
3663
|
] });
|
|
3664
|
+
var CopyIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3665
|
+
/* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
|
|
3666
|
+
/* @__PURE__ */ jsx("path", { d: "M5 15a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2" })
|
|
3667
|
+
] });
|
|
3668
|
+
var ThumbUpIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3669
|
+
/* @__PURE__ */ jsx("path", { d: "M7 10v11H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z" }),
|
|
3670
|
+
/* @__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" })
|
|
3671
|
+
] });
|
|
3672
|
+
var ThumbDownIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3673
|
+
/* @__PURE__ */ jsx("path", { d: "M17 14V3h3a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1z" }),
|
|
3674
|
+
/* @__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" })
|
|
3675
|
+
] });
|
|
3598
3676
|
var WrenchIcon = () => /* @__PURE__ */ jsx("svg", { ...props, "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M14.7 6.3a4 4 0 0 0-5.4 5.3L3 18l3 3 6.4-6.3a4 4 0 0 0 5.3-5.4l-2.7 2.7-2.6-.7-.7-2.6z" }) });
|
|
3599
3677
|
var ClockIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3600
3678
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
@@ -3677,6 +3755,14 @@ var TID = {
|
|
|
3677
3755
|
messageBubble: `${p2}-message`,
|
|
3678
3756
|
/** "Stop" / retry inline button inside an error bubble. */
|
|
3679
3757
|
messageRetry: `${p2}-message-retry`,
|
|
3758
|
+
/** Feedback toolbar under an assistant reply (shown only when `enableMessageFeedback`). */
|
|
3759
|
+
messageFeedback: `${p2}-message-feedback`,
|
|
3760
|
+
/** 👍 "good response" feedback button. */
|
|
3761
|
+
feedbackUp: `${p2}-feedback-up`,
|
|
3762
|
+
/** 👎 "bad response" feedback button. */
|
|
3763
|
+
feedbackDown: `${p2}-feedback-down`,
|
|
3764
|
+
/** Copy-message-text button (on user + assistant messages). */
|
|
3765
|
+
messageCopy: `${p2}-message-copy`,
|
|
3680
3766
|
// ── History pane ────────────────────────────────────────────────
|
|
3681
3767
|
/** History pane root (list view inside the panel). */
|
|
3682
3768
|
historyPane: `${p2}-history-pane`,
|
|
@@ -3870,24 +3956,24 @@ import { useCallback as useCallback2, useEffect as useEffect9, useRef as useRef6
|
|
|
3870
3956
|
import { useEffect as useEffect2, useRef } from "preact/hooks";
|
|
3871
3957
|
import { jsx as jsx3 } from "preact/jsx-runtime";
|
|
3872
3958
|
function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, strings }) {
|
|
3873
|
-
const
|
|
3959
|
+
const p36 = BRAND.cssPrefix;
|
|
3874
3960
|
const dragRef = useRef(null);
|
|
3875
3961
|
useEffect2(() => {
|
|
3876
3962
|
if (!panelEl) return;
|
|
3877
3963
|
const style = panelEl.style;
|
|
3878
|
-
if (resize.minWidth) style.setProperty(`--${
|
|
3879
|
-
if (resize.maxWidth) style.setProperty(`--${
|
|
3880
|
-
if (resize.minHeight) style.setProperty(`--${
|
|
3881
|
-
if (resize.maxHeight) style.setProperty(`--${
|
|
3964
|
+
if (resize.minWidth) style.setProperty(`--${p36}-resize-min-w`, resize.minWidth);
|
|
3965
|
+
if (resize.maxWidth) style.setProperty(`--${p36}-resize-max-w`, resize.maxWidth);
|
|
3966
|
+
if (resize.minHeight) style.setProperty(`--${p36}-resize-min-h`, resize.minHeight);
|
|
3967
|
+
if (resize.maxHeight) style.setProperty(`--${p36}-resize-max-h`, resize.maxHeight);
|
|
3882
3968
|
if (initialSize) {
|
|
3883
|
-
style.setProperty(`--${
|
|
3884
|
-
style.setProperty(`--${
|
|
3969
|
+
style.setProperty(`--${p36}-widget-w`, `${initialSize.width}px`);
|
|
3970
|
+
style.setProperty(`--${p36}-widget-h`, `${initialSize.height}px`);
|
|
3885
3971
|
}
|
|
3886
|
-
}, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight,
|
|
3972
|
+
}, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p36, initialSize]);
|
|
3887
3973
|
if (!panelEl) return null;
|
|
3888
3974
|
const isTop = position.startsWith("top-");
|
|
3889
3975
|
const isRight = position.endsWith("-right");
|
|
3890
|
-
const cornerClass = `${
|
|
3976
|
+
const cornerClass = `${p36}-resize-grip ${p36}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
|
|
3891
3977
|
const onPointerDown = (e) => {
|
|
3892
3978
|
if (!panelEl) return;
|
|
3893
3979
|
const target = e.currentTarget;
|
|
@@ -3912,8 +3998,8 @@ function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, stri
|
|
|
3912
3998
|
if (!d || e.pointerId !== d.pointerId || !panelEl) return;
|
|
3913
3999
|
const dx = (e.clientX - d.startX) * d.dirX;
|
|
3914
4000
|
const dy = (e.clientY - d.startY) * d.dirY;
|
|
3915
|
-
panelEl.style.setProperty(`--${
|
|
3916
|
-
panelEl.style.setProperty(`--${
|
|
4001
|
+
panelEl.style.setProperty(`--${p36}-widget-w`, `${d.startW + dx}px`);
|
|
4002
|
+
panelEl.style.setProperty(`--${p36}-widget-h`, `${d.startH + dy}px`);
|
|
3917
4003
|
};
|
|
3918
4004
|
const onPointerUp = (e) => {
|
|
3919
4005
|
const d = dragRef.current;
|
|
@@ -4359,6 +4445,10 @@ function Composer({ options, transport, feedback, bus, isStreaming, onSend, onSt
|
|
|
4359
4445
|
const onPaste = (e) => {
|
|
4360
4446
|
const data = e.clipboardData;
|
|
4361
4447
|
if (!data) return;
|
|
4448
|
+
const editable = e.target?.closest?.(
|
|
4449
|
+
"input, textarea, [contenteditable]:not([contenteditable='false'])"
|
|
4450
|
+
);
|
|
4451
|
+
if (editable && editable !== ta) return;
|
|
4362
4452
|
if (filesEnabled) {
|
|
4363
4453
|
const result = ingest(data.items, attsRef.current, options.attachments);
|
|
4364
4454
|
if (result.accepted.length > 0) {
|
|
@@ -4369,7 +4459,7 @@ function Composer({ options, transport, feedback, bus, isStreaming, onSend, onSt
|
|
|
4369
4459
|
return;
|
|
4370
4460
|
}
|
|
4371
4461
|
}
|
|
4372
|
-
if (
|
|
4462
|
+
if (editable === ta) return;
|
|
4373
4463
|
const pastedText = data.getData("text/plain");
|
|
4374
4464
|
if (!pastedText) return;
|
|
4375
4465
|
e.preventDefault();
|
|
@@ -4650,7 +4740,7 @@ function usePopoverMenu({ itemCount, initialFocusIndex }) {
|
|
|
4650
4740
|
// src/ui/overflow-menu.tsx
|
|
4651
4741
|
import { jsx as jsx8, jsxs as jsxs6 } from "preact/jsx-runtime";
|
|
4652
4742
|
function OverflowMenu({ items, triggerLabel }) {
|
|
4653
|
-
const
|
|
4743
|
+
const p36 = BRAND.cssPrefix;
|
|
4654
4744
|
const menu = usePopoverMenu({ itemCount: items.length });
|
|
4655
4745
|
const handleSelect = (item) => {
|
|
4656
4746
|
if (item.disabled) return;
|
|
@@ -4673,13 +4763,13 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4673
4763
|
e.stopPropagation();
|
|
4674
4764
|
pickSegment(item, segs[next].value);
|
|
4675
4765
|
};
|
|
4676
|
-
return /* @__PURE__ */ jsxs6("div", { class: `${
|
|
4766
|
+
return /* @__PURE__ */ jsxs6("div", { class: `${p36}-menu-wrap`, children: [
|
|
4677
4767
|
/* @__PURE__ */ jsx8(
|
|
4678
4768
|
"button",
|
|
4679
4769
|
{
|
|
4680
4770
|
ref: menu.triggerRef,
|
|
4681
4771
|
type: "button",
|
|
4682
|
-
class: `${
|
|
4772
|
+
class: `${p36}-icon-btn`,
|
|
4683
4773
|
"aria-label": triggerLabel,
|
|
4684
4774
|
"aria-haspopup": "menu",
|
|
4685
4775
|
"aria-expanded": menu.open,
|
|
@@ -4693,7 +4783,7 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4693
4783
|
"div",
|
|
4694
4784
|
{
|
|
4695
4785
|
ref: menu.menuRef,
|
|
4696
|
-
class: `${
|
|
4786
|
+
class: `${p36}-menu`,
|
|
4697
4787
|
role: "menu",
|
|
4698
4788
|
"aria-label": triggerLabel,
|
|
4699
4789
|
onKeyDown: menu.onMenuKey,
|
|
@@ -4703,14 +4793,14 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4703
4793
|
"div",
|
|
4704
4794
|
{
|
|
4705
4795
|
role: "menuitem",
|
|
4706
|
-
class: `${
|
|
4796
|
+
class: `${p36}-menu-item ${p36}-menu-item-segmented`,
|
|
4707
4797
|
"aria-label": item.label,
|
|
4708
4798
|
tabIndex: -1,
|
|
4709
4799
|
onKeyDown: (e) => onSegmentRowKey(e, item),
|
|
4710
4800
|
children: [
|
|
4711
|
-
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4712
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4713
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4801
|
+
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
|
|
4802
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
|
|
4803
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
|
|
4714
4804
|
const active = seg.value === item.value;
|
|
4715
4805
|
return /* @__PURE__ */ jsx8(
|
|
4716
4806
|
"button",
|
|
@@ -4718,7 +4808,7 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4718
4808
|
type: "button",
|
|
4719
4809
|
role: "menuitemradio",
|
|
4720
4810
|
"aria-checked": active,
|
|
4721
|
-
class: `${
|
|
4811
|
+
class: `${p36}-segment`,
|
|
4722
4812
|
"data-on": active ? "true" : void 0,
|
|
4723
4813
|
lang: seg.lang,
|
|
4724
4814
|
title: seg.value,
|
|
@@ -4738,14 +4828,14 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4738
4828
|
{
|
|
4739
4829
|
type: "button",
|
|
4740
4830
|
role: "menuitem",
|
|
4741
|
-
class: `${
|
|
4831
|
+
class: `${p36}-menu-item`,
|
|
4742
4832
|
"aria-pressed": item.type === "switch" ? item.on : void 0,
|
|
4743
4833
|
disabled: item.disabled,
|
|
4744
4834
|
onClick: () => handleSelect(item),
|
|
4745
4835
|
children: [
|
|
4746
|
-
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4747
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4748
|
-
item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4836
|
+
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
|
|
4837
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
|
|
4838
|
+
item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
|
|
4749
4839
|
]
|
|
4750
4840
|
},
|
|
4751
4841
|
item.id
|
|
@@ -4896,7 +4986,7 @@ function HeaderActions({ panelProps, variant }) {
|
|
|
4896
4986
|
}
|
|
4897
4987
|
|
|
4898
4988
|
// src/ui/message-list.tsx
|
|
4899
|
-
import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as
|
|
4989
|
+
import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState8 } from "preact/hooks";
|
|
4900
4990
|
import { useComputed as useComputed7 } from "@preact/signals";
|
|
4901
4991
|
|
|
4902
4992
|
// src/ui/form/dynamic-form.tsx
|
|
@@ -5293,6 +5383,7 @@ function FormDoneMarker({
|
|
|
5293
5383
|
}
|
|
5294
5384
|
|
|
5295
5385
|
// src/ui/message-bubble.tsx
|
|
5386
|
+
import { useState as useState7 } from "preact/hooks";
|
|
5296
5387
|
import { useComputed as useComputed6 } from "@preact/signals";
|
|
5297
5388
|
|
|
5298
5389
|
// src/stream/constants.ts
|
|
@@ -5373,20 +5464,64 @@ function hardenLink(a) {
|
|
|
5373
5464
|
a.rel = [...tokens].join(" ");
|
|
5374
5465
|
}
|
|
5375
5466
|
|
|
5376
|
-
// src/ui/
|
|
5467
|
+
// src/ui/message-feedback.tsx
|
|
5468
|
+
import { useState as useState6 } from "preact/hooks";
|
|
5377
5469
|
import { jsx as jsx13, jsxs as jsxs10 } from "preact/jsx-runtime";
|
|
5378
5470
|
var p12 = BRAND.cssPrefix;
|
|
5471
|
+
function MessageFeedback({ messageId, initial, strings, onFeedback }) {
|
|
5472
|
+
const [value, setValue] = useState6(initial);
|
|
5473
|
+
const choose = (next) => {
|
|
5474
|
+
const resolved = value === next ? null : next;
|
|
5475
|
+
setValue(resolved);
|
|
5476
|
+
onFeedback(messageId, resolved);
|
|
5477
|
+
};
|
|
5478
|
+
return /* @__PURE__ */ jsxs10("div", { class: `${p12}-feedback`, role: "group", "data-testid": TID.messageFeedback, children: [
|
|
5479
|
+
/* @__PURE__ */ jsx13(
|
|
5480
|
+
"button",
|
|
5481
|
+
{
|
|
5482
|
+
type: "button",
|
|
5483
|
+
class: `${p12}-msg-action`,
|
|
5484
|
+
"data-active": value === "up" ? "true" : void 0,
|
|
5485
|
+
"aria-pressed": value === "up",
|
|
5486
|
+
"aria-label": strings.feedbackUp,
|
|
5487
|
+
title: strings.feedbackUp,
|
|
5488
|
+
onClick: () => choose("up"),
|
|
5489
|
+
"data-testid": TID.feedbackUp,
|
|
5490
|
+
children: /* @__PURE__ */ jsx13(ThumbUpIcon, {})
|
|
5491
|
+
}
|
|
5492
|
+
),
|
|
5493
|
+
/* @__PURE__ */ jsx13(
|
|
5494
|
+
"button",
|
|
5495
|
+
{
|
|
5496
|
+
type: "button",
|
|
5497
|
+
class: `${p12}-msg-action`,
|
|
5498
|
+
"data-active": value === "down" ? "true" : void 0,
|
|
5499
|
+
"aria-pressed": value === "down",
|
|
5500
|
+
"aria-label": strings.feedbackDown,
|
|
5501
|
+
title: strings.feedbackDown,
|
|
5502
|
+
onClick: () => choose("down"),
|
|
5503
|
+
"data-testid": TID.feedbackDown,
|
|
5504
|
+
children: /* @__PURE__ */ jsx13(ThumbDownIcon, {})
|
|
5505
|
+
}
|
|
5506
|
+
),
|
|
5507
|
+
/* @__PURE__ */ jsx13("span", { class: `${p12}-sr-only`, role: "status", "aria-live": "polite", children: value ? strings.feedbackThanks : "" })
|
|
5508
|
+
] });
|
|
5509
|
+
}
|
|
5510
|
+
|
|
5511
|
+
// src/ui/source-view.tsx
|
|
5512
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "preact/jsx-runtime";
|
|
5513
|
+
var p13 = BRAND.cssPrefix;
|
|
5379
5514
|
function SourceView({ part, strings }) {
|
|
5380
5515
|
const label = part.title || part.filename || part.url || strings.sources;
|
|
5381
5516
|
if (part.url) {
|
|
5382
|
-
return /* @__PURE__ */
|
|
5383
|
-
/* @__PURE__ */
|
|
5384
|
-
/* @__PURE__ */
|
|
5517
|
+
return /* @__PURE__ */ jsxs11("a", { class: `${p13}-source`, href: part.url, target: "_blank", rel: "noreferrer noopener", "data-testid": TID.source, children: [
|
|
5518
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-icon`, "aria-hidden": "true", children: "\u{1F517}" }),
|
|
5519
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-label`, children: label })
|
|
5385
5520
|
] });
|
|
5386
5521
|
}
|
|
5387
|
-
return /* @__PURE__ */
|
|
5388
|
-
/* @__PURE__ */
|
|
5389
|
-
/* @__PURE__ */
|
|
5522
|
+
return /* @__PURE__ */ jsxs11("span", { class: `${p13}-source`, "data-testid": TID.source, children: [
|
|
5523
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-icon`, "aria-hidden": "true", children: "\u{1F4C4}" }),
|
|
5524
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-label`, children: label })
|
|
5390
5525
|
] });
|
|
5391
5526
|
}
|
|
5392
5527
|
|
|
@@ -5395,8 +5530,8 @@ import { useComputed as useComputed3 } from "@preact/signals";
|
|
|
5395
5530
|
|
|
5396
5531
|
// src/ui/tool-card.tsx
|
|
5397
5532
|
import { useComputed as useComputed2 } from "@preact/signals";
|
|
5398
|
-
import { Fragment as Fragment2, jsx as
|
|
5399
|
-
var
|
|
5533
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
|
|
5534
|
+
var p14 = BRAND.cssPrefix;
|
|
5400
5535
|
function toolName(raw) {
|
|
5401
5536
|
if (raw.startsWith("tool:")) return raw.slice(5);
|
|
5402
5537
|
if (raw.startsWith("tool-")) return raw.slice(5);
|
|
@@ -5416,9 +5551,9 @@ function statusOf(state, approval) {
|
|
|
5416
5551
|
return "running";
|
|
5417
5552
|
}
|
|
5418
5553
|
function StatusIcon({ status }) {
|
|
5419
|
-
if (status === "denied" || status === "error" || status === "superseded") return /* @__PURE__ */
|
|
5420
|
-
if (status === "completed" || status === "responded") return /* @__PURE__ */
|
|
5421
|
-
return /* @__PURE__ */
|
|
5554
|
+
if (status === "denied" || status === "error" || status === "superseded") return /* @__PURE__ */ jsx15(XCircleIcon, {});
|
|
5555
|
+
if (status === "completed" || status === "responded") return /* @__PURE__ */ jsx15(CheckCircleIcon, {});
|
|
5556
|
+
return /* @__PURE__ */ jsx15(ClockIcon, {});
|
|
5422
5557
|
}
|
|
5423
5558
|
function statusLabel(status, strings) {
|
|
5424
5559
|
switch (status) {
|
|
@@ -5446,8 +5581,8 @@ function ToolStatus({
|
|
|
5446
5581
|
}) {
|
|
5447
5582
|
const base = statusOf(state, approval);
|
|
5448
5583
|
const status = superseded && (base === "awaiting" || base === "running") ? "superseded" : base;
|
|
5449
|
-
return /* @__PURE__ */
|
|
5450
|
-
/* @__PURE__ */
|
|
5584
|
+
return /* @__PURE__ */ jsxs12("span", { class: `${p14}-toolui-badge ${p14}-toolui-status`, "data-status": status, children: [
|
|
5585
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-status-icon`, children: /* @__PURE__ */ jsx15(StatusIcon, { status }) }),
|
|
5451
5586
|
statusLabel(status, strings)
|
|
5452
5587
|
] });
|
|
5453
5588
|
}
|
|
@@ -5458,11 +5593,11 @@ function ToolHeaderRow({
|
|
|
5458
5593
|
strings,
|
|
5459
5594
|
superseded
|
|
5460
5595
|
}) {
|
|
5461
|
-
return /* @__PURE__ */
|
|
5462
|
-
/* @__PURE__ */
|
|
5463
|
-
/* @__PURE__ */
|
|
5464
|
-
/* @__PURE__ */
|
|
5465
|
-
/* @__PURE__ */
|
|
5596
|
+
return /* @__PURE__ */ jsxs12(Fragment2, { children: [
|
|
5597
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-wrench`, children: /* @__PURE__ */ jsx15(WrenchIcon, {}) }),
|
|
5598
|
+
/* @__PURE__ */ jsx15("strong", { class: `${p14}-toolui-title`, children: name }),
|
|
5599
|
+
/* @__PURE__ */ jsx15(ToolStatus, { state, approval, strings, superseded }),
|
|
5600
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-chevron`, children: /* @__PURE__ */ jsx15(ChevronDownIcon, {}) })
|
|
5466
5601
|
] });
|
|
5467
5602
|
}
|
|
5468
5603
|
function ToolCollapsibleCard({
|
|
@@ -5476,8 +5611,8 @@ function ToolCollapsibleCard({
|
|
|
5476
5611
|
const error = useComputed2(() => part.errorSig.value);
|
|
5477
5612
|
const state = useComputed2(() => part.stateSig.value);
|
|
5478
5613
|
const approval = useComputed2(() => part.approvalSig.value);
|
|
5479
|
-
return /* @__PURE__ */
|
|
5480
|
-
/* @__PURE__ */
|
|
5614
|
+
return /* @__PURE__ */ jsxs12("details", { class: `${p14}-toolui ${p14}-toolui-collapsible`, "data-testid": testid, children: [
|
|
5615
|
+
/* @__PURE__ */ jsx15("summary", { class: `${p14}-toolui-head`, children: /* @__PURE__ */ jsx15(
|
|
5481
5616
|
ToolHeaderRow,
|
|
5482
5617
|
{
|
|
5483
5618
|
name: toolName(part.toolName),
|
|
@@ -5487,17 +5622,17 @@ function ToolCollapsibleCard({
|
|
|
5487
5622
|
superseded
|
|
5488
5623
|
}
|
|
5489
5624
|
) }),
|
|
5490
|
-
/* @__PURE__ */
|
|
5491
|
-
output.value !== void 0 ? /* @__PURE__ */
|
|
5492
|
-
error.value ? /* @__PURE__ */
|
|
5625
|
+
/* @__PURE__ */ jsx15(ToolSection, { label: strings.toolParameters, value: input.value }),
|
|
5626
|
+
output.value !== void 0 ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.toolResult, value: output.value }) : null,
|
|
5627
|
+
error.value ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
|
|
5493
5628
|
] });
|
|
5494
5629
|
}
|
|
5495
5630
|
function ToolSection({ label, value, error }) {
|
|
5496
5631
|
const text = error ? String(value ?? "") : pretty(unwrapResult(value));
|
|
5497
5632
|
if (!text) return null;
|
|
5498
|
-
return /* @__PURE__ */
|
|
5499
|
-
/* @__PURE__ */
|
|
5500
|
-
/* @__PURE__ */
|
|
5633
|
+
return /* @__PURE__ */ jsxs12("div", { class: `${p14}-toolui-section`, children: [
|
|
5634
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-label`, children: label }),
|
|
5635
|
+
/* @__PURE__ */ jsx15("pre", { class: `${p14}-toolui-code`, "data-error": error ? "true" : void 0, children: text })
|
|
5501
5636
|
] });
|
|
5502
5637
|
}
|
|
5503
5638
|
function unwrapResult(output) {
|
|
@@ -5519,8 +5654,8 @@ function pretty(value) {
|
|
|
5519
5654
|
}
|
|
5520
5655
|
|
|
5521
5656
|
// src/ui/tool-approval.tsx
|
|
5522
|
-
import { Fragment as Fragment3, jsx as
|
|
5523
|
-
var
|
|
5657
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
|
|
5658
|
+
var p15 = BRAND.cssPrefix;
|
|
5524
5659
|
function ToolApproval({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5525
5660
|
const approval = useComputed3(() => part.approvalSig.value);
|
|
5526
5661
|
const state = useComputed3(() => part.stateSig.value);
|
|
@@ -5530,50 +5665,50 @@ function ToolApproval({ part, strings, active, superseded = false, onDecision, o
|
|
|
5530
5665
|
const editable = responded && active && !terminal;
|
|
5531
5666
|
const skipped = superseded && !decided;
|
|
5532
5667
|
const id = part.toolCallId;
|
|
5533
|
-
return /* @__PURE__ */
|
|
5534
|
-
/* @__PURE__ */
|
|
5535
|
-
skipped || terminal ? null : /* @__PURE__ */
|
|
5668
|
+
return /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui-group`, "data-testid": decided ? TID.toolDecision : TID.toolApproval, children: [
|
|
5669
|
+
/* @__PURE__ */ jsx16(ToolCollapsibleCard, { part, strings, superseded: skipped }),
|
|
5670
|
+
skipped || terminal ? null : /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui ${p15}-toolui-body`, children: [
|
|
5536
5671
|
responded ? (
|
|
5537
5672
|
// DECIDED — lead with the recorded response (no repeated prompt/body), so the card barely
|
|
5538
5673
|
// changes height from the awaiting state and the Edit sits right under the edit hint.
|
|
5539
|
-
/* @__PURE__ */
|
|
5540
|
-
/* @__PURE__ */
|
|
5674
|
+
/* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
5675
|
+
/* @__PURE__ */ jsxs13("p", { class: `${p15}-toolui-prompt`, children: [
|
|
5541
5676
|
strings.approvalYourResponse.replace("{decision}", approved ? strings.approve : strings.reject),
|
|
5542
5677
|
approval.value?.reason ? ` \u2014 ${approval.value.reason}` : ""
|
|
5543
5678
|
] }),
|
|
5544
|
-
editable ? /* @__PURE__ */
|
|
5545
|
-
!editable && !terminal ? /* @__PURE__ */
|
|
5679
|
+
editable ? /* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalEditHint }) : null,
|
|
5680
|
+
!editable && !terminal ? /* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalSubmitting }) : null
|
|
5546
5681
|
] })
|
|
5547
5682
|
) : (
|
|
5548
5683
|
// AWAITING — the prompt + what to do, then Reject / Approve.
|
|
5549
|
-
/* @__PURE__ */
|
|
5550
|
-
/* @__PURE__ */
|
|
5551
|
-
/* @__PURE__ */
|
|
5684
|
+
/* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
5685
|
+
/* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-prompt`, children: strings.approvalPrompt.replace("{tool}", name) }),
|
|
5686
|
+
/* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalBody })
|
|
5552
5687
|
] })
|
|
5553
5688
|
),
|
|
5554
|
-
!decided && active ? /* @__PURE__ */
|
|
5555
|
-
/* @__PURE__ */
|
|
5689
|
+
!decided && active ? /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui-actions`, children: [
|
|
5690
|
+
/* @__PURE__ */ jsx16(
|
|
5556
5691
|
"button",
|
|
5557
5692
|
{
|
|
5558
5693
|
type: "button",
|
|
5559
|
-
class: `${
|
|
5694
|
+
class: `${p15}-form-skip`,
|
|
5560
5695
|
onClick: () => onDecision(id, false),
|
|
5561
5696
|
"data-testid": TID.toolReject,
|
|
5562
5697
|
children: strings.reject
|
|
5563
5698
|
}
|
|
5564
5699
|
),
|
|
5565
|
-
/* @__PURE__ */
|
|
5700
|
+
/* @__PURE__ */ jsx16(
|
|
5566
5701
|
"button",
|
|
5567
5702
|
{
|
|
5568
5703
|
type: "button",
|
|
5569
|
-
class: `${
|
|
5704
|
+
class: `${p15}-form-submit`,
|
|
5570
5705
|
onClick: () => onDecision(id, true),
|
|
5571
5706
|
"data-testid": TID.toolApprove,
|
|
5572
5707
|
children: strings.approve
|
|
5573
5708
|
}
|
|
5574
5709
|
)
|
|
5575
5710
|
] }) : null,
|
|
5576
|
-
editable ? /* @__PURE__ */
|
|
5711
|
+
editable ? /* @__PURE__ */ jsx16("div", { class: `${p15}-toolui-actions`, children: /* @__PURE__ */ jsx16("button", { type: "button", class: `${p15}-form-skip`, onClick: () => onEdit(id), "data-testid": TID.toolEdit, children: strings.edit }) }) : null
|
|
5577
5712
|
] })
|
|
5578
5713
|
] });
|
|
5579
5714
|
}
|
|
@@ -5648,8 +5783,8 @@ function str(v) {
|
|
|
5648
5783
|
}
|
|
5649
5784
|
|
|
5650
5785
|
// src/ui/tool-ask-questions.tsx
|
|
5651
|
-
import { Fragment as Fragment4, jsx as
|
|
5652
|
-
var
|
|
5786
|
+
import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
|
|
5787
|
+
var p16 = BRAND.cssPrefix;
|
|
5653
5788
|
function ToolAskQuestions({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5654
5789
|
const state = useComputed4(() => part.stateSig.value);
|
|
5655
5790
|
const approval = useComputed4(() => part.approvalSig.value);
|
|
@@ -5658,16 +5793,16 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5658
5793
|
const req = request.value;
|
|
5659
5794
|
if (decided) {
|
|
5660
5795
|
const editable = responded && active && !terminal;
|
|
5661
|
-
return /* @__PURE__ */
|
|
5796
|
+
return /* @__PURE__ */ jsx17(DecidedCard, { part, strings, req, editable, onEdit: () => onEdit(part.toolCallId) });
|
|
5662
5797
|
}
|
|
5663
5798
|
const stale = superseded;
|
|
5664
|
-
return /* @__PURE__ */
|
|
5665
|
-
/* @__PURE__ */
|
|
5666
|
-
/* @__PURE__ */
|
|
5667
|
-
/* @__PURE__ */
|
|
5668
|
-
] }) : /* @__PURE__ */
|
|
5669
|
-
req.intro ? /* @__PURE__ */
|
|
5670
|
-
stale ? null : /* @__PURE__ */
|
|
5799
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui${stale ? ` ${p16}-toolui-stale` : ""}`, "data-testid": TID.toolAskQuestions, children: [
|
|
5800
|
+
/* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-head`, children: stale ? /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
5801
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputBadge }),
|
|
5802
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-muted`, children: strings.statusSuperseded })
|
|
5803
|
+
] }) : /* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputRequired }) }),
|
|
5804
|
+
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5805
|
+
stale ? null : /* @__PURE__ */ jsx17(
|
|
5671
5806
|
AskBody,
|
|
5672
5807
|
{
|
|
5673
5808
|
req,
|
|
@@ -5684,7 +5819,7 @@ function AskBody({
|
|
|
5684
5819
|
}) {
|
|
5685
5820
|
const fields = askQuestionsToFields(req, strings.confirmYes, strings.confirmNo);
|
|
5686
5821
|
const loneTextarea = req.questions.length === 1 && req.questions[0]?.type === "text";
|
|
5687
|
-
return /* @__PURE__ */
|
|
5822
|
+
return /* @__PURE__ */ jsx17(
|
|
5688
5823
|
DynamicForm,
|
|
5689
5824
|
{
|
|
5690
5825
|
fields,
|
|
@@ -5719,20 +5854,20 @@ function DecidedCard({
|
|
|
5719
5854
|
const approval = useComputed4(() => part.approvalSig.value);
|
|
5720
5855
|
const skipped = approval.value?.approved === false;
|
|
5721
5856
|
const answers = approval.value?.approved ? parseAnswers(approval.value.reason) : {};
|
|
5722
|
-
return /* @__PURE__ */
|
|
5723
|
-
/* @__PURE__ */
|
|
5724
|
-
/* @__PURE__ */
|
|
5725
|
-
/* @__PURE__ */
|
|
5857
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui`, "data-testid": TID.toolDecision, children: [
|
|
5858
|
+
/* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui-head`, children: [
|
|
5859
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputBadge }),
|
|
5860
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge`, children: skipped ? strings.inputSkipped : strings.inputAnswered })
|
|
5726
5861
|
] }),
|
|
5727
|
-
req.intro ? /* @__PURE__ */
|
|
5862
|
+
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5728
5863
|
req.questions.map((q) => {
|
|
5729
5864
|
const text = skipped ? "" : answers[q.key] ?? "";
|
|
5730
|
-
return /* @__PURE__ */
|
|
5731
|
-
/* @__PURE__ */
|
|
5732
|
-
text ? /* @__PURE__ */
|
|
5865
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui-section`, children: [
|
|
5866
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-label`, children: q.question }),
|
|
5867
|
+
text ? /* @__PURE__ */ jsx17("p", { class: `${p16}-toolui-text`, children: text }) : null
|
|
5733
5868
|
] }, q.key);
|
|
5734
5869
|
}),
|
|
5735
|
-
editable ? /* @__PURE__ */
|
|
5870
|
+
editable ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-actions`, children: /* @__PURE__ */ jsx17("button", { type: "button", class: `${p16}-form-skip`, onClick: onEdit, "data-testid": TID.toolEdit, children: strings.edit }) }) : null
|
|
5736
5871
|
] });
|
|
5737
5872
|
}
|
|
5738
5873
|
function parseAnswers(reason) {
|
|
@@ -5758,19 +5893,19 @@ function parseAnswers(reason) {
|
|
|
5758
5893
|
|
|
5759
5894
|
// src/ui/tool-call.tsx
|
|
5760
5895
|
import { useComputed as useComputed5 } from "@preact/signals";
|
|
5761
|
-
import { jsx as
|
|
5896
|
+
import { jsx as jsx18 } from "preact/jsx-runtime";
|
|
5762
5897
|
function ToolCall({ part, strings }) {
|
|
5763
5898
|
const input = useComputed5(() => part.inputSig.value);
|
|
5764
5899
|
const output = useComputed5(() => part.outputSig.value);
|
|
5765
5900
|
const error = useComputed5(() => part.errorSig.value);
|
|
5766
5901
|
const hasDetails = useComputed5(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
|
|
5767
5902
|
if (!hasDetails.value) return null;
|
|
5768
|
-
return /* @__PURE__ */
|
|
5903
|
+
return /* @__PURE__ */ jsx18(ToolCollapsibleCard, { part, strings, testid: TID.toolCall });
|
|
5769
5904
|
}
|
|
5770
5905
|
|
|
5771
5906
|
// src/ui/message-bubble.tsx
|
|
5772
|
-
import { jsx as
|
|
5773
|
-
var
|
|
5907
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "preact/jsx-runtime";
|
|
5908
|
+
var p17 = BRAND.cssPrefix;
|
|
5774
5909
|
function MessageBubble({
|
|
5775
5910
|
message,
|
|
5776
5911
|
strings,
|
|
@@ -5781,7 +5916,9 @@ function MessageBubble({
|
|
|
5781
5916
|
interactive = false,
|
|
5782
5917
|
superseded = false,
|
|
5783
5918
|
tool,
|
|
5784
|
-
onRetry
|
|
5919
|
+
onRetry,
|
|
5920
|
+
enableMessageFeedback = false,
|
|
5921
|
+
onFeedback
|
|
5785
5922
|
}) {
|
|
5786
5923
|
const parts = useComputed6(() => message.partsSig.value);
|
|
5787
5924
|
const partList = parts.value;
|
|
@@ -5808,31 +5945,82 @@ function MessageBubble({
|
|
|
5808
5945
|
const showStreamDots = streaming && !bufferedHold && !(reasoningVisible.value && working);
|
|
5809
5946
|
if (hideCanceledHusk.value) return null;
|
|
5810
5947
|
const stamp = formatStamp(message.createdAt);
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5948
|
+
const showFeedback = enableMessageFeedback && !!onFeedback && !!message.serverMessageId && message.role === "assistant" && !streaming && message.status !== "error" && !emptyReply.value;
|
|
5949
|
+
const copyText = partList.filter((part) => part.kind === "text").map((part) => part.textSig.value).join("\n\n").trim();
|
|
5950
|
+
const showCopy = !streaming && message.status !== "error" && !emptyReply.value && copyText.length > 0;
|
|
5951
|
+
const showActions = showFeedback || showCopy;
|
|
5952
|
+
return /* @__PURE__ */ jsx19(
|
|
5953
|
+
"div",
|
|
5954
|
+
{
|
|
5955
|
+
class: `${p17}-bubble-row`,
|
|
5956
|
+
"data-role": message.role,
|
|
5957
|
+
"data-mid": message.serverMessageId ?? message.id,
|
|
5958
|
+
"data-testid": tid(TID.messageBubble, message.id),
|
|
5959
|
+
children: /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-col`, children: [
|
|
5960
|
+
/* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble`, children: [
|
|
5961
|
+
bufferedHold ? /* @__PURE__ */ jsx19(LoadingSpinner, { label: strings.loading }) : partList.map((part, index) => /* @__PURE__ */ jsx19(
|
|
5962
|
+
PartView,
|
|
5963
|
+
{
|
|
5964
|
+
part,
|
|
5965
|
+
active: working,
|
|
5966
|
+
strings,
|
|
5967
|
+
showReasoning,
|
|
5968
|
+
showToolCalls,
|
|
5969
|
+
showSources,
|
|
5970
|
+
interactive: interactive && (part.kind !== "tool" || index > lastOutputIdx.value),
|
|
5971
|
+
superseded,
|
|
5972
|
+
tool
|
|
5973
|
+
},
|
|
5974
|
+
partKey(part)
|
|
5975
|
+
)),
|
|
5976
|
+
showStreamDots && /* @__PURE__ */ jsx19(TypingDots, {}),
|
|
5977
|
+
message.status === "error" && message.errorText || emptyReply.value ? /* @__PURE__ */ jsxs15("div", { class: `${p17}-error`, role: "alert", children: [
|
|
5978
|
+
/* @__PURE__ */ jsx19("span", { children: message.errorText ?? strings.errorGeneric }),
|
|
5979
|
+
onRetry ? /* @__PURE__ */ jsx19("button", { type: "button", class: `${p17}-error-retry`, onClick: onRetry, "data-testid": TID.messageRetry, children: strings.errorRetry }) : null
|
|
5980
|
+
] }) : null
|
|
5981
|
+
] }),
|
|
5982
|
+
stamp || showActions ? /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-meta`, children: [
|
|
5983
|
+
stamp ? /* @__PURE__ */ jsx19("time", { class: `${p17}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null,
|
|
5984
|
+
showActions ? /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-actions`, children: [
|
|
5985
|
+
showFeedback && message.serverMessageId ? /* @__PURE__ */ jsx19(
|
|
5986
|
+
MessageFeedback,
|
|
5987
|
+
{
|
|
5988
|
+
messageId: message.serverMessageId,
|
|
5989
|
+
initial: message.feedback ?? null,
|
|
5990
|
+
strings,
|
|
5991
|
+
onFeedback
|
|
5992
|
+
}
|
|
5993
|
+
) : null,
|
|
5994
|
+
showCopy ? /* @__PURE__ */ jsx19(CopyButton, { text: copyText, strings }) : null
|
|
5995
|
+
] }) : null
|
|
5996
|
+
] }) : null
|
|
5997
|
+
] })
|
|
5998
|
+
}
|
|
5999
|
+
);
|
|
6000
|
+
}
|
|
6001
|
+
function CopyButton({ text, strings }) {
|
|
6002
|
+
const [copied, setCopied] = useState7(false);
|
|
6003
|
+
const onCopy = () => {
|
|
6004
|
+
navigator.clipboard?.writeText(text).then(() => {
|
|
6005
|
+
setCopied(true);
|
|
6006
|
+
setTimeout(() => setCopied(false), 1500);
|
|
6007
|
+
}).catch(() => {
|
|
6008
|
+
});
|
|
6009
|
+
};
|
|
6010
|
+
const label = copied ? strings.copied : strings.copy;
|
|
6011
|
+
return /* @__PURE__ */ jsx19(
|
|
6012
|
+
"button",
|
|
6013
|
+
{
|
|
6014
|
+
type: "button",
|
|
6015
|
+
class: `${p17}-msg-action`,
|
|
6016
|
+
"data-active": copied ? "true" : void 0,
|
|
6017
|
+
"aria-label": label,
|
|
6018
|
+
title: label,
|
|
6019
|
+
onClick: onCopy,
|
|
6020
|
+
"data-testid": TID.messageCopy,
|
|
6021
|
+
children: copied ? /* @__PURE__ */ jsx19(CheckIcon, {}) : /* @__PURE__ */ jsx19(CopyIcon, {})
|
|
6022
|
+
}
|
|
6023
|
+
);
|
|
5836
6024
|
}
|
|
5837
6025
|
function formatStamp(createdAt) {
|
|
5838
6026
|
if (typeof createdAt !== "number" || !Number.isFinite(createdAt)) return null;
|
|
@@ -5862,11 +6050,11 @@ function PartView({
|
|
|
5862
6050
|
case "step-start":
|
|
5863
6051
|
return null;
|
|
5864
6052
|
case "text":
|
|
5865
|
-
return /* @__PURE__ */
|
|
6053
|
+
return /* @__PURE__ */ jsx19(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig });
|
|
5866
6054
|
case "reasoning":
|
|
5867
|
-
return showReasoning ? /* @__PURE__ */
|
|
6055
|
+
return showReasoning ? /* @__PURE__ */ jsx19(ReasoningView, { part, active, strings }) : null;
|
|
5868
6056
|
case "tool":
|
|
5869
|
-
return /* @__PURE__ */
|
|
6057
|
+
return /* @__PURE__ */ jsx19(
|
|
5870
6058
|
ToolPartView,
|
|
5871
6059
|
{
|
|
5872
6060
|
part,
|
|
@@ -5879,11 +6067,11 @@ function PartView({
|
|
|
5879
6067
|
);
|
|
5880
6068
|
case "file":
|
|
5881
6069
|
if (part.mediaType.startsWith("image/")) {
|
|
5882
|
-
return /* @__PURE__ */
|
|
6070
|
+
return /* @__PURE__ */ jsx19("img", { src: part.url, alt: "", loading: "lazy" });
|
|
5883
6071
|
}
|
|
5884
|
-
return /* @__PURE__ */
|
|
6072
|
+
return /* @__PURE__ */ jsx19("a", { href: part.url, target: "_blank", rel: "noreferrer noopener", children: part.url });
|
|
5885
6073
|
case "source":
|
|
5886
|
-
return showSources ? /* @__PURE__ */
|
|
6074
|
+
return showSources ? /* @__PURE__ */ jsx19(SourceView, { part, strings }) : null;
|
|
5887
6075
|
}
|
|
5888
6076
|
}
|
|
5889
6077
|
function ToolPartView({
|
|
@@ -5897,7 +6085,7 @@ function ToolPartView({
|
|
|
5897
6085
|
const hasApproval = useComputed6(() => part.approvalSig.value !== void 0);
|
|
5898
6086
|
if (tool?.humanInLoop) {
|
|
5899
6087
|
if (isAskUserQuestionsTool(part.toolName)) {
|
|
5900
|
-
return /* @__PURE__ */
|
|
6088
|
+
return /* @__PURE__ */ jsx19(
|
|
5901
6089
|
ToolAskQuestions,
|
|
5902
6090
|
{
|
|
5903
6091
|
part,
|
|
@@ -5910,7 +6098,7 @@ function ToolPartView({
|
|
|
5910
6098
|
);
|
|
5911
6099
|
}
|
|
5912
6100
|
if (hasApproval.value) {
|
|
5913
|
-
return /* @__PURE__ */
|
|
6101
|
+
return /* @__PURE__ */ jsx19(
|
|
5914
6102
|
ToolApproval,
|
|
5915
6103
|
{
|
|
5916
6104
|
part,
|
|
@@ -5923,16 +6111,16 @@ function ToolPartView({
|
|
|
5923
6111
|
);
|
|
5924
6112
|
}
|
|
5925
6113
|
}
|
|
5926
|
-
return showToolCalls ? /* @__PURE__ */
|
|
6114
|
+
return showToolCalls ? /* @__PURE__ */ jsx19(ToolCall, { part, strings }) : null;
|
|
5927
6115
|
}
|
|
5928
6116
|
function ReasoningView({
|
|
5929
6117
|
part,
|
|
5930
6118
|
active,
|
|
5931
6119
|
strings
|
|
5932
6120
|
}) {
|
|
5933
|
-
return /* @__PURE__ */
|
|
5934
|
-
/* @__PURE__ */
|
|
5935
|
-
/* @__PURE__ */
|
|
6121
|
+
return /* @__PURE__ */ jsxs15("details", { class: `${p17}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
|
|
6122
|
+
/* @__PURE__ */ jsx19("summary", { class: `${p17}-reasoning-summary`, children: /* @__PURE__ */ jsx19("span", { class: `${p17}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
|
|
6123
|
+
/* @__PURE__ */ jsx19("div", { class: `${p17}-reasoning-body`, children: /* @__PURE__ */ jsx19(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
|
|
5936
6124
|
] });
|
|
5937
6125
|
}
|
|
5938
6126
|
function partKey(part) {
|
|
@@ -5950,24 +6138,26 @@ function partKey(part) {
|
|
|
5950
6138
|
}
|
|
5951
6139
|
}
|
|
5952
6140
|
function TypingDots() {
|
|
5953
|
-
return /* @__PURE__ */
|
|
5954
|
-
/* @__PURE__ */
|
|
5955
|
-
/* @__PURE__ */
|
|
5956
|
-
/* @__PURE__ */
|
|
6141
|
+
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-typing`, "aria-hidden": "true", children: [
|
|
6142
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6143
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6144
|
+
/* @__PURE__ */ jsx19("span", {})
|
|
5957
6145
|
] });
|
|
5958
6146
|
}
|
|
5959
6147
|
function LoadingSpinner({ label }) {
|
|
5960
|
-
return /* @__PURE__ */
|
|
5961
|
-
/* @__PURE__ */
|
|
5962
|
-
/* @__PURE__ */
|
|
6148
|
+
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-loading`, role: "status", children: [
|
|
6149
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-spinner`, "aria-hidden": "true" }),
|
|
6150
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-label`, children: label })
|
|
5963
6151
|
] });
|
|
5964
6152
|
}
|
|
5965
6153
|
|
|
5966
6154
|
// src/ui/message-list.tsx
|
|
5967
|
-
import { jsx as
|
|
5968
|
-
var
|
|
6155
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "preact/jsx-runtime";
|
|
6156
|
+
var p18 = BRAND.cssPrefix;
|
|
5969
6157
|
var STICK_THRESHOLD = 120;
|
|
5970
6158
|
var INTERACTION_GRACE_MS = 350;
|
|
6159
|
+
var TURN_TOP_PAD = 12;
|
|
6160
|
+
var TURN_GAP = 8;
|
|
5971
6161
|
function MessageList({
|
|
5972
6162
|
messagesSig,
|
|
5973
6163
|
strings,
|
|
@@ -5975,6 +6165,11 @@ function MessageList({
|
|
|
5975
6165
|
showReasoning,
|
|
5976
6166
|
showToolCalls,
|
|
5977
6167
|
showSources,
|
|
6168
|
+
scrollFade,
|
|
6169
|
+
scrollAnchor,
|
|
6170
|
+
enableMessageFeedback,
|
|
6171
|
+
onFeedback,
|
|
6172
|
+
onMessageSeen,
|
|
5978
6173
|
loading,
|
|
5979
6174
|
idle,
|
|
5980
6175
|
tool,
|
|
@@ -5985,16 +6180,39 @@ function MessageList({
|
|
|
5985
6180
|
}) {
|
|
5986
6181
|
const ref = useRef5(null);
|
|
5987
6182
|
const messages = useComputed7(() => messagesSig.value);
|
|
5988
|
-
const [showJump, setShowJump] =
|
|
6183
|
+
const [showJump, setShowJump] = useState8(false);
|
|
6184
|
+
const spacerRef = useRef5(null);
|
|
6185
|
+
const seenRef = useRef5(/* @__PURE__ */ new Set());
|
|
6186
|
+
const firedSeenRef = useRef5(/* @__PURE__ */ new Set());
|
|
6187
|
+
const [newCount, setNewCount] = useState8(0);
|
|
5989
6188
|
const hasHydratedRef = useRef5(false);
|
|
5990
6189
|
const detachedRef = useRef5(false);
|
|
5991
6190
|
const interactingRef = useRef5(false);
|
|
5992
6191
|
const interactionEndedAtRef = useRef5(0);
|
|
5993
6192
|
const inInteractionGrace = () => interactingRef.current || performance.now() - interactionEndedAtRef.current < INTERACTION_GRACE_MS;
|
|
5994
6193
|
const autoPinAtRef = useRef5(0);
|
|
6194
|
+
const key = (m) => m.serverMessageId ?? m.id;
|
|
6195
|
+
const syncFade = (el) => {
|
|
6196
|
+
if (!scrollFade) return;
|
|
6197
|
+
const overflowing = el.scrollHeight - el.clientHeight > 1;
|
|
6198
|
+
el.dataset.fadeTop = overflowing && el.scrollTop > 1 ? "true" : "false";
|
|
6199
|
+
el.dataset.fadeBottom = overflowing && el.scrollHeight - el.scrollTop - el.clientHeight > 1 ? "true" : "false";
|
|
6200
|
+
};
|
|
6201
|
+
const syncJump = (el) => setShowJump(el.scrollHeight - el.scrollTop - el.clientHeight > STICK_THRESHOLD * 2);
|
|
6202
|
+
const recomputeNewCount = (el) => {
|
|
6203
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight <= STICK_THRESHOLD * 2) return setNewCount(0);
|
|
6204
|
+
let n = 0;
|
|
6205
|
+
for (const m of messages.value) if (m.role === "assistant" && !seenRef.current.has(key(m))) n++;
|
|
6206
|
+
setNewCount(n);
|
|
6207
|
+
};
|
|
6208
|
+
const markAllSeen = () => {
|
|
6209
|
+
for (const m of messages.value) if (m.role === "assistant") seenRef.current.add(key(m));
|
|
6210
|
+
setNewCount(0);
|
|
6211
|
+
};
|
|
5995
6212
|
const pinBottom = (el) => {
|
|
5996
6213
|
autoPinAtRef.current = performance.now();
|
|
5997
6214
|
el.scrollTop = el.scrollHeight;
|
|
6215
|
+
syncFade(el);
|
|
5998
6216
|
};
|
|
5999
6217
|
const pinBottomSoon = (el, frames) => {
|
|
6000
6218
|
pinBottom(el);
|
|
@@ -6031,13 +6249,50 @@ function MessageList({
|
|
|
6031
6249
|
timerId = setTimeout(stop, ms);
|
|
6032
6250
|
return stop;
|
|
6033
6251
|
};
|
|
6252
|
+
const rowTop = (el, row) => row.getBoundingClientRect().top - el.getBoundingClientRect().top + el.scrollTop;
|
|
6253
|
+
const lastUserRow = (el) => {
|
|
6254
|
+
const users = el.querySelectorAll(`.${p18}-bubble-row[data-role="user"]`);
|
|
6255
|
+
return users[users.length - 1];
|
|
6256
|
+
};
|
|
6257
|
+
const updateTurnSpacer = (el) => {
|
|
6258
|
+
const sp = spacerRef.current;
|
|
6259
|
+
if (!sp) return;
|
|
6260
|
+
const lastUser = scrollAnchor === "turn" ? lastUserRow(el) : void 0;
|
|
6261
|
+
if (!lastUser) {
|
|
6262
|
+
sp.style.minBlockSize = "0px";
|
|
6263
|
+
return;
|
|
6264
|
+
}
|
|
6265
|
+
const turnHeight = el.scrollHeight - rowTop(el, lastUser) - sp.offsetHeight;
|
|
6266
|
+
sp.style.minBlockSize = `${Math.max(0, el.clientHeight - turnHeight - TURN_GAP)}px`;
|
|
6267
|
+
};
|
|
6268
|
+
const anchorTurnToTop = (el) => {
|
|
6269
|
+
const lastUser = lastUserRow(el);
|
|
6270
|
+
if (!lastUser) return;
|
|
6271
|
+
updateTurnSpacer(el);
|
|
6272
|
+
autoPinAtRef.current = performance.now();
|
|
6273
|
+
el.scrollTop = Math.max(0, rowTop(el, lastUser) - TURN_TOP_PAD);
|
|
6274
|
+
syncFade(el);
|
|
6275
|
+
};
|
|
6276
|
+
const anchorTurnSoon = (el, frames) => {
|
|
6277
|
+
anchorTurnToTop(el);
|
|
6278
|
+
let left = frames;
|
|
6279
|
+
let raf = 0;
|
|
6280
|
+
const tick = () => {
|
|
6281
|
+
anchorTurnToTop(el);
|
|
6282
|
+
if (--left > 0) raf = requestAnimationFrame(tick);
|
|
6283
|
+
};
|
|
6284
|
+
if (frames > 0) raf = requestAnimationFrame(tick);
|
|
6285
|
+
return () => cancelAnimationFrame(raf);
|
|
6286
|
+
};
|
|
6034
6287
|
const firstMessageId = messages.value[0]?.id;
|
|
6035
6288
|
useLayoutEffect2(() => {
|
|
6036
6289
|
const el = ref.current;
|
|
6037
6290
|
if (!el) return;
|
|
6038
6291
|
if (messages.value.length === 0) return;
|
|
6039
6292
|
hasHydratedRef.current = true;
|
|
6293
|
+
for (const m of messages.value) if (m.role === "assistant") seenRef.current.add(key(m));
|
|
6040
6294
|
if (!messages.value.some((m) => m.role === "user")) return;
|
|
6295
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6041
6296
|
return pinBottomThroughLayout(el, 300);
|
|
6042
6297
|
}, [firstMessageId]);
|
|
6043
6298
|
const prevLengthRef = useRef5(0);
|
|
@@ -6050,10 +6305,17 @@ function MessageList({
|
|
|
6050
6305
|
if (!hasHydratedRef.current) return;
|
|
6051
6306
|
if (list.slice(prevLength).some((m) => m.role === "user")) {
|
|
6052
6307
|
detachedRef.current = false;
|
|
6308
|
+
setNewCount(0);
|
|
6309
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6053
6310
|
return pinBottomSoon(el, 3);
|
|
6054
6311
|
}
|
|
6055
6312
|
if (!list.some((m) => m.role === "user")) return;
|
|
6056
|
-
if (
|
|
6313
|
+
if (scrollAnchor === "turn") {
|
|
6314
|
+
updateTurnSpacer(el);
|
|
6315
|
+
recomputeNewCount(el);
|
|
6316
|
+
return;
|
|
6317
|
+
}
|
|
6318
|
+
if (detachedRef.current || inInteractionGrace()) return recomputeNewCount(el);
|
|
6057
6319
|
const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
6058
6320
|
if (distanceFromBottom < STICK_THRESHOLD) pinBottom(el);
|
|
6059
6321
|
}, [messages.value.length]);
|
|
@@ -6067,6 +6329,7 @@ function MessageList({
|
|
|
6067
6329
|
if (!hasHydratedRef.current) return;
|
|
6068
6330
|
if (!last || last.id !== prevLastId || last.status !== "streaming") return;
|
|
6069
6331
|
detachedRef.current = false;
|
|
6332
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6070
6333
|
return pinBottomSoon(el, 3);
|
|
6071
6334
|
}, [messages.value]);
|
|
6072
6335
|
useEffect7(() => {
|
|
@@ -6075,6 +6338,19 @@ function MessageList({
|
|
|
6075
6338
|
const last = messages.value.at(-1);
|
|
6076
6339
|
if (!last) return;
|
|
6077
6340
|
if (last.status !== "streaming" && !messages.value.some((m) => m.role === "user")) return;
|
|
6341
|
+
if (scrollAnchor === "turn") {
|
|
6342
|
+
const sync = () => {
|
|
6343
|
+
updateTurnSpacer(el);
|
|
6344
|
+
syncFade(el);
|
|
6345
|
+
syncJump(el);
|
|
6346
|
+
recomputeNewCount(el);
|
|
6347
|
+
};
|
|
6348
|
+
sync();
|
|
6349
|
+
if (last.status !== "streaming") return;
|
|
6350
|
+
const obs2 = new MutationObserver(sync);
|
|
6351
|
+
obs2.observe(el, { childList: true, subtree: true, characterData: true });
|
|
6352
|
+
return () => obs2.disconnect();
|
|
6353
|
+
}
|
|
6078
6354
|
const pinIfNear = () => {
|
|
6079
6355
|
if (detachedRef.current || inInteractionGrace()) return;
|
|
6080
6356
|
const distance = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
@@ -6103,9 +6379,11 @@ function MessageList({
|
|
|
6103
6379
|
useEffect7(() => {
|
|
6104
6380
|
const el = ref.current;
|
|
6105
6381
|
if (!el) return;
|
|
6106
|
-
const syncJump = () => setShowJump(el.scrollHeight - el.scrollTop - el.clientHeight > STICK_THRESHOLD * 2);
|
|
6107
6382
|
const onScroll = () => {
|
|
6108
|
-
syncJump();
|
|
6383
|
+
syncJump(el);
|
|
6384
|
+
syncFade(el);
|
|
6385
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight <= 8) markAllSeen();
|
|
6386
|
+
else recomputeNewCount(el);
|
|
6109
6387
|
if (performance.now() - autoPinAtRef.current > 150) {
|
|
6110
6388
|
detachedRef.current = el.scrollHeight - el.scrollTop - el.clientHeight > 8;
|
|
6111
6389
|
}
|
|
@@ -6141,7 +6419,7 @@ function MessageList({
|
|
|
6141
6419
|
el.addEventListener("pointerdown", onPointerDown, { passive: true });
|
|
6142
6420
|
window.addEventListener("pointerup", endInteraction, { passive: true });
|
|
6143
6421
|
window.addEventListener("pointercancel", endInteraction, { passive: true });
|
|
6144
|
-
syncJump();
|
|
6422
|
+
syncJump(el);
|
|
6145
6423
|
return () => {
|
|
6146
6424
|
el.removeEventListener("scroll", onScroll);
|
|
6147
6425
|
el.removeEventListener("wheel", onWheel);
|
|
@@ -6159,7 +6437,35 @@ function MessageList({
|
|
|
6159
6437
|
if (!el) return;
|
|
6160
6438
|
detachedRef.current = false;
|
|
6161
6439
|
pinBottom(el);
|
|
6440
|
+
markAllSeen();
|
|
6162
6441
|
};
|
|
6442
|
+
useEffect7(() => {
|
|
6443
|
+
const el = ref.current;
|
|
6444
|
+
if (!el || typeof IntersectionObserver === "undefined") return;
|
|
6445
|
+
const io = new IntersectionObserver(
|
|
6446
|
+
(entries) => {
|
|
6447
|
+
let changed = false;
|
|
6448
|
+
for (const entry of entries) {
|
|
6449
|
+
if (!entry.isIntersecting) continue;
|
|
6450
|
+
const row = entry.target;
|
|
6451
|
+
const id = row.dataset.mid;
|
|
6452
|
+
if (row.dataset.role !== "assistant" || !id) continue;
|
|
6453
|
+
if (!firedSeenRef.current.has(id)) {
|
|
6454
|
+
firedSeenRef.current.add(id);
|
|
6455
|
+
onMessageSeen?.(id);
|
|
6456
|
+
}
|
|
6457
|
+
if (!seenRef.current.has(id)) {
|
|
6458
|
+
seenRef.current.add(id);
|
|
6459
|
+
changed = true;
|
|
6460
|
+
}
|
|
6461
|
+
}
|
|
6462
|
+
if (changed) recomputeNewCount(el);
|
|
6463
|
+
},
|
|
6464
|
+
{ root: el, threshold: 0.01 }
|
|
6465
|
+
);
|
|
6466
|
+
el.querySelectorAll(`.${p18}-bubble-row[data-role="assistant"]`).forEach((row) => io.observe(row));
|
|
6467
|
+
return () => io.disconnect();
|
|
6468
|
+
}, [messages.value.length]);
|
|
6163
6469
|
const rows = [];
|
|
6164
6470
|
let prevDay = "";
|
|
6165
6471
|
const lastId = messages.value.at(-1)?.id;
|
|
@@ -6168,7 +6474,7 @@ function MessageList({
|
|
|
6168
6474
|
);
|
|
6169
6475
|
const markerRow = (marker) => {
|
|
6170
6476
|
if (form && marker.formId === form.form.id) {
|
|
6171
|
-
return /* @__PURE__ */
|
|
6477
|
+
return /* @__PURE__ */ jsx20(
|
|
6172
6478
|
FormGate,
|
|
6173
6479
|
{
|
|
6174
6480
|
form: form.form,
|
|
@@ -6179,7 +6485,7 @@ function MessageList({
|
|
|
6179
6485
|
`gate:${marker.formId}`
|
|
6180
6486
|
);
|
|
6181
6487
|
}
|
|
6182
|
-
return /* @__PURE__ */
|
|
6488
|
+
return /* @__PURE__ */ jsx20(
|
|
6183
6489
|
FormDoneMarker,
|
|
6184
6490
|
{
|
|
6185
6491
|
marker,
|
|
@@ -6202,12 +6508,12 @@ function MessageList({
|
|
|
6202
6508
|
const day = dayKey(m.createdAt);
|
|
6203
6509
|
if (day && day !== prevDay) {
|
|
6204
6510
|
rows.push(
|
|
6205
|
-
/* @__PURE__ */
|
|
6511
|
+
/* @__PURE__ */ jsx20("div", { class: `${p18}-date-divider`, children: /* @__PURE__ */ jsx20("span", { class: `${p18}-date-pill`, title: fullDate(m.createdAt), children: dayLabel(m.createdAt, strings) }) }, `day:${day}`)
|
|
6206
6512
|
);
|
|
6207
6513
|
prevDay = day;
|
|
6208
6514
|
}
|
|
6209
6515
|
rows.push(
|
|
6210
|
-
/* @__PURE__ */
|
|
6516
|
+
/* @__PURE__ */ jsx20(
|
|
6211
6517
|
MessageBubble,
|
|
6212
6518
|
{
|
|
6213
6519
|
message: m,
|
|
@@ -6219,7 +6525,9 @@ function MessageList({
|
|
|
6219
6525
|
interactive: Boolean(idle) && m.id === lastId,
|
|
6220
6526
|
superseded: m.id !== lastId,
|
|
6221
6527
|
tool,
|
|
6222
|
-
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0
|
|
6528
|
+
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0,
|
|
6529
|
+
enableMessageFeedback,
|
|
6530
|
+
onFeedback
|
|
6223
6531
|
},
|
|
6224
6532
|
m.id
|
|
6225
6533
|
)
|
|
@@ -6228,22 +6536,36 @@ function MessageList({
|
|
|
6228
6536
|
for (const marker of pendingMarkers) {
|
|
6229
6537
|
rows.push(markerRow(marker));
|
|
6230
6538
|
}
|
|
6231
|
-
return /* @__PURE__ */
|
|
6232
|
-
/* @__PURE__ */
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6539
|
+
return /* @__PURE__ */ jsxs16("div", { class: `${p18}-list-wrap`, children: [
|
|
6540
|
+
/* @__PURE__ */ jsxs16(
|
|
6541
|
+
"div",
|
|
6542
|
+
{
|
|
6543
|
+
ref,
|
|
6544
|
+
class: `${p18}-list${scrollFade ? ` ${p18}-list--fade` : ""}`,
|
|
6545
|
+
role: "log",
|
|
6546
|
+
"aria-live": "polite",
|
|
6547
|
+
"aria-relevant": "additions text",
|
|
6548
|
+
children: [
|
|
6549
|
+
loading && messages.value.length === 0 ? /* @__PURE__ */ jsx20("div", { class: `${p18}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
|
|
6550
|
+
rows,
|
|
6551
|
+
form && !inlineForm ? /* @__PURE__ */ jsx20(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null,
|
|
6552
|
+
scrollAnchor === "turn" ? /* @__PURE__ */ jsx20("div", { ref: spacerRef, class: `${p18}-turn-spacer`, "aria-hidden": "true" }) : null
|
|
6553
|
+
]
|
|
6554
|
+
}
|
|
6555
|
+
),
|
|
6556
|
+
showJump ? /* @__PURE__ */ jsxs16(
|
|
6238
6557
|
"button",
|
|
6239
6558
|
{
|
|
6240
6559
|
type: "button",
|
|
6241
|
-
class: `${
|
|
6560
|
+
class: `${p18}-jump${newCount > 0 ? ` ${p18}-jump--new` : ""}`,
|
|
6242
6561
|
onClick: jumpToBottom,
|
|
6243
|
-
"aria-label": strings.scrollToBottom,
|
|
6244
|
-
title: strings.scrollToBottom,
|
|
6562
|
+
"aria-label": newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6563
|
+
title: newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6245
6564
|
"data-testid": TID.scrollToBottom,
|
|
6246
|
-
children:
|
|
6565
|
+
children: [
|
|
6566
|
+
newCount > 0 ? /* @__PURE__ */ jsx20("span", { class: `${p18}-jump-count`, children: newCount }) : null,
|
|
6567
|
+
/* @__PURE__ */ jsx20(ChevronDownIcon, {})
|
|
6568
|
+
]
|
|
6247
6569
|
}
|
|
6248
6570
|
) : null
|
|
6249
6571
|
] });
|
|
@@ -6272,7 +6594,7 @@ function dayLabel(createdAt, strings) {
|
|
|
6272
6594
|
}
|
|
6273
6595
|
|
|
6274
6596
|
// src/ui/conversation-list.tsx
|
|
6275
|
-
import { useEffect as useEffect8, useState as
|
|
6597
|
+
import { useEffect as useEffect8, useState as useState9 } from "preact/hooks";
|
|
6276
6598
|
|
|
6277
6599
|
// src/ui/history-groups.ts
|
|
6278
6600
|
var HISTORY_BUCKETS = ["today", "yesterday", "lastWeek", "older"];
|
|
@@ -6302,7 +6624,7 @@ function startOfDay(ms) {
|
|
|
6302
6624
|
}
|
|
6303
6625
|
|
|
6304
6626
|
// src/ui/conversation-list.tsx
|
|
6305
|
-
import { Fragment as Fragment5, jsx as
|
|
6627
|
+
import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs17 } from "preact/jsx-runtime";
|
|
6306
6628
|
var log11 = logger.scope("history");
|
|
6307
6629
|
var DEFAULT_SKELETON_ROWS = 3;
|
|
6308
6630
|
var MAX_SKELETON_ROWS = 6;
|
|
@@ -6329,10 +6651,10 @@ function ConversationList({
|
|
|
6329
6651
|
onSelect,
|
|
6330
6652
|
onNewConversation
|
|
6331
6653
|
}) {
|
|
6332
|
-
const
|
|
6654
|
+
const p36 = BRAND.cssPrefix;
|
|
6333
6655
|
const seed = transport.peekConversations({ visitorId });
|
|
6334
|
-
const [state, setState] =
|
|
6335
|
-
const [conversations, setChats] =
|
|
6656
|
+
const [state, setState] = useState9(seed ? "loaded" : "loading");
|
|
6657
|
+
const [conversations, setChats] = useState9(seed?.conversations ?? []);
|
|
6336
6658
|
useEffect8(() => {
|
|
6337
6659
|
let cancelled = false;
|
|
6338
6660
|
transport.listConversations({ visitorId }).then((res) => {
|
|
@@ -6350,32 +6672,32 @@ function ConversationList({
|
|
|
6350
6672
|
cancelled = true;
|
|
6351
6673
|
};
|
|
6352
6674
|
}, [transport, visitorId, persistence]);
|
|
6353
|
-
const newChatButton = onNewConversation ? /* @__PURE__ */
|
|
6675
|
+
const newChatButton = onNewConversation ? /* @__PURE__ */ jsx21("div", { class: `${p36}-history-footer`, children: /* @__PURE__ */ jsxs17(
|
|
6354
6676
|
"button",
|
|
6355
6677
|
{
|
|
6356
6678
|
type: "button",
|
|
6357
|
-
class: `${
|
|
6679
|
+
class: `${p36}-history-new`,
|
|
6358
6680
|
onClick: onNewConversation,
|
|
6359
6681
|
"data-testid": TID.sidebarNewConversation,
|
|
6360
6682
|
children: [
|
|
6361
|
-
/* @__PURE__ */
|
|
6683
|
+
/* @__PURE__ */ jsx21(PlusIcon, {}),
|
|
6362
6684
|
strings.newConversation
|
|
6363
6685
|
]
|
|
6364
6686
|
}
|
|
6365
6687
|
) }) : null;
|
|
6366
6688
|
if (state === "loading") {
|
|
6367
6689
|
const rows = Math.min(persistence.loadHistoryCount() ?? DEFAULT_SKELETON_ROWS, MAX_SKELETON_ROWS);
|
|
6368
|
-
return /* @__PURE__ */
|
|
6369
|
-
/* @__PURE__ */
|
|
6370
|
-
/* @__PURE__ */
|
|
6371
|
-
/* @__PURE__ */
|
|
6372
|
-
/* @__PURE__ */
|
|
6373
|
-
/* @__PURE__ */
|
|
6374
|
-
/* @__PURE__ */
|
|
6375
|
-
/* @__PURE__ */
|
|
6376
|
-
/* @__PURE__ */
|
|
6690
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6691
|
+
/* @__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: [
|
|
6692
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-heading`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-heading` }) }),
|
|
6693
|
+
/* @__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: [
|
|
6694
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-avatar ${p36}-skeleton` }),
|
|
6695
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6696
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6697
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-title`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-title` }) }),
|
|
6698
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-time`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-time` }) })
|
|
6377
6699
|
] }),
|
|
6378
|
-
/* @__PURE__ */
|
|
6700
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-row`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-history-preview`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-preview` }) }) })
|
|
6379
6701
|
] })
|
|
6380
6702
|
] }, i)) })
|
|
6381
6703
|
] }) }),
|
|
@@ -6383,36 +6705,36 @@ function ConversationList({
|
|
|
6383
6705
|
] });
|
|
6384
6706
|
}
|
|
6385
6707
|
if (state === "error" || conversations.length === 0) {
|
|
6386
|
-
return /* @__PURE__ */
|
|
6387
|
-
/* @__PURE__ */
|
|
6708
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6709
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-empty`, children: strings.historyEmpty }),
|
|
6388
6710
|
newChatButton
|
|
6389
6711
|
] });
|
|
6390
6712
|
}
|
|
6391
6713
|
const now = Date.now();
|
|
6392
6714
|
const groups = groupByBucket(now, conversations);
|
|
6393
|
-
return /* @__PURE__ */
|
|
6394
|
-
/* @__PURE__ */
|
|
6395
|
-
/* @__PURE__ */
|
|
6396
|
-
/* @__PURE__ */
|
|
6715
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6716
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-group`, children: [
|
|
6717
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
|
|
6718
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs17(
|
|
6397
6719
|
"button",
|
|
6398
6720
|
{
|
|
6399
6721
|
type: "button",
|
|
6400
6722
|
role: "listitem",
|
|
6401
|
-
class: `${
|
|
6723
|
+
class: `${p36}-history-item`,
|
|
6402
6724
|
onClick: () => onSelect(chat),
|
|
6403
6725
|
"data-closed": chat.canContinue ? void 0 : "true",
|
|
6404
|
-
"data-unread":
|
|
6726
|
+
"data-unread": chat.hasUnread ? "true" : void 0,
|
|
6405
6727
|
"data-testid": tid(TID.historyItem, chat.conversationId),
|
|
6406
6728
|
children: [
|
|
6407
|
-
/* @__PURE__ */
|
|
6408
|
-
/* @__PURE__ */
|
|
6409
|
-
/* @__PURE__ */
|
|
6410
|
-
/* @__PURE__ */
|
|
6411
|
-
/* @__PURE__ */
|
|
6729
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx21(MessageIcon, {}) }),
|
|
6730
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6731
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6732
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-title`, children: chat.title }),
|
|
6733
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
|
|
6412
6734
|
] }),
|
|
6413
|
-
/* @__PURE__ */
|
|
6414
|
-
/* @__PURE__ */
|
|
6415
|
-
|
|
6735
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6736
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
|
|
6737
|
+
chat.hasUnread ? /* @__PURE__ */ jsx21("span", { class: `${p36}-history-dot` }) : null
|
|
6416
6738
|
] })
|
|
6417
6739
|
] })
|
|
6418
6740
|
]
|
|
@@ -6425,15 +6747,15 @@ function ConversationList({
|
|
|
6425
6747
|
}
|
|
6426
6748
|
|
|
6427
6749
|
// src/ui/suggestions.tsx
|
|
6428
|
-
import { jsx as
|
|
6429
|
-
var
|
|
6750
|
+
import { jsx as jsx22 } from "preact/jsx-runtime";
|
|
6751
|
+
var p19 = BRAND.cssPrefix;
|
|
6430
6752
|
function Suggestions({ suggestions, onPick }) {
|
|
6431
6753
|
if (suggestions.length === 0) return null;
|
|
6432
|
-
return /* @__PURE__ */
|
|
6754
|
+
return /* @__PURE__ */ jsx22("div", { class: `${p19}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx22(
|
|
6433
6755
|
"button",
|
|
6434
6756
|
{
|
|
6435
6757
|
type: "button",
|
|
6436
|
-
class: `${
|
|
6758
|
+
class: `${p19}-suggestion`,
|
|
6437
6759
|
onClick: () => onPick(s),
|
|
6438
6760
|
"data-testid": tid(TID.suggestion, i),
|
|
6439
6761
|
children: s.label
|
|
@@ -6443,8 +6765,8 @@ function Suggestions({ suggestions, onPick }) {
|
|
|
6443
6765
|
}
|
|
6444
6766
|
|
|
6445
6767
|
// src/ui/panel.tsx
|
|
6446
|
-
import { Fragment as Fragment6, jsx as
|
|
6447
|
-
var
|
|
6768
|
+
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs18 } from "preact/jsx-runtime";
|
|
6769
|
+
var p20 = BRAND.cssPrefix;
|
|
6448
6770
|
function Panel(props2) {
|
|
6449
6771
|
const { options, onClose } = props2;
|
|
6450
6772
|
const s = options.strings;
|
|
@@ -6468,18 +6790,18 @@ function Panel(props2) {
|
|
|
6468
6790
|
}, []);
|
|
6469
6791
|
const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
|
|
6470
6792
|
useDragMove(containerRef.current, options.mode === "modal");
|
|
6471
|
-
return /* @__PURE__ */
|
|
6793
|
+
return /* @__PURE__ */ jsxs18(
|
|
6472
6794
|
"div",
|
|
6473
6795
|
{
|
|
6474
6796
|
ref: containerRef,
|
|
6475
|
-
class: `${
|
|
6797
|
+
class: `${p20}-panel`,
|
|
6476
6798
|
role: "dialog",
|
|
6477
6799
|
"aria-modal": "false",
|
|
6478
6800
|
"aria-label": s.panelTitle,
|
|
6479
6801
|
style: { position: "relative" },
|
|
6480
6802
|
"data-testid": TID.panel,
|
|
6481
6803
|
children: [
|
|
6482
|
-
/* @__PURE__ */
|
|
6804
|
+
/* @__PURE__ */ jsx23(
|
|
6483
6805
|
PanelContent,
|
|
6484
6806
|
{
|
|
6485
6807
|
...props2,
|
|
@@ -6488,7 +6810,7 @@ function Panel(props2) {
|
|
|
6488
6810
|
composerAttachApiRef
|
|
6489
6811
|
}
|
|
6490
6812
|
),
|
|
6491
|
-
/* @__PURE__ */
|
|
6813
|
+
/* @__PURE__ */ jsx23(PoweredByBar, { poweredBy: props2.options.poweredBy })
|
|
6492
6814
|
]
|
|
6493
6815
|
}
|
|
6494
6816
|
);
|
|
@@ -6527,6 +6849,8 @@ function PanelContent(props2) {
|
|
|
6527
6849
|
onFormFill,
|
|
6528
6850
|
tool,
|
|
6529
6851
|
onRetry,
|
|
6852
|
+
onMessageFeedback,
|
|
6853
|
+
onMessageSeen,
|
|
6530
6854
|
containerEl,
|
|
6531
6855
|
dragOver,
|
|
6532
6856
|
composerAttachApiRef
|
|
@@ -6536,9 +6860,9 @@ function PanelContent(props2) {
|
|
|
6536
6860
|
if (activeForm) {
|
|
6537
6861
|
composerArea = null;
|
|
6538
6862
|
} else if (canSend) {
|
|
6539
|
-
composerArea = /* @__PURE__ */
|
|
6540
|
-
/* @__PURE__ */
|
|
6541
|
-
/* @__PURE__ */
|
|
6863
|
+
composerArea = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6864
|
+
/* @__PURE__ */ jsx23(Suggestions, { suggestions, onPick: onSuggestion }),
|
|
6865
|
+
/* @__PURE__ */ jsx23(
|
|
6542
6866
|
Composer,
|
|
6543
6867
|
{
|
|
6544
6868
|
options,
|
|
@@ -6553,10 +6877,10 @@ function PanelContent(props2) {
|
|
|
6553
6877
|
)
|
|
6554
6878
|
] });
|
|
6555
6879
|
} else {
|
|
6556
|
-
composerArea = /* @__PURE__ */
|
|
6880
|
+
composerArea = /* @__PURE__ */ jsx23(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
|
|
6557
6881
|
}
|
|
6558
|
-
return /* @__PURE__ */
|
|
6559
|
-
view === "history" ? /* @__PURE__ */
|
|
6882
|
+
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6883
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6560
6884
|
HistoryHeader,
|
|
6561
6885
|
{
|
|
6562
6886
|
strings: s,
|
|
@@ -6564,22 +6888,22 @@ function PanelContent(props2) {
|
|
|
6564
6888
|
onClose,
|
|
6565
6889
|
showClose: canShowClose(options.mode, panelSize, options.actions)
|
|
6566
6890
|
}
|
|
6567
|
-
) : /* @__PURE__ */
|
|
6568
|
-
onBack ? /* @__PURE__ */
|
|
6891
|
+
) : /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, "data-testid": TID.panelHeader, children: [
|
|
6892
|
+
onBack ? /* @__PURE__ */ jsx23(
|
|
6569
6893
|
"button",
|
|
6570
6894
|
{
|
|
6571
6895
|
type: "button",
|
|
6572
|
-
class: `${
|
|
6896
|
+
class: `${p20}-icon-btn`,
|
|
6573
6897
|
onClick: onBack,
|
|
6574
6898
|
"aria-label": s.moduleBack,
|
|
6575
6899
|
title: s.moduleBack,
|
|
6576
|
-
children: /* @__PURE__ */
|
|
6900
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6577
6901
|
}
|
|
6578
6902
|
) : null,
|
|
6579
|
-
agent ? /* @__PURE__ */
|
|
6580
|
-
/* @__PURE__ */
|
|
6903
|
+
agent ? /* @__PURE__ */ jsx23(AgentBadge, { agent, strings: s }) : /* @__PURE__ */ jsx23("h1", { children: s.panelTitle }),
|
|
6904
|
+
/* @__PURE__ */ jsx23(HeaderActions, { panelProps: props2, variant: "chat" })
|
|
6581
6905
|
] }),
|
|
6582
|
-
view === "history" ? /* @__PURE__ */
|
|
6906
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6583
6907
|
ConversationList,
|
|
6584
6908
|
{
|
|
6585
6909
|
transport,
|
|
@@ -6590,9 +6914,9 @@ function PanelContent(props2) {
|
|
|
6590
6914
|
onSelect: (conversation) => onSelectHistoryConversation(conversation.conversationId),
|
|
6591
6915
|
onNewConversation
|
|
6592
6916
|
}
|
|
6593
|
-
) : /* @__PURE__ */
|
|
6594
|
-
/* @__PURE__ */
|
|
6595
|
-
/* @__PURE__ */
|
|
6917
|
+
) : /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6918
|
+
/* @__PURE__ */ jsx23(DropZone, { visible: dragOver, strings: s }),
|
|
6919
|
+
/* @__PURE__ */ jsx23(
|
|
6596
6920
|
MessageList,
|
|
6597
6921
|
{
|
|
6598
6922
|
messagesSig,
|
|
@@ -6601,6 +6925,11 @@ function PanelContent(props2) {
|
|
|
6601
6925
|
showReasoning: options.showReasoning,
|
|
6602
6926
|
showToolCalls: options.showToolCalls,
|
|
6603
6927
|
showSources: options.showSources,
|
|
6928
|
+
scrollFade: options.scrollFade,
|
|
6929
|
+
scrollAnchor: options.scrollAnchor,
|
|
6930
|
+
enableMessageFeedback: options.enableMessageFeedback,
|
|
6931
|
+
onFeedback: onMessageFeedback,
|
|
6932
|
+
onMessageSeen,
|
|
6604
6933
|
loading: loadingMessages,
|
|
6605
6934
|
idle: !isStreaming,
|
|
6606
6935
|
tool,
|
|
@@ -6611,9 +6940,9 @@ function PanelContent(props2) {
|
|
|
6611
6940
|
}
|
|
6612
6941
|
),
|
|
6613
6942
|
composerArea,
|
|
6614
|
-
/* @__PURE__ */
|
|
6943
|
+
/* @__PURE__ */ jsx23(ComposerFooter, { disclaimer: options.composerDisclaimer })
|
|
6615
6944
|
] }),
|
|
6616
|
-
options.size.resize?.enabled ? /* @__PURE__ */
|
|
6945
|
+
options.size.resize?.enabled ? /* @__PURE__ */ jsx23(
|
|
6617
6946
|
ResizeGrip,
|
|
6618
6947
|
{
|
|
6619
6948
|
panelEl: containerEl,
|
|
@@ -6632,28 +6961,28 @@ function HistoryHeader({
|
|
|
6632
6961
|
onClose,
|
|
6633
6962
|
showClose
|
|
6634
6963
|
}) {
|
|
6635
|
-
return /* @__PURE__ */
|
|
6636
|
-
/* @__PURE__ */
|
|
6964
|
+
return /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, children: [
|
|
6965
|
+
/* @__PURE__ */ jsx23(
|
|
6637
6966
|
"button",
|
|
6638
6967
|
{
|
|
6639
6968
|
type: "button",
|
|
6640
|
-
class: `${
|
|
6969
|
+
class: `${p20}-icon-btn`,
|
|
6641
6970
|
onClick: onBack,
|
|
6642
6971
|
"aria-label": strings.historyBack,
|
|
6643
6972
|
title: strings.historyBack,
|
|
6644
|
-
children: /* @__PURE__ */
|
|
6973
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6645
6974
|
}
|
|
6646
6975
|
),
|
|
6647
|
-
/* @__PURE__ */
|
|
6648
|
-
showClose ? /* @__PURE__ */
|
|
6976
|
+
/* @__PURE__ */ jsx23("h1", { children: strings.historyTitle }),
|
|
6977
|
+
showClose ? /* @__PURE__ */ jsx23(
|
|
6649
6978
|
"button",
|
|
6650
6979
|
{
|
|
6651
6980
|
type: "button",
|
|
6652
|
-
class: `${
|
|
6981
|
+
class: `${p20}-icon-btn`,
|
|
6653
6982
|
onClick: onClose,
|
|
6654
6983
|
"aria-label": strings.close,
|
|
6655
6984
|
title: strings.close,
|
|
6656
|
-
children: /* @__PURE__ */
|
|
6985
|
+
children: /* @__PURE__ */ jsx23(CloseIcon, {})
|
|
6657
6986
|
}
|
|
6658
6987
|
) : null
|
|
6659
6988
|
] });
|
|
@@ -6663,28 +6992,28 @@ function ReadOnlyBanner({
|
|
|
6663
6992
|
ctaLabel,
|
|
6664
6993
|
onNewConversation
|
|
6665
6994
|
}) {
|
|
6666
|
-
return /* @__PURE__ */
|
|
6667
|
-
/* @__PURE__ */
|
|
6668
|
-
/* @__PURE__ */
|
|
6995
|
+
return /* @__PURE__ */ jsxs18("div", { class: `${p20}-readonly-banner`, role: "note", children: [
|
|
6996
|
+
/* @__PURE__ */ jsx23("span", { class: `${p20}-readonly-label`, children: label }),
|
|
6997
|
+
/* @__PURE__ */ jsx23("button", { type: "button", class: `${p20}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
|
|
6669
6998
|
] });
|
|
6670
6999
|
}
|
|
6671
7000
|
function ComposerFooter({ disclaimer }) {
|
|
6672
7001
|
if (!disclaimer) return null;
|
|
6673
|
-
return /* @__PURE__ */
|
|
7002
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-composer-footer`, children: /* @__PURE__ */ jsx23("div", { class: `${p20}-disclaimer`, children: disclaimer }) });
|
|
6674
7003
|
}
|
|
6675
7004
|
function PoweredByBar({ poweredBy }) {
|
|
6676
7005
|
if (!poweredBy) return null;
|
|
6677
|
-
return /* @__PURE__ */
|
|
7006
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-poweredby-bar`, children: /* @__PURE__ */ jsx23(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
|
|
6678
7007
|
}
|
|
6679
7008
|
function PoweredBy({ logoUrl, text, href }) {
|
|
6680
|
-
const inner = /* @__PURE__ */
|
|
6681
|
-
logoUrl ? /* @__PURE__ */
|
|
6682
|
-
text ? /* @__PURE__ */
|
|
7009
|
+
const inner = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
7010
|
+
logoUrl ? /* @__PURE__ */ jsx23("img", { class: `${p20}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
|
|
7011
|
+
text ? /* @__PURE__ */ jsx23("span", { children: text }) : null
|
|
6683
7012
|
] });
|
|
6684
7013
|
if (href) {
|
|
6685
|
-
return /* @__PURE__ */
|
|
7014
|
+
return /* @__PURE__ */ jsx23("a", { class: `${p20}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
|
|
6686
7015
|
}
|
|
6687
|
-
return /* @__PURE__ */
|
|
7016
|
+
return /* @__PURE__ */ jsx23("span", { class: `${p20}-poweredby`, children: inner });
|
|
6688
7017
|
}
|
|
6689
7018
|
|
|
6690
7019
|
// src/ui/form/form-controller.ts
|
|
@@ -6767,34 +7096,34 @@ function whenPasses(form, d) {
|
|
|
6767
7096
|
}
|
|
6768
7097
|
|
|
6769
7098
|
// src/ui/sidebar.tsx
|
|
6770
|
-
import { Fragment as Fragment7, jsx as
|
|
7099
|
+
import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs19 } from "preact/jsx-runtime";
|
|
6771
7100
|
function Sidebar(props2) {
|
|
6772
|
-
const
|
|
7101
|
+
const p36 = BRAND.cssPrefix;
|
|
6773
7102
|
const { site, blocks, strings, collapsed } = props2;
|
|
6774
7103
|
const navigation = blocks?.navigation ?? [];
|
|
6775
7104
|
const linkCards = blocks?.linkCards ?? [];
|
|
6776
7105
|
const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
|
|
6777
|
-
return /* @__PURE__ */
|
|
6778
|
-
/* @__PURE__ */
|
|
6779
|
-
/* @__PURE__ */
|
|
6780
|
-
/* @__PURE__ */
|
|
7106
|
+
return /* @__PURE__ */ jsxs19("aside", { class: `${p36}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
|
|
7107
|
+
/* @__PURE__ */ jsxs19("div", { class: `${p36}-sidebar-header`, children: [
|
|
7108
|
+
/* @__PURE__ */ jsx24(SidebarBrand, { site }),
|
|
7109
|
+
/* @__PURE__ */ jsx24(
|
|
6781
7110
|
"button",
|
|
6782
7111
|
{
|
|
6783
7112
|
type: "button",
|
|
6784
|
-
class: `${
|
|
7113
|
+
class: `${p36}-sidebar-toggle`,
|
|
6785
7114
|
"aria-label": toggleLabel,
|
|
6786
7115
|
"aria-expanded": collapsed ? "false" : "true",
|
|
6787
7116
|
title: toggleLabel,
|
|
6788
7117
|
onClick: props2.onToggleCollapsed,
|
|
6789
7118
|
"data-testid": TID.sidebarToggle,
|
|
6790
|
-
children: /* @__PURE__ */
|
|
7119
|
+
children: /* @__PURE__ */ jsx24(SidebarToggleIcon, { collapsed })
|
|
6791
7120
|
}
|
|
6792
7121
|
)
|
|
6793
7122
|
] }),
|
|
6794
|
-
collapsed ? null : /* @__PURE__ */
|
|
6795
|
-
navigation.length > 0 ? /* @__PURE__ */
|
|
6796
|
-
linkCards.length > 0 ? /* @__PURE__ */
|
|
6797
|
-
props2.showConversations ? /* @__PURE__ */
|
|
7123
|
+
collapsed ? null : /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
7124
|
+
navigation.length > 0 ? /* @__PURE__ */ jsx24("nav", { class: `${p36}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx24(SidebarNav, { items: navigation }) }) : null,
|
|
7125
|
+
linkCards.length > 0 ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx24(SidebarCards, { items: linkCards }) }) : null,
|
|
7126
|
+
props2.showConversations ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-conversations`, children: /* @__PURE__ */ jsx24(
|
|
6798
7127
|
ConversationList,
|
|
6799
7128
|
{
|
|
6800
7129
|
transport: props2.transport,
|
|
@@ -6810,18 +7139,18 @@ function Sidebar(props2) {
|
|
|
6810
7139
|
] });
|
|
6811
7140
|
}
|
|
6812
7141
|
function SidebarBrand({ site }) {
|
|
6813
|
-
const
|
|
7142
|
+
const p36 = BRAND.cssPrefix;
|
|
6814
7143
|
if (site?.logo?.url) {
|
|
6815
7144
|
const alt = site.logo.alt ?? site.title ?? "Logo";
|
|
6816
|
-
return /* @__PURE__ */
|
|
6817
|
-
site.logoDark?.url ? /* @__PURE__ */
|
|
6818
|
-
/* @__PURE__ */
|
|
7145
|
+
return /* @__PURE__ */ jsxs19("picture", { children: [
|
|
7146
|
+
site.logoDark?.url ? /* @__PURE__ */ jsx24("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
|
|
7147
|
+
/* @__PURE__ */ jsx24("img", { class: `${p36}-sidebar-logo`, src: site.logo.url, alt })
|
|
6819
7148
|
] });
|
|
6820
7149
|
}
|
|
6821
|
-
return /* @__PURE__ */
|
|
7150
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-title`, children: site?.title ?? BRAND.name });
|
|
6822
7151
|
}
|
|
6823
7152
|
function SidebarToggleIcon({ collapsed }) {
|
|
6824
|
-
return /* @__PURE__ */
|
|
7153
|
+
return /* @__PURE__ */ jsx24(
|
|
6825
7154
|
"svg",
|
|
6826
7155
|
{
|
|
6827
7156
|
width: "16",
|
|
@@ -6831,38 +7160,38 @@ function SidebarToggleIcon({ collapsed }) {
|
|
|
6831
7160
|
stroke: "currentColor",
|
|
6832
7161
|
"stroke-width": "2",
|
|
6833
7162
|
"aria-hidden": "true",
|
|
6834
|
-
children: collapsed ? /* @__PURE__ */
|
|
7163
|
+
children: collapsed ? /* @__PURE__ */ jsx24("polyline", { points: "9 6 15 12 9 18" }) : /* @__PURE__ */ jsx24("polyline", { points: "15 6 9 12 15 18" })
|
|
6835
7164
|
}
|
|
6836
7165
|
);
|
|
6837
7166
|
}
|
|
6838
7167
|
function SidebarNav({ items }) {
|
|
6839
|
-
const
|
|
6840
|
-
return /* @__PURE__ */
|
|
7168
|
+
const p36 = BRAND.cssPrefix;
|
|
7169
|
+
return /* @__PURE__ */ jsx24("ul", { class: `${p36}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsxs19(
|
|
6841
7170
|
"a",
|
|
6842
7171
|
{
|
|
6843
|
-
class: `${
|
|
7172
|
+
class: `${p36}-sidebar-nav-item`,
|
|
6844
7173
|
href: item.href,
|
|
6845
7174
|
target: item.href ? "_blank" : void 0,
|
|
6846
7175
|
rel: item.href ? "noreferrer" : void 0,
|
|
6847
7176
|
children: [
|
|
6848
|
-
item.icon ? /* @__PURE__ */
|
|
6849
|
-
/* @__PURE__ */
|
|
7177
|
+
item.icon ? /* @__PURE__ */ jsx24("span", { class: `${p36}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
|
|
7178
|
+
/* @__PURE__ */ jsx24("span", { class: `${p36}-sidebar-nav-label`, children: item.label })
|
|
6850
7179
|
]
|
|
6851
7180
|
}
|
|
6852
7181
|
) }, item.id ?? item.label)) });
|
|
6853
7182
|
}
|
|
6854
7183
|
function SidebarCards({ items }) {
|
|
6855
|
-
const
|
|
6856
|
-
return /* @__PURE__ */
|
|
7184
|
+
const p36 = BRAND.cssPrefix;
|
|
7185
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs19(
|
|
6857
7186
|
"a",
|
|
6858
7187
|
{
|
|
6859
|
-
class: `${
|
|
7188
|
+
class: `${p36}-sidebar-card`,
|
|
6860
7189
|
href: item.href,
|
|
6861
7190
|
target: item.href ? "_blank" : void 0,
|
|
6862
7191
|
rel: item.href ? "noreferrer" : void 0,
|
|
6863
7192
|
children: [
|
|
6864
|
-
/* @__PURE__ */
|
|
6865
|
-
item.description ? /* @__PURE__ */
|
|
7193
|
+
/* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-card-label`, children: item.label }),
|
|
7194
|
+
item.description ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-card-desc`, children: item.description }) : null
|
|
6866
7195
|
]
|
|
6867
7196
|
},
|
|
6868
7197
|
item.id ?? item.label
|
|
@@ -6870,11 +7199,11 @@ function SidebarCards({ items }) {
|
|
|
6870
7199
|
}
|
|
6871
7200
|
|
|
6872
7201
|
// src/ui/page-shell.tsx
|
|
6873
|
-
import { jsx as
|
|
6874
|
-
var
|
|
7202
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "preact/jsx-runtime";
|
|
7203
|
+
var p21 = BRAND.cssPrefix;
|
|
6875
7204
|
function PageShell(props2) {
|
|
6876
|
-
return /* @__PURE__ */
|
|
6877
|
-
/* @__PURE__ */
|
|
7205
|
+
return /* @__PURE__ */ jsxs20("main", { class: `${p21}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
|
|
7206
|
+
/* @__PURE__ */ jsx25(
|
|
6878
7207
|
Sidebar,
|
|
6879
7208
|
{
|
|
6880
7209
|
site: props2.site,
|
|
@@ -6891,7 +7220,7 @@ function PageShell(props2) {
|
|
|
6891
7220
|
onToggleCollapsed: props2.onToggleSidebarCollapsed
|
|
6892
7221
|
}
|
|
6893
7222
|
),
|
|
6894
|
-
/* @__PURE__ */
|
|
7223
|
+
/* @__PURE__ */ jsx25("section", { class: `${p21}-page-chat`, "aria-label": "Chat", children: props2.children })
|
|
6895
7224
|
] });
|
|
6896
7225
|
}
|
|
6897
7226
|
|
|
@@ -6938,83 +7267,83 @@ var chatLayout = {
|
|
|
6938
7267
|
};
|
|
6939
7268
|
|
|
6940
7269
|
// src/ui/modules/help.tsx
|
|
6941
|
-
import { useEffect as useEffect10, useMemo as useMemo2, useState as
|
|
7270
|
+
import { useEffect as useEffect10, useMemo as useMemo2, useState as useState10 } from "preact/hooks";
|
|
6942
7271
|
|
|
6943
7272
|
// src/ui/back-header.tsx
|
|
6944
|
-
import { jsx as
|
|
6945
|
-
var
|
|
7273
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "preact/jsx-runtime";
|
|
7274
|
+
var p22 = BRAND.cssPrefix;
|
|
6946
7275
|
function TitleBar({ title, actions }) {
|
|
6947
|
-
return /* @__PURE__ */
|
|
6948
|
-
/* @__PURE__ */
|
|
6949
|
-
/* @__PURE__ */
|
|
6950
|
-
actions ?? /* @__PURE__ */
|
|
7276
|
+
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-variant": "title", children: [
|
|
7277
|
+
/* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" }),
|
|
7278
|
+
/* @__PURE__ */ jsx26("h1", { class: `${p22}-back-title`, children: title }),
|
|
7279
|
+
actions ?? /* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
|
|
6951
7280
|
] });
|
|
6952
7281
|
}
|
|
6953
7282
|
function BackHeader({ title, backLabel, onBack, actions, testid }) {
|
|
6954
|
-
return /* @__PURE__ */
|
|
6955
|
-
/* @__PURE__ */
|
|
6956
|
-
/* @__PURE__ */
|
|
6957
|
-
actions ?? /* @__PURE__ */
|
|
7283
|
+
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-testid": testid, children: [
|
|
7284
|
+
/* @__PURE__ */ jsx26("button", { type: "button", class: `${p22}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx26(BackIcon, {}) }),
|
|
7285
|
+
/* @__PURE__ */ jsx26("h1", { class: `${p22}-back-title`, children: title }),
|
|
7286
|
+
actions ?? /* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
|
|
6958
7287
|
] });
|
|
6959
7288
|
}
|
|
6960
7289
|
|
|
6961
7290
|
// src/ui/home-search.tsx
|
|
6962
|
-
import { jsx as
|
|
6963
|
-
var
|
|
7291
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "preact/jsx-runtime";
|
|
7292
|
+
var p23 = BRAND.cssPrefix;
|
|
6964
7293
|
function HomeSearchButton({ placeholder, onActivate }) {
|
|
6965
|
-
return /* @__PURE__ */
|
|
6966
|
-
/* @__PURE__ */
|
|
6967
|
-
/* @__PURE__ */
|
|
7294
|
+
return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
|
|
7295
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-text`, children: placeholder }),
|
|
7296
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(SearchIcon, {}) })
|
|
6968
7297
|
] });
|
|
6969
7298
|
}
|
|
6970
7299
|
function HelpSearchInput({ placeholder, value, onInput }) {
|
|
6971
|
-
return /* @__PURE__ */
|
|
6972
|
-
/* @__PURE__ */
|
|
7300
|
+
return /* @__PURE__ */ jsxs22("div", { class: `${p23}-home-search`, "data-input": "true", children: [
|
|
7301
|
+
/* @__PURE__ */ jsx27(
|
|
6973
7302
|
"input",
|
|
6974
7303
|
{
|
|
6975
7304
|
type: "search",
|
|
6976
|
-
class: `${
|
|
7305
|
+
class: `${p23}-home-search-input`,
|
|
6977
7306
|
placeholder,
|
|
6978
7307
|
value,
|
|
6979
7308
|
onInput: (e) => onInput(e.currentTarget.value),
|
|
6980
7309
|
"data-testid": TID.helpSearch
|
|
6981
7310
|
}
|
|
6982
7311
|
),
|
|
6983
|
-
/* @__PURE__ */
|
|
7312
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(SearchIcon, {}) })
|
|
6984
7313
|
] });
|
|
6985
7314
|
}
|
|
6986
7315
|
|
|
6987
7316
|
// src/ui/list-row.tsx
|
|
6988
|
-
import { jsx as
|
|
6989
|
-
var
|
|
7317
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "preact/jsx-runtime";
|
|
7318
|
+
var p24 = BRAND.cssPrefix;
|
|
6990
7319
|
function ListRow({ title, subtitle, onClick, testid }) {
|
|
6991
|
-
return /* @__PURE__ */
|
|
6992
|
-
/* @__PURE__ */
|
|
6993
|
-
/* @__PURE__ */
|
|
6994
|
-
subtitle ? /* @__PURE__ */
|
|
7320
|
+
return /* @__PURE__ */ jsxs23("button", { type: "button", class: `${p24}-list-row`, onClick, "data-testid": testid, children: [
|
|
7321
|
+
/* @__PURE__ */ jsxs23("span", { class: `${p24}-list-row-body`, children: [
|
|
7322
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-title`, children: title }),
|
|
7323
|
+
subtitle ? /* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-sub`, children: subtitle }) : null
|
|
6995
7324
|
] }),
|
|
6996
|
-
/* @__PURE__ */
|
|
7325
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx28(ChevronRightIcon, {}) })
|
|
6997
7326
|
] });
|
|
6998
7327
|
}
|
|
6999
7328
|
|
|
7000
7329
|
// src/ui/module-state.tsx
|
|
7001
|
-
import { jsx as
|
|
7002
|
-
var
|
|
7330
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "preact/jsx-runtime";
|
|
7331
|
+
var p25 = BRAND.cssPrefix;
|
|
7003
7332
|
function ModuleState({
|
|
7004
7333
|
tone = "info",
|
|
7005
7334
|
message,
|
|
7006
7335
|
onRetry,
|
|
7007
7336
|
strings
|
|
7008
7337
|
}) {
|
|
7009
|
-
return /* @__PURE__ */
|
|
7010
|
-
/* @__PURE__ */
|
|
7011
|
-
onRetry ? /* @__PURE__ */
|
|
7338
|
+
return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
|
|
7339
|
+
/* @__PURE__ */ jsx29("span", { children: message }),
|
|
7340
|
+
onRetry ? /* @__PURE__ */ jsx29("button", { type: "button", class: `${p25}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
|
|
7012
7341
|
] });
|
|
7013
7342
|
}
|
|
7014
7343
|
|
|
7015
7344
|
// src/ui/modules/help.tsx
|
|
7016
|
-
import { jsx as
|
|
7017
|
-
var
|
|
7345
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "preact/jsx-runtime";
|
|
7346
|
+
var p26 = BRAND.cssPrefix;
|
|
7018
7347
|
var log12 = logger.scope("help");
|
|
7019
7348
|
var openArticle = (nav, a) => a.url ? nav.push({ kind: "iframe", url: a.url, title: a.title }) : nav.push({ kind: "content", id: a.id, title: a.title });
|
|
7020
7349
|
function groupByCategory(items) {
|
|
@@ -7043,7 +7372,7 @@ function fuzzySearch(items, query) {
|
|
|
7043
7372
|
return items.map((item) => ({ item, score: Math.max(fuzzyScore(q, item.title) * 2, fuzzyScore(q, item.description ?? "")) })).filter((r) => r.score > 0).toSorted((a, b) => b.score - a.score).map((r) => r.item);
|
|
7044
7373
|
}
|
|
7045
7374
|
function ArticleRow({ article, nav }) {
|
|
7046
|
-
return /* @__PURE__ */
|
|
7375
|
+
return /* @__PURE__ */ jsx30(
|
|
7047
7376
|
ListRow,
|
|
7048
7377
|
{
|
|
7049
7378
|
title: article.title,
|
|
@@ -7055,11 +7384,11 @@ function ArticleRow({ article, nav }) {
|
|
|
7055
7384
|
}
|
|
7056
7385
|
function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7057
7386
|
const tags = config.contentTags;
|
|
7058
|
-
const [state, setState] =
|
|
7059
|
-
const [errorMsg, setErrorMsg] =
|
|
7060
|
-
const [items, setItems] =
|
|
7061
|
-
const [query, setQuery] =
|
|
7062
|
-
const [reloadKey, setReloadKey] =
|
|
7387
|
+
const [state, setState] = useState10("loading");
|
|
7388
|
+
const [errorMsg, setErrorMsg] = useState10(strings.errorGeneric);
|
|
7389
|
+
const [items, setItems] = useState10([]);
|
|
7390
|
+
const [query, setQuery] = useState10("");
|
|
7391
|
+
const [reloadKey, setReloadKey] = useState10(0);
|
|
7063
7392
|
useEffect10(() => {
|
|
7064
7393
|
let cancelled = false;
|
|
7065
7394
|
setState("loading");
|
|
@@ -7088,46 +7417,46 @@ function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7088
7417
|
}, [query, results, bus]);
|
|
7089
7418
|
function renderBody() {
|
|
7090
7419
|
if (query.trim().length > 0) {
|
|
7091
|
-
if (results.length === 0) return /* @__PURE__ */
|
|
7092
|
-
return /* @__PURE__ */
|
|
7420
|
+
if (results.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpSearchEmpty, strings });
|
|
7421
|
+
return /* @__PURE__ */ jsx30("div", { class: `${p26}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx30(ArticleRow, { article: a, nav }, a.id)) });
|
|
7093
7422
|
}
|
|
7094
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7423
|
+
if (state === "loading") return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpLoading, strings });
|
|
7095
7424
|
if (state === "error") {
|
|
7096
|
-
return /* @__PURE__ */
|
|
7425
|
+
return /* @__PURE__ */ jsx30(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7097
7426
|
}
|
|
7098
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7099
|
-
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */
|
|
7100
|
-
category ? /* @__PURE__ */
|
|
7101
|
-
/* @__PURE__ */
|
|
7427
|
+
if (items.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpEmpty, strings });
|
|
7428
|
+
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs25("section", { class: `${p26}-help-group`, children: [
|
|
7429
|
+
category ? /* @__PURE__ */ jsx30("h2", { class: `${p26}-help-section-title`, children: category }) : null,
|
|
7430
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx30(ArticleRow, { article: a, nav }, a.id)) })
|
|
7102
7431
|
] }, category));
|
|
7103
7432
|
}
|
|
7104
|
-
return /* @__PURE__ */
|
|
7105
|
-
/* @__PURE__ */
|
|
7106
|
-
/* @__PURE__ */
|
|
7107
|
-
/* @__PURE__ */
|
|
7433
|
+
return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
|
|
7434
|
+
/* @__PURE__ */ jsx30(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx30(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
7435
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-module-pad`, children: /* @__PURE__ */ jsx30(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
|
|
7436
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-help-list`, children: renderBody() })
|
|
7108
7437
|
] });
|
|
7109
7438
|
}
|
|
7110
7439
|
var helpLayout = {
|
|
7111
7440
|
Icon: HelpIcon,
|
|
7112
|
-
Root: (props2) => /* @__PURE__ */
|
|
7441
|
+
Root: (props2) => /* @__PURE__ */ jsx30(HelpRoot, { ...props2 })
|
|
7113
7442
|
};
|
|
7114
7443
|
|
|
7115
7444
|
// src/ui/modules/home.tsx
|
|
7116
|
-
import { useEffect as useEffect11, useState as
|
|
7445
|
+
import { useEffect as useEffect11, useState as useState11 } from "preact/hooks";
|
|
7117
7446
|
|
|
7118
7447
|
// src/ui/home-card.tsx
|
|
7119
|
-
import { jsx as
|
|
7120
|
-
var
|
|
7448
|
+
import { jsx as jsx31 } from "preact/jsx-runtime";
|
|
7449
|
+
var p27 = BRAND.cssPrefix;
|
|
7121
7450
|
function HomeCard({ onClick, children, testid }) {
|
|
7122
7451
|
if (onClick) {
|
|
7123
|
-
return /* @__PURE__ */
|
|
7452
|
+
return /* @__PURE__ */ jsx31("button", { type: "button", class: `${p27}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
|
|
7124
7453
|
}
|
|
7125
|
-
return /* @__PURE__ */
|
|
7454
|
+
return /* @__PURE__ */ jsx31("div", { class: `${p27}-home-card`, "data-testid": testid, children });
|
|
7126
7455
|
}
|
|
7127
7456
|
|
|
7128
7457
|
// src/ui/modules/home.tsx
|
|
7129
|
-
import { Fragment as Fragment8, jsx as
|
|
7130
|
-
var
|
|
7458
|
+
import { Fragment as Fragment8, jsx as jsx32, jsxs as jsxs26 } from "preact/jsx-runtime";
|
|
7459
|
+
var p28 = BRAND.cssPrefix;
|
|
7131
7460
|
var log13 = logger.scope("home");
|
|
7132
7461
|
function resolveGreeting(props2) {
|
|
7133
7462
|
const name = props2.options.userContext?.name;
|
|
@@ -7141,8 +7470,8 @@ function resolveGreeting(props2) {
|
|
|
7141
7470
|
var openContent = (nav, item) => item.url ? nav.push({ kind: "iframe", url: item.url, title: item.title }) : nav.push({ kind: "content", id: item.id, title: item.title });
|
|
7142
7471
|
function HomeRoot(props2) {
|
|
7143
7472
|
const { transport, strings, config, nav, bus, panelProps } = props2;
|
|
7144
|
-
const [recent, setRecent] =
|
|
7145
|
-
const [content, setContent] =
|
|
7473
|
+
const [recent, setRecent] = useState11(null);
|
|
7474
|
+
const [content, setContent] = useState11([]);
|
|
7146
7475
|
const tagsKey = config.contentTags?.join(",");
|
|
7147
7476
|
useEffect11(() => {
|
|
7148
7477
|
if (!config.showRecentConversations) return;
|
|
@@ -7170,49 +7499,49 @@ function HomeRoot(props2) {
|
|
|
7170
7499
|
const status = config.status;
|
|
7171
7500
|
const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
|
|
7172
7501
|
const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
|
|
7173
|
-
return /* @__PURE__ */
|
|
7174
|
-
/* @__PURE__ */
|
|
7175
|
-
/* @__PURE__ */
|
|
7176
|
-
config.brandName ? /* @__PURE__ */
|
|
7177
|
-
/* @__PURE__ */
|
|
7178
|
-
avatars.length > 0 ? /* @__PURE__ */
|
|
7179
|
-
/* @__PURE__ */
|
|
7502
|
+
return /* @__PURE__ */ jsx32("div", { class: `${p28}-module ${p28}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-scroll`, children: [
|
|
7503
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero`, children: [
|
|
7504
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-top`, children: [
|
|
7505
|
+
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" }),
|
|
7506
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-actions`, children: [
|
|
7507
|
+
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,
|
|
7508
|
+
/* @__PURE__ */ jsx32(HeaderActions, { panelProps, variant: "plain" })
|
|
7180
7509
|
] })
|
|
7181
7510
|
] }),
|
|
7182
|
-
config.showGreeting !== false ? /* @__PURE__ */
|
|
7183
|
-
/* @__PURE__ */
|
|
7184
|
-
greeting.subtitle ? /* @__PURE__ */
|
|
7511
|
+
config.showGreeting !== false ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
|
|
7512
|
+
/* @__PURE__ */ jsx32("h1", { class: `${p28}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
|
|
7513
|
+
greeting.subtitle ? /* @__PURE__ */ jsx32("p", { class: `${p28}-home-lead`, children: greeting.subtitle }) : null
|
|
7185
7514
|
] }) : null
|
|
7186
7515
|
] }),
|
|
7187
|
-
/* @__PURE__ */
|
|
7188
|
-
config.showSearchBar !== false ? /* @__PURE__ */
|
|
7516
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-cards`, children: [
|
|
7517
|
+
config.showSearchBar !== false ? /* @__PURE__ */ jsx32(
|
|
7189
7518
|
HomeSearchButton,
|
|
7190
7519
|
{
|
|
7191
7520
|
placeholder: strings.homeSearchPlaceholder,
|
|
7192
7521
|
onActivate: () => nav.switchToLayout("help")
|
|
7193
7522
|
}
|
|
7194
7523
|
) : null,
|
|
7195
|
-
recent ? /* @__PURE__ */
|
|
7196
|
-
/* @__PURE__ */
|
|
7197
|
-
/* @__PURE__ */
|
|
7198
|
-
/* @__PURE__ */
|
|
7199
|
-
recent.preview ? /* @__PURE__ */
|
|
7524
|
+
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: [
|
|
7525
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx32(BubblesIcon, {}) }),
|
|
7526
|
+
/* @__PURE__ */ jsxs26("span", { class: `${p28}-home-recent-body`, children: [
|
|
7527
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-title`, children: recent.title }),
|
|
7528
|
+
recent.preview ? /* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-preview`, children: recent.preview }) : null
|
|
7200
7529
|
] }),
|
|
7201
|
-
|
|
7530
|
+
recent.hasUnread ? /* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-dot`, "aria-label": "Unread" }) : null
|
|
7202
7531
|
] }) }) : null,
|
|
7203
|
-
status ? /* @__PURE__ */
|
|
7532
|
+
status ? /* @__PURE__ */ jsx32(
|
|
7204
7533
|
HomeCard,
|
|
7205
7534
|
{
|
|
7206
7535
|
onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
|
|
7207
|
-
children: /* @__PURE__ */
|
|
7208
|
-
/* @__PURE__ */
|
|
7209
|
-
/* @__PURE__ */
|
|
7536
|
+
children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-status`, "data-level": status.level ?? "operational", children: [
|
|
7537
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx32(StatusOkIcon, {}) }),
|
|
7538
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-status-text`, children: statusText })
|
|
7210
7539
|
] })
|
|
7211
7540
|
}
|
|
7212
7541
|
) : null,
|
|
7213
|
-
content.length > 0 ? /* @__PURE__ */
|
|
7214
|
-
/* @__PURE__ */
|
|
7215
|
-
/* @__PURE__ */
|
|
7542
|
+
content.length > 0 ? /* @__PURE__ */ jsxs26("section", { class: `${p28}-home-content`, children: [
|
|
7543
|
+
/* @__PURE__ */ jsx32("div", { class: `${p28}-home-content-title`, children: contentTitle }),
|
|
7544
|
+
/* @__PURE__ */ jsx32("div", { class: `${p28}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx32(
|
|
7216
7545
|
ListRow,
|
|
7217
7546
|
{
|
|
7218
7547
|
title: item.title,
|
|
@@ -7228,20 +7557,20 @@ function HomeRoot(props2) {
|
|
|
7228
7557
|
}
|
|
7229
7558
|
var homeLayout = {
|
|
7230
7559
|
Icon: HomeIcon,
|
|
7231
|
-
Root: (props2) => /* @__PURE__ */
|
|
7560
|
+
Root: (props2) => /* @__PURE__ */ jsx32(HomeRoot, { ...props2 })
|
|
7232
7561
|
};
|
|
7233
7562
|
|
|
7234
7563
|
// src/ui/modules/news.tsx
|
|
7235
|
-
import { useEffect as useEffect12, useState as
|
|
7236
|
-
import { jsx as
|
|
7237
|
-
var
|
|
7564
|
+
import { useEffect as useEffect12, useState as useState12 } from "preact/hooks";
|
|
7565
|
+
import { jsx as jsx33, jsxs as jsxs27 } from "preact/jsx-runtime";
|
|
7566
|
+
var p29 = BRAND.cssPrefix;
|
|
7238
7567
|
var log14 = logger.scope("news");
|
|
7239
7568
|
function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7240
7569
|
const tags = config.contentTags;
|
|
7241
|
-
const [state, setState] =
|
|
7242
|
-
const [errorMsg, setErrorMsg] =
|
|
7243
|
-
const [items, setItems] =
|
|
7244
|
-
const [reloadKey, setReloadKey] =
|
|
7570
|
+
const [state, setState] = useState12("loading");
|
|
7571
|
+
const [errorMsg, setErrorMsg] = useState12(strings.errorGeneric);
|
|
7572
|
+
const [items, setItems] = useState12([]);
|
|
7573
|
+
const [reloadKey, setReloadKey] = useState12(0);
|
|
7245
7574
|
useEffect12(() => {
|
|
7246
7575
|
let cancelled = false;
|
|
7247
7576
|
setState("loading");
|
|
@@ -7262,37 +7591,37 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7262
7591
|
};
|
|
7263
7592
|
}, [transport, tags, reloadKey, bus]);
|
|
7264
7593
|
function renderBody() {
|
|
7265
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7594
|
+
if (state === "loading") return /* @__PURE__ */ jsx33(ModuleState, { message: strings.newsLoading, strings });
|
|
7266
7595
|
if (state === "error") {
|
|
7267
|
-
return /* @__PURE__ */
|
|
7596
|
+
return /* @__PURE__ */ jsx33(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7268
7597
|
}
|
|
7269
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7270
|
-
return /* @__PURE__ */
|
|
7598
|
+
if (items.length === 0) return /* @__PURE__ */ jsx33(ModuleState, { message: strings.newsEmpty, strings });
|
|
7599
|
+
return /* @__PURE__ */ jsx33("div", { class: `${p29}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs27(
|
|
7271
7600
|
"button",
|
|
7272
7601
|
{
|
|
7273
7602
|
type: "button",
|
|
7274
|
-
class: `${
|
|
7603
|
+
class: `${p29}-news-card`,
|
|
7275
7604
|
onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
|
|
7276
7605
|
"data-testid": tid(TID.newsItem, item.id),
|
|
7277
7606
|
children: [
|
|
7278
|
-
item.image ? /* @__PURE__ */
|
|
7279
|
-
/* @__PURE__ */
|
|
7280
|
-
/* @__PURE__ */
|
|
7281
|
-
item.description ? /* @__PURE__ */
|
|
7607
|
+
item.image ? /* @__PURE__ */ jsx33("img", { class: `${p29}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
7608
|
+
/* @__PURE__ */ jsxs27("span", { class: `${p29}-news-body`, children: [
|
|
7609
|
+
/* @__PURE__ */ jsx33("span", { class: `${p29}-news-title`, children: item.title }),
|
|
7610
|
+
item.description ? /* @__PURE__ */ jsx33("span", { class: `${p29}-news-summary`, children: item.description }) : null
|
|
7282
7611
|
] })
|
|
7283
7612
|
]
|
|
7284
7613
|
},
|
|
7285
7614
|
item.id
|
|
7286
7615
|
)) });
|
|
7287
7616
|
}
|
|
7288
|
-
return /* @__PURE__ */
|
|
7289
|
-
/* @__PURE__ */
|
|
7290
|
-
/* @__PURE__ */
|
|
7617
|
+
return /* @__PURE__ */ jsxs27("div", { class: `${p29}-module`, children: [
|
|
7618
|
+
/* @__PURE__ */ jsx33(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx33(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
7619
|
+
/* @__PURE__ */ jsx33("div", { class: `${p29}-module-scroll`, children: renderBody() })
|
|
7291
7620
|
] });
|
|
7292
7621
|
}
|
|
7293
7622
|
var newsLayout = {
|
|
7294
7623
|
Icon: NewsIcon,
|
|
7295
|
-
Root: (props2) => /* @__PURE__ */
|
|
7624
|
+
Root: (props2) => /* @__PURE__ */ jsx33(NewsRoot, { ...props2 })
|
|
7296
7625
|
};
|
|
7297
7626
|
|
|
7298
7627
|
// src/ui/modules/registry.ts
|
|
@@ -7304,28 +7633,28 @@ var LAYOUTS = {
|
|
|
7304
7633
|
};
|
|
7305
7634
|
|
|
7306
7635
|
// src/ui/home-tab-bar.tsx
|
|
7307
|
-
import { jsx as
|
|
7308
|
-
var
|
|
7309
|
-
function HomeTabBar({ modules, activeTab, strings,
|
|
7310
|
-
return /* @__PURE__ */
|
|
7636
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "preact/jsx-runtime";
|
|
7637
|
+
var p30 = BRAND.cssPrefix;
|
|
7638
|
+
function HomeTabBar({ modules, activeTab, strings, hasUnread, onSelect }) {
|
|
7639
|
+
return /* @__PURE__ */ jsx34("nav", { class: `${p30}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
|
|
7311
7640
|
const Icon = LAYOUTS[m.layout].Icon;
|
|
7312
7641
|
const selected = m.id === activeTab;
|
|
7313
|
-
const
|
|
7314
|
-
return /* @__PURE__ */
|
|
7642
|
+
const showDot = m.layout === "chat" && hasUnread;
|
|
7643
|
+
return /* @__PURE__ */ jsxs28(
|
|
7315
7644
|
"button",
|
|
7316
7645
|
{
|
|
7317
7646
|
type: "button",
|
|
7318
7647
|
role: "tab",
|
|
7319
7648
|
"aria-selected": selected,
|
|
7320
|
-
class: `${
|
|
7649
|
+
class: `${p30}-tab`,
|
|
7321
7650
|
onClick: () => onSelect(m.id),
|
|
7322
7651
|
"data-testid": tid(TID.tab, m.id),
|
|
7323
7652
|
children: [
|
|
7324
|
-
/* @__PURE__ */
|
|
7325
|
-
/* @__PURE__ */
|
|
7326
|
-
|
|
7653
|
+
/* @__PURE__ */ jsxs28("span", { class: `${p30}-tab-icon`, "aria-hidden": "true", children: [
|
|
7654
|
+
/* @__PURE__ */ jsx34(Icon, {}),
|
|
7655
|
+
showDot ? /* @__PURE__ */ jsx34("span", { class: `${p30}-tab-badge`, "data-testid": TID.tabBadge, "aria-label": "Unread" }) : null
|
|
7327
7656
|
] }),
|
|
7328
|
-
/* @__PURE__ */
|
|
7657
|
+
/* @__PURE__ */ jsx34("span", { class: `${p30}-tab-label`, children: localizeText(strings, m.label) })
|
|
7329
7658
|
]
|
|
7330
7659
|
},
|
|
7331
7660
|
m.id
|
|
@@ -7334,12 +7663,12 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
|
7334
7663
|
}
|
|
7335
7664
|
|
|
7336
7665
|
// src/ui/iframe-view.tsx
|
|
7337
|
-
import { jsx as
|
|
7338
|
-
var
|
|
7666
|
+
import { jsx as jsx35, jsxs as jsxs29 } from "preact/jsx-runtime";
|
|
7667
|
+
var p31 = BRAND.cssPrefix;
|
|
7339
7668
|
var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
|
|
7340
7669
|
function IframeView({ url, title, strings, onBack, actions }) {
|
|
7341
|
-
return /* @__PURE__ */
|
|
7342
|
-
/* @__PURE__ */
|
|
7670
|
+
return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
|
|
7671
|
+
/* @__PURE__ */ jsx35(
|
|
7343
7672
|
BackHeader,
|
|
7344
7673
|
{
|
|
7345
7674
|
title: title || strings.moduleBack,
|
|
@@ -7348,10 +7677,10 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7348
7677
|
actions
|
|
7349
7678
|
}
|
|
7350
7679
|
),
|
|
7351
|
-
/* @__PURE__ */
|
|
7680
|
+
/* @__PURE__ */ jsx35(
|
|
7352
7681
|
"iframe",
|
|
7353
7682
|
{
|
|
7354
|
-
class: `${
|
|
7683
|
+
class: `${p31}-content-frame`,
|
|
7355
7684
|
src: url,
|
|
7356
7685
|
title: title || "content",
|
|
7357
7686
|
sandbox: SANDBOX,
|
|
@@ -7364,15 +7693,15 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7364
7693
|
}
|
|
7365
7694
|
|
|
7366
7695
|
// src/ui/content-view.tsx
|
|
7367
|
-
import { useCallback as useCallback3, useEffect as useEffect13, useState as
|
|
7368
|
-
import { jsx as
|
|
7369
|
-
var
|
|
7696
|
+
import { useCallback as useCallback3, useEffect as useEffect13, useState as useState13 } from "preact/hooks";
|
|
7697
|
+
import { jsx as jsx36, jsxs as jsxs30 } from "preact/jsx-runtime";
|
|
7698
|
+
var p32 = BRAND.cssPrefix;
|
|
7370
7699
|
var log15 = logger.scope("content");
|
|
7371
7700
|
var READ_DWELL_MS = 5e3;
|
|
7372
7701
|
function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
7373
|
-
const [item, setItem] =
|
|
7374
|
-
const [failed, setFailed] =
|
|
7375
|
-
const [reloadKey, setReloadKey] =
|
|
7702
|
+
const [item, setItem] = useState13(null);
|
|
7703
|
+
const [failed, setFailed] = useState13(false);
|
|
7704
|
+
const [reloadKey, setReloadKey] = useState13(0);
|
|
7376
7705
|
const retry = useCallback3(() => {
|
|
7377
7706
|
setFailed(false);
|
|
7378
7707
|
setItem(null);
|
|
@@ -7410,16 +7739,16 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7410
7739
|
[bus, id]
|
|
7411
7740
|
);
|
|
7412
7741
|
function renderBody() {
|
|
7413
|
-
if (failed) return /* @__PURE__ */
|
|
7414
|
-
if (item === null) return /* @__PURE__ */
|
|
7415
|
-
return /* @__PURE__ */
|
|
7416
|
-
item.image ? /* @__PURE__ */
|
|
7417
|
-
item.description ? /* @__PURE__ */
|
|
7418
|
-
/* @__PURE__ */
|
|
7742
|
+
if (failed) return /* @__PURE__ */ jsx36(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
|
|
7743
|
+
if (item === null) return /* @__PURE__ */ jsx36(ModuleState, { message: strings.contentLoading, strings });
|
|
7744
|
+
return /* @__PURE__ */ jsxs30("article", { class: `${p32}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
|
|
7745
|
+
item.image ? /* @__PURE__ */ jsx36("img", { class: `${p32}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
7746
|
+
item.description ? /* @__PURE__ */ jsx36("p", { class: `${p32}-content-subtitle`, children: item.description }) : null,
|
|
7747
|
+
/* @__PURE__ */ jsx36(StaticMarkdown, { text: item.content ?? "" })
|
|
7419
7748
|
] });
|
|
7420
7749
|
}
|
|
7421
|
-
return /* @__PURE__ */
|
|
7422
|
-
/* @__PURE__ */
|
|
7750
|
+
return /* @__PURE__ */ jsxs30("div", { class: `${p32}-module`, children: [
|
|
7751
|
+
/* @__PURE__ */ jsx36(
|
|
7423
7752
|
BackHeader,
|
|
7424
7753
|
{
|
|
7425
7754
|
title: item?.title || title || strings.moduleBack,
|
|
@@ -7429,19 +7758,19 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7429
7758
|
testid: TID.backHeader
|
|
7430
7759
|
}
|
|
7431
7760
|
),
|
|
7432
|
-
/* @__PURE__ */
|
|
7761
|
+
/* @__PURE__ */ jsx36("div", { class: `${p32}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
|
|
7433
7762
|
] });
|
|
7434
7763
|
}
|
|
7435
7764
|
|
|
7436
7765
|
// src/ui/messenger-home.tsx
|
|
7437
|
-
import { jsx as
|
|
7438
|
-
var
|
|
7766
|
+
import { jsx as jsx37, jsxs as jsxs31 } from "preact/jsx-runtime";
|
|
7767
|
+
var p33 = BRAND.cssPrefix;
|
|
7439
7768
|
function MessengerHome({
|
|
7440
7769
|
panelProps,
|
|
7441
7770
|
enabledModules,
|
|
7442
7771
|
nav,
|
|
7443
7772
|
bus,
|
|
7444
|
-
|
|
7773
|
+
hasUnread,
|
|
7445
7774
|
onSelectConversation,
|
|
7446
7775
|
onStartNewConversation,
|
|
7447
7776
|
onSetPanelSize
|
|
@@ -7506,12 +7835,12 @@ function MessengerHome({
|
|
|
7506
7835
|
bus,
|
|
7507
7836
|
panelProps
|
|
7508
7837
|
});
|
|
7509
|
-
const plainActions = /* @__PURE__ */
|
|
7838
|
+
const plainActions = /* @__PURE__ */ jsx37(HeaderActions, { panelProps, variant: "plain" });
|
|
7510
7839
|
if (activeModule) visitedRef.current.add(activeModule.id);
|
|
7511
7840
|
const visitedTabs = enabledModules.filter((m) => visitedRef.current.has(m.id));
|
|
7512
7841
|
const tabRoot = (module) => {
|
|
7513
7842
|
if (module.layout === "chat") {
|
|
7514
|
-
return /* @__PURE__ */
|
|
7843
|
+
return /* @__PURE__ */ jsx37(
|
|
7515
7844
|
PanelContent,
|
|
7516
7845
|
{
|
|
7517
7846
|
...panelProps,
|
|
@@ -7522,14 +7851,14 @@ function MessengerHome({
|
|
|
7522
7851
|
);
|
|
7523
7852
|
}
|
|
7524
7853
|
const Root = LAYOUTS[module.layout].Root;
|
|
7525
|
-
return Root ? /* @__PURE__ */
|
|
7854
|
+
return Root ? /* @__PURE__ */ jsx37(Root, { ...screenProps(module) }) : null;
|
|
7526
7855
|
};
|
|
7527
7856
|
const renderReader = () => {
|
|
7528
7857
|
if (top?.kind === "iframe") {
|
|
7529
|
-
return /* @__PURE__ */
|
|
7858
|
+
return /* @__PURE__ */ jsx37(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
|
|
7530
7859
|
}
|
|
7531
7860
|
if (top?.kind === "content") {
|
|
7532
|
-
return /* @__PURE__ */
|
|
7861
|
+
return /* @__PURE__ */ jsx37(
|
|
7533
7862
|
ContentView,
|
|
7534
7863
|
{
|
|
7535
7864
|
id: top.id,
|
|
@@ -7544,33 +7873,33 @@ function MessengerHome({
|
|
|
7544
7873
|
}
|
|
7545
7874
|
return null;
|
|
7546
7875
|
};
|
|
7547
|
-
return /* @__PURE__ */
|
|
7876
|
+
return /* @__PURE__ */ jsxs31(
|
|
7548
7877
|
"div",
|
|
7549
7878
|
{
|
|
7550
7879
|
ref: containerRef,
|
|
7551
|
-
class: `${
|
|
7880
|
+
class: `${p33}-panel ${p33}-messenger`,
|
|
7552
7881
|
role: "dialog",
|
|
7553
7882
|
"aria-modal": "false",
|
|
7554
7883
|
"aria-label": strings.panelTitle,
|
|
7555
7884
|
style: { position: "relative" },
|
|
7556
7885
|
"data-testid": TID.messengerHome,
|
|
7557
7886
|
children: [
|
|
7558
|
-
/* @__PURE__ */
|
|
7559
|
-
visitedTabs.map((m) => /* @__PURE__ */
|
|
7887
|
+
/* @__PURE__ */ jsxs31("div", { class: `${p33}-messenger-body`, children: [
|
|
7888
|
+
visitedTabs.map((m) => /* @__PURE__ */ jsx37("div", { class: `${p33}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
|
|
7560
7889
|
renderReader()
|
|
7561
7890
|
] }),
|
|
7562
|
-
showTabBar ? /* @__PURE__ */
|
|
7891
|
+
showTabBar ? /* @__PURE__ */ jsx37(
|
|
7563
7892
|
HomeTabBar,
|
|
7564
7893
|
{
|
|
7565
7894
|
modules: enabledModules,
|
|
7566
7895
|
activeTab: navState.activeTab,
|
|
7567
7896
|
strings,
|
|
7568
|
-
|
|
7897
|
+
hasUnread,
|
|
7569
7898
|
onSelect: nav.switchTab
|
|
7570
7899
|
}
|
|
7571
7900
|
) : null,
|
|
7572
|
-
/* @__PURE__ */
|
|
7573
|
-
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */
|
|
7901
|
+
/* @__PURE__ */ jsx37(PoweredByBar, { poweredBy: options.poweredBy }),
|
|
7902
|
+
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */ jsx37(
|
|
7574
7903
|
ResizeGrip,
|
|
7575
7904
|
{
|
|
7576
7905
|
panelEl: containerRef.current,
|
|
@@ -7587,40 +7916,40 @@ function MessengerHome({
|
|
|
7587
7916
|
}
|
|
7588
7917
|
|
|
7589
7918
|
// src/ui/modules-empty.tsx
|
|
7590
|
-
import { jsx as
|
|
7591
|
-
var
|
|
7919
|
+
import { jsx as jsx38, jsxs as jsxs32 } from "preact/jsx-runtime";
|
|
7920
|
+
var p34 = BRAND.cssPrefix;
|
|
7592
7921
|
function ModulesEmpty({ strings, onClose }) {
|
|
7593
|
-
return /* @__PURE__ */
|
|
7922
|
+
return /* @__PURE__ */ jsxs32(
|
|
7594
7923
|
"div",
|
|
7595
7924
|
{
|
|
7596
|
-
class: `${
|
|
7925
|
+
class: `${p34}-panel ${p34}-modules-empty`,
|
|
7597
7926
|
role: "dialog",
|
|
7598
7927
|
"aria-label": strings.panelTitle,
|
|
7599
7928
|
"data-testid": TID.modulesEmpty,
|
|
7600
7929
|
children: [
|
|
7601
|
-
onClose ? /* @__PURE__ */
|
|
7930
|
+
onClose ? /* @__PURE__ */ jsx38(
|
|
7602
7931
|
"button",
|
|
7603
7932
|
{
|
|
7604
7933
|
type: "button",
|
|
7605
|
-
class: `${
|
|
7934
|
+
class: `${p34}-icon-btn ${p34}-modules-empty-close`,
|
|
7606
7935
|
onClick: onClose,
|
|
7607
7936
|
"aria-label": strings.close,
|
|
7608
7937
|
title: strings.close,
|
|
7609
|
-
children: /* @__PURE__ */
|
|
7938
|
+
children: /* @__PURE__ */ jsx38(CloseIcon, {})
|
|
7610
7939
|
}
|
|
7611
7940
|
) : null,
|
|
7612
|
-
/* @__PURE__ */
|
|
7941
|
+
/* @__PURE__ */ jsx38("p", { class: `${p34}-modules-empty-text`, children: strings.modulesEmpty })
|
|
7613
7942
|
]
|
|
7614
7943
|
}
|
|
7615
7944
|
);
|
|
7616
7945
|
}
|
|
7617
7946
|
|
|
7618
7947
|
// src/ui/use-launcher-callout.ts
|
|
7619
|
-
import { useCallback as useCallback5, useEffect as useEffect15, useState as
|
|
7948
|
+
import { useCallback as useCallback5, useEffect as useEffect15, useState as useState14 } from "preact/hooks";
|
|
7620
7949
|
function useLauncherCallout({ callout, persistence }) {
|
|
7621
7950
|
const textKey = callout?.text ?? "";
|
|
7622
7951
|
const persistent = callout?.persistent ?? true;
|
|
7623
|
-
const [dismissed, setDismissed] =
|
|
7952
|
+
const [dismissed, setDismissed] = useState14(() => persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7624
7953
|
useEffect15(() => {
|
|
7625
7954
|
setDismissed(persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7626
7955
|
}, [textKey, persistent, persistence]);
|
|
@@ -7632,9 +7961,9 @@ function useLauncherCallout({ callout, persistence }) {
|
|
|
7632
7961
|
}
|
|
7633
7962
|
|
|
7634
7963
|
// src/ui/app.tsx
|
|
7635
|
-
import { jsx as
|
|
7964
|
+
import { jsx as jsx39, jsxs as jsxs33 } from "preact/jsx-runtime";
|
|
7636
7965
|
var log16 = logger.scope("app");
|
|
7637
|
-
var
|
|
7966
|
+
var p35 = BRAND.cssPrefix;
|
|
7638
7967
|
function makeLocalizedWelcome(w, strings) {
|
|
7639
7968
|
return makeInstantWelcomeMessage({ ...w, text: localizeText(strings, w.text) });
|
|
7640
7969
|
}
|
|
@@ -7649,21 +7978,21 @@ function isAbortError(error) {
|
|
|
7649
7978
|
return error instanceof DOMException ? error.name === "AbortError" : error?.name === "AbortError";
|
|
7650
7979
|
}
|
|
7651
7980
|
function App({ options, hostElement, bus }) {
|
|
7652
|
-
const [persistence] =
|
|
7981
|
+
const [persistence] = useState15(
|
|
7653
7982
|
() => createPersistence(options.widgetId, options.storage, options.aiAgentDeploymentId)
|
|
7654
7983
|
);
|
|
7655
|
-
const [visitorId, setVisitorId] =
|
|
7984
|
+
const [visitorId, setVisitorId] = useState15(() => persistence.getVisitorId());
|
|
7656
7985
|
const initialSettings = persistence.loadUserPrefs();
|
|
7657
|
-
const [activeLocale, setActiveLocale] =
|
|
7658
|
-
const [activeThemeMode, setActiveThemeMode] =
|
|
7986
|
+
const [activeLocale, setActiveLocale] = useState15(() => initialSettings.locale ?? options.locale);
|
|
7987
|
+
const [activeThemeMode, setActiveThemeMode] = useState15(
|
|
7659
7988
|
() => initialSettings.themeMode ?? options.themeMode
|
|
7660
7989
|
);
|
|
7661
|
-
const [activeTextSize, setActiveTextSize] =
|
|
7990
|
+
const [activeTextSize, setActiveTextSize] = useState15(() => initialSettings.textSize ?? options.textSize);
|
|
7662
7991
|
const conversationIdSig = useSignal(persistence.loadConversationId());
|
|
7663
7992
|
const messagesSig = useSignal([]);
|
|
7664
|
-
const
|
|
7665
|
-
const [loadingMessages, setLoadingMessages] =
|
|
7666
|
-
const [formMarkers, setFormMarkers] =
|
|
7993
|
+
const hasUnreadSig = useSignal(false);
|
|
7994
|
+
const [loadingMessages, setLoadingMessages] = useState15(false);
|
|
7995
|
+
const [formMarkers, setFormMarkers] = useState15([]);
|
|
7667
7996
|
function landingTab() {
|
|
7668
7997
|
const list = options.modules.list;
|
|
7669
7998
|
const ids = new Set(list.map((m) => m.id));
|
|
@@ -7682,15 +8011,15 @@ function App({ options, hostElement, bus }) {
|
|
|
7682
8011
|
const homeNav = homeNavRef.current;
|
|
7683
8012
|
const chatTabIdRef = useRef9(void 0);
|
|
7684
8013
|
chatTabIdRef.current = chatTabId();
|
|
7685
|
-
const [conversationReady, setConversationReady] =
|
|
7686
|
-
const [remoteForms, setRemoteForms] =
|
|
7687
|
-
const [formsReady, setFormsReady] =
|
|
8014
|
+
const [conversationReady, setConversationReady] = useState15(false);
|
|
8015
|
+
const [remoteForms, setRemoteForms] = useState15(null);
|
|
8016
|
+
const [formsReady, setFormsReady] = useState15(false);
|
|
7688
8017
|
const isInlineLike = options.mode === "standalone" || options.mode === "inline";
|
|
7689
8018
|
const initialPanelRef = useRef9(
|
|
7690
8019
|
resolveInitialPanelState(options, currentViewportWidth(), persistence.loadPanelOpen(), persistence.loadPanelSize())
|
|
7691
8020
|
);
|
|
7692
|
-
const [isOpen, setIsOpen] =
|
|
7693
|
-
const [activated, setActivated] =
|
|
8021
|
+
const [isOpen, setIsOpen] = useState15(initialPanelRef.current.panelOpen);
|
|
8022
|
+
const [activated, setActivated] = useState15(initialPanelRef.current.panelOpen);
|
|
7694
8023
|
const activatedRef = useRef9(activated);
|
|
7695
8024
|
activatedRef.current = activated;
|
|
7696
8025
|
const pendingThreadRef = useRef9(false);
|
|
@@ -7699,7 +8028,7 @@ function App({ options, hostElement, bus }) {
|
|
|
7699
8028
|
if (isOpen) setActivated(true);
|
|
7700
8029
|
}, [isOpen]);
|
|
7701
8030
|
const initialPanelApplied = useRef9(false);
|
|
7702
|
-
const [launcherLeaving, setLauncherLeaving] =
|
|
8031
|
+
const [launcherLeaving, setLauncherLeaving] = useState15(false);
|
|
7703
8032
|
const { dismissed: calloutDismissed, dismissCallout: dismissCalloutRaw } = useLauncherCallout({
|
|
7704
8033
|
callout: options.launcher.callout,
|
|
7705
8034
|
persistence
|
|
@@ -7710,21 +8039,21 @@ function App({ options, hostElement, bus }) {
|
|
|
7710
8039
|
bus.emit("calloutDismiss", void 0);
|
|
7711
8040
|
dismissCalloutRaw();
|
|
7712
8041
|
}, [bus, dismissCalloutRaw]);
|
|
7713
|
-
const [panelSize, setPanelSize] =
|
|
8042
|
+
const [panelSize, setPanelSize] = useState15(initialPanelRef.current.panelSize);
|
|
7714
8043
|
const initialSizeApplied = useRef9(false);
|
|
7715
|
-
const [view, setView] =
|
|
7716
|
-
const [canSend, setCanSend] =
|
|
7717
|
-
const [streaming, setStreaming] =
|
|
7718
|
-
const [agent, setAgent] =
|
|
7719
|
-
const [suggestions, setSuggestions] =
|
|
7720
|
-
const [activeCancel, setActiveCancel] =
|
|
7721
|
-
const [activeDetach, setActiveDetach] =
|
|
8044
|
+
const [view, setView] = useState15("chat");
|
|
8045
|
+
const [canSend, setCanSend] = useState15(true);
|
|
8046
|
+
const [streaming, setStreaming] = useState15(false);
|
|
8047
|
+
const [agent, setAgent] = useState15(null);
|
|
8048
|
+
const [suggestions, setSuggestions] = useState15([]);
|
|
8049
|
+
const [activeCancel, setActiveCancel] = useState15(null);
|
|
8050
|
+
const [activeDetach, setActiveDetach] = useState15(null);
|
|
7722
8051
|
const stringsRef = useRef9(options.strings);
|
|
7723
|
-
const [parsedSite, setParsedSite] =
|
|
7724
|
-
const [parsedBlocks, setParsedBlocks] =
|
|
7725
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
7726
|
-
const [formContext, setFormContext] =
|
|
7727
|
-
const [transport] =
|
|
8052
|
+
const [parsedSite, setParsedSite] = useState15(void 0);
|
|
8053
|
+
const [parsedBlocks, setParsedBlocks] = useState15(void 0);
|
|
8054
|
+
const [sidebarCollapsed, setSidebarCollapsed] = useState15(() => persistence.loadSidebarCollapsed() ?? false);
|
|
8055
|
+
const [formContext, setFormContext] = useState15({});
|
|
8056
|
+
const [transport] = useState15(
|
|
7728
8057
|
() => new AgentTransport({
|
|
7729
8058
|
agentApiBaseUrl: options.agentApiBaseUrl,
|
|
7730
8059
|
dataApiBaseUrl: options.dataApiBaseUrl,
|
|
@@ -7736,8 +8065,8 @@ function App({ options, hostElement, bus }) {
|
|
|
7736
8065
|
endpoints: options.endpoints
|
|
7737
8066
|
})
|
|
7738
8067
|
);
|
|
7739
|
-
const [reducer] =
|
|
7740
|
-
const [feedback] =
|
|
8068
|
+
const [reducer] = useState15(() => new StreamReducer(messagesSig));
|
|
8069
|
+
const [feedback] = useState15(() => new FeedbackBus(options.sound, options.haptics));
|
|
7741
8070
|
const patchAndSync = useCallback6(
|
|
7742
8071
|
(patch) => {
|
|
7743
8072
|
persistence.patchUserPrefs(patch);
|
|
@@ -8312,6 +8641,20 @@ function App({ options, hostElement, bus }) {
|
|
|
8312
8641
|
},
|
|
8313
8642
|
[streaming, messagesSig]
|
|
8314
8643
|
);
|
|
8644
|
+
const handleMessageFeedback = useCallback6(
|
|
8645
|
+
(messageId, value) => {
|
|
8646
|
+
log16.info("messageFeedback", { messageId, value });
|
|
8647
|
+
bus.emit("messageFeedback", { messageId, value });
|
|
8648
|
+
void transport.submitFeedback({ messageId, value });
|
|
8649
|
+
},
|
|
8650
|
+
[bus, transport]
|
|
8651
|
+
);
|
|
8652
|
+
const handleMessageSeen = useCallback6(
|
|
8653
|
+
(messageId) => {
|
|
8654
|
+
bus.emit("messageSeen", { messageId });
|
|
8655
|
+
},
|
|
8656
|
+
[bus]
|
|
8657
|
+
);
|
|
8315
8658
|
const toolInteraction = useMemo3(
|
|
8316
8659
|
() => ({
|
|
8317
8660
|
humanInLoop: options.features.humanInLoop,
|
|
@@ -8443,15 +8786,23 @@ function App({ options, hostElement, bus }) {
|
|
|
8443
8786
|
const refreshUnread = useCallback6(() => {
|
|
8444
8787
|
if (!options.modules.list.some((m) => m.layout === "chat")) return;
|
|
8445
8788
|
transport.listConversations({ limit: 50 }).then((res) => {
|
|
8446
|
-
|
|
8789
|
+
hasUnreadSig.value = res.conversations.some((c) => c.hasUnread);
|
|
8447
8790
|
}).catch((err) => log16.debug("refreshUnread failed (non-fatal)", { err }));
|
|
8448
|
-
}, [transport, options.modules,
|
|
8791
|
+
}, [transport, options.modules, hasUnreadSig]);
|
|
8449
8792
|
const unreadSeeded = useRef9(false);
|
|
8450
8793
|
useEffect16(() => {
|
|
8451
8794
|
if (!activated || !conversationReady || unreadSeeded.current) return;
|
|
8452
8795
|
unreadSeeded.current = true;
|
|
8453
8796
|
refreshUnread();
|
|
8454
8797
|
}, [activated, conversationReady, refreshUnread]);
|
|
8798
|
+
useEffect16(() => {
|
|
8799
|
+
if (!activated) return;
|
|
8800
|
+
const onVisible = () => {
|
|
8801
|
+
if (document.visibilityState === "visible") refreshUnread();
|
|
8802
|
+
};
|
|
8803
|
+
document.addEventListener("visibilitychange", onVisible);
|
|
8804
|
+
return () => document.removeEventListener("visibilitychange", onVisible);
|
|
8805
|
+
}, [activated, refreshUnread]);
|
|
8455
8806
|
const handleOpen = useCallback6(() => {
|
|
8456
8807
|
log16.info("open", { mode: options.mode });
|
|
8457
8808
|
feedback.unlock();
|
|
@@ -8684,7 +9035,9 @@ function App({ options, hostElement, bus }) {
|
|
|
8684
9035
|
// `openForm()` command, so it bypasses frequency dedupe by design.
|
|
8685
9036
|
onFormFill: (formId) => forms.fire("manual", formId),
|
|
8686
9037
|
tool: toolInteraction,
|
|
8687
|
-
onRetry: handleRetry
|
|
9038
|
+
onRetry: handleRetry,
|
|
9039
|
+
onMessageFeedback: handleMessageFeedback,
|
|
9040
|
+
onMessageSeen: handleMessageSeen
|
|
8688
9041
|
};
|
|
8689
9042
|
const onSelectConversation = (conversationId) => {
|
|
8690
9043
|
void handleSelectHistoryConversation(conversationId);
|
|
@@ -8696,19 +9049,19 @@ function App({ options, hostElement, bus }) {
|
|
|
8696
9049
|
const renderSurface = (size) => {
|
|
8697
9050
|
const closeable = isActionVisible("close", effectiveOptions.mode, size);
|
|
8698
9051
|
if (enabledModules.length === 0) {
|
|
8699
|
-
return /* @__PURE__ */
|
|
9052
|
+
return /* @__PURE__ */ jsx39(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
|
|
8700
9053
|
}
|
|
8701
9054
|
if (enabledModules.length === 1 && enabledModules[0]?.layout === "chat") {
|
|
8702
|
-
return /* @__PURE__ */
|
|
9055
|
+
return /* @__PURE__ */ jsx39(Panel, { ...panelProps, panelSize: size });
|
|
8703
9056
|
}
|
|
8704
|
-
return /* @__PURE__ */
|
|
9057
|
+
return /* @__PURE__ */ jsx39(
|
|
8705
9058
|
MessengerHome,
|
|
8706
9059
|
{
|
|
8707
9060
|
panelProps: { ...panelProps, panelSize: size, onClose: closeable ? handleClose : void 0 },
|
|
8708
9061
|
enabledModules,
|
|
8709
9062
|
nav: homeNav,
|
|
8710
9063
|
bus,
|
|
8711
|
-
|
|
9064
|
+
hasUnread: hasUnreadSig.value,
|
|
8712
9065
|
onSelectConversation,
|
|
8713
9066
|
onStartNewConversation: handleNewChat,
|
|
8714
9067
|
onSetPanelSize: setPanelSize
|
|
@@ -8720,7 +9073,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8720
9073
|
void handleSelectHistoryConversation(chat.conversationId);
|
|
8721
9074
|
};
|
|
8722
9075
|
const conversationsEnabled = enabledModules.some((m) => m.layout === "chat");
|
|
8723
|
-
return /* @__PURE__ */
|
|
9076
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: /* @__PURE__ */ jsx39(
|
|
8724
9077
|
PageShell,
|
|
8725
9078
|
{
|
|
8726
9079
|
site: parsedSite,
|
|
@@ -8741,15 +9094,15 @@ function App({ options, hostElement, bus }) {
|
|
|
8741
9094
|
}
|
|
8742
9095
|
if (isInlineLike) {
|
|
8743
9096
|
const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
|
|
8744
|
-
return /* @__PURE__ */
|
|
9097
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: renderSurface(inlineSize) });
|
|
8745
9098
|
}
|
|
8746
9099
|
const drawerEdgeTab = options.mode === "drawer";
|
|
8747
9100
|
const triggerOwnedByPage = options.mode === "modal";
|
|
8748
9101
|
const launcherVisible = !triggerOwnedByPage && !options.launcher.hidden && (!isOpen || launcherLeaving);
|
|
8749
9102
|
const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
|
|
8750
|
-
return /* @__PURE__ */
|
|
8751
|
-
isOpen || activated ? /* @__PURE__ */
|
|
8752
|
-
launcherVisible ? /* @__PURE__ */
|
|
9103
|
+
return /* @__PURE__ */ jsxs33("div", { class: `${p35}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
|
|
9104
|
+
isOpen || activated ? /* @__PURE__ */ jsx39("div", { class: `${p35}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
|
|
9105
|
+
launcherVisible ? /* @__PURE__ */ jsx39(
|
|
8753
9106
|
Launcher,
|
|
8754
9107
|
{
|
|
8755
9108
|
onToggle: handleOpen,
|
|
@@ -8759,7 +9112,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8759
9112
|
edgeTab: drawerEdgeTab
|
|
8760
9113
|
}
|
|
8761
9114
|
) : null,
|
|
8762
|
-
calloutToRender ? /* @__PURE__ */
|
|
9115
|
+
calloutToRender ? /* @__PURE__ */ jsx39(
|
|
8763
9116
|
LauncherCallout,
|
|
8764
9117
|
{
|
|
8765
9118
|
callout: calloutToRender,
|
|
@@ -8824,34 +9177,37 @@ var TRACKED = {
|
|
|
8824
9177
|
expand: (on) => ({ on }),
|
|
8825
9178
|
fullscreen: (on) => ({ on }),
|
|
8826
9179
|
// Conversation funnel. `send` is the key conversion; text never rides.
|
|
8827
|
-
send: (
|
|
8828
|
-
message: (
|
|
9180
|
+
send: (p36) => ({ attachments: p36.attachmentCount }),
|
|
9181
|
+
message: (p36) => ({ role: p36.role }),
|
|
8829
9182
|
stop: () => void 0,
|
|
8830
9183
|
clear: () => void 0,
|
|
8831
9184
|
suggestion: () => void 0,
|
|
8832
|
-
toggleHistory: (
|
|
9185
|
+
toggleHistory: (p36) => ({ view: p36.view }),
|
|
8833
9186
|
handshake: () => void 0,
|
|
8834
9187
|
// Forms + human-in-the-loop — ids and outcomes, never values.
|
|
8835
|
-
formSubmit: (
|
|
9188
|
+
formSubmit: (p36) => ({ formId: p36.formId, skipped: p36.skipped }),
|
|
8836
9189
|
toolResult: () => void 0,
|
|
8837
|
-
toolDecision: (
|
|
9190
|
+
toolDecision: (p36) => ({ approved: p36.approved }),
|
|
9191
|
+
// Feedback + read tracking — outcome only; message text never rides.
|
|
9192
|
+
messageFeedback: (p36) => ({ value: p36.value ?? "none" }),
|
|
9193
|
+
messageSeen: () => void 0,
|
|
8838
9194
|
// Content — ids, tags + counts only; titles/bodies never ride.
|
|
8839
|
-
contentView: (
|
|
8840
|
-
contentOpen: (
|
|
8841
|
-
contentSearch: (
|
|
8842
|
-
contentRead: (
|
|
8843
|
-
contentLinkClick: (
|
|
9195
|
+
contentView: (p36) => ({ section: p36.section, tags: p36.tags, count: p36.count }),
|
|
9196
|
+
contentOpen: (p36) => ({ contentId: p36.contentId, tags: p36.tags }),
|
|
9197
|
+
contentSearch: (p36) => ({ qlen: p36.queryLength, hits: p36.hitCount }),
|
|
9198
|
+
contentRead: (p36) => ({ contentId: p36.contentId }),
|
|
9199
|
+
contentLinkClick: (p36) => ({ contentId: p36.contentId }),
|
|
8844
9200
|
// Composer / attachments / voice.
|
|
8845
|
-
attach: (
|
|
9201
|
+
attach: (p36) => ({ count: p36.count, bytes: p36.totalBytes }),
|
|
8846
9202
|
voiceStart: () => void 0,
|
|
8847
|
-
voiceStop: (
|
|
9203
|
+
voiceStop: (p36) => ({ ms: p36.durationMs }),
|
|
8848
9204
|
voiceCancel: () => void 0,
|
|
8849
9205
|
// Preferences — how visitors tune the surface.
|
|
8850
9206
|
localeChange: (locale) => ({ locale }),
|
|
8851
9207
|
themeChange: (theme) => ({ theme }),
|
|
8852
9208
|
textSizeChange: (size) => ({ size }),
|
|
8853
|
-
soundToggle: (
|
|
8854
|
-
sidebarToggle: (
|
|
9209
|
+
soundToggle: (p36) => ({ muted: p36.muted }),
|
|
9210
|
+
sidebarToggle: (p36) => ({ collapsed: p36.collapsed }),
|
|
8855
9211
|
calloutDismiss: () => void 0,
|
|
8856
9212
|
// Health signal only — the error object itself never leaves the page.
|
|
8857
9213
|
error: () => void 0
|