@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/index.mjs
CHANGED
|
@@ -29,7 +29,7 @@ var BRAND = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// src/core/version.ts
|
|
32
|
-
var ELEMENTS_VERSION = true ? "0.
|
|
32
|
+
var ELEMENTS_VERSION = true ? "0.56.0" : "0.0.0-dev";
|
|
33
33
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
34
34
|
|
|
35
35
|
// src/i18n/strings.ts
|
|
@@ -38,8 +38,8 @@ var STRINGS_EN = {
|
|
|
38
38
|
attachmentMimeRejected: "File type not supported",
|
|
39
39
|
attachmentTooLarge: "File is too large",
|
|
40
40
|
attachmentTooMany: "Attachment limit reached",
|
|
41
|
-
conversationClosed: "This
|
|
42
|
-
conversationLoading: "Loading
|
|
41
|
+
conversationClosed: "This chat is closed",
|
|
42
|
+
conversationLoading: "Loading chat\u2026",
|
|
43
43
|
close: "Close",
|
|
44
44
|
collapse: "Collapse",
|
|
45
45
|
collapseSidebar: "Collapse sidebar",
|
|
@@ -58,10 +58,10 @@ var STRINGS_EN = {
|
|
|
58
58
|
fullscreen: "Fullscreen",
|
|
59
59
|
history: "History",
|
|
60
60
|
historyBack: "Back to chat",
|
|
61
|
-
historyEmpty: "No previous
|
|
62
|
-
historyLoading: "Loading your
|
|
63
|
-
historyContinue: "Continue the
|
|
64
|
-
historyTitle: "
|
|
61
|
+
historyEmpty: "No previous chats yet",
|
|
62
|
+
historyLoading: "Loading your chats\u2026",
|
|
63
|
+
historyContinue: "Continue the chat",
|
|
64
|
+
historyTitle: "Chat history",
|
|
65
65
|
language: "Language",
|
|
66
66
|
launcherOpen: "Open chat",
|
|
67
67
|
launcherLabel: "Chat with us",
|
|
@@ -69,14 +69,14 @@ var STRINGS_EN = {
|
|
|
69
69
|
micStop: "Stop voice input",
|
|
70
70
|
micUnsupported: "Voice input is not supported in this browser",
|
|
71
71
|
moreActions: "More actions",
|
|
72
|
-
newConversation: "New
|
|
72
|
+
newConversation: "New chat",
|
|
73
73
|
panelTitle: "Chat",
|
|
74
74
|
resizeHandle: "Drag to resize",
|
|
75
75
|
scrollToBottom: "Scroll to latest",
|
|
76
76
|
send: "Send",
|
|
77
77
|
soundOff: "Sound off",
|
|
78
78
|
soundOn: "Sound on",
|
|
79
|
-
startNewConversation: "Start a new
|
|
79
|
+
startNewConversation: "Start a new chat",
|
|
80
80
|
stop: "Stop",
|
|
81
81
|
theme: "Theme",
|
|
82
82
|
themeAuto: "Auto",
|
|
@@ -92,9 +92,15 @@ var STRINGS_EN = {
|
|
|
92
92
|
usedTool: "Used tool",
|
|
93
93
|
toolResult: "Result",
|
|
94
94
|
sources: "Sources",
|
|
95
|
+
feedbackUp: "Good response",
|
|
96
|
+
feedbackDown: "Bad response",
|
|
97
|
+
feedbackThanks: "Thanks for your feedback",
|
|
98
|
+
copy: "Copy",
|
|
99
|
+
copied: "Copied",
|
|
100
|
+
newMessages: "New messages",
|
|
95
101
|
// ── Messenger modules ──────────────────────────────────────────
|
|
96
102
|
tabHome: "Home",
|
|
97
|
-
tabConversations: "
|
|
103
|
+
tabConversations: "Chats",
|
|
98
104
|
tabHelp: "Help",
|
|
99
105
|
tabNews: "News",
|
|
100
106
|
modulesEmpty: "Nothing here yet",
|
|
@@ -171,8 +177,8 @@ var STRINGS_FR = {
|
|
|
171
177
|
attachmentMimeRejected: "Type de fichier non pris en charge",
|
|
172
178
|
attachmentTooLarge: "Le fichier est trop volumineux",
|
|
173
179
|
attachmentTooMany: "Limite de pi\xE8ces jointes atteinte",
|
|
174
|
-
conversationClosed: "
|
|
175
|
-
conversationLoading: "Chargement
|
|
180
|
+
conversationClosed: "Ce chat est ferm\xE9",
|
|
181
|
+
conversationLoading: "Chargement du chat\u2026",
|
|
176
182
|
close: "Fermer",
|
|
177
183
|
collapse: "R\xE9duire",
|
|
178
184
|
collapseSidebar: "R\xE9duire la barre lat\xE9rale",
|
|
@@ -191,10 +197,10 @@ var STRINGS_FR = {
|
|
|
191
197
|
fullscreen: "Plein \xE9cran",
|
|
192
198
|
history: "Historique",
|
|
193
199
|
historyBack: "Retour au chat",
|
|
194
|
-
historyEmpty: "
|
|
195
|
-
historyContinue: "Poursuivre
|
|
196
|
-
historyLoading: "Chargement de vos
|
|
197
|
-
historyTitle: "Historique des
|
|
200
|
+
historyEmpty: "Aucun chat pour le moment",
|
|
201
|
+
historyContinue: "Poursuivre le chat",
|
|
202
|
+
historyLoading: "Chargement de vos chats\u2026",
|
|
203
|
+
historyTitle: "Historique des chats",
|
|
198
204
|
language: "Langue",
|
|
199
205
|
launcherOpen: "Ouvrir le chat",
|
|
200
206
|
launcherLabel: "Discuter avec nous",
|
|
@@ -202,14 +208,14 @@ var STRINGS_FR = {
|
|
|
202
208
|
micStop: "Arr\xEAter la saisie vocale",
|
|
203
209
|
micUnsupported: "La saisie vocale n'est pas prise en charge par ce navigateur",
|
|
204
210
|
moreActions: "Plus d'actions",
|
|
205
|
-
newConversation: "
|
|
211
|
+
newConversation: "Nouveau chat",
|
|
206
212
|
panelTitle: "Chat",
|
|
207
213
|
resizeHandle: "Glisser pour redimensionner",
|
|
208
214
|
scrollToBottom: "Aller au plus r\xE9cent",
|
|
209
215
|
send: "Envoyer",
|
|
210
216
|
soundOff: "Son d\xE9sactiv\xE9",
|
|
211
217
|
soundOn: "Son activ\xE9",
|
|
212
|
-
startNewConversation: "D\xE9marrer
|
|
218
|
+
startNewConversation: "D\xE9marrer un nouveau chat",
|
|
213
219
|
stop: "Arr\xEAter",
|
|
214
220
|
theme: "Th\xE8me",
|
|
215
221
|
themeAuto: "Auto",
|
|
@@ -225,9 +231,15 @@ var STRINGS_FR = {
|
|
|
225
231
|
usedTool: "Outil utilis\xE9",
|
|
226
232
|
toolResult: "R\xE9sultat",
|
|
227
233
|
sources: "Sources",
|
|
234
|
+
feedbackUp: "Bonne r\xE9ponse",
|
|
235
|
+
feedbackDown: "Mauvaise r\xE9ponse",
|
|
236
|
+
feedbackThanks: "Merci pour votre retour",
|
|
237
|
+
copy: "Copier",
|
|
238
|
+
copied: "Copi\xE9",
|
|
239
|
+
newMessages: "Nouveaux messages",
|
|
228
240
|
// ── Messenger modules ──────────────────────────────────────────
|
|
229
241
|
tabHome: "Accueil",
|
|
230
|
-
tabConversations: "
|
|
242
|
+
tabConversations: "Chats",
|
|
231
243
|
tabHelp: "Aide",
|
|
232
244
|
tabNews: "Actualit\xE9s",
|
|
233
245
|
modulesEmpty: "Rien pour le moment",
|
|
@@ -304,8 +316,8 @@ var STRINGS_AR = {
|
|
|
304
316
|
attachmentMimeRejected: "\u0646\u0648\u0639 \u0627\u0644\u0645\u0644\u0641 \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645",
|
|
305
317
|
attachmentTooLarge: "\u062D\u062C\u0645 \u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627",
|
|
306
318
|
attachmentTooMany: "\u062A\u0645 \u0628\u0644\u0648\u063A \u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 \u0644\u0644\u0645\u0631\u0641\u0642\u0627\u062A",
|
|
307
|
-
conversationClosed: "\u062A\u0645 \u0625\u063A\u0644\u0627\u0642 \u0647\u0630\u0647 \u0627\u0644\
|
|
308
|
-
conversationLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\
|
|
319
|
+
conversationClosed: "\u062A\u0645 \u0625\u063A\u0644\u0627\u0642 \u0647\u0630\u0647 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
320
|
+
conversationLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0629\u2026",
|
|
309
321
|
close: "\u0625\u063A\u0644\u0627\u0642",
|
|
310
322
|
collapse: "\u0637\u064A\u0651",
|
|
311
323
|
collapseSidebar: "\u0637\u064A\u0651 \u0627\u0644\u0634\u0631\u064A\u0637 \u0627\u0644\u062C\u0627\u0646\u0628\u064A",
|
|
@@ -323,26 +335,26 @@ var STRINGS_AR = {
|
|
|
323
335
|
exitFullscreen: "\u0625\u0646\u0647\u0627\u0621 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
|
|
324
336
|
fullscreen: "\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629",
|
|
325
337
|
history: "\u0627\u0644\u0633\u062C\u0644",
|
|
326
|
-
historyBack: "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\
|
|
327
|
-
historyEmpty: "\u0644\u0627 \u062A\u0648\u062C\u062F \
|
|
328
|
-
historyContinue: "\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\
|
|
329
|
-
historyLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \
|
|
330
|
-
historyTitle: "\u0633\u062C\u0644 \u0627\u0644\
|
|
338
|
+
historyBack: "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
339
|
+
historyEmpty: "\u0644\u0627 \u062A\u0648\u062C\u062F \u062F\u0631\u062F\u0634\u0627\u062A \u0633\u0627\u0628\u0642\u0629 \u0628\u0639\u062F",
|
|
340
|
+
historyContinue: "\u0645\u062A\u0627\u0628\u0639\u0629 \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
341
|
+
historyLoading: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u062F\u0631\u062F\u0634\u0627\u062A\u0643\u2026",
|
|
342
|
+
historyTitle: "\u0633\u062C\u0644 \u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",
|
|
331
343
|
language: "\u0627\u0644\u0644\u063A\u0629",
|
|
332
|
-
launcherOpen: "\u0641\u062A\u062D \u0627\u0644\
|
|
344
|
+
launcherOpen: "\u0641\u062A\u062D \u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
333
345
|
launcherLabel: "\u062A\u062D\u062F\u062B \u0645\u0639\u0646\u0627",
|
|
334
346
|
micStart: "\u0628\u062F\u0621 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",
|
|
335
347
|
micStop: "\u0625\u064A\u0642\u0627\u0641 \u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A",
|
|
336
348
|
micUnsupported: "\u0627\u0644\u0625\u062F\u062E\u0627\u0644 \u0627\u0644\u0635\u0648\u062A\u064A \u063A\u064A\u0631 \u0645\u062F\u0639\u0648\u0645 \u0641\u064A \u0647\u0630\u0627 \u0627\u0644\u0645\u062A\u0635\u0641\u062D",
|
|
337
349
|
moreActions: "\u0625\u062C\u0631\u0627\u0621\u0627\u062A \u0625\u0636\u0627\u0641\u064A\u0629",
|
|
338
|
-
newConversation: "\
|
|
339
|
-
panelTitle: "\u0627\u0644\
|
|
350
|
+
newConversation: "\u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",
|
|
351
|
+
panelTitle: "\u0627\u0644\u062F\u0631\u062F\u0634\u0629",
|
|
340
352
|
resizeHandle: "\u0627\u0633\u062D\u0628 \u0644\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u062D\u062C\u0645",
|
|
341
353
|
scrollToBottom: "\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0623\u062D\u062F\u062B",
|
|
342
354
|
send: "\u0625\u0631\u0633\u0627\u0644",
|
|
343
355
|
soundOff: "\u0643\u062A\u0645 \u0627\u0644\u0635\u0648\u062A",
|
|
344
356
|
soundOn: "\u062A\u0634\u063A\u064A\u0644 \u0627\u0644\u0635\u0648\u062A",
|
|
345
|
-
startNewConversation: "\u0628\u062F\u0621 \
|
|
357
|
+
startNewConversation: "\u0628\u062F\u0621 \u062F\u0631\u062F\u0634\u0629 \u062C\u062F\u064A\u062F\u0629",
|
|
346
358
|
stop: "\u0625\u064A\u0642\u0627\u0641",
|
|
347
359
|
theme: "\u0627\u0644\u0645\u0638\u0647\u0631",
|
|
348
360
|
themeAuto: "\u062A\u0644\u0642\u0627\u0626\u064A",
|
|
@@ -358,9 +370,15 @@ var STRINGS_AR = {
|
|
|
358
370
|
usedTool: "\u0623\u062F\u0627\u0629 \u0645\u064F\u0633\u062A\u062E\u062F\u064E\u0645\u0629",
|
|
359
371
|
toolResult: "\u0627\u0644\u0646\u062A\u064A\u062C\u0629",
|
|
360
372
|
sources: "\u0627\u0644\u0645\u0635\u0627\u062F\u0631",
|
|
373
|
+
feedbackUp: "\u0631\u062F \u062C\u064A\u062F",
|
|
374
|
+
feedbackDown: "\u0631\u062F \u0633\u064A\u0626",
|
|
375
|
+
feedbackThanks: "\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643",
|
|
376
|
+
copy: "\u0646\u0633\u062E",
|
|
377
|
+
copied: "\u062A\u0645 \u0627\u0644\u0646\u0633\u062E",
|
|
378
|
+
newMessages: "\u0631\u0633\u0627\u0626\u0644 \u062C\u062F\u064A\u062F\u0629",
|
|
361
379
|
// ── Messenger modules ──────────────────────────────────────────
|
|
362
380
|
tabHome: "\u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629",
|
|
363
|
-
tabConversations: "\u0627\u0644\
|
|
381
|
+
tabConversations: "\u0627\u0644\u062F\u0631\u062F\u0634\u0627\u062A",
|
|
364
382
|
tabHelp: "\u0627\u0644\u0645\u0633\u0627\u0639\u062F\u0629",
|
|
365
383
|
tabNews: "\u0627\u0644\u0623\u062E\u0628\u0627\u0631",
|
|
366
384
|
modulesEmpty: "\u0644\u0627 \u0634\u064A\u0621 \u0647\u0646\u0627 \u0628\u0639\u062F",
|
|
@@ -437,8 +455,8 @@ var STRINGS_ES = {
|
|
|
437
455
|
attachmentMimeRejected: "Tipo de archivo no admitido",
|
|
438
456
|
attachmentTooLarge: "El archivo es demasiado grande",
|
|
439
457
|
attachmentTooMany: "Se alcanz\xF3 el l\xEDmite de adjuntos",
|
|
440
|
-
conversationClosed: "
|
|
441
|
-
conversationLoading: "Cargando
|
|
458
|
+
conversationClosed: "Este chat est\xE1 cerrado",
|
|
459
|
+
conversationLoading: "Cargando chat\u2026",
|
|
442
460
|
close: "Cerrar",
|
|
443
461
|
collapse: "Contraer",
|
|
444
462
|
collapseSidebar: "Contraer la barra lateral",
|
|
@@ -457,10 +475,10 @@ var STRINGS_ES = {
|
|
|
457
475
|
fullscreen: "Pantalla completa",
|
|
458
476
|
history: "Historial",
|
|
459
477
|
historyBack: "Volver al chat",
|
|
460
|
-
historyEmpty: "A\xFAn no tienes
|
|
461
|
-
historyContinue: "Continuar
|
|
462
|
-
historyLoading: "Cargando tus
|
|
463
|
-
historyTitle: "Historial de
|
|
478
|
+
historyEmpty: "A\xFAn no tienes chats",
|
|
479
|
+
historyContinue: "Continuar el chat",
|
|
480
|
+
historyLoading: "Cargando tus chats\u2026",
|
|
481
|
+
historyTitle: "Historial de chats",
|
|
464
482
|
language: "Idioma",
|
|
465
483
|
launcherOpen: "Abrir el chat",
|
|
466
484
|
launcherLabel: "Chatea con nosotros",
|
|
@@ -468,14 +486,14 @@ var STRINGS_ES = {
|
|
|
468
486
|
micStop: "Detener entrada de voz",
|
|
469
487
|
micUnsupported: "Este navegador no admite la entrada de voz",
|
|
470
488
|
moreActions: "M\xE1s acciones",
|
|
471
|
-
newConversation: "
|
|
489
|
+
newConversation: "Nuevo chat",
|
|
472
490
|
panelTitle: "Chat",
|
|
473
491
|
resizeHandle: "Arrastra para cambiar el tama\xF1o",
|
|
474
492
|
scrollToBottom: "Ir a lo m\xE1s reciente",
|
|
475
493
|
send: "Enviar",
|
|
476
494
|
soundOff: "Sonido desactivado",
|
|
477
495
|
soundOn: "Sonido activado",
|
|
478
|
-
startNewConversation: "Iniciar
|
|
496
|
+
startNewConversation: "Iniciar un chat nuevo",
|
|
479
497
|
stop: "Detener",
|
|
480
498
|
theme: "Tema",
|
|
481
499
|
themeAuto: "Autom\xE1tico",
|
|
@@ -491,9 +509,15 @@ var STRINGS_ES = {
|
|
|
491
509
|
usedTool: "Herramienta usada",
|
|
492
510
|
toolResult: "Resultado",
|
|
493
511
|
sources: "Fuentes",
|
|
512
|
+
feedbackUp: "Buena respuesta",
|
|
513
|
+
feedbackDown: "Mala respuesta",
|
|
514
|
+
feedbackThanks: "Gracias por tu opini\xF3n",
|
|
515
|
+
copy: "Copiar",
|
|
516
|
+
copied: "Copiado",
|
|
517
|
+
newMessages: "Mensajes nuevos",
|
|
494
518
|
// ── Messenger modules ──────────────────────────────────────────
|
|
495
519
|
tabHome: "Inicio",
|
|
496
|
-
tabConversations: "
|
|
520
|
+
tabConversations: "Chats",
|
|
497
521
|
tabHelp: "Ayuda",
|
|
498
522
|
tabNews: "Novedades",
|
|
499
523
|
modulesEmpty: "A\xFAn no hay nada aqu\xED",
|
|
@@ -570,8 +594,8 @@ var STRINGS_HE = {
|
|
|
570
594
|
attachmentMimeRejected: "\u05E1\u05D5\u05D2 \u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA",
|
|
571
595
|
attachmentTooLarge: "\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9",
|
|
572
596
|
attachmentTooMany: "\u05D4\u05D2\u05E2\u05EA \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D4\u05DE\u05E8\u05D1\u05D9 \u05E9\u05DC \u05E7\u05D1\u05E6\u05D9\u05DD \u05DE\u05E6\u05D5\u05E8\u05E4\u05D9\u05DD",
|
|
573
|
-
conversationClosed: "\u05D4\
|
|
574
|
-
conversationLoading: "\u05D8\u05D5\u05E2\u05DF \
|
|
597
|
+
conversationClosed: "\u05D4\u05E6\u05F3\u05D0\u05D8 \u05D4\u05D6\u05D4 \u05E0\u05E1\u05D2\u05E8",
|
|
598
|
+
conversationLoading: "\u05D8\u05D5\u05E2\u05DF \u05E6\u05F3\u05D0\u05D8\u2026",
|
|
575
599
|
close: "\u05E1\u05D2\u05D9\u05E8\u05D4",
|
|
576
600
|
collapse: "\u05DB\u05D9\u05D5\u05D5\u05E5",
|
|
577
601
|
collapseSidebar: "\u05DB\u05D9\u05D5\u05D5\u05E5 \u05E1\u05E8\u05D2\u05DC \u05D4\u05E6\u05D3",
|
|
@@ -589,11 +613,11 @@ var STRINGS_HE = {
|
|
|
589
613
|
exitFullscreen: "\u05D9\u05E6\u05D9\u05D0\u05D4 \u05DE\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",
|
|
590
614
|
fullscreen: "\u05DE\u05E1\u05DA \u05DE\u05DC\u05D0",
|
|
591
615
|
history: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D4",
|
|
592
|
-
historyBack: "\u05D7\u05D6\u05E8\u05D4 \u05DC\
|
|
593
|
-
historyEmpty: "\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \
|
|
594
|
-
historyContinue: "\u05D4\u05DE\u05E9\u05DA \
|
|
595
|
-
historyLoading: "\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\
|
|
596
|
-
historyTitle: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \
|
|
616
|
+
historyBack: "\u05D7\u05D6\u05E8\u05D4 \u05DC\u05E6\u05F3\u05D0\u05D8",
|
|
617
|
+
historyEmpty: "\u05D0\u05D9\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E7\u05D5\u05D3\u05DE\u05D9\u05DD",
|
|
618
|
+
historyContinue: "\u05D4\u05DE\u05E9\u05DA \u05E6\u05F3\u05D0\u05D8",
|
|
619
|
+
historyLoading: "\u05D8\u05D5\u05E2\u05DF \u05D0\u05EA \u05D4\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD \u05E9\u05DC\u05DA\u2026",
|
|
620
|
+
historyTitle: "\u05D4\u05D9\u05E1\u05D8\u05D5\u05E8\u05D9\u05D9\u05EA \u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",
|
|
597
621
|
language: "\u05E9\u05E4\u05D4",
|
|
598
622
|
launcherOpen: "\u05E4\u05EA\u05D9\u05D7\u05EA \u05E6\u05F3\u05D0\u05D8",
|
|
599
623
|
launcherLabel: "\u05D3\u05D1\u05E8\u05D5 \u05D0\u05D9\u05EA\u05E0\u05D5",
|
|
@@ -601,14 +625,14 @@ var STRINGS_HE = {
|
|
|
601
625
|
micStop: "\u05E2\u05E6\u05D9\u05E8\u05EA \u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9",
|
|
602
626
|
micUnsupported: "\u05E7\u05DC\u05D8 \u05E7\u05D5\u05DC\u05D9 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA \u05D1\u05D3\u05E4\u05D3\u05E4\u05DF \u05D6\u05D4",
|
|
603
627
|
moreActions: "\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA \u05E0\u05D5\u05E1\u05E4\u05D5\u05EA",
|
|
604
|
-
newConversation: "\
|
|
605
|
-
panelTitle: "\
|
|
628
|
+
newConversation: "\u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",
|
|
629
|
+
panelTitle: "\u05E6\u05F3\u05D0\u05D8",
|
|
606
630
|
resizeHandle: "\u05D2\u05E8\u05D5\u05E8 \u05DC\u05E9\u05D9\u05E0\u05D5\u05D9 \u05D4\u05D2\u05D5\u05D3\u05DC",
|
|
607
631
|
scrollToBottom: "\u05DE\u05E2\u05D1\u05E8 \u05DC\u05D7\u05D3\u05E9 \u05D1\u05D9\u05D5\u05EA\u05E8",
|
|
608
632
|
send: "\u05E9\u05DC\u05D9\u05D7\u05D4",
|
|
609
633
|
soundOff: "\u05D4\u05E9\u05EA\u05E7\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",
|
|
610
634
|
soundOn: "\u05D4\u05E4\u05E2\u05DC\u05EA \u05D4\u05E6\u05DC\u05D9\u05DC",
|
|
611
|
-
startNewConversation: "\u05D4\u05EA\u05D7\u05DC\u05EA \
|
|
635
|
+
startNewConversation: "\u05D4\u05EA\u05D7\u05DC\u05EA \u05E6\u05F3\u05D0\u05D8 \u05D7\u05D3\u05E9",
|
|
612
636
|
stop: "\u05E2\u05E6\u05D9\u05E8\u05D4",
|
|
613
637
|
theme: "\u05E2\u05E8\u05DB\u05EA \u05E0\u05D5\u05E9\u05D0",
|
|
614
638
|
themeAuto: "\u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9",
|
|
@@ -624,9 +648,15 @@ var STRINGS_HE = {
|
|
|
624
648
|
usedTool: "\u05DB\u05DC\u05D9 \u05D1\u05E9\u05D9\u05DE\u05D5\u05E9",
|
|
625
649
|
toolResult: "\u05EA\u05D5\u05E6\u05D0\u05D4",
|
|
626
650
|
sources: "\u05DE\u05E7\u05D5\u05E8\u05D5\u05EA",
|
|
651
|
+
feedbackUp: "\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D8\u05D5\u05D1\u05D4",
|
|
652
|
+
feedbackDown: "\u05EA\u05E9\u05D5\u05D1\u05D4 \u05D2\u05E8\u05D5\u05E2\u05D4",
|
|
653
|
+
feedbackThanks: "\u05EA\u05D5\u05D3\u05D4 \u05E2\u05DC \u05D4\u05DE\u05E9\u05D5\u05D1",
|
|
654
|
+
copy: "\u05D4\u05E2\u05EA\u05E7",
|
|
655
|
+
copied: "\u05D4\u05D5\u05E2\u05EA\u05E7",
|
|
656
|
+
newMessages: "\u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05D7\u05D3\u05E9\u05D5\u05EA",
|
|
627
657
|
// ── Messenger modules ──────────────────────────────────────────
|
|
628
658
|
tabHome: "\u05D1\u05D9\u05EA",
|
|
629
|
-
tabConversations: "\
|
|
659
|
+
tabConversations: "\u05E6\u05F3\u05D0\u05D8\u05D9\u05DD",
|
|
630
660
|
tabHelp: "\u05E2\u05D6\u05E8\u05D4",
|
|
631
661
|
tabNews: "\u05D7\u05D3\u05E9\u05D5\u05EA",
|
|
632
662
|
modulesEmpty: "\u05D0\u05D9\u05DF \u05DB\u05D0\u05DF \u05E2\u05D3\u05D9\u05D9\u05DF \u05DB\u05DC\u05D5\u05DD",
|
|
@@ -1057,6 +1087,9 @@ function resolveOptions(rawOpts) {
|
|
|
1057
1087
|
showReasoning: behavior.showReasoning ?? false,
|
|
1058
1088
|
showToolCalls: behavior.showToolCalls ?? false,
|
|
1059
1089
|
showSources: behavior.showSources ?? false,
|
|
1090
|
+
scrollFade: behavior.scrollFade ?? true,
|
|
1091
|
+
scrollAnchor: behavior.scrollAnchor ?? "bottom",
|
|
1092
|
+
enableMessageFeedback: behavior.enableMessageFeedback ?? true,
|
|
1060
1093
|
features: {
|
|
1061
1094
|
files: opts.features?.files ?? DEFAULT_FEATURES.files,
|
|
1062
1095
|
voice: opts.features?.voice ?? DEFAULT_FEATURES.voice,
|
|
@@ -1384,7 +1417,8 @@ var BEHAVIOR_ATTRS = [
|
|
|
1384
1417
|
["start-minimized", "startMinimized", boolAttr],
|
|
1385
1418
|
["show-reasoning", "showReasoning", boolAttr],
|
|
1386
1419
|
["show-tool-calls", "showToolCalls", boolAttr],
|
|
1387
|
-
["show-sources", "showSources", boolAttr]
|
|
1420
|
+
["show-sources", "showSources", boolAttr],
|
|
1421
|
+
["enable-message-feedback", "enableMessageFeedback", boolAttr]
|
|
1388
1422
|
];
|
|
1389
1423
|
var I18N_ATTRS = [["locale", "locale"]];
|
|
1390
1424
|
var ACTION_NAMES = new Set(ACTION_NAME_LITERALS);
|
|
@@ -1639,7 +1673,7 @@ var tokens_default = ':host{--__P__-accent-user: __BRAND_ACCENT__;--__P__-accent
|
|
|
1639
1673
|
var reset_default = '*,*:before,*:after{box-sizing:border-box;margin:0;padding:0;border:0}button{font:inherit;color:inherit;background:none;cursor:pointer;-webkit-appearance:none;appearance:none;line-height:1}button:focus-visible,[tabindex]:focus-visible,textarea:focus-visible,input:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}textarea,input{font:inherit;color:inherit;background:none;border:0;outline:0;resize:none}a{color:var(--__P__-accent);text-decoration:underline;text-underline-offset:2px}img,svg{display:block;max-width:100%}ul,ol{list-style:none}.__P__-app{display:block;width:100%;height:100%;font-family:var(--__P__-font);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-feature-settings:"cv11","ss01","ss03"}.__P__-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n';
|
|
1640
1674
|
|
|
1641
1675
|
// src/styles/panel.css
|
|
1642
|
-
var panel_default = '.__P__-anchor{color-scheme:var(--__P__-color-scheme, light);right:16px;bottom:16px}.__P__-surface{display:contents}.__P__-surface[hidden]{display:none}:host([data-position="bottom-left"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{right:auto;left:16px}:host([data-position="top-right"]) .__P__-anchor,:host([data-position="top-left"]) .__P__-anchor{bottom:auto;top:16px}.__P__-anchor{position:fixed;display:flex;flex-direction:column;align-items:flex-end;gap:var(--__P__-space-3);pointer-events:none}.__P__-anchor{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=sm]{--__P__-fab-size: 44px}.__P__-anchor[data-launcher-size=md]{--__P__-fab-size: 56px}.__P__-anchor[data-launcher-size=lg]{--__P__-fab-size: 68px}.__P__-anchor>*{pointer-events:auto}.__P__-fab[data-size=sm]{--__P__-fab-size: 44px;font-size:var(--__P__-text-sm)}.__P__-fab[data-size=md]{--__P__-fab-size: 56px;font-size:calc(14px * var(--__P__-text-scale))}.__P__-fab[data-size=lg]{--__P__-fab-size: 68px;font-size:var(--__P__-text-base)}.__P__-fab{display:inline-flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);color:var(--__P__-accent-text);background:var(--__P__-accent);box-shadow:var(--__P__-shadow-fab);font-weight:600;line-height:1;transform-origin:bottom right;animation:__P__-fab-in var(--__P__-dur-base) var(--__P__-ease) both;transition:transform var(--__P__-dur-base) var(--__P__-ease),opacity var(--__P__-dur-base) var(--__P__-ease),box-shadow var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab:hover{transform:translateY(-2px)}.__P__-fab:active{transform:translateY(0)}.__P__-fab:focus-visible{outline:2px solid var(--__P__-on-accent);outline-offset:3px}.__P__-fab svg{width:24px;height:24px;flex-shrink:0}@keyframes __P__-fab-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}.__P__-fab[data-leaving]{position:absolute;right:0;bottom:0;animation:__P__-fab-out var(--__P__-dur-quick) var(--__P__-ease) forwards;pointer-events:none}:host([data-position^="top-"]) .__P__-fab[data-leaving]{bottom:auto;top:0}:host([data-position$="-left"]) .__P__-fab[data-leaving]{right:auto;left:0}@keyframes __P__-fab-out{0%{opacity:1;transform:none}to{opacity:0;transform:scale(.85)}}.__P__-fab[data-variant=circle]{width:var(--__P__-fab-size);height:var(--__P__-fab-size);border-radius:999px}.__P__-fab[data-variant=circle] .__P__-fab-label{display:none}.__P__-fab[data-variant=pill]{height:var(--__P__-fab-size);padding:0 18px 0 16px;border-radius:999px}.__P__-fab[data-variant=bar]{height:var(--__P__-fab-size);padding:0 22px;border-radius:var(--__P__-radius)}.__P__-fab[data-variant=minimal]{height:var(--__P__-fab-size);padding:0 var(--__P__-space-4);border-radius:999px;background:transparent;color:var(--__P__-accent);box-shadow:none;border:1px solid currentColor}.__P__-fab[data-variant=minimal]:hover{background:color-mix(in srgb,var(--__P__-accent) 12%,transparent)}.__P__-callout{--__P__-callout-fab-h: var(--__P__-fab-size, 56px);--__P__-callout-gap: clamp(12px, calc(var(--__P__-callout-fab-h) * .25), 22px);--__P__-callout-nudge-direction: -1;position:absolute;display:inline-flex;align-items:center;gap:var(--__P__-space-2);padding:10px 14px;background:var(--__P__-fg);color:var(--__P__-bg);border-radius:999px;font-size:var(--__P__-text-sm);font-weight:600;line-height:1.2;box-shadow:0 10px 30px -8px #00000059;pointer-events:auto;animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease);z-index:1;max-width:240px;white-space:nowrap}.__P__-callout[data-position=left]{right:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%)}.__P__-callout[data-position=right]{left:calc(100% + var(--__P__-callout-gap));bottom:calc(var(--__P__-callout-fab-h) / 2);transform:translateY(50%);--__P__-callout-nudge-direction: 1}.__P__-callout[data-position=top]{bottom:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-position=bottom]{top:calc(100% + var(--__P__-callout-gap));right:0;max-width:min(280px,calc(100vw - 32px))}:host([data-position$="-left"]) .__P__-callout[data-position=top],:host([data-position$="-left"]) .__P__-callout[data-position=bottom]{right:auto;left:0}.__P__-callout[data-shape=bubble]{border-radius:var(--__P__-radius-md);white-space:normal;width:max-content;max-width:min(280px,calc(100vw - 32px))}.__P__-callout[data-shape=callout]{padding:12px 18px;font-size:calc(14px * var(--__P__-text-scale));background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-callout:after{content:"";position:absolute;width:12px;height:12px;background:inherit;border-radius:2px;transform:rotate(45deg)}.__P__-callout[data-position=left]:after{right:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=right]:after{left:-5px;top:50%;margin-top:-6px}.__P__-callout[data-position=top]:after{bottom:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-position=bottom]:after{top:-5px;right:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}:host([data-position$="-left"]) .__P__-callout[data-position=top]:after,:host([data-position$="-left"]) .__P__-callout[data-position=bottom]:after{right:auto;left:calc(var(--__P__-fab-size, 56px) / 2 - 6px)}.__P__-callout[data-animated]{animation:__P__-callout-in var(--__P__-dur-slow) var(--__P__-ease),__P__-callout-nudge 1.6s var(--__P__-ease-in-out) var(--__P__-dur-slow) infinite}@keyframes __P__-callout-in{0%{opacity:0}to{opacity:1}}@keyframes __P__-callout-nudge{0%,to{margin-left:0;margin-right:0}50%{margin-left:calc(6px * var(--__P__-callout-nudge-direction));margin-right:calc(-6px * var(--__P__-callout-nudge-direction))}}@media(prefers-reduced-motion:reduce){.__P__-callout[data-animated]{animation:__P__-callout-in 1ms var(--__P__-ease)}.__P__-icon-btn[data-recording=true],.__P__-typing span{animation:none}}.__P__-callout-close{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:999px;color:inherit;opacity:.7;cursor:pointer}.__P__-callout-close:hover{opacity:1;background:color-mix(in srgb,currentColor 15%,transparent)}.__P__-callout-close:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-callout-close svg{width:12px;height:12px}.__P__-panel{width:var(--__P__-panel-w);height:var(--__P__-panel-h);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);background:var(--__P__-bg);color:var(--__P__-fg);border-radius:var(--__P__-radius-lg);box-shadow:var(--__P__-shadow-panel);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;animation:__P__-panel-in var(--__P__-dur-slow) var(--__P__-ease);border:1px solid var(--__P__-border)}@media(prefers-reduced-motion:no-preference){.__P__-panel{transition:width var(--__P__-dur-base) var(--__P__-ease),height var(--__P__-dur-base) var(--__P__-ease),max-width var(--__P__-dur-base) var(--__P__-ease),max-height var(--__P__-dur-base) var(--__P__-ease)}.__P__-panel[data-resizing]{transition:none}}:host([data-mode="open"]) .__P__-panel{width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));min-width:var(--__P__-resize-min-w, auto);min-height:var(--__P__-resize-min-h, auto);max-width:var(--__P__-resize-max-w, calc(100vw - 32px) );max-height:var(--__P__-resize-max-h, calc(100dvh - 32px) )}@keyframes __P__-panel-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}:host([data-mode="expanded"]) .__P__-panel{width:var(--__P__-expanded-w, 640px);height:var(--__P__-expanded-h, 820px);max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}:host([data-mode="fullscreen"]){z-index:var(--__P__-z-panel)!important}:host([data-mode="fullscreen"]) .__P__-anchor{inset:0;padding:0;justify-content:flex-end;align-items:flex-end}:host([data-mode="fullscreen"][data-position*="top"]) .__P__-anchor{justify-content:flex-start}:host([data-mode="fullscreen"][data-position*="left"]) .__P__-anchor{align-items:flex-start}:host([data-mode="fullscreen"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}:host([data-mode="fullscreen"]) .__P__-fab{display:none}@media(max-width:640px){:host([data-mode="open"]) .__P__-anchor,:host([data-mode="expanded"]) .__P__-anchor{inset:0;align-items:stretch;padding:0}:host([data-mode="open"]) .__P__-panel,:host([data-mode="expanded"]) .__P__-panel{width:100vw;height:100dvh;max-width:none;max-height:none;border-radius:0;border:0}}:host([data-mode="inline"]) .__P__-anchor,:host([data-mode="standalone"]) .__P__-anchor{position:static;inset:auto;padding:0;align-items:stretch;width:100%;height:100%;min-height:0}:host([data-mode="inline"]) .__P__-panel,:host([data-mode="standalone"]) .__P__-panel{width:100%;height:100%;min-width:0;min-height:0;max-width:none;max-height:none;animation:none}:host([data-mode="inline"]) .__P__-fab,:host([data-mode="standalone"]) .__P__-fab{display:none}:host([data-mode="inline"]){min-height:320px}:host([data-mode="inline"]) .__P__-panel{border-radius:var(--__P__-radius)}:host([data-mode="standalone"]) .__P__-panel{border-radius:0;border:0;box-shadow:none}:host([data-mode="modal"]){position:fixed!important;inset:0!important;z-index:var(--__P__-z-panel)!important;display:block!important;width:100vw;height:100dvh;background:var(--__P__-modal-backdrop, var(--__P__-backdrop));animation:__P__-backdrop-in var(--__P__-dur-base) var(--__P__-ease) both;--__P__-panel-w: min(960px, 92vw);--__P__-panel-h: min(720px, 88dvh)}:host([data-mode="modal"]) .__P__-anchor{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:var(--__P__-space-6);pointer-events:none}:host([data-mode="modal"]) .__P__-panel{pointer-events:auto;width:var(--__P__-widget-w, var(--__P__-panel-w));height:var(--__P__-widget-h, var(--__P__-panel-h));max-width:calc(100vw - 48px);max-height:calc(100dvh - 48px);min-width:0;min-height:0;border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-panel);animation:__P__-modal-in var(--__P__-dur-base) var(--__P__-ease);translate:var(--__P__-modal-dx, 0px) var(--__P__-modal-dy, 0px)}:host([data-mode="modal"]) .__P__-header,:host([data-mode="modal"]) .__P__-back-header,:host([data-mode="modal"]) .__P__-home-hero{cursor:grab;touch-action:none}:host([data-mode="modal"]) .__P__-panel[data-dragging]{cursor:grabbing;user-select:none}:host([data-mode="modal"]) .__P__-panel[data-dragging] *{cursor:grabbing}:host([data-mode="modal"]) .__P__-fab{display:none}@keyframes __P__-backdrop-in{0%{background:#0000}to{background:var(--__P__-modal-backdrop, var(--__P__-backdrop))}}@keyframes __P__-modal-in{0%{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}:host([data-mode="drawer"]){--__P__-panel-w: min(440px, calc(100vw - 32px) );--__P__-panel-h: 100dvh}:host([data-mode="drawer"]) .__P__-anchor{position:fixed;--__P__-inset-x: var(--__P__-panel-inset, 12px);--__P__-inset-y: var(--__P__-panel-inset, 3dvh);top:var(--__P__-inset-y);bottom:auto;right:var(--__P__-inset-x);left:auto;width:min(var(--__P__-widget-w, var(--__P__-panel-w)),calc(100vw - var(--__P__-inset-x) * 2));height:min(var(--__P__-widget-h, var(--__P__-panel-h)),calc(100dvh - var(--__P__-inset-y) * 2));padding:0;display:block;pointer-events:auto}:host([data-mode="drawer"][data-position$="-left"]) .__P__-anchor{right:auto;left:var(--__P__-inset-x)}:host([data-mode="drawer"][data-position^="bottom-"]) .__P__-anchor{top:auto;bottom:var(--__P__-inset-y)}:host([data-mode="drawer"]) .__P__-panel{width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;border-radius:var(--__P__-radius, 12px);border:1px solid var(--__P__-border);box-shadow:-8px 16px 32px -12px #00000038;animation:__P__-drawer-in var(--__P__-dur-base) var(--__P__-ease)}:host([data-mode="drawer"][data-position$="-left"]) .__P__-panel{box-shadow:8px 16px 32px -12px #00000038;animation:__P__-drawer-in-left var(--__P__-dur-base) var(--__P__-ease)}.__P__-fab[data-edge-tab]{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-2);position:fixed;top:50%;height:140px;width:auto;min-width:0;padding:10px 8px;writing-mode:vertical-rl;text-orientation:mixed;transform:translateY(-50%);transform-origin:center;animation:__P__-edge-tab-in var(--__P__-dur-base) var(--__P__-ease) both}.__P__-fab[data-edge-tab] svg{writing-mode:horizontal-tb}.__P__-fab[data-edge-tab]:hover{transform:translateY(-50%) scale(1.03)}.__P__-fab[data-edge-tab]:active{transform:translateY(-50%) scale(.97)}:host([data-position$="-right"]) .__P__-fab[data-edge-tab]{right:0;left:auto;border-radius:12px 0 0 12px;box-shadow:-6px 0 18px -8px #0000004d}:host([data-position$="-left"]) .__P__-fab[data-edge-tab]{left:0;right:auto;border-radius:0 12px 12px 0;box-shadow:6px 0 18px -8px #0000004d}.__P__-fab[data-edge-tab][data-leaving]{position:fixed;top:50%;bottom:auto;animation:__P__-edge-tab-out var(--__P__-dur-quick) var(--__P__-ease) forwards}@keyframes __P__-edge-tab-in{0%{opacity:0;transform:translateY(-50%) scale(.9)}to{opacity:1;transform:translateY(-50%) scale(1)}}@keyframes __P__-edge-tab-out{0%{opacity:1;transform:translateY(-50%) scale(1)}to{opacity:0;transform:translateY(-50%) scale(.85)}}@keyframes __P__-drawer-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes __P__-drawer-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@media(prefers-reduced-motion:reduce){:host([data-mode="drawer"]) .__P__-panel,.__P__-fab[data-edge-tab]{animation:none}}.__P__-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);background:var(--__P__-bg)}.__P__-header h1{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;flex:1;letter-spacing:-.01em}.__P__-header-actions{margin-inline-start:auto;display:flex;align-items:center;gap:var(--__P__-space-1);flex-shrink:0}.__P__-agent{flex:1;display:inline-flex;align-items:center;gap:10px;min-width:0}.__P__-agent-avatar{position:relative;width:32px;height:32px;border-radius:999px;background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:var(--__P__-text-xs);overflow:hidden;flex-shrink:0}.__P__-agent-avatar img{width:100%;height:100%;object-fit:cover}.__P__-agent-avatar:after{content:"";position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border-radius:999px;border:2px solid var(--__P__-bg);background:var(--__P__-neutral)}.__P__-agent-avatar[data-status=online]:after{background:var(--__P__-success)}.__P__-agent-avatar[data-status=away]:after{background:var(--__P__-warning)}.__P__-agent-avatar[data-status=offline]:after{background:var(--__P__-neutral)}.__P__-agent-meta{display:flex;flex-direction:column;line-height:1.15;min-width:0}.__P__-agent-meta strong{font-size:calc(14px * var(--__P__-text-scale));font-weight:600;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-agent-meta span{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-suggestions{display:flex;flex-wrap:nowrap;gap:var(--__P__-space-2);padding:6px 14px 10px;overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scroll-snap-type:x proximity;scrollbar-width:none;-ms-overflow-style:none;min-width:0}.__P__-suggestions::-webkit-scrollbar{display:none}.__P__-suggestions:before,.__P__-suggestions:after{content:"";flex:1 1 0;min-width:0}.__P__-suggestion{flex:0 0 auto;scroll-snap-align:center;padding:7px 14px;border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg);font-size:var(--__P__-text-sm);font-weight:500;white-space:nowrap;transition:background var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-suggestion:hover{border-color:var(--__P__-accent);color:var(--__P__-accent);transform:translateY(-1px)}.__P__-suggestion:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px;border-color:var(--__P__-accent)}.__P__-suggestion:active{transform:translateY(0)}.__P__-icon-btn{width:32px;height:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);transition:background var(--__P__-dur-quick) var(--__P__-ease),color var(--__P__-dur-quick) var(--__P__-ease)}.__P__-icon-btn:hover{background:var(--__P__-bg-elevated);color:var(--__P__-fg)}.__P__-icon-btn:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-icon-btn:active{background:var(--__P__-border)}.__P__-icon-btn:disabled{opacity:.45;cursor:not-allowed}.__P__-icon-btn:before{content:"";position:absolute;inset:-6px}.__P__-icon-btn{position:relative}.__P__-icon-btn svg{width:18px;height:18px}.__P__-icon-btn[data-recording=true]{color:var(--__P__-accent);background:color-mix(in srgb,var(--__P__-accent) 12%,transparent);animation:__P__-pulse 1.2s var(--__P__-ease) infinite}@keyframes __P__-pulse{0%,to{box-shadow:0 0 color-mix(in srgb,var(--__P__-accent) 40%,transparent)}50%{box-shadow:0 0 0 6px color-mix(in srgb,var(--__P__-accent) 0%,transparent)}}.__P__-list,.__P__-history,.__P__-module-scroll,.__P__-home-scroll,.__P__-help-list,.__P__-toolui-code,.__P__-sidebar-conversations{scrollbar-width:thin;scrollbar-color:var(--__P__-border-strong) transparent;overscroll-behavior:contain;scrollbar-gutter:stable}.__P__-list::-webkit-scrollbar,.__P__-history::-webkit-scrollbar,.__P__-module-scroll::-webkit-scrollbar,.__P__-home-scroll::-webkit-scrollbar,.__P__-help-list::-webkit-scrollbar,.__P__-toolui-code::-webkit-scrollbar,.__P__-sidebar-conversations::-webkit-scrollbar{width:8px}.__P__-list::-webkit-scrollbar-thumb,.__P__-history::-webkit-scrollbar-thumb,.__P__-module-scroll::-webkit-scrollbar-thumb,.__P__-home-scroll::-webkit-scrollbar-thumb,.__P__-help-list::-webkit-scrollbar-thumb,.__P__-toolui-code::-webkit-scrollbar-thumb,.__P__-sidebar-conversations::-webkit-scrollbar-thumb{background:var(--__P__-border-strong);border-radius:8px}.__P__-list-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}.__P__-jump{position:absolute;inset-inline-end:14px;bottom:14px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:999px;border:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);color:var(--__P__-fg);box-shadow:var(--__P__-shadow-panel);cursor:pointer;opacity:.85;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease);animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-jump:hover{opacity:1}.__P__-jump:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;opacity:1}.__P__-jump:active{transform:translateY(1px)}.__P__-jump svg{width:18px;height:18px}.__P__-list{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-4);padding-bottom:var(--__P__-space-8);display:flex;flex-direction:column;gap:14px}.__P__-list>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-date-divider{display:flex;justify-content:center;margin-block:var(--__P__-space-3)}.__P__-date-pill{padding:3px 10px;border-radius:999px;font-size:calc(11px * var(--__P__-text-scale));font-weight:600;color:var(--__P__-fg-muted);background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);box-shadow:var(--__P__-shadow-card)}.__P__-bubble-row{display:flex}.__P__-bubble-row[data-role=user]{justify-content:flex-end}.__P__-bubble-row[data-role=assistant]{justify-content:flex-start}.__P__-bubble{max-width:100%;min-width:0;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);line-height:1.6;font-size:calc(14px * var(--__P__-text-scale));word-wrap:break-word;overflow-wrap:break-word;box-shadow:0 1px 2px #0000000a,0 1px 8px -4px #0000000f;animation:__P__-bubble-in var(--__P__-dur-base) var(--__P__-ease)}.__P__-bubble ::selection{background:color-mix(in srgb,var(--__P__-accent) 30%,transparent)}.__P__-bubble-row[data-role=user] .__P__-bubble ::selection{background:#fff6;color:var(--__P__-bubble-user-text)}@keyframes __P__-bubble-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-bubble-row[data-role=user] .__P__-bubble{background:var(--__P__-bubble-user);color:var(--__P__-bubble-user-text);border-end-end-radius:5px}.__P__-bubble-row[data-role=assistant] .__P__-bubble{background:var(--__P__-bubble-assistant);color:var(--__P__-bubble-assistant-text);border-end-start-radius:5px}.__P__-bubble-col{display:flex;flex-direction:column;max-width:85%;min-width:0}.__P__-bubble-row[data-role=user] .__P__-bubble-col{align-items:flex-end}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col{align-items:flex-start}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui){width:100%}.__P__-bubble-row[data-role=assistant] .__P__-bubble-col:has(.__P__-toolui) .__P__-bubble{width:100%}@media(max-width:640px){.__P__-bubble-col{max-width:92%}.__P__-toolui:not(.__P__-toolui-collapsible){padding:var(--__P__-space-3);gap:var(--__P__-space-2)}details.__P__-toolui-collapsible>summary{padding:var(--__P__-space-2) var(--__P__-space-3)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-3)}.__P__-toolui-section,.__P__-toolui-desc{padding:var(--__P__-space-2) var(--__P__-space-3)}}.__P__-bubble-time{margin-top:3px;padding:0 4px;font-size:calc(11px * var(--__P__-text-scale));line-height:1;color:var(--__P__-fg-muted);user-select:none}.__P__-md>*:first-child{margin-top:0}.__P__-md>*:last-child{margin-bottom:0}.__P__-md p{margin:10px 0}.__P__-md h1,.__P__-md h2,.__P__-md h3,.__P__-md h4,.__P__-md h5,.__P__-md h6{margin:18px 0 8px;line-height:1.3;letter-spacing:-.01em;font-weight:700}.__P__-md h1{font-size:1.4em}.__P__-md h2{font-size:1.22em}.__P__-md h3{font-size:1.08em}.__P__-md h4,.__P__-md h5,.__P__-md h6{font-size:1em}.__P__-md>h1:first-child,.__P__-md>h2:first-child,.__P__-md>h3:first-child,.__P__-md>h4:first-child,.__P__-md>h5:first-child,.__P__-md>h6:first-child{margin-top:0}.__P__-md ul,.__P__-md ol{padding-inline-start:1.5em;margin:10px 0}.__P__-md ul{list-style:disc}.__P__-md ol{list-style:decimal}.__P__-md li{margin:6px 0;padding-inline-start:2px}.__P__-md li::marker{color:var(--__P__-fg-muted)}.__P__-md li>p{margin:6px 0}.__P__-md li>ul,.__P__-md li>ol{margin:6px 0}.__P__-md strong,.__P__-md b{font-weight:650;letter-spacing:-.005em}.__P__-md em,.__P__-md i{font-style:italic}.__P__-md code{font-family:var(--__P__-font-mono);font-size:.86em;padding:1px 6px;border-radius:5px;background:color-mix(in srgb,var(--__P__-accent) 10%,transparent);color:var(--__P__-fg);border:1px solid color-mix(in srgb,var(--__P__-accent) 16%,transparent)}.__P__-md pre{font-family:var(--__P__-font-mono);font-size:calc(12.5px * var(--__P__-text-scale));padding:12px 14px;border-radius:var(--__P__-radius-sm);background:#7f7f7f1f;overflow-x:auto;margin:var(--__P__-space-3) 0;line-height:1.5}.__P__-md pre code{padding:0;background:none}.__P__-md a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.__P__-md a:hover{text-decoration-thickness:2px}.__P__-md blockquote{margin:14px 0;padding:6px 14px;border-inline-start:3px solid color-mix(in srgb,var(--__P__-accent) 50%,transparent);background:color-mix(in srgb,var(--__P__-accent) 5%,transparent);border-start-end-radius:var(--__P__-radius-sm);border-end-end-radius:var(--__P__-radius-sm);color:var(--__P__-fg-muted)}.__P__-md blockquote>:first-child{margin-top:0}.__P__-md blockquote>:last-child{margin-bottom:0}.__P__-md hr{border:0;height:1px;background:color-mix(in srgb,currentColor 18%,transparent);margin:var(--__P__-space-4) 0}.__P__-md table{border-collapse:collapse;margin:var(--__P__-space-3) 0;font-size:.95em;display:block;overflow-x:auto;max-width:100%;font-variant-numeric:tabular-nums}.__P__-md th,.__P__-md td{padding:6px 10px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);text-align:start}.__P__-md th{font-weight:700;background:color-mix(in srgb,currentColor 6%,transparent)}.__P__-md h1+ul,.__P__-md h1+ol,.__P__-md h2+ul,.__P__-md h2+ol,.__P__-md h3+ul,.__P__-md h3+ol,.__P__-md h4+ul,.__P__-md h4+ol{margin-top:var(--__P__-space-1)}.__P__-loading{display:inline-flex;align-items:center;gap:var(--__P__-space-2);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-loading-spinner{width:14px;height:14px;border-radius:999px;border:2px solid currentColor;border-top-color:transparent;animation:__P__-spin .8s linear infinite}@keyframes __P__-spin{to{transform:rotate(1turn)}}.__P__-typing{display:inline-flex;gap:var(--__P__-space-1);padding:var(--__P__-space-1) 0}.__P__-typing span{width:5px;height:5px;border-radius:999px;background:currentColor;opacity:.4;animation:__P__-blink 1.2s var(--__P__-ease) infinite}.__P__-typing span:nth-child(2){animation-delay:.2s}.__P__-typing span:nth-child(3){animation-delay:.4s}@keyframes __P__-blink{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-2px)}}.__P__-reasoning{margin:var(--__P__-space-1) 0 var(--__P__-space-2);padding-inline-start:var(--__P__-space-3);border-inline-start:2px solid var(--__P__-border-strong)}.__P__-reasoning-summary{display:inline-flex;align-items:center;gap:var(--__P__-space-1);cursor:pointer;list-style:none;user-select:none;color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600}.__P__-reasoning-summary:hover{color:var(--__P__-fg)}.__P__-reasoning-summary:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px;border-radius:var(--__P__-radius-sm)}.__P__-reasoning-summary::-webkit-details-marker{display:none}.__P__-reasoning-summary:before{content:"";width:5px;height:5px;border-inline-end:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);opacity:.7;transition:transform var(--__P__-dur-quick) var(--__P__-ease)}.__P__-reasoning[open] .__P__-reasoning-summary:before{transform:rotate(45deg)}.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:__P__-reasoning-pulse 1.4s var(--__P__-ease) infinite}@keyframes __P__-reasoning-pulse{0%,to{opacity:.5}50%{opacity:1}}@media(prefers-reduced-motion:reduce){.__P__-reasoning[data-active=true] .__P__-reasoning-label{animation:none}}.__P__-reasoning-body{margin-top:var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm)}.__P__-reasoning-body>:first-child{margin-top:0}.__P__-reasoning-body>:last-child{margin-bottom:0}.__P__-source{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin-top:6px;margin-inline-end:6px;padding:var(--__P__-space-1) var(--__P__-space-2);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);text-decoration:none}a.__P__-source:hover{color:var(--__P__-fg);border-color:var(--__P__-accent)}.__P__-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-composer{border-top:1px solid var(--__P__-border);padding:10px 12px;background:var(--__P__-bg);display:flex;flex-direction:column;gap:var(--__P__-space-2)}.__P__-composer>*{width:100%;max-width:var(--__P__-conversation-max, 768px);margin-inline:auto}.__P__-composer-row{display:flex;align-items:flex-end;gap:6px}.__P__-textarea{flex:1;height:40px;max-height:160px;padding:10px 12px;border-radius:var(--__P__-radius);background:var(--__P__-bg-elevated);border:1px solid transparent;font-size:calc(14px * var(--__P__-text-scale));line-height:1.4;transition:height var(--__P__-dur-quick) var(--__P__-ease),border-color var(--__P__-dur-quick) var(--__P__-ease),box-shadow var(--__P__-dur-quick) var(--__P__-ease)}.__P__-textarea:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:1px;border-color:var(--__P__-focus)}@media(pointer:coarse){.__P__-textarea,.__P__-home-search-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}.__P__-textarea{height:44px}}.__P__-send{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;transition:opacity var(--__P__-dur-quick) var(--__P__-ease),transform var(--__P__-dur-quick) var(--__P__-ease),background var(--__P__-dur-quick) var(--__P__-ease)}.__P__-send[data-shape=circle]{border-radius:999px}.__P__-send[data-shape=square]{border-radius:var(--__P__-radius-sm)}.__P__-send[data-shape=pill]{width:auto;padding:0 18px;border-radius:999px}.__P__-send[data-variant=filled]{background:var(--__P__-accent);color:var(--__P__-accent-text)}.__P__-send[data-variant=outline]{background:transparent;color:var(--__P__-accent);border-color:var(--__P__-accent)}.__P__-send[data-variant=outline]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 10%,transparent)}.__P__-send[data-variant=ghost]{background:transparent;color:var(--__P__-accent)}.__P__-send[data-variant=ghost]:not(:disabled):hover{background:color-mix(in srgb,var(--__P__-accent) 8%,transparent)}.__P__-send:disabled{opacity:.4;cursor:not-allowed}.__P__-send:not(:disabled):hover{transform:translateY(-1px)}.__P__-send:not(:disabled):active{transform:translateY(0)}.__P__-send:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-send svg{width:18px;height:18px}.__P__-composer-actions{display:flex;gap:var(--__P__-space-1);flex-wrap:wrap}.__P__-attachments{display:flex;flex-wrap:wrap;gap:6px}.__P__-attachment-chip{display:inline-flex;align-items:center;gap:6px;padding:var(--__P__-space-1) var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-1);border-radius:999px;background:var(--__P__-bg-elevated);border:1px solid var(--__P__-border);font-size:var(--__P__-text-xs);max-width:200px}.__P__-attachment-thumb{width:24px;height:24px;border-radius:999px;object-fit:cover;background:var(--__P__-border)}.__P__-attachment-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-attachment-remove{width:18px;height:18px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted)}.__P__-attachment-remove:hover{background:var(--__P__-border);color:var(--__P__-fg)}.__P__-dropzone{position:absolute;inset:8px;border:2px dashed var(--__P__-accent);border-radius:var(--__P__-radius);background:color-mix(in srgb,var(--__P__-accent) 8%,transparent);display:flex;align-items:center;justify-content:center;font-weight:600;color:var(--__P__-accent);pointer-events:none;z-index:10;animation:__P__-fade-in var(--__P__-dur-quick) var(--__P__-ease)}@keyframes __P__-fade-in{0%{opacity:0}to{opacity:1}}.__P__-error{margin-top:var(--__P__-space-1);padding:8px 12px;border-radius:var(--__P__-radius-sm);background:color-mix(in oklab,var(--__P__-danger) 8%,var(--__P__-bg-elevated));border:1px solid color-mix(in oklab,var(--__P__-danger) 20%,transparent);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);display:flex;align-items:center;gap:var(--__P__-space-2)}.__P__-error span{min-width:0}.__P__-error button{margin-inline-start:auto;flex-shrink:0;border:0;background:none;padding:0;color:var(--__P__-accent);font:inherit;font-size:var(--__P__-text-sm);font-weight:600;text-decoration:underline;white-space:nowrap;cursor:pointer}.__P__-history{flex:1;overflow-y:auto;padding:var(--__P__-space-2) var(--__P__-space-1) var(--__P__-space-3)}.__P__-history-footer{flex:none;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);border-top:1px solid var(--__P__-border);background:var(--__P__-surface)}.__P__-history-new{width:100%;display:flex;align-items:center;justify-content:center;gap:var(--__P__-space-2);padding:var(--__P__-space-2) var(--__P__-space-3);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-on-accent);cursor:pointer;font-size:var(--__P__-text-sm);font-weight:600;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-history-new svg{width:16px;height:16px}.__P__-history-new:hover{filter:brightness(1.08)}.__P__-history-new:active{transform:translateY(1px)}.__P__-history-new:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-history-empty{flex:1;display:flex;align-items:center;justify-content:center;padding:40px 16px;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));text-align:center}.__P__-history-group{display:flex;flex-direction:column;padding:0 var(--__P__-space-3)}.__P__-history-heading{font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted);padding:14px 4px 8px;text-transform:uppercase;letter-spacing:.04em}.__P__-history-card{display:flex;flex-direction:column;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);overflow:hidden}.__P__-history-item{all:unset;display:flex;align-items:center;gap:var(--__P__-space-3);padding:12px var(--__P__-space-3);cursor:pointer;transition:background var(--__P__-dur-base) var(--__P__-ease)}.__P__-history-item+.__P__-history-item{border-top:1px solid var(--__P__-border)}.__P__-history-item:hover{background:var(--__P__-bg-elevated)}.__P__-history-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-history-avatar{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:color-mix(in oklab,var(--__P__-accent) 12%,transparent);color:var(--__P__-accent)}.__P__-history-avatar svg{width:18px;height:18px}.__P__-history-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.__P__-history-row{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-2)}.__P__-history-title{flex:1;min-width:0;font-size:calc(14px * var(--__P__-text-scale));font-weight:500;color:var(--__P__-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-time{flex:none;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-history-preview{flex:1;min-width:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-history-dot{flex:none;width:8px;height:8px;border-radius:50%;background:var(--__P__-accent)}.__P__-history-item[data-unread=true] .__P__-history-title{font-weight:600}.__P__-history-item[data-closed=true] .__P__-history-title{color:var(--__P__-fg-muted)}.__P__-history-item-skeleton{cursor:default;pointer-events:none}.__P__-skeleton{display:block;border-radius:4px;background:linear-gradient(90deg,color-mix(in oklab,var(--__P__-fg) 9%,transparent) 30%,color-mix(in oklab,var(--__P__-fg) 17%,transparent),color-mix(in oklab,var(--__P__-fg) 9%,transparent) 70%);background-size:200% 100%;animation:__P__-skeleton-shimmer 1.8s ease-in-out infinite}.__P__-history-avatar.__P__-skeleton{border-radius:50%}.__P__-skeleton-heading{width:52px;height:8px}.__P__-skeleton-title{width:55%;height:12px}.__P__-skeleton-time{width:34px;height:10px}.__P__-skeleton-preview{width:80%;height:10px}@keyframes __P__-skeleton-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media(prefers-reduced-motion:reduce){.__P__-skeleton{animation:none}}.__P__-list-loading{margin:auto;padding:var(--__P__-space-6) var(--__P__-space-4);color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);text-align:center}.__P__-readonly-banner{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 12px;margin:0 var(--__P__-space-3) var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated);color:var(--__P__-fg-muted);text-align:center;font-size:var(--__P__-text-sm)}.__P__-readonly-label{line-height:1.4}.__P__-readonly-cta{appearance:none;border:0;cursor:pointer;padding:var(--__P__-space-2) var(--__P__-space-4);border-radius:999px;background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-readonly-cta:hover,.__P__-readonly-cta:focus-visible{filter:brightness(1.1)}.__P__-readonly-cta:focus-visible{outline:2px solid var(--__P__-accent);outline-offset:2px}.__P__-composer-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 16px;margin:0 var(--__P__-space-3);border-top:1px solid var(--__P__-border);text-align:center;font-size:calc(11px * var(--__P__-text-scale));line-height:1.4;color:var(--__P__-fg-muted)}.__P__-disclaimer{max-width:320px;margin:0 auto;opacity:.9;letter-spacing:.01em}.__P__-poweredby{display:inline-flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;opacity:.7;transition:opacity var(--__P__-dur-base) var(--__P__-ease);font-size:calc(11px * var(--__P__-text-scale));letter-spacing:.02em}.__P__-poweredby:hover{opacity:1}.__P__-poweredby-logo{height:12px;width:auto;display:inline-block;vertical-align:middle}.__P__-poweredby-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:6px 16px;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated)}.__P__-menu-wrap{position:relative;display:inline-flex}.__P__-menu{position:absolute;top:100%;inset-inline-end:0;margin-top:6px;min-width:200px;padding:6px;background:var(--__P__-bg);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);box-shadow:var(--__P__-shadow-panel);z-index:10;display:flex;flex-direction:column;gap:2px;animation:__P__-menu-in var(--__P__-dur-base) var(--__P__-ease)}@media(prefers-reduced-motion:reduce){.__P__-menu{animation:none}}@keyframes __P__-menu-in{0%{opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top right}to{opacity:1;transform:none}}.__P__-menu-item{all:unset;display:flex;align-items:center;gap:10px;padding:8px 10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);border-radius:var(--__P__-radius-sm);cursor:pointer;user-select:none}.__P__-menu-item:hover{background:var(--__P__-bg-elevated)}.__P__-menu-item:focus-visible{background:var(--__P__-bg-elevated);outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-menu-item[disabled]{opacity:.45;cursor:not-allowed}.__P__-menu-icon{display:inline-flex;width:16px;height:16px;color:var(--__P__-fg-muted)}.__P__-menu-icon svg{width:16px;height:16px}.__P__-menu-label{flex:1}.__P__-menu-check{display:inline-flex;color:var(--__P__-accent)}.__P__-menu-check svg{width:14px;height:14px}.__P__-menu-item-segmented{cursor:default}.__P__-menu-item-segmented:hover{background:transparent}.__P__-segmented{display:inline-flex;gap:2px;padding:2px;background:var(--__P__-bg-elevated);border-radius:var(--__P__-radius-sm)}.__P__-segment{all:unset;min-width:26px;padding:3px 8px;font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.02em;text-align:center;color:var(--__P__-fg-muted);border-radius:calc(var(--__P__-radius-sm) - 2px);cursor:pointer;transition:color .12s ease,background .12s ease}.__P__-segment:hover{color:var(--__P__-fg)}.__P__-segment[data-on=true]{background:var(--__P__-bg);color:var(--__P__-accent);box-shadow:var(--__P__-shadow-card)}.__P__-segment:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-resize-grip{position:absolute;width:18px;height:18px;display:flex;align-items:center;justify-content:center;color:var(--__P__-fg-muted);opacity:.45;transition:opacity var(--__P__-dur-base) var(--__P__-ease);z-index:2;touch-action:none;user-select:none}.__P__-resize-grip:hover,.__P__-resize-grip:focus-visible{opacity:1}.__P__-resize-grip svg{width:10px;height:10px}.__P__-resize-grip--bottom-left{bottom:2px;left:2px;cursor:nesw-resize;transform:scaleX(-1)}.__P__-resize-grip--bottom-right{bottom:2px;right:2px;cursor:nwse-resize}.__P__-resize-grip--top-left{top:2px;left:2px;cursor:nwse-resize;transform:rotate(180deg)}.__P__-resize-grip--top-right{top:2px;right:2px;cursor:nesw-resize;transform:scaleY(-1)}:host(:not([data-mode="open"])) .__P__-resize-grip{display:none}.__P__-messenger{display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-body,.__P__-messenger-pane{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.__P__-messenger-pane[hidden]{display:none}@keyframes __P__-view-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.__P__-module{display:flex;flex-direction:column;height:100%;min-height:0}@media(prefers-reduced-motion:no-preference){.__P__-module,.__P__-history{animation:__P__-view-in .18s var(--__P__-ease-out)}}.__P__-module-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--__P__-space-3);display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-home{container-type:inline-size;background:radial-gradient(125% 65% at 88% 0%,color-mix(in srgb,#fff 16%,transparent),transparent 55%),linear-gradient(180deg,var(--__P__-accent) 0%,var(--__P__-accent) 22%,color-mix(in srgb,var(--__P__-accent) 28%,var(--__P__-surface)) 44%,var(--__P__-surface) 70%);border-radius:var(--__P__-radius-lg) var(--__P__-radius-lg) 0 0}.__P__-home-scroll{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;background:transparent}.__P__-home-cards{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:4px 14px 16px}.__P__-module-pad{padding:var(--__P__-space-3) var(--__P__-space-3) 0}.__P__-module-empty{display:flex;flex-direction:column;align-items:center;gap:var(--__P__-space-3);padding:var(--__P__-space-8) var(--__P__-space-4);text-align:center;color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-module-retry{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border-strong);border-radius:var(--__P__-radius-sm);color:var(--__P__-fg);font-weight:600;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-module-retry:hover{background:var(--__P__-hover);border-color:var(--__P__-accent)}.__P__-module-retry:active{background:var(--__P__-border)}.__P__-module-retry:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-help-list{flex:1;min-height:0;overflow-y:auto;padding-bottom:var(--__P__-space-3)}.__P__-help-group{display:flex;flex-direction:column}.__P__-help-section-title{position:sticky;top:0;z-index:1;margin:0;padding:var(--__P__-space-3) var(--__P__-space-5) var(--__P__-space-2);font-size:var(--__P__-text-xs);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--__P__-fg-muted);background:var(--__P__-bg)}.__P__-help-card{margin:0 var(--__P__-space-3) var(--__P__-space-3);background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden}.__P__-help-card .__P__-list-row{border-bottom:0;border-radius:0}.__P__-help-card .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-tabbar{display:flex;border-top:1px solid var(--__P__-border);background:var(--__P__-bg-elevated);flex-shrink:0}.__P__-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--__P__-space-1);min-height:48px;padding:var(--__P__-space-2) var(--__P__-space-1);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;transition:color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-tab:hover{color:var(--__P__-fg)}.__P__-tab[aria-selected=true]{color:var(--__P__-accent)}.__P__-tab:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-tab:active{background:var(--__P__-hover)}.__P__-tab-icon{position:relative;display:inline-flex}.__P__-tab-icon svg{width:22px;height:22px}.__P__-tab-badge{position:absolute;top:-4px;left:calc(50% + 6px);min-width:16px;height:16px;padding:0 4px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--__P__-accent);color:var(--__P__-on-accent);font-size:calc(10px * var(--__P__-text-scale));font-weight:600;line-height:1}.__P__-home-hero{flex-shrink:0;padding:var(--__P__-space-5) var(--__P__-space-5) var(--__P__-space-3);color:var(--__P__-on-accent);--__P__-focus: var(--__P__-on-accent)}.__P__-home-hero-top{display:flex;align-items:center;justify-content:space-between;gap:var(--__P__-space-3);min-height:32px}.__P__-home-brand{font-size:clamp(calc(12px * var(--__P__-text-scale)),calc(3.2cqi * var(--__P__-text-scale)),calc(14px * var(--__P__-text-scale)));font-weight:600;letter-spacing:.01em;color:color-mix(in srgb,#fff 82%,transparent);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.__P__-home-brand-spacer{flex:1}.__P__-home-hero-actions{display:flex;align-items:center;gap:var(--__P__-space-2);flex-shrink:0}.__P__-home-hero-actions .__P__-icon-btn{color:#fff}.__P__-home-hero-actions .__P__-icon-btn:hover{background:color-mix(in srgb,#fff 18%,transparent);color:#fff}.__P__-home-hero-actions .__P__-icon-btn:active{background:color-mix(in srgb,#fff 26%,transparent)}.__P__-home-greeting{margin:28px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(19px * var(--__P__-text-scale)),calc(5.5cqi * var(--__P__-text-scale)),var(--__P__-text-2xl));font-weight:800;line-height:1.18;letter-spacing:-.01em;overflow-wrap:anywhere}.__P__-home-lead{margin:10px 0 0;font-family:var(--__P__-font-display);font-size:clamp(calc(15px * var(--__P__-text-scale)),calc(4.2cqi * var(--__P__-text-scale)),var(--__P__-text-xl));font-weight:600;line-height:1.25;letter-spacing:-.005em;color:color-mix(in srgb,var(--__P__-on-accent) 78%,transparent);overflow-wrap:anywhere}.__P__-home-avatars{display:flex}.__P__-home-avatar{width:30px;height:30px;border-radius:999px;overflow:hidden;margin-inline-start:-10px;border:2px solid color-mix(in srgb,#fff 92%,transparent);box-shadow:0 1px 3px #0000002e;background:var(--__P__-surface);display:inline-flex;align-items:center;justify-content:center;font-size:var(--__P__-text-xs);font-weight:700;color:var(--__P__-fg)}.__P__-home-avatar:first-child{margin-inline-start:0}.__P__-home-avatar img{width:100%;height:100%;object-fit:cover}.__P__-home-content{background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);box-shadow:var(--__P__-shadow-card);overflow:hidden}.__P__-home-content-title{padding:var(--__P__-space-4) var(--__P__-space-4) var(--__P__-space-3);font-size:var(--__P__-text-sm);font-weight:700}.__P__-home-content-list{display:flex;flex-direction:column;padding:0 var(--__P__-space-2) var(--__P__-space-2)}.__P__-home-content-list .__P__-list-row+.__P__-list-row{border-top:1px solid var(--__P__-border)}.__P__-home-card{display:block;width:100%;text-align:start;background:var(--__P__-surface);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);padding:var(--__P__-space-4);box-shadow:var(--__P__-shadow-card)}.__P__-home-card[data-interactive=true]{cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-home-card[data-interactive=true]:hover{background:var(--__P__-bg-elevated)}.__P__-home-card[data-interactive=true]:active{transform:translateY(1px)}.__P__-home-card[data-interactive=true]:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-recent-row{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-recent-avatar{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;border-radius:999px;background:color-mix(in oklch,var(--__P__-accent) 14%,transparent);color:var(--__P__-accent)}.__P__-home-recent-avatar svg{width:20px;height:20px}.__P__-home-recent-body{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}.__P__-home-recent-title{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-recent-preview{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.__P__-home-recent-dot{width:8px;height:8px;border-radius:999px;background:var(--__P__-accent);flex-shrink:0}.__P__-home-recent-row[data-unread=true] .__P__-home-recent-title{font-weight:700}.__P__-home-status{display:flex;align-items:center;gap:var(--__P__-space-3)}.__P__-home-status-icon svg{width:22px;height:22px;color:var(--__P__-success)}.__P__-home-status[data-level=degraded] .__P__-home-status-icon svg{color:var(--__P__-warning)}.__P__-home-status[data-level=down] .__P__-home-status-icon svg{color:var(--__P__-danger)}.__P__-home-status-text{font-weight:600;font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search{display:flex;align-items:center;gap:var(--__P__-space-2);width:100%;padding:var(--__P__-space-3) var(--__P__-space-4);border-radius:var(--__P__-radius);border:1px solid var(--__P__-border);background:var(--__P__-surface);text-align:start}.__P__-home-search[data-input=true]{background:var(--__P__-bg-elevated)}.__P__-home-search:hover{border-color:var(--__P__-border-strong)}.__P__-home-search:focus-visible,.__P__-home-search:focus-within{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-home-search-text{flex:1;color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale))}.__P__-home-search-input{flex:1;border:0;background:transparent;font-size:calc(14px * var(--__P__-text-scale));color:var(--__P__-fg);outline:none}.__P__-home-search-icon svg{width:18px;height:18px;color:var(--__P__-accent)}.__P__-list-row{display:flex;align-items:center;gap:var(--__P__-space-3);width:100%;min-height:44px;text-align:start;padding:var(--__P__-space-3) var(--__P__-space-2);border-radius:var(--__P__-radius-sm)}.__P__-list-row:hover{background:var(--__P__-hover)}.__P__-list-row:active{background:var(--__P__-border)}.__P__-list-row:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:-2px}.__P__-list-row-body{display:flex;flex-direction:column;min-width:0;flex:1}.__P__-list-row-title{font-weight:600;font-size:var(--__P__-text-md);line-height:1.35}.__P__-list-row-sub{color:var(--__P__-fg-muted);font-size:var(--__P__-text-sm);margin-top:var(--__P__-space-1);line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-list-row-chevron svg{width:18px;height:18px;color:var(--__P__-accent);flex-shrink:0}.__P__-back-header{display:flex;align-items:center;gap:var(--__P__-space-2);padding:10px 12px;border-bottom:1px solid var(--__P__-border);flex-shrink:0}.__P__-back-title{flex:1;text-align:center;font-size:var(--__P__-text-md);font-weight:700;margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.__P__-back-spacer{width:32px;height:1px}.__P__-content{display:flex;flex-direction:column;gap:14px;width:100%;max-width:68ch;margin:0 auto}.__P__-content-hero{width:100%;border-radius:var(--__P__-radius)}.__P__-content-subtitle{color:var(--__P__-fg-muted);margin:0}.__P__-content-frame{flex:1;min-height:0;width:100%;border:0;background:#fff}.__P__-news-list{display:flex;flex-direction:column;gap:var(--__P__-space-3)}.__P__-news-card{display:block;width:100%;text-align:start;border:1px solid var(--__P__-border);border-radius:var(--__P__-radius);overflow:hidden;background:var(--__P__-surface)}.__P__-news-card{transition:background var(--__P__-dur-quick) var(--__P__-ease-out),transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-news-card:hover{background:var(--__P__-bg-elevated)}.__P__-news-card:active{transform:translateY(1px)}.__P__-news-card:focus-visible{outline:2px solid var(--__P__-focus);outline-offset:2px}.__P__-news-hero{width:100%;display:block}.__P__-news-body{display:flex;flex-direction:column;gap:6px;padding:14px 16px}.__P__-news-title{font-weight:700;font-size:var(--__P__-text-md)}.__P__-news-summary{color:var(--__P__-fg-muted);font-size:calc(14px * var(--__P__-text-scale));display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.__P__-modules-empty{display:flex;align-items:center;justify-content:center;position:relative}.__P__-modules-empty-close{position:absolute;top:12px;inset-inline-end:12px}.__P__-modules-empty-text{color:var(--__P__-fg-muted);font-size:var(--__P__-text-base)}.__P__-form{display:flex;flex-direction:column;gap:var(--__P__-space-4)}.__P__-field{display:flex;flex-direction:column;gap:6px}.__P__-field-label{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-field-req{color:var(--__P__-danger)}.__P__-field-input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);color:var(--__P__-fg);font:inherit;font-size:var(--__P__-text-sm);resize:vertical;transition:border-color var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-field-input:focus-visible{outline:none;border-color:var(--__P__-accent)}.__P__-field[data-invalid=true] .__P__-field-input{border-color:var(--__P__-danger)}.__P__-field-input[type=date],.__P__-field-input[type=time]{appearance:none;-webkit-appearance:none}@media(pointer:coarse){.__P__-field-input{font-size:max(16px,calc(16px * var(--__P__-text-scale)))}}.__P__-field-hint{font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-field-error{font-size:var(--__P__-text-xs);color:var(--__P__-danger)}.__P__-field-choices{display:flex;flex-direction:column;gap:10px;padding-top:2px}.__P__-choice{display:flex;align-items:flex-start;gap:10px;font-size:var(--__P__-text-sm);color:var(--__P__-fg);cursor:pointer}.__P__-choice input{margin-top:2px;accent-color:var(--__P__-accent)}.__P__-form-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}.__P__-form-hint{flex:1 1 auto;min-width:6rem;margin-inline-end:auto;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted)}.__P__-form-submit{padding:var(--__P__-space-2) var(--__P__-space-4);border:none;border-radius:var(--__P__-radius-md);background:var(--__P__-accent);color:var(--__P__-accent-text, #fff);font:inherit;font-weight:600;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:filter var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-submit:hover:not(:disabled){filter:brightness(1.06)}.__P__-form-submit:disabled{opacity:.6;cursor:default}.__P__-form-skip{padding:var(--__P__-space-2) var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:transparent;color:var(--__P__-fg-muted);font:inherit;font-size:var(--__P__-text-sm);white-space:nowrap;flex-shrink:0;cursor:pointer;transition:background var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-form-skip:hover:not(:disabled){background:var(--__P__-bg-elevated)}@media(max-width:640px){.__P__-form-hint{flex-basis:100%;margin-inline-end:0;font-size:var(--__P__-text-xs)}.__P__-form-submit,.__P__-form-skip{flex:1 1 0;text-align:center}}.__P__-form-gate{display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg-elevated)}.__P__-form-gate-title{margin:0;font-size:var(--__P__-text-base);font-weight:700;color:var(--__P__-fg)}.__P__-form-gate-desc{margin:0 0 var(--__P__-space-1);font-size:var(--__P__-text-sm);color:var(--__P__-fg-muted)}.__P__-form-done{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 12px;border:1px dashed var(--__P__-border);border-radius:999px;align-self:center;font-size:var(--__P__-text-xs);font-weight:600;color:var(--__P__-fg-muted)}.__P__-form-done svg{width:14px;height:14px;color:var(--__P__-success, #22c55e)}.__P__-form-done[data-outcome=skipped] svg{color:var(--__P__-fg-muted)}.__P__-form-done-fill{border:0;background:none;padding:0 2px;cursor:pointer;font:inherit;font-weight:600;color:var(--__P__-accent)}.__P__-form-done-fill:hover{text-decoration:underline}details.__P__-form-done{display:block;padding:0;border-radius:var(--__P__-radius-md)}details[open].__P__-form-done{width:min(100%,420px);background:var(--__P__-surface)}.__P__-form-done-summary{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;cursor:pointer;list-style:none}.__P__-form-done-summary::-webkit-details-marker{display:none}.__P__-form-done-summary>svg:last-child{color:var(--__P__-fg-muted);transition:transform .15s var(--__P__-ease)}details[open]>.__P__-form-done-summary>svg:last-child{transform:rotate(90deg)}.__P__-form-answers{margin:0;padding:var(--__P__-space-2) var(--__P__-space-3) var(--__P__-space-3);display:grid;gap:var(--__P__-space-3);text-align:start}.__P__-form-answer{display:grid;gap:6px}.__P__-form-answer dt{font-size:var(--__P__-text-sm);font-weight:600;color:var(--__P__-fg)}.__P__-form-answer dd{margin:0;padding:10px var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);font-size:var(--__P__-text-sm);font-weight:400;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui{margin-block:var(--__P__-space-3);border:1px solid var(--__P__-border);border-radius:var(--__P__-radius-lg, 14px);background:var(--__P__-bg-elevated);font-size:var(--__P__-text-sm)}.__P__-toolui:not(.__P__-toolui-collapsible){display:flex;flex-direction:column;gap:var(--__P__-space-3);padding:var(--__P__-space-4)}.__P__-toolui-group{display:flex;flex-direction:column;gap:var(--__P__-space-3);margin-block:var(--__P__-space-3)}.__P__-toolui-group>.__P__-toolui{margin-block:0}.__P__-toolui-stale{opacity:.7}details.__P__-toolui-collapsible>summary{display:flex;align-items:center;gap:var(--__P__-space-2);padding:var(--__P__-space-3) var(--__P__-space-4);cursor:pointer;list-style:none}details.__P__-toolui-collapsible>summary::-webkit-details-marker{display:none}details.__P__-toolui-collapsible[open]>summary{border-bottom:1px solid var(--__P__-border)}details.__P__-toolui-collapsible>.__P__-toolui-section{margin:var(--__P__-space-4)}details.__P__-toolui-collapsible>.__P__-toolui-section~.__P__-toolui-section{margin-top:calc(-1 * var(--__P__-space-2))}.__P__-toolui-wrench{display:inline-flex;color:var(--__P__-fg-muted)}.__P__-toolui-wrench svg{width:15px;height:15px}.__P__-toolui-title{font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-chevron{display:inline-flex;margin-inline-start:auto;color:var(--__P__-fg-muted);transition:transform var(--__P__-dur-quick) var(--__P__-ease-out)}.__P__-toolui-chevron svg{width:16px;height:16px}details.__P__-toolui-collapsible[open]>summary .__P__-toolui-chevron{transform:rotate(180deg)}.__P__-toolui-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:999px;border:1px solid var(--__P__-border-strong);background:var(--__P__-bg);color:var(--__P__-fg-muted);font-size:var(--__P__-text-xs);font-weight:600;white-space:nowrap}.__P__-toolui-badge-accent{border-color:color-mix(in oklab,var(--__P__-warning, #f59e0b) 55%,transparent);background:color-mix(in oklab,var(--__P__-warning, #f59e0b) 12%,transparent);color:var(--__P__-warning, #f59e0b)}.__P__-toolui-badge-muted{border-color:color-mix(in oklab,var(--__P__-fg-muted) 50%,transparent);background:color-mix(in oklab,var(--__P__-fg-muted) 14%,transparent);color:var(--__P__-fg)}.__P__-toolui-status-icon{display:inline-flex}.__P__-toolui-status-icon svg{width:14px;height:14px}.__P__-toolui-status[data-status=awaiting] .__P__-toolui-status-icon{color:var(--__P__-warning, #f59e0b)}.__P__-toolui-status[data-status=responded] .__P__-toolui-status-icon{color:var(--__P__-accent)}.__P__-toolui-status[data-status=completed] .__P__-toolui-status-icon{color:var(--__P__-success, #16a34a)}.__P__-toolui-status[data-status=denied] .__P__-toolui-status-icon{color:#ea580c}.__P__-toolui-status[data-status=error] .__P__-toolui-status-icon{color:var(--__P__-danger, #dc2626)}.__P__-toolui-head{display:flex;align-items:center;flex-wrap:wrap;gap:var(--__P__-space-2)}.__P__-toolui-desc{margin:0;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-section{display:flex;flex-direction:column;gap:8px;padding:var(--__P__-space-3);border-radius:var(--__P__-radius-md);background:var(--__P__-bg);border:1px solid var(--__P__-border)}.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-section,.__P__-toolui:not(.__P__-toolui-collapsible) .__P__-toolui-desc{padding:0;background:none;border:0;border-radius:0}.__P__-toolui-label{font-size:var(--__P__-text-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--__P__-fg-muted)}.__P__-toolui-text{margin:0;font-size:var(--__P__-text-base);font-weight:600;color:var(--__P__-fg);line-height:1.55;overflow-wrap:anywhere}.__P__-toolui-code{margin:0;max-height:240px;overflow:auto;color:var(--__P__-fg);font-family:var(--__P__-font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);font-size:var(--__P__-text-xs);line-height:1.5;white-space:pre-wrap;word-break:break-word}.__P__-toolui-code[data-error=true]{color:var(--__P__-danger, #dc2626)}.__P__-toolui-body{gap:6px}.__P__-toolui-prompt{margin:0;font-weight:600;color:var(--__P__-fg);overflow-wrap:anywhere}.__P__-toolui-subtle{margin:0;font-size:var(--__P__-text-xs);color:var(--__P__-fg-muted);line-height:1.5}.__P__-toolui-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--__P__-space-2);margin-top:var(--__P__-space-2)}:host([dir="rtl"]) .__P__-icon-dir{transform:scaleX(-1)}:host([dir="rtl"]) .__P__-field-input[type=date],:host([dir="rtl"]) .__P__-field-input[type=time]{position:relative;text-align:right;padding-left:34px}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-datetime-edit,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-datetime-edit{text-align:right}:host([dir="rtl"]) .__P__-field-input[type=date]::-webkit-calendar-picker-indicator,:host([dir="rtl"]) .__P__-field-input[type=time]::-webkit-calendar-picker-indicator{position:absolute;left:var(--__P__-space-3);margin:0}\n';
|
|
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__-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';
|
|
1643
1677
|
|
|
1644
1678
|
// src/styles/standalone.css
|
|
1645
1679
|
var standalone_default = ".__P__-standalone-page{margin:0;height:100vh;background:var(--__P__-bg, #fff);display:grid;place-items:stretch}\n";
|
|
@@ -1727,22 +1761,22 @@ function attachAdoptedSheet(shadow, doc) {
|
|
|
1727
1761
|
}
|
|
1728
1762
|
}
|
|
1729
1763
|
function applyThemeOverrides(host, overrides) {
|
|
1730
|
-
const
|
|
1731
|
-
if (overrides.accent) host.style.setProperty(`--${
|
|
1732
|
-
if (overrides.accentText) host.style.setProperty(`--${
|
|
1733
|
-
if (overrides.radius) host.style.setProperty(`--${
|
|
1734
|
-
if (overrides.fontFamily) host.style.setProperty(`--${
|
|
1764
|
+
const p36 = BRAND.cssPrefix;
|
|
1765
|
+
if (overrides.accent) host.style.setProperty(`--${p36}-accent-user`, overrides.accent);
|
|
1766
|
+
if (overrides.accentText) host.style.setProperty(`--${p36}-accent-text-user`, overrides.accentText);
|
|
1767
|
+
if (overrides.radius) host.style.setProperty(`--${p36}-radius`, overrides.radius);
|
|
1768
|
+
if (overrides.fontFamily) host.style.setProperty(`--${p36}-font`, overrides.fontFamily);
|
|
1735
1769
|
}
|
|
1736
1770
|
function applyThemeMode(host, mode) {
|
|
1737
1771
|
host.dataset.theme = mode;
|
|
1738
1772
|
}
|
|
1739
1773
|
function applySize(host, size) {
|
|
1740
|
-
const
|
|
1741
|
-
if (size.width !== void 0) host.style.setProperty(`--${
|
|
1742
|
-
if (size.height !== void 0) host.style.setProperty(`--${
|
|
1743
|
-
if (size.expanded?.width !== void 0) host.style.setProperty(`--${
|
|
1744
|
-
if (size.expanded?.height !== void 0) host.style.setProperty(`--${
|
|
1745
|
-
if (size.inset !== void 0) host.style.setProperty(`--${
|
|
1774
|
+
const p36 = BRAND.cssPrefix;
|
|
1775
|
+
if (size.width !== void 0) host.style.setProperty(`--${p36}-panel-w`, size.width);
|
|
1776
|
+
if (size.height !== void 0) host.style.setProperty(`--${p36}-panel-h`, size.height);
|
|
1777
|
+
if (size.expanded?.width !== void 0) host.style.setProperty(`--${p36}-expanded-w`, size.expanded.width);
|
|
1778
|
+
if (size.expanded?.height !== void 0) host.style.setProperty(`--${p36}-expanded-h`, size.expanded.height);
|
|
1779
|
+
if (size.inset !== void 0) host.style.setProperty(`--${p36}-panel-inset`, size.inset);
|
|
1746
1780
|
}
|
|
1747
1781
|
function applyPosition(host, pos) {
|
|
1748
1782
|
host.dataset.position = pos;
|
|
@@ -1857,7 +1891,7 @@ var EventBus = class {
|
|
|
1857
1891
|
import { h, render as renderPreact } from "preact";
|
|
1858
1892
|
|
|
1859
1893
|
// src/ui/app.tsx
|
|
1860
|
-
import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as
|
|
1894
|
+
import { useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect3, useMemo as useMemo3, useRef as useRef9, useState as useState15 } from "preact/hooks";
|
|
1861
1895
|
import { batch, useComputed as useComputed9, useSignal } from "@preact/signals";
|
|
1862
1896
|
|
|
1863
1897
|
// src/core/handshake-shape.ts
|
|
@@ -2006,11 +2040,11 @@ function toBase64Url(json) {
|
|
|
2006
2040
|
var nonEmpty = (ctx) => ctx && Object.keys(ctx).length > 0 ? ctx : void 0;
|
|
2007
2041
|
function encodeContext(user, page) {
|
|
2008
2042
|
const u = nonEmpty(user);
|
|
2009
|
-
const
|
|
2010
|
-
if (!u && !
|
|
2043
|
+
const p36 = nonEmpty(page);
|
|
2044
|
+
if (!u && !p36) return void 0;
|
|
2011
2045
|
const envelope = {};
|
|
2012
2046
|
if (u) envelope.user = u;
|
|
2013
|
-
if (
|
|
2047
|
+
if (p36) envelope.page = p36;
|
|
2014
2048
|
return toBase64Url(JSON.stringify(envelope));
|
|
2015
2049
|
}
|
|
2016
2050
|
|
|
@@ -2054,11 +2088,20 @@ var DEFAULT_PATHS = {
|
|
|
2054
2088
|
updateSettings: "/pai/update-settings",
|
|
2055
2089
|
/**
|
|
2056
2090
|
* Mark a conversation read. POST `{ visitorId, conversationId }` → the server
|
|
2057
|
-
* records `lastReadAt = now` for that (visitor, conversation)
|
|
2058
|
-
* `
|
|
2059
|
-
*
|
|
2091
|
+
* records `lastReadAt = now` for that (visitor, conversation), which clears its
|
|
2092
|
+
* `hasUnread` (returned on `/list-conversations`). Fire-and-forget on the
|
|
2093
|
+
* client; a failure just leaves the dot until the next sync.
|
|
2060
2094
|
*/
|
|
2061
2095
|
markRead: "/pai/mark-read",
|
|
2096
|
+
/**
|
|
2097
|
+
* Record 👍/👎 feedback on an assistant message. POST `{ visitorId,
|
|
2098
|
+
* conversationId, messageId, set: { feedback } }` (`feedback`: `"up"` / `"down"`
|
|
2099
|
+
* / `null` to clear) → the server stores the signal on that message (mirrors the
|
|
2100
|
+
* authenticated `conversation/message/update` `set` shape). Fire-and-forget on
|
|
2101
|
+
* the client; a 404 (backend without the endpoint) is ignored — the UI still
|
|
2102
|
+
* reflects the choice locally and emits the `messageFeedback` event.
|
|
2103
|
+
*/
|
|
2104
|
+
messageFeedback: "/pai/message-feedback",
|
|
2062
2105
|
// ── Data API (module-help-ai-data-api, via `dataApiBaseUrl`) ─────────
|
|
2063
2106
|
/**
|
|
2064
2107
|
* The data module's one ACTIVATION read. `GET
|
|
@@ -2110,8 +2153,8 @@ function buildSendMessageRequest(params) {
|
|
|
2110
2153
|
if (tools?.length) body.data = { tools };
|
|
2111
2154
|
return body;
|
|
2112
2155
|
}
|
|
2113
|
-
function isResolvedToolPart(
|
|
2114
|
-
return
|
|
2156
|
+
function isResolvedToolPart(p36) {
|
|
2157
|
+
return p36.state === "output-available" || p36.state === "output-error" || p36.state === "output-denied" || p36.approval?.approved !== void 0;
|
|
2115
2158
|
}
|
|
2116
2159
|
function normalizeToolRef(ref) {
|
|
2117
2160
|
if (typeof ref === "string") return ref ? { code: ref } : null;
|
|
@@ -2119,29 +2162,29 @@ function normalizeToolRef(ref) {
|
|
|
2119
2162
|
}
|
|
2120
2163
|
function messageToWireParts(m) {
|
|
2121
2164
|
const out = [];
|
|
2122
|
-
for (const
|
|
2123
|
-
if (
|
|
2165
|
+
for (const p36 of m.parts) {
|
|
2166
|
+
if (p36.kind === "step-start") {
|
|
2124
2167
|
out.push({ type: "step-start" });
|
|
2125
2168
|
}
|
|
2126
|
-
if (
|
|
2127
|
-
out.push({ type: "reasoning", text:
|
|
2169
|
+
if (p36.kind === "reasoning" && p36.text) {
|
|
2170
|
+
out.push({ type: "reasoning", text: p36.text, state: p36.done ? "done" : "streaming" });
|
|
2128
2171
|
}
|
|
2129
|
-
if (
|
|
2130
|
-
out.push({ text:
|
|
2172
|
+
if (p36.kind === "text" && p36.text) {
|
|
2173
|
+
out.push({ text: p36.text, type: "text" });
|
|
2131
2174
|
}
|
|
2132
|
-
if (
|
|
2133
|
-
out.push({ mediaType:
|
|
2175
|
+
if (p36.kind === "file" && p36.url) {
|
|
2176
|
+
out.push({ mediaType: p36.mediaType, type: "file", url: p36.url });
|
|
2134
2177
|
}
|
|
2135
|
-
if (
|
|
2178
|
+
if (p36.kind === "tool" && isResolvedToolPart(p36)) {
|
|
2136
2179
|
const part = {
|
|
2137
|
-
type: toolPartType(
|
|
2138
|
-
toolCallId:
|
|
2139
|
-
state:
|
|
2180
|
+
type: toolPartType(p36.toolName),
|
|
2181
|
+
toolCallId: p36.toolCallId,
|
|
2182
|
+
state: p36.state
|
|
2140
2183
|
};
|
|
2141
|
-
if (
|
|
2142
|
-
if (
|
|
2143
|
-
if (
|
|
2144
|
-
if (
|
|
2184
|
+
if (p36.input !== void 0) part.input = p36.input;
|
|
2185
|
+
if (p36.output !== void 0) part.output = p36.output;
|
|
2186
|
+
if (p36.error !== void 0) part.errorText = p36.error;
|
|
2187
|
+
if (p36.approval && p36.approval.approved !== void 0) part.approval = p36.approval;
|
|
2145
2188
|
out.push(part);
|
|
2146
2189
|
}
|
|
2147
2190
|
}
|
|
@@ -2401,7 +2444,7 @@ var AgentTransport = class {
|
|
|
2401
2444
|
lastMessageAt: conversation.lastMessageAt,
|
|
2402
2445
|
preview: conversation.preview,
|
|
2403
2446
|
canContinue: conversation.canContinue,
|
|
2404
|
-
|
|
2447
|
+
hasUnread: conversation.hasUnread
|
|
2405
2448
|
})),
|
|
2406
2449
|
nextCursor: res.nextCursor
|
|
2407
2450
|
};
|
|
@@ -2428,8 +2471,8 @@ var AgentTransport = class {
|
|
|
2428
2471
|
}
|
|
2429
2472
|
/**
|
|
2430
2473
|
* Mark a conversation read up to its latest message. Fire-and-forget — the
|
|
2431
|
-
* server records `lastReadAt` and clears that conversation's `
|
|
2432
|
-
* next `/conversations`. A failure is non-fatal (the
|
|
2474
|
+
* server records `lastReadAt` and clears that conversation's `hasUnread` on the
|
|
2475
|
+
* next `/conversations`. A failure is non-fatal (the dot just lingers until the
|
|
2433
2476
|
* next sync), so callers don't await this.
|
|
2434
2477
|
*/
|
|
2435
2478
|
async markRead(conversationId) {
|
|
@@ -2526,6 +2569,26 @@ var AgentTransport = class {
|
|
|
2526
2569
|
log6.debug("submitForm failed (non-fatal)", { err });
|
|
2527
2570
|
}
|
|
2528
2571
|
}
|
|
2572
|
+
/**
|
|
2573
|
+
* Record 👍/👎 feedback on an assistant message. `POST /pai/message-feedback`
|
|
2574
|
+
* (agent-API). `visitorId` + `conversationId` ride the envelope; `messageId`
|
|
2575
|
+
* (the backend message id) + `set.feedback` are explicit (`null` clears a prior
|
|
2576
|
+
* choice) — the `set` block mirrors the authenticated message-update contract.
|
|
2577
|
+
* Fire-and-forget — a failure (e.g. 404 on a backend without the endpoint) is
|
|
2578
|
+
* non-fatal, so callers don't await; the UI already reflects the choice.
|
|
2579
|
+
*/
|
|
2580
|
+
async submitFeedback(body) {
|
|
2581
|
+
log6.debug("submitFeedback \u2192", { messageId: body.messageId, value: body.value });
|
|
2582
|
+
try {
|
|
2583
|
+
await this.postJson(
|
|
2584
|
+
DEFAULT_PATHS.messageFeedback,
|
|
2585
|
+
{ messageId: body.messageId, set: { feedback: body.value } },
|
|
2586
|
+
"submitFeedback"
|
|
2587
|
+
);
|
|
2588
|
+
} catch (err) {
|
|
2589
|
+
log6.debug("submitFeedback failed (non-fatal)", { err });
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2529
2592
|
sendMessage(body) {
|
|
2530
2593
|
this.conversationsCache.clear();
|
|
2531
2594
|
log6.debug("message \u2192", {
|
|
@@ -2851,6 +2914,7 @@ function toReactive(m) {
|
|
|
2851
2914
|
serverMessageId: m.serverMessageId,
|
|
2852
2915
|
ephemeral: m.ephemeral,
|
|
2853
2916
|
attachments: m.attachments,
|
|
2917
|
+
feedback: m.feedback,
|
|
2854
2918
|
partsSig: signal(m.parts.map(partToReactive))
|
|
2855
2919
|
};
|
|
2856
2920
|
}
|
|
@@ -2899,7 +2963,7 @@ function fromWireMessage(w) {
|
|
|
2899
2963
|
};
|
|
2900
2964
|
}
|
|
2901
2965
|
return null;
|
|
2902
|
-
}).filter((
|
|
2966
|
+
}).filter((p36) => p36 !== null);
|
|
2903
2967
|
return {
|
|
2904
2968
|
id: w.id,
|
|
2905
2969
|
role: w.role,
|
|
@@ -2914,6 +2978,8 @@ function fromWireMessage(w) {
|
|
|
2914
2978
|
// `message-bubble`); everything else is a normal completed turn.
|
|
2915
2979
|
status: w.status === "failed" ? "error" : "complete",
|
|
2916
2980
|
canceled: w.status === "canceled",
|
|
2981
|
+
// Restore the persisted 👍/👎 so the feedback control shows the prior choice.
|
|
2982
|
+
feedback: w.feedback ?? null,
|
|
2917
2983
|
partsSig: signal(parts)
|
|
2918
2984
|
};
|
|
2919
2985
|
}
|
|
@@ -2953,7 +3019,7 @@ function assistantText(m) {
|
|
|
2953
3019
|
}
|
|
2954
3020
|
function hasNoVisibleAnswer(m) {
|
|
2955
3021
|
if (assistantText(m).trim() !== "") return false;
|
|
2956
|
-
return !m.partsSig.value.some((
|
|
3022
|
+
return !m.partsSig.value.some((p36) => p36.kind === "tool" || p36.kind === "file" || p36.kind === "source");
|
|
2957
3023
|
}
|
|
2958
3024
|
function isEmptyAssistantReply(m) {
|
|
2959
3025
|
return m.role === "assistant" && m.status !== "streaming" && hasNoVisibleAnswer(m);
|
|
@@ -2961,43 +3027,43 @@ function isEmptyAssistantReply(m) {
|
|
|
2961
3027
|
function isHiddenCanceledTurn(m) {
|
|
2962
3028
|
return m.canceled === true && isEmptyAssistantReply(m);
|
|
2963
3029
|
}
|
|
2964
|
-
function partToReactive(
|
|
2965
|
-
if (
|
|
2966
|
-
return { kind:
|
|
3030
|
+
function partToReactive(p36) {
|
|
3031
|
+
if (p36.kind === "text" || p36.kind === "reasoning") {
|
|
3032
|
+
return { kind: p36.kind, id: p36.id, textSig: signal(p36.text), doneSig: signal(p36.done) };
|
|
2967
3033
|
}
|
|
2968
|
-
if (
|
|
3034
|
+
if (p36.kind === "tool") {
|
|
2969
3035
|
return {
|
|
2970
3036
|
kind: "tool",
|
|
2971
|
-
toolCallId:
|
|
2972
|
-
toolName:
|
|
2973
|
-
inputPartialSig: signal(
|
|
2974
|
-
inputSig: signal(
|
|
2975
|
-
outputSig: signal(
|
|
2976
|
-
errorSig: signal(
|
|
2977
|
-
stateSig: signal(
|
|
2978
|
-
approvalSig: signal(
|
|
3037
|
+
toolCallId: p36.toolCallId,
|
|
3038
|
+
toolName: p36.toolName,
|
|
3039
|
+
inputPartialSig: signal(p36.inputPartial),
|
|
3040
|
+
inputSig: signal(p36.input),
|
|
3041
|
+
outputSig: signal(p36.output),
|
|
3042
|
+
errorSig: signal(p36.error),
|
|
3043
|
+
stateSig: signal(p36.state),
|
|
3044
|
+
approvalSig: signal(p36.approval)
|
|
2979
3045
|
};
|
|
2980
3046
|
}
|
|
2981
|
-
return
|
|
3047
|
+
return p36;
|
|
2982
3048
|
}
|
|
2983
|
-
function partFromReactive(
|
|
2984
|
-
if (
|
|
2985
|
-
return { kind:
|
|
3049
|
+
function partFromReactive(p36) {
|
|
3050
|
+
if (p36.kind === "text" || p36.kind === "reasoning") {
|
|
3051
|
+
return { kind: p36.kind, id: p36.id, text: p36.textSig.value, done: p36.doneSig.value };
|
|
2986
3052
|
}
|
|
2987
|
-
if (
|
|
3053
|
+
if (p36.kind === "tool") {
|
|
2988
3054
|
return {
|
|
2989
3055
|
kind: "tool",
|
|
2990
|
-
toolCallId:
|
|
2991
|
-
toolName:
|
|
2992
|
-
inputPartial:
|
|
2993
|
-
input:
|
|
2994
|
-
output:
|
|
2995
|
-
error:
|
|
2996
|
-
state:
|
|
2997
|
-
approval:
|
|
3056
|
+
toolCallId: p36.toolCallId,
|
|
3057
|
+
toolName: p36.toolName,
|
|
3058
|
+
inputPartial: p36.inputPartialSig.value,
|
|
3059
|
+
input: p36.inputSig.value,
|
|
3060
|
+
output: p36.outputSig.value,
|
|
3061
|
+
error: p36.errorSig.value,
|
|
3062
|
+
state: p36.stateSig.value,
|
|
3063
|
+
approval: p36.approvalSig.value
|
|
2998
3064
|
};
|
|
2999
3065
|
}
|
|
3000
|
-
return
|
|
3066
|
+
return p36;
|
|
3001
3067
|
}
|
|
3002
3068
|
|
|
3003
3069
|
// src/stream/reducer.ts
|
|
@@ -3076,8 +3142,8 @@ var StreamReducer = class {
|
|
|
3076
3142
|
this.ensureTextPart(m, "text", chunk.id);
|
|
3077
3143
|
return;
|
|
3078
3144
|
case "text-delta": {
|
|
3079
|
-
const
|
|
3080
|
-
|
|
3145
|
+
const p36 = this.ensureTextPart(m, "text", chunk.id);
|
|
3146
|
+
p36.textSig.value += chunk.delta;
|
|
3081
3147
|
return;
|
|
3082
3148
|
}
|
|
3083
3149
|
case "text-end":
|
|
@@ -3087,8 +3153,8 @@ var StreamReducer = class {
|
|
|
3087
3153
|
this.ensureTextPart(m, "reasoning", chunk.id).doneSig.value = false;
|
|
3088
3154
|
return;
|
|
3089
3155
|
case "reasoning-delta": {
|
|
3090
|
-
const
|
|
3091
|
-
|
|
3156
|
+
const p36 = this.ensureTextPart(m, "reasoning", chunk.id);
|
|
3157
|
+
p36.textSig.value += chunk.delta;
|
|
3092
3158
|
return;
|
|
3093
3159
|
}
|
|
3094
3160
|
case "reasoning-end":
|
|
@@ -3140,7 +3206,7 @@ var StreamReducer = class {
|
|
|
3140
3206
|
}
|
|
3141
3207
|
};
|
|
3142
3208
|
function ensureToolPart(m, toolCallId, toolName2) {
|
|
3143
|
-
const existing = m.partsSig.value.find((
|
|
3209
|
+
const existing = m.partsSig.value.find((p36) => p36.kind === "tool" && p36.toolCallId === toolCallId);
|
|
3144
3210
|
if (existing) return existing;
|
|
3145
3211
|
const part = {
|
|
3146
3212
|
kind: "tool",
|
|
@@ -3160,7 +3226,7 @@ function appendPart(m, part) {
|
|
|
3160
3226
|
m.partsSig.value = [...m.partsSig.value, part];
|
|
3161
3227
|
}
|
|
3162
3228
|
function appendSource(m, source) {
|
|
3163
|
-
if (m.partsSig.value.some((
|
|
3229
|
+
if (m.partsSig.value.some((p36) => p36.kind === "source" && p36.sourceId === source.sourceId)) return;
|
|
3164
3230
|
appendPart(m, source);
|
|
3165
3231
|
}
|
|
3166
3232
|
function applyTool(m, chunk) {
|
|
@@ -3169,37 +3235,37 @@ function applyTool(m, chunk) {
|
|
|
3169
3235
|
ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3170
3236
|
return;
|
|
3171
3237
|
case "tool-input-delta": {
|
|
3172
|
-
const
|
|
3173
|
-
|
|
3238
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3239
|
+
p36.inputPartialSig.value += chunk.inputTextDelta;
|
|
3174
3240
|
return;
|
|
3175
3241
|
}
|
|
3176
3242
|
case "tool-input-available": {
|
|
3177
|
-
const
|
|
3178
|
-
|
|
3179
|
-
|
|
3243
|
+
const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3244
|
+
p36.inputSig.value = chunk.input;
|
|
3245
|
+
p36.stateSig.value = "input-available";
|
|
3180
3246
|
return;
|
|
3181
3247
|
}
|
|
3182
3248
|
case "tool-approval-request": {
|
|
3183
|
-
const
|
|
3184
|
-
|
|
3185
|
-
|
|
3249
|
+
const p36 = ensureToolPart(m, chunk.toolCallId, chunk.toolName);
|
|
3250
|
+
p36.approvalSig.value = { id: chunk.approvalId };
|
|
3251
|
+
p36.stateSig.value = "approval-requested";
|
|
3186
3252
|
return;
|
|
3187
3253
|
}
|
|
3188
3254
|
case "tool-output-available": {
|
|
3189
|
-
const
|
|
3190
|
-
|
|
3191
|
-
|
|
3255
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3256
|
+
p36.outputSig.value = chunk.output;
|
|
3257
|
+
p36.stateSig.value = "output-available";
|
|
3192
3258
|
return;
|
|
3193
3259
|
}
|
|
3194
3260
|
case "tool-output-error": {
|
|
3195
|
-
const
|
|
3196
|
-
|
|
3197
|
-
|
|
3261
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3262
|
+
p36.errorSig.value = chunk.errorText;
|
|
3263
|
+
p36.stateSig.value = "output-error";
|
|
3198
3264
|
return;
|
|
3199
3265
|
}
|
|
3200
3266
|
case "tool-output-denied": {
|
|
3201
|
-
const
|
|
3202
|
-
|
|
3267
|
+
const p36 = ensureToolPart(m, chunk.toolCallId);
|
|
3268
|
+
p36.stateSig.value = "output-denied";
|
|
3203
3269
|
return;
|
|
3204
3270
|
}
|
|
3205
3271
|
default:
|
|
@@ -3636,6 +3702,18 @@ var WaveIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "tru
|
|
|
3636
3702
|
/* @__PURE__ */ jsx("path", { d: "M13 10V6.5a1.5 1.5 0 0 1 3 0V12" }),
|
|
3637
3703
|
/* @__PURE__ */ jsx("path", { d: "M16 9.5a1.5 1.5 0 0 1 3 0v2.5a7 7 0 0 1-7 7 7 7 0 0 1-6.4-4.2L4 12.5a1.5 1.5 0 0 1 2.6-1.5L7 11" })
|
|
3638
3704
|
] });
|
|
3705
|
+
var CopyIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3706
|
+
/* @__PURE__ */ jsx("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
|
|
3707
|
+
/* @__PURE__ */ jsx("path", { d: "M5 15a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2" })
|
|
3708
|
+
] });
|
|
3709
|
+
var ThumbUpIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3710
|
+
/* @__PURE__ */ jsx("path", { d: "M7 10v11H4a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z" }),
|
|
3711
|
+
/* @__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" })
|
|
3712
|
+
] });
|
|
3713
|
+
var ThumbDownIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3714
|
+
/* @__PURE__ */ jsx("path", { d: "M17 14V3h3a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1z" }),
|
|
3715
|
+
/* @__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" })
|
|
3716
|
+
] });
|
|
3639
3717
|
var WrenchIcon = () => /* @__PURE__ */ jsx("svg", { ...props, "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M14.7 6.3a4 4 0 0 0-5.4 5.3L3 18l3 3 6.4-6.3a4 4 0 0 0 5.3-5.4l-2.7 2.7-2.6-.7-.7-2.6z" }) });
|
|
3640
3718
|
var ClockIcon = () => /* @__PURE__ */ jsxs("svg", { ...props, "aria-hidden": "true", children: [
|
|
3641
3719
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
@@ -3718,6 +3796,14 @@ var TID = {
|
|
|
3718
3796
|
messageBubble: `${p2}-message`,
|
|
3719
3797
|
/** "Stop" / retry inline button inside an error bubble. */
|
|
3720
3798
|
messageRetry: `${p2}-message-retry`,
|
|
3799
|
+
/** Feedback toolbar under an assistant reply (shown only when `enableMessageFeedback`). */
|
|
3800
|
+
messageFeedback: `${p2}-message-feedback`,
|
|
3801
|
+
/** 👍 "good response" feedback button. */
|
|
3802
|
+
feedbackUp: `${p2}-feedback-up`,
|
|
3803
|
+
/** 👎 "bad response" feedback button. */
|
|
3804
|
+
feedbackDown: `${p2}-feedback-down`,
|
|
3805
|
+
/** Copy-message-text button (on user + assistant messages). */
|
|
3806
|
+
messageCopy: `${p2}-message-copy`,
|
|
3721
3807
|
// ── History pane ────────────────────────────────────────────────
|
|
3722
3808
|
/** History pane root (list view inside the panel). */
|
|
3723
3809
|
historyPane: `${p2}-history-pane`,
|
|
@@ -3911,24 +3997,24 @@ import { useCallback as useCallback2, useEffect as useEffect9, useRef as useRef6
|
|
|
3911
3997
|
import { useEffect as useEffect2, useRef } from "preact/hooks";
|
|
3912
3998
|
import { jsx as jsx3 } from "preact/jsx-runtime";
|
|
3913
3999
|
function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, strings }) {
|
|
3914
|
-
const
|
|
4000
|
+
const p36 = BRAND.cssPrefix;
|
|
3915
4001
|
const dragRef = useRef(null);
|
|
3916
4002
|
useEffect2(() => {
|
|
3917
4003
|
if (!panelEl) return;
|
|
3918
4004
|
const style = panelEl.style;
|
|
3919
|
-
if (resize.minWidth) style.setProperty(`--${
|
|
3920
|
-
if (resize.maxWidth) style.setProperty(`--${
|
|
3921
|
-
if (resize.minHeight) style.setProperty(`--${
|
|
3922
|
-
if (resize.maxHeight) style.setProperty(`--${
|
|
4005
|
+
if (resize.minWidth) style.setProperty(`--${p36}-resize-min-w`, resize.minWidth);
|
|
4006
|
+
if (resize.maxWidth) style.setProperty(`--${p36}-resize-max-w`, resize.maxWidth);
|
|
4007
|
+
if (resize.minHeight) style.setProperty(`--${p36}-resize-min-h`, resize.minHeight);
|
|
4008
|
+
if (resize.maxHeight) style.setProperty(`--${p36}-resize-max-h`, resize.maxHeight);
|
|
3923
4009
|
if (initialSize) {
|
|
3924
|
-
style.setProperty(`--${
|
|
3925
|
-
style.setProperty(`--${
|
|
4010
|
+
style.setProperty(`--${p36}-widget-w`, `${initialSize.width}px`);
|
|
4011
|
+
style.setProperty(`--${p36}-widget-h`, `${initialSize.height}px`);
|
|
3926
4012
|
}
|
|
3927
|
-
}, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight,
|
|
4013
|
+
}, [panelEl, resize.minWidth, resize.maxWidth, resize.minHeight, resize.maxHeight, p36, initialSize]);
|
|
3928
4014
|
if (!panelEl) return null;
|
|
3929
4015
|
const isTop = position.startsWith("top-");
|
|
3930
4016
|
const isRight = position.endsWith("-right");
|
|
3931
|
-
const cornerClass = `${
|
|
4017
|
+
const cornerClass = `${p36}-resize-grip ${p36}-resize-grip--${isTop ? "bottom" : "top"}-${isRight ? "left" : "right"}`;
|
|
3932
4018
|
const onPointerDown = (e) => {
|
|
3933
4019
|
if (!panelEl) return;
|
|
3934
4020
|
const target = e.currentTarget;
|
|
@@ -3953,8 +4039,8 @@ function ResizeGrip({ panelEl, resize, position, initialSize, onSizeChange, stri
|
|
|
3953
4039
|
if (!d || e.pointerId !== d.pointerId || !panelEl) return;
|
|
3954
4040
|
const dx = (e.clientX - d.startX) * d.dirX;
|
|
3955
4041
|
const dy = (e.clientY - d.startY) * d.dirY;
|
|
3956
|
-
panelEl.style.setProperty(`--${
|
|
3957
|
-
panelEl.style.setProperty(`--${
|
|
4042
|
+
panelEl.style.setProperty(`--${p36}-widget-w`, `${d.startW + dx}px`);
|
|
4043
|
+
panelEl.style.setProperty(`--${p36}-widget-h`, `${d.startH + dy}px`);
|
|
3958
4044
|
};
|
|
3959
4045
|
const onPointerUp = (e) => {
|
|
3960
4046
|
const d = dragRef.current;
|
|
@@ -4400,6 +4486,10 @@ function Composer({ options, transport, feedback, bus, isStreaming, onSend, onSt
|
|
|
4400
4486
|
const onPaste = (e) => {
|
|
4401
4487
|
const data = e.clipboardData;
|
|
4402
4488
|
if (!data) return;
|
|
4489
|
+
const editable = e.target?.closest?.(
|
|
4490
|
+
"input, textarea, [contenteditable]:not([contenteditable='false'])"
|
|
4491
|
+
);
|
|
4492
|
+
if (editable && editable !== ta) return;
|
|
4403
4493
|
if (filesEnabled) {
|
|
4404
4494
|
const result = ingest(data.items, attsRef.current, options.attachments);
|
|
4405
4495
|
if (result.accepted.length > 0) {
|
|
@@ -4410,7 +4500,7 @@ function Composer({ options, transport, feedback, bus, isStreaming, onSend, onSt
|
|
|
4410
4500
|
return;
|
|
4411
4501
|
}
|
|
4412
4502
|
}
|
|
4413
|
-
if (
|
|
4503
|
+
if (editable === ta) return;
|
|
4414
4504
|
const pastedText = data.getData("text/plain");
|
|
4415
4505
|
if (!pastedText) return;
|
|
4416
4506
|
e.preventDefault();
|
|
@@ -4691,7 +4781,7 @@ function usePopoverMenu({ itemCount, initialFocusIndex }) {
|
|
|
4691
4781
|
// src/ui/overflow-menu.tsx
|
|
4692
4782
|
import { jsx as jsx8, jsxs as jsxs6 } from "preact/jsx-runtime";
|
|
4693
4783
|
function OverflowMenu({ items, triggerLabel }) {
|
|
4694
|
-
const
|
|
4784
|
+
const p36 = BRAND.cssPrefix;
|
|
4695
4785
|
const menu = usePopoverMenu({ itemCount: items.length });
|
|
4696
4786
|
const handleSelect = (item) => {
|
|
4697
4787
|
if (item.disabled) return;
|
|
@@ -4714,13 +4804,13 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4714
4804
|
e.stopPropagation();
|
|
4715
4805
|
pickSegment(item, segs[next].value);
|
|
4716
4806
|
};
|
|
4717
|
-
return /* @__PURE__ */ jsxs6("div", { class: `${
|
|
4807
|
+
return /* @__PURE__ */ jsxs6("div", { class: `${p36}-menu-wrap`, children: [
|
|
4718
4808
|
/* @__PURE__ */ jsx8(
|
|
4719
4809
|
"button",
|
|
4720
4810
|
{
|
|
4721
4811
|
ref: menu.triggerRef,
|
|
4722
4812
|
type: "button",
|
|
4723
|
-
class: `${
|
|
4813
|
+
class: `${p36}-icon-btn`,
|
|
4724
4814
|
"aria-label": triggerLabel,
|
|
4725
4815
|
"aria-haspopup": "menu",
|
|
4726
4816
|
"aria-expanded": menu.open,
|
|
@@ -4734,7 +4824,7 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4734
4824
|
"div",
|
|
4735
4825
|
{
|
|
4736
4826
|
ref: menu.menuRef,
|
|
4737
|
-
class: `${
|
|
4827
|
+
class: `${p36}-menu`,
|
|
4738
4828
|
role: "menu",
|
|
4739
4829
|
"aria-label": triggerLabel,
|
|
4740
4830
|
onKeyDown: menu.onMenuKey,
|
|
@@ -4744,14 +4834,14 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4744
4834
|
"div",
|
|
4745
4835
|
{
|
|
4746
4836
|
role: "menuitem",
|
|
4747
|
-
class: `${
|
|
4837
|
+
class: `${p36}-menu-item ${p36}-menu-item-segmented`,
|
|
4748
4838
|
"aria-label": item.label,
|
|
4749
4839
|
tabIndex: -1,
|
|
4750
4840
|
onKeyDown: (e) => onSegmentRowKey(e, item),
|
|
4751
4841
|
children: [
|
|
4752
|
-
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4753
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4754
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4842
|
+
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
|
|
4843
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
|
|
4844
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-segmented`, role: "group", "aria-label": item.label, children: item.segments.map((seg) => {
|
|
4755
4845
|
const active = seg.value === item.value;
|
|
4756
4846
|
return /* @__PURE__ */ jsx8(
|
|
4757
4847
|
"button",
|
|
@@ -4759,7 +4849,7 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4759
4849
|
type: "button",
|
|
4760
4850
|
role: "menuitemradio",
|
|
4761
4851
|
"aria-checked": active,
|
|
4762
|
-
class: `${
|
|
4852
|
+
class: `${p36}-segment`,
|
|
4763
4853
|
"data-on": active ? "true" : void 0,
|
|
4764
4854
|
lang: seg.lang,
|
|
4765
4855
|
title: seg.value,
|
|
@@ -4779,14 +4869,14 @@ function OverflowMenu({ items, triggerLabel }) {
|
|
|
4779
4869
|
{
|
|
4780
4870
|
type: "button",
|
|
4781
4871
|
role: "menuitem",
|
|
4782
|
-
class: `${
|
|
4872
|
+
class: `${p36}-menu-item`,
|
|
4783
4873
|
"aria-pressed": item.type === "switch" ? item.on : void 0,
|
|
4784
4874
|
disabled: item.disabled,
|
|
4785
4875
|
onClick: () => handleSelect(item),
|
|
4786
4876
|
children: [
|
|
4787
|
-
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4788
|
-
/* @__PURE__ */ jsx8("span", { class: `${
|
|
4789
|
-
item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${
|
|
4877
|
+
item.icon ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-icon`, children: item.icon }) : null,
|
|
4878
|
+
/* @__PURE__ */ jsx8("span", { class: `${p36}-menu-label`, children: item.label }),
|
|
4879
|
+
item.type === "switch" && item.on ? /* @__PURE__ */ jsx8("span", { class: `${p36}-menu-check`, "aria-hidden": "true", children: /* @__PURE__ */ jsx8(CheckIcon, {}) }) : null
|
|
4790
4880
|
]
|
|
4791
4881
|
},
|
|
4792
4882
|
item.id
|
|
@@ -4937,7 +5027,7 @@ function HeaderActions({ panelProps, variant }) {
|
|
|
4937
5027
|
}
|
|
4938
5028
|
|
|
4939
5029
|
// src/ui/message-list.tsx
|
|
4940
|
-
import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as
|
|
5030
|
+
import { useEffect as useEffect7, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState8 } from "preact/hooks";
|
|
4941
5031
|
import { useComputed as useComputed7 } from "@preact/signals";
|
|
4942
5032
|
|
|
4943
5033
|
// src/ui/form/dynamic-form.tsx
|
|
@@ -5334,6 +5424,7 @@ function FormDoneMarker({
|
|
|
5334
5424
|
}
|
|
5335
5425
|
|
|
5336
5426
|
// src/ui/message-bubble.tsx
|
|
5427
|
+
import { useState as useState7 } from "preact/hooks";
|
|
5337
5428
|
import { useComputed as useComputed6 } from "@preact/signals";
|
|
5338
5429
|
|
|
5339
5430
|
// src/stream/constants.ts
|
|
@@ -5414,20 +5505,64 @@ function hardenLink(a) {
|
|
|
5414
5505
|
a.rel = [...tokens].join(" ");
|
|
5415
5506
|
}
|
|
5416
5507
|
|
|
5417
|
-
// src/ui/
|
|
5508
|
+
// src/ui/message-feedback.tsx
|
|
5509
|
+
import { useState as useState6 } from "preact/hooks";
|
|
5418
5510
|
import { jsx as jsx13, jsxs as jsxs10 } from "preact/jsx-runtime";
|
|
5419
5511
|
var p12 = BRAND.cssPrefix;
|
|
5512
|
+
function MessageFeedback({ messageId, initial, strings, onFeedback }) {
|
|
5513
|
+
const [value, setValue] = useState6(initial);
|
|
5514
|
+
const choose = (next) => {
|
|
5515
|
+
const resolved = value === next ? null : next;
|
|
5516
|
+
setValue(resolved);
|
|
5517
|
+
onFeedback(messageId, resolved);
|
|
5518
|
+
};
|
|
5519
|
+
return /* @__PURE__ */ jsxs10("div", { class: `${p12}-feedback`, role: "group", "data-testid": TID.messageFeedback, children: [
|
|
5520
|
+
/* @__PURE__ */ jsx13(
|
|
5521
|
+
"button",
|
|
5522
|
+
{
|
|
5523
|
+
type: "button",
|
|
5524
|
+
class: `${p12}-msg-action`,
|
|
5525
|
+
"data-active": value === "up" ? "true" : void 0,
|
|
5526
|
+
"aria-pressed": value === "up",
|
|
5527
|
+
"aria-label": strings.feedbackUp,
|
|
5528
|
+
title: strings.feedbackUp,
|
|
5529
|
+
onClick: () => choose("up"),
|
|
5530
|
+
"data-testid": TID.feedbackUp,
|
|
5531
|
+
children: /* @__PURE__ */ jsx13(ThumbUpIcon, {})
|
|
5532
|
+
}
|
|
5533
|
+
),
|
|
5534
|
+
/* @__PURE__ */ jsx13(
|
|
5535
|
+
"button",
|
|
5536
|
+
{
|
|
5537
|
+
type: "button",
|
|
5538
|
+
class: `${p12}-msg-action`,
|
|
5539
|
+
"data-active": value === "down" ? "true" : void 0,
|
|
5540
|
+
"aria-pressed": value === "down",
|
|
5541
|
+
"aria-label": strings.feedbackDown,
|
|
5542
|
+
title: strings.feedbackDown,
|
|
5543
|
+
onClick: () => choose("down"),
|
|
5544
|
+
"data-testid": TID.feedbackDown,
|
|
5545
|
+
children: /* @__PURE__ */ jsx13(ThumbDownIcon, {})
|
|
5546
|
+
}
|
|
5547
|
+
),
|
|
5548
|
+
/* @__PURE__ */ jsx13("span", { class: `${p12}-sr-only`, role: "status", "aria-live": "polite", children: value ? strings.feedbackThanks : "" })
|
|
5549
|
+
] });
|
|
5550
|
+
}
|
|
5551
|
+
|
|
5552
|
+
// src/ui/source-view.tsx
|
|
5553
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "preact/jsx-runtime";
|
|
5554
|
+
var p13 = BRAND.cssPrefix;
|
|
5420
5555
|
function SourceView({ part, strings }) {
|
|
5421
5556
|
const label = part.title || part.filename || part.url || strings.sources;
|
|
5422
5557
|
if (part.url) {
|
|
5423
|
-
return /* @__PURE__ */
|
|
5424
|
-
/* @__PURE__ */
|
|
5425
|
-
/* @__PURE__ */
|
|
5558
|
+
return /* @__PURE__ */ jsxs11("a", { class: `${p13}-source`, href: part.url, target: "_blank", rel: "noreferrer noopener", "data-testid": TID.source, children: [
|
|
5559
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-icon`, "aria-hidden": "true", children: "\u{1F517}" }),
|
|
5560
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-label`, children: label })
|
|
5426
5561
|
] });
|
|
5427
5562
|
}
|
|
5428
|
-
return /* @__PURE__ */
|
|
5429
|
-
/* @__PURE__ */
|
|
5430
|
-
/* @__PURE__ */
|
|
5563
|
+
return /* @__PURE__ */ jsxs11("span", { class: `${p13}-source`, "data-testid": TID.source, children: [
|
|
5564
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-icon`, "aria-hidden": "true", children: "\u{1F4C4}" }),
|
|
5565
|
+
/* @__PURE__ */ jsx14("span", { class: `${p13}-source-label`, children: label })
|
|
5431
5566
|
] });
|
|
5432
5567
|
}
|
|
5433
5568
|
|
|
@@ -5436,8 +5571,8 @@ import { useComputed as useComputed3 } from "@preact/signals";
|
|
|
5436
5571
|
|
|
5437
5572
|
// src/ui/tool-card.tsx
|
|
5438
5573
|
import { useComputed as useComputed2 } from "@preact/signals";
|
|
5439
|
-
import { Fragment as Fragment2, jsx as
|
|
5440
|
-
var
|
|
5574
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs12 } from "preact/jsx-runtime";
|
|
5575
|
+
var p14 = BRAND.cssPrefix;
|
|
5441
5576
|
function toolName(raw) {
|
|
5442
5577
|
if (raw.startsWith("tool:")) return raw.slice(5);
|
|
5443
5578
|
if (raw.startsWith("tool-")) return raw.slice(5);
|
|
@@ -5457,9 +5592,9 @@ function statusOf(state, approval) {
|
|
|
5457
5592
|
return "running";
|
|
5458
5593
|
}
|
|
5459
5594
|
function StatusIcon({ status }) {
|
|
5460
|
-
if (status === "denied" || status === "error" || status === "superseded") return /* @__PURE__ */
|
|
5461
|
-
if (status === "completed" || status === "responded") return /* @__PURE__ */
|
|
5462
|
-
return /* @__PURE__ */
|
|
5595
|
+
if (status === "denied" || status === "error" || status === "superseded") return /* @__PURE__ */ jsx15(XCircleIcon, {});
|
|
5596
|
+
if (status === "completed" || status === "responded") return /* @__PURE__ */ jsx15(CheckCircleIcon, {});
|
|
5597
|
+
return /* @__PURE__ */ jsx15(ClockIcon, {});
|
|
5463
5598
|
}
|
|
5464
5599
|
function statusLabel(status, strings) {
|
|
5465
5600
|
switch (status) {
|
|
@@ -5487,8 +5622,8 @@ function ToolStatus({
|
|
|
5487
5622
|
}) {
|
|
5488
5623
|
const base = statusOf(state, approval);
|
|
5489
5624
|
const status = superseded && (base === "awaiting" || base === "running") ? "superseded" : base;
|
|
5490
|
-
return /* @__PURE__ */
|
|
5491
|
-
/* @__PURE__ */
|
|
5625
|
+
return /* @__PURE__ */ jsxs12("span", { class: `${p14}-toolui-badge ${p14}-toolui-status`, "data-status": status, children: [
|
|
5626
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-status-icon`, children: /* @__PURE__ */ jsx15(StatusIcon, { status }) }),
|
|
5492
5627
|
statusLabel(status, strings)
|
|
5493
5628
|
] });
|
|
5494
5629
|
}
|
|
@@ -5499,11 +5634,11 @@ function ToolHeaderRow({
|
|
|
5499
5634
|
strings,
|
|
5500
5635
|
superseded
|
|
5501
5636
|
}) {
|
|
5502
|
-
return /* @__PURE__ */
|
|
5503
|
-
/* @__PURE__ */
|
|
5504
|
-
/* @__PURE__ */
|
|
5505
|
-
/* @__PURE__ */
|
|
5506
|
-
/* @__PURE__ */
|
|
5637
|
+
return /* @__PURE__ */ jsxs12(Fragment2, { children: [
|
|
5638
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-wrench`, children: /* @__PURE__ */ jsx15(WrenchIcon, {}) }),
|
|
5639
|
+
/* @__PURE__ */ jsx15("strong", { class: `${p14}-toolui-title`, children: name }),
|
|
5640
|
+
/* @__PURE__ */ jsx15(ToolStatus, { state, approval, strings, superseded }),
|
|
5641
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-chevron`, children: /* @__PURE__ */ jsx15(ChevronDownIcon, {}) })
|
|
5507
5642
|
] });
|
|
5508
5643
|
}
|
|
5509
5644
|
function ToolCollapsibleCard({
|
|
@@ -5517,8 +5652,8 @@ function ToolCollapsibleCard({
|
|
|
5517
5652
|
const error = useComputed2(() => part.errorSig.value);
|
|
5518
5653
|
const state = useComputed2(() => part.stateSig.value);
|
|
5519
5654
|
const approval = useComputed2(() => part.approvalSig.value);
|
|
5520
|
-
return /* @__PURE__ */
|
|
5521
|
-
/* @__PURE__ */
|
|
5655
|
+
return /* @__PURE__ */ jsxs12("details", { class: `${p14}-toolui ${p14}-toolui-collapsible`, "data-testid": testid, children: [
|
|
5656
|
+
/* @__PURE__ */ jsx15("summary", { class: `${p14}-toolui-head`, children: /* @__PURE__ */ jsx15(
|
|
5522
5657
|
ToolHeaderRow,
|
|
5523
5658
|
{
|
|
5524
5659
|
name: toolName(part.toolName),
|
|
@@ -5528,17 +5663,17 @@ function ToolCollapsibleCard({
|
|
|
5528
5663
|
superseded
|
|
5529
5664
|
}
|
|
5530
5665
|
) }),
|
|
5531
|
-
/* @__PURE__ */
|
|
5532
|
-
output.value !== void 0 ? /* @__PURE__ */
|
|
5533
|
-
error.value ? /* @__PURE__ */
|
|
5666
|
+
/* @__PURE__ */ jsx15(ToolSection, { label: strings.toolParameters, value: input.value }),
|
|
5667
|
+
output.value !== void 0 ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.toolResult, value: output.value }) : null,
|
|
5668
|
+
error.value ? /* @__PURE__ */ jsx15(ToolSection, { label: strings.statusError, value: error.value, error: true }) : null
|
|
5534
5669
|
] });
|
|
5535
5670
|
}
|
|
5536
5671
|
function ToolSection({ label, value, error }) {
|
|
5537
5672
|
const text = error ? String(value ?? "") : pretty(unwrapResult(value));
|
|
5538
5673
|
if (!text) return null;
|
|
5539
|
-
return /* @__PURE__ */
|
|
5540
|
-
/* @__PURE__ */
|
|
5541
|
-
/* @__PURE__ */
|
|
5674
|
+
return /* @__PURE__ */ jsxs12("div", { class: `${p14}-toolui-section`, children: [
|
|
5675
|
+
/* @__PURE__ */ jsx15("span", { class: `${p14}-toolui-label`, children: label }),
|
|
5676
|
+
/* @__PURE__ */ jsx15("pre", { class: `${p14}-toolui-code`, "data-error": error ? "true" : void 0, children: text })
|
|
5542
5677
|
] });
|
|
5543
5678
|
}
|
|
5544
5679
|
function unwrapResult(output) {
|
|
@@ -5560,8 +5695,8 @@ function pretty(value) {
|
|
|
5560
5695
|
}
|
|
5561
5696
|
|
|
5562
5697
|
// src/ui/tool-approval.tsx
|
|
5563
|
-
import { Fragment as Fragment3, jsx as
|
|
5564
|
-
var
|
|
5698
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs13 } from "preact/jsx-runtime";
|
|
5699
|
+
var p15 = BRAND.cssPrefix;
|
|
5565
5700
|
function ToolApproval({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5566
5701
|
const approval = useComputed3(() => part.approvalSig.value);
|
|
5567
5702
|
const state = useComputed3(() => part.stateSig.value);
|
|
@@ -5571,50 +5706,50 @@ function ToolApproval({ part, strings, active, superseded = false, onDecision, o
|
|
|
5571
5706
|
const editable = responded && active && !terminal;
|
|
5572
5707
|
const skipped = superseded && !decided;
|
|
5573
5708
|
const id = part.toolCallId;
|
|
5574
|
-
return /* @__PURE__ */
|
|
5575
|
-
/* @__PURE__ */
|
|
5576
|
-
skipped || terminal ? null : /* @__PURE__ */
|
|
5709
|
+
return /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui-group`, "data-testid": decided ? TID.toolDecision : TID.toolApproval, children: [
|
|
5710
|
+
/* @__PURE__ */ jsx16(ToolCollapsibleCard, { part, strings, superseded: skipped }),
|
|
5711
|
+
skipped || terminal ? null : /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui ${p15}-toolui-body`, children: [
|
|
5577
5712
|
responded ? (
|
|
5578
5713
|
// DECIDED — lead with the recorded response (no repeated prompt/body), so the card barely
|
|
5579
5714
|
// changes height from the awaiting state and the Edit sits right under the edit hint.
|
|
5580
|
-
/* @__PURE__ */
|
|
5581
|
-
/* @__PURE__ */
|
|
5715
|
+
/* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
5716
|
+
/* @__PURE__ */ jsxs13("p", { class: `${p15}-toolui-prompt`, children: [
|
|
5582
5717
|
strings.approvalYourResponse.replace("{decision}", approved ? strings.approve : strings.reject),
|
|
5583
5718
|
approval.value?.reason ? ` \u2014 ${approval.value.reason}` : ""
|
|
5584
5719
|
] }),
|
|
5585
|
-
editable ? /* @__PURE__ */
|
|
5586
|
-
!editable && !terminal ? /* @__PURE__ */
|
|
5720
|
+
editable ? /* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalEditHint }) : null,
|
|
5721
|
+
!editable && !terminal ? /* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalSubmitting }) : null
|
|
5587
5722
|
] })
|
|
5588
5723
|
) : (
|
|
5589
5724
|
// AWAITING — the prompt + what to do, then Reject / Approve.
|
|
5590
|
-
/* @__PURE__ */
|
|
5591
|
-
/* @__PURE__ */
|
|
5592
|
-
/* @__PURE__ */
|
|
5725
|
+
/* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
5726
|
+
/* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-prompt`, children: strings.approvalPrompt.replace("{tool}", name) }),
|
|
5727
|
+
/* @__PURE__ */ jsx16("p", { class: `${p15}-toolui-subtle`, children: strings.approvalBody })
|
|
5593
5728
|
] })
|
|
5594
5729
|
),
|
|
5595
|
-
!decided && active ? /* @__PURE__ */
|
|
5596
|
-
/* @__PURE__ */
|
|
5730
|
+
!decided && active ? /* @__PURE__ */ jsxs13("div", { class: `${p15}-toolui-actions`, children: [
|
|
5731
|
+
/* @__PURE__ */ jsx16(
|
|
5597
5732
|
"button",
|
|
5598
5733
|
{
|
|
5599
5734
|
type: "button",
|
|
5600
|
-
class: `${
|
|
5735
|
+
class: `${p15}-form-skip`,
|
|
5601
5736
|
onClick: () => onDecision(id, false),
|
|
5602
5737
|
"data-testid": TID.toolReject,
|
|
5603
5738
|
children: strings.reject
|
|
5604
5739
|
}
|
|
5605
5740
|
),
|
|
5606
|
-
/* @__PURE__ */
|
|
5741
|
+
/* @__PURE__ */ jsx16(
|
|
5607
5742
|
"button",
|
|
5608
5743
|
{
|
|
5609
5744
|
type: "button",
|
|
5610
|
-
class: `${
|
|
5745
|
+
class: `${p15}-form-submit`,
|
|
5611
5746
|
onClick: () => onDecision(id, true),
|
|
5612
5747
|
"data-testid": TID.toolApprove,
|
|
5613
5748
|
children: strings.approve
|
|
5614
5749
|
}
|
|
5615
5750
|
)
|
|
5616
5751
|
] }) : null,
|
|
5617
|
-
editable ? /* @__PURE__ */
|
|
5752
|
+
editable ? /* @__PURE__ */ jsx16("div", { class: `${p15}-toolui-actions`, children: /* @__PURE__ */ jsx16("button", { type: "button", class: `${p15}-form-skip`, onClick: () => onEdit(id), "data-testid": TID.toolEdit, children: strings.edit }) }) : null
|
|
5618
5753
|
] })
|
|
5619
5754
|
] });
|
|
5620
5755
|
}
|
|
@@ -5689,8 +5824,8 @@ function str(v) {
|
|
|
5689
5824
|
}
|
|
5690
5825
|
|
|
5691
5826
|
// src/ui/tool-ask-questions.tsx
|
|
5692
|
-
import { Fragment as Fragment4, jsx as
|
|
5693
|
-
var
|
|
5827
|
+
import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs14 } from "preact/jsx-runtime";
|
|
5828
|
+
var p16 = BRAND.cssPrefix;
|
|
5694
5829
|
function ToolAskQuestions({ part, strings, active, superseded = false, onDecision, onEdit }) {
|
|
5695
5830
|
const state = useComputed4(() => part.stateSig.value);
|
|
5696
5831
|
const approval = useComputed4(() => part.approvalSig.value);
|
|
@@ -5699,16 +5834,16 @@ function ToolAskQuestions({ part, strings, active, superseded = false, onDecisio
|
|
|
5699
5834
|
const req = request.value;
|
|
5700
5835
|
if (decided) {
|
|
5701
5836
|
const editable = responded && active && !terminal;
|
|
5702
|
-
return /* @__PURE__ */
|
|
5837
|
+
return /* @__PURE__ */ jsx17(DecidedCard, { part, strings, req, editable, onEdit: () => onEdit(part.toolCallId) });
|
|
5703
5838
|
}
|
|
5704
5839
|
const stale = superseded;
|
|
5705
|
-
return /* @__PURE__ */
|
|
5706
|
-
/* @__PURE__ */
|
|
5707
|
-
/* @__PURE__ */
|
|
5708
|
-
/* @__PURE__ */
|
|
5709
|
-
] }) : /* @__PURE__ */
|
|
5710
|
-
req.intro ? /* @__PURE__ */
|
|
5711
|
-
stale ? null : /* @__PURE__ */
|
|
5840
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui${stale ? ` ${p16}-toolui-stale` : ""}`, "data-testid": TID.toolAskQuestions, children: [
|
|
5841
|
+
/* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-head`, children: stale ? /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
5842
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputBadge }),
|
|
5843
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-muted`, children: strings.statusSuperseded })
|
|
5844
|
+
] }) : /* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputRequired }) }),
|
|
5845
|
+
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5846
|
+
stale ? null : /* @__PURE__ */ jsx17(
|
|
5712
5847
|
AskBody,
|
|
5713
5848
|
{
|
|
5714
5849
|
req,
|
|
@@ -5725,7 +5860,7 @@ function AskBody({
|
|
|
5725
5860
|
}) {
|
|
5726
5861
|
const fields = askQuestionsToFields(req, strings.confirmYes, strings.confirmNo);
|
|
5727
5862
|
const loneTextarea = req.questions.length === 1 && req.questions[0]?.type === "text";
|
|
5728
|
-
return /* @__PURE__ */
|
|
5863
|
+
return /* @__PURE__ */ jsx17(
|
|
5729
5864
|
DynamicForm,
|
|
5730
5865
|
{
|
|
5731
5866
|
fields,
|
|
@@ -5760,20 +5895,20 @@ function DecidedCard({
|
|
|
5760
5895
|
const approval = useComputed4(() => part.approvalSig.value);
|
|
5761
5896
|
const skipped = approval.value?.approved === false;
|
|
5762
5897
|
const answers = approval.value?.approved ? parseAnswers(approval.value.reason) : {};
|
|
5763
|
-
return /* @__PURE__ */
|
|
5764
|
-
/* @__PURE__ */
|
|
5765
|
-
/* @__PURE__ */
|
|
5766
|
-
/* @__PURE__ */
|
|
5898
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui`, "data-testid": TID.toolDecision, children: [
|
|
5899
|
+
/* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui-head`, children: [
|
|
5900
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge ${p16}-toolui-badge-accent`, children: strings.inputBadge }),
|
|
5901
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-badge`, children: skipped ? strings.inputSkipped : strings.inputAnswered })
|
|
5767
5902
|
] }),
|
|
5768
|
-
req.intro ? /* @__PURE__ */
|
|
5903
|
+
req.intro ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-desc`, children: req.intro }) : null,
|
|
5769
5904
|
req.questions.map((q) => {
|
|
5770
5905
|
const text = skipped ? "" : answers[q.key] ?? "";
|
|
5771
|
-
return /* @__PURE__ */
|
|
5772
|
-
/* @__PURE__ */
|
|
5773
|
-
text ? /* @__PURE__ */
|
|
5906
|
+
return /* @__PURE__ */ jsxs14("div", { class: `${p16}-toolui-section`, children: [
|
|
5907
|
+
/* @__PURE__ */ jsx17("span", { class: `${p16}-toolui-label`, children: q.question }),
|
|
5908
|
+
text ? /* @__PURE__ */ jsx17("p", { class: `${p16}-toolui-text`, children: text }) : null
|
|
5774
5909
|
] }, q.key);
|
|
5775
5910
|
}),
|
|
5776
|
-
editable ? /* @__PURE__ */
|
|
5911
|
+
editable ? /* @__PURE__ */ jsx17("div", { class: `${p16}-toolui-actions`, children: /* @__PURE__ */ jsx17("button", { type: "button", class: `${p16}-form-skip`, onClick: onEdit, "data-testid": TID.toolEdit, children: strings.edit }) }) : null
|
|
5777
5912
|
] });
|
|
5778
5913
|
}
|
|
5779
5914
|
function parseAnswers(reason) {
|
|
@@ -5799,19 +5934,19 @@ function parseAnswers(reason) {
|
|
|
5799
5934
|
|
|
5800
5935
|
// src/ui/tool-call.tsx
|
|
5801
5936
|
import { useComputed as useComputed5 } from "@preact/signals";
|
|
5802
|
-
import { jsx as
|
|
5937
|
+
import { jsx as jsx18 } from "preact/jsx-runtime";
|
|
5803
5938
|
function ToolCall({ part, strings }) {
|
|
5804
5939
|
const input = useComputed5(() => part.inputSig.value);
|
|
5805
5940
|
const output = useComputed5(() => part.outputSig.value);
|
|
5806
5941
|
const error = useComputed5(() => part.errorSig.value);
|
|
5807
5942
|
const hasDetails = useComputed5(() => !!pretty(input.value) || !!error.value || !!pretty(unwrapResult(output.value)));
|
|
5808
5943
|
if (!hasDetails.value) return null;
|
|
5809
|
-
return /* @__PURE__ */
|
|
5944
|
+
return /* @__PURE__ */ jsx18(ToolCollapsibleCard, { part, strings, testid: TID.toolCall });
|
|
5810
5945
|
}
|
|
5811
5946
|
|
|
5812
5947
|
// src/ui/message-bubble.tsx
|
|
5813
|
-
import { jsx as
|
|
5814
|
-
var
|
|
5948
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "preact/jsx-runtime";
|
|
5949
|
+
var p17 = BRAND.cssPrefix;
|
|
5815
5950
|
function MessageBubble({
|
|
5816
5951
|
message,
|
|
5817
5952
|
strings,
|
|
@@ -5822,7 +5957,9 @@ function MessageBubble({
|
|
|
5822
5957
|
interactive = false,
|
|
5823
5958
|
superseded = false,
|
|
5824
5959
|
tool,
|
|
5825
|
-
onRetry
|
|
5960
|
+
onRetry,
|
|
5961
|
+
enableMessageFeedback = false,
|
|
5962
|
+
onFeedback
|
|
5826
5963
|
}) {
|
|
5827
5964
|
const parts = useComputed6(() => message.partsSig.value);
|
|
5828
5965
|
const partList = parts.value;
|
|
@@ -5849,31 +5986,82 @@ function MessageBubble({
|
|
|
5849
5986
|
const showStreamDots = streaming && !bufferedHold && !(reasoningVisible.value && working);
|
|
5850
5987
|
if (hideCanceledHusk.value) return null;
|
|
5851
5988
|
const stamp = formatStamp(message.createdAt);
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5989
|
+
const showFeedback = enableMessageFeedback && !!onFeedback && !!message.serverMessageId && message.role === "assistant" && !streaming && message.status !== "error" && !emptyReply.value;
|
|
5990
|
+
const copyText = partList.filter((part) => part.kind === "text").map((part) => part.textSig.value).join("\n\n").trim();
|
|
5991
|
+
const showCopy = !streaming && message.status !== "error" && !emptyReply.value && copyText.length > 0;
|
|
5992
|
+
const showActions = showFeedback || showCopy;
|
|
5993
|
+
return /* @__PURE__ */ jsx19(
|
|
5994
|
+
"div",
|
|
5995
|
+
{
|
|
5996
|
+
class: `${p17}-bubble-row`,
|
|
5997
|
+
"data-role": message.role,
|
|
5998
|
+
"data-mid": message.serverMessageId ?? message.id,
|
|
5999
|
+
"data-testid": tid(TID.messageBubble, message.id),
|
|
6000
|
+
children: /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-col`, children: [
|
|
6001
|
+
/* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble`, children: [
|
|
6002
|
+
bufferedHold ? /* @__PURE__ */ jsx19(LoadingSpinner, { label: strings.loading }) : partList.map((part, index) => /* @__PURE__ */ jsx19(
|
|
6003
|
+
PartView,
|
|
6004
|
+
{
|
|
6005
|
+
part,
|
|
6006
|
+
active: working,
|
|
6007
|
+
strings,
|
|
6008
|
+
showReasoning,
|
|
6009
|
+
showToolCalls,
|
|
6010
|
+
showSources,
|
|
6011
|
+
interactive: interactive && (part.kind !== "tool" || index > lastOutputIdx.value),
|
|
6012
|
+
superseded,
|
|
6013
|
+
tool
|
|
6014
|
+
},
|
|
6015
|
+
partKey(part)
|
|
6016
|
+
)),
|
|
6017
|
+
showStreamDots && /* @__PURE__ */ jsx19(TypingDots, {}),
|
|
6018
|
+
message.status === "error" && message.errorText || emptyReply.value ? /* @__PURE__ */ jsxs15("div", { class: `${p17}-error`, role: "alert", children: [
|
|
6019
|
+
/* @__PURE__ */ jsx19("span", { children: message.errorText ?? strings.errorGeneric }),
|
|
6020
|
+
onRetry ? /* @__PURE__ */ jsx19("button", { type: "button", class: `${p17}-error-retry`, onClick: onRetry, "data-testid": TID.messageRetry, children: strings.errorRetry }) : null
|
|
6021
|
+
] }) : null
|
|
6022
|
+
] }),
|
|
6023
|
+
stamp || showActions ? /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-meta`, children: [
|
|
6024
|
+
stamp ? /* @__PURE__ */ jsx19("time", { class: `${p17}-bubble-time`, dateTime: stamp.iso, title: stamp.full, children: stamp.short }) : null,
|
|
6025
|
+
showActions ? /* @__PURE__ */ jsxs15("div", { class: `${p17}-bubble-actions`, children: [
|
|
6026
|
+
showFeedback && message.serverMessageId ? /* @__PURE__ */ jsx19(
|
|
6027
|
+
MessageFeedback,
|
|
6028
|
+
{
|
|
6029
|
+
messageId: message.serverMessageId,
|
|
6030
|
+
initial: message.feedback ?? null,
|
|
6031
|
+
strings,
|
|
6032
|
+
onFeedback
|
|
6033
|
+
}
|
|
6034
|
+
) : null,
|
|
6035
|
+
showCopy ? /* @__PURE__ */ jsx19(CopyButton, { text: copyText, strings }) : null
|
|
6036
|
+
] }) : null
|
|
6037
|
+
] }) : null
|
|
6038
|
+
] })
|
|
6039
|
+
}
|
|
6040
|
+
);
|
|
6041
|
+
}
|
|
6042
|
+
function CopyButton({ text, strings }) {
|
|
6043
|
+
const [copied, setCopied] = useState7(false);
|
|
6044
|
+
const onCopy = () => {
|
|
6045
|
+
navigator.clipboard?.writeText(text).then(() => {
|
|
6046
|
+
setCopied(true);
|
|
6047
|
+
setTimeout(() => setCopied(false), 1500);
|
|
6048
|
+
}).catch(() => {
|
|
6049
|
+
});
|
|
6050
|
+
};
|
|
6051
|
+
const label = copied ? strings.copied : strings.copy;
|
|
6052
|
+
return /* @__PURE__ */ jsx19(
|
|
6053
|
+
"button",
|
|
6054
|
+
{
|
|
6055
|
+
type: "button",
|
|
6056
|
+
class: `${p17}-msg-action`,
|
|
6057
|
+
"data-active": copied ? "true" : void 0,
|
|
6058
|
+
"aria-label": label,
|
|
6059
|
+
title: label,
|
|
6060
|
+
onClick: onCopy,
|
|
6061
|
+
"data-testid": TID.messageCopy,
|
|
6062
|
+
children: copied ? /* @__PURE__ */ jsx19(CheckIcon, {}) : /* @__PURE__ */ jsx19(CopyIcon, {})
|
|
6063
|
+
}
|
|
6064
|
+
);
|
|
5877
6065
|
}
|
|
5878
6066
|
function formatStamp(createdAt) {
|
|
5879
6067
|
if (typeof createdAt !== "number" || !Number.isFinite(createdAt)) return null;
|
|
@@ -5903,11 +6091,11 @@ function PartView({
|
|
|
5903
6091
|
case "step-start":
|
|
5904
6092
|
return null;
|
|
5905
6093
|
case "text":
|
|
5906
|
-
return /* @__PURE__ */
|
|
6094
|
+
return /* @__PURE__ */ jsx19(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig });
|
|
5907
6095
|
case "reasoning":
|
|
5908
|
-
return showReasoning ? /* @__PURE__ */
|
|
6096
|
+
return showReasoning ? /* @__PURE__ */ jsx19(ReasoningView, { part, active, strings }) : null;
|
|
5909
6097
|
case "tool":
|
|
5910
|
-
return /* @__PURE__ */
|
|
6098
|
+
return /* @__PURE__ */ jsx19(
|
|
5911
6099
|
ToolPartView,
|
|
5912
6100
|
{
|
|
5913
6101
|
part,
|
|
@@ -5920,11 +6108,11 @@ function PartView({
|
|
|
5920
6108
|
);
|
|
5921
6109
|
case "file":
|
|
5922
6110
|
if (part.mediaType.startsWith("image/")) {
|
|
5923
|
-
return /* @__PURE__ */
|
|
6111
|
+
return /* @__PURE__ */ jsx19("img", { src: part.url, alt: "", loading: "lazy" });
|
|
5924
6112
|
}
|
|
5925
|
-
return /* @__PURE__ */
|
|
6113
|
+
return /* @__PURE__ */ jsx19("a", { href: part.url, target: "_blank", rel: "noreferrer noopener", children: part.url });
|
|
5926
6114
|
case "source":
|
|
5927
|
-
return showSources ? /* @__PURE__ */
|
|
6115
|
+
return showSources ? /* @__PURE__ */ jsx19(SourceView, { part, strings }) : null;
|
|
5928
6116
|
}
|
|
5929
6117
|
}
|
|
5930
6118
|
function ToolPartView({
|
|
@@ -5938,7 +6126,7 @@ function ToolPartView({
|
|
|
5938
6126
|
const hasApproval = useComputed6(() => part.approvalSig.value !== void 0);
|
|
5939
6127
|
if (tool?.humanInLoop) {
|
|
5940
6128
|
if (isAskUserQuestionsTool(part.toolName)) {
|
|
5941
|
-
return /* @__PURE__ */
|
|
6129
|
+
return /* @__PURE__ */ jsx19(
|
|
5942
6130
|
ToolAskQuestions,
|
|
5943
6131
|
{
|
|
5944
6132
|
part,
|
|
@@ -5951,7 +6139,7 @@ function ToolPartView({
|
|
|
5951
6139
|
);
|
|
5952
6140
|
}
|
|
5953
6141
|
if (hasApproval.value) {
|
|
5954
|
-
return /* @__PURE__ */
|
|
6142
|
+
return /* @__PURE__ */ jsx19(
|
|
5955
6143
|
ToolApproval,
|
|
5956
6144
|
{
|
|
5957
6145
|
part,
|
|
@@ -5964,16 +6152,16 @@ function ToolPartView({
|
|
|
5964
6152
|
);
|
|
5965
6153
|
}
|
|
5966
6154
|
}
|
|
5967
|
-
return showToolCalls ? /* @__PURE__ */
|
|
6155
|
+
return showToolCalls ? /* @__PURE__ */ jsx19(ToolCall, { part, strings }) : null;
|
|
5968
6156
|
}
|
|
5969
6157
|
function ReasoningView({
|
|
5970
6158
|
part,
|
|
5971
6159
|
active,
|
|
5972
6160
|
strings
|
|
5973
6161
|
}) {
|
|
5974
|
-
return /* @__PURE__ */
|
|
5975
|
-
/* @__PURE__ */
|
|
5976
|
-
/* @__PURE__ */
|
|
6162
|
+
return /* @__PURE__ */ jsxs15("details", { class: `${p17}-reasoning`, open: active, "data-active": active ? "true" : void 0, children: [
|
|
6163
|
+
/* @__PURE__ */ jsx19("summary", { class: `${p17}-reasoning-summary`, children: /* @__PURE__ */ jsx19("span", { class: `${p17}-reasoning-label`, children: active ? strings.thinking : strings.thoughts }) }),
|
|
6164
|
+
/* @__PURE__ */ jsx19("div", { class: `${p17}-reasoning-body`, children: /* @__PURE__ */ jsx19(MarkdownView, { textSig: part.textSig, doneSig: part.doneSig }) })
|
|
5977
6165
|
] });
|
|
5978
6166
|
}
|
|
5979
6167
|
function partKey(part) {
|
|
@@ -5991,24 +6179,26 @@ function partKey(part) {
|
|
|
5991
6179
|
}
|
|
5992
6180
|
}
|
|
5993
6181
|
function TypingDots() {
|
|
5994
|
-
return /* @__PURE__ */
|
|
5995
|
-
/* @__PURE__ */
|
|
5996
|
-
/* @__PURE__ */
|
|
5997
|
-
/* @__PURE__ */
|
|
6182
|
+
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-typing`, "aria-hidden": "true", children: [
|
|
6183
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6184
|
+
/* @__PURE__ */ jsx19("span", {}),
|
|
6185
|
+
/* @__PURE__ */ jsx19("span", {})
|
|
5998
6186
|
] });
|
|
5999
6187
|
}
|
|
6000
6188
|
function LoadingSpinner({ label }) {
|
|
6001
|
-
return /* @__PURE__ */
|
|
6002
|
-
/* @__PURE__ */
|
|
6003
|
-
/* @__PURE__ */
|
|
6189
|
+
return /* @__PURE__ */ jsxs15("span", { class: `${p17}-loading`, role: "status", children: [
|
|
6190
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-spinner`, "aria-hidden": "true" }),
|
|
6191
|
+
/* @__PURE__ */ jsx19("span", { class: `${p17}-loading-label`, children: label })
|
|
6004
6192
|
] });
|
|
6005
6193
|
}
|
|
6006
6194
|
|
|
6007
6195
|
// src/ui/message-list.tsx
|
|
6008
|
-
import { jsx as
|
|
6009
|
-
var
|
|
6196
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "preact/jsx-runtime";
|
|
6197
|
+
var p18 = BRAND.cssPrefix;
|
|
6010
6198
|
var STICK_THRESHOLD = 120;
|
|
6011
6199
|
var INTERACTION_GRACE_MS = 350;
|
|
6200
|
+
var TURN_TOP_PAD = 12;
|
|
6201
|
+
var TURN_GAP = 8;
|
|
6012
6202
|
function MessageList({
|
|
6013
6203
|
messagesSig,
|
|
6014
6204
|
strings,
|
|
@@ -6016,6 +6206,11 @@ function MessageList({
|
|
|
6016
6206
|
showReasoning,
|
|
6017
6207
|
showToolCalls,
|
|
6018
6208
|
showSources,
|
|
6209
|
+
scrollFade,
|
|
6210
|
+
scrollAnchor,
|
|
6211
|
+
enableMessageFeedback,
|
|
6212
|
+
onFeedback,
|
|
6213
|
+
onMessageSeen,
|
|
6019
6214
|
loading,
|
|
6020
6215
|
idle,
|
|
6021
6216
|
tool,
|
|
@@ -6026,16 +6221,39 @@ function MessageList({
|
|
|
6026
6221
|
}) {
|
|
6027
6222
|
const ref = useRef5(null);
|
|
6028
6223
|
const messages = useComputed7(() => messagesSig.value);
|
|
6029
|
-
const [showJump, setShowJump] =
|
|
6224
|
+
const [showJump, setShowJump] = useState8(false);
|
|
6225
|
+
const spacerRef = useRef5(null);
|
|
6226
|
+
const seenRef = useRef5(/* @__PURE__ */ new Set());
|
|
6227
|
+
const firedSeenRef = useRef5(/* @__PURE__ */ new Set());
|
|
6228
|
+
const [newCount, setNewCount] = useState8(0);
|
|
6030
6229
|
const hasHydratedRef = useRef5(false);
|
|
6031
6230
|
const detachedRef = useRef5(false);
|
|
6032
6231
|
const interactingRef = useRef5(false);
|
|
6033
6232
|
const interactionEndedAtRef = useRef5(0);
|
|
6034
6233
|
const inInteractionGrace = () => interactingRef.current || performance.now() - interactionEndedAtRef.current < INTERACTION_GRACE_MS;
|
|
6035
6234
|
const autoPinAtRef = useRef5(0);
|
|
6235
|
+
const key = (m) => m.serverMessageId ?? m.id;
|
|
6236
|
+
const syncFade = (el) => {
|
|
6237
|
+
if (!scrollFade) return;
|
|
6238
|
+
const overflowing = el.scrollHeight - el.clientHeight > 1;
|
|
6239
|
+
el.dataset.fadeTop = overflowing && el.scrollTop > 1 ? "true" : "false";
|
|
6240
|
+
el.dataset.fadeBottom = overflowing && el.scrollHeight - el.scrollTop - el.clientHeight > 1 ? "true" : "false";
|
|
6241
|
+
};
|
|
6242
|
+
const syncJump = (el) => setShowJump(el.scrollHeight - el.scrollTop - el.clientHeight > STICK_THRESHOLD * 2);
|
|
6243
|
+
const recomputeNewCount = (el) => {
|
|
6244
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight <= STICK_THRESHOLD * 2) return setNewCount(0);
|
|
6245
|
+
let n = 0;
|
|
6246
|
+
for (const m of messages.value) if (m.role === "assistant" && !seenRef.current.has(key(m))) n++;
|
|
6247
|
+
setNewCount(n);
|
|
6248
|
+
};
|
|
6249
|
+
const markAllSeen = () => {
|
|
6250
|
+
for (const m of messages.value) if (m.role === "assistant") seenRef.current.add(key(m));
|
|
6251
|
+
setNewCount(0);
|
|
6252
|
+
};
|
|
6036
6253
|
const pinBottom = (el) => {
|
|
6037
6254
|
autoPinAtRef.current = performance.now();
|
|
6038
6255
|
el.scrollTop = el.scrollHeight;
|
|
6256
|
+
syncFade(el);
|
|
6039
6257
|
};
|
|
6040
6258
|
const pinBottomSoon = (el, frames) => {
|
|
6041
6259
|
pinBottom(el);
|
|
@@ -6072,13 +6290,50 @@ function MessageList({
|
|
|
6072
6290
|
timerId = setTimeout(stop, ms);
|
|
6073
6291
|
return stop;
|
|
6074
6292
|
};
|
|
6293
|
+
const rowTop = (el, row) => row.getBoundingClientRect().top - el.getBoundingClientRect().top + el.scrollTop;
|
|
6294
|
+
const lastUserRow = (el) => {
|
|
6295
|
+
const users = el.querySelectorAll(`.${p18}-bubble-row[data-role="user"]`);
|
|
6296
|
+
return users[users.length - 1];
|
|
6297
|
+
};
|
|
6298
|
+
const updateTurnSpacer = (el) => {
|
|
6299
|
+
const sp = spacerRef.current;
|
|
6300
|
+
if (!sp) return;
|
|
6301
|
+
const lastUser = scrollAnchor === "turn" ? lastUserRow(el) : void 0;
|
|
6302
|
+
if (!lastUser) {
|
|
6303
|
+
sp.style.minBlockSize = "0px";
|
|
6304
|
+
return;
|
|
6305
|
+
}
|
|
6306
|
+
const turnHeight = el.scrollHeight - rowTop(el, lastUser) - sp.offsetHeight;
|
|
6307
|
+
sp.style.minBlockSize = `${Math.max(0, el.clientHeight - turnHeight - TURN_GAP)}px`;
|
|
6308
|
+
};
|
|
6309
|
+
const anchorTurnToTop = (el) => {
|
|
6310
|
+
const lastUser = lastUserRow(el);
|
|
6311
|
+
if (!lastUser) return;
|
|
6312
|
+
updateTurnSpacer(el);
|
|
6313
|
+
autoPinAtRef.current = performance.now();
|
|
6314
|
+
el.scrollTop = Math.max(0, rowTop(el, lastUser) - TURN_TOP_PAD);
|
|
6315
|
+
syncFade(el);
|
|
6316
|
+
};
|
|
6317
|
+
const anchorTurnSoon = (el, frames) => {
|
|
6318
|
+
anchorTurnToTop(el);
|
|
6319
|
+
let left = frames;
|
|
6320
|
+
let raf = 0;
|
|
6321
|
+
const tick = () => {
|
|
6322
|
+
anchorTurnToTop(el);
|
|
6323
|
+
if (--left > 0) raf = requestAnimationFrame(tick);
|
|
6324
|
+
};
|
|
6325
|
+
if (frames > 0) raf = requestAnimationFrame(tick);
|
|
6326
|
+
return () => cancelAnimationFrame(raf);
|
|
6327
|
+
};
|
|
6075
6328
|
const firstMessageId = messages.value[0]?.id;
|
|
6076
6329
|
useLayoutEffect2(() => {
|
|
6077
6330
|
const el = ref.current;
|
|
6078
6331
|
if (!el) return;
|
|
6079
6332
|
if (messages.value.length === 0) return;
|
|
6080
6333
|
hasHydratedRef.current = true;
|
|
6334
|
+
for (const m of messages.value) if (m.role === "assistant") seenRef.current.add(key(m));
|
|
6081
6335
|
if (!messages.value.some((m) => m.role === "user")) return;
|
|
6336
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6082
6337
|
return pinBottomThroughLayout(el, 300);
|
|
6083
6338
|
}, [firstMessageId]);
|
|
6084
6339
|
const prevLengthRef = useRef5(0);
|
|
@@ -6091,10 +6346,17 @@ function MessageList({
|
|
|
6091
6346
|
if (!hasHydratedRef.current) return;
|
|
6092
6347
|
if (list.slice(prevLength).some((m) => m.role === "user")) {
|
|
6093
6348
|
detachedRef.current = false;
|
|
6349
|
+
setNewCount(0);
|
|
6350
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6094
6351
|
return pinBottomSoon(el, 3);
|
|
6095
6352
|
}
|
|
6096
6353
|
if (!list.some((m) => m.role === "user")) return;
|
|
6097
|
-
if (
|
|
6354
|
+
if (scrollAnchor === "turn") {
|
|
6355
|
+
updateTurnSpacer(el);
|
|
6356
|
+
recomputeNewCount(el);
|
|
6357
|
+
return;
|
|
6358
|
+
}
|
|
6359
|
+
if (detachedRef.current || inInteractionGrace()) return recomputeNewCount(el);
|
|
6098
6360
|
const distanceFromBottom = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
6099
6361
|
if (distanceFromBottom < STICK_THRESHOLD) pinBottom(el);
|
|
6100
6362
|
}, [messages.value.length]);
|
|
@@ -6108,6 +6370,7 @@ function MessageList({
|
|
|
6108
6370
|
if (!hasHydratedRef.current) return;
|
|
6109
6371
|
if (!last || last.id !== prevLastId || last.status !== "streaming") return;
|
|
6110
6372
|
detachedRef.current = false;
|
|
6373
|
+
if (scrollAnchor === "turn") return anchorTurnSoon(el, 6);
|
|
6111
6374
|
return pinBottomSoon(el, 3);
|
|
6112
6375
|
}, [messages.value]);
|
|
6113
6376
|
useEffect7(() => {
|
|
@@ -6116,6 +6379,19 @@ function MessageList({
|
|
|
6116
6379
|
const last = messages.value.at(-1);
|
|
6117
6380
|
if (!last) return;
|
|
6118
6381
|
if (last.status !== "streaming" && !messages.value.some((m) => m.role === "user")) return;
|
|
6382
|
+
if (scrollAnchor === "turn") {
|
|
6383
|
+
const sync = () => {
|
|
6384
|
+
updateTurnSpacer(el);
|
|
6385
|
+
syncFade(el);
|
|
6386
|
+
syncJump(el);
|
|
6387
|
+
recomputeNewCount(el);
|
|
6388
|
+
};
|
|
6389
|
+
sync();
|
|
6390
|
+
if (last.status !== "streaming") return;
|
|
6391
|
+
const obs2 = new MutationObserver(sync);
|
|
6392
|
+
obs2.observe(el, { childList: true, subtree: true, characterData: true });
|
|
6393
|
+
return () => obs2.disconnect();
|
|
6394
|
+
}
|
|
6119
6395
|
const pinIfNear = () => {
|
|
6120
6396
|
if (detachedRef.current || inInteractionGrace()) return;
|
|
6121
6397
|
const distance = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
@@ -6144,9 +6420,11 @@ function MessageList({
|
|
|
6144
6420
|
useEffect7(() => {
|
|
6145
6421
|
const el = ref.current;
|
|
6146
6422
|
if (!el) return;
|
|
6147
|
-
const syncJump = () => setShowJump(el.scrollHeight - el.scrollTop - el.clientHeight > STICK_THRESHOLD * 2);
|
|
6148
6423
|
const onScroll = () => {
|
|
6149
|
-
syncJump();
|
|
6424
|
+
syncJump(el);
|
|
6425
|
+
syncFade(el);
|
|
6426
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight <= 8) markAllSeen();
|
|
6427
|
+
else recomputeNewCount(el);
|
|
6150
6428
|
if (performance.now() - autoPinAtRef.current > 150) {
|
|
6151
6429
|
detachedRef.current = el.scrollHeight - el.scrollTop - el.clientHeight > 8;
|
|
6152
6430
|
}
|
|
@@ -6182,7 +6460,7 @@ function MessageList({
|
|
|
6182
6460
|
el.addEventListener("pointerdown", onPointerDown, { passive: true });
|
|
6183
6461
|
window.addEventListener("pointerup", endInteraction, { passive: true });
|
|
6184
6462
|
window.addEventListener("pointercancel", endInteraction, { passive: true });
|
|
6185
|
-
syncJump();
|
|
6463
|
+
syncJump(el);
|
|
6186
6464
|
return () => {
|
|
6187
6465
|
el.removeEventListener("scroll", onScroll);
|
|
6188
6466
|
el.removeEventListener("wheel", onWheel);
|
|
@@ -6200,7 +6478,35 @@ function MessageList({
|
|
|
6200
6478
|
if (!el) return;
|
|
6201
6479
|
detachedRef.current = false;
|
|
6202
6480
|
pinBottom(el);
|
|
6481
|
+
markAllSeen();
|
|
6203
6482
|
};
|
|
6483
|
+
useEffect7(() => {
|
|
6484
|
+
const el = ref.current;
|
|
6485
|
+
if (!el || typeof IntersectionObserver === "undefined") return;
|
|
6486
|
+
const io = new IntersectionObserver(
|
|
6487
|
+
(entries2) => {
|
|
6488
|
+
let changed = false;
|
|
6489
|
+
for (const entry of entries2) {
|
|
6490
|
+
if (!entry.isIntersecting) continue;
|
|
6491
|
+
const row = entry.target;
|
|
6492
|
+
const id = row.dataset.mid;
|
|
6493
|
+
if (row.dataset.role !== "assistant" || !id) continue;
|
|
6494
|
+
if (!firedSeenRef.current.has(id)) {
|
|
6495
|
+
firedSeenRef.current.add(id);
|
|
6496
|
+
onMessageSeen?.(id);
|
|
6497
|
+
}
|
|
6498
|
+
if (!seenRef.current.has(id)) {
|
|
6499
|
+
seenRef.current.add(id);
|
|
6500
|
+
changed = true;
|
|
6501
|
+
}
|
|
6502
|
+
}
|
|
6503
|
+
if (changed) recomputeNewCount(el);
|
|
6504
|
+
},
|
|
6505
|
+
{ root: el, threshold: 0.01 }
|
|
6506
|
+
);
|
|
6507
|
+
el.querySelectorAll(`.${p18}-bubble-row[data-role="assistant"]`).forEach((row) => io.observe(row));
|
|
6508
|
+
return () => io.disconnect();
|
|
6509
|
+
}, [messages.value.length]);
|
|
6204
6510
|
const rows = [];
|
|
6205
6511
|
let prevDay = "";
|
|
6206
6512
|
const lastId = messages.value.at(-1)?.id;
|
|
@@ -6209,7 +6515,7 @@ function MessageList({
|
|
|
6209
6515
|
);
|
|
6210
6516
|
const markerRow = (marker) => {
|
|
6211
6517
|
if (form && marker.formId === form.form.id) {
|
|
6212
|
-
return /* @__PURE__ */
|
|
6518
|
+
return /* @__PURE__ */ jsx20(
|
|
6213
6519
|
FormGate,
|
|
6214
6520
|
{
|
|
6215
6521
|
form: form.form,
|
|
@@ -6220,7 +6526,7 @@ function MessageList({
|
|
|
6220
6526
|
`gate:${marker.formId}`
|
|
6221
6527
|
);
|
|
6222
6528
|
}
|
|
6223
|
-
return /* @__PURE__ */
|
|
6529
|
+
return /* @__PURE__ */ jsx20(
|
|
6224
6530
|
FormDoneMarker,
|
|
6225
6531
|
{
|
|
6226
6532
|
marker,
|
|
@@ -6243,12 +6549,12 @@ function MessageList({
|
|
|
6243
6549
|
const day = dayKey(m.createdAt);
|
|
6244
6550
|
if (day && day !== prevDay) {
|
|
6245
6551
|
rows.push(
|
|
6246
|
-
/* @__PURE__ */
|
|
6552
|
+
/* @__PURE__ */ jsx20("div", { class: `${p18}-date-divider`, children: /* @__PURE__ */ jsx20("span", { class: `${p18}-date-pill`, title: fullDate(m.createdAt), children: dayLabel(m.createdAt, strings) }) }, `day:${day}`)
|
|
6247
6553
|
);
|
|
6248
6554
|
prevDay = day;
|
|
6249
6555
|
}
|
|
6250
6556
|
rows.push(
|
|
6251
|
-
/* @__PURE__ */
|
|
6557
|
+
/* @__PURE__ */ jsx20(
|
|
6252
6558
|
MessageBubble,
|
|
6253
6559
|
{
|
|
6254
6560
|
message: m,
|
|
@@ -6260,7 +6566,9 @@ function MessageList({
|
|
|
6260
6566
|
interactive: Boolean(idle) && m.id === lastId,
|
|
6261
6567
|
superseded: m.id !== lastId,
|
|
6262
6568
|
tool,
|
|
6263
|
-
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0
|
|
6569
|
+
onRetry: Boolean(idle) && m.id === lastId ? onRetry : void 0,
|
|
6570
|
+
enableMessageFeedback,
|
|
6571
|
+
onFeedback
|
|
6264
6572
|
},
|
|
6265
6573
|
m.id
|
|
6266
6574
|
)
|
|
@@ -6269,22 +6577,36 @@ function MessageList({
|
|
|
6269
6577
|
for (const marker of pendingMarkers) {
|
|
6270
6578
|
rows.push(markerRow(marker));
|
|
6271
6579
|
}
|
|
6272
|
-
return /* @__PURE__ */
|
|
6273
|
-
/* @__PURE__ */
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6580
|
+
return /* @__PURE__ */ jsxs16("div", { class: `${p18}-list-wrap`, children: [
|
|
6581
|
+
/* @__PURE__ */ jsxs16(
|
|
6582
|
+
"div",
|
|
6583
|
+
{
|
|
6584
|
+
ref,
|
|
6585
|
+
class: `${p18}-list${scrollFade ? ` ${p18}-list--fade` : ""}`,
|
|
6586
|
+
role: "log",
|
|
6587
|
+
"aria-live": "polite",
|
|
6588
|
+
"aria-relevant": "additions text",
|
|
6589
|
+
children: [
|
|
6590
|
+
loading && messages.value.length === 0 ? /* @__PURE__ */ jsx20("div", { class: `${p18}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
|
|
6591
|
+
rows,
|
|
6592
|
+
form && !inlineForm ? /* @__PURE__ */ jsx20(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null,
|
|
6593
|
+
scrollAnchor === "turn" ? /* @__PURE__ */ jsx20("div", { ref: spacerRef, class: `${p18}-turn-spacer`, "aria-hidden": "true" }) : null
|
|
6594
|
+
]
|
|
6595
|
+
}
|
|
6596
|
+
),
|
|
6597
|
+
showJump ? /* @__PURE__ */ jsxs16(
|
|
6279
6598
|
"button",
|
|
6280
6599
|
{
|
|
6281
6600
|
type: "button",
|
|
6282
|
-
class: `${
|
|
6601
|
+
class: `${p18}-jump${newCount > 0 ? ` ${p18}-jump--new` : ""}`,
|
|
6283
6602
|
onClick: jumpToBottom,
|
|
6284
|
-
"aria-label": strings.scrollToBottom,
|
|
6285
|
-
title: strings.scrollToBottom,
|
|
6603
|
+
"aria-label": newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6604
|
+
title: newCount > 0 ? `${newCount} ${strings.newMessages}` : strings.scrollToBottom,
|
|
6286
6605
|
"data-testid": TID.scrollToBottom,
|
|
6287
|
-
children:
|
|
6606
|
+
children: [
|
|
6607
|
+
newCount > 0 ? /* @__PURE__ */ jsx20("span", { class: `${p18}-jump-count`, children: newCount }) : null,
|
|
6608
|
+
/* @__PURE__ */ jsx20(ChevronDownIcon, {})
|
|
6609
|
+
]
|
|
6288
6610
|
}
|
|
6289
6611
|
) : null
|
|
6290
6612
|
] });
|
|
@@ -6313,7 +6635,7 @@ function dayLabel(createdAt, strings) {
|
|
|
6313
6635
|
}
|
|
6314
6636
|
|
|
6315
6637
|
// src/ui/conversation-list.tsx
|
|
6316
|
-
import { useEffect as useEffect8, useState as
|
|
6638
|
+
import { useEffect as useEffect8, useState as useState9 } from "preact/hooks";
|
|
6317
6639
|
|
|
6318
6640
|
// src/ui/history-groups.ts
|
|
6319
6641
|
var HISTORY_BUCKETS = ["today", "yesterday", "lastWeek", "older"];
|
|
@@ -6343,7 +6665,7 @@ function startOfDay(ms) {
|
|
|
6343
6665
|
}
|
|
6344
6666
|
|
|
6345
6667
|
// src/ui/conversation-list.tsx
|
|
6346
|
-
import { Fragment as Fragment5, jsx as
|
|
6668
|
+
import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs17 } from "preact/jsx-runtime";
|
|
6347
6669
|
var log12 = logger.scope("history");
|
|
6348
6670
|
var DEFAULT_SKELETON_ROWS = 3;
|
|
6349
6671
|
var MAX_SKELETON_ROWS = 6;
|
|
@@ -6370,10 +6692,10 @@ function ConversationList({
|
|
|
6370
6692
|
onSelect,
|
|
6371
6693
|
onNewConversation
|
|
6372
6694
|
}) {
|
|
6373
|
-
const
|
|
6695
|
+
const p36 = BRAND.cssPrefix;
|
|
6374
6696
|
const seed = transport.peekConversations({ visitorId });
|
|
6375
|
-
const [state, setState] =
|
|
6376
|
-
const [conversations, setChats] =
|
|
6697
|
+
const [state, setState] = useState9(seed ? "loaded" : "loading");
|
|
6698
|
+
const [conversations, setChats] = useState9(seed?.conversations ?? []);
|
|
6377
6699
|
useEffect8(() => {
|
|
6378
6700
|
let cancelled = false;
|
|
6379
6701
|
transport.listConversations({ visitorId }).then((res) => {
|
|
@@ -6391,32 +6713,32 @@ function ConversationList({
|
|
|
6391
6713
|
cancelled = true;
|
|
6392
6714
|
};
|
|
6393
6715
|
}, [transport, visitorId, persistence]);
|
|
6394
|
-
const newChatButton = onNewConversation ? /* @__PURE__ */
|
|
6716
|
+
const newChatButton = onNewConversation ? /* @__PURE__ */ jsx21("div", { class: `${p36}-history-footer`, children: /* @__PURE__ */ jsxs17(
|
|
6395
6717
|
"button",
|
|
6396
6718
|
{
|
|
6397
6719
|
type: "button",
|
|
6398
|
-
class: `${
|
|
6720
|
+
class: `${p36}-history-new`,
|
|
6399
6721
|
onClick: onNewConversation,
|
|
6400
6722
|
"data-testid": TID.sidebarNewConversation,
|
|
6401
6723
|
children: [
|
|
6402
|
-
/* @__PURE__ */
|
|
6724
|
+
/* @__PURE__ */ jsx21(PlusIcon, {}),
|
|
6403
6725
|
strings.newConversation
|
|
6404
6726
|
]
|
|
6405
6727
|
}
|
|
6406
6728
|
) }) : null;
|
|
6407
6729
|
if (state === "loading") {
|
|
6408
6730
|
const rows = Math.min(persistence.loadHistoryCount() ?? DEFAULT_SKELETON_ROWS, MAX_SKELETON_ROWS);
|
|
6409
|
-
return /* @__PURE__ */
|
|
6410
|
-
/* @__PURE__ */
|
|
6411
|
-
/* @__PURE__ */
|
|
6412
|
-
/* @__PURE__ */
|
|
6413
|
-
/* @__PURE__ */
|
|
6414
|
-
/* @__PURE__ */
|
|
6415
|
-
/* @__PURE__ */
|
|
6416
|
-
/* @__PURE__ */
|
|
6417
|
-
/* @__PURE__ */
|
|
6731
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6732
|
+
/* @__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: [
|
|
6733
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-heading`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-heading` }) }),
|
|
6734
|
+
/* @__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: [
|
|
6735
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-avatar ${p36}-skeleton` }),
|
|
6736
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6737
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6738
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-title`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-title` }) }),
|
|
6739
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-time`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-time` }) })
|
|
6418
6740
|
] }),
|
|
6419
|
-
/* @__PURE__ */
|
|
6741
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-row`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-history-preview`, children: /* @__PURE__ */ jsx21("span", { class: `${p36}-skeleton ${p36}-skeleton-preview` }) }) })
|
|
6420
6742
|
] })
|
|
6421
6743
|
] }, i)) })
|
|
6422
6744
|
] }) }),
|
|
@@ -6424,36 +6746,36 @@ function ConversationList({
|
|
|
6424
6746
|
] });
|
|
6425
6747
|
}
|
|
6426
6748
|
if (state === "error" || conversations.length === 0) {
|
|
6427
|
-
return /* @__PURE__ */
|
|
6428
|
-
/* @__PURE__ */
|
|
6749
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6750
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-empty`, children: strings.historyEmpty }),
|
|
6429
6751
|
newChatButton
|
|
6430
6752
|
] });
|
|
6431
6753
|
}
|
|
6432
6754
|
const now = Date.now();
|
|
6433
6755
|
const groups = groupByBucket(now, conversations);
|
|
6434
|
-
return /* @__PURE__ */
|
|
6435
|
-
/* @__PURE__ */
|
|
6436
|
-
/* @__PURE__ */
|
|
6437
|
-
/* @__PURE__ */
|
|
6756
|
+
return /* @__PURE__ */ jsxs17(Fragment5, { children: [
|
|
6757
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history`, role: "list", children: groups.map((group) => /* @__PURE__ */ jsxs17("div", { class: `${p36}-history-group`, children: [
|
|
6758
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-heading`, children: strings[BUCKET_TO_STRING[group.bucket]] }),
|
|
6759
|
+
/* @__PURE__ */ jsx21("div", { class: `${p36}-history-card`, children: group.conversations.map((chat) => /* @__PURE__ */ jsxs17(
|
|
6438
6760
|
"button",
|
|
6439
6761
|
{
|
|
6440
6762
|
type: "button",
|
|
6441
6763
|
role: "listitem",
|
|
6442
|
-
class: `${
|
|
6764
|
+
class: `${p36}-history-item`,
|
|
6443
6765
|
onClick: () => onSelect(chat),
|
|
6444
6766
|
"data-closed": chat.canContinue ? void 0 : "true",
|
|
6445
|
-
"data-unread":
|
|
6767
|
+
"data-unread": chat.hasUnread ? "true" : void 0,
|
|
6446
6768
|
"data-testid": tid(TID.historyItem, chat.conversationId),
|
|
6447
6769
|
children: [
|
|
6448
|
-
/* @__PURE__ */
|
|
6449
|
-
/* @__PURE__ */
|
|
6450
|
-
/* @__PURE__ */
|
|
6451
|
-
/* @__PURE__ */
|
|
6452
|
-
/* @__PURE__ */
|
|
6770
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx21(MessageIcon, {}) }),
|
|
6771
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-body`, children: [
|
|
6772
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6773
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-title`, children: chat.title }),
|
|
6774
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-time`, children: rowTime(chat.lastMessageAt, now, locale) })
|
|
6453
6775
|
] }),
|
|
6454
|
-
/* @__PURE__ */
|
|
6455
|
-
/* @__PURE__ */
|
|
6456
|
-
|
|
6776
|
+
/* @__PURE__ */ jsxs17("span", { class: `${p36}-history-row`, children: [
|
|
6777
|
+
/* @__PURE__ */ jsx21("span", { class: `${p36}-history-preview`, children: chat.preview ?? (chat.canContinue ? strings.historyContinue : strings.conversationClosed) }),
|
|
6778
|
+
chat.hasUnread ? /* @__PURE__ */ jsx21("span", { class: `${p36}-history-dot` }) : null
|
|
6457
6779
|
] })
|
|
6458
6780
|
] })
|
|
6459
6781
|
]
|
|
@@ -6466,15 +6788,15 @@ function ConversationList({
|
|
|
6466
6788
|
}
|
|
6467
6789
|
|
|
6468
6790
|
// src/ui/suggestions.tsx
|
|
6469
|
-
import { jsx as
|
|
6470
|
-
var
|
|
6791
|
+
import { jsx as jsx22 } from "preact/jsx-runtime";
|
|
6792
|
+
var p19 = BRAND.cssPrefix;
|
|
6471
6793
|
function Suggestions({ suggestions, onPick }) {
|
|
6472
6794
|
if (suggestions.length === 0) return null;
|
|
6473
|
-
return /* @__PURE__ */
|
|
6795
|
+
return /* @__PURE__ */ jsx22("div", { class: `${p19}-suggestions`, role: "group", "aria-label": "Suggested replies", children: suggestions.map((s, i) => /* @__PURE__ */ jsx22(
|
|
6474
6796
|
"button",
|
|
6475
6797
|
{
|
|
6476
6798
|
type: "button",
|
|
6477
|
-
class: `${
|
|
6799
|
+
class: `${p19}-suggestion`,
|
|
6478
6800
|
onClick: () => onPick(s),
|
|
6479
6801
|
"data-testid": tid(TID.suggestion, i),
|
|
6480
6802
|
children: s.label
|
|
@@ -6484,8 +6806,8 @@ function Suggestions({ suggestions, onPick }) {
|
|
|
6484
6806
|
}
|
|
6485
6807
|
|
|
6486
6808
|
// src/ui/panel.tsx
|
|
6487
|
-
import { Fragment as Fragment6, jsx as
|
|
6488
|
-
var
|
|
6809
|
+
import { Fragment as Fragment6, jsx as jsx23, jsxs as jsxs18 } from "preact/jsx-runtime";
|
|
6810
|
+
var p20 = BRAND.cssPrefix;
|
|
6489
6811
|
function Panel(props2) {
|
|
6490
6812
|
const { options, onClose } = props2;
|
|
6491
6813
|
const s = options.strings;
|
|
@@ -6509,18 +6831,18 @@ function Panel(props2) {
|
|
|
6509
6831
|
}, []);
|
|
6510
6832
|
const { visible: dragOver } = useFileDrop({ containerRef, onDrop: onDropItems });
|
|
6511
6833
|
useDragMove(containerRef.current, options.mode === "modal");
|
|
6512
|
-
return /* @__PURE__ */
|
|
6834
|
+
return /* @__PURE__ */ jsxs18(
|
|
6513
6835
|
"div",
|
|
6514
6836
|
{
|
|
6515
6837
|
ref: containerRef,
|
|
6516
|
-
class: `${
|
|
6838
|
+
class: `${p20}-panel`,
|
|
6517
6839
|
role: "dialog",
|
|
6518
6840
|
"aria-modal": "false",
|
|
6519
6841
|
"aria-label": s.panelTitle,
|
|
6520
6842
|
style: { position: "relative" },
|
|
6521
6843
|
"data-testid": TID.panel,
|
|
6522
6844
|
children: [
|
|
6523
|
-
/* @__PURE__ */
|
|
6845
|
+
/* @__PURE__ */ jsx23(
|
|
6524
6846
|
PanelContent,
|
|
6525
6847
|
{
|
|
6526
6848
|
...props2,
|
|
@@ -6529,7 +6851,7 @@ function Panel(props2) {
|
|
|
6529
6851
|
composerAttachApiRef
|
|
6530
6852
|
}
|
|
6531
6853
|
),
|
|
6532
|
-
/* @__PURE__ */
|
|
6854
|
+
/* @__PURE__ */ jsx23(PoweredByBar, { poweredBy: props2.options.poweredBy })
|
|
6533
6855
|
]
|
|
6534
6856
|
}
|
|
6535
6857
|
);
|
|
@@ -6568,6 +6890,8 @@ function PanelContent(props2) {
|
|
|
6568
6890
|
onFormFill,
|
|
6569
6891
|
tool,
|
|
6570
6892
|
onRetry,
|
|
6893
|
+
onMessageFeedback,
|
|
6894
|
+
onMessageSeen,
|
|
6571
6895
|
containerEl,
|
|
6572
6896
|
dragOver,
|
|
6573
6897
|
composerAttachApiRef
|
|
@@ -6577,9 +6901,9 @@ function PanelContent(props2) {
|
|
|
6577
6901
|
if (activeForm) {
|
|
6578
6902
|
composerArea = null;
|
|
6579
6903
|
} else if (canSend) {
|
|
6580
|
-
composerArea = /* @__PURE__ */
|
|
6581
|
-
/* @__PURE__ */
|
|
6582
|
-
/* @__PURE__ */
|
|
6904
|
+
composerArea = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6905
|
+
/* @__PURE__ */ jsx23(Suggestions, { suggestions, onPick: onSuggestion }),
|
|
6906
|
+
/* @__PURE__ */ jsx23(
|
|
6583
6907
|
Composer,
|
|
6584
6908
|
{
|
|
6585
6909
|
options,
|
|
@@ -6594,10 +6918,10 @@ function PanelContent(props2) {
|
|
|
6594
6918
|
)
|
|
6595
6919
|
] });
|
|
6596
6920
|
} else {
|
|
6597
|
-
composerArea = /* @__PURE__ */
|
|
6921
|
+
composerArea = /* @__PURE__ */ jsx23(ReadOnlyBanner, { label: s.conversationClosed, ctaLabel: s.startNewConversation, onNewConversation: onClear });
|
|
6598
6922
|
}
|
|
6599
|
-
return /* @__PURE__ */
|
|
6600
|
-
view === "history" ? /* @__PURE__ */
|
|
6923
|
+
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6924
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6601
6925
|
HistoryHeader,
|
|
6602
6926
|
{
|
|
6603
6927
|
strings: s,
|
|
@@ -6605,22 +6929,22 @@ function PanelContent(props2) {
|
|
|
6605
6929
|
onClose,
|
|
6606
6930
|
showClose: canShowClose(options.mode, panelSize, options.actions)
|
|
6607
6931
|
}
|
|
6608
|
-
) : /* @__PURE__ */
|
|
6609
|
-
onBack ? /* @__PURE__ */
|
|
6932
|
+
) : /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, "data-testid": TID.panelHeader, children: [
|
|
6933
|
+
onBack ? /* @__PURE__ */ jsx23(
|
|
6610
6934
|
"button",
|
|
6611
6935
|
{
|
|
6612
6936
|
type: "button",
|
|
6613
|
-
class: `${
|
|
6937
|
+
class: `${p20}-icon-btn`,
|
|
6614
6938
|
onClick: onBack,
|
|
6615
6939
|
"aria-label": s.moduleBack,
|
|
6616
6940
|
title: s.moduleBack,
|
|
6617
|
-
children: /* @__PURE__ */
|
|
6941
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6618
6942
|
}
|
|
6619
6943
|
) : null,
|
|
6620
|
-
agent ? /* @__PURE__ */
|
|
6621
|
-
/* @__PURE__ */
|
|
6944
|
+
agent ? /* @__PURE__ */ jsx23(AgentBadge, { agent, strings: s }) : /* @__PURE__ */ jsx23("h1", { children: s.panelTitle }),
|
|
6945
|
+
/* @__PURE__ */ jsx23(HeaderActions, { panelProps: props2, variant: "chat" })
|
|
6622
6946
|
] }),
|
|
6623
|
-
view === "history" ? /* @__PURE__ */
|
|
6947
|
+
view === "history" ? /* @__PURE__ */ jsx23(
|
|
6624
6948
|
ConversationList,
|
|
6625
6949
|
{
|
|
6626
6950
|
transport,
|
|
@@ -6631,9 +6955,9 @@ function PanelContent(props2) {
|
|
|
6631
6955
|
onSelect: (conversation) => onSelectHistoryConversation(conversation.conversationId),
|
|
6632
6956
|
onNewConversation
|
|
6633
6957
|
}
|
|
6634
|
-
) : /* @__PURE__ */
|
|
6635
|
-
/* @__PURE__ */
|
|
6636
|
-
/* @__PURE__ */
|
|
6958
|
+
) : /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
6959
|
+
/* @__PURE__ */ jsx23(DropZone, { visible: dragOver, strings: s }),
|
|
6960
|
+
/* @__PURE__ */ jsx23(
|
|
6637
6961
|
MessageList,
|
|
6638
6962
|
{
|
|
6639
6963
|
messagesSig,
|
|
@@ -6642,6 +6966,11 @@ function PanelContent(props2) {
|
|
|
6642
6966
|
showReasoning: options.showReasoning,
|
|
6643
6967
|
showToolCalls: options.showToolCalls,
|
|
6644
6968
|
showSources: options.showSources,
|
|
6969
|
+
scrollFade: options.scrollFade,
|
|
6970
|
+
scrollAnchor: options.scrollAnchor,
|
|
6971
|
+
enableMessageFeedback: options.enableMessageFeedback,
|
|
6972
|
+
onFeedback: onMessageFeedback,
|
|
6973
|
+
onMessageSeen,
|
|
6645
6974
|
loading: loadingMessages,
|
|
6646
6975
|
idle: !isStreaming,
|
|
6647
6976
|
tool,
|
|
@@ -6652,9 +6981,9 @@ function PanelContent(props2) {
|
|
|
6652
6981
|
}
|
|
6653
6982
|
),
|
|
6654
6983
|
composerArea,
|
|
6655
|
-
/* @__PURE__ */
|
|
6984
|
+
/* @__PURE__ */ jsx23(ComposerFooter, { disclaimer: options.composerDisclaimer })
|
|
6656
6985
|
] }),
|
|
6657
|
-
options.size.resize?.enabled ? /* @__PURE__ */
|
|
6986
|
+
options.size.resize?.enabled ? /* @__PURE__ */ jsx23(
|
|
6658
6987
|
ResizeGrip,
|
|
6659
6988
|
{
|
|
6660
6989
|
panelEl: containerEl,
|
|
@@ -6673,28 +7002,28 @@ function HistoryHeader({
|
|
|
6673
7002
|
onClose,
|
|
6674
7003
|
showClose
|
|
6675
7004
|
}) {
|
|
6676
|
-
return /* @__PURE__ */
|
|
6677
|
-
/* @__PURE__ */
|
|
7005
|
+
return /* @__PURE__ */ jsxs18("header", { class: `${p20}-header`, children: [
|
|
7006
|
+
/* @__PURE__ */ jsx23(
|
|
6678
7007
|
"button",
|
|
6679
7008
|
{
|
|
6680
7009
|
type: "button",
|
|
6681
|
-
class: `${
|
|
7010
|
+
class: `${p20}-icon-btn`,
|
|
6682
7011
|
onClick: onBack,
|
|
6683
7012
|
"aria-label": strings.historyBack,
|
|
6684
7013
|
title: strings.historyBack,
|
|
6685
|
-
children: /* @__PURE__ */
|
|
7014
|
+
children: /* @__PURE__ */ jsx23(BackIcon, {})
|
|
6686
7015
|
}
|
|
6687
7016
|
),
|
|
6688
|
-
/* @__PURE__ */
|
|
6689
|
-
showClose ? /* @__PURE__ */
|
|
7017
|
+
/* @__PURE__ */ jsx23("h1", { children: strings.historyTitle }),
|
|
7018
|
+
showClose ? /* @__PURE__ */ jsx23(
|
|
6690
7019
|
"button",
|
|
6691
7020
|
{
|
|
6692
7021
|
type: "button",
|
|
6693
|
-
class: `${
|
|
7022
|
+
class: `${p20}-icon-btn`,
|
|
6694
7023
|
onClick: onClose,
|
|
6695
7024
|
"aria-label": strings.close,
|
|
6696
7025
|
title: strings.close,
|
|
6697
|
-
children: /* @__PURE__ */
|
|
7026
|
+
children: /* @__PURE__ */ jsx23(CloseIcon, {})
|
|
6698
7027
|
}
|
|
6699
7028
|
) : null
|
|
6700
7029
|
] });
|
|
@@ -6704,28 +7033,28 @@ function ReadOnlyBanner({
|
|
|
6704
7033
|
ctaLabel,
|
|
6705
7034
|
onNewConversation
|
|
6706
7035
|
}) {
|
|
6707
|
-
return /* @__PURE__ */
|
|
6708
|
-
/* @__PURE__ */
|
|
6709
|
-
/* @__PURE__ */
|
|
7036
|
+
return /* @__PURE__ */ jsxs18("div", { class: `${p20}-readonly-banner`, role: "note", children: [
|
|
7037
|
+
/* @__PURE__ */ jsx23("span", { class: `${p20}-readonly-label`, children: label }),
|
|
7038
|
+
/* @__PURE__ */ jsx23("button", { type: "button", class: `${p20}-readonly-cta`, onClick: onNewConversation, children: ctaLabel })
|
|
6710
7039
|
] });
|
|
6711
7040
|
}
|
|
6712
7041
|
function ComposerFooter({ disclaimer }) {
|
|
6713
7042
|
if (!disclaimer) return null;
|
|
6714
|
-
return /* @__PURE__ */
|
|
7043
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-composer-footer`, children: /* @__PURE__ */ jsx23("div", { class: `${p20}-disclaimer`, children: disclaimer }) });
|
|
6715
7044
|
}
|
|
6716
7045
|
function PoweredByBar({ poweredBy }) {
|
|
6717
7046
|
if (!poweredBy) return null;
|
|
6718
|
-
return /* @__PURE__ */
|
|
7047
|
+
return /* @__PURE__ */ jsx23("div", { class: `${p20}-poweredby-bar`, children: /* @__PURE__ */ jsx23(PoweredBy, { logoUrl: poweredBy.logoUrl, text: poweredBy.text, href: poweredBy.href }) });
|
|
6719
7048
|
}
|
|
6720
7049
|
function PoweredBy({ logoUrl, text, href }) {
|
|
6721
|
-
const inner = /* @__PURE__ */
|
|
6722
|
-
logoUrl ? /* @__PURE__ */
|
|
6723
|
-
text ? /* @__PURE__ */
|
|
7050
|
+
const inner = /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
7051
|
+
logoUrl ? /* @__PURE__ */ jsx23("img", { class: `${p20}-poweredby-logo`, src: logoUrl, alt: "", loading: "lazy" }) : null,
|
|
7052
|
+
text ? /* @__PURE__ */ jsx23("span", { children: text }) : null
|
|
6724
7053
|
] });
|
|
6725
7054
|
if (href) {
|
|
6726
|
-
return /* @__PURE__ */
|
|
7055
|
+
return /* @__PURE__ */ jsx23("a", { class: `${p20}-poweredby`, href, target: "_blank", rel: "noopener noreferrer", children: inner });
|
|
6727
7056
|
}
|
|
6728
|
-
return /* @__PURE__ */
|
|
7057
|
+
return /* @__PURE__ */ jsx23("span", { class: `${p20}-poweredby`, children: inner });
|
|
6729
7058
|
}
|
|
6730
7059
|
|
|
6731
7060
|
// src/ui/form/form-controller.ts
|
|
@@ -6808,34 +7137,34 @@ function whenPasses(form, d) {
|
|
|
6808
7137
|
}
|
|
6809
7138
|
|
|
6810
7139
|
// src/ui/sidebar.tsx
|
|
6811
|
-
import { Fragment as Fragment7, jsx as
|
|
7140
|
+
import { Fragment as Fragment7, jsx as jsx24, jsxs as jsxs19 } from "preact/jsx-runtime";
|
|
6812
7141
|
function Sidebar(props2) {
|
|
6813
|
-
const
|
|
7142
|
+
const p36 = BRAND.cssPrefix;
|
|
6814
7143
|
const { site, blocks, strings, collapsed } = props2;
|
|
6815
7144
|
const navigation = blocks?.navigation ?? [];
|
|
6816
7145
|
const linkCards = blocks?.linkCards ?? [];
|
|
6817
7146
|
const toggleLabel = collapsed ? strings.expandSidebar : strings.collapseSidebar;
|
|
6818
|
-
return /* @__PURE__ */
|
|
6819
|
-
/* @__PURE__ */
|
|
6820
|
-
/* @__PURE__ */
|
|
6821
|
-
/* @__PURE__ */
|
|
7147
|
+
return /* @__PURE__ */ jsxs19("aside", { class: `${p36}-sidebar`, "data-collapsed": collapsed ? "true" : "false", "data-testid": TID.sidebar, children: [
|
|
7148
|
+
/* @__PURE__ */ jsxs19("div", { class: `${p36}-sidebar-header`, children: [
|
|
7149
|
+
/* @__PURE__ */ jsx24(SidebarBrand, { site }),
|
|
7150
|
+
/* @__PURE__ */ jsx24(
|
|
6822
7151
|
"button",
|
|
6823
7152
|
{
|
|
6824
7153
|
type: "button",
|
|
6825
|
-
class: `${
|
|
7154
|
+
class: `${p36}-sidebar-toggle`,
|
|
6826
7155
|
"aria-label": toggleLabel,
|
|
6827
7156
|
"aria-expanded": collapsed ? "false" : "true",
|
|
6828
7157
|
title: toggleLabel,
|
|
6829
7158
|
onClick: props2.onToggleCollapsed,
|
|
6830
7159
|
"data-testid": TID.sidebarToggle,
|
|
6831
|
-
children: /* @__PURE__ */
|
|
7160
|
+
children: /* @__PURE__ */ jsx24(SidebarToggleIcon, { collapsed })
|
|
6832
7161
|
}
|
|
6833
7162
|
)
|
|
6834
7163
|
] }),
|
|
6835
|
-
collapsed ? null : /* @__PURE__ */
|
|
6836
|
-
navigation.length > 0 ? /* @__PURE__ */
|
|
6837
|
-
linkCards.length > 0 ? /* @__PURE__ */
|
|
6838
|
-
props2.showConversations ? /* @__PURE__ */
|
|
7164
|
+
collapsed ? null : /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
7165
|
+
navigation.length > 0 ? /* @__PURE__ */ jsx24("nav", { class: `${p36}-sidebar-section`, "data-section": "navigation", children: /* @__PURE__ */ jsx24(SidebarNav, { items: navigation }) }) : null,
|
|
7166
|
+
linkCards.length > 0 ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-section`, "data-section": "link-cards", children: /* @__PURE__ */ jsx24(SidebarCards, { items: linkCards }) }) : null,
|
|
7167
|
+
props2.showConversations ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-conversations`, children: /* @__PURE__ */ jsx24(
|
|
6839
7168
|
ConversationList,
|
|
6840
7169
|
{
|
|
6841
7170
|
transport: props2.transport,
|
|
@@ -6851,18 +7180,18 @@ function Sidebar(props2) {
|
|
|
6851
7180
|
] });
|
|
6852
7181
|
}
|
|
6853
7182
|
function SidebarBrand({ site }) {
|
|
6854
|
-
const
|
|
7183
|
+
const p36 = BRAND.cssPrefix;
|
|
6855
7184
|
if (site?.logo?.url) {
|
|
6856
7185
|
const alt = site.logo.alt ?? site.title ?? "Logo";
|
|
6857
|
-
return /* @__PURE__ */
|
|
6858
|
-
site.logoDark?.url ? /* @__PURE__ */
|
|
6859
|
-
/* @__PURE__ */
|
|
7186
|
+
return /* @__PURE__ */ jsxs19("picture", { children: [
|
|
7187
|
+
site.logoDark?.url ? /* @__PURE__ */ jsx24("source", { srcset: site.logoDark.url, media: "(prefers-color-scheme: dark)" }) : null,
|
|
7188
|
+
/* @__PURE__ */ jsx24("img", { class: `${p36}-sidebar-logo`, src: site.logo.url, alt })
|
|
6860
7189
|
] });
|
|
6861
7190
|
}
|
|
6862
|
-
return /* @__PURE__ */
|
|
7191
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-title`, children: site?.title ?? BRAND.name });
|
|
6863
7192
|
}
|
|
6864
7193
|
function SidebarToggleIcon({ collapsed }) {
|
|
6865
|
-
return /* @__PURE__ */
|
|
7194
|
+
return /* @__PURE__ */ jsx24(
|
|
6866
7195
|
"svg",
|
|
6867
7196
|
{
|
|
6868
7197
|
width: "16",
|
|
@@ -6872,38 +7201,38 @@ function SidebarToggleIcon({ collapsed }) {
|
|
|
6872
7201
|
stroke: "currentColor",
|
|
6873
7202
|
"stroke-width": "2",
|
|
6874
7203
|
"aria-hidden": "true",
|
|
6875
|
-
children: collapsed ? /* @__PURE__ */
|
|
7204
|
+
children: collapsed ? /* @__PURE__ */ jsx24("polyline", { points: "9 6 15 12 9 18" }) : /* @__PURE__ */ jsx24("polyline", { points: "15 6 9 12 15 18" })
|
|
6876
7205
|
}
|
|
6877
7206
|
);
|
|
6878
7207
|
}
|
|
6879
7208
|
function SidebarNav({ items }) {
|
|
6880
|
-
const
|
|
6881
|
-
return /* @__PURE__ */
|
|
7209
|
+
const p36 = BRAND.cssPrefix;
|
|
7210
|
+
return /* @__PURE__ */ jsx24("ul", { class: `${p36}-sidebar-nav`, children: items.map((item) => /* @__PURE__ */ jsx24("li", { children: /* @__PURE__ */ jsxs19(
|
|
6882
7211
|
"a",
|
|
6883
7212
|
{
|
|
6884
|
-
class: `${
|
|
7213
|
+
class: `${p36}-sidebar-nav-item`,
|
|
6885
7214
|
href: item.href,
|
|
6886
7215
|
target: item.href ? "_blank" : void 0,
|
|
6887
7216
|
rel: item.href ? "noreferrer" : void 0,
|
|
6888
7217
|
children: [
|
|
6889
|
-
item.icon ? /* @__PURE__ */
|
|
6890
|
-
/* @__PURE__ */
|
|
7218
|
+
item.icon ? /* @__PURE__ */ jsx24("span", { class: `${p36}-sidebar-nav-icon`, "data-icon": item.icon }) : null,
|
|
7219
|
+
/* @__PURE__ */ jsx24("span", { class: `${p36}-sidebar-nav-label`, children: item.label })
|
|
6891
7220
|
]
|
|
6892
7221
|
}
|
|
6893
7222
|
) }, item.id ?? item.label)) });
|
|
6894
7223
|
}
|
|
6895
7224
|
function SidebarCards({ items }) {
|
|
6896
|
-
const
|
|
6897
|
-
return /* @__PURE__ */
|
|
7225
|
+
const p36 = BRAND.cssPrefix;
|
|
7226
|
+
return /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-cards`, children: items.map((item) => /* @__PURE__ */ jsxs19(
|
|
6898
7227
|
"a",
|
|
6899
7228
|
{
|
|
6900
|
-
class: `${
|
|
7229
|
+
class: `${p36}-sidebar-card`,
|
|
6901
7230
|
href: item.href,
|
|
6902
7231
|
target: item.href ? "_blank" : void 0,
|
|
6903
7232
|
rel: item.href ? "noreferrer" : void 0,
|
|
6904
7233
|
children: [
|
|
6905
|
-
/* @__PURE__ */
|
|
6906
|
-
item.description ? /* @__PURE__ */
|
|
7234
|
+
/* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-card-label`, children: item.label }),
|
|
7235
|
+
item.description ? /* @__PURE__ */ jsx24("div", { class: `${p36}-sidebar-card-desc`, children: item.description }) : null
|
|
6907
7236
|
]
|
|
6908
7237
|
},
|
|
6909
7238
|
item.id ?? item.label
|
|
@@ -6911,11 +7240,11 @@ function SidebarCards({ items }) {
|
|
|
6911
7240
|
}
|
|
6912
7241
|
|
|
6913
7242
|
// src/ui/page-shell.tsx
|
|
6914
|
-
import { jsx as
|
|
6915
|
-
var
|
|
7243
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "preact/jsx-runtime";
|
|
7244
|
+
var p21 = BRAND.cssPrefix;
|
|
6916
7245
|
function PageShell(props2) {
|
|
6917
|
-
return /* @__PURE__ */
|
|
6918
|
-
/* @__PURE__ */
|
|
7246
|
+
return /* @__PURE__ */ jsxs20("main", { class: `${p21}-page-shell`, "data-sidebar-collapsed": props2.sidebarCollapsed ? "true" : "false", children: [
|
|
7247
|
+
/* @__PURE__ */ jsx25(
|
|
6919
7248
|
Sidebar,
|
|
6920
7249
|
{
|
|
6921
7250
|
site: props2.site,
|
|
@@ -6932,7 +7261,7 @@ function PageShell(props2) {
|
|
|
6932
7261
|
onToggleCollapsed: props2.onToggleSidebarCollapsed
|
|
6933
7262
|
}
|
|
6934
7263
|
),
|
|
6935
|
-
/* @__PURE__ */
|
|
7264
|
+
/* @__PURE__ */ jsx25("section", { class: `${p21}-page-chat`, "aria-label": "Chat", children: props2.children })
|
|
6936
7265
|
] });
|
|
6937
7266
|
}
|
|
6938
7267
|
|
|
@@ -6979,83 +7308,83 @@ var chatLayout = {
|
|
|
6979
7308
|
};
|
|
6980
7309
|
|
|
6981
7310
|
// src/ui/modules/help.tsx
|
|
6982
|
-
import { useEffect as useEffect10, useMemo as useMemo2, useState as
|
|
7311
|
+
import { useEffect as useEffect10, useMemo as useMemo2, useState as useState10 } from "preact/hooks";
|
|
6983
7312
|
|
|
6984
7313
|
// src/ui/back-header.tsx
|
|
6985
|
-
import { jsx as
|
|
6986
|
-
var
|
|
7314
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "preact/jsx-runtime";
|
|
7315
|
+
var p22 = BRAND.cssPrefix;
|
|
6987
7316
|
function TitleBar({ title, actions }) {
|
|
6988
|
-
return /* @__PURE__ */
|
|
6989
|
-
/* @__PURE__ */
|
|
6990
|
-
/* @__PURE__ */
|
|
6991
|
-
actions ?? /* @__PURE__ */
|
|
7317
|
+
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-variant": "title", children: [
|
|
7318
|
+
/* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" }),
|
|
7319
|
+
/* @__PURE__ */ jsx26("h1", { class: `${p22}-back-title`, children: title }),
|
|
7320
|
+
actions ?? /* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
|
|
6992
7321
|
] });
|
|
6993
7322
|
}
|
|
6994
7323
|
function BackHeader({ title, backLabel, onBack, actions, testid }) {
|
|
6995
|
-
return /* @__PURE__ */
|
|
6996
|
-
/* @__PURE__ */
|
|
6997
|
-
/* @__PURE__ */
|
|
6998
|
-
actions ?? /* @__PURE__ */
|
|
7324
|
+
return /* @__PURE__ */ jsxs21("header", { class: `${p22}-back-header`, "data-testid": testid, children: [
|
|
7325
|
+
/* @__PURE__ */ jsx26("button", { type: "button", class: `${p22}-icon-btn`, onClick: onBack, "aria-label": backLabel, title: backLabel, children: /* @__PURE__ */ jsx26(BackIcon, {}) }),
|
|
7326
|
+
/* @__PURE__ */ jsx26("h1", { class: `${p22}-back-title`, children: title }),
|
|
7327
|
+
actions ?? /* @__PURE__ */ jsx26("span", { class: `${p22}-back-spacer`, "aria-hidden": "true" })
|
|
6999
7328
|
] });
|
|
7000
7329
|
}
|
|
7001
7330
|
|
|
7002
7331
|
// src/ui/home-search.tsx
|
|
7003
|
-
import { jsx as
|
|
7004
|
-
var
|
|
7332
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "preact/jsx-runtime";
|
|
7333
|
+
var p23 = BRAND.cssPrefix;
|
|
7005
7334
|
function HomeSearchButton({ placeholder, onActivate }) {
|
|
7006
|
-
return /* @__PURE__ */
|
|
7007
|
-
/* @__PURE__ */
|
|
7008
|
-
/* @__PURE__ */
|
|
7335
|
+
return /* @__PURE__ */ jsxs22("button", { type: "button", class: `${p23}-home-search`, onClick: onActivate, "data-testid": TID.homeSearch, children: [
|
|
7336
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-text`, children: placeholder }),
|
|
7337
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(SearchIcon, {}) })
|
|
7009
7338
|
] });
|
|
7010
7339
|
}
|
|
7011
7340
|
function HelpSearchInput({ placeholder, value, onInput }) {
|
|
7012
|
-
return /* @__PURE__ */
|
|
7013
|
-
/* @__PURE__ */
|
|
7341
|
+
return /* @__PURE__ */ jsxs22("div", { class: `${p23}-home-search`, "data-input": "true", children: [
|
|
7342
|
+
/* @__PURE__ */ jsx27(
|
|
7014
7343
|
"input",
|
|
7015
7344
|
{
|
|
7016
7345
|
type: "search",
|
|
7017
|
-
class: `${
|
|
7346
|
+
class: `${p23}-home-search-input`,
|
|
7018
7347
|
placeholder,
|
|
7019
7348
|
value,
|
|
7020
7349
|
onInput: (e) => onInput(e.currentTarget.value),
|
|
7021
7350
|
"data-testid": TID.helpSearch
|
|
7022
7351
|
}
|
|
7023
7352
|
),
|
|
7024
|
-
/* @__PURE__ */
|
|
7353
|
+
/* @__PURE__ */ jsx27("span", { class: `${p23}-home-search-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx27(SearchIcon, {}) })
|
|
7025
7354
|
] });
|
|
7026
7355
|
}
|
|
7027
7356
|
|
|
7028
7357
|
// src/ui/list-row.tsx
|
|
7029
|
-
import { jsx as
|
|
7030
|
-
var
|
|
7358
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "preact/jsx-runtime";
|
|
7359
|
+
var p24 = BRAND.cssPrefix;
|
|
7031
7360
|
function ListRow({ title, subtitle, onClick, testid }) {
|
|
7032
|
-
return /* @__PURE__ */
|
|
7033
|
-
/* @__PURE__ */
|
|
7034
|
-
/* @__PURE__ */
|
|
7035
|
-
subtitle ? /* @__PURE__ */
|
|
7361
|
+
return /* @__PURE__ */ jsxs23("button", { type: "button", class: `${p24}-list-row`, onClick, "data-testid": testid, children: [
|
|
7362
|
+
/* @__PURE__ */ jsxs23("span", { class: `${p24}-list-row-body`, children: [
|
|
7363
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-title`, children: title }),
|
|
7364
|
+
subtitle ? /* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-sub`, children: subtitle }) : null
|
|
7036
7365
|
] }),
|
|
7037
|
-
/* @__PURE__ */
|
|
7366
|
+
/* @__PURE__ */ jsx28("span", { class: `${p24}-list-row-chevron`, "aria-hidden": "true", children: /* @__PURE__ */ jsx28(ChevronRightIcon, {}) })
|
|
7038
7367
|
] });
|
|
7039
7368
|
}
|
|
7040
7369
|
|
|
7041
7370
|
// src/ui/module-state.tsx
|
|
7042
|
-
import { jsx as
|
|
7043
|
-
var
|
|
7371
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "preact/jsx-runtime";
|
|
7372
|
+
var p25 = BRAND.cssPrefix;
|
|
7044
7373
|
function ModuleState({
|
|
7045
7374
|
tone = "info",
|
|
7046
7375
|
message,
|
|
7047
7376
|
onRetry,
|
|
7048
7377
|
strings
|
|
7049
7378
|
}) {
|
|
7050
|
-
return /* @__PURE__ */
|
|
7051
|
-
/* @__PURE__ */
|
|
7052
|
-
onRetry ? /* @__PURE__ */
|
|
7379
|
+
return /* @__PURE__ */ jsxs24("div", { class: `${p25}-module-empty`, role: tone === "error" ? "alert" : "status", "aria-live": "polite", children: [
|
|
7380
|
+
/* @__PURE__ */ jsx29("span", { children: message }),
|
|
7381
|
+
onRetry ? /* @__PURE__ */ jsx29("button", { type: "button", class: `${p25}-module-retry`, onClick: onRetry, children: strings.errorRetry }) : null
|
|
7053
7382
|
] });
|
|
7054
7383
|
}
|
|
7055
7384
|
|
|
7056
7385
|
// src/ui/modules/help.tsx
|
|
7057
|
-
import { jsx as
|
|
7058
|
-
var
|
|
7386
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "preact/jsx-runtime";
|
|
7387
|
+
var p26 = BRAND.cssPrefix;
|
|
7059
7388
|
var log13 = logger.scope("help");
|
|
7060
7389
|
var openArticle = (nav, a) => a.url ? nav.push({ kind: "iframe", url: a.url, title: a.title }) : nav.push({ kind: "content", id: a.id, title: a.title });
|
|
7061
7390
|
function groupByCategory(items) {
|
|
@@ -7084,7 +7413,7 @@ function fuzzySearch(items, query) {
|
|
|
7084
7413
|
return items.map((item) => ({ item, score: Math.max(fuzzyScore(q, item.title) * 2, fuzzyScore(q, item.description ?? "")) })).filter((r) => r.score > 0).toSorted((a, b) => b.score - a.score).map((r) => r.item);
|
|
7085
7414
|
}
|
|
7086
7415
|
function ArticleRow({ article, nav }) {
|
|
7087
|
-
return /* @__PURE__ */
|
|
7416
|
+
return /* @__PURE__ */ jsx30(
|
|
7088
7417
|
ListRow,
|
|
7089
7418
|
{
|
|
7090
7419
|
title: article.title,
|
|
@@ -7096,11 +7425,11 @@ function ArticleRow({ article, nav }) {
|
|
|
7096
7425
|
}
|
|
7097
7426
|
function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7098
7427
|
const tags = config.contentTags;
|
|
7099
|
-
const [state, setState] =
|
|
7100
|
-
const [errorMsg, setErrorMsg] =
|
|
7101
|
-
const [items, setItems] =
|
|
7102
|
-
const [query, setQuery] =
|
|
7103
|
-
const [reloadKey, setReloadKey] =
|
|
7428
|
+
const [state, setState] = useState10("loading");
|
|
7429
|
+
const [errorMsg, setErrorMsg] = useState10(strings.errorGeneric);
|
|
7430
|
+
const [items, setItems] = useState10([]);
|
|
7431
|
+
const [query, setQuery] = useState10("");
|
|
7432
|
+
const [reloadKey, setReloadKey] = useState10(0);
|
|
7104
7433
|
useEffect10(() => {
|
|
7105
7434
|
let cancelled = false;
|
|
7106
7435
|
setState("loading");
|
|
@@ -7129,46 +7458,46 @@ function HelpRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7129
7458
|
}, [query, results, bus]);
|
|
7130
7459
|
function renderBody() {
|
|
7131
7460
|
if (query.trim().length > 0) {
|
|
7132
|
-
if (results.length === 0) return /* @__PURE__ */
|
|
7133
|
-
return /* @__PURE__ */
|
|
7461
|
+
if (results.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpSearchEmpty, strings });
|
|
7462
|
+
return /* @__PURE__ */ jsx30("div", { class: `${p26}-help-card`, children: results.map((a) => /* @__PURE__ */ jsx30(ArticleRow, { article: a, nav }, a.id)) });
|
|
7134
7463
|
}
|
|
7135
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7464
|
+
if (state === "loading") return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpLoading, strings });
|
|
7136
7465
|
if (state === "error") {
|
|
7137
|
-
return /* @__PURE__ */
|
|
7466
|
+
return /* @__PURE__ */ jsx30(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7138
7467
|
}
|
|
7139
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7140
|
-
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */
|
|
7141
|
-
category ? /* @__PURE__ */
|
|
7142
|
-
/* @__PURE__ */
|
|
7468
|
+
if (items.length === 0) return /* @__PURE__ */ jsx30(ModuleState, { message: strings.helpEmpty, strings });
|
|
7469
|
+
return groupByCategory(items).map(([category, rows]) => /* @__PURE__ */ jsxs25("section", { class: `${p26}-help-group`, children: [
|
|
7470
|
+
category ? /* @__PURE__ */ jsx30("h2", { class: `${p26}-help-section-title`, children: category }) : null,
|
|
7471
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-help-card`, children: rows.map((a) => /* @__PURE__ */ jsx30(ArticleRow, { article: a, nav }, a.id)) })
|
|
7143
7472
|
] }, category));
|
|
7144
7473
|
}
|
|
7145
|
-
return /* @__PURE__ */
|
|
7146
|
-
/* @__PURE__ */
|
|
7147
|
-
/* @__PURE__ */
|
|
7148
|
-
/* @__PURE__ */
|
|
7474
|
+
return /* @__PURE__ */ jsxs25("div", { class: `${p26}-module`, children: [
|
|
7475
|
+
/* @__PURE__ */ jsx30(TitleBar, { title: strings.helpTitle, actions: /* @__PURE__ */ jsx30(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
7476
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-module-pad`, children: /* @__PURE__ */ jsx30(HelpSearchInput, { placeholder: strings.helpSearchPlaceholder, value: query, onInput: setQuery }) }),
|
|
7477
|
+
/* @__PURE__ */ jsx30("div", { class: `${p26}-help-list`, children: renderBody() })
|
|
7149
7478
|
] });
|
|
7150
7479
|
}
|
|
7151
7480
|
var helpLayout = {
|
|
7152
7481
|
Icon: HelpIcon,
|
|
7153
|
-
Root: (props2) => /* @__PURE__ */
|
|
7482
|
+
Root: (props2) => /* @__PURE__ */ jsx30(HelpRoot, { ...props2 })
|
|
7154
7483
|
};
|
|
7155
7484
|
|
|
7156
7485
|
// src/ui/modules/home.tsx
|
|
7157
|
-
import { useEffect as useEffect11, useState as
|
|
7486
|
+
import { useEffect as useEffect11, useState as useState11 } from "preact/hooks";
|
|
7158
7487
|
|
|
7159
7488
|
// src/ui/home-card.tsx
|
|
7160
|
-
import { jsx as
|
|
7161
|
-
var
|
|
7489
|
+
import { jsx as jsx31 } from "preact/jsx-runtime";
|
|
7490
|
+
var p27 = BRAND.cssPrefix;
|
|
7162
7491
|
function HomeCard({ onClick, children, testid }) {
|
|
7163
7492
|
if (onClick) {
|
|
7164
|
-
return /* @__PURE__ */
|
|
7493
|
+
return /* @__PURE__ */ jsx31("button", { type: "button", class: `${p27}-home-card`, "data-interactive": "true", onClick, "data-testid": testid, children });
|
|
7165
7494
|
}
|
|
7166
|
-
return /* @__PURE__ */
|
|
7495
|
+
return /* @__PURE__ */ jsx31("div", { class: `${p27}-home-card`, "data-testid": testid, children });
|
|
7167
7496
|
}
|
|
7168
7497
|
|
|
7169
7498
|
// src/ui/modules/home.tsx
|
|
7170
|
-
import { Fragment as Fragment8, jsx as
|
|
7171
|
-
var
|
|
7499
|
+
import { Fragment as Fragment8, jsx as jsx32, jsxs as jsxs26 } from "preact/jsx-runtime";
|
|
7500
|
+
var p28 = BRAND.cssPrefix;
|
|
7172
7501
|
var log14 = logger.scope("home");
|
|
7173
7502
|
function resolveGreeting(props2) {
|
|
7174
7503
|
const name = props2.options.userContext?.name;
|
|
@@ -7182,8 +7511,8 @@ function resolveGreeting(props2) {
|
|
|
7182
7511
|
var openContent = (nav, item) => item.url ? nav.push({ kind: "iframe", url: item.url, title: item.title }) : nav.push({ kind: "content", id: item.id, title: item.title });
|
|
7183
7512
|
function HomeRoot(props2) {
|
|
7184
7513
|
const { transport, strings, config, nav, bus, panelProps } = props2;
|
|
7185
|
-
const [recent, setRecent] =
|
|
7186
|
-
const [content, setContent] =
|
|
7514
|
+
const [recent, setRecent] = useState11(null);
|
|
7515
|
+
const [content, setContent] = useState11([]);
|
|
7187
7516
|
const tagsKey = config.contentTags?.join(",");
|
|
7188
7517
|
useEffect11(() => {
|
|
7189
7518
|
if (!config.showRecentConversations) return;
|
|
@@ -7211,49 +7540,49 @@ function HomeRoot(props2) {
|
|
|
7211
7540
|
const status = config.status;
|
|
7212
7541
|
const statusText = status?.text ? localizeText(strings, status.text) : strings.homeStatus;
|
|
7213
7542
|
const contentTitle = config.contentBlockTitle ? localizeText(strings, config.contentBlockTitle) : strings.homeContentTitle;
|
|
7214
|
-
return /* @__PURE__ */
|
|
7215
|
-
/* @__PURE__ */
|
|
7216
|
-
/* @__PURE__ */
|
|
7217
|
-
config.brandName ? /* @__PURE__ */
|
|
7218
|
-
/* @__PURE__ */
|
|
7219
|
-
avatars.length > 0 ? /* @__PURE__ */
|
|
7220
|
-
/* @__PURE__ */
|
|
7543
|
+
return /* @__PURE__ */ jsx32("div", { class: `${p28}-module ${p28}-home`, "data-testid": TID.homeView, children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-scroll`, children: [
|
|
7544
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero`, children: [
|
|
7545
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-top`, children: [
|
|
7546
|
+
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" }),
|
|
7547
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-hero-actions`, children: [
|
|
7548
|
+
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,
|
|
7549
|
+
/* @__PURE__ */ jsx32(HeaderActions, { panelProps, variant: "plain" })
|
|
7221
7550
|
] })
|
|
7222
7551
|
] }),
|
|
7223
|
-
config.showGreeting !== false ? /* @__PURE__ */
|
|
7224
|
-
/* @__PURE__ */
|
|
7225
|
-
greeting.subtitle ? /* @__PURE__ */
|
|
7552
|
+
config.showGreeting !== false ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
|
|
7553
|
+
/* @__PURE__ */ jsx32("h1", { class: `${p28}-home-greeting`, "data-testid": TID.homeGreeting, children: greeting.title }),
|
|
7554
|
+
greeting.subtitle ? /* @__PURE__ */ jsx32("p", { class: `${p28}-home-lead`, children: greeting.subtitle }) : null
|
|
7226
7555
|
] }) : null
|
|
7227
7556
|
] }),
|
|
7228
|
-
/* @__PURE__ */
|
|
7229
|
-
config.showSearchBar !== false ? /* @__PURE__ */
|
|
7557
|
+
/* @__PURE__ */ jsxs26("div", { class: `${p28}-home-cards`, children: [
|
|
7558
|
+
config.showSearchBar !== false ? /* @__PURE__ */ jsx32(
|
|
7230
7559
|
HomeSearchButton,
|
|
7231
7560
|
{
|
|
7232
7561
|
placeholder: strings.homeSearchPlaceholder,
|
|
7233
7562
|
onActivate: () => nav.switchToLayout("help")
|
|
7234
7563
|
}
|
|
7235
7564
|
) : null,
|
|
7236
|
-
recent ? /* @__PURE__ */
|
|
7237
|
-
/* @__PURE__ */
|
|
7238
|
-
/* @__PURE__ */
|
|
7239
|
-
/* @__PURE__ */
|
|
7240
|
-
recent.preview ? /* @__PURE__ */
|
|
7565
|
+
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: [
|
|
7566
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-avatar`, "aria-hidden": "true", children: /* @__PURE__ */ jsx32(BubblesIcon, {}) }),
|
|
7567
|
+
/* @__PURE__ */ jsxs26("span", { class: `${p28}-home-recent-body`, children: [
|
|
7568
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-title`, children: recent.title }),
|
|
7569
|
+
recent.preview ? /* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-preview`, children: recent.preview }) : null
|
|
7241
7570
|
] }),
|
|
7242
|
-
|
|
7571
|
+
recent.hasUnread ? /* @__PURE__ */ jsx32("span", { class: `${p28}-home-recent-dot`, "aria-label": "Unread" }) : null
|
|
7243
7572
|
] }) }) : null,
|
|
7244
|
-
status ? /* @__PURE__ */
|
|
7573
|
+
status ? /* @__PURE__ */ jsx32(
|
|
7245
7574
|
HomeCard,
|
|
7246
7575
|
{
|
|
7247
7576
|
onClick: status.url ? () => nav.push({ kind: "iframe", url: status.url, title: statusText }) : void 0,
|
|
7248
|
-
children: /* @__PURE__ */
|
|
7249
|
-
/* @__PURE__ */
|
|
7250
|
-
/* @__PURE__ */
|
|
7577
|
+
children: /* @__PURE__ */ jsxs26("div", { class: `${p28}-home-status`, "data-level": status.level ?? "operational", children: [
|
|
7578
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-status-icon`, "aria-hidden": "true", children: /* @__PURE__ */ jsx32(StatusOkIcon, {}) }),
|
|
7579
|
+
/* @__PURE__ */ jsx32("span", { class: `${p28}-home-status-text`, children: statusText })
|
|
7251
7580
|
] })
|
|
7252
7581
|
}
|
|
7253
7582
|
) : null,
|
|
7254
|
-
content.length > 0 ? /* @__PURE__ */
|
|
7255
|
-
/* @__PURE__ */
|
|
7256
|
-
/* @__PURE__ */
|
|
7583
|
+
content.length > 0 ? /* @__PURE__ */ jsxs26("section", { class: `${p28}-home-content`, children: [
|
|
7584
|
+
/* @__PURE__ */ jsx32("div", { class: `${p28}-home-content-title`, children: contentTitle }),
|
|
7585
|
+
/* @__PURE__ */ jsx32("div", { class: `${p28}-home-content-list`, children: content.map((item) => /* @__PURE__ */ jsx32(
|
|
7257
7586
|
ListRow,
|
|
7258
7587
|
{
|
|
7259
7588
|
title: item.title,
|
|
@@ -7269,20 +7598,20 @@ function HomeRoot(props2) {
|
|
|
7269
7598
|
}
|
|
7270
7599
|
var homeLayout = {
|
|
7271
7600
|
Icon: HomeIcon,
|
|
7272
|
-
Root: (props2) => /* @__PURE__ */
|
|
7601
|
+
Root: (props2) => /* @__PURE__ */ jsx32(HomeRoot, { ...props2 })
|
|
7273
7602
|
};
|
|
7274
7603
|
|
|
7275
7604
|
// src/ui/modules/news.tsx
|
|
7276
|
-
import { useEffect as useEffect12, useState as
|
|
7277
|
-
import { jsx as
|
|
7278
|
-
var
|
|
7605
|
+
import { useEffect as useEffect12, useState as useState12 } from "preact/hooks";
|
|
7606
|
+
import { jsx as jsx33, jsxs as jsxs27 } from "preact/jsx-runtime";
|
|
7607
|
+
var p29 = BRAND.cssPrefix;
|
|
7279
7608
|
var log15 = logger.scope("news");
|
|
7280
7609
|
function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
7281
7610
|
const tags = config.contentTags;
|
|
7282
|
-
const [state, setState] =
|
|
7283
|
-
const [errorMsg, setErrorMsg] =
|
|
7284
|
-
const [items, setItems] =
|
|
7285
|
-
const [reloadKey, setReloadKey] =
|
|
7611
|
+
const [state, setState] = useState12("loading");
|
|
7612
|
+
const [errorMsg, setErrorMsg] = useState12(strings.errorGeneric);
|
|
7613
|
+
const [items, setItems] = useState12([]);
|
|
7614
|
+
const [reloadKey, setReloadKey] = useState12(0);
|
|
7286
7615
|
useEffect12(() => {
|
|
7287
7616
|
let cancelled = false;
|
|
7288
7617
|
setState("loading");
|
|
@@ -7303,37 +7632,37 @@ function NewsRoot({ transport, strings, config, nav, bus, panelProps }) {
|
|
|
7303
7632
|
};
|
|
7304
7633
|
}, [transport, tags, reloadKey, bus]);
|
|
7305
7634
|
function renderBody() {
|
|
7306
|
-
if (state === "loading") return /* @__PURE__ */
|
|
7635
|
+
if (state === "loading") return /* @__PURE__ */ jsx33(ModuleState, { message: strings.newsLoading, strings });
|
|
7307
7636
|
if (state === "error") {
|
|
7308
|
-
return /* @__PURE__ */
|
|
7637
|
+
return /* @__PURE__ */ jsx33(ModuleState, { tone: "error", message: errorMsg, onRetry: () => setReloadKey((k) => k + 1), strings });
|
|
7309
7638
|
}
|
|
7310
|
-
if (items.length === 0) return /* @__PURE__ */
|
|
7311
|
-
return /* @__PURE__ */
|
|
7639
|
+
if (items.length === 0) return /* @__PURE__ */ jsx33(ModuleState, { message: strings.newsEmpty, strings });
|
|
7640
|
+
return /* @__PURE__ */ jsx33("div", { class: `${p29}-news-list`, children: items.map((item) => /* @__PURE__ */ jsxs27(
|
|
7312
7641
|
"button",
|
|
7313
7642
|
{
|
|
7314
7643
|
type: "button",
|
|
7315
|
-
class: `${
|
|
7644
|
+
class: `${p29}-news-card`,
|
|
7316
7645
|
onClick: () => nav.push({ kind: "content", id: item.id, title: item.title }),
|
|
7317
7646
|
"data-testid": tid(TID.newsItem, item.id),
|
|
7318
7647
|
children: [
|
|
7319
|
-
item.image ? /* @__PURE__ */
|
|
7320
|
-
/* @__PURE__ */
|
|
7321
|
-
/* @__PURE__ */
|
|
7322
|
-
item.description ? /* @__PURE__ */
|
|
7648
|
+
item.image ? /* @__PURE__ */ jsx33("img", { class: `${p29}-news-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
7649
|
+
/* @__PURE__ */ jsxs27("span", { class: `${p29}-news-body`, children: [
|
|
7650
|
+
/* @__PURE__ */ jsx33("span", { class: `${p29}-news-title`, children: item.title }),
|
|
7651
|
+
item.description ? /* @__PURE__ */ jsx33("span", { class: `${p29}-news-summary`, children: item.description }) : null
|
|
7323
7652
|
] })
|
|
7324
7653
|
]
|
|
7325
7654
|
},
|
|
7326
7655
|
item.id
|
|
7327
7656
|
)) });
|
|
7328
7657
|
}
|
|
7329
|
-
return /* @__PURE__ */
|
|
7330
|
-
/* @__PURE__ */
|
|
7331
|
-
/* @__PURE__ */
|
|
7658
|
+
return /* @__PURE__ */ jsxs27("div", { class: `${p29}-module`, children: [
|
|
7659
|
+
/* @__PURE__ */ jsx33(TitleBar, { title: strings.newsTitle, actions: /* @__PURE__ */ jsx33(HeaderActions, { panelProps, variant: "plain" }) }),
|
|
7660
|
+
/* @__PURE__ */ jsx33("div", { class: `${p29}-module-scroll`, children: renderBody() })
|
|
7332
7661
|
] });
|
|
7333
7662
|
}
|
|
7334
7663
|
var newsLayout = {
|
|
7335
7664
|
Icon: NewsIcon,
|
|
7336
|
-
Root: (props2) => /* @__PURE__ */
|
|
7665
|
+
Root: (props2) => /* @__PURE__ */ jsx33(NewsRoot, { ...props2 })
|
|
7337
7666
|
};
|
|
7338
7667
|
|
|
7339
7668
|
// src/ui/modules/registry.ts
|
|
@@ -7345,28 +7674,28 @@ var LAYOUTS = {
|
|
|
7345
7674
|
};
|
|
7346
7675
|
|
|
7347
7676
|
// src/ui/home-tab-bar.tsx
|
|
7348
|
-
import { jsx as
|
|
7349
|
-
var
|
|
7350
|
-
function HomeTabBar({ modules, activeTab, strings,
|
|
7351
|
-
return /* @__PURE__ */
|
|
7677
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "preact/jsx-runtime";
|
|
7678
|
+
var p30 = BRAND.cssPrefix;
|
|
7679
|
+
function HomeTabBar({ modules, activeTab, strings, hasUnread, onSelect }) {
|
|
7680
|
+
return /* @__PURE__ */ jsx34("nav", { class: `${p30}-tabbar`, role: "tablist", "aria-label": strings.panelTitle, children: modules.map((m) => {
|
|
7352
7681
|
const Icon = LAYOUTS[m.layout].Icon;
|
|
7353
7682
|
const selected = m.id === activeTab;
|
|
7354
|
-
const
|
|
7355
|
-
return /* @__PURE__ */
|
|
7683
|
+
const showDot = m.layout === "chat" && hasUnread;
|
|
7684
|
+
return /* @__PURE__ */ jsxs28(
|
|
7356
7685
|
"button",
|
|
7357
7686
|
{
|
|
7358
7687
|
type: "button",
|
|
7359
7688
|
role: "tab",
|
|
7360
7689
|
"aria-selected": selected,
|
|
7361
|
-
class: `${
|
|
7690
|
+
class: `${p30}-tab`,
|
|
7362
7691
|
onClick: () => onSelect(m.id),
|
|
7363
7692
|
"data-testid": tid(TID.tab, m.id),
|
|
7364
7693
|
children: [
|
|
7365
|
-
/* @__PURE__ */
|
|
7366
|
-
/* @__PURE__ */
|
|
7367
|
-
|
|
7694
|
+
/* @__PURE__ */ jsxs28("span", { class: `${p30}-tab-icon`, "aria-hidden": "true", children: [
|
|
7695
|
+
/* @__PURE__ */ jsx34(Icon, {}),
|
|
7696
|
+
showDot ? /* @__PURE__ */ jsx34("span", { class: `${p30}-tab-badge`, "data-testid": TID.tabBadge, "aria-label": "Unread" }) : null
|
|
7368
7697
|
] }),
|
|
7369
|
-
/* @__PURE__ */
|
|
7698
|
+
/* @__PURE__ */ jsx34("span", { class: `${p30}-tab-label`, children: localizeText(strings, m.label) })
|
|
7370
7699
|
]
|
|
7371
7700
|
},
|
|
7372
7701
|
m.id
|
|
@@ -7375,12 +7704,12 @@ function HomeTabBar({ modules, activeTab, strings, unreadCount, onSelect }) {
|
|
|
7375
7704
|
}
|
|
7376
7705
|
|
|
7377
7706
|
// src/ui/iframe-view.tsx
|
|
7378
|
-
import { jsx as
|
|
7379
|
-
var
|
|
7707
|
+
import { jsx as jsx35, jsxs as jsxs29 } from "preact/jsx-runtime";
|
|
7708
|
+
var p31 = BRAND.cssPrefix;
|
|
7380
7709
|
var SANDBOX = "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads";
|
|
7381
7710
|
function IframeView({ url, title, strings, onBack, actions }) {
|
|
7382
|
-
return /* @__PURE__ */
|
|
7383
|
-
/* @__PURE__ */
|
|
7711
|
+
return /* @__PURE__ */ jsxs29("div", { class: `${p31}-module`, children: [
|
|
7712
|
+
/* @__PURE__ */ jsx35(
|
|
7384
7713
|
BackHeader,
|
|
7385
7714
|
{
|
|
7386
7715
|
title: title || strings.moduleBack,
|
|
@@ -7389,10 +7718,10 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7389
7718
|
actions
|
|
7390
7719
|
}
|
|
7391
7720
|
),
|
|
7392
|
-
/* @__PURE__ */
|
|
7721
|
+
/* @__PURE__ */ jsx35(
|
|
7393
7722
|
"iframe",
|
|
7394
7723
|
{
|
|
7395
|
-
class: `${
|
|
7724
|
+
class: `${p31}-content-frame`,
|
|
7396
7725
|
src: url,
|
|
7397
7726
|
title: title || "content",
|
|
7398
7727
|
sandbox: SANDBOX,
|
|
@@ -7405,15 +7734,15 @@ function IframeView({ url, title, strings, onBack, actions }) {
|
|
|
7405
7734
|
}
|
|
7406
7735
|
|
|
7407
7736
|
// src/ui/content-view.tsx
|
|
7408
|
-
import { useCallback as useCallback3, useEffect as useEffect13, useState as
|
|
7409
|
-
import { jsx as
|
|
7410
|
-
var
|
|
7737
|
+
import { useCallback as useCallback3, useEffect as useEffect13, useState as useState13 } from "preact/hooks";
|
|
7738
|
+
import { jsx as jsx36, jsxs as jsxs30 } from "preact/jsx-runtime";
|
|
7739
|
+
var p32 = BRAND.cssPrefix;
|
|
7411
7740
|
var log16 = logger.scope("content");
|
|
7412
7741
|
var READ_DWELL_MS = 5e3;
|
|
7413
7742
|
function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
7414
|
-
const [item, setItem] =
|
|
7415
|
-
const [failed, setFailed] =
|
|
7416
|
-
const [reloadKey, setReloadKey] =
|
|
7743
|
+
const [item, setItem] = useState13(null);
|
|
7744
|
+
const [failed, setFailed] = useState13(false);
|
|
7745
|
+
const [reloadKey, setReloadKey] = useState13(0);
|
|
7417
7746
|
const retry = useCallback3(() => {
|
|
7418
7747
|
setFailed(false);
|
|
7419
7748
|
setItem(null);
|
|
@@ -7451,16 +7780,16 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7451
7780
|
[bus, id]
|
|
7452
7781
|
);
|
|
7453
7782
|
function renderBody() {
|
|
7454
|
-
if (failed) return /* @__PURE__ */
|
|
7455
|
-
if (item === null) return /* @__PURE__ */
|
|
7456
|
-
return /* @__PURE__ */
|
|
7457
|
-
item.image ? /* @__PURE__ */
|
|
7458
|
-
item.description ? /* @__PURE__ */
|
|
7459
|
-
/* @__PURE__ */
|
|
7783
|
+
if (failed) return /* @__PURE__ */ jsx36(ModuleState, { tone: "error", message: strings.errorGeneric, onRetry: retry, strings });
|
|
7784
|
+
if (item === null) return /* @__PURE__ */ jsx36(ModuleState, { message: strings.contentLoading, strings });
|
|
7785
|
+
return /* @__PURE__ */ jsxs30("article", { class: `${p32}-content`, "data-testid": TID.contentView, onClick: onArticleClick, children: [
|
|
7786
|
+
item.image ? /* @__PURE__ */ jsx36("img", { class: `${p32}-content-hero`, src: item.image, alt: "", loading: "lazy" }) : null,
|
|
7787
|
+
item.description ? /* @__PURE__ */ jsx36("p", { class: `${p32}-content-subtitle`, children: item.description }) : null,
|
|
7788
|
+
/* @__PURE__ */ jsx36(StaticMarkdown, { text: item.content ?? "" })
|
|
7460
7789
|
] });
|
|
7461
7790
|
}
|
|
7462
|
-
return /* @__PURE__ */
|
|
7463
|
-
/* @__PURE__ */
|
|
7791
|
+
return /* @__PURE__ */ jsxs30("div", { class: `${p32}-module`, children: [
|
|
7792
|
+
/* @__PURE__ */ jsx36(
|
|
7464
7793
|
BackHeader,
|
|
7465
7794
|
{
|
|
7466
7795
|
title: item?.title || title || strings.moduleBack,
|
|
@@ -7470,19 +7799,19 @@ function ContentView({ id, title, transport, strings, bus, onBack, actions }) {
|
|
|
7470
7799
|
testid: TID.backHeader
|
|
7471
7800
|
}
|
|
7472
7801
|
),
|
|
7473
|
-
/* @__PURE__ */
|
|
7802
|
+
/* @__PURE__ */ jsx36("div", { class: `${p32}-module-scroll`, "data-testid": TID.contentScroll, children: renderBody() })
|
|
7474
7803
|
] });
|
|
7475
7804
|
}
|
|
7476
7805
|
|
|
7477
7806
|
// src/ui/messenger-home.tsx
|
|
7478
|
-
import { jsx as
|
|
7479
|
-
var
|
|
7807
|
+
import { jsx as jsx37, jsxs as jsxs31 } from "preact/jsx-runtime";
|
|
7808
|
+
var p33 = BRAND.cssPrefix;
|
|
7480
7809
|
function MessengerHome({
|
|
7481
7810
|
panelProps,
|
|
7482
7811
|
enabledModules,
|
|
7483
7812
|
nav,
|
|
7484
7813
|
bus,
|
|
7485
|
-
|
|
7814
|
+
hasUnread,
|
|
7486
7815
|
onSelectConversation,
|
|
7487
7816
|
onStartNewConversation,
|
|
7488
7817
|
onSetPanelSize
|
|
@@ -7547,12 +7876,12 @@ function MessengerHome({
|
|
|
7547
7876
|
bus,
|
|
7548
7877
|
panelProps
|
|
7549
7878
|
});
|
|
7550
|
-
const plainActions = /* @__PURE__ */
|
|
7879
|
+
const plainActions = /* @__PURE__ */ jsx37(HeaderActions, { panelProps, variant: "plain" });
|
|
7551
7880
|
if (activeModule) visitedRef.current.add(activeModule.id);
|
|
7552
7881
|
const visitedTabs = enabledModules.filter((m) => visitedRef.current.has(m.id));
|
|
7553
7882
|
const tabRoot = (module) => {
|
|
7554
7883
|
if (module.layout === "chat") {
|
|
7555
|
-
return /* @__PURE__ */
|
|
7884
|
+
return /* @__PURE__ */ jsx37(
|
|
7556
7885
|
PanelContent,
|
|
7557
7886
|
{
|
|
7558
7887
|
...panelProps,
|
|
@@ -7563,14 +7892,14 @@ function MessengerHome({
|
|
|
7563
7892
|
);
|
|
7564
7893
|
}
|
|
7565
7894
|
const Root = LAYOUTS[module.layout].Root;
|
|
7566
|
-
return Root ? /* @__PURE__ */
|
|
7895
|
+
return Root ? /* @__PURE__ */ jsx37(Root, { ...screenProps(module) }) : null;
|
|
7567
7896
|
};
|
|
7568
7897
|
const renderReader = () => {
|
|
7569
7898
|
if (top?.kind === "iframe") {
|
|
7570
|
-
return /* @__PURE__ */
|
|
7899
|
+
return /* @__PURE__ */ jsx37(IframeView, { url: top.url, title: top.title, strings, onBack: nav.pop, actions: plainActions });
|
|
7571
7900
|
}
|
|
7572
7901
|
if (top?.kind === "content") {
|
|
7573
|
-
return /* @__PURE__ */
|
|
7902
|
+
return /* @__PURE__ */ jsx37(
|
|
7574
7903
|
ContentView,
|
|
7575
7904
|
{
|
|
7576
7905
|
id: top.id,
|
|
@@ -7585,33 +7914,33 @@ function MessengerHome({
|
|
|
7585
7914
|
}
|
|
7586
7915
|
return null;
|
|
7587
7916
|
};
|
|
7588
|
-
return /* @__PURE__ */
|
|
7917
|
+
return /* @__PURE__ */ jsxs31(
|
|
7589
7918
|
"div",
|
|
7590
7919
|
{
|
|
7591
7920
|
ref: containerRef,
|
|
7592
|
-
class: `${
|
|
7921
|
+
class: `${p33}-panel ${p33}-messenger`,
|
|
7593
7922
|
role: "dialog",
|
|
7594
7923
|
"aria-modal": "false",
|
|
7595
7924
|
"aria-label": strings.panelTitle,
|
|
7596
7925
|
style: { position: "relative" },
|
|
7597
7926
|
"data-testid": TID.messengerHome,
|
|
7598
7927
|
children: [
|
|
7599
|
-
/* @__PURE__ */
|
|
7600
|
-
visitedTabs.map((m) => /* @__PURE__ */
|
|
7928
|
+
/* @__PURE__ */ jsxs31("div", { class: `${p33}-messenger-body`, children: [
|
|
7929
|
+
visitedTabs.map((m) => /* @__PURE__ */ jsx37("div", { class: `${p33}-messenger-pane`, hidden: isReader || m.id !== activeModule?.id, children: tabRoot(m) }, m.id)),
|
|
7601
7930
|
renderReader()
|
|
7602
7931
|
] }),
|
|
7603
|
-
showTabBar ? /* @__PURE__ */
|
|
7932
|
+
showTabBar ? /* @__PURE__ */ jsx37(
|
|
7604
7933
|
HomeTabBar,
|
|
7605
7934
|
{
|
|
7606
7935
|
modules: enabledModules,
|
|
7607
7936
|
activeTab: navState.activeTab,
|
|
7608
7937
|
strings,
|
|
7609
|
-
|
|
7938
|
+
hasUnread,
|
|
7610
7939
|
onSelect: nav.switchTab
|
|
7611
7940
|
}
|
|
7612
7941
|
) : null,
|
|
7613
|
-
/* @__PURE__ */
|
|
7614
|
-
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */
|
|
7942
|
+
/* @__PURE__ */ jsx37(PoweredByBar, { poweredBy: options.poweredBy }),
|
|
7943
|
+
options.size.resize?.enabled && !(activeModule?.layout === "chat" && !top) ? /* @__PURE__ */ jsx37(
|
|
7615
7944
|
ResizeGrip,
|
|
7616
7945
|
{
|
|
7617
7946
|
panelEl: containerRef.current,
|
|
@@ -7628,40 +7957,40 @@ function MessengerHome({
|
|
|
7628
7957
|
}
|
|
7629
7958
|
|
|
7630
7959
|
// src/ui/modules-empty.tsx
|
|
7631
|
-
import { jsx as
|
|
7632
|
-
var
|
|
7960
|
+
import { jsx as jsx38, jsxs as jsxs32 } from "preact/jsx-runtime";
|
|
7961
|
+
var p34 = BRAND.cssPrefix;
|
|
7633
7962
|
function ModulesEmpty({ strings, onClose }) {
|
|
7634
|
-
return /* @__PURE__ */
|
|
7963
|
+
return /* @__PURE__ */ jsxs32(
|
|
7635
7964
|
"div",
|
|
7636
7965
|
{
|
|
7637
|
-
class: `${
|
|
7966
|
+
class: `${p34}-panel ${p34}-modules-empty`,
|
|
7638
7967
|
role: "dialog",
|
|
7639
7968
|
"aria-label": strings.panelTitle,
|
|
7640
7969
|
"data-testid": TID.modulesEmpty,
|
|
7641
7970
|
children: [
|
|
7642
|
-
onClose ? /* @__PURE__ */
|
|
7971
|
+
onClose ? /* @__PURE__ */ jsx38(
|
|
7643
7972
|
"button",
|
|
7644
7973
|
{
|
|
7645
7974
|
type: "button",
|
|
7646
|
-
class: `${
|
|
7975
|
+
class: `${p34}-icon-btn ${p34}-modules-empty-close`,
|
|
7647
7976
|
onClick: onClose,
|
|
7648
7977
|
"aria-label": strings.close,
|
|
7649
7978
|
title: strings.close,
|
|
7650
|
-
children: /* @__PURE__ */
|
|
7979
|
+
children: /* @__PURE__ */ jsx38(CloseIcon, {})
|
|
7651
7980
|
}
|
|
7652
7981
|
) : null,
|
|
7653
|
-
/* @__PURE__ */
|
|
7982
|
+
/* @__PURE__ */ jsx38("p", { class: `${p34}-modules-empty-text`, children: strings.modulesEmpty })
|
|
7654
7983
|
]
|
|
7655
7984
|
}
|
|
7656
7985
|
);
|
|
7657
7986
|
}
|
|
7658
7987
|
|
|
7659
7988
|
// src/ui/use-launcher-callout.ts
|
|
7660
|
-
import { useCallback as useCallback5, useEffect as useEffect15, useState as
|
|
7989
|
+
import { useCallback as useCallback5, useEffect as useEffect15, useState as useState14 } from "preact/hooks";
|
|
7661
7990
|
function useLauncherCallout({ callout, persistence }) {
|
|
7662
7991
|
const textKey = callout?.text ?? "";
|
|
7663
7992
|
const persistent = callout?.persistent ?? true;
|
|
7664
|
-
const [dismissed, setDismissed] =
|
|
7993
|
+
const [dismissed, setDismissed] = useState14(() => persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7665
7994
|
useEffect15(() => {
|
|
7666
7995
|
setDismissed(persistent ? false : persistence.loadCalloutDismissed(textKey));
|
|
7667
7996
|
}, [textKey, persistent, persistence]);
|
|
@@ -7673,9 +8002,9 @@ function useLauncherCallout({ callout, persistence }) {
|
|
|
7673
8002
|
}
|
|
7674
8003
|
|
|
7675
8004
|
// src/ui/app.tsx
|
|
7676
|
-
import { jsx as
|
|
8005
|
+
import { jsx as jsx39, jsxs as jsxs33 } from "preact/jsx-runtime";
|
|
7677
8006
|
var log17 = logger.scope("app");
|
|
7678
|
-
var
|
|
8007
|
+
var p35 = BRAND.cssPrefix;
|
|
7679
8008
|
function makeLocalizedWelcome(w, strings) {
|
|
7680
8009
|
return makeInstantWelcomeMessage({ ...w, text: localizeText(strings, w.text) });
|
|
7681
8010
|
}
|
|
@@ -7690,21 +8019,21 @@ function isAbortError(error) {
|
|
|
7690
8019
|
return error instanceof DOMException ? error.name === "AbortError" : error?.name === "AbortError";
|
|
7691
8020
|
}
|
|
7692
8021
|
function App({ options, hostElement, bus }) {
|
|
7693
|
-
const [persistence] =
|
|
8022
|
+
const [persistence] = useState15(
|
|
7694
8023
|
() => createPersistence(options.widgetId, options.storage, options.aiAgentDeploymentId)
|
|
7695
8024
|
);
|
|
7696
|
-
const [visitorId, setVisitorId] =
|
|
8025
|
+
const [visitorId, setVisitorId] = useState15(() => persistence.getVisitorId());
|
|
7697
8026
|
const initialSettings = persistence.loadUserPrefs();
|
|
7698
|
-
const [activeLocale, setActiveLocale] =
|
|
7699
|
-
const [activeThemeMode, setActiveThemeMode] =
|
|
8027
|
+
const [activeLocale, setActiveLocale] = useState15(() => initialSettings.locale ?? options.locale);
|
|
8028
|
+
const [activeThemeMode, setActiveThemeMode] = useState15(
|
|
7700
8029
|
() => initialSettings.themeMode ?? options.themeMode
|
|
7701
8030
|
);
|
|
7702
|
-
const [activeTextSize, setActiveTextSize] =
|
|
8031
|
+
const [activeTextSize, setActiveTextSize] = useState15(() => initialSettings.textSize ?? options.textSize);
|
|
7703
8032
|
const conversationIdSig = useSignal(persistence.loadConversationId());
|
|
7704
8033
|
const messagesSig = useSignal([]);
|
|
7705
|
-
const
|
|
7706
|
-
const [loadingMessages, setLoadingMessages] =
|
|
7707
|
-
const [formMarkers, setFormMarkers] =
|
|
8034
|
+
const hasUnreadSig = useSignal(false);
|
|
8035
|
+
const [loadingMessages, setLoadingMessages] = useState15(false);
|
|
8036
|
+
const [formMarkers, setFormMarkers] = useState15([]);
|
|
7708
8037
|
function landingTab() {
|
|
7709
8038
|
const list = options.modules.list;
|
|
7710
8039
|
const ids = new Set(list.map((m) => m.id));
|
|
@@ -7723,15 +8052,15 @@ function App({ options, hostElement, bus }) {
|
|
|
7723
8052
|
const homeNav = homeNavRef.current;
|
|
7724
8053
|
const chatTabIdRef = useRef9(void 0);
|
|
7725
8054
|
chatTabIdRef.current = chatTabId();
|
|
7726
|
-
const [conversationReady, setConversationReady] =
|
|
7727
|
-
const [remoteForms, setRemoteForms] =
|
|
7728
|
-
const [formsReady, setFormsReady] =
|
|
8055
|
+
const [conversationReady, setConversationReady] = useState15(false);
|
|
8056
|
+
const [remoteForms, setRemoteForms] = useState15(null);
|
|
8057
|
+
const [formsReady, setFormsReady] = useState15(false);
|
|
7729
8058
|
const isInlineLike = options.mode === "standalone" || options.mode === "inline";
|
|
7730
8059
|
const initialPanelRef = useRef9(
|
|
7731
8060
|
resolveInitialPanelState(options, currentViewportWidth(), persistence.loadPanelOpen(), persistence.loadPanelSize())
|
|
7732
8061
|
);
|
|
7733
|
-
const [isOpen, setIsOpen] =
|
|
7734
|
-
const [activated, setActivated] =
|
|
8062
|
+
const [isOpen, setIsOpen] = useState15(initialPanelRef.current.panelOpen);
|
|
8063
|
+
const [activated, setActivated] = useState15(initialPanelRef.current.panelOpen);
|
|
7735
8064
|
const activatedRef = useRef9(activated);
|
|
7736
8065
|
activatedRef.current = activated;
|
|
7737
8066
|
const pendingThreadRef = useRef9(false);
|
|
@@ -7740,7 +8069,7 @@ function App({ options, hostElement, bus }) {
|
|
|
7740
8069
|
if (isOpen) setActivated(true);
|
|
7741
8070
|
}, [isOpen]);
|
|
7742
8071
|
const initialPanelApplied = useRef9(false);
|
|
7743
|
-
const [launcherLeaving, setLauncherLeaving] =
|
|
8072
|
+
const [launcherLeaving, setLauncherLeaving] = useState15(false);
|
|
7744
8073
|
const { dismissed: calloutDismissed, dismissCallout: dismissCalloutRaw } = useLauncherCallout({
|
|
7745
8074
|
callout: options.launcher.callout,
|
|
7746
8075
|
persistence
|
|
@@ -7751,21 +8080,21 @@ function App({ options, hostElement, bus }) {
|
|
|
7751
8080
|
bus.emit("calloutDismiss", void 0);
|
|
7752
8081
|
dismissCalloutRaw();
|
|
7753
8082
|
}, [bus, dismissCalloutRaw]);
|
|
7754
|
-
const [panelSize, setPanelSize] =
|
|
8083
|
+
const [panelSize, setPanelSize] = useState15(initialPanelRef.current.panelSize);
|
|
7755
8084
|
const initialSizeApplied = useRef9(false);
|
|
7756
|
-
const [view, setView] =
|
|
7757
|
-
const [canSend, setCanSend] =
|
|
7758
|
-
const [streaming, setStreaming] =
|
|
7759
|
-
const [agent, setAgent] =
|
|
7760
|
-
const [suggestions, setSuggestions] =
|
|
7761
|
-
const [activeCancel, setActiveCancel] =
|
|
7762
|
-
const [activeDetach, setActiveDetach] =
|
|
8085
|
+
const [view, setView] = useState15("chat");
|
|
8086
|
+
const [canSend, setCanSend] = useState15(true);
|
|
8087
|
+
const [streaming, setStreaming] = useState15(false);
|
|
8088
|
+
const [agent, setAgent] = useState15(null);
|
|
8089
|
+
const [suggestions, setSuggestions] = useState15([]);
|
|
8090
|
+
const [activeCancel, setActiveCancel] = useState15(null);
|
|
8091
|
+
const [activeDetach, setActiveDetach] = useState15(null);
|
|
7763
8092
|
const stringsRef = useRef9(options.strings);
|
|
7764
|
-
const [parsedSite, setParsedSite] =
|
|
7765
|
-
const [parsedBlocks, setParsedBlocks] =
|
|
7766
|
-
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
7767
|
-
const [formContext, setFormContext] =
|
|
7768
|
-
const [transport] =
|
|
8093
|
+
const [parsedSite, setParsedSite] = useState15(void 0);
|
|
8094
|
+
const [parsedBlocks, setParsedBlocks] = useState15(void 0);
|
|
8095
|
+
const [sidebarCollapsed, setSidebarCollapsed] = useState15(() => persistence.loadSidebarCollapsed() ?? false);
|
|
8096
|
+
const [formContext, setFormContext] = useState15({});
|
|
8097
|
+
const [transport] = useState15(
|
|
7769
8098
|
() => new AgentTransport({
|
|
7770
8099
|
agentApiBaseUrl: options.agentApiBaseUrl,
|
|
7771
8100
|
dataApiBaseUrl: options.dataApiBaseUrl,
|
|
@@ -7777,8 +8106,8 @@ function App({ options, hostElement, bus }) {
|
|
|
7777
8106
|
endpoints: options.endpoints
|
|
7778
8107
|
})
|
|
7779
8108
|
);
|
|
7780
|
-
const [reducer] =
|
|
7781
|
-
const [feedback] =
|
|
8109
|
+
const [reducer] = useState15(() => new StreamReducer(messagesSig));
|
|
8110
|
+
const [feedback] = useState15(() => new FeedbackBus(options.sound, options.haptics));
|
|
7782
8111
|
const patchAndSync = useCallback6(
|
|
7783
8112
|
(patch) => {
|
|
7784
8113
|
persistence.patchUserPrefs(patch);
|
|
@@ -8353,6 +8682,20 @@ function App({ options, hostElement, bus }) {
|
|
|
8353
8682
|
},
|
|
8354
8683
|
[streaming, messagesSig]
|
|
8355
8684
|
);
|
|
8685
|
+
const handleMessageFeedback = useCallback6(
|
|
8686
|
+
(messageId, value) => {
|
|
8687
|
+
log17.info("messageFeedback", { messageId, value });
|
|
8688
|
+
bus.emit("messageFeedback", { messageId, value });
|
|
8689
|
+
void transport.submitFeedback({ messageId, value });
|
|
8690
|
+
},
|
|
8691
|
+
[bus, transport]
|
|
8692
|
+
);
|
|
8693
|
+
const handleMessageSeen = useCallback6(
|
|
8694
|
+
(messageId) => {
|
|
8695
|
+
bus.emit("messageSeen", { messageId });
|
|
8696
|
+
},
|
|
8697
|
+
[bus]
|
|
8698
|
+
);
|
|
8356
8699
|
const toolInteraction = useMemo3(
|
|
8357
8700
|
() => ({
|
|
8358
8701
|
humanInLoop: options.features.humanInLoop,
|
|
@@ -8484,15 +8827,23 @@ function App({ options, hostElement, bus }) {
|
|
|
8484
8827
|
const refreshUnread = useCallback6(() => {
|
|
8485
8828
|
if (!options.modules.list.some((m) => m.layout === "chat")) return;
|
|
8486
8829
|
transport.listConversations({ limit: 50 }).then((res) => {
|
|
8487
|
-
|
|
8830
|
+
hasUnreadSig.value = res.conversations.some((c) => c.hasUnread);
|
|
8488
8831
|
}).catch((err) => log17.debug("refreshUnread failed (non-fatal)", { err }));
|
|
8489
|
-
}, [transport, options.modules,
|
|
8832
|
+
}, [transport, options.modules, hasUnreadSig]);
|
|
8490
8833
|
const unreadSeeded = useRef9(false);
|
|
8491
8834
|
useEffect16(() => {
|
|
8492
8835
|
if (!activated || !conversationReady || unreadSeeded.current) return;
|
|
8493
8836
|
unreadSeeded.current = true;
|
|
8494
8837
|
refreshUnread();
|
|
8495
8838
|
}, [activated, conversationReady, refreshUnread]);
|
|
8839
|
+
useEffect16(() => {
|
|
8840
|
+
if (!activated) return;
|
|
8841
|
+
const onVisible = () => {
|
|
8842
|
+
if (document.visibilityState === "visible") refreshUnread();
|
|
8843
|
+
};
|
|
8844
|
+
document.addEventListener("visibilitychange", onVisible);
|
|
8845
|
+
return () => document.removeEventListener("visibilitychange", onVisible);
|
|
8846
|
+
}, [activated, refreshUnread]);
|
|
8496
8847
|
const handleOpen = useCallback6(() => {
|
|
8497
8848
|
log17.info("open", { mode: options.mode });
|
|
8498
8849
|
feedback.unlock();
|
|
@@ -8725,7 +9076,9 @@ function App({ options, hostElement, bus }) {
|
|
|
8725
9076
|
// `openForm()` command, so it bypasses frequency dedupe by design.
|
|
8726
9077
|
onFormFill: (formId) => forms.fire("manual", formId),
|
|
8727
9078
|
tool: toolInteraction,
|
|
8728
|
-
onRetry: handleRetry
|
|
9079
|
+
onRetry: handleRetry,
|
|
9080
|
+
onMessageFeedback: handleMessageFeedback,
|
|
9081
|
+
onMessageSeen: handleMessageSeen
|
|
8729
9082
|
};
|
|
8730
9083
|
const onSelectConversation = (conversationId) => {
|
|
8731
9084
|
void handleSelectHistoryConversation(conversationId);
|
|
@@ -8737,19 +9090,19 @@ function App({ options, hostElement, bus }) {
|
|
|
8737
9090
|
const renderSurface = (size) => {
|
|
8738
9091
|
const closeable = isActionVisible("close", effectiveOptions.mode, size);
|
|
8739
9092
|
if (enabledModules.length === 0) {
|
|
8740
|
-
return /* @__PURE__ */
|
|
9093
|
+
return /* @__PURE__ */ jsx39(ModulesEmpty, { strings: effectiveOptions.strings, onClose: closeable ? handleClose : void 0 });
|
|
8741
9094
|
}
|
|
8742
9095
|
if (enabledModules.length === 1 && enabledModules[0]?.layout === "chat") {
|
|
8743
|
-
return /* @__PURE__ */
|
|
9096
|
+
return /* @__PURE__ */ jsx39(Panel, { ...panelProps, panelSize: size });
|
|
8744
9097
|
}
|
|
8745
|
-
return /* @__PURE__ */
|
|
9098
|
+
return /* @__PURE__ */ jsx39(
|
|
8746
9099
|
MessengerHome,
|
|
8747
9100
|
{
|
|
8748
9101
|
panelProps: { ...panelProps, panelSize: size, onClose: closeable ? handleClose : void 0 },
|
|
8749
9102
|
enabledModules,
|
|
8750
9103
|
nav: homeNav,
|
|
8751
9104
|
bus,
|
|
8752
|
-
|
|
9105
|
+
hasUnread: hasUnreadSig.value,
|
|
8753
9106
|
onSelectConversation,
|
|
8754
9107
|
onStartNewConversation: handleNewChat,
|
|
8755
9108
|
onSetPanelSize: setPanelSize
|
|
@@ -8761,7 +9114,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8761
9114
|
void handleSelectHistoryConversation(chat.conversationId);
|
|
8762
9115
|
};
|
|
8763
9116
|
const conversationsEnabled = enabledModules.some((m) => m.layout === "chat");
|
|
8764
|
-
return /* @__PURE__ */
|
|
9117
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: /* @__PURE__ */ jsx39(
|
|
8765
9118
|
PageShell,
|
|
8766
9119
|
{
|
|
8767
9120
|
site: parsedSite,
|
|
@@ -8782,15 +9135,15 @@ function App({ options, hostElement, bus }) {
|
|
|
8782
9135
|
}
|
|
8783
9136
|
if (isInlineLike) {
|
|
8784
9137
|
const inlineSize = options.mode === "standalone" ? "fullscreen" : panelSize;
|
|
8785
|
-
return /* @__PURE__ */
|
|
9138
|
+
return /* @__PURE__ */ jsx39("div", { class: `${p35}-anchor`, children: renderSurface(inlineSize) });
|
|
8786
9139
|
}
|
|
8787
9140
|
const drawerEdgeTab = options.mode === "drawer";
|
|
8788
9141
|
const triggerOwnedByPage = options.mode === "modal";
|
|
8789
9142
|
const launcherVisible = !triggerOwnedByPage && !options.launcher.hidden && (!isOpen || launcherLeaving);
|
|
8790
9143
|
const calloutToRender = launcherVisible && !launcherLeaving && !calloutDismissed && !drawerEdgeTab ? effectiveOptions.launcher.callout : null;
|
|
8791
|
-
return /* @__PURE__ */
|
|
8792
|
-
isOpen || activated ? /* @__PURE__ */
|
|
8793
|
-
launcherVisible ? /* @__PURE__ */
|
|
9144
|
+
return /* @__PURE__ */ jsxs33("div", { class: `${p35}-anchor`, "data-launcher-size": effectiveOptions.launcher.size, children: [
|
|
9145
|
+
isOpen || activated ? /* @__PURE__ */ jsx39("div", { class: `${p35}-surface`, hidden: !isOpen, children: renderSurface(panelSize) }) : null,
|
|
9146
|
+
launcherVisible ? /* @__PURE__ */ jsx39(
|
|
8794
9147
|
Launcher,
|
|
8795
9148
|
{
|
|
8796
9149
|
onToggle: handleOpen,
|
|
@@ -8800,7 +9153,7 @@ function App({ options, hostElement, bus }) {
|
|
|
8800
9153
|
edgeTab: drawerEdgeTab
|
|
8801
9154
|
}
|
|
8802
9155
|
) : null,
|
|
8803
|
-
calloutToRender ? /* @__PURE__ */
|
|
9156
|
+
calloutToRender ? /* @__PURE__ */ jsx39(
|
|
8804
9157
|
LauncherCallout,
|
|
8805
9158
|
{
|
|
8806
9159
|
callout: calloutToRender,
|
|
@@ -8865,34 +9218,37 @@ var TRACKED = {
|
|
|
8865
9218
|
expand: (on) => ({ on }),
|
|
8866
9219
|
fullscreen: (on) => ({ on }),
|
|
8867
9220
|
// Conversation funnel. `send` is the key conversion; text never rides.
|
|
8868
|
-
send: (
|
|
8869
|
-
message: (
|
|
9221
|
+
send: (p36) => ({ attachments: p36.attachmentCount }),
|
|
9222
|
+
message: (p36) => ({ role: p36.role }),
|
|
8870
9223
|
stop: () => void 0,
|
|
8871
9224
|
clear: () => void 0,
|
|
8872
9225
|
suggestion: () => void 0,
|
|
8873
|
-
toggleHistory: (
|
|
9226
|
+
toggleHistory: (p36) => ({ view: p36.view }),
|
|
8874
9227
|
handshake: () => void 0,
|
|
8875
9228
|
// Forms + human-in-the-loop — ids and outcomes, never values.
|
|
8876
|
-
formSubmit: (
|
|
9229
|
+
formSubmit: (p36) => ({ formId: p36.formId, skipped: p36.skipped }),
|
|
8877
9230
|
toolResult: () => void 0,
|
|
8878
|
-
toolDecision: (
|
|
9231
|
+
toolDecision: (p36) => ({ approved: p36.approved }),
|
|
9232
|
+
// Feedback + read tracking — outcome only; message text never rides.
|
|
9233
|
+
messageFeedback: (p36) => ({ value: p36.value ?? "none" }),
|
|
9234
|
+
messageSeen: () => void 0,
|
|
8879
9235
|
// Content — ids, tags + counts only; titles/bodies never ride.
|
|
8880
|
-
contentView: (
|
|
8881
|
-
contentOpen: (
|
|
8882
|
-
contentSearch: (
|
|
8883
|
-
contentRead: (
|
|
8884
|
-
contentLinkClick: (
|
|
9236
|
+
contentView: (p36) => ({ section: p36.section, tags: p36.tags, count: p36.count }),
|
|
9237
|
+
contentOpen: (p36) => ({ contentId: p36.contentId, tags: p36.tags }),
|
|
9238
|
+
contentSearch: (p36) => ({ qlen: p36.queryLength, hits: p36.hitCount }),
|
|
9239
|
+
contentRead: (p36) => ({ contentId: p36.contentId }),
|
|
9240
|
+
contentLinkClick: (p36) => ({ contentId: p36.contentId }),
|
|
8885
9241
|
// Composer / attachments / voice.
|
|
8886
|
-
attach: (
|
|
9242
|
+
attach: (p36) => ({ count: p36.count, bytes: p36.totalBytes }),
|
|
8887
9243
|
voiceStart: () => void 0,
|
|
8888
|
-
voiceStop: (
|
|
9244
|
+
voiceStop: (p36) => ({ ms: p36.durationMs }),
|
|
8889
9245
|
voiceCancel: () => void 0,
|
|
8890
9246
|
// Preferences — how visitors tune the surface.
|
|
8891
9247
|
localeChange: (locale) => ({ locale }),
|
|
8892
9248
|
themeChange: (theme) => ({ theme }),
|
|
8893
9249
|
textSizeChange: (size) => ({ size }),
|
|
8894
|
-
soundToggle: (
|
|
8895
|
-
sidebarToggle: (
|
|
9250
|
+
soundToggle: (p36) => ({ muted: p36.muted }),
|
|
9251
|
+
sidebarToggle: (p36) => ({ collapsed: p36.collapsed }),
|
|
8896
9252
|
calloutDismiss: () => void 0,
|
|
8897
9253
|
// Health signal only — the error object itself never leaves the page.
|
|
8898
9254
|
error: () => void 0
|
|
@@ -9101,6 +9457,9 @@ var EVENT_NAMES = [
|
|
|
9101
9457
|
"formSubmit",
|
|
9102
9458
|
"toolResult",
|
|
9103
9459
|
"toolDecision",
|
|
9460
|
+
// Feedback + read tracking
|
|
9461
|
+
"messageFeedback",
|
|
9462
|
+
"messageSeen",
|
|
9104
9463
|
// Content (news / help / home articles)
|
|
9105
9464
|
"contentView",
|
|
9106
9465
|
"contentOpen",
|