@m6d/cortex-angular 0.7.0 → 0.8.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/README.md +72 -0
- package/fesm2022/m6d-cortex-angular.mjs +1733 -794
- package/package.json +1 -1
- package/theme.css +9 -0
- package/types/m6d-cortex-angular.d.ts +83 -3
|
@@ -24,7 +24,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
24
24
|
|
|
25
25
|
// dist/fesm2022/m6d-cortex-angular.mjs
|
|
26
26
|
import * as i0 from "@angular/core";
|
|
27
|
-
import { ChangeDetectionStrategy as ChangeDetectionStrategy2, Component, DestroyRef, EnvironmentInjector, Injectable, InjectionToken, Injector, NgZone, Pipe, ViewEncapsulation as ViewEncapsulation2, afterNextRender, afterRenderEffect, computed, createEnvironmentInjector, effect, inject, input, output, runInInjectionContext, signal, untracked, viewChild } from "@angular/core";
|
|
27
|
+
import { ChangeDetectionStrategy as ChangeDetectionStrategy2, Component, DestroyRef, Directive, EnvironmentInjector, Injectable, InjectionToken, Injector, NgZone, Pipe, TemplateRef, ViewEncapsulation as ViewEncapsulation2, afterNextRender, afterRenderEffect, computed, contentChild, createEnvironmentInjector, effect, inject, input, output, runInInjectionContext, signal, untracked, viewChild } from "@angular/core";
|
|
28
28
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
29
29
|
|
|
30
30
|
// src/internal/wire/index.ts
|
|
@@ -44,6 +44,7 @@ function checkAttachmentPolicy(contentType, sizeBytes) {
|
|
|
44
44
|
return "size";
|
|
45
45
|
return "ok";
|
|
46
46
|
}
|
|
47
|
+
var STATEMENT_TOOLS = ["executeCode", "queryDataset", "describeDataset"];
|
|
47
48
|
function toUiMessage(message) {
|
|
48
49
|
return { ...message, role: message.role === "trigger" ? "user" : message.role };
|
|
49
50
|
}
|
|
@@ -218,6 +219,331 @@ function newestAssistantMessage(messages) {
|
|
|
218
219
|
}
|
|
219
220
|
return;
|
|
220
221
|
}
|
|
222
|
+
// src/internal/client/src/i18n/ar.json
|
|
223
|
+
var ar_default = {
|
|
224
|
+
translate_history: "السجل",
|
|
225
|
+
translate_back: "رجوع",
|
|
226
|
+
translate_greeting: "بماذا يمكنني مساعدتك اليوم؟",
|
|
227
|
+
translate_n_conversations: "{{count}} محادثات",
|
|
228
|
+
translate_one_conversation: "محادثة واحدة",
|
|
229
|
+
translate_no_threads_yet: "لا توجد محادثات بعد",
|
|
230
|
+
translate_start_a_new_conversation: "ابدأ محادثة جديدة",
|
|
231
|
+
translate_untitled: "بدون عنوان",
|
|
232
|
+
translate_new_chat: "محادثة جديدة",
|
|
233
|
+
translate_normal: "عادي",
|
|
234
|
+
translate_debug: "تصحيح",
|
|
235
|
+
translate_type_a_message: "اكتب رسالة...",
|
|
236
|
+
translate_completed: "مكتمل",
|
|
237
|
+
translate_attach_files: "إرفاق ملفات",
|
|
238
|
+
translate_drop_files_here: "أفلت ملفاتك هنا...",
|
|
239
|
+
translate_remove_attachment: "إزالة المرفق",
|
|
240
|
+
translate_attachment_rejected: "لا يمكن إرفاق هذا الملف",
|
|
241
|
+
translate_attachment_caption: "من فضلك اطّلع على الملفات المرفقة.",
|
|
242
|
+
translate_download: "تنزيل",
|
|
243
|
+
translate_tool_status_0: "جارٍ جلب البيانات…",
|
|
244
|
+
translate_tool_status_1: "جارٍ تحليل المعلومات…",
|
|
245
|
+
translate_tool_status_2: "جارٍ معالجة الطلب…",
|
|
246
|
+
translate_tool_status_3: "جارٍ تجميع النتائج…",
|
|
247
|
+
translate_tool_status_4: "جارٍ تحضير الرد…",
|
|
248
|
+
translate_tool_status_5: "جارٍ البحث…",
|
|
249
|
+
translate_tool_status_6: "جارٍ فحص السجلات…",
|
|
250
|
+
translate_tool_status_7: "جارٍ مراجعة التفاصيل…",
|
|
251
|
+
translate_tool_status_8: "جارٍ إجراء الحسابات…",
|
|
252
|
+
translate_tool_status_9: "جارٍ سحب المعلومات…",
|
|
253
|
+
translate_tool_done_0: "تم جلب البيانات بنجاح",
|
|
254
|
+
translate_tool_done_1: "تم التحليل بنجاح",
|
|
255
|
+
translate_tool_done_2: "تمت معالجة الطلب بنجاح",
|
|
256
|
+
translate_tool_done_3: "تم تجميع النتائج بنجاح",
|
|
257
|
+
translate_tool_done_4: "تم تحضير الرد بنجاح",
|
|
258
|
+
translate_tool_done_5: "تم البحث بنجاح",
|
|
259
|
+
translate_tool_done_6: "تم فحص السجلات بنجاح",
|
|
260
|
+
translate_tool_done_7: "تمت المراجعة بنجاح",
|
|
261
|
+
translate_tool_done_8: "تمت الحسابات بنجاح",
|
|
262
|
+
translate_tool_done_9: "تم استرجاع المعلومات بنجاح",
|
|
263
|
+
translate_rows_read: "{{count}} صفوف",
|
|
264
|
+
translate_one_more_step: "وخطوة أخرى",
|
|
265
|
+
translate_n_more_steps: "و{{count}} خطوات أخرى",
|
|
266
|
+
translate_tool_error: "حدث خطأ",
|
|
267
|
+
translate_attachment_status: "جارٍ قراءة الملف المرفق…",
|
|
268
|
+
translate_attachment_done: "تمت قراءة الملف المرفق",
|
|
269
|
+
translate_graph_0: "جارٍ استكشاف الروابط...",
|
|
270
|
+
translate_graph_1: "جارٍ رسم الخريطة...",
|
|
271
|
+
translate_graph_2: "جارٍ اكتشاف العلاقات...",
|
|
272
|
+
translate_graph_3: "جارٍ تتبع الروابط...",
|
|
273
|
+
translate_graph_4: "جارٍ التنقل في المعرفة...",
|
|
274
|
+
translate_graph_5: "جارٍ كشف الرؤى...",
|
|
275
|
+
translate_graph_6: "جارٍ ربط النقاط...",
|
|
276
|
+
translate_graph_7: "جارٍ تتبع المسار...",
|
|
277
|
+
translate_graph_8: "جارٍ تجميع الأجزاء...",
|
|
278
|
+
translate_graph_9: "جارٍ بناء الصورة...",
|
|
279
|
+
translate_code_0: "جارٍ حساب الأرقام...",
|
|
280
|
+
translate_code_1: "جارٍ معالجة البيانات...",
|
|
281
|
+
translate_code_2: "جارٍ تنفيذ طلبك...",
|
|
282
|
+
translate_code_3: "جارٍ تحليل الأرقام...",
|
|
283
|
+
translate_code_4: "جارٍ تجميع كل شيء...",
|
|
284
|
+
translate_code_5: "جارٍ تحليل النتائج...",
|
|
285
|
+
translate_code_6: "جارٍ العمل خلف الكواليس...",
|
|
286
|
+
translate_code_7: "جارٍ ترتيب التفاصيل...",
|
|
287
|
+
translate_code_8: "جارٍ تحضير إجابتك...",
|
|
288
|
+
translate_code_9: "أوشك على الانتهاء...",
|
|
289
|
+
translate_reasoning_0: "جارٍ التفكير...",
|
|
290
|
+
translate_reasoning_1: "جارٍ دراسة الخيارات...",
|
|
291
|
+
translate_reasoning_2: "جارٍ تقييم الاحتمالات...",
|
|
292
|
+
translate_reasoning_3: "جارٍ التأمل في هذا...",
|
|
293
|
+
translate_reasoning_4: "جارٍ إيجاد الحل...",
|
|
294
|
+
translate_reasoning_5: "جارٍ ترتيب الأفكار...",
|
|
295
|
+
translate_reasoning_6: "جارٍ التمعن في الأمر...",
|
|
296
|
+
translate_reasoning_7: "جارٍ إيجاد أفضل طريقة...",
|
|
297
|
+
translate_reasoning_8: "جارٍ تنظيم أفكاري...",
|
|
298
|
+
translate_reasoning_9: "أوشك على الانتهاء...",
|
|
299
|
+
translate_running: "قيد التنفيذ",
|
|
300
|
+
translate_aborted: "تم الإلغاء",
|
|
301
|
+
translate_input: "المدخلات",
|
|
302
|
+
translate_output: "المخرجات",
|
|
303
|
+
translate_calling: "جارٍ الاستدعاء",
|
|
304
|
+
translate_input_ready: "المدخلات جاهزة",
|
|
305
|
+
translate_needs_approval: "بحاجة إلى موافقة",
|
|
306
|
+
translate_approved: "تمت الموافقة",
|
|
307
|
+
translate_responded: "تم الرد",
|
|
308
|
+
translate_declined: "تم الرفض",
|
|
309
|
+
translate_approve: "موافقة",
|
|
310
|
+
translate_deny: "رفض",
|
|
311
|
+
translate_error: "خطأ",
|
|
312
|
+
translate_approval_requested: "طلب موافقة",
|
|
313
|
+
translate_approval_response: "رد الموافقة",
|
|
314
|
+
translate_waiting_for_approval: "في انتظار الموافقة لتنفيذ هذه الأداة.",
|
|
315
|
+
translate_tool_approved: "تمت الموافقة.",
|
|
316
|
+
translate_tool_response_received: "تم استلام الرد.",
|
|
317
|
+
translate_tokens: "رمز",
|
|
318
|
+
translate_fresh: "جديد",
|
|
319
|
+
translate_cache_read: "قراءة من الذاكرة",
|
|
320
|
+
translate_cache_write: "كتابة في الذاكرة",
|
|
321
|
+
translate_n_percent_cached: "{{percent}}٪ مخزّن مؤقتًا",
|
|
322
|
+
translate_text: "نص",
|
|
323
|
+
translate_reasoning: "الاستنتاج",
|
|
324
|
+
translate_read: "قراءة",
|
|
325
|
+
translate_write: "كتابة",
|
|
326
|
+
translate_total: "الإجمالي",
|
|
327
|
+
translate_request: "الطلب",
|
|
328
|
+
translate_response: "الرد",
|
|
329
|
+
translate_step_n: "الخطوة {{number}}",
|
|
330
|
+
translate_inspect_llm_requests: "فحص طلبات النموذج",
|
|
331
|
+
translate_loading: "جارٍ التحميل…",
|
|
332
|
+
translate_no_llm_requests: "لا توجد طلبات نموذج مسجّلة لهذه الرسالة.",
|
|
333
|
+
translate_unhandled_type: "نوع غير مدعوم:",
|
|
334
|
+
translate_client_tool_title: "أكمل هذه الخطوة للمتابعة",
|
|
335
|
+
translate_client_tool_loading: "جارٍ تجهيز خطوة آمنة...",
|
|
336
|
+
translate_client_tool_failed: "تعذّر تحميل هذه الخطوة",
|
|
337
|
+
translate_client_tool_retry: "حاول مرة أخرى",
|
|
338
|
+
translate_client_tool_cancel: "إلغاء",
|
|
339
|
+
translate_location_hint: "انقر على الخريطة لتثبيت الدبوس",
|
|
340
|
+
translate_location_locate: "استخدم موقعي",
|
|
341
|
+
translate_location_locating: "جارٍ تحديد موقعك",
|
|
342
|
+
translate_location_locate_failed: "موقعك غير متاح",
|
|
343
|
+
translate_location_map_failed: "تعذّر تحميل الخريطة",
|
|
344
|
+
translate_location_send_failed: "تعذّر الإرسال، حاول مرة أخرى",
|
|
345
|
+
translate_location_skip: "ليس الآن",
|
|
346
|
+
translate_location_send: "إرسال",
|
|
347
|
+
translate_location_shared: "تمت مشاركة الموقع",
|
|
348
|
+
translate_location_not_shared: "لم تتم مشاركة الموقع",
|
|
349
|
+
translate_trigger_fired: "تم التشغيل بواسطة",
|
|
350
|
+
translate_trigger_payload: "الحمولة",
|
|
351
|
+
translate_messages_disabled: "يعمل هذا الوكيل من مشغّلاته فقط.",
|
|
352
|
+
translate_streaming: "جارٍ البث",
|
|
353
|
+
translate_done: "تم",
|
|
354
|
+
translate_no_reasoning: "لا يوجد تفكير مسجّل.",
|
|
355
|
+
translate_copy: "نسخ إلى الحافظة",
|
|
356
|
+
translate_copied: "تم النسخ",
|
|
357
|
+
translate_media_pending_mermaid: "جارٍ رسم المخطط",
|
|
358
|
+
translate_media_pending_vega_lite: "جارٍ رسم الرسم البياني",
|
|
359
|
+
translate_media_pending_map: "جارٍ رسم الخريطة",
|
|
360
|
+
translate_media_cut_off: "انقطع هذا المقطع قبل اكتماله.",
|
|
361
|
+
translate_media_failed: "تعذر عرض هذا المقطع.",
|
|
362
|
+
translate_media_source: "المصدر",
|
|
363
|
+
translate_media_pending: "جارٍ الرسم",
|
|
364
|
+
translate_image_unavailable: "الصورة غير متاحة",
|
|
365
|
+
translate_image_unavailable_alt: "الصورة غير متاحة: {{alt}}",
|
|
366
|
+
translate_send: "إرسال",
|
|
367
|
+
translate_table_expand: "توسيع الجدول",
|
|
368
|
+
translate_table_export: "تصدير إلى Excel",
|
|
369
|
+
translate_close: "إغلاق",
|
|
370
|
+
translate_approval_needed: "بحاجة إلى موافقتك",
|
|
371
|
+
translate_approval_action: "تنفيذ {{tool}}",
|
|
372
|
+
translate_details: "التفاصيل",
|
|
373
|
+
translate_approved_failed: "تمت الموافقة لكنه فشل",
|
|
374
|
+
translate_empty_value: "(فارغ)",
|
|
375
|
+
translate_approval_cancelled: "لم يُتخذ قرار"
|
|
376
|
+
};
|
|
377
|
+
// src/internal/client/src/i18n/en.json
|
|
378
|
+
var en_default = {
|
|
379
|
+
translate_history: "History",
|
|
380
|
+
translate_back: "Back",
|
|
381
|
+
translate_greeting: "What can I help you with today?",
|
|
382
|
+
translate_n_conversations: "{{count}} conversations",
|
|
383
|
+
translate_one_conversation: "1 conversation",
|
|
384
|
+
translate_no_threads_yet: "No threads yet",
|
|
385
|
+
translate_start_a_new_conversation: "Start a new conversation",
|
|
386
|
+
translate_untitled: "Untitled",
|
|
387
|
+
translate_new_chat: "New Chat",
|
|
388
|
+
translate_normal: "Normal",
|
|
389
|
+
translate_debug: "Debug",
|
|
390
|
+
translate_type_a_message: "Type a message...",
|
|
391
|
+
translate_completed: "Completed",
|
|
392
|
+
translate_attach_files: "Attach files",
|
|
393
|
+
translate_drop_files_here: "Drop your files here...",
|
|
394
|
+
translate_remove_attachment: "Remove attachment",
|
|
395
|
+
translate_attachment_rejected: "This file cannot be attached",
|
|
396
|
+
translate_attachment_caption: "Please take a look at the attached files.",
|
|
397
|
+
translate_download: "Download",
|
|
398
|
+
translate_tool_status_0: "Fetching data...",
|
|
399
|
+
translate_tool_status_1: "Analyzing information...",
|
|
400
|
+
translate_tool_status_2: "Processing request...",
|
|
401
|
+
translate_tool_status_3: "Gathering results...",
|
|
402
|
+
translate_tool_status_4: "Preparing response...",
|
|
403
|
+
translate_tool_status_5: "Looking things up...",
|
|
404
|
+
translate_tool_status_6: "Checking records...",
|
|
405
|
+
translate_tool_status_7: "Reviewing details...",
|
|
406
|
+
translate_tool_status_8: "Running calculations...",
|
|
407
|
+
translate_tool_status_9: "Pulling information...",
|
|
408
|
+
translate_tool_done_0: "Data fetched successfully",
|
|
409
|
+
translate_tool_done_1: "Analysis completed successfully",
|
|
410
|
+
translate_tool_done_2: "Request processed successfully",
|
|
411
|
+
translate_tool_done_3: "Results gathered successfully",
|
|
412
|
+
translate_tool_done_4: "Response prepared successfully",
|
|
413
|
+
translate_tool_done_5: "Lookup completed successfully",
|
|
414
|
+
translate_tool_done_6: "Records checked successfully",
|
|
415
|
+
translate_tool_done_7: "Review completed successfully",
|
|
416
|
+
translate_tool_done_8: "Calculations completed successfully",
|
|
417
|
+
translate_tool_done_9: "Information retrieved successfully",
|
|
418
|
+
translate_rows_read: "{{count}} rows",
|
|
419
|
+
translate_one_more_step: "and 1 more step",
|
|
420
|
+
translate_n_more_steps: "and {{count}} more steps",
|
|
421
|
+
translate_tool_error: "Something went wrong",
|
|
422
|
+
translate_attachment_status: "Reading the attached file...",
|
|
423
|
+
translate_attachment_done: "Finished reading the file",
|
|
424
|
+
translate_graph_0: "Exploring connections...",
|
|
425
|
+
translate_graph_1: "Mapping out the links...",
|
|
426
|
+
translate_graph_2: "Discovering relationships...",
|
|
427
|
+
translate_graph_3: "Tracing the connections...",
|
|
428
|
+
translate_graph_4: "Navigating the knowledge...",
|
|
429
|
+
translate_graph_5: "Uncovering insights...",
|
|
430
|
+
translate_graph_6: "Connecting the dots...",
|
|
431
|
+
translate_graph_7: "Following the trail...",
|
|
432
|
+
translate_graph_8: "Piecing things together...",
|
|
433
|
+
translate_graph_9: "Building the picture...",
|
|
434
|
+
translate_code_0: "Running the numbers...",
|
|
435
|
+
translate_code_1: "Working through the data...",
|
|
436
|
+
translate_code_2: "Processing your request...",
|
|
437
|
+
translate_code_3: "Crunching the figures...",
|
|
438
|
+
translate_code_4: "Putting it all together...",
|
|
439
|
+
translate_code_5: "Analyzing the results...",
|
|
440
|
+
translate_code_6: "Working behind the scenes...",
|
|
441
|
+
translate_code_7: "Sorting through the details...",
|
|
442
|
+
translate_code_8: "Preparing your answer...",
|
|
443
|
+
translate_code_9: "Almost ready...",
|
|
444
|
+
translate_reasoning_0: "Thinking it through...",
|
|
445
|
+
translate_reasoning_1: "Considering the options...",
|
|
446
|
+
translate_reasoning_2: "Weighing the possibilities...",
|
|
447
|
+
translate_reasoning_3: "Reflecting on this...",
|
|
448
|
+
translate_reasoning_4: "Working it out...",
|
|
449
|
+
translate_reasoning_5: "Putting thoughts together...",
|
|
450
|
+
translate_reasoning_6: "Mulling it over...",
|
|
451
|
+
translate_reasoning_7: "Finding the best approach...",
|
|
452
|
+
translate_reasoning_8: "Organizing my thoughts...",
|
|
453
|
+
translate_reasoning_9: "Almost there...",
|
|
454
|
+
translate_running: "Running",
|
|
455
|
+
translate_aborted: "Aborted",
|
|
456
|
+
translate_input: "Input",
|
|
457
|
+
translate_output: "Output",
|
|
458
|
+
translate_calling: "Calling",
|
|
459
|
+
translate_input_ready: "Input ready",
|
|
460
|
+
translate_needs_approval: "Needs approval",
|
|
461
|
+
translate_approved: "Approved",
|
|
462
|
+
translate_responded: "Responded",
|
|
463
|
+
translate_declined: "Declined",
|
|
464
|
+
translate_approve: "Approve",
|
|
465
|
+
translate_deny: "Deny",
|
|
466
|
+
translate_error: "Error",
|
|
467
|
+
translate_approval_requested: "Approval requested",
|
|
468
|
+
translate_approval_response: "Approval response",
|
|
469
|
+
translate_waiting_for_approval: "Waiting for approval to execute this tool.",
|
|
470
|
+
translate_tool_approved: "Approved.",
|
|
471
|
+
translate_tool_response_received: "Response received.",
|
|
472
|
+
translate_tokens: "tokens",
|
|
473
|
+
translate_fresh: "Fresh",
|
|
474
|
+
translate_cache_read: "Cache read",
|
|
475
|
+
translate_cache_write: "Cache write",
|
|
476
|
+
translate_n_percent_cached: "{{percent}}% cached",
|
|
477
|
+
translate_text: "Text",
|
|
478
|
+
translate_reasoning: "Reasoning",
|
|
479
|
+
translate_read: "Read",
|
|
480
|
+
translate_write: "Write",
|
|
481
|
+
translate_total: "Total",
|
|
482
|
+
translate_request: "Request",
|
|
483
|
+
translate_response: "Response",
|
|
484
|
+
translate_step_n: "Step {{number}}",
|
|
485
|
+
translate_inspect_llm_requests: "Inspect LLM requests",
|
|
486
|
+
translate_loading: "loading…",
|
|
487
|
+
translate_no_llm_requests: "No LLM requests recorded for this message.",
|
|
488
|
+
translate_unhandled_type: "Unhandled type:",
|
|
489
|
+
translate_client_tool_title: "Complete this step to continue",
|
|
490
|
+
translate_client_tool_loading: "Preparing a secure step...",
|
|
491
|
+
translate_client_tool_failed: "This step could not be loaded",
|
|
492
|
+
translate_client_tool_retry: "Try again",
|
|
493
|
+
translate_client_tool_cancel: "Cancel",
|
|
494
|
+
translate_location_hint: "Tap the map to drop a pin",
|
|
495
|
+
translate_location_locate: "Use my location",
|
|
496
|
+
translate_location_locating: "Finding your location",
|
|
497
|
+
translate_location_locate_failed: "Your location is not available",
|
|
498
|
+
translate_location_map_failed: "The map could not be loaded",
|
|
499
|
+
translate_location_send_failed: "Could not send, try again",
|
|
500
|
+
translate_location_skip: "Not now",
|
|
501
|
+
translate_location_send: "Send",
|
|
502
|
+
translate_location_shared: "Location shared",
|
|
503
|
+
translate_location_not_shared: "Location not shared",
|
|
504
|
+
translate_trigger_fired: "Triggered by",
|
|
505
|
+
translate_trigger_payload: "Payload",
|
|
506
|
+
translate_messages_disabled: "This agent only runs from its triggers.",
|
|
507
|
+
translate_streaming: "Streaming",
|
|
508
|
+
translate_done: "Done",
|
|
509
|
+
translate_no_reasoning: "No reasoning provided.",
|
|
510
|
+
translate_copy: "Copy to clipboard",
|
|
511
|
+
translate_copied: "Copied",
|
|
512
|
+
translate_media_pending_mermaid: "Drawing diagram",
|
|
513
|
+
translate_media_pending_vega_lite: "Drawing chart",
|
|
514
|
+
translate_media_pending_map: "Drawing map",
|
|
515
|
+
translate_media_cut_off: "This block was cut off before it finished.",
|
|
516
|
+
translate_media_failed: "Could not render this block.",
|
|
517
|
+
translate_media_source: "Source",
|
|
518
|
+
translate_media_pending: "Drawing",
|
|
519
|
+
translate_image_unavailable: "Image unavailable",
|
|
520
|
+
translate_image_unavailable_alt: "Image unavailable: {{alt}}",
|
|
521
|
+
translate_send: "Send",
|
|
522
|
+
translate_table_expand: "Expand table",
|
|
523
|
+
translate_table_export: "Export to Excel",
|
|
524
|
+
translate_close: "Close",
|
|
525
|
+
translate_approval_needed: "Needs your approval",
|
|
526
|
+
translate_approval_action: "Run {{tool}}",
|
|
527
|
+
translate_details: "Details",
|
|
528
|
+
translate_approved_failed: "Approved, but it failed",
|
|
529
|
+
translate_empty_value: "(empty)",
|
|
530
|
+
translate_approval_cancelled: "Not decided"
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
// src/internal/client/src/i18n.ts
|
|
534
|
+
var translations = { en: en_default, ar: ar_default };
|
|
535
|
+
function resolveLocale(locale) {
|
|
536
|
+
return locale && LOCALES.includes(locale) ? locale : LOCALES[0];
|
|
537
|
+
}
|
|
538
|
+
function translate(locale, key, params) {
|
|
539
|
+
const value = translations[locale][key];
|
|
540
|
+
if (!params)
|
|
541
|
+
return value;
|
|
542
|
+
return value.replace(/\{\{\s*(\w+)\s*\}\}/g, (match, name) => (name in params) ? String(params[name]) : match);
|
|
543
|
+
}
|
|
544
|
+
function pluralKey(count, one, other) {
|
|
545
|
+
return count === 1 ? one : other;
|
|
546
|
+
}
|
|
221
547
|
|
|
222
548
|
// src/internal/client/src/tools/tool-call-view.ts
|
|
223
549
|
var STATE_MODIFIERS = {
|
|
@@ -294,6 +620,8 @@ function stableIndex(id) {
|
|
|
294
620
|
return Math.abs(hash) % STATUS_COUNT;
|
|
295
621
|
}
|
|
296
622
|
function toolCallStatement(part) {
|
|
623
|
+
if (!STATEMENT_TOOLS.some((name) => name === part.name))
|
|
624
|
+
return;
|
|
297
625
|
const input = part.input;
|
|
298
626
|
if (!input || typeof input !== "object" || !("status" in input))
|
|
299
627
|
return;
|
|
@@ -335,7 +663,7 @@ function toolCallAnimation(part) {
|
|
|
335
663
|
return {
|
|
336
664
|
state,
|
|
337
665
|
active: state === "starting" || state === "processing",
|
|
338
|
-
gated: part.approval !== undefined,
|
|
666
|
+
gated: part.approval !== undefined || part.state === "approval-requested",
|
|
339
667
|
titleKey: pooledTitleKey(part, state, declined),
|
|
340
668
|
statement: toolCallStatement(part),
|
|
341
669
|
rowCount: state === "complete" ? toolCallRowCount(part) : undefined
|
|
@@ -348,6 +676,37 @@ function approvalPrompt(part, locale) {
|
|
|
348
676
|
const cortex = metadata.cortex;
|
|
349
677
|
return cortex?.approval?.[locale] || undefined;
|
|
350
678
|
}
|
|
679
|
+
function approvalCard(part, locale) {
|
|
680
|
+
const approved = part.approval?.approved;
|
|
681
|
+
const { state } = toolCallAnimation(part);
|
|
682
|
+
const decision = approved === undefined ? part.state === "approval-requested" ? "pending" : "cancelled" : !approved ? "declined" : state === "error" ? "failed" : "approved";
|
|
683
|
+
return {
|
|
684
|
+
sentence: approvalPrompt(part, locale) ?? translate(locale, "translate_approval_action", { tool: wordsOf(part.name) }),
|
|
685
|
+
rows: inputRows(part.input, locale),
|
|
686
|
+
decision,
|
|
687
|
+
decisionKey: DECISION_KEYS[decision]
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
var DECISION_KEYS = {
|
|
691
|
+
pending: undefined,
|
|
692
|
+
approved: "translate_approved",
|
|
693
|
+
declined: "translate_declined",
|
|
694
|
+
failed: "translate_approved_failed",
|
|
695
|
+
cancelled: "translate_approval_cancelled"
|
|
696
|
+
};
|
|
697
|
+
function wordsOf(name) {
|
|
698
|
+
const words = name.replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/[_\-.]+/g, " ").trim().toLowerCase();
|
|
699
|
+
return words.charAt(0).toUpperCase() + words.slice(1);
|
|
700
|
+
}
|
|
701
|
+
function inputRows(input, locale) {
|
|
702
|
+
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
703
|
+
return [];
|
|
704
|
+
return Object.entries(input).filter(([, value]) => value !== undefined).map(([key, value]) => ({
|
|
705
|
+
key,
|
|
706
|
+
label: wordsOf(key),
|
|
707
|
+
value: value === null || value === "" ? translate(locale, "translate_empty_value") : typeof value === "string" ? value : typeof value === "number" || typeof value === "boolean" ? String(value) : JSON.stringify(value)
|
|
708
|
+
}));
|
|
709
|
+
}
|
|
351
710
|
function activityLabelKeys(activity) {
|
|
352
711
|
return Array.from({ length: STATUS_COUNT }, (_, index) => `translate_${activity}_${index}`);
|
|
353
712
|
}
|
|
@@ -1194,7 +1553,7 @@ function renderMarkdown(value, fading = []) {
|
|
|
1194
1553
|
return "";
|
|
1195
1554
|
}
|
|
1196
1555
|
let html = marked.parse(value, { async: false });
|
|
1197
|
-
html = html.replace(/<table>/g, '<div style="overflow-x:auto"><table style="width:
|
|
1556
|
+
html = html.replace(/<table>/g, '<div style="overflow-x:auto"><table style="width:max-content">').replace(/<\/table>/g, "</table></div>").replace(/<(t[hd])([\s>])/g, '<$1 style="padding:0.5rem 1rem"$2');
|
|
1198
1557
|
if (fading.length)
|
|
1199
1558
|
html = wrapFadingTail(html, fading);
|
|
1200
1559
|
return DOMPurify.sanitize(html, { FORBID_TAGS: ["img", "picture", "source"] });
|
|
@@ -1245,6 +1604,9 @@ function splitTail(text, consumed, runs) {
|
|
|
1245
1604
|
pieces.unshift(document.createTextNode(text.slice(0, end)));
|
|
1246
1605
|
return pieces;
|
|
1247
1606
|
}
|
|
1607
|
+
// src/internal/client/src/content/message-segments.ts
|
|
1608
|
+
import { marked as marked2 } from "marked";
|
|
1609
|
+
|
|
1248
1610
|
// src/internal/markdown/index.ts
|
|
1249
1611
|
function fenceTracker() {
|
|
1250
1612
|
let fence = null;
|
|
@@ -1277,10 +1639,10 @@ function segmentMessageText(text, mediaLanguages) {
|
|
|
1277
1639
|
const segments = [];
|
|
1278
1640
|
let markdown = [];
|
|
1279
1641
|
let media = null;
|
|
1280
|
-
function flushMarkdown() {
|
|
1642
|
+
function flushMarkdown(final = false) {
|
|
1281
1643
|
if (markdown.length)
|
|
1282
|
-
segments.push(
|
|
1283
|
-
`)
|
|
1644
|
+
segments.push(...splitTables(markdown.join(`
|
|
1645
|
+
`), final));
|
|
1284
1646
|
markdown = [];
|
|
1285
1647
|
}
|
|
1286
1648
|
function closeMedia(closed) {
|
|
@@ -1315,7 +1677,7 @@ function segmentMessageText(text, mediaLanguages) {
|
|
|
1315
1677
|
segments.push(opener);
|
|
1316
1678
|
}
|
|
1317
1679
|
closeMedia(false);
|
|
1318
|
-
flushMarkdown();
|
|
1680
|
+
flushMarkdown(true);
|
|
1319
1681
|
return segments;
|
|
1320
1682
|
}
|
|
1321
1683
|
function classifyLine(line, state, mediaLanguages) {
|
|
@@ -1331,6 +1693,170 @@ function classifyLine(line, state, mediaLanguages) {
|
|
|
1331
1693
|
id: (attachment[2] ?? "").toLowerCase()
|
|
1332
1694
|
} : undefined;
|
|
1333
1695
|
}
|
|
1696
|
+
function splitTables(text, final) {
|
|
1697
|
+
const tokens = marked2.lexer(text);
|
|
1698
|
+
if (!tokens.some((token) => token.type === "table"))
|
|
1699
|
+
return [{ kind: "markdown", text }];
|
|
1700
|
+
const found = [];
|
|
1701
|
+
marked2.walkTokens(tokens, (token) => {
|
|
1702
|
+
if (token.type === "def")
|
|
1703
|
+
found.push(token.raw.trim());
|
|
1704
|
+
});
|
|
1705
|
+
const definitions = found.join(`
|
|
1706
|
+
`);
|
|
1707
|
+
const withDefinitions = (piece) => definitions ? `${definitions}
|
|
1708
|
+
|
|
1709
|
+
${piece}` : piece;
|
|
1710
|
+
const pieces = [];
|
|
1711
|
+
let prose = "";
|
|
1712
|
+
function pushProse() {
|
|
1713
|
+
if (prose.trim())
|
|
1714
|
+
pieces.push({ kind: "markdown", text: withDefinitions(prose) });
|
|
1715
|
+
prose = "";
|
|
1716
|
+
}
|
|
1717
|
+
const blocks = tokens.filter((token) => token.type !== "def");
|
|
1718
|
+
for (const [index, token] of blocks.entries()) {
|
|
1719
|
+
if (token.type !== "table") {
|
|
1720
|
+
prose += token.raw;
|
|
1721
|
+
continue;
|
|
1722
|
+
}
|
|
1723
|
+
pushProse();
|
|
1724
|
+
const rest = blocks.slice(index + 1).some((next) => next.raw.trim() !== "");
|
|
1725
|
+
pieces.push({
|
|
1726
|
+
kind: "table",
|
|
1727
|
+
text: withDefinitions(token.raw.trimEnd()),
|
|
1728
|
+
closed: rest || !final
|
|
1729
|
+
});
|
|
1730
|
+
}
|
|
1731
|
+
pushProse();
|
|
1732
|
+
return pieces;
|
|
1733
|
+
}
|
|
1734
|
+
// src/internal/client/src/content/xlsx.ts
|
|
1735
|
+
var NUMBER = /^-?(?:0|[1-9]\d*)(?:\.\d*[1-9])?$/;
|
|
1736
|
+
function isExactNumber(value) {
|
|
1737
|
+
return NUMBER.test(value) && value !== "-0" && value.replace(/[-.]/g, "").replace(/^0/, "").length <= 15;
|
|
1738
|
+
}
|
|
1739
|
+
var MAX_CELL_LENGTH = 32767;
|
|
1740
|
+
var encoder = new TextEncoder;
|
|
1741
|
+
function tableRows(table) {
|
|
1742
|
+
return Array.from(table.rows, (row) => Array.from(row.cells, cellText));
|
|
1743
|
+
}
|
|
1744
|
+
function cellText(cell) {
|
|
1745
|
+
const copy = cell.cloneNode(true);
|
|
1746
|
+
if (copy instanceof Element)
|
|
1747
|
+
copy.querySelectorAll("br").forEach((br) => br.replaceWith(`
|
|
1748
|
+
`));
|
|
1749
|
+
return (copy.textContent ?? "").trim();
|
|
1750
|
+
}
|
|
1751
|
+
function tableToXlsx(rows) {
|
|
1752
|
+
return new Blob([zip(workbookParts(rows))], {
|
|
1753
|
+
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
1754
|
+
});
|
|
1755
|
+
}
|
|
1756
|
+
function escapeXml(text) {
|
|
1757
|
+
return text.replace(/[\u0000-\u0008\u000b\u000c\u000e-\u001f\ufffe\uffff]/g, "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/_(x[0-9a-f]{4}_)/gi, "_x005F_$1");
|
|
1758
|
+
}
|
|
1759
|
+
function columnName(index) {
|
|
1760
|
+
let name = "";
|
|
1761
|
+
for (let n = index + 1;n > 0; n = Math.floor((n - 1) / 26)) {
|
|
1762
|
+
name = String.fromCharCode(65 + (n - 1) % 26) + name;
|
|
1763
|
+
}
|
|
1764
|
+
return name;
|
|
1765
|
+
}
|
|
1766
|
+
function sheetXml(rows) {
|
|
1767
|
+
const body = rows.map((row, r) => {
|
|
1768
|
+
const cells = row.map((value, c) => {
|
|
1769
|
+
const ref = `${columnName(c)}${r + 1}`;
|
|
1770
|
+
const style = r === 0 ? ' s="1"' : "";
|
|
1771
|
+
return r > 0 && isExactNumber(value) ? `<c r="${ref}"${style}><v>${value}</v></c>` : `<c r="${ref}"${style} t="inlineStr"><is><t xml:space="preserve">${escapeXml(value.slice(0, MAX_CELL_LENGTH))}</t></is></c>`;
|
|
1772
|
+
}).join("");
|
|
1773
|
+
return `<row r="${r + 1}">${cells}</row>`;
|
|
1774
|
+
}).join("");
|
|
1775
|
+
return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><sheetData>${body}</sheetData></worksheet>`;
|
|
1776
|
+
}
|
|
1777
|
+
function workbookParts(rows) {
|
|
1778
|
+
return [
|
|
1779
|
+
{
|
|
1780
|
+
name: "[Content_Types].xml",
|
|
1781
|
+
text: '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/></Types>'
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
name: "_rels/.rels",
|
|
1785
|
+
text: '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>'
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
name: "xl/workbook.xml",
|
|
1789
|
+
text: '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets></workbook>'
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
name: "xl/_rels/workbook.xml.rels",
|
|
1793
|
+
text: '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>'
|
|
1794
|
+
},
|
|
1795
|
+
{
|
|
1796
|
+
name: "xl/styles.xml",
|
|
1797
|
+
text: '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><fonts count="2"><font><sz val="11"/><name val="Calibri"/></font><font><b/><sz val="11"/><name val="Calibri"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border/></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="2"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/><xf numFmtId="0" fontId="1" fillId="0" borderId="0" xfId="0" applyFont="1"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles></styleSheet>'
|
|
1798
|
+
},
|
|
1799
|
+
{ name: "xl/worksheets/sheet1.xml", text: sheetXml(rows) }
|
|
1800
|
+
];
|
|
1801
|
+
}
|
|
1802
|
+
var CRC_TABLE = Array.from({ length: 256 }, (_, n) => {
|
|
1803
|
+
let c = n;
|
|
1804
|
+
for (let k = 0;k < 8; k++)
|
|
1805
|
+
c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1;
|
|
1806
|
+
return c >>> 0;
|
|
1807
|
+
});
|
|
1808
|
+
function crc32(bytes) {
|
|
1809
|
+
let crc = 4294967295;
|
|
1810
|
+
for (const byte of bytes)
|
|
1811
|
+
crc = (CRC_TABLE[(crc ^ byte) & 255] ?? 0) ^ crc >>> 8;
|
|
1812
|
+
return (crc ^ 4294967295) >>> 0;
|
|
1813
|
+
}
|
|
1814
|
+
function zip(parts) {
|
|
1815
|
+
const chunks = [];
|
|
1816
|
+
const central = [];
|
|
1817
|
+
let offset = 0;
|
|
1818
|
+
for (const part of parts) {
|
|
1819
|
+
const name = encoder.encode(part.name);
|
|
1820
|
+
const data = encoder.encode(part.text);
|
|
1821
|
+
const crc = crc32(data);
|
|
1822
|
+
const local = new DataView(new ArrayBuffer(30));
|
|
1823
|
+
local.setUint32(0, 67324752, true);
|
|
1824
|
+
local.setUint16(4, 20, true);
|
|
1825
|
+
local.setUint16(6, 2048, true);
|
|
1826
|
+
local.setUint32(14, crc, true);
|
|
1827
|
+
local.setUint32(18, data.length, true);
|
|
1828
|
+
local.setUint32(22, data.length, true);
|
|
1829
|
+
local.setUint16(26, name.length, true);
|
|
1830
|
+
chunks.push(new Uint8Array(local.buffer), name, data);
|
|
1831
|
+
const entry = new DataView(new ArrayBuffer(46));
|
|
1832
|
+
entry.setUint32(0, 33639248, true);
|
|
1833
|
+
entry.setUint16(4, 20, true);
|
|
1834
|
+
entry.setUint16(6, 20, true);
|
|
1835
|
+
entry.setUint16(8, 2048, true);
|
|
1836
|
+
entry.setUint32(16, crc, true);
|
|
1837
|
+
entry.setUint32(20, data.length, true);
|
|
1838
|
+
entry.setUint32(24, data.length, true);
|
|
1839
|
+
entry.setUint16(28, name.length, true);
|
|
1840
|
+
entry.setUint32(42, offset, true);
|
|
1841
|
+
central.push(new Uint8Array(entry.buffer), name);
|
|
1842
|
+
offset += 30 + name.length + data.length;
|
|
1843
|
+
}
|
|
1844
|
+
const centralSize = central.reduce((size, chunk) => size + chunk.length, 0);
|
|
1845
|
+
const end = new DataView(new ArrayBuffer(22));
|
|
1846
|
+
end.setUint32(0, 101010256, true);
|
|
1847
|
+
end.setUint16(8, parts.length, true);
|
|
1848
|
+
end.setUint16(10, parts.length, true);
|
|
1849
|
+
end.setUint32(12, centralSize, true);
|
|
1850
|
+
end.setUint32(16, offset, true);
|
|
1851
|
+
const all = [...chunks, ...central, new Uint8Array(end.buffer)];
|
|
1852
|
+
const out = new Uint8Array(all.reduce((size, chunk) => size + chunk.length, 0));
|
|
1853
|
+
let at = 0;
|
|
1854
|
+
for (const chunk of all) {
|
|
1855
|
+
out.set(chunk, at);
|
|
1856
|
+
at += chunk.length;
|
|
1857
|
+
}
|
|
1858
|
+
return out;
|
|
1859
|
+
}
|
|
1334
1860
|
// src/internal/charts/chart-spec.ts
|
|
1335
1861
|
var MAX_CHART_ROWS = 200;
|
|
1336
1862
|
var MAX_CHART_SIZE = 4000;
|
|
@@ -1449,544 +1975,233 @@ var URL_FUNCTION = /url\(([^)]*)\)/gi;
|
|
|
1449
1975
|
var OTHER_IMAGE_FUNCTION_NAMES = "src|image|image-set|-webkit-image-set|cross-fade|element";
|
|
1450
1976
|
var IMAGE_FUNCTION = new RegExp(String.raw`\b(url|${OTHER_IMAGE_FUNCTION_NAMES})\(`, "i");
|
|
1451
1977
|
var OTHER_IMAGE_FUNCTION = new RegExp(String.raw`\b(${OTHER_IMAGE_FUNCTION_NAMES})\(`, "i");
|
|
1452
|
-
var OTHER_IMAGE_FUNCTION_GLOBAL = new RegExp(String.raw`\b(${OTHER_IMAGE_FUNCTION_NAMES})\([^)]*\)`, "gi");
|
|
1453
|
-
var CSS_ESCAPE = /\\([0-9a-f]{1,6})\s?|\\(.)/gi;
|
|
1454
|
-
function decodeCssEscapes(text) {
|
|
1455
|
-
return text.replace(CSS_ESCAPE, (_, hex, literal) => {
|
|
1456
|
-
if (!hex)
|
|
1457
|
-
return literal ?? "";
|
|
1458
|
-
const code = parseInt(hex, 16);
|
|
1459
|
-
const invalid = code === 0 || code >= 55296 && code <= 57343 || code > 1114111;
|
|
1460
|
-
return String.fromCodePoint(invalid ? 65533 : code);
|
|
1461
|
-
});
|
|
1462
|
-
}
|
|
1463
|
-
function urlTarget(argument) {
|
|
1464
|
-
return argument.trim().replace(/^(['"])(.*)\1$/s, "$2").trim();
|
|
1465
|
-
}
|
|
1466
|
-
function externalResourceIn(value) {
|
|
1467
|
-
if (value.includes("\\") || OTHER_IMAGE_FUNCTION.test(value))
|
|
1468
|
-
return true;
|
|
1469
|
-
for (const [, argument] of value.matchAll(URL_FUNCTION)) {
|
|
1470
|
-
if (!urlTarget(argument ?? "").startsWith("#"))
|
|
1471
|
-
return true;
|
|
1472
|
-
}
|
|
1473
|
-
return false;
|
|
1474
|
-
}
|
|
1475
|
-
function scrubStyleText(text) {
|
|
1476
|
-
return decodeCssEscapes(text).replace(OTHER_IMAGE_FUNCTION_GLOBAL, "none").replace(URL_FUNCTION, (match, argument) => urlTarget(argument).startsWith("#") ? match : "none");
|
|
1477
|
-
}
|
|
1478
|
-
// src/internal/client/src/content/media-blocks.ts
|
|
1479
|
-
var builtIn = {
|
|
1480
|
-
async mermaid(host, source, { scheme }) {
|
|
1481
|
-
const [{ default: mermaid }, { default: DOMPurify2 }] = await Promise.all([
|
|
1482
|
-
import("mermaid"),
|
|
1483
|
-
import("dompurify")
|
|
1484
|
-
]);
|
|
1485
|
-
if (IMAGE_FUNCTION.test(source) || source.includes("\\")) {
|
|
1486
|
-
throw new Error("Diagrams may not reference URLs.");
|
|
1487
|
-
}
|
|
1488
|
-
if (/%%\{/.test(source))
|
|
1489
|
-
throw new Error("Diagrams may not carry init directives.");
|
|
1490
|
-
if (/^\s*---\s*$/m.test(source))
|
|
1491
|
-
throw new Error("Diagrams may not carry frontmatter.");
|
|
1492
|
-
if (/\bimg\s*:/.test(source))
|
|
1493
|
-
throw new Error("Diagrams may not embed images.");
|
|
1494
|
-
const kind = diagramType(source);
|
|
1495
|
-
if (!DIAGRAM_TYPES.test(kind))
|
|
1496
|
-
throw new Error(`Unsupported diagram type: ${kind}`);
|
|
1497
|
-
const run = mermaidQueue.then(async () => {
|
|
1498
|
-
if (!mermaidReady) {
|
|
1499
|
-
mermaid.initialize({ startOnLoad: false, securityLevel: "strict", htmlLabels: false });
|
|
1500
|
-
mermaidReady = true;
|
|
1501
|
-
}
|
|
1502
|
-
const themed = `%%{init: {"theme": "${scheme === "dark" ? "dark" : "default"}"}}%%
|
|
1503
|
-
${source}`;
|
|
1504
|
-
await mermaid.parse(themed);
|
|
1505
|
-
return (await mermaid.render(`cortex-mermaid-${nextId()}`, themed, host)).svg;
|
|
1506
|
-
});
|
|
1507
|
-
mermaidQueue = run.catch(() => {
|
|
1508
|
-
return;
|
|
1509
|
-
});
|
|
1510
|
-
const svg = await run;
|
|
1511
|
-
const drawing = document.createElement("div");
|
|
1512
|
-
drawing.innerHTML = DOMPurify2.sanitize(svg, { USE_PROFILES: { svg: true, svgFilters: true } });
|
|
1513
|
-
stripExternalResources(drawing);
|
|
1514
|
-
host.replaceChildren(...drawing.childNodes);
|
|
1515
|
-
return () => {
|
|
1516
|
-
host.innerHTML = "";
|
|
1517
|
-
};
|
|
1518
|
-
},
|
|
1519
|
-
async "vega-lite"(host, source, { scheme }) {
|
|
1520
|
-
const spec = JSON.parse(source);
|
|
1521
|
-
const violation = chartSpecViolation(spec);
|
|
1522
|
-
if (violation)
|
|
1523
|
-
throw new Error(violation);
|
|
1524
|
-
const [{ default: embed }, vega] = await Promise.all([import("vega-embed"), import("vega")]);
|
|
1525
|
-
const refuse = () => Promise.reject(new Error("Charts may only use inline data."));
|
|
1526
|
-
const drawing = document.createElement("div");
|
|
1527
|
-
const result = await embed(drawing, spec, {
|
|
1528
|
-
actions: false,
|
|
1529
|
-
renderer: "svg",
|
|
1530
|
-
mode: "vega-lite",
|
|
1531
|
-
loader: { ...vega.loader(), load: refuse, sanitize: refuse },
|
|
1532
|
-
ast: true,
|
|
1533
|
-
...scheme === "dark" ? { theme: "dark" } : {},
|
|
1534
|
-
config: { background: "transparent" }
|
|
1535
|
-
});
|
|
1536
|
-
stripExternalResources(drawing);
|
|
1537
|
-
host.replaceChildren(drawing);
|
|
1538
|
-
return () => result.finalize();
|
|
1539
|
-
},
|
|
1540
|
-
async map(host, source) {
|
|
1541
|
-
const spec = parseMapSpec(JSON.parse(source));
|
|
1542
|
-
const { leaflet, map, dispose } = await mountMap(host, { ...spec, interactive: true });
|
|
1543
|
-
for (const marker of spec.markers) {
|
|
1544
|
-
const pin = leaflet.marker(marker.position).addTo(map);
|
|
1545
|
-
if (marker.label) {
|
|
1546
|
-
const label = document.createElement("span");
|
|
1547
|
-
label.textContent = marker.label;
|
|
1548
|
-
pin.bindTooltip(label);
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
return dispose;
|
|
1552
|
-
}
|
|
1553
|
-
};
|
|
1554
|
-
var PENDING_LABEL = {
|
|
1555
|
-
mermaid: "translate_media_pending_mermaid",
|
|
1556
|
-
"vega-lite": "translate_media_pending_vega_lite",
|
|
1557
|
-
map: "translate_media_pending_map"
|
|
1558
|
-
};
|
|
1559
|
-
function mediaPendingLabel(language) {
|
|
1560
|
-
return PENDING_LABEL[language] ?? "translate_media_pending";
|
|
1561
|
-
}
|
|
1562
|
-
function mediaLanguages(overrides) {
|
|
1563
|
-
return Object.keys({ ...builtIn, ...overrides });
|
|
1564
|
-
}
|
|
1565
|
-
function drawMediaBlock(host, options) {
|
|
1566
|
-
const { language, source, context, overrides, onError } = options;
|
|
1567
|
-
const slot = host.appendChild(document.createElement("div"));
|
|
1568
|
-
const renderer = overrides?.[language] ?? builtIn[language];
|
|
1569
|
-
let dispose;
|
|
1570
|
-
let cancelled = false;
|
|
1571
|
-
const drawn = renderer ? renderer(slot, source, context) : Promise.reject(new Error(`No renderer for ${language}.`));
|
|
1572
|
-
drawn.then((teardown) => {
|
|
1573
|
-
if (cancelled)
|
|
1574
|
-
teardown();
|
|
1575
|
-
else
|
|
1576
|
-
dispose = teardown;
|
|
1577
|
-
}, (reason) => {
|
|
1578
|
-
if (!cancelled)
|
|
1579
|
-
onError(reason instanceof Error ? reason.message : String(reason));
|
|
1580
|
-
});
|
|
1581
|
-
return () => {
|
|
1582
|
-
cancelled = true;
|
|
1583
|
-
dispose?.();
|
|
1584
|
-
slot.remove();
|
|
1585
|
-
};
|
|
1586
|
-
}
|
|
1587
|
-
var DIAGRAM_TYPES = /^(flowchart|graph|sequenceDiagram|stateDiagram(-v2)?|erDiagram|gantt|pie|classDiagram|journey|timeline|mindmap)$/;
|
|
1588
|
-
function diagramType(source) {
|
|
1589
|
-
const line = source.split(`
|
|
1590
|
-
`).find((candidate) => /\S/.test(candidate) && !/^\s*%%/.test(candidate));
|
|
1591
|
-
return /^\s*(\S+)/.exec(line ?? "")?.[1] ?? "";
|
|
1592
|
-
}
|
|
1593
|
-
var mermaidQueue = Promise.resolve();
|
|
1594
|
-
var mermaidReady = false;
|
|
1595
|
-
var counter = 0;
|
|
1596
|
-
function nextId() {
|
|
1597
|
-
counter += 1;
|
|
1598
|
-
return counter;
|
|
1599
|
-
}
|
|
1600
|
-
var RESOURCE_LINK_TAGS = new Set(["image", "use", "feImage"]);
|
|
1601
|
-
function stripExternalResources(root) {
|
|
1602
|
-
for (const element of [root, ...root.querySelectorAll("*")]) {
|
|
1603
|
-
for (const attribute of [...element.attributes]) {
|
|
1604
|
-
const loadsTarget = (attribute.name === "href" || attribute.name === "xlink:href") && RESOURCE_LINK_TAGS.has(element.tagName) && !attribute.value.trim().startsWith("#");
|
|
1605
|
-
if (loadsTarget || externalResourceIn(attribute.value)) {
|
|
1606
|
-
element.removeAttribute(attribute.name);
|
|
1607
|
-
}
|
|
1608
|
-
}
|
|
1609
|
-
if (element.tagName === "style" && element.textContent) {
|
|
1610
|
-
element.textContent = scrubStyleText(element.textContent);
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
}
|
|
1614
|
-
function parseMapSpec(value) {
|
|
1615
|
-
if (!value || typeof value !== "object")
|
|
1616
|
-
throw new Error("A map needs a JSON object.");
|
|
1617
|
-
const spec = value;
|
|
1618
|
-
const zoom = spec["zoom"] ?? 10;
|
|
1619
|
-
if (typeof zoom !== "number" || zoom < 0 || zoom > 22)
|
|
1620
|
-
throw new Error("zoom must be 0 to 22.");
|
|
1621
|
-
const markers = spec["markers"] ?? [];
|
|
1622
|
-
if (!Array.isArray(markers))
|
|
1623
|
-
throw new Error("markers must be a list.");
|
|
1624
|
-
return {
|
|
1625
|
-
center: latLng(spec["center"], "center"),
|
|
1626
|
-
zoom,
|
|
1627
|
-
markers: markers.map((marker, index) => {
|
|
1628
|
-
const entry = marker ?? {};
|
|
1629
|
-
const label = entry["label"];
|
|
1630
|
-
return {
|
|
1631
|
-
position: latLng(entry["position"], `markers[${index}].position`),
|
|
1632
|
-
label: typeof label === "string" ? label : undefined
|
|
1633
|
-
};
|
|
1634
|
-
})
|
|
1635
|
-
};
|
|
1636
|
-
}
|
|
1637
|
-
function latLng(value, field) {
|
|
1638
|
-
const pair = Array.isArray(value) ? value : [];
|
|
1639
|
-
const [lat, lng] = pair;
|
|
1640
|
-
if (typeof lat !== "number" || typeof lng !== "number" || Math.abs(lat) > 90 || Math.abs(lng) > 180) {
|
|
1641
|
-
throw new Error(`${field} must be [latitude, longitude].`);
|
|
1642
|
-
}
|
|
1643
|
-
return { lat, lng };
|
|
1644
|
-
}
|
|
1645
|
-
// src/internal/client/src/color-scheme.ts
|
|
1646
|
-
function watchColorScheme(theme, onChange) {
|
|
1647
|
-
if (theme !== "system") {
|
|
1648
|
-
onChange(theme ?? "light");
|
|
1649
|
-
return () => {};
|
|
1650
|
-
}
|
|
1651
|
-
const query = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1652
|
-
const report = () => onChange(query.matches ? "dark" : "light");
|
|
1653
|
-
report();
|
|
1654
|
-
query.addEventListener("change", report);
|
|
1655
|
-
return () => query.removeEventListener("change", report);
|
|
1978
|
+
var OTHER_IMAGE_FUNCTION_GLOBAL = new RegExp(String.raw`\b(${OTHER_IMAGE_FUNCTION_NAMES})\([^)]*\)`, "gi");
|
|
1979
|
+
var CSS_ESCAPE = /\\([0-9a-f]{1,6})\s?|\\(.)/gi;
|
|
1980
|
+
function decodeCssEscapes(text) {
|
|
1981
|
+
return text.replace(CSS_ESCAPE, (_, hex, literal) => {
|
|
1982
|
+
if (!hex)
|
|
1983
|
+
return literal ?? "";
|
|
1984
|
+
const code = parseInt(hex, 16);
|
|
1985
|
+
const invalid = code === 0 || code >= 55296 && code <= 57343 || code > 1114111;
|
|
1986
|
+
return String.fromCodePoint(invalid ? 65533 : code);
|
|
1987
|
+
});
|
|
1656
1988
|
}
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
import javascript from "highlight.js/lib/languages/javascript";
|
|
1660
|
-
import json from "highlight.js/lib/languages/json";
|
|
1661
|
-
import sql from "highlight.js/lib/languages/sql";
|
|
1662
|
-
var registered = false;
|
|
1663
|
-
function ensureLanguages() {
|
|
1664
|
-
if (registered)
|
|
1665
|
-
return;
|
|
1666
|
-
registered = true;
|
|
1667
|
-
hljs.registerLanguage("javascript", javascript);
|
|
1668
|
-
hljs.registerLanguage("json", json);
|
|
1669
|
-
hljs.registerLanguage("cypher", sql);
|
|
1989
|
+
function urlTarget(argument) {
|
|
1990
|
+
return argument.trim().replace(/^(['"])(.*)\1$/s, "$2").trim();
|
|
1670
1991
|
}
|
|
1671
|
-
function
|
|
1672
|
-
if (
|
|
1673
|
-
return
|
|
1674
|
-
|
|
1675
|
-
|
|
1992
|
+
function externalResourceIn(value) {
|
|
1993
|
+
if (value.includes("\\") || OTHER_IMAGE_FUNCTION.test(value))
|
|
1994
|
+
return true;
|
|
1995
|
+
for (const [, argument] of value.matchAll(URL_FUNCTION)) {
|
|
1996
|
+
if (!urlTarget(argument ?? "").startsWith("#"))
|
|
1997
|
+
return true;
|
|
1998
|
+
}
|
|
1999
|
+
return false;
|
|
1676
2000
|
}
|
|
1677
|
-
function
|
|
1678
|
-
return
|
|
2001
|
+
function scrubStyleText(text) {
|
|
2002
|
+
return decodeCssEscapes(text).replace(OTHER_IMAGE_FUNCTION_GLOBAL, "none").replace(URL_FUNCTION, (match, argument) => urlTarget(argument).startsWith("#") ? match : "none");
|
|
1679
2003
|
}
|
|
1680
|
-
// src/internal/client/src/
|
|
1681
|
-
var
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
translate_reasoning_7: "جارٍ إيجاد أفضل طريقة...",
|
|
1756
|
-
translate_reasoning_8: "جارٍ تنظيم أفكاري...",
|
|
1757
|
-
translate_reasoning_9: "أوشك على الانتهاء...",
|
|
1758
|
-
translate_running: "قيد التنفيذ",
|
|
1759
|
-
translate_aborted: "تم الإلغاء",
|
|
1760
|
-
translate_input: "المدخلات",
|
|
1761
|
-
translate_output: "المخرجات",
|
|
1762
|
-
translate_calling: "جارٍ الاستدعاء",
|
|
1763
|
-
translate_input_ready: "المدخلات جاهزة",
|
|
1764
|
-
translate_needs_approval: "بحاجة إلى موافقة",
|
|
1765
|
-
translate_approved: "تمت الموافقة",
|
|
1766
|
-
translate_responded: "تم الرد",
|
|
1767
|
-
translate_declined: "تم الرفض",
|
|
1768
|
-
translate_approve: "موافقة",
|
|
1769
|
-
translate_deny: "رفض",
|
|
1770
|
-
translate_approval_prompt: "يريد المساعد تنفيذ إجراء. هل تسمح بذلك؟",
|
|
1771
|
-
translate_error: "خطأ",
|
|
1772
|
-
translate_approval_requested: "طلب موافقة",
|
|
1773
|
-
translate_approval_response: "رد الموافقة",
|
|
1774
|
-
translate_waiting_for_approval: "في انتظار الموافقة لتنفيذ هذه الأداة.",
|
|
1775
|
-
translate_tool_approved: "تمت الموافقة.",
|
|
1776
|
-
translate_tool_response_received: "تم استلام الرد.",
|
|
1777
|
-
translate_tokens: "رمز",
|
|
1778
|
-
translate_fresh: "جديد",
|
|
1779
|
-
translate_cache_read: "قراءة من الذاكرة",
|
|
1780
|
-
translate_cache_write: "كتابة في الذاكرة",
|
|
1781
|
-
translate_n_percent_cached: "{{percent}}٪ مخزّن مؤقتًا",
|
|
1782
|
-
translate_text: "نص",
|
|
1783
|
-
translate_reasoning: "الاستنتاج",
|
|
1784
|
-
translate_read: "قراءة",
|
|
1785
|
-
translate_write: "كتابة",
|
|
1786
|
-
translate_total: "الإجمالي",
|
|
1787
|
-
translate_request: "الطلب",
|
|
1788
|
-
translate_response: "الرد",
|
|
1789
|
-
translate_step_n: "الخطوة {{number}}",
|
|
1790
|
-
translate_inspect_llm_requests: "فحص طلبات النموذج",
|
|
1791
|
-
translate_loading: "جارٍ التحميل…",
|
|
1792
|
-
translate_no_llm_requests: "لا توجد طلبات نموذج مسجّلة لهذه الرسالة.",
|
|
1793
|
-
translate_unhandled_type: "نوع غير مدعوم:",
|
|
1794
|
-
translate_client_tool_title: "أكمل هذه الخطوة للمتابعة",
|
|
1795
|
-
translate_client_tool_loading: "جارٍ تجهيز خطوة آمنة...",
|
|
1796
|
-
translate_client_tool_failed: "تعذّر تحميل هذه الخطوة",
|
|
1797
|
-
translate_client_tool_retry: "حاول مرة أخرى",
|
|
1798
|
-
translate_client_tool_cancel: "إلغاء",
|
|
1799
|
-
translate_location_hint: "انقر على الخريطة لتثبيت الدبوس",
|
|
1800
|
-
translate_location_locate: "استخدم موقعي",
|
|
1801
|
-
translate_location_locating: "جارٍ تحديد موقعك",
|
|
1802
|
-
translate_location_locate_failed: "موقعك غير متاح",
|
|
1803
|
-
translate_location_map_failed: "تعذّر تحميل الخريطة",
|
|
1804
|
-
translate_location_send_failed: "تعذّر الإرسال، حاول مرة أخرى",
|
|
1805
|
-
translate_location_skip: "ليس الآن",
|
|
1806
|
-
translate_location_send: "إرسال",
|
|
1807
|
-
translate_location_shared: "تمت مشاركة الموقع",
|
|
1808
|
-
translate_location_not_shared: "لم تتم مشاركة الموقع",
|
|
1809
|
-
translate_trigger_fired: "تم التشغيل بواسطة",
|
|
1810
|
-
translate_trigger_payload: "الحمولة",
|
|
1811
|
-
translate_messages_disabled: "يعمل هذا الوكيل من مشغّلاته فقط.",
|
|
1812
|
-
translate_streaming: "جارٍ البث",
|
|
1813
|
-
translate_done: "تم",
|
|
1814
|
-
translate_no_reasoning: "لا يوجد تفكير مسجّل.",
|
|
1815
|
-
translate_copy: "نسخ إلى الحافظة",
|
|
1816
|
-
translate_copied: "تم النسخ",
|
|
1817
|
-
translate_media_pending_mermaid: "جارٍ رسم المخطط",
|
|
1818
|
-
translate_media_pending_vega_lite: "جارٍ رسم الرسم البياني",
|
|
1819
|
-
translate_media_pending_map: "جارٍ رسم الخريطة",
|
|
1820
|
-
translate_media_cut_off: "انقطع هذا المقطع قبل اكتماله.",
|
|
1821
|
-
translate_media_failed: "تعذر عرض هذا المقطع.",
|
|
1822
|
-
translate_media_source: "المصدر",
|
|
1823
|
-
translate_media_pending: "جارٍ الرسم",
|
|
1824
|
-
translate_image_unavailable: "الصورة غير متاحة",
|
|
1825
|
-
translate_image_unavailable_alt: "الصورة غير متاحة: {{alt}}",
|
|
1826
|
-
translate_send: "إرسال"
|
|
2004
|
+
// src/internal/client/src/content/media-blocks.ts
|
|
2005
|
+
var builtIn = {
|
|
2006
|
+
async mermaid(host, source, { scheme }) {
|
|
2007
|
+
const [{ default: mermaid }, { default: DOMPurify2 }] = await Promise.all([
|
|
2008
|
+
import("mermaid"),
|
|
2009
|
+
import("dompurify")
|
|
2010
|
+
]);
|
|
2011
|
+
if (IMAGE_FUNCTION.test(source) || source.includes("\\")) {
|
|
2012
|
+
throw new Error("Diagrams may not reference URLs.");
|
|
2013
|
+
}
|
|
2014
|
+
if (/%%\{/.test(source))
|
|
2015
|
+
throw new Error("Diagrams may not carry init directives.");
|
|
2016
|
+
if (/^\s*---\s*$/m.test(source))
|
|
2017
|
+
throw new Error("Diagrams may not carry frontmatter.");
|
|
2018
|
+
if (/\bimg\s*:/.test(source))
|
|
2019
|
+
throw new Error("Diagrams may not embed images.");
|
|
2020
|
+
const kind = diagramType(source);
|
|
2021
|
+
if (!DIAGRAM_TYPES.test(kind))
|
|
2022
|
+
throw new Error(`Unsupported diagram type: ${kind}`);
|
|
2023
|
+
const run = mermaidQueue.then(async () => {
|
|
2024
|
+
if (!mermaidReady) {
|
|
2025
|
+
mermaid.initialize({ startOnLoad: false, securityLevel: "strict", htmlLabels: false });
|
|
2026
|
+
mermaidReady = true;
|
|
2027
|
+
}
|
|
2028
|
+
const themed = `%%{init: {"theme": "${scheme === "dark" ? "dark" : "default"}"}}%%
|
|
2029
|
+
${source}`;
|
|
2030
|
+
await mermaid.parse(themed);
|
|
2031
|
+
return (await mermaid.render(`cortex-mermaid-${nextId()}`, themed, host)).svg;
|
|
2032
|
+
});
|
|
2033
|
+
mermaidQueue = run.catch(() => {
|
|
2034
|
+
return;
|
|
2035
|
+
});
|
|
2036
|
+
const svg = await run;
|
|
2037
|
+
const drawing = document.createElement("div");
|
|
2038
|
+
drawing.innerHTML = DOMPurify2.sanitize(svg, { USE_PROFILES: { svg: true, svgFilters: true } });
|
|
2039
|
+
stripExternalResources(drawing);
|
|
2040
|
+
host.replaceChildren(...drawing.childNodes);
|
|
2041
|
+
return () => {
|
|
2042
|
+
host.innerHTML = "";
|
|
2043
|
+
};
|
|
2044
|
+
},
|
|
2045
|
+
async "vega-lite"(host, source, { scheme }) {
|
|
2046
|
+
const spec = JSON.parse(source);
|
|
2047
|
+
const violation = chartSpecViolation(spec);
|
|
2048
|
+
if (violation)
|
|
2049
|
+
throw new Error(violation);
|
|
2050
|
+
const [{ default: embed }, vega] = await Promise.all([import("vega-embed"), import("vega")]);
|
|
2051
|
+
const refuse = () => Promise.reject(new Error("Charts may only use inline data."));
|
|
2052
|
+
const drawing = document.createElement("div");
|
|
2053
|
+
const result = await embed(drawing, spec, {
|
|
2054
|
+
actions: false,
|
|
2055
|
+
renderer: "svg",
|
|
2056
|
+
mode: "vega-lite",
|
|
2057
|
+
loader: { ...vega.loader(), load: refuse, sanitize: refuse },
|
|
2058
|
+
ast: true,
|
|
2059
|
+
...scheme === "dark" ? { theme: "dark" } : {},
|
|
2060
|
+
config: { background: "transparent" }
|
|
2061
|
+
});
|
|
2062
|
+
stripExternalResources(drawing);
|
|
2063
|
+
host.replaceChildren(drawing);
|
|
2064
|
+
return () => result.finalize();
|
|
2065
|
+
},
|
|
2066
|
+
async map(host, source) {
|
|
2067
|
+
const spec = parseMapSpec(JSON.parse(source));
|
|
2068
|
+
const { leaflet, map, dispose } = await mountMap(host, { ...spec, interactive: true });
|
|
2069
|
+
for (const marker of spec.markers) {
|
|
2070
|
+
const pin = leaflet.marker(marker.position).addTo(map);
|
|
2071
|
+
if (marker.label) {
|
|
2072
|
+
const label = document.createElement("span");
|
|
2073
|
+
label.textContent = marker.label;
|
|
2074
|
+
pin.bindTooltip(label);
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
return dispose;
|
|
2078
|
+
}
|
|
1827
2079
|
};
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
translate_back: "Back",
|
|
1833
|
-
translate_greeting: "What can I help you with today?",
|
|
1834
|
-
translate_n_conversations: "{{count}} conversations",
|
|
1835
|
-
translate_one_conversation: "1 conversation",
|
|
1836
|
-
translate_no_threads_yet: "No threads yet",
|
|
1837
|
-
translate_start_a_new_conversation: "Start a new conversation",
|
|
1838
|
-
translate_untitled: "Untitled",
|
|
1839
|
-
translate_new_chat: "New Chat",
|
|
1840
|
-
translate_normal: "Normal",
|
|
1841
|
-
translate_debug: "Debug",
|
|
1842
|
-
translate_type_a_message: "Type a message...",
|
|
1843
|
-
translate_completed: "Completed",
|
|
1844
|
-
translate_attach_files: "Attach files",
|
|
1845
|
-
translate_drop_files_here: "Drop your files here...",
|
|
1846
|
-
translate_remove_attachment: "Remove attachment",
|
|
1847
|
-
translate_attachment_rejected: "This file cannot be attached",
|
|
1848
|
-
translate_attachment_caption: "Please take a look at the attached files.",
|
|
1849
|
-
translate_download: "Download",
|
|
1850
|
-
translate_tool_status_0: "Fetching data...",
|
|
1851
|
-
translate_tool_status_1: "Analyzing information...",
|
|
1852
|
-
translate_tool_status_2: "Processing request...",
|
|
1853
|
-
translate_tool_status_3: "Gathering results...",
|
|
1854
|
-
translate_tool_status_4: "Preparing response...",
|
|
1855
|
-
translate_tool_status_5: "Looking things up...",
|
|
1856
|
-
translate_tool_status_6: "Checking records...",
|
|
1857
|
-
translate_tool_status_7: "Reviewing details...",
|
|
1858
|
-
translate_tool_status_8: "Running calculations...",
|
|
1859
|
-
translate_tool_status_9: "Pulling information...",
|
|
1860
|
-
translate_tool_done_0: "Data fetched successfully",
|
|
1861
|
-
translate_tool_done_1: "Analysis completed successfully",
|
|
1862
|
-
translate_tool_done_2: "Request processed successfully",
|
|
1863
|
-
translate_tool_done_3: "Results gathered successfully",
|
|
1864
|
-
translate_tool_done_4: "Response prepared successfully",
|
|
1865
|
-
translate_tool_done_5: "Lookup completed successfully",
|
|
1866
|
-
translate_tool_done_6: "Records checked successfully",
|
|
1867
|
-
translate_tool_done_7: "Review completed successfully",
|
|
1868
|
-
translate_tool_done_8: "Calculations completed successfully",
|
|
1869
|
-
translate_tool_done_9: "Information retrieved successfully",
|
|
1870
|
-
translate_rows_read: "{{count}} rows",
|
|
1871
|
-
translate_one_more_step: "and 1 more step",
|
|
1872
|
-
translate_n_more_steps: "and {{count}} more steps",
|
|
1873
|
-
translate_tool_error: "Something went wrong",
|
|
1874
|
-
translate_attachment_status: "Reading the attached file...",
|
|
1875
|
-
translate_attachment_done: "Finished reading the file",
|
|
1876
|
-
translate_graph_0: "Exploring connections...",
|
|
1877
|
-
translate_graph_1: "Mapping out the links...",
|
|
1878
|
-
translate_graph_2: "Discovering relationships...",
|
|
1879
|
-
translate_graph_3: "Tracing the connections...",
|
|
1880
|
-
translate_graph_4: "Navigating the knowledge...",
|
|
1881
|
-
translate_graph_5: "Uncovering insights...",
|
|
1882
|
-
translate_graph_6: "Connecting the dots...",
|
|
1883
|
-
translate_graph_7: "Following the trail...",
|
|
1884
|
-
translate_graph_8: "Piecing things together...",
|
|
1885
|
-
translate_graph_9: "Building the picture...",
|
|
1886
|
-
translate_code_0: "Running the numbers...",
|
|
1887
|
-
translate_code_1: "Working through the data...",
|
|
1888
|
-
translate_code_2: "Processing your request...",
|
|
1889
|
-
translate_code_3: "Crunching the figures...",
|
|
1890
|
-
translate_code_4: "Putting it all together...",
|
|
1891
|
-
translate_code_5: "Analyzing the results...",
|
|
1892
|
-
translate_code_6: "Working behind the scenes...",
|
|
1893
|
-
translate_code_7: "Sorting through the details...",
|
|
1894
|
-
translate_code_8: "Preparing your answer...",
|
|
1895
|
-
translate_code_9: "Almost ready...",
|
|
1896
|
-
translate_reasoning_0: "Thinking it through...",
|
|
1897
|
-
translate_reasoning_1: "Considering the options...",
|
|
1898
|
-
translate_reasoning_2: "Weighing the possibilities...",
|
|
1899
|
-
translate_reasoning_3: "Reflecting on this...",
|
|
1900
|
-
translate_reasoning_4: "Working it out...",
|
|
1901
|
-
translate_reasoning_5: "Putting thoughts together...",
|
|
1902
|
-
translate_reasoning_6: "Mulling it over...",
|
|
1903
|
-
translate_reasoning_7: "Finding the best approach...",
|
|
1904
|
-
translate_reasoning_8: "Organizing my thoughts...",
|
|
1905
|
-
translate_reasoning_9: "Almost there...",
|
|
1906
|
-
translate_running: "Running",
|
|
1907
|
-
translate_aborted: "Aborted",
|
|
1908
|
-
translate_input: "Input",
|
|
1909
|
-
translate_output: "Output",
|
|
1910
|
-
translate_calling: "Calling",
|
|
1911
|
-
translate_input_ready: "Input ready",
|
|
1912
|
-
translate_needs_approval: "Needs approval",
|
|
1913
|
-
translate_approved: "Approved",
|
|
1914
|
-
translate_responded: "Responded",
|
|
1915
|
-
translate_declined: "Declined",
|
|
1916
|
-
translate_approve: "Approve",
|
|
1917
|
-
translate_deny: "Deny",
|
|
1918
|
-
translate_approval_prompt: "The assistant wants to take an action. Allow it?",
|
|
1919
|
-
translate_error: "Error",
|
|
1920
|
-
translate_approval_requested: "Approval requested",
|
|
1921
|
-
translate_approval_response: "Approval response",
|
|
1922
|
-
translate_waiting_for_approval: "Waiting for approval to execute this tool.",
|
|
1923
|
-
translate_tool_approved: "Approved.",
|
|
1924
|
-
translate_tool_response_received: "Response received.",
|
|
1925
|
-
translate_tokens: "tokens",
|
|
1926
|
-
translate_fresh: "Fresh",
|
|
1927
|
-
translate_cache_read: "Cache read",
|
|
1928
|
-
translate_cache_write: "Cache write",
|
|
1929
|
-
translate_n_percent_cached: "{{percent}}% cached",
|
|
1930
|
-
translate_text: "Text",
|
|
1931
|
-
translate_reasoning: "Reasoning",
|
|
1932
|
-
translate_read: "Read",
|
|
1933
|
-
translate_write: "Write",
|
|
1934
|
-
translate_total: "Total",
|
|
1935
|
-
translate_request: "Request",
|
|
1936
|
-
translate_response: "Response",
|
|
1937
|
-
translate_step_n: "Step {{number}}",
|
|
1938
|
-
translate_inspect_llm_requests: "Inspect LLM requests",
|
|
1939
|
-
translate_loading: "loading…",
|
|
1940
|
-
translate_no_llm_requests: "No LLM requests recorded for this message.",
|
|
1941
|
-
translate_unhandled_type: "Unhandled type:",
|
|
1942
|
-
translate_client_tool_title: "Complete this step to continue",
|
|
1943
|
-
translate_client_tool_loading: "Preparing a secure step...",
|
|
1944
|
-
translate_client_tool_failed: "This step could not be loaded",
|
|
1945
|
-
translate_client_tool_retry: "Try again",
|
|
1946
|
-
translate_client_tool_cancel: "Cancel",
|
|
1947
|
-
translate_location_hint: "Tap the map to drop a pin",
|
|
1948
|
-
translate_location_locate: "Use my location",
|
|
1949
|
-
translate_location_locating: "Finding your location",
|
|
1950
|
-
translate_location_locate_failed: "Your location is not available",
|
|
1951
|
-
translate_location_map_failed: "The map could not be loaded",
|
|
1952
|
-
translate_location_send_failed: "Could not send, try again",
|
|
1953
|
-
translate_location_skip: "Not now",
|
|
1954
|
-
translate_location_send: "Send",
|
|
1955
|
-
translate_location_shared: "Location shared",
|
|
1956
|
-
translate_location_not_shared: "Location not shared",
|
|
1957
|
-
translate_trigger_fired: "Triggered by",
|
|
1958
|
-
translate_trigger_payload: "Payload",
|
|
1959
|
-
translate_messages_disabled: "This agent only runs from its triggers.",
|
|
1960
|
-
translate_streaming: "Streaming",
|
|
1961
|
-
translate_done: "Done",
|
|
1962
|
-
translate_no_reasoning: "No reasoning provided.",
|
|
1963
|
-
translate_copy: "Copy to clipboard",
|
|
1964
|
-
translate_copied: "Copied",
|
|
1965
|
-
translate_media_pending_mermaid: "Drawing diagram",
|
|
1966
|
-
translate_media_pending_vega_lite: "Drawing chart",
|
|
1967
|
-
translate_media_pending_map: "Drawing map",
|
|
1968
|
-
translate_media_cut_off: "This block was cut off before it finished.",
|
|
1969
|
-
translate_media_failed: "Could not render this block.",
|
|
1970
|
-
translate_media_source: "Source",
|
|
1971
|
-
translate_media_pending: "Drawing",
|
|
1972
|
-
translate_image_unavailable: "Image unavailable",
|
|
1973
|
-
translate_image_unavailable_alt: "Image unavailable: {{alt}}",
|
|
1974
|
-
translate_send: "Send"
|
|
2080
|
+
var PENDING_LABEL = {
|
|
2081
|
+
mermaid: "translate_media_pending_mermaid",
|
|
2082
|
+
"vega-lite": "translate_media_pending_vega_lite",
|
|
2083
|
+
map: "translate_media_pending_map"
|
|
1975
2084
|
};
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
function
|
|
1980
|
-
return
|
|
2085
|
+
function mediaPendingLabel(language) {
|
|
2086
|
+
return PENDING_LABEL[language] ?? "translate_media_pending";
|
|
2087
|
+
}
|
|
2088
|
+
function mediaLanguages(overrides) {
|
|
2089
|
+
return Object.keys({ ...builtIn, ...overrides });
|
|
2090
|
+
}
|
|
2091
|
+
function drawMediaBlock(host, options) {
|
|
2092
|
+
const { language, source, context, overrides, onError } = options;
|
|
2093
|
+
const slot = host.appendChild(document.createElement("div"));
|
|
2094
|
+
const renderer = overrides?.[language] ?? builtIn[language];
|
|
2095
|
+
let dispose;
|
|
2096
|
+
let cancelled = false;
|
|
2097
|
+
const drawn = renderer ? renderer(slot, source, context) : Promise.reject(new Error(`No renderer for ${language}.`));
|
|
2098
|
+
drawn.then((teardown) => {
|
|
2099
|
+
if (cancelled)
|
|
2100
|
+
teardown();
|
|
2101
|
+
else
|
|
2102
|
+
dispose = teardown;
|
|
2103
|
+
}, (reason) => {
|
|
2104
|
+
if (!cancelled)
|
|
2105
|
+
onError(reason instanceof Error ? reason.message : String(reason));
|
|
2106
|
+
});
|
|
2107
|
+
return () => {
|
|
2108
|
+
cancelled = true;
|
|
2109
|
+
dispose?.();
|
|
2110
|
+
slot.remove();
|
|
2111
|
+
};
|
|
2112
|
+
}
|
|
2113
|
+
var DIAGRAM_TYPES = /^(flowchart|graph|sequenceDiagram|stateDiagram(-v2)?|erDiagram|gantt|pie|classDiagram|journey|timeline|mindmap)$/;
|
|
2114
|
+
function diagramType(source) {
|
|
2115
|
+
const line = source.split(`
|
|
2116
|
+
`).find((candidate) => /\S/.test(candidate) && !/^\s*%%/.test(candidate));
|
|
2117
|
+
return /^\s*(\S+)/.exec(line ?? "")?.[1] ?? "";
|
|
2118
|
+
}
|
|
2119
|
+
var mermaidQueue = Promise.resolve();
|
|
2120
|
+
var mermaidReady = false;
|
|
2121
|
+
var counter = 0;
|
|
2122
|
+
function nextId() {
|
|
2123
|
+
counter += 1;
|
|
2124
|
+
return counter;
|
|
2125
|
+
}
|
|
2126
|
+
var RESOURCE_LINK_TAGS = new Set(["image", "use", "feImage"]);
|
|
2127
|
+
function stripExternalResources(root) {
|
|
2128
|
+
for (const element of [root, ...root.querySelectorAll("*")]) {
|
|
2129
|
+
for (const attribute of [...element.attributes]) {
|
|
2130
|
+
const loadsTarget = (attribute.name === "href" || attribute.name === "xlink:href") && RESOURCE_LINK_TAGS.has(element.tagName) && !attribute.value.trim().startsWith("#");
|
|
2131
|
+
if (loadsTarget || externalResourceIn(attribute.value)) {
|
|
2132
|
+
element.removeAttribute(attribute.name);
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
if (element.tagName === "style" && element.textContent) {
|
|
2136
|
+
element.textContent = scrubStyleText(element.textContent);
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
function parseMapSpec(value) {
|
|
2141
|
+
if (!value || typeof value !== "object")
|
|
2142
|
+
throw new Error("A map needs a JSON object.");
|
|
2143
|
+
const spec = value;
|
|
2144
|
+
const zoom = spec["zoom"] ?? 10;
|
|
2145
|
+
if (typeof zoom !== "number" || zoom < 0 || zoom > 22)
|
|
2146
|
+
throw new Error("zoom must be 0 to 22.");
|
|
2147
|
+
const markers = spec["markers"] ?? [];
|
|
2148
|
+
if (!Array.isArray(markers))
|
|
2149
|
+
throw new Error("markers must be a list.");
|
|
2150
|
+
return {
|
|
2151
|
+
center: latLng(spec["center"], "center"),
|
|
2152
|
+
zoom,
|
|
2153
|
+
markers: markers.map((marker, index) => {
|
|
2154
|
+
const entry = marker ?? {};
|
|
2155
|
+
const label = entry["label"];
|
|
2156
|
+
return {
|
|
2157
|
+
position: latLng(entry["position"], `markers[${index}].position`),
|
|
2158
|
+
label: typeof label === "string" ? label : undefined
|
|
2159
|
+
};
|
|
2160
|
+
})
|
|
2161
|
+
};
|
|
2162
|
+
}
|
|
2163
|
+
function latLng(value, field) {
|
|
2164
|
+
const pair = Array.isArray(value) ? value : [];
|
|
2165
|
+
const [lat, lng] = pair;
|
|
2166
|
+
if (typeof lat !== "number" || typeof lng !== "number" || Math.abs(lat) > 90 || Math.abs(lng) > 180) {
|
|
2167
|
+
throw new Error(`${field} must be [latitude, longitude].`);
|
|
2168
|
+
}
|
|
2169
|
+
return { lat, lng };
|
|
2170
|
+
}
|
|
2171
|
+
// src/internal/client/src/color-scheme.ts
|
|
2172
|
+
function watchColorScheme(theme, onChange) {
|
|
2173
|
+
if (theme !== "system") {
|
|
2174
|
+
onChange(theme ?? "light");
|
|
2175
|
+
return () => {};
|
|
2176
|
+
}
|
|
2177
|
+
const query = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2178
|
+
const report = () => onChange(query.matches ? "dark" : "light");
|
|
2179
|
+
report();
|
|
2180
|
+
query.addEventListener("change", report);
|
|
2181
|
+
return () => query.removeEventListener("change", report);
|
|
2182
|
+
}
|
|
2183
|
+
// src/internal/client/src/content/highlight.ts
|
|
2184
|
+
import hljs from "highlight.js/lib/core";
|
|
2185
|
+
import javascript from "highlight.js/lib/languages/javascript";
|
|
2186
|
+
import json from "highlight.js/lib/languages/json";
|
|
2187
|
+
import sql from "highlight.js/lib/languages/sql";
|
|
2188
|
+
var registered = false;
|
|
2189
|
+
function ensureLanguages() {
|
|
2190
|
+
if (registered)
|
|
2191
|
+
return;
|
|
2192
|
+
registered = true;
|
|
2193
|
+
hljs.registerLanguage("javascript", javascript);
|
|
2194
|
+
hljs.registerLanguage("json", json);
|
|
2195
|
+
hljs.registerLanguage("cypher", sql);
|
|
1981
2196
|
}
|
|
1982
|
-
function
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
return
|
|
2197
|
+
function highlightCode(code, lang) {
|
|
2198
|
+
if (!code)
|
|
2199
|
+
return "";
|
|
2200
|
+
ensureLanguages();
|
|
2201
|
+
return hljs.getLanguage(lang) ? hljs.highlight(code, { language: lang }).value : escapeHtml(code);
|
|
1987
2202
|
}
|
|
1988
|
-
function
|
|
1989
|
-
return
|
|
2203
|
+
function escapeHtml(str) {
|
|
2204
|
+
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1990
2205
|
}
|
|
1991
2206
|
// src/internal/client/src/format/deep-parse-json.ts
|
|
1992
2207
|
function deepParseJson(value) {
|
|
@@ -2116,8 +2331,10 @@ function saveBlob(blob, name) {
|
|
|
2116
2331
|
const link = document.createElement("a");
|
|
2117
2332
|
link.href = url;
|
|
2118
2333
|
link.download = name;
|
|
2334
|
+
document.body.append(link);
|
|
2119
2335
|
link.click();
|
|
2120
|
-
|
|
2336
|
+
link.remove();
|
|
2337
|
+
setTimeout(() => URL.revokeObjectURL(url), 40000);
|
|
2121
2338
|
}
|
|
2122
2339
|
// src/internal/client/src/content/stream-text-smoother.ts
|
|
2123
2340
|
class StreamTextSmoother {
|
|
@@ -2499,9 +2716,9 @@ function cachePercent(usage) {
|
|
|
2499
2716
|
return Math.round(usage.input.cacheRead / usage.input.total * 100);
|
|
2500
2717
|
}
|
|
2501
2718
|
// dist/fesm2022/m6d-cortex-angular.mjs
|
|
2719
|
+
import { DecimalPipe, NgComponentOutlet, NgTemplateOutlet } from "@angular/common";
|
|
2502
2720
|
import { Subject, defer, finalize, firstValueFrom, from, map, of, shareReplay, skip, switchMap, tap } from "rxjs";
|
|
2503
2721
|
import { injectChat } from "@tanstack/ai-angular";
|
|
2504
|
-
import { DecimalPipe, NgComponentOutlet, NgTemplateOutlet } from "@angular/common";
|
|
2505
2722
|
import { DomSanitizer } from "@angular/platform-browser";
|
|
2506
2723
|
var CORTEX_CONFIG = new InjectionToken("CORTEX_CONFIG");
|
|
2507
2724
|
var CORTEX_LOCALE = new InjectionToken("CORTEX_LOCALE");
|
|
@@ -3487,6 +3704,7 @@ var ChatHeaderComponent = class ChatHeaderComponent2 {
|
|
|
3487
3704
|
toggleSidebar = output();
|
|
3488
3705
|
toggleDebug = output();
|
|
3489
3706
|
openHistory = output();
|
|
3707
|
+
newChat = output();
|
|
3490
3708
|
config = inject(CORTEX_CONFIG);
|
|
3491
3709
|
chatService = inject(CortexChatService);
|
|
3492
3710
|
locale = inject(CORTEX_LOCALE);
|
|
@@ -3515,7 +3733,8 @@ var ChatHeaderComponent = class ChatHeaderComponent2 {
|
|
|
3515
3733
|
outputs: {
|
|
3516
3734
|
toggleSidebar: "toggleSidebar",
|
|
3517
3735
|
toggleDebug: "toggleDebug",
|
|
3518
|
-
openHistory: "openHistory"
|
|
3736
|
+
openHistory: "openHistory",
|
|
3737
|
+
newChat: "newChat"
|
|
3519
3738
|
},
|
|
3520
3739
|
host: { classAttribute: "cortex-widget__chat-header" },
|
|
3521
3740
|
ngImport: i0,
|
|
@@ -3548,11 +3767,24 @@ var ChatHeaderComponent = class ChatHeaderComponent2 {
|
|
|
3548
3767
|
</button>
|
|
3549
3768
|
}
|
|
3550
3769
|
|
|
3770
|
+
<button
|
|
3771
|
+
type="button"
|
|
3772
|
+
(click)="newChat.emit()"
|
|
3773
|
+
[attr.aria-label]="'translate_new_chat' | translate"
|
|
3774
|
+
[title]="'translate_new_chat' | translate"
|
|
3775
|
+
class="cortex-widget__header-btn cortex-widget__new-btn"
|
|
3776
|
+
>
|
|
3777
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
3778
|
+
<path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
|
3779
|
+
</svg>
|
|
3780
|
+
</button>
|
|
3781
|
+
|
|
3551
3782
|
<button
|
|
3552
3783
|
type="button"
|
|
3553
3784
|
(click)="openHistory.emit()"
|
|
3554
3785
|
[attr.aria-label]="'translate_history' | translate"
|
|
3555
|
-
|
|
3786
|
+
[title]="'translate_history' | translate"
|
|
3787
|
+
class="cortex-widget__header-btn cortex-widget__history-btn"
|
|
3556
3788
|
>
|
|
3557
3789
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
3558
3790
|
<circle cx="8" cy="8" r="5.75" stroke="currentColor" stroke-width="1.3" />
|
|
@@ -3617,11 +3849,24 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3617
3849
|
</button>
|
|
3618
3850
|
}
|
|
3619
3851
|
|
|
3852
|
+
<button
|
|
3853
|
+
type="button"
|
|
3854
|
+
(click)="newChat.emit()"
|
|
3855
|
+
[attr.aria-label]="'translate_new_chat' | translate"
|
|
3856
|
+
[title]="'translate_new_chat' | translate"
|
|
3857
|
+
class="cortex-widget__header-btn cortex-widget__new-btn"
|
|
3858
|
+
>
|
|
3859
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
3860
|
+
<path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
|
3861
|
+
</svg>
|
|
3862
|
+
</button>
|
|
3863
|
+
|
|
3620
3864
|
<button
|
|
3621
3865
|
type="button"
|
|
3622
3866
|
(click)="openHistory.emit()"
|
|
3623
3867
|
[attr.aria-label]="'translate_history' | translate"
|
|
3624
|
-
|
|
3868
|
+
[title]="'translate_history' | translate"
|
|
3869
|
+
class="cortex-widget__header-btn cortex-widget__history-btn"
|
|
3625
3870
|
>
|
|
3626
3871
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
3627
3872
|
<circle cx="8" cy="8" r="5.75" stroke="currentColor" stroke-width="1.3" />
|
|
@@ -3657,6 +3902,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3657
3902
|
openHistory: [{
|
|
3658
3903
|
type: i0.Output,
|
|
3659
3904
|
args: ["openHistory"]
|
|
3905
|
+
}],
|
|
3906
|
+
newChat: [{
|
|
3907
|
+
type: i0.Output,
|
|
3908
|
+
args: ["newChat"]
|
|
3660
3909
|
}]
|
|
3661
3910
|
}
|
|
3662
3911
|
});
|
|
@@ -5520,32 +5769,295 @@ var MediaBlockComponent = class MediaBlockComponent2 {
|
|
|
5520
5769
|
}
|
|
5521
5770
|
</p>
|
|
5522
5771
|
</div>
|
|
5523
|
-
}
|
|
5524
|
-
<!-- The host stays mounted through an error so a retry has somewhere to draw. -->
|
|
5525
|
-
<div
|
|
5526
|
-
#host
|
|
5527
|
-
class="cortex-media-block__body"
|
|
5528
|
-
[class]="'cortex-media-block__body--' + language()"
|
|
5529
|
-
[hidden]="failure()"
|
|
5530
|
-
></div>
|
|
5531
|
-
@if (debugMode() && (failure() || showSource())) {
|
|
5532
|
-
<pre class="cortex-media-block__source">{{ source() }}</pre>
|
|
5533
|
-
}
|
|
5772
|
+
}
|
|
5773
|
+
<!-- The host stays mounted through an error so a retry has somewhere to draw. -->
|
|
5774
|
+
<div
|
|
5775
|
+
#host
|
|
5776
|
+
class="cortex-media-block__body"
|
|
5777
|
+
[class]="'cortex-media-block__body--' + language()"
|
|
5778
|
+
[hidden]="failure()"
|
|
5779
|
+
></div>
|
|
5780
|
+
@if (debugMode() && (failure() || showSource())) {
|
|
5781
|
+
<pre class="cortex-media-block__source">{{ source() }}</pre>
|
|
5782
|
+
}
|
|
5783
|
+
`,
|
|
5784
|
+
dependencies: [{
|
|
5785
|
+
kind: "component",
|
|
5786
|
+
type: MediaBlockHeadComponent,
|
|
5787
|
+
selector: "cortex-media-block-head",
|
|
5788
|
+
inputs: [
|
|
5789
|
+
"language",
|
|
5790
|
+
"source",
|
|
5791
|
+
"pending",
|
|
5792
|
+
"closed",
|
|
5793
|
+
"debugMode",
|
|
5794
|
+
"sourceShown",
|
|
5795
|
+
"canToggleSource"
|
|
5796
|
+
],
|
|
5797
|
+
outputs: ["toggleSource"]
|
|
5798
|
+
}, {
|
|
5799
|
+
kind: "pipe",
|
|
5800
|
+
type: TranslatePipe,
|
|
5801
|
+
name: "translate"
|
|
5802
|
+
}],
|
|
5803
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
5804
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
5805
|
+
});
|
|
5806
|
+
};
|
|
5807
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
5808
|
+
minVersion: "12.0.0",
|
|
5809
|
+
version: "22.2.0",
|
|
5810
|
+
ngImport: i0,
|
|
5811
|
+
type: MediaBlockComponent,
|
|
5812
|
+
decorators: [{
|
|
5813
|
+
type: Component,
|
|
5814
|
+
args: [{
|
|
5815
|
+
selector: "cortex-media-block",
|
|
5816
|
+
changeDetection: ChangeDetectionStrategy2.OnPush,
|
|
5817
|
+
encapsulation: ViewEncapsulation2.None,
|
|
5818
|
+
imports: [MediaBlockHeadComponent, TranslatePipe],
|
|
5819
|
+
host: { class: "cortex-media-block" },
|
|
5820
|
+
template: `<!-- The tag, the source and its copy control are for whoever is debugging the
|
|
5821
|
+
agent; a user sees the media, a short pending line, or a short error. -->
|
|
5822
|
+
<cortex-media-block-head
|
|
5823
|
+
[language]="language()"
|
|
5824
|
+
[source]="source()"
|
|
5825
|
+
[pending]="pending()"
|
|
5826
|
+
[closed]="closed()"
|
|
5827
|
+
[debugMode]="debugMode()"
|
|
5828
|
+
[sourceShown]="showSource()"
|
|
5829
|
+
[canToggleSource]="!failure()"
|
|
5830
|
+
(toggleSource)="toggleSource()"
|
|
5831
|
+
/>
|
|
5832
|
+
<!-- The cut-off sentence stands on its own; a renderer's reason is technical and debug-only. -->
|
|
5833
|
+
@if (failure()) {
|
|
5834
|
+
<div class="cortex-media-block__body">
|
|
5835
|
+
<p class="cortex-media-block__error">
|
|
5836
|
+
@if (cutOff()) {
|
|
5837
|
+
{{ 'translate_media_cut_off' | translate }}
|
|
5838
|
+
} @else {
|
|
5839
|
+
{{ 'translate_media_failed' | translate }}
|
|
5840
|
+
@if (debugMode()) {
|
|
5841
|
+
{{ error() }}
|
|
5842
|
+
}
|
|
5843
|
+
}
|
|
5844
|
+
</p>
|
|
5845
|
+
</div>
|
|
5846
|
+
}
|
|
5847
|
+
<!-- The host stays mounted through an error so a retry has somewhere to draw. -->
|
|
5848
|
+
<div
|
|
5849
|
+
#host
|
|
5850
|
+
class="cortex-media-block__body"
|
|
5851
|
+
[class]="'cortex-media-block__body--' + language()"
|
|
5852
|
+
[hidden]="failure()"
|
|
5853
|
+
></div>
|
|
5854
|
+
@if (debugMode() && (failure() || showSource())) {
|
|
5855
|
+
<pre class="cortex-media-block__source">{{ source() }}</pre>
|
|
5856
|
+
}
|
|
5857
|
+
`
|
|
5858
|
+
}]
|
|
5859
|
+
}],
|
|
5860
|
+
ctorParameters: () => [],
|
|
5861
|
+
propDecorators: {
|
|
5862
|
+
language: [{
|
|
5863
|
+
type: i0.Input,
|
|
5864
|
+
args: [{
|
|
5865
|
+
isSignal: true,
|
|
5866
|
+
alias: "language",
|
|
5867
|
+
required: true
|
|
5868
|
+
}]
|
|
5869
|
+
}],
|
|
5870
|
+
source: [{
|
|
5871
|
+
type: i0.Input,
|
|
5872
|
+
args: [{
|
|
5873
|
+
isSignal: true,
|
|
5874
|
+
alias: "source",
|
|
5875
|
+
required: true
|
|
5876
|
+
}]
|
|
5877
|
+
}],
|
|
5878
|
+
closed: [{
|
|
5879
|
+
type: i0.Input,
|
|
5880
|
+
args: [{
|
|
5881
|
+
isSignal: true,
|
|
5882
|
+
alias: "closed",
|
|
5883
|
+
required: true
|
|
5884
|
+
}]
|
|
5885
|
+
}],
|
|
5886
|
+
streaming: [{
|
|
5887
|
+
type: i0.Input,
|
|
5888
|
+
args: [{
|
|
5889
|
+
isSignal: true,
|
|
5890
|
+
alias: "streaming",
|
|
5891
|
+
required: true
|
|
5892
|
+
}]
|
|
5893
|
+
}],
|
|
5894
|
+
debugMode: [{
|
|
5895
|
+
type: i0.Input,
|
|
5896
|
+
args: [{
|
|
5897
|
+
isSignal: true,
|
|
5898
|
+
alias: "debugMode",
|
|
5899
|
+
required: false
|
|
5900
|
+
}]
|
|
5901
|
+
}],
|
|
5902
|
+
host: [{
|
|
5903
|
+
type: i0.ViewChild,
|
|
5904
|
+
args: ["host", { isSignal: true }]
|
|
5905
|
+
}]
|
|
5906
|
+
}
|
|
5907
|
+
});
|
|
5908
|
+
var TableBlockComponent = class TableBlockComponent2 {
|
|
5909
|
+
markdown = input.required(...ngDevMode ? [{ debugName: "markdown" }] : []);
|
|
5910
|
+
closed = input.required(...ngDevMode ? [{ debugName: "closed" }] : []);
|
|
5911
|
+
expanded = signal(false, ...ngDevMode ? [{ debugName: "expanded" }] : []);
|
|
5912
|
+
frame = viewChild.required("frame", ...ngDevMode ? [{ debugName: "frame" }] : []);
|
|
5913
|
+
dialog = viewChild.required("dialog", ...ngDevMode ? [{ debugName: "dialog" }] : []);
|
|
5914
|
+
expand() {
|
|
5915
|
+
this.expanded.set(true);
|
|
5916
|
+
this.dialog().nativeElement.showModal();
|
|
5917
|
+
}
|
|
5918
|
+
close() {
|
|
5919
|
+
this.dialog().nativeElement.close();
|
|
5920
|
+
}
|
|
5921
|
+
export() {
|
|
5922
|
+
const table = this.frame().nativeElement.querySelector("table");
|
|
5923
|
+
if (table)
|
|
5924
|
+
saveBlob(tableToXlsx(tableRows(table)), "table.xlsx");
|
|
5925
|
+
}
|
|
5926
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5927
|
+
minVersion: "12.0.0",
|
|
5928
|
+
version: "22.2.0",
|
|
5929
|
+
ngImport: i0,
|
|
5930
|
+
type: TableBlockComponent2,
|
|
5931
|
+
deps: [],
|
|
5932
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
5933
|
+
});
|
|
5934
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
5935
|
+
minVersion: "17.0.0",
|
|
5936
|
+
version: "22.2.0",
|
|
5937
|
+
type: TableBlockComponent2,
|
|
5938
|
+
isStandalone: true,
|
|
5939
|
+
selector: "cortex-table-block",
|
|
5940
|
+
inputs: {
|
|
5941
|
+
markdown: {
|
|
5942
|
+
classPropertyName: "markdown",
|
|
5943
|
+
publicName: "markdown",
|
|
5944
|
+
isSignal: true,
|
|
5945
|
+
isRequired: true,
|
|
5946
|
+
transformFunction: null
|
|
5947
|
+
},
|
|
5948
|
+
closed: {
|
|
5949
|
+
classPropertyName: "closed",
|
|
5950
|
+
publicName: "closed",
|
|
5951
|
+
isSignal: true,
|
|
5952
|
+
isRequired: true,
|
|
5953
|
+
transformFunction: null
|
|
5954
|
+
}
|
|
5955
|
+
},
|
|
5956
|
+
host: { classAttribute: "cortex-table-block" },
|
|
5957
|
+
viewQueries: [{
|
|
5958
|
+
propertyName: "frame",
|
|
5959
|
+
first: true,
|
|
5960
|
+
predicate: ["frame"],
|
|
5961
|
+
descendants: true,
|
|
5962
|
+
isSignal: true
|
|
5963
|
+
}, {
|
|
5964
|
+
propertyName: "dialog",
|
|
5965
|
+
first: true,
|
|
5966
|
+
predicate: ["dialog"],
|
|
5967
|
+
descendants: true,
|
|
5968
|
+
isSignal: true
|
|
5969
|
+
}],
|
|
5970
|
+
ngImport: i0,
|
|
5971
|
+
template: `<div class="cortex-table-block__actions">
|
|
5972
|
+
@if (closed()) {
|
|
5973
|
+
<button
|
|
5974
|
+
type="button"
|
|
5975
|
+
class="cortex-table-block__action"
|
|
5976
|
+
[attr.aria-label]="'translate_table_expand' | translate"
|
|
5977
|
+
[title]="'translate_table_expand' | translate"
|
|
5978
|
+
(click)="expand()"
|
|
5979
|
+
>
|
|
5980
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
5981
|
+
<path
|
|
5982
|
+
d="M9.5 2.5h4v4M6.5 13.5h-4v-4M13.5 2.5 9 7M2.5 13.5 7 9"
|
|
5983
|
+
stroke="currentColor"
|
|
5984
|
+
stroke-width="1.3"
|
|
5985
|
+
stroke-linecap="round"
|
|
5986
|
+
stroke-linejoin="round"
|
|
5987
|
+
/>
|
|
5988
|
+
</svg>
|
|
5989
|
+
</button>
|
|
5990
|
+
<button
|
|
5991
|
+
type="button"
|
|
5992
|
+
class="cortex-table-block__action"
|
|
5993
|
+
[attr.aria-label]="'translate_table_export' | translate"
|
|
5994
|
+
[title]="'translate_table_export' | translate"
|
|
5995
|
+
(click)="export()"
|
|
5996
|
+
>
|
|
5997
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
5998
|
+
<path
|
|
5999
|
+
d="M8 2.5v7.5M5 7l3 3 3-3M2.75 11v1.25a1.25 1.25 0 0 0 1.25 1.25h8a1.25 1.25 0 0 0 1.25-1.25V11"
|
|
6000
|
+
stroke="currentColor"
|
|
6001
|
+
stroke-width="1.3"
|
|
6002
|
+
stroke-linecap="round"
|
|
6003
|
+
stroke-linejoin="round"
|
|
6004
|
+
/>
|
|
6005
|
+
</svg>
|
|
6006
|
+
</button>
|
|
6007
|
+
}
|
|
6008
|
+
</div>
|
|
6009
|
+
<div #frame [innerHTML]="markdown() | marked"></div>
|
|
6010
|
+
<!-- The dialog closes itself on Escape. -->
|
|
6011
|
+
<dialog
|
|
6012
|
+
#dialog
|
|
6013
|
+
class="cortex-table-block__dialog"
|
|
6014
|
+
[attr.aria-label]="'translate_table_expand' | translate"
|
|
6015
|
+
(close)="expanded.set(false)"
|
|
6016
|
+
>
|
|
6017
|
+
<div class="cortex-table-block__dialog-head">
|
|
6018
|
+
<button
|
|
6019
|
+
type="button"
|
|
6020
|
+
class="cortex-table-block__action"
|
|
6021
|
+
[attr.aria-label]="'translate_table_export' | translate"
|
|
6022
|
+
[title]="'translate_table_export' | translate"
|
|
6023
|
+
(click)="export()"
|
|
6024
|
+
>
|
|
6025
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6026
|
+
<path
|
|
6027
|
+
d="M8 2.5v7.5M5 7l3 3 3-3M2.75 11v1.25a1.25 1.25 0 0 0 1.25 1.25h8a1.25 1.25 0 0 0 1.25-1.25V11"
|
|
6028
|
+
stroke="currentColor"
|
|
6029
|
+
stroke-width="1.3"
|
|
6030
|
+
stroke-linecap="round"
|
|
6031
|
+
stroke-linejoin="round"
|
|
6032
|
+
/>
|
|
6033
|
+
</svg>
|
|
6034
|
+
</button>
|
|
6035
|
+
<button
|
|
6036
|
+
type="button"
|
|
6037
|
+
class="cortex-table-block__action"
|
|
6038
|
+
[attr.aria-label]="'translate_close' | translate"
|
|
6039
|
+
[title]="'translate_close' | translate"
|
|
6040
|
+
(click)="close()"
|
|
6041
|
+
>
|
|
6042
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6043
|
+
<path
|
|
6044
|
+
d="M4 4l8 8M12 4l-8 8"
|
|
6045
|
+
stroke="currentColor"
|
|
6046
|
+
stroke-width="1.4"
|
|
6047
|
+
stroke-linecap="round"
|
|
6048
|
+
/>
|
|
6049
|
+
</svg>
|
|
6050
|
+
</button>
|
|
6051
|
+
</div>
|
|
6052
|
+
@if (expanded()) {
|
|
6053
|
+
<div class="cortex-table-block__dialog-body" [innerHTML]="markdown() | marked"></div>
|
|
6054
|
+
}
|
|
6055
|
+
</dialog>
|
|
5534
6056
|
`,
|
|
5535
6057
|
dependencies: [{
|
|
5536
|
-
kind: "
|
|
5537
|
-
type:
|
|
5538
|
-
|
|
5539
|
-
inputs: [
|
|
5540
|
-
"language",
|
|
5541
|
-
"source",
|
|
5542
|
-
"pending",
|
|
5543
|
-
"closed",
|
|
5544
|
-
"debugMode",
|
|
5545
|
-
"sourceShown",
|
|
5546
|
-
"canToggleSource"
|
|
5547
|
-
],
|
|
5548
|
-
outputs: ["toggleSource"]
|
|
6058
|
+
kind: "pipe",
|
|
6059
|
+
type: MarkedPipe,
|
|
6060
|
+
name: "marked"
|
|
5549
6061
|
}, {
|
|
5550
6062
|
kind: "pipe",
|
|
5551
6063
|
type: TranslatePipe,
|
|
@@ -5559,70 +6071,109 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5559
6071
|
minVersion: "12.0.0",
|
|
5560
6072
|
version: "22.2.0",
|
|
5561
6073
|
ngImport: i0,
|
|
5562
|
-
type:
|
|
6074
|
+
type: TableBlockComponent,
|
|
5563
6075
|
decorators: [{
|
|
5564
6076
|
type: Component,
|
|
5565
6077
|
args: [{
|
|
5566
|
-
selector: "cortex-
|
|
6078
|
+
selector: "cortex-table-block",
|
|
5567
6079
|
changeDetection: ChangeDetectionStrategy2.OnPush,
|
|
5568
6080
|
encapsulation: ViewEncapsulation2.None,
|
|
5569
|
-
imports: [
|
|
5570
|
-
host: { class: "cortex-
|
|
5571
|
-
template:
|
|
5572
|
-
|
|
5573
|
-
<
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
6081
|
+
imports: [MarkedPipe, TranslatePipe],
|
|
6082
|
+
host: { class: "cortex-table-block" },
|
|
6083
|
+
template: `<div class="cortex-table-block__actions">
|
|
6084
|
+
@if (closed()) {
|
|
6085
|
+
<button
|
|
6086
|
+
type="button"
|
|
6087
|
+
class="cortex-table-block__action"
|
|
6088
|
+
[attr.aria-label]="'translate_table_expand' | translate"
|
|
6089
|
+
[title]="'translate_table_expand' | translate"
|
|
6090
|
+
(click)="expand()"
|
|
6091
|
+
>
|
|
6092
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6093
|
+
<path
|
|
6094
|
+
d="M9.5 2.5h4v4M6.5 13.5h-4v-4M13.5 2.5 9 7M2.5 13.5 7 9"
|
|
6095
|
+
stroke="currentColor"
|
|
6096
|
+
stroke-width="1.3"
|
|
6097
|
+
stroke-linecap="round"
|
|
6098
|
+
stroke-linejoin="round"
|
|
6099
|
+
/>
|
|
6100
|
+
</svg>
|
|
6101
|
+
</button>
|
|
6102
|
+
<button
|
|
6103
|
+
type="button"
|
|
6104
|
+
class="cortex-table-block__action"
|
|
6105
|
+
[attr.aria-label]="'translate_table_export' | translate"
|
|
6106
|
+
[title]="'translate_table_export' | translate"
|
|
6107
|
+
(click)="export()"
|
|
6108
|
+
>
|
|
6109
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6110
|
+
<path
|
|
6111
|
+
d="M8 2.5v7.5M5 7l3 3 3-3M2.75 11v1.25a1.25 1.25 0 0 0 1.25 1.25h8a1.25 1.25 0 0 0 1.25-1.25V11"
|
|
6112
|
+
stroke="currentColor"
|
|
6113
|
+
stroke-width="1.3"
|
|
6114
|
+
stroke-linecap="round"
|
|
6115
|
+
stroke-linejoin="round"
|
|
6116
|
+
/>
|
|
6117
|
+
</svg>
|
|
6118
|
+
</button>
|
|
6119
|
+
}
|
|
6120
|
+
</div>
|
|
6121
|
+
<div #frame [innerHTML]="markdown() | marked"></div>
|
|
6122
|
+
<!-- The dialog closes itself on Escape. -->
|
|
6123
|
+
<dialog
|
|
6124
|
+
#dialog
|
|
6125
|
+
class="cortex-table-block__dialog"
|
|
6126
|
+
[attr.aria-label]="'translate_table_expand' | translate"
|
|
6127
|
+
(close)="expanded.set(false)"
|
|
6128
|
+
>
|
|
6129
|
+
<div class="cortex-table-block__dialog-head">
|
|
6130
|
+
<button
|
|
6131
|
+
type="button"
|
|
6132
|
+
class="cortex-table-block__action"
|
|
6133
|
+
[attr.aria-label]="'translate_table_export' | translate"
|
|
6134
|
+
[title]="'translate_table_export' | translate"
|
|
6135
|
+
(click)="export()"
|
|
6136
|
+
>
|
|
6137
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6138
|
+
<path
|
|
6139
|
+
d="M8 2.5v7.5M5 7l3 3 3-3M2.75 11v1.25a1.25 1.25 0 0 0 1.25 1.25h8a1.25 1.25 0 0 0 1.25-1.25V11"
|
|
6140
|
+
stroke="currentColor"
|
|
6141
|
+
stroke-width="1.3"
|
|
6142
|
+
stroke-linecap="round"
|
|
6143
|
+
stroke-linejoin="round"
|
|
6144
|
+
/>
|
|
6145
|
+
</svg>
|
|
6146
|
+
</button>
|
|
6147
|
+
<button
|
|
6148
|
+
type="button"
|
|
6149
|
+
class="cortex-table-block__action"
|
|
6150
|
+
[attr.aria-label]="'translate_close' | translate"
|
|
6151
|
+
[title]="'translate_close' | translate"
|
|
6152
|
+
(click)="close()"
|
|
6153
|
+
>
|
|
6154
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6155
|
+
<path
|
|
6156
|
+
d="M4 4l8 8M12 4l-8 8"
|
|
6157
|
+
stroke="currentColor"
|
|
6158
|
+
stroke-width="1.4"
|
|
6159
|
+
stroke-linecap="round"
|
|
6160
|
+
/>
|
|
6161
|
+
</svg>
|
|
6162
|
+
</button>
|
|
5596
6163
|
</div>
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
class="cortex-media-block__body"
|
|
5602
|
-
[class]="'cortex-media-block__body--' + language()"
|
|
5603
|
-
[hidden]="failure()"
|
|
5604
|
-
></div>
|
|
5605
|
-
@if (debugMode() && (failure() || showSource())) {
|
|
5606
|
-
<pre class="cortex-media-block__source">{{ source() }}</pre>
|
|
5607
|
-
}
|
|
6164
|
+
@if (expanded()) {
|
|
6165
|
+
<div class="cortex-table-block__dialog-body" [innerHTML]="markdown() | marked"></div>
|
|
6166
|
+
}
|
|
6167
|
+
</dialog>
|
|
5608
6168
|
`
|
|
5609
6169
|
}]
|
|
5610
6170
|
}],
|
|
5611
|
-
ctorParameters: () => [],
|
|
5612
6171
|
propDecorators: {
|
|
5613
|
-
|
|
5614
|
-
type: i0.Input,
|
|
5615
|
-
args: [{
|
|
5616
|
-
isSignal: true,
|
|
5617
|
-
alias: "language",
|
|
5618
|
-
required: true
|
|
5619
|
-
}]
|
|
5620
|
-
}],
|
|
5621
|
-
source: [{
|
|
6172
|
+
markdown: [{
|
|
5622
6173
|
type: i0.Input,
|
|
5623
6174
|
args: [{
|
|
5624
6175
|
isSignal: true,
|
|
5625
|
-
alias: "
|
|
6176
|
+
alias: "markdown",
|
|
5626
6177
|
required: true
|
|
5627
6178
|
}]
|
|
5628
6179
|
}],
|
|
@@ -5634,25 +6185,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5634
6185
|
required: true
|
|
5635
6186
|
}]
|
|
5636
6187
|
}],
|
|
5637
|
-
|
|
5638
|
-
type: i0.
|
|
5639
|
-
args: [{
|
|
5640
|
-
isSignal: true,
|
|
5641
|
-
alias: "streaming",
|
|
5642
|
-
required: true
|
|
5643
|
-
}]
|
|
5644
|
-
}],
|
|
5645
|
-
debugMode: [{
|
|
5646
|
-
type: i0.Input,
|
|
5647
|
-
args: [{
|
|
5648
|
-
isSignal: true,
|
|
5649
|
-
alias: "debugMode",
|
|
5650
|
-
required: false
|
|
5651
|
-
}]
|
|
6188
|
+
frame: [{
|
|
6189
|
+
type: i0.ViewChild,
|
|
6190
|
+
args: ["frame", { isSignal: true }]
|
|
5652
6191
|
}],
|
|
5653
|
-
|
|
6192
|
+
dialog: [{
|
|
5654
6193
|
type: i0.ViewChild,
|
|
5655
|
-
args: ["
|
|
6194
|
+
args: ["dialog", { isSignal: true }]
|
|
5656
6195
|
}]
|
|
5657
6196
|
}
|
|
5658
6197
|
});
|
|
@@ -5790,6 +6329,10 @@ var MessageTextPartComponent = class MessageTextPartComponent2 {
|
|
|
5790
6329
|
[debugMode]="debugMode()"
|
|
5791
6330
|
/>
|
|
5792
6331
|
}
|
|
6332
|
+
@case ('table') {
|
|
6333
|
+
<!-- A table that ends the message closes when the message does. -->
|
|
6334
|
+
<cortex-table-block [markdown]="segment.text" [closed]="segment.closed || !arriving()" />
|
|
6335
|
+
}
|
|
5793
6336
|
@case ('attachment') {
|
|
5794
6337
|
<cortex-attachment-image
|
|
5795
6338
|
[id]="segment.id"
|
|
@@ -5825,6 +6368,12 @@ var MessageTextPartComponent = class MessageTextPartComponent2 {
|
|
|
5825
6368
|
"debugMode"
|
|
5826
6369
|
]
|
|
5827
6370
|
},
|
|
6371
|
+
{
|
|
6372
|
+
kind: "component",
|
|
6373
|
+
type: TableBlockComponent,
|
|
6374
|
+
selector: "cortex-table-block",
|
|
6375
|
+
inputs: ["markdown", "closed"]
|
|
6376
|
+
},
|
|
5828
6377
|
{
|
|
5829
6378
|
kind: "pipe",
|
|
5830
6379
|
type: MarkedPipe,
|
|
@@ -5849,7 +6398,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5849
6398
|
imports: [
|
|
5850
6399
|
AttachmentImageComponent,
|
|
5851
6400
|
MarkedPipe,
|
|
5852
|
-
MediaBlockComponent
|
|
6401
|
+
MediaBlockComponent,
|
|
6402
|
+
TableBlockComponent
|
|
5853
6403
|
],
|
|
5854
6404
|
template: `<div
|
|
5855
6405
|
class="cortex-text-part"
|
|
@@ -5875,6 +6425,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5875
6425
|
[debugMode]="debugMode()"
|
|
5876
6426
|
/>
|
|
5877
6427
|
}
|
|
6428
|
+
@case ('table') {
|
|
6429
|
+
<!-- A table that ends the message closes when the message does. -->
|
|
6430
|
+
<cortex-table-block [markdown]="segment.text" [closed]="segment.closed || !arriving()" />
|
|
6431
|
+
}
|
|
5878
6432
|
@case ('attachment') {
|
|
5879
6433
|
<cortex-attachment-image
|
|
5880
6434
|
[id]="segment.id"
|
|
@@ -6816,15 +7370,304 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6816
7370
|
`
|
|
6817
7371
|
}]
|
|
6818
7372
|
}],
|
|
6819
|
-
ctorParameters: () => [],
|
|
6820
|
-
propDecorators: { activity: [{
|
|
6821
|
-
type: i0.Input,
|
|
6822
|
-
args: [{
|
|
6823
|
-
isSignal: true,
|
|
6824
|
-
alias: "activity",
|
|
6825
|
-
required: true
|
|
7373
|
+
ctorParameters: () => [],
|
|
7374
|
+
propDecorators: { activity: [{
|
|
7375
|
+
type: i0.Input,
|
|
7376
|
+
args: [{
|
|
7377
|
+
isSignal: true,
|
|
7378
|
+
alias: "activity",
|
|
7379
|
+
required: true
|
|
7380
|
+
}]
|
|
7381
|
+
}] }
|
|
7382
|
+
});
|
|
7383
|
+
var ApprovalCardComponent = class ApprovalCardComponent2 {
|
|
7384
|
+
toolCallPart = input.required(...ngDevMode ? [{ debugName: "toolCallPart" }] : []);
|
|
7385
|
+
asking = input.required(...ngDevMode ? [{ debugName: "asking" }] : []);
|
|
7386
|
+
locale = inject(CORTEX_LOCALE);
|
|
7387
|
+
chatService = inject(CortexChatService);
|
|
7388
|
+
card = computed(() => approvalCard(this.toolCallPart(), this.locale()), ...ngDevMode ? [{ debugName: "card" }] : []);
|
|
7389
|
+
outcome = computed(() => toolCallAnimation(this.toolCallPart()), ...ngDevMode ? [{ debugName: "outcome" }] : []);
|
|
7390
|
+
sentenceId = computed(() => `cortex-approval-${this.toolCallPart().id}`, ...ngDevMode ? [{ debugName: "sentenceId" }] : []);
|
|
7391
|
+
detailsOpen = signal(false, ...ngDevMode ? [{ debugName: "detailsOpen" }] : []);
|
|
7392
|
+
respond(approved) {
|
|
7393
|
+
this.chatService.respondToApproval(approvalIdOf(this.toolCallPart()), approved);
|
|
7394
|
+
}
|
|
7395
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
7396
|
+
minVersion: "12.0.0",
|
|
7397
|
+
version: "22.2.0",
|
|
7398
|
+
ngImport: i0,
|
|
7399
|
+
type: ApprovalCardComponent2,
|
|
7400
|
+
deps: [],
|
|
7401
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
7402
|
+
});
|
|
7403
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
7404
|
+
minVersion: "17.0.0",
|
|
7405
|
+
version: "22.2.0",
|
|
7406
|
+
type: ApprovalCardComponent2,
|
|
7407
|
+
isStandalone: true,
|
|
7408
|
+
selector: "cortex-approval-card",
|
|
7409
|
+
inputs: {
|
|
7410
|
+
toolCallPart: {
|
|
7411
|
+
classPropertyName: "toolCallPart",
|
|
7412
|
+
publicName: "toolCallPart",
|
|
7413
|
+
isSignal: true,
|
|
7414
|
+
isRequired: true,
|
|
7415
|
+
transformFunction: null
|
|
7416
|
+
},
|
|
7417
|
+
asking: {
|
|
7418
|
+
classPropertyName: "asking",
|
|
7419
|
+
publicName: "asking",
|
|
7420
|
+
isSignal: true,
|
|
7421
|
+
isRequired: true,
|
|
7422
|
+
transformFunction: null
|
|
7423
|
+
}
|
|
7424
|
+
},
|
|
7425
|
+
ngImport: i0,
|
|
7426
|
+
template: `@let view = card();
|
|
7427
|
+
@let pending = view.decision === 'pending';
|
|
7428
|
+
<div class="cortex-approval-card" [class.cortex-approval-card--asking]="pending">
|
|
7429
|
+
@if (pending) {
|
|
7430
|
+
<div class="cortex-approval-card__head">
|
|
7431
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
7432
|
+
<path
|
|
7433
|
+
d="M8 1.75 2.75 3.75v4c0 3 2.2 5.3 5.25 6.5 3.05-1.2 5.25-3.5 5.25-6.5v-4L8 1.75Z"
|
|
7434
|
+
stroke="currentColor"
|
|
7435
|
+
stroke-width="1.3"
|
|
7436
|
+
stroke-linejoin="round"
|
|
7437
|
+
/>
|
|
7438
|
+
</svg>
|
|
7439
|
+
{{ 'translate_approval_needed' | translate }}
|
|
7440
|
+
</div>
|
|
7441
|
+
<p class="cortex-approval-card__sentence" [id]="sentenceId()">{{ view.sentence }}</p>
|
|
7442
|
+
} @else {
|
|
7443
|
+
<div class="cortex-approval-card__line">
|
|
7444
|
+
<!-- The pill's glyph slot: a spinner while the approved call runs, then its outcome. -->
|
|
7445
|
+
<span class="cortex-tool-pill__icon" aria-hidden="true">
|
|
7446
|
+
<span
|
|
7447
|
+
class="cortex-tool-pill__spinner"
|
|
7448
|
+
[class.cortex-tool-pill__spinner--visible]="outcome().active"
|
|
7449
|
+
></span>
|
|
7450
|
+
<svg
|
|
7451
|
+
class="cortex-tool-pill__svg cortex-tool-pill__svg--check"
|
|
7452
|
+
[class.cortex-tool-pill__svg--visible]="outcome().state === 'complete'"
|
|
7453
|
+
viewBox="0 0 20 20"
|
|
7454
|
+
fill="none"
|
|
7455
|
+
>
|
|
7456
|
+
<path
|
|
7457
|
+
d="M5.5 10.5 L8.5 13.5 L14.5 7"
|
|
7458
|
+
stroke="currentColor"
|
|
7459
|
+
stroke-width="2"
|
|
7460
|
+
stroke-linecap="round"
|
|
7461
|
+
stroke-linejoin="round"
|
|
7462
|
+
/>
|
|
7463
|
+
</svg>
|
|
7464
|
+
<svg
|
|
7465
|
+
class="cortex-tool-pill__svg cortex-tool-pill__svg--error"
|
|
7466
|
+
[class.cortex-tool-pill__svg--visible]="outcome().state === 'error'"
|
|
7467
|
+
viewBox="0 0 20 20"
|
|
7468
|
+
fill="none"
|
|
7469
|
+
>
|
|
7470
|
+
<path
|
|
7471
|
+
d="M6.5 6.5 L13.5 13.5 M13.5 6.5 L6.5 13.5"
|
|
7472
|
+
stroke="currentColor"
|
|
7473
|
+
stroke-width="2"
|
|
7474
|
+
stroke-linecap="round"
|
|
7475
|
+
/>
|
|
7476
|
+
</svg>
|
|
7477
|
+
</span>
|
|
7478
|
+
@if (view.decisionKey; as key) {
|
|
7479
|
+
<span class="cortex-approval-card__decision">{{ key | translate }}</span>
|
|
7480
|
+
}
|
|
7481
|
+
<span class="cortex-approval-card__summary">{{ view.sentence }}</span>
|
|
7482
|
+
<button
|
|
7483
|
+
type="button"
|
|
7484
|
+
class="cortex-approval-card__details"
|
|
7485
|
+
[attr.aria-expanded]="detailsOpen()"
|
|
7486
|
+
(click)="detailsOpen.set(!detailsOpen())"
|
|
7487
|
+
>
|
|
7488
|
+
{{ 'translate_details' | translate }}
|
|
7489
|
+
</button>
|
|
7490
|
+
</div>
|
|
7491
|
+
<!-- The line cuts a long action short; Details shows all of it. -->
|
|
7492
|
+
@if (detailsOpen()) {
|
|
7493
|
+
<p class="cortex-approval-card__sentence cortex-approval-card__sentence--full">
|
|
7494
|
+
{{ view.sentence }}
|
|
7495
|
+
</p>
|
|
7496
|
+
}
|
|
7497
|
+
}
|
|
7498
|
+
@if (view.rows.length && (pending || detailsOpen())) {
|
|
7499
|
+
<dl class="cortex-approval-card__rows">
|
|
7500
|
+
@for (row of view.rows; track row.key) {
|
|
7501
|
+
<dt>{{ row.label }}</dt>
|
|
7502
|
+
<dd>{{ row.value }}</dd>
|
|
7503
|
+
}
|
|
7504
|
+
</dl>
|
|
7505
|
+
}
|
|
7506
|
+
@if (pending && asking()) {
|
|
7507
|
+
<div class="cortex-approval-card__foot">
|
|
7508
|
+
<button
|
|
7509
|
+
type="button"
|
|
7510
|
+
class="cortex-approval-card__button cortex-approval-card__button--approve"
|
|
7511
|
+
[attr.aria-describedby]="sentenceId()"
|
|
7512
|
+
(click)="respond(true)"
|
|
7513
|
+
>
|
|
7514
|
+
{{ 'translate_approve' | translate }}
|
|
7515
|
+
</button>
|
|
7516
|
+
<button
|
|
7517
|
+
type="button"
|
|
7518
|
+
class="cortex-approval-card__button"
|
|
7519
|
+
[attr.aria-describedby]="sentenceId()"
|
|
7520
|
+
(click)="respond(false)"
|
|
7521
|
+
>
|
|
7522
|
+
{{ 'translate_deny' | translate }}
|
|
7523
|
+
</button>
|
|
7524
|
+
</div>
|
|
7525
|
+
}
|
|
7526
|
+
</div>
|
|
7527
|
+
`,
|
|
7528
|
+
dependencies: [{
|
|
7529
|
+
kind: "pipe",
|
|
7530
|
+
type: TranslatePipe,
|
|
7531
|
+
name: "translate"
|
|
7532
|
+
}],
|
|
7533
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
7534
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
7535
|
+
});
|
|
7536
|
+
};
|
|
7537
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
7538
|
+
minVersion: "12.0.0",
|
|
7539
|
+
version: "22.2.0",
|
|
7540
|
+
ngImport: i0,
|
|
7541
|
+
type: ApprovalCardComponent,
|
|
7542
|
+
decorators: [{
|
|
7543
|
+
type: Component,
|
|
7544
|
+
args: [{
|
|
7545
|
+
selector: "cortex-approval-card",
|
|
7546
|
+
imports: [TranslatePipe],
|
|
7547
|
+
changeDetection: ChangeDetectionStrategy2.OnPush,
|
|
7548
|
+
encapsulation: ViewEncapsulation2.None,
|
|
7549
|
+
template: `@let view = card();
|
|
7550
|
+
@let pending = view.decision === 'pending';
|
|
7551
|
+
<div class="cortex-approval-card" [class.cortex-approval-card--asking]="pending">
|
|
7552
|
+
@if (pending) {
|
|
7553
|
+
<div class="cortex-approval-card__head">
|
|
7554
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
7555
|
+
<path
|
|
7556
|
+
d="M8 1.75 2.75 3.75v4c0 3 2.2 5.3 5.25 6.5 3.05-1.2 5.25-3.5 5.25-6.5v-4L8 1.75Z"
|
|
7557
|
+
stroke="currentColor"
|
|
7558
|
+
stroke-width="1.3"
|
|
7559
|
+
stroke-linejoin="round"
|
|
7560
|
+
/>
|
|
7561
|
+
</svg>
|
|
7562
|
+
{{ 'translate_approval_needed' | translate }}
|
|
7563
|
+
</div>
|
|
7564
|
+
<p class="cortex-approval-card__sentence" [id]="sentenceId()">{{ view.sentence }}</p>
|
|
7565
|
+
} @else {
|
|
7566
|
+
<div class="cortex-approval-card__line">
|
|
7567
|
+
<!-- The pill's glyph slot: a spinner while the approved call runs, then its outcome. -->
|
|
7568
|
+
<span class="cortex-tool-pill__icon" aria-hidden="true">
|
|
7569
|
+
<span
|
|
7570
|
+
class="cortex-tool-pill__spinner"
|
|
7571
|
+
[class.cortex-tool-pill__spinner--visible]="outcome().active"
|
|
7572
|
+
></span>
|
|
7573
|
+
<svg
|
|
7574
|
+
class="cortex-tool-pill__svg cortex-tool-pill__svg--check"
|
|
7575
|
+
[class.cortex-tool-pill__svg--visible]="outcome().state === 'complete'"
|
|
7576
|
+
viewBox="0 0 20 20"
|
|
7577
|
+
fill="none"
|
|
7578
|
+
>
|
|
7579
|
+
<path
|
|
7580
|
+
d="M5.5 10.5 L8.5 13.5 L14.5 7"
|
|
7581
|
+
stroke="currentColor"
|
|
7582
|
+
stroke-width="2"
|
|
7583
|
+
stroke-linecap="round"
|
|
7584
|
+
stroke-linejoin="round"
|
|
7585
|
+
/>
|
|
7586
|
+
</svg>
|
|
7587
|
+
<svg
|
|
7588
|
+
class="cortex-tool-pill__svg cortex-tool-pill__svg--error"
|
|
7589
|
+
[class.cortex-tool-pill__svg--visible]="outcome().state === 'error'"
|
|
7590
|
+
viewBox="0 0 20 20"
|
|
7591
|
+
fill="none"
|
|
7592
|
+
>
|
|
7593
|
+
<path
|
|
7594
|
+
d="M6.5 6.5 L13.5 13.5 M13.5 6.5 L6.5 13.5"
|
|
7595
|
+
stroke="currentColor"
|
|
7596
|
+
stroke-width="2"
|
|
7597
|
+
stroke-linecap="round"
|
|
7598
|
+
/>
|
|
7599
|
+
</svg>
|
|
7600
|
+
</span>
|
|
7601
|
+
@if (view.decisionKey; as key) {
|
|
7602
|
+
<span class="cortex-approval-card__decision">{{ key | translate }}</span>
|
|
7603
|
+
}
|
|
7604
|
+
<span class="cortex-approval-card__summary">{{ view.sentence }}</span>
|
|
7605
|
+
<button
|
|
7606
|
+
type="button"
|
|
7607
|
+
class="cortex-approval-card__details"
|
|
7608
|
+
[attr.aria-expanded]="detailsOpen()"
|
|
7609
|
+
(click)="detailsOpen.set(!detailsOpen())"
|
|
7610
|
+
>
|
|
7611
|
+
{{ 'translate_details' | translate }}
|
|
7612
|
+
</button>
|
|
7613
|
+
</div>
|
|
7614
|
+
<!-- The line cuts a long action short; Details shows all of it. -->
|
|
7615
|
+
@if (detailsOpen()) {
|
|
7616
|
+
<p class="cortex-approval-card__sentence cortex-approval-card__sentence--full">
|
|
7617
|
+
{{ view.sentence }}
|
|
7618
|
+
</p>
|
|
7619
|
+
}
|
|
7620
|
+
}
|
|
7621
|
+
@if (view.rows.length && (pending || detailsOpen())) {
|
|
7622
|
+
<dl class="cortex-approval-card__rows">
|
|
7623
|
+
@for (row of view.rows; track row.key) {
|
|
7624
|
+
<dt>{{ row.label }}</dt>
|
|
7625
|
+
<dd>{{ row.value }}</dd>
|
|
7626
|
+
}
|
|
7627
|
+
</dl>
|
|
7628
|
+
}
|
|
7629
|
+
@if (pending && asking()) {
|
|
7630
|
+
<div class="cortex-approval-card__foot">
|
|
7631
|
+
<button
|
|
7632
|
+
type="button"
|
|
7633
|
+
class="cortex-approval-card__button cortex-approval-card__button--approve"
|
|
7634
|
+
[attr.aria-describedby]="sentenceId()"
|
|
7635
|
+
(click)="respond(true)"
|
|
7636
|
+
>
|
|
7637
|
+
{{ 'translate_approve' | translate }}
|
|
7638
|
+
</button>
|
|
7639
|
+
<button
|
|
7640
|
+
type="button"
|
|
7641
|
+
class="cortex-approval-card__button"
|
|
7642
|
+
[attr.aria-describedby]="sentenceId()"
|
|
7643
|
+
(click)="respond(false)"
|
|
7644
|
+
>
|
|
7645
|
+
{{ 'translate_deny' | translate }}
|
|
7646
|
+
</button>
|
|
7647
|
+
</div>
|
|
7648
|
+
}
|
|
7649
|
+
</div>
|
|
7650
|
+
`
|
|
7651
|
+
}]
|
|
7652
|
+
}],
|
|
7653
|
+
propDecorators: {
|
|
7654
|
+
toolCallPart: [{
|
|
7655
|
+
type: i0.Input,
|
|
7656
|
+
args: [{
|
|
7657
|
+
isSignal: true,
|
|
7658
|
+
alias: "toolCallPart",
|
|
7659
|
+
required: true
|
|
7660
|
+
}]
|
|
7661
|
+
}],
|
|
7662
|
+
asking: [{
|
|
7663
|
+
type: i0.Input,
|
|
7664
|
+
args: [{
|
|
7665
|
+
isSignal: true,
|
|
7666
|
+
alias: "asking",
|
|
7667
|
+
required: true
|
|
7668
|
+
}]
|
|
6826
7669
|
}]
|
|
6827
|
-
}
|
|
7670
|
+
}
|
|
6828
7671
|
});
|
|
6829
7672
|
var ClientToolEmbedComponent = class ClientToolEmbedComponent2 {
|
|
6830
7673
|
toolCallPart = input.required(...ngDevMode ? [{ debugName: "toolCallPart" }] : []);
|
|
@@ -7600,10 +8443,6 @@ var MessageToolCallAnimatedComponent = class MessageToolCallAnimatedComponent2 {
|
|
|
7600
8443
|
owed = computed(() => this.toolCallPart().state === "input-complete" && !this.chatService.isAgentWorking(), ...ngDevMode ? [{ debugName: "owed" }] : []);
|
|
7601
8444
|
showClientTool = computed(() => !this.clientToolFallback() && this.owed(), ...ngDevMode ? [{ debugName: "showClientTool" }] : []);
|
|
7602
8445
|
approvalRequested = computed(() => this.toolCallPart().state === "approval-requested" && !this.chatService.isAgentWorking(), ...ngDevMode ? [{ debugName: "approvalRequested" }] : []);
|
|
7603
|
-
prompt = computed(() => approvalPrompt(this.toolCallPart(), this.locale()) ?? translate(this.locale(), "translate_approval_prompt"), ...ngDevMode ? [{ debugName: "prompt" }] : []);
|
|
7604
|
-
respond(approved) {
|
|
7605
|
-
this.chatService.respondToApproval(approvalIdOf(this.toolCallPart()), approved);
|
|
7606
|
-
}
|
|
7607
8446
|
animation = computed(() => toolCallAnimation(this.toolCallPart()), ...ngDevMode ? [{ debugName: "animation" }] : []);
|
|
7608
8447
|
animState = computed(() => this.animation().state, ...ngDevMode ? [{ debugName: "animState" }] : []);
|
|
7609
8448
|
gated = computed(() => this.animation().gated, ...ngDevMode ? [{ debugName: "gated" }] : []);
|
|
@@ -7655,21 +8494,15 @@ var MessageToolCallAnimatedComponent = class MessageToolCallAnimatedComponent2 {
|
|
|
7655
8494
|
[toolCallPart]="toolCallPart()"
|
|
7656
8495
|
(fallback)="clientToolFallback.set(true)"
|
|
7657
8496
|
/>
|
|
8497
|
+
} @else if (gated()) {
|
|
8498
|
+
<cortex-approval-card [toolCallPart]="toolCallPart()" [asking]="approvalRequested()" />
|
|
7658
8499
|
} @else {
|
|
7659
8500
|
@let state = animState();
|
|
7660
8501
|
@let active = isActive();
|
|
7661
|
-
@let asking = approvalRequested();
|
|
7662
8502
|
|
|
7663
|
-
<div
|
|
7664
|
-
class="cortex-tool-pill"
|
|
7665
|
-
[class.cortex-tool-pill--gated]="gated()"
|
|
7666
|
-
[class.cortex-tool-pill--asking]="asking"
|
|
7667
|
-
>
|
|
8503
|
+
<div class="cortex-tool-pill">
|
|
7668
8504
|
<!-- Spinner, then whichever glyph the call settled on -->
|
|
7669
8505
|
<span class="cortex-tool-pill__icon">
|
|
7670
|
-
@if (asking) {
|
|
7671
|
-
<span class="cortex-tool-pill__dot"></span>
|
|
7672
|
-
}
|
|
7673
8506
|
<span
|
|
7674
8507
|
class="cortex-tool-pill__spinner"
|
|
7675
8508
|
[class.cortex-tool-pill__spinner--visible]="active"
|
|
@@ -7708,9 +8541,7 @@ var MessageToolCallAnimatedComponent = class MessageToolCallAnimatedComponent2 {
|
|
|
7708
8541
|
[class.cortex-tool-pill__title--error]="state === 'error'"
|
|
7709
8542
|
[class.cortex-tool-pill__title--pending]="state === 'starting' && !!statement()"
|
|
7710
8543
|
>
|
|
7711
|
-
@if (
|
|
7712
|
-
{{ prompt() }}
|
|
7713
|
-
} @else if (statement(); as sentence) {
|
|
8544
|
+
@if (statement(); as sentence) {
|
|
7714
8545
|
{{ sentence }}
|
|
7715
8546
|
} @else {
|
|
7716
8547
|
{{ displayTitleKey() | translate }}
|
|
@@ -7719,20 +8550,6 @@ var MessageToolCallAnimatedComponent = class MessageToolCallAnimatedComponent2 {
|
|
|
7719
8550
|
@if (rowsLabel(); as label) {
|
|
7720
8551
|
<span class="cortex-tool-pill__meta">{{ label }}</span>
|
|
7721
8552
|
}
|
|
7722
|
-
@if (asking) {
|
|
7723
|
-
<span class="cortex-tool-pill__actions">
|
|
7724
|
-
<button
|
|
7725
|
-
type="button"
|
|
7726
|
-
class="cortex-tool-pill__action cortex-tool-pill__action--approve"
|
|
7727
|
-
(click)="respond(true)"
|
|
7728
|
-
>
|
|
7729
|
-
{{ 'translate_approve' | translate }}
|
|
7730
|
-
</button>
|
|
7731
|
-
<button type="button" class="cortex-tool-pill__action" (click)="respond(false)">
|
|
7732
|
-
{{ 'translate_deny' | translate }}
|
|
7733
|
-
</button>
|
|
7734
|
-
</span>
|
|
7735
|
-
}
|
|
7736
8553
|
</div>
|
|
7737
8554
|
}
|
|
7738
8555
|
`,
|
|
@@ -7751,6 +8568,12 @@ var MessageToolCallAnimatedComponent = class MessageToolCallAnimatedComponent2 {
|
|
|
7751
8568
|
],
|
|
7752
8569
|
exportAs: ["ngComponentOutlet"]
|
|
7753
8570
|
},
|
|
8571
|
+
{
|
|
8572
|
+
kind: "component",
|
|
8573
|
+
type: ApprovalCardComponent,
|
|
8574
|
+
selector: "cortex-approval-card",
|
|
8575
|
+
inputs: ["toolCallPart", "asking"]
|
|
8576
|
+
},
|
|
7754
8577
|
{
|
|
7755
8578
|
kind: "component",
|
|
7756
8579
|
type: ClientToolEmbedComponent,
|
|
@@ -7780,6 +8603,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7780
8603
|
imports: [
|
|
7781
8604
|
NgComponentOutlet,
|
|
7782
8605
|
TranslatePipe,
|
|
8606
|
+
ApprovalCardComponent,
|
|
7783
8607
|
ClientToolEmbedComponent
|
|
7784
8608
|
],
|
|
7785
8609
|
host: { class: "cortex-tool-call-animated" },
|
|
@@ -7794,21 +8618,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7794
8618
|
[toolCallPart]="toolCallPart()"
|
|
7795
8619
|
(fallback)="clientToolFallback.set(true)"
|
|
7796
8620
|
/>
|
|
8621
|
+
} @else if (gated()) {
|
|
8622
|
+
<cortex-approval-card [toolCallPart]="toolCallPart()" [asking]="approvalRequested()" />
|
|
7797
8623
|
} @else {
|
|
7798
8624
|
@let state = animState();
|
|
7799
8625
|
@let active = isActive();
|
|
7800
|
-
@let asking = approvalRequested();
|
|
7801
8626
|
|
|
7802
|
-
<div
|
|
7803
|
-
class="cortex-tool-pill"
|
|
7804
|
-
[class.cortex-tool-pill--gated]="gated()"
|
|
7805
|
-
[class.cortex-tool-pill--asking]="asking"
|
|
7806
|
-
>
|
|
8627
|
+
<div class="cortex-tool-pill">
|
|
7807
8628
|
<!-- Spinner, then whichever glyph the call settled on -->
|
|
7808
8629
|
<span class="cortex-tool-pill__icon">
|
|
7809
|
-
@if (asking) {
|
|
7810
|
-
<span class="cortex-tool-pill__dot"></span>
|
|
7811
|
-
}
|
|
7812
8630
|
<span
|
|
7813
8631
|
class="cortex-tool-pill__spinner"
|
|
7814
8632
|
[class.cortex-tool-pill__spinner--visible]="active"
|
|
@@ -7847,9 +8665,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7847
8665
|
[class.cortex-tool-pill__title--error]="state === 'error'"
|
|
7848
8666
|
[class.cortex-tool-pill__title--pending]="state === 'starting' && !!statement()"
|
|
7849
8667
|
>
|
|
7850
|
-
@if (
|
|
7851
|
-
{{ prompt() }}
|
|
7852
|
-
} @else if (statement(); as sentence) {
|
|
8668
|
+
@if (statement(); as sentence) {
|
|
7853
8669
|
{{ sentence }}
|
|
7854
8670
|
} @else {
|
|
7855
8671
|
{{ displayTitleKey() | translate }}
|
|
@@ -7858,20 +8674,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7858
8674
|
@if (rowsLabel(); as label) {
|
|
7859
8675
|
<span class="cortex-tool-pill__meta">{{ label }}</span>
|
|
7860
8676
|
}
|
|
7861
|
-
@if (asking) {
|
|
7862
|
-
<span class="cortex-tool-pill__actions">
|
|
7863
|
-
<button
|
|
7864
|
-
type="button"
|
|
7865
|
-
class="cortex-tool-pill__action cortex-tool-pill__action--approve"
|
|
7866
|
-
(click)="respond(true)"
|
|
7867
|
-
>
|
|
7868
|
-
{{ 'translate_approve' | translate }}
|
|
7869
|
-
</button>
|
|
7870
|
-
<button type="button" class="cortex-tool-pill__action" (click)="respond(false)">
|
|
7871
|
-
{{ 'translate_deny' | translate }}
|
|
7872
|
-
</button>
|
|
7873
|
-
</span>
|
|
7874
|
-
}
|
|
7875
8677
|
</div>
|
|
7876
8678
|
}
|
|
7877
8679
|
`
|
|
@@ -9777,6 +10579,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
9777
10579
|
}]
|
|
9778
10580
|
});
|
|
9779
10581
|
var ThreadListComponent = class ThreadListComponent2 {
|
|
10582
|
+
showHeader = input(true, ...ngDevMode ? [{ debugName: "showHeader" }] : []);
|
|
9780
10583
|
threadSelected = output();
|
|
9781
10584
|
newChatRequested = output();
|
|
9782
10585
|
backRequested = output();
|
|
@@ -9807,6 +10610,13 @@ var ThreadListComponent = class ThreadListComponent2 {
|
|
|
9807
10610
|
type: ThreadListComponent2,
|
|
9808
10611
|
isStandalone: true,
|
|
9809
10612
|
selector: "cortex-thread-list",
|
|
10613
|
+
inputs: { showHeader: {
|
|
10614
|
+
classPropertyName: "showHeader",
|
|
10615
|
+
publicName: "showHeader",
|
|
10616
|
+
isSignal: true,
|
|
10617
|
+
isRequired: false,
|
|
10618
|
+
transformFunction: null
|
|
10619
|
+
} },
|
|
9810
10620
|
outputs: {
|
|
9811
10621
|
threadSelected: "threadSelected",
|
|
9812
10622
|
newChatRequested: "newChatRequested",
|
|
@@ -9816,47 +10626,56 @@ var ThreadListComponent = class ThreadListComponent2 {
|
|
|
9816
10626
|
template: `@let threads = threadService.threads();
|
|
9817
10627
|
@let threadCount = threads?.length ?? 0;
|
|
9818
10628
|
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
(
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
height="14"
|
|
9830
|
-
viewBox="0 0 16 16"
|
|
9831
|
-
fill="none"
|
|
9832
|
-
aria-hidden="true"
|
|
9833
|
-
class="cortex-widget__back-icon"
|
|
10629
|
+
<!-- A host's own header arrives projected; the default stands in when there is none. -->
|
|
10630
|
+
<ng-content />
|
|
10631
|
+
@if (showHeader()) {
|
|
10632
|
+
<div class="cortex-widget__threads-header">
|
|
10633
|
+
<!-- Back to chat (helper mode; full mode hides it, the sidebar is always visible) -->
|
|
10634
|
+
<button
|
|
10635
|
+
type="button"
|
|
10636
|
+
(click)="backRequested.emit()"
|
|
10637
|
+
[attr.aria-label]="'translate_back' | translate"
|
|
10638
|
+
class="cortex-widget__header-btn cortex-widget__back-btn"
|
|
9834
10639
|
>
|
|
9835
|
-
<
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9842
|
-
|
|
9843
|
-
|
|
10640
|
+
<svg
|
|
10641
|
+
width="14"
|
|
10642
|
+
height="14"
|
|
10643
|
+
viewBox="0 0 16 16"
|
|
10644
|
+
fill="none"
|
|
10645
|
+
aria-hidden="true"
|
|
10646
|
+
class="cortex-widget__back-icon"
|
|
10647
|
+
>
|
|
10648
|
+
<path
|
|
10649
|
+
d="M10 3L5 8l5 5"
|
|
10650
|
+
stroke="currentColor"
|
|
10651
|
+
stroke-width="1.5"
|
|
10652
|
+
stroke-linecap="round"
|
|
10653
|
+
stroke-linejoin="round"
|
|
10654
|
+
/>
|
|
10655
|
+
</svg>
|
|
10656
|
+
</button>
|
|
9844
10657
|
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
|
|
9851
|
-
|
|
10658
|
+
<div>
|
|
10659
|
+
<h2 class="cortex-widget__threads-title">
|
|
10660
|
+
{{ 'translate_history' | translate }}
|
|
10661
|
+
</h2>
|
|
10662
|
+
<p class="cortex-widget__threads-count">
|
|
10663
|
+
{{ countKey(threadCount) | translate: { count: threadCount } }}
|
|
10664
|
+
</p>
|
|
10665
|
+
</div>
|
|
10666
|
+
<button
|
|
10667
|
+
type="button"
|
|
10668
|
+
(click)="newChatRequested.emit()"
|
|
10669
|
+
[attr.aria-label]="'translate_new_chat' | translate"
|
|
10670
|
+
[title]="'translate_new_chat' | translate"
|
|
10671
|
+
class="cortex-widget__header-btn cortex-widget__new-btn"
|
|
10672
|
+
>
|
|
10673
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
10674
|
+
<path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
|
10675
|
+
</svg>
|
|
10676
|
+
</button>
|
|
9852
10677
|
</div>
|
|
9853
|
-
|
|
9854
|
-
<svg width="12" height="12" viewBox="0 0 16 16" fill="none">
|
|
9855
|
-
<path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
|
9856
|
-
</svg>
|
|
9857
|
-
{{ 'translate_new' | translate }}
|
|
9858
|
-
</button>
|
|
9859
|
-
</div>
|
|
10678
|
+
}
|
|
9860
10679
|
|
|
9861
10680
|
<div class="cortex-widget__threads-list">
|
|
9862
10681
|
<!-- The loading, listed and empty states are siblings rather than an if/else
|
|
@@ -10014,47 +10833,56 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10014
10833
|
template: `@let threads = threadService.threads();
|
|
10015
10834
|
@let threadCount = threads?.length ?? 0;
|
|
10016
10835
|
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
10021
|
-
(
|
|
10022
|
-
|
|
10023
|
-
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
height="14"
|
|
10028
|
-
viewBox="0 0 16 16"
|
|
10029
|
-
fill="none"
|
|
10030
|
-
aria-hidden="true"
|
|
10031
|
-
class="cortex-widget__back-icon"
|
|
10836
|
+
<!-- A host's own header arrives projected; the default stands in when there is none. -->
|
|
10837
|
+
<ng-content />
|
|
10838
|
+
@if (showHeader()) {
|
|
10839
|
+
<div class="cortex-widget__threads-header">
|
|
10840
|
+
<!-- Back to chat (helper mode; full mode hides it, the sidebar is always visible) -->
|
|
10841
|
+
<button
|
|
10842
|
+
type="button"
|
|
10843
|
+
(click)="backRequested.emit()"
|
|
10844
|
+
[attr.aria-label]="'translate_back' | translate"
|
|
10845
|
+
class="cortex-widget__header-btn cortex-widget__back-btn"
|
|
10032
10846
|
>
|
|
10033
|
-
<
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10847
|
+
<svg
|
|
10848
|
+
width="14"
|
|
10849
|
+
height="14"
|
|
10850
|
+
viewBox="0 0 16 16"
|
|
10851
|
+
fill="none"
|
|
10852
|
+
aria-hidden="true"
|
|
10853
|
+
class="cortex-widget__back-icon"
|
|
10854
|
+
>
|
|
10855
|
+
<path
|
|
10856
|
+
d="M10 3L5 8l5 5"
|
|
10857
|
+
stroke="currentColor"
|
|
10858
|
+
stroke-width="1.5"
|
|
10859
|
+
stroke-linecap="round"
|
|
10860
|
+
stroke-linejoin="round"
|
|
10861
|
+
/>
|
|
10862
|
+
</svg>
|
|
10863
|
+
</button>
|
|
10042
10864
|
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10865
|
+
<div>
|
|
10866
|
+
<h2 class="cortex-widget__threads-title">
|
|
10867
|
+
{{ 'translate_history' | translate }}
|
|
10868
|
+
</h2>
|
|
10869
|
+
<p class="cortex-widget__threads-count">
|
|
10870
|
+
{{ countKey(threadCount) | translate: { count: threadCount } }}
|
|
10871
|
+
</p>
|
|
10872
|
+
</div>
|
|
10873
|
+
<button
|
|
10874
|
+
type="button"
|
|
10875
|
+
(click)="newChatRequested.emit()"
|
|
10876
|
+
[attr.aria-label]="'translate_new_chat' | translate"
|
|
10877
|
+
[title]="'translate_new_chat' | translate"
|
|
10878
|
+
class="cortex-widget__header-btn cortex-widget__new-btn"
|
|
10879
|
+
>
|
|
10880
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
10881
|
+
<path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
|
10882
|
+
</svg>
|
|
10883
|
+
</button>
|
|
10050
10884
|
</div>
|
|
10051
|
-
|
|
10052
|
-
<svg width="12" height="12" viewBox="0 0 16 16" fill="none">
|
|
10053
|
-
<path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
|
10054
|
-
</svg>
|
|
10055
|
-
{{ 'translate_new' | translate }}
|
|
10056
|
-
</button>
|
|
10057
|
-
</div>
|
|
10885
|
+
}
|
|
10058
10886
|
|
|
10059
10887
|
<div class="cortex-widget__threads-list">
|
|
10060
10888
|
<!-- The loading, listed and empty states are siblings rather than an if/else
|
|
@@ -10191,6 +11019,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10191
11019
|
}]
|
|
10192
11020
|
}],
|
|
10193
11021
|
propDecorators: {
|
|
11022
|
+
showHeader: [{
|
|
11023
|
+
type: i0.Input,
|
|
11024
|
+
args: [{
|
|
11025
|
+
isSignal: true,
|
|
11026
|
+
alias: "showHeader",
|
|
11027
|
+
required: false
|
|
11028
|
+
}]
|
|
11029
|
+
}],
|
|
10194
11030
|
threadSelected: [{
|
|
10195
11031
|
type: i0.Output,
|
|
10196
11032
|
args: ["threadSelected"]
|
|
@@ -10205,6 +11041,38 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10205
11041
|
}]
|
|
10206
11042
|
}
|
|
10207
11043
|
});
|
|
11044
|
+
var CortexHeaderDirective = class CortexHeaderDirective2 {
|
|
11045
|
+
template = inject(TemplateRef);
|
|
11046
|
+
static ngTemplateContextGuard(_directive, _context) {
|
|
11047
|
+
return true;
|
|
11048
|
+
}
|
|
11049
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
11050
|
+
minVersion: "12.0.0",
|
|
11051
|
+
version: "22.2.0",
|
|
11052
|
+
ngImport: i0,
|
|
11053
|
+
type: CortexHeaderDirective2,
|
|
11054
|
+
deps: [],
|
|
11055
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
11056
|
+
});
|
|
11057
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
11058
|
+
minVersion: "14.0.0",
|
|
11059
|
+
version: "22.2.0",
|
|
11060
|
+
type: CortexHeaderDirective2,
|
|
11061
|
+
isStandalone: true,
|
|
11062
|
+
selector: "ng-template[cortexHeader]",
|
|
11063
|
+
ngImport: i0
|
|
11064
|
+
});
|
|
11065
|
+
};
|
|
11066
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
11067
|
+
minVersion: "12.0.0",
|
|
11068
|
+
version: "22.2.0",
|
|
11069
|
+
ngImport: i0,
|
|
11070
|
+
type: CortexHeaderDirective,
|
|
11071
|
+
decorators: [{
|
|
11072
|
+
type: Directive,
|
|
11073
|
+
args: [{ selector: "ng-template[cortexHeader]" }]
|
|
11074
|
+
}]
|
|
11075
|
+
});
|
|
10208
11076
|
var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
10209
11077
|
config = input.required(...ngDevMode ? [{ debugName: "config" }] : []);
|
|
10210
11078
|
debugMode = signal(false, ...ngDevMode ? [{ debugName: "debugMode" }] : []);
|
|
@@ -10212,6 +11080,9 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
10212
11080
|
sidebarOpen = signal(false, ...ngDevMode ? [{ debugName: "sidebarOpen" }] : []);
|
|
10213
11081
|
viewMode = computed(() => this.config().viewMode ?? "helper", ...ngDevMode ? [{ debugName: "viewMode" }] : []);
|
|
10214
11082
|
composer = viewChild(ChatComposerComponent, ...ngDevMode ? [{ debugName: "composer" }] : []);
|
|
11083
|
+
customHeader = contentChild(CortexHeaderDirective, ...ngDevMode ? [{ debugName: "customHeader" }] : []);
|
|
11084
|
+
chatHeader = computed(() => this.headerContext("chat"), ...ngDevMode ? [{ debugName: "chatHeader" }] : []);
|
|
11085
|
+
threadsHeader = computed(() => this.headerContext("threads"), ...ngDevMode ? [{ debugName: "threadsHeader" }] : []);
|
|
10215
11086
|
chatService;
|
|
10216
11087
|
queue;
|
|
10217
11088
|
injector = inject(Injector);
|
|
@@ -10241,6 +11112,23 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
10241
11112
|
});
|
|
10242
11113
|
});
|
|
10243
11114
|
}
|
|
11115
|
+
headerContext(screen) {
|
|
11116
|
+
return {
|
|
11117
|
+
screen,
|
|
11118
|
+
viewMode: this.viewMode(),
|
|
11119
|
+
title: this.chatService.selectedThread()?.title ?? null,
|
|
11120
|
+
agentName: localized(this.config().agentName, this.injector.get(CORTEX_LOCALE)()),
|
|
11121
|
+
isWorking: this.chatService.isAgentWorking(),
|
|
11122
|
+
debug: {
|
|
11123
|
+
shown: Boolean(this.config().showDebugButton),
|
|
11124
|
+
on: this.debugMode()
|
|
11125
|
+
},
|
|
11126
|
+
newChat: () => this.newChat(),
|
|
11127
|
+
openHistory: () => this.openHistory(),
|
|
11128
|
+
closeHistory: () => this.closeHistory(),
|
|
11129
|
+
toggleDebug: () => this.toggleDebugMode()
|
|
11130
|
+
};
|
|
11131
|
+
}
|
|
10244
11132
|
toggleSidebar() {
|
|
10245
11133
|
this.sidebarOpen.update((v) => !v);
|
|
10246
11134
|
}
|
|
@@ -10256,10 +11144,16 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
10256
11144
|
this.sidebarOpen.set(false);
|
|
10257
11145
|
}
|
|
10258
11146
|
openHistory() {
|
|
10259
|
-
this.
|
|
11147
|
+
if (this.viewMode() === "full")
|
|
11148
|
+
this.sidebarOpen.set(true);
|
|
11149
|
+
else
|
|
11150
|
+
this.screen.set("threads");
|
|
10260
11151
|
}
|
|
10261
11152
|
closeHistory() {
|
|
10262
|
-
this.
|
|
11153
|
+
if (this.viewMode() === "full")
|
|
11154
|
+
this.sidebarOpen.set(false);
|
|
11155
|
+
else
|
|
11156
|
+
this.screen.set("chat");
|
|
10263
11157
|
}
|
|
10264
11158
|
onWidgetDragOver(event) {
|
|
10265
11159
|
event.preventDefault();
|
|
@@ -10308,6 +11202,13 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
10308
11202
|
CortexWebSocketService,
|
|
10309
11203
|
AttachmentQueueService
|
|
10310
11204
|
],
|
|
11205
|
+
queries: [{
|
|
11206
|
+
propertyName: "customHeader",
|
|
11207
|
+
first: true,
|
|
11208
|
+
predicate: CortexHeaderDirective,
|
|
11209
|
+
descendants: true,
|
|
11210
|
+
isSignal: true
|
|
11211
|
+
}],
|
|
10311
11212
|
viewQueries: [{
|
|
10312
11213
|
propertyName: "composer",
|
|
10313
11214
|
first: true,
|
|
@@ -10330,19 +11231,29 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
10330
11231
|
(threadSelected)="selectThread($event)"
|
|
10331
11232
|
(newChatRequested)="newChat()"
|
|
10332
11233
|
(backRequested)="closeHistory()"
|
|
10333
|
-
|
|
11234
|
+
[showHeader]="!customHeader()"
|
|
11235
|
+
>
|
|
11236
|
+
@if (customHeader(); as header) {
|
|
11237
|
+
<ng-container *ngTemplateOutlet="header.template; context: { $implicit: threadsHeader() }" />
|
|
11238
|
+
}
|
|
11239
|
+
</cortex-thread-list>
|
|
10334
11240
|
|
|
10335
11241
|
<div
|
|
10336
11242
|
class="cortex-widget__screen"
|
|
10337
11243
|
[class.cortex-widget__screen--active]="screen() === 'chat'"
|
|
10338
11244
|
[class.cortex-widget__screen--right]="screen() !== 'chat'"
|
|
10339
11245
|
>
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
11246
|
+
@if (customHeader(); as header) {
|
|
11247
|
+
<ng-container *ngTemplateOutlet="header.template; context: { $implicit: chatHeader() }" />
|
|
11248
|
+
} @else {
|
|
11249
|
+
<cortex-chat-header
|
|
11250
|
+
[debugMode]="debugMode()"
|
|
11251
|
+
(toggleSidebar)="toggleSidebar()"
|
|
11252
|
+
(toggleDebug)="toggleDebugMode()"
|
|
11253
|
+
(openHistory)="openHistory()"
|
|
11254
|
+
(newChat)="newChat()"
|
|
11255
|
+
/>
|
|
11256
|
+
}
|
|
10346
11257
|
|
|
10347
11258
|
<!-- Blank-chat landing; the first send creates the thread, which swaps
|
|
10348
11259
|
this for the message list. -->
|
|
@@ -10374,7 +11285,7 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
10374
11285
|
<div class="cortex-widget__sidebar-backdrop" (click)="closeSidebar()"></div>
|
|
10375
11286
|
</div>
|
|
10376
11287
|
`,
|
|
10377
|
-
styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-code-surface: light-dark(#e8edf3, #111111);--cortex-color-code-text: light-dark(#334155, #e5e5e5);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer cortex-preflight{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}.cortex-widget__container--full .cortex-widget__chat-title{font-size:.875rem}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__back-btn,.cortex-widget__history-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__back-btn:hover,.cortex-widget__history-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__input-area{width:100%;max-width:26rem;padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}cortex-chat-composer,cortex-message-tool-call-outcome,cortex-llm-usage-chips{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;transition:border-color .15s,background-color .15s}.cortex-widget__input-box--disabled{background:var(--cortex-color-surface-muted)}.cortex-widget__input-box--enabled{background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface))}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea{flex:1;background:transparent;resize:none;border:0;outline:none;font-size:var(--cortex-font-size);padding:.375rem .5rem;min-height:28px;max-height:calc(5.5 * var(--cortex-font-size) + .75rem);overflow-y:auto;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed;border:0}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-border);color:var(--cortex-color-text-muted)}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-chat-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:.9375rem;font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;overflow-x:hidden;width:100%;padding:1rem}.cortex-message-list__content{position:relative;display:flex;flex-direction:column;gap:.5rem}.cortex-message-list__content--settling{animation:cortex-content-settle .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-content-settle{0%{translate:0 var(--cortex-slide)}}.cortex-widget__screen>.cortex-send-flight{position:absolute;z-index:2;margin:0;max-width:none;pointer-events:none;animation:cortex-send-fade 80ms linear both,cortex-send-fly .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-send-fade{0%{opacity:0}}@keyframes cortex-send-fly{0%{translate:var(--cortex-fly-x) var(--cortex-fly-y)}}.cortex-working-thinking{padding-inline-start:2rem;--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-working-thinking{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}.cortex-working-avatar{position:absolute;top:0;inset-inline-start:0;z-index:1;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground);translate:0 var(--cortex-avatar-y, 0);visibility:hidden;pointer-events:none}.cortex-working-avatar svg{width:.875rem;height:.875rem}.cortex-working-avatar--shown{visibility:visible;transition:translate .42s cubic-bezier(.76,0,.24,1);animation:cortex-avatar-in .7s cubic-bezier(.16,1,.3,1) both}.cortex-working-avatar--leaving{animation:cortex-avatar-out .36s cubic-bezier(.5,0,.75,0) .12s both}.cortex-working-avatar__ring{position:absolute;inset:-.25rem;border-radius:9999px;border:1.5px solid transparent;border-top-color:var(--cortex-color-accent);border-right-color:color-mix(in oklab,var(--cortex-color-accent) 40%,transparent)}.cortex-working-avatar--shown .cortex-working-avatar__ring{animation:cortex-tool-spin 1s linear infinite}.cortex-working-avatar--leaving .cortex-working-avatar__ring{animation:cortex-avatar-ring-out .22s ease-out both}@keyframes cortex-avatar-in{0%{opacity:0;transform:translateY(2.5rem) scale(.7)}}@keyframes cortex-avatar-out{to{opacity:0;transform:scale(.4)}}@keyframes cortex-avatar-ring-out{to{opacity:0}}.cortex-message{min-width:0;transition:margin-block-start .42s cubic-bezier(.76,0,.24,1)}.cortex-message:empty{display:none}.cortex-message:has(.cortex-message-part--folded):not(:has(.cortex-message-part:not(.cortex-message-part--folded))){margin-block-start:-.5rem;transition-delay:.6s}.cortex-text-bubble--assistant,.cortex-subtle-activity,.cortex-tool-pill:not(.cortex-tool-pill--gated),.cortex-tool-pill:not(.cortex-tool-pill--gated) .cortex-tool-pill__icon{transition:translate .42s cubic-bezier(.76,0,.24,1) .16s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity,.cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated),.cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated) .cortex-tool-pill__icon{transition-delay:0s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity{translate:2rem}[dir=rtl] .cortex-message--working-turn .cortex-text-bubble--assistant,[dir=rtl] .cortex-message--working-turn .cortex-subtle-activity{translate:-2rem}.cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated){translate:.875rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated){translate:-.875rem}.cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated) .cortex-tool-pill__icon{translate:-.5rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated) .cortex-tool-pill__icon{translate:.5rem}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-actions{display:flex;align-items:center;gap:.375rem;margin-top:-.25rem}.cortex-message-actions--user{justify-content:flex-end}.cortex-message-actions__time{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:0;transition:opacity .15s ease}.cortex-message-actions:not(:has(.cortex-copy-btn)) .cortex-message-actions__time{opacity:1}.cortex-message:hover .cortex-message-actions .cortex-copy-btn__button,.cortex-message:hover .cortex-message-actions .cortex-message-actions__time,.cortex-message-actions:focus-within .cortex-copy-btn__button,.cortex-message-actions:focus-within .cortex-message-actions__time{opacity:1}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr;min-width:0;transition:grid-template-rows .42s cubic-bezier(.76,0,.24,1),margin-block-end .42s cubic-bezier(.76,0,.24,1),opacity .3s ease,visibility 0s,overflow 0s .42s allow-discrete}.cortex-message-part>*{min-height:0}.cortex-message-part:empty{display:none}.cortex-message-part--folded{grid-template-rows:0fr;margin-block-end:-.5rem;opacity:0;overflow:clip;visibility:hidden;transition-delay:.6s,.6s,.6s,1.02s,0s}[data-cortex-frontier] .cortex-tool-pill__spinner{visibility:hidden}[data-cortex-frontier] .cortex-subtle-activity__dots{display:none}.cortex-message-part--animated{--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-message-part--animated{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}@keyframes cortex-part-reveal{0%{opacity:0;transform:translate(var(--cortex-reveal-from));filter:blur(5px);-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-start) 0;mask-position:var(--cortex-reveal-start) 0}40%{opacity:1}to{transform:none;filter:none;-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-end) 0;mask-position:var(--cortex-reveal-end) 0}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;min-width:0;overflow-wrap:anywhere;font-size:var(--cortex-font-size);line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-code-surface);border-radius:var(--cortex-radius);max-width:100%;overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-code-text)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-stream-fade{animation:cortex-stream-fade .3s ease-out}@keyframes cortex-stream-fade{0%{opacity:0}}.cortex-media-block{margin:.75em 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-media-block__head{display:flex}.cortex-media-block__head[hidden]{display:none}.cortex-media-block__head{align-items:center;justify-content:space-between;gap:.5rem;padding:.25rem .5rem .25rem .75rem;background:var(--cortex-color-surface-subtle);border-bottom:1px solid var(--cortex-color-border);font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-media-block__lang{font-family:var(--cortex-font-mono)}.cortex-media-block__pending{display:inline-flex;align-items:center;gap:.375rem}.cortex-media-block__pending:before{content:"";width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-media-block__actions{display:inline-flex;align-items:center;gap:.125rem}.cortex-media-block__action{background:transparent;border:0;padding:.125rem .375rem;border-radius:calc(var(--cortex-radius) * .5);font:inherit;color:inherit;cursor:pointer}.cortex-media-block__action:hover,.cortex-media-block__action[aria-pressed=true]{background:var(--cortex-color-hover);color:var(--cortex-color-text-strong)}.cortex-media-block__body{padding:.75rem}.cortex-media-block__body[hidden]{display:none}.cortex-media-block__body{min-height:6rem;overflow-x:auto}.cortex-media-block__body svg{display:block;max-width:100%;height:auto}.cortex-media-block__body--map{padding:0;height:18rem}.cortex-media-block__body--map>div{height:100%}.cortex-media-block__error{margin:0;font-size:.8125rem;color:var(--cortex-color-danger)}.cortex-media-block .cortex-media-block__source{margin:0;padding:.75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.5;white-space:pre;overflow-x:auto;color:var(--cortex-color-text)}.cortex-attachment-image{margin:.75em 0}.cortex-attachment-image img{display:block;max-width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border)}.cortex-attachment-image__caption{margin:.25rem 0 0;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-trigger-block{display:inline-flex;width:fit-content;padding:.375rem .75rem;border-radius:999px;background:var(--cortex-color-accent-surface);color:var(--cortex-color-text-strong);font-size:.75rem}.cortex-trigger-block__head{display:flex;align-items:center;gap:.5rem}.cortex-trigger-block__icon{flex-shrink:0;color:var(--cortex-color-accent)}.cortex-trigger-block__name{font-family:var(--cortex-font-mono);font-weight:600}.cortex-trigger-block__time{color:var(--cortex-color-text-secondary);font-size:.6875rem}.cortex-trigger-block--debug{display:flex;flex-direction:column;width:auto;gap:.375rem;padding:.5rem .75rem;border:1px dashed var(--cortex-color-border-strong);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.6875rem}.cortex-trigger-block--debug .cortex-trigger-block__head{font-family:var(--cortex-font-mono);letter-spacing:.04em;text-transform:uppercase;color:var(--cortex-color-text-secondary)}.cortex-trigger-block--debug .cortex-trigger-block__name{color:var(--cortex-color-text-strong)}.cortex-trigger-block--debug .cortex-trigger-block__time{margin-inline-start:auto;font-size:inherit;text-transform:none;letter-spacing:0}.cortex-trigger-block__payload{font-size:.75rem}.cortex-trigger-block__payload>summary{cursor:pointer;color:var(--cortex-color-text-secondary);-webkit-user-select:none;user-select:none}.cortex-trigger-block__payload[open]>summary{margin-bottom:.25rem}.cortex-widget__messages-disabled{padding:.75rem 1rem;text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-message-attachments{display:flex;flex-wrap:wrap;gap:.375rem}.cortex-message-attachments--user{justify-content:flex-end}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-debug-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-debug-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.cortex-debug-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.cortex-debug-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.cortex-debug-tool[data-state=awaiting-input],.cortex-debug-tool[data-state=input-streaming],.cortex-debug-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.cortex-debug-tool[data-state=approval-requested],.cortex-debug-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.cortex-debug-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.cortex-debug-tool__summary::-webkit-details-marker{display:none}.cortex-debug-tool__header{display:flex;align-items:flex-start;gap:.75rem}.cortex-debug-tool__meta{flex:1;min-width:0}.cortex-debug-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-debug-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.cortex-debug-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.cortex-debug-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.cortex-debug-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.cortex-debug-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.cortex-debug-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.cortex-debug-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.cortex-debug-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.cortex-debug-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.cortex-debug-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .cortex-debug-tool__chevron{transform:rotate(180deg)}.cortex-debug-tool__body{padding:0 .875rem .75rem 1.125rem}.cortex-debug-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.cortex-debug-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-debug-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__section-label--success{color:var(--cortex-color-success)}.cortex-debug-tool__section-label--error{color:var(--cortex-color-danger)}.cortex-debug-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.cortex-debug-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.cortex-debug-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.cortex-debug-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.cortex-debug-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.cortex-debug-tool__section--success .cortex-debug-tool__tree{background:light-dark(#f0fdf4,#052e16)}.cortex-debug-tool__section--error .cortex-debug-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--cortex-color-text-muted)}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title--pending{color:var(--cortex-color-text-muted);opacity:.6}.cortex-tool-pill__meta{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:.8;white-space:nowrap;font-variant-numeric:tabular-nums}.cortex-tool-pill--gated{border:1px solid var(--cortex-color-border);border-radius:9999px;background:var(--cortex-color-surface-subtle);padding:.3rem .75rem .3rem .65rem;gap:.6rem}.cortex-tool-pill--asking{padding-inline-end:.3rem;flex-wrap:wrap}.cortex-tool-pill__dot{width:.5rem;height:.5rem;border-radius:9999px;background:var(--cortex-color-accent)}.cortex-tool-pill--gated .cortex-tool-pill__title{color:var(--cortex-color-text-heading);white-space:normal}.cortex-tool-pill__actions{display:flex;gap:.3rem;margin-inline-start:.25rem}.cortex-tool-pill__action{border:1px solid var(--cortex-color-border-strong);border-radius:9999px;background:none;padding:4px 11px;font:inherit;font-size:12.5px;color:var(--cortex-color-text-secondary);cursor:pointer}.cortex-tool-pill__action--approve{background:var(--cortex-color-accent);border-color:var(--cortex-color-accent);color:#fff}.cortex-tool-fold{display:block;align-self:flex-start;text-align:start;border:0;background:none;padding:0 0 .25rem;margin-block-start:-.625rem;margin-inline-start:1.125rem;font:inherit;font-size:.75rem;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-tool-fold:hover,.cortex-tool-fold:focus-visible{color:var(--cortex-color-text-secondary)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-location-input{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-location-input--settled{display:flex;gap:10px;border-color:var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-location-input__map{position:relative;block-size:11rem;background:var(--cortex-color-surface-muted)}.cortex-location-input__map--still{flex:none;inline-size:120px;block-size:84px}.cortex-location-input__canvas{block-size:100%}.cortex-location-input__still-failed{display:flex;align-items:center;justify-content:center;block-size:100%;padding:0 8px;font-size:11px;text-align:center;color:var(--cortex-color-text-muted)}.cortex-location-input__locate{position:absolute;inset-inline-end:10px;inset-block-start:10px;z-index:1001;display:inline-flex;align-items:center;justify-content:center;inline-size:30px;block-size:30px;border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 1px 3px #0003;cursor:pointer}.cortex-location-input__locate svg{inline-size:15px;block-size:15px}.cortex-location-input__locate:disabled{opacity:.45;cursor:default}.cortex-location-input__foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-block-start:1px solid var(--cortex-color-border-strong);font-size:12px}.cortex-location-input__hint{display:inline-flex;align-items:center;gap:6px;min-inline-size:0;color:var(--cortex-color-text-muted)}.cortex-location-input__hint--failed{color:var(--cortex-color-danger)}.cortex-location-input__spinner{inline-size:.625rem;block-size:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-location-input__coords{font-family:var(--cortex-font-mono);font-size:.75rem;color:var(--cortex-color-text-secondary);direction:ltr;unicode-bidi:isolate}.cortex-location-input__actions{display:flex;align-items:center;gap:8px}.cortex-location-input__skip{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-location-input__skip:hover{color:var(--cortex-color-danger)}.cortex-location-input__skip:disabled{opacity:.45;cursor:default}.cortex-location-input__send{border:1px solid var(--cortex-color-primary);border-radius:8px;background:var(--cortex-color-primary);padding:4px 10px;font:inherit;font-size:12px;color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-location-input__send:disabled{opacity:.45;cursor:default}.cortex-location-input__body{display:flex;flex-direction:column;justify-content:center;gap:2px;min-inline-size:0;padding-block:8px;padding-inline-end:12px}.cortex-location-input__title{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--cortex-color-text-strong)}.cortex-location-input__title svg{inline-size:13px;block-size:13px;color:var(--cortex-color-success)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__summary{flex-wrap:wrap;max-width:100%;text-align:start}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.cortex-json-tree__indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.cortex-json-tree__line{position:relative}.cortex-json-tree__toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.cortex-json-tree__toggle:hover .cortex-json-tree__arrow{color:var(--cortex-color-text)}.cortex-json-tree__arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.cortex-json-tree__arrow--collapsed{transform:rotate(-90deg)}.cortex-json-tree__bracket{color:var(--cortex-color-text-secondary)}.cortex-json-tree__key{color:light-dark(#6366f1,#818cf8)}.cortex-json-tree__colon{color:var(--cortex-color-text-secondary)}.cortex-json-tree__comma{color:var(--cortex-color-text-muted)}.cortex-json-tree__string{color:var(--cortex-color-success)}.cortex-json-tree__number{color:light-dark(#2563eb,#60a5fa)}.cortex-json-tree__boolean{color:light-dark(#d97706,#fbbf24)}.cortex-json-tree__null{color:var(--cortex-color-text-muted);font-style:italic}.cortex-json-tree__collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.cortex-json-tree__collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important}}\n'],
|
|
11288
|
+
styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-code-surface: light-dark(#e8edf3, #111111);--cortex-color-code-text: light-dark(#334155, #e5e5e5);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer cortex-preflight{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}@media(min-width:769px){.cortex-widget__container--full>.cortex-widget__screen:nth-child(2) .cortex-widget__new-btn{display:none}}.cortex-widget__container--full .cortex-widget__chat-title{font-size:var(--cortex-font-size-header, .875rem)}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__header-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__header-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, var(--cortex-font-size));font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__input-area{width:100%;max-width:26rem;padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}cortex-chat-composer,cortex-message-tool-call-outcome,cortex-llm-usage-chips{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface));transition:border-color .15s,background-color .15s}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea,.cortex-widget__textarea:focus,.cortex-widget__textarea:focus-visible,.cortex-widget__textarea:disabled{background:transparent;border:0;outline:none;box-shadow:none}.cortex-widget__textarea{flex:1;resize:none;font-size:var(--cortex-font-size-message, var(--cortex-font-size));padding:.375rem .5rem;min-height:28px;max-height:calc(5.5 * var(--cortex-font-size-message, var(--cortex-font-size)) + .75rem);overflow-y:auto;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-send-empty, transparent);color:var(--cortex-color-send-empty-text, var(--cortex-color-text-muted))}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, .9375rem);font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;overflow-x:hidden;width:100%;padding:1rem}.cortex-message-list__content{position:relative;display:flex;flex-direction:column;gap:.5rem}.cortex-message-list__content--settling{animation:cortex-content-settle .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-content-settle{0%{translate:0 var(--cortex-slide)}}.cortex-widget__screen>.cortex-send-flight{position:absolute;z-index:2;margin:0;max-width:none;pointer-events:none;animation:cortex-send-fade 80ms linear both,cortex-send-fly .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-send-fade{0%{opacity:0}}@keyframes cortex-send-fly{0%{translate:var(--cortex-fly-x) var(--cortex-fly-y)}}.cortex-working-thinking{padding-inline-start:2rem;--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-working-thinking{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}.cortex-working-avatar{position:absolute;top:0;inset-inline-start:0;z-index:1;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground);translate:0 var(--cortex-avatar-y, 0);visibility:hidden;pointer-events:none}.cortex-working-avatar svg{width:.875rem;height:.875rem}.cortex-working-avatar--shown{visibility:visible;transition:translate .42s cubic-bezier(.76,0,.24,1);animation:cortex-avatar-in .7s cubic-bezier(.16,1,.3,1) both}.cortex-working-avatar--leaving{animation:cortex-avatar-out .36s cubic-bezier(.5,0,.75,0) .12s both}.cortex-working-avatar__ring{position:absolute;inset:-.25rem;border-radius:9999px;border:1.5px solid color-mix(in oklab,var(--cortex-color-accent) 18%,transparent);border-top-color:var(--cortex-color-accent);border-right-color:color-mix(in oklab,var(--cortex-color-accent) 45%,transparent)}.cortex-working-avatar--shown .cortex-working-avatar__ring{animation:cortex-tool-spin 1s linear infinite}.cortex-working-avatar--leaving .cortex-working-avatar__ring{animation:cortex-avatar-ring-out .22s ease-out both}@keyframes cortex-avatar-in{0%{opacity:0;transform:translateY(2.5rem) scale(.7)}}@keyframes cortex-avatar-out{to{opacity:0;transform:scale(.4)}}@keyframes cortex-avatar-ring-out{to{opacity:0}}.cortex-message{min-width:0;transition:margin-block-start .42s cubic-bezier(.76,0,.24,1)}.cortex-message:empty{display:none}.cortex-message:has(.cortex-message-part--folded):not(:has(.cortex-message-part:not(.cortex-message-part--folded))){margin-block-start:-.5rem;transition-delay:.6s}.cortex-text-bubble--assistant,.cortex-subtle-activity,.cortex-tool-pill,.cortex-tool-pill .cortex-tool-pill__icon{transition:translate .42s cubic-bezier(.76,0,.24,1) .16s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity,.cortex-message--working-turn .cortex-tool-pill,.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{transition-delay:0s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity{translate:2rem}[dir=rtl] .cortex-message--working-turn .cortex-text-bubble--assistant,[dir=rtl] .cortex-message--working-turn .cortex-subtle-activity{translate:-2rem}.cortex-message--working-turn .cortex-tool-pill{translate:.875rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill{translate:-.875rem}.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:-.5rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:.5rem}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-actions{display:flex;align-items:center;gap:.375rem;margin-top:-.25rem}.cortex-message-actions--user{justify-content:flex-end}.cortex-message-actions__time{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:0;transition:opacity .15s ease}.cortex-message-actions:not(:has(.cortex-copy-btn)) .cortex-message-actions__time{opacity:1}.cortex-message:hover .cortex-message-actions .cortex-copy-btn__button,.cortex-message:hover .cortex-message-actions .cortex-message-actions__time,.cortex-message-actions:focus-within .cortex-copy-btn__button,.cortex-message-actions:focus-within .cortex-message-actions__time{opacity:1}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr;min-width:0;transition:grid-template-rows .42s cubic-bezier(.76,0,.24,1),margin-block-end .42s cubic-bezier(.76,0,.24,1),opacity .3s ease,visibility 0s,overflow 0s .42s allow-discrete}.cortex-message-part>*{min-height:0}.cortex-message-part:empty{display:none}.cortex-message-part--folded{grid-template-rows:0fr;margin-block-end:-.5rem;opacity:0;overflow:clip;visibility:hidden;transition-delay:.6s,.6s,.6s,1.02s,0s}[data-cortex-frontier] .cortex-tool-pill__spinner{visibility:hidden}[data-cortex-frontier] .cortex-subtle-activity__dots{display:none}.cortex-message-part--animated{--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-message-part--animated{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}@keyframes cortex-part-reveal{0%{opacity:0;transform:translate(var(--cortex-reveal-from));filter:blur(5px);-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-start) 0;mask-position:var(--cortex-reveal-start) 0}40%{opacity:1}to{transform:none;filter:none;-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-end) 0;mask-position:var(--cortex-reveal-end) 0}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;min-width:0;overflow-wrap:anywhere;font-size:var(--cortex-font-size-message, var(--cortex-font-size));line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-code-surface);border-radius:var(--cortex-radius);max-width:100%;overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-code-text)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-stream-fade{animation:cortex-stream-fade .3s ease-out}@keyframes cortex-stream-fade{0%{opacity:0}}.cortex-media-block{margin:.75em 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-media-block__head{display:flex}.cortex-media-block__head[hidden]{display:none}.cortex-media-block__head{align-items:center;justify-content:space-between;gap:.5rem;padding:.25rem .5rem .25rem .75rem;background:var(--cortex-color-surface-subtle);border-bottom:1px solid var(--cortex-color-border);font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-media-block__lang{font-family:var(--cortex-font-mono)}.cortex-media-block__pending{display:inline-flex;align-items:center;gap:.375rem}.cortex-media-block__pending:before{content:"";width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-media-block__actions{display:inline-flex;align-items:center;gap:.125rem}.cortex-media-block__action{background:transparent;border:0;padding:.125rem .375rem;border-radius:calc(var(--cortex-radius) * .5);font:inherit;color:inherit;cursor:pointer}.cortex-media-block__action:hover,.cortex-media-block__action[aria-pressed=true]{background:var(--cortex-color-hover);color:var(--cortex-color-text-strong)}.cortex-media-block__body{padding:.75rem}.cortex-media-block__body[hidden]{display:none}.cortex-media-block__body{min-height:6rem;overflow-x:auto}.cortex-media-block__body svg{display:block;max-width:100%;height:auto}.cortex-media-block__body--map{padding:0;height:18rem}.cortex-media-block__body--map>div{height:100%}.cortex-media-block__error{margin:0;font-size:.8125rem;color:var(--cortex-color-danger)}.cortex-media-block .cortex-media-block__source{margin:0;padding:.75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.5;white-space:pre;overflow-x:auto;color:var(--cortex-color-text)}.cortex-attachment-image{margin:.75em 0}.cortex-attachment-image img{display:block;max-width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border)}.cortex-attachment-image__caption{margin:.25rem 0 0;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-table-block{display:block;margin:.5em 0 .75em}.cortex-table-block th{white-space:nowrap}.cortex-table-block td{max-width:20rem}.cortex-table-block table{margin:0}.cortex-table-block__actions{display:flex;justify-content:flex-end;gap:.125rem;min-height:1.75rem;margin-bottom:.25rem;opacity:0;transition:opacity .15s}.cortex-table-block:hover .cortex-table-block__actions,.cortex-table-block:focus-within .cortex-table-block__actions{opacity:1}@media(hover:none){.cortex-table-block__actions{opacity:1}}.cortex-table-block__action{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;width:1.75rem;height:1.75rem;color:var(--cortex-color-text-muted)}.cortex-table-block__action:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-table-block__dialog{width:min(72rem,100vw - 2rem);max-width:none;max-height:calc(100vh - 2rem);margin:auto;padding:0;border:1px solid var(--cortex-color-border);border-radius:calc(var(--cortex-radius) * 1.5);background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 20px 50px #0003}.cortex-table-block__dialog[open]{display:flex;flex-direction:column}.cortex-table-block__dialog::backdrop{background:#0006}.cortex-table-block__dialog-head{display:flex;justify-content:flex-end;gap:.125rem;padding:.375rem;border-bottom:1px solid var(--cortex-color-border)}.cortex-table-block__dialog-body{overflow:auto;padding:0 1rem}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-trigger-block{display:inline-flex;width:fit-content;padding:.375rem .75rem;border-radius:999px;background:var(--cortex-color-accent-surface);color:var(--cortex-color-text-strong);font-size:.75rem}.cortex-trigger-block__head{display:flex;align-items:center;gap:.5rem}.cortex-trigger-block__icon{flex-shrink:0;color:var(--cortex-color-accent)}.cortex-trigger-block__name{font-family:var(--cortex-font-mono);font-weight:600}.cortex-trigger-block__time{color:var(--cortex-color-text-secondary);font-size:.6875rem}.cortex-trigger-block--debug{display:flex;flex-direction:column;width:auto;gap:.375rem;padding:.5rem .75rem;border:1px dashed var(--cortex-color-border-strong);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.6875rem}.cortex-trigger-block--debug .cortex-trigger-block__head{font-family:var(--cortex-font-mono);letter-spacing:.04em;text-transform:uppercase;color:var(--cortex-color-text-secondary)}.cortex-trigger-block--debug .cortex-trigger-block__name{color:var(--cortex-color-text-strong)}.cortex-trigger-block--debug .cortex-trigger-block__time{margin-inline-start:auto;font-size:inherit;text-transform:none;letter-spacing:0}.cortex-trigger-block__payload{font-size:.75rem}.cortex-trigger-block__payload>summary{cursor:pointer;color:var(--cortex-color-text-secondary);-webkit-user-select:none;user-select:none}.cortex-trigger-block__payload[open]>summary{margin-bottom:.25rem}.cortex-widget__messages-disabled{padding:.75rem 1rem;text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-message-attachments{display:flex;flex-wrap:wrap;gap:.375rem}.cortex-message-attachments--user{justify-content:flex-end}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-debug-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-debug-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.cortex-debug-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.cortex-debug-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.cortex-debug-tool[data-state=awaiting-input],.cortex-debug-tool[data-state=input-streaming],.cortex-debug-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.cortex-debug-tool[data-state=approval-requested],.cortex-debug-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.cortex-debug-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.cortex-debug-tool__summary::-webkit-details-marker{display:none}.cortex-debug-tool__header{display:flex;align-items:flex-start;gap:.75rem}.cortex-debug-tool__meta{flex:1;min-width:0}.cortex-debug-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-debug-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.cortex-debug-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.cortex-debug-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.cortex-debug-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.cortex-debug-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.cortex-debug-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.cortex-debug-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.cortex-debug-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.cortex-debug-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.cortex-debug-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .cortex-debug-tool__chevron{transform:rotate(180deg)}.cortex-debug-tool__body{padding:0 .875rem .75rem 1.125rem}.cortex-debug-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.cortex-debug-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-debug-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__section-label--success{color:var(--cortex-color-success)}.cortex-debug-tool__section-label--error{color:var(--cortex-color-danger)}.cortex-debug-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.cortex-debug-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.cortex-debug-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.cortex-debug-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.cortex-debug-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.cortex-debug-tool__section--success .cortex-debug-tool__tree{background:light-dark(#f0fdf4,#052e16)}.cortex-debug-tool__section--error .cortex-debug-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--cortex-color-text-muted)}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title--pending{color:var(--cortex-color-text-muted);opacity:.6}.cortex-tool-pill__meta{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:.8;white-space:nowrap;font-variant-numeric:tabular-nums}.cortex-approval-card{display:block;max-width:min(100%,28rem);margin:.25rem 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-approval-card--asking{border-color:color-mix(in oklab,var(--cortex-color-accent) 45%,var(--cortex-color-border));box-shadow:0 0 0 3px color-mix(in oklab,var(--cortex-color-accent) 10%,transparent)}.cortex-approval-card__head{display:flex;align-items:center;gap:.5rem;padding:.625rem .75rem 0;font-size:.75rem;font-weight:600;color:var(--cortex-color-accent)}.cortex-approval-card__sentence{margin:0;padding:.375rem .75rem .5rem;font-weight:600;color:var(--cortex-color-text-heading)}.cortex-approval-card__sentence--full{padding-top:0;font-weight:400;color:var(--cortex-color-text-strong)}.cortex-approval-card__rows{display:grid;grid-template-columns:fit-content(40%) minmax(0,1fr);gap:.1875rem .75rem;margin:0;padding:0 .75rem .75rem;font-size:.78125rem}.cortex-approval-card__rows dt{color:var(--cortex-color-text-secondary);overflow-wrap:anywhere}.cortex-approval-card__rows dd{max-height:6rem;margin:0;overflow-y:auto;white-space:pre-wrap;color:var(--cortex-color-text-strong);overflow-wrap:anywhere}.cortex-approval-card__foot{display:flex;gap:.5rem;padding:.625rem .75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-approval-card__button{border:1px solid var(--cortex-color-border-strong);border-radius:calc(var(--cortex-radius) * .75);background:var(--cortex-color-surface);padding:.375rem .875rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--cortex-color-text-strong);cursor:pointer}.cortex-approval-card__button--approve{border-color:var(--cortex-color-accent);background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground)}.cortex-approval-card__line{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:.8125rem;color:var(--cortex-color-text-secondary)}.cortex-approval-card__line .cortex-tool-pill__icon{flex-shrink:0}.cortex-approval-card__decision{font-weight:600;color:var(--cortex-color-text-strong)}.cortex-approval-card__summary{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-approval-card__details{flex-shrink:0;border:0;background:none;padding:0;font:inherit;font-size:.75rem;color:var(--cortex-color-text-secondary);text-decoration:underline;text-underline-offset:2px;cursor:pointer}.cortex-tool-fold{display:block;align-self:flex-start;text-align:start;border:0;background:none;padding:0 0 .25rem;margin-block-start:-.625rem;margin-inline-start:1.125rem;font:inherit;font-size:.75rem;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-tool-fold:hover,.cortex-tool-fold:focus-visible{color:var(--cortex-color-text-secondary)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-location-input{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-location-input--settled{display:flex;gap:10px;border-color:var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-location-input__map{position:relative;block-size:11rem;background:var(--cortex-color-surface-muted)}.cortex-location-input__map--still{flex:none;inline-size:120px;block-size:84px}.cortex-location-input__canvas{block-size:100%}.cortex-location-input__still-failed{display:flex;align-items:center;justify-content:center;block-size:100%;padding:0 8px;font-size:11px;text-align:center;color:var(--cortex-color-text-muted)}.cortex-location-input__locate{position:absolute;inset-inline-end:10px;inset-block-start:10px;z-index:1001;display:inline-flex;align-items:center;justify-content:center;inline-size:30px;block-size:30px;border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 1px 3px #0003;cursor:pointer}.cortex-location-input__locate svg{inline-size:15px;block-size:15px}.cortex-location-input__locate:disabled{opacity:.45;cursor:default}.cortex-location-input__foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-block-start:1px solid var(--cortex-color-border-strong);font-size:12px}.cortex-location-input__hint{display:inline-flex;align-items:center;gap:6px;min-inline-size:0;color:var(--cortex-color-text-muted)}.cortex-location-input__hint--failed{color:var(--cortex-color-danger)}.cortex-location-input__spinner{inline-size:.625rem;block-size:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-location-input__coords{font-family:var(--cortex-font-mono);font-size:.75rem;color:var(--cortex-color-text-secondary);direction:ltr;unicode-bidi:isolate}.cortex-location-input__actions{display:flex;align-items:center;gap:8px}.cortex-location-input__skip{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-location-input__skip:hover{color:var(--cortex-color-danger)}.cortex-location-input__skip:disabled{opacity:.45;cursor:default}.cortex-location-input__send{border:1px solid var(--cortex-color-primary);border-radius:8px;background:var(--cortex-color-primary);padding:4px 10px;font:inherit;font-size:12px;color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-location-input__send:disabled{opacity:.45;cursor:default}.cortex-location-input__body{display:flex;flex-direction:column;justify-content:center;gap:2px;min-inline-size:0;padding-block:8px;padding-inline-end:12px}.cortex-location-input__title{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--cortex-color-text-strong)}.cortex-location-input__title svg{inline-size:13px;block-size:13px;color:var(--cortex-color-success)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__summary{flex-wrap:wrap;max-width:100%;text-align:start}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.cortex-json-tree__indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.cortex-json-tree__line{position:relative}.cortex-json-tree__toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.cortex-json-tree__toggle:hover .cortex-json-tree__arrow{color:var(--cortex-color-text)}.cortex-json-tree__arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.cortex-json-tree__arrow--collapsed{transform:rotate(-90deg)}.cortex-json-tree__bracket{color:var(--cortex-color-text-secondary)}.cortex-json-tree__key{color:light-dark(#6366f1,#818cf8)}.cortex-json-tree__colon{color:var(--cortex-color-text-secondary)}.cortex-json-tree__comma{color:var(--cortex-color-text-muted)}.cortex-json-tree__string{color:var(--cortex-color-success)}.cortex-json-tree__number{color:light-dark(#2563eb,#60a5fa)}.cortex-json-tree__boolean{color:light-dark(#d97706,#fbbf24)}.cortex-json-tree__null{color:var(--cortex-color-text-muted);font-style:italic}.cortex-json-tree__collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.cortex-json-tree__collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important}}\n'],
|
|
10378
11289
|
dependencies: [
|
|
10379
11290
|
{
|
|
10380
11291
|
kind: "component",
|
|
@@ -10389,7 +11300,8 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
10389
11300
|
outputs: [
|
|
10390
11301
|
"toggleSidebar",
|
|
10391
11302
|
"toggleDebug",
|
|
10392
|
-
"openHistory"
|
|
11303
|
+
"openHistory",
|
|
11304
|
+
"newChat"
|
|
10393
11305
|
]
|
|
10394
11306
|
},
|
|
10395
11307
|
{
|
|
@@ -10409,10 +11321,21 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
10409
11321
|
type: MessagesSkeletonComponent,
|
|
10410
11322
|
selector: "cortex-messages-skeleton"
|
|
10411
11323
|
},
|
|
11324
|
+
{
|
|
11325
|
+
kind: "directive",
|
|
11326
|
+
type: NgTemplateOutlet,
|
|
11327
|
+
selector: "[ngTemplateOutlet]",
|
|
11328
|
+
inputs: [
|
|
11329
|
+
"ngTemplateOutletContext",
|
|
11330
|
+
"ngTemplateOutlet",
|
|
11331
|
+
"ngTemplateOutletInjector"
|
|
11332
|
+
]
|
|
11333
|
+
},
|
|
10412
11334
|
{
|
|
10413
11335
|
kind: "component",
|
|
10414
11336
|
type: ThreadListComponent,
|
|
10415
11337
|
selector: "cortex-thread-list",
|
|
11338
|
+
inputs: ["showHeader"],
|
|
10416
11339
|
outputs: [
|
|
10417
11340
|
"threadSelected",
|
|
10418
11341
|
"newChatRequested",
|
|
@@ -10444,6 +11367,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10444
11367
|
ChatLandingComponent,
|
|
10445
11368
|
MessageListComponent,
|
|
10446
11369
|
MessagesSkeletonComponent,
|
|
11370
|
+
NgTemplateOutlet,
|
|
10447
11371
|
ThreadListComponent,
|
|
10448
11372
|
TranslatePipe
|
|
10449
11373
|
],
|
|
@@ -10478,19 +11402,29 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10478
11402
|
(threadSelected)="selectThread($event)"
|
|
10479
11403
|
(newChatRequested)="newChat()"
|
|
10480
11404
|
(backRequested)="closeHistory()"
|
|
10481
|
-
|
|
11405
|
+
[showHeader]="!customHeader()"
|
|
11406
|
+
>
|
|
11407
|
+
@if (customHeader(); as header) {
|
|
11408
|
+
<ng-container *ngTemplateOutlet="header.template; context: { $implicit: threadsHeader() }" />
|
|
11409
|
+
}
|
|
11410
|
+
</cortex-thread-list>
|
|
10482
11411
|
|
|
10483
11412
|
<div
|
|
10484
11413
|
class="cortex-widget__screen"
|
|
10485
11414
|
[class.cortex-widget__screen--active]="screen() === 'chat'"
|
|
10486
11415
|
[class.cortex-widget__screen--right]="screen() !== 'chat'"
|
|
10487
11416
|
>
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
11417
|
+
@if (customHeader(); as header) {
|
|
11418
|
+
<ng-container *ngTemplateOutlet="header.template; context: { $implicit: chatHeader() }" />
|
|
11419
|
+
} @else {
|
|
11420
|
+
<cortex-chat-header
|
|
11421
|
+
[debugMode]="debugMode()"
|
|
11422
|
+
(toggleSidebar)="toggleSidebar()"
|
|
11423
|
+
(toggleDebug)="toggleDebugMode()"
|
|
11424
|
+
(openHistory)="openHistory()"
|
|
11425
|
+
(newChat)="newChat()"
|
|
11426
|
+
/>
|
|
11427
|
+
}
|
|
10494
11428
|
|
|
10495
11429
|
<!-- Blank-chat landing; the first send creates the thread, which swaps
|
|
10496
11430
|
this for the message list. -->
|
|
@@ -10522,7 +11456,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10522
11456
|
<div class="cortex-widget__sidebar-backdrop" (click)="closeSidebar()"></div>
|
|
10523
11457
|
</div>
|
|
10524
11458
|
`,
|
|
10525
|
-
styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-code-surface: light-dark(#e8edf3, #111111);--cortex-color-code-text: light-dark(#334155, #e5e5e5);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer cortex-preflight{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}.cortex-widget__container--full .cortex-widget__chat-title{font-size:.875rem}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__back-btn,.cortex-widget__history-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__back-btn:hover,.cortex-widget__history-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__input-area{width:100%;max-width:26rem;padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}cortex-chat-composer,cortex-message-tool-call-outcome,cortex-llm-usage-chips{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;transition:border-color .15s,background-color .15s}.cortex-widget__input-box--disabled{background:var(--cortex-color-surface-muted)}.cortex-widget__input-box--enabled{background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface))}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea{flex:1;background:transparent;resize:none;border:0;outline:none;font-size:var(--cortex-font-size);padding:.375rem .5rem;min-height:28px;max-height:calc(5.5 * var(--cortex-font-size) + .75rem);overflow-y:auto;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed;border:0}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-border);color:var(--cortex-color-text-muted)}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-chat-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:.9375rem;font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;overflow-x:hidden;width:100%;padding:1rem}.cortex-message-list__content{position:relative;display:flex;flex-direction:column;gap:.5rem}.cortex-message-list__content--settling{animation:cortex-content-settle .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-content-settle{0%{translate:0 var(--cortex-slide)}}.cortex-widget__screen>.cortex-send-flight{position:absolute;z-index:2;margin:0;max-width:none;pointer-events:none;animation:cortex-send-fade 80ms linear both,cortex-send-fly .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-send-fade{0%{opacity:0}}@keyframes cortex-send-fly{0%{translate:var(--cortex-fly-x) var(--cortex-fly-y)}}.cortex-working-thinking{padding-inline-start:2rem;--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-working-thinking{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}.cortex-working-avatar{position:absolute;top:0;inset-inline-start:0;z-index:1;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground);translate:0 var(--cortex-avatar-y, 0);visibility:hidden;pointer-events:none}.cortex-working-avatar svg{width:.875rem;height:.875rem}.cortex-working-avatar--shown{visibility:visible;transition:translate .42s cubic-bezier(.76,0,.24,1);animation:cortex-avatar-in .7s cubic-bezier(.16,1,.3,1) both}.cortex-working-avatar--leaving{animation:cortex-avatar-out .36s cubic-bezier(.5,0,.75,0) .12s both}.cortex-working-avatar__ring{position:absolute;inset:-.25rem;border-radius:9999px;border:1.5px solid transparent;border-top-color:var(--cortex-color-accent);border-right-color:color-mix(in oklab,var(--cortex-color-accent) 40%,transparent)}.cortex-working-avatar--shown .cortex-working-avatar__ring{animation:cortex-tool-spin 1s linear infinite}.cortex-working-avatar--leaving .cortex-working-avatar__ring{animation:cortex-avatar-ring-out .22s ease-out both}@keyframes cortex-avatar-in{0%{opacity:0;transform:translateY(2.5rem) scale(.7)}}@keyframes cortex-avatar-out{to{opacity:0;transform:scale(.4)}}@keyframes cortex-avatar-ring-out{to{opacity:0}}.cortex-message{min-width:0;transition:margin-block-start .42s cubic-bezier(.76,0,.24,1)}.cortex-message:empty{display:none}.cortex-message:has(.cortex-message-part--folded):not(:has(.cortex-message-part:not(.cortex-message-part--folded))){margin-block-start:-.5rem;transition-delay:.6s}.cortex-text-bubble--assistant,.cortex-subtle-activity,.cortex-tool-pill:not(.cortex-tool-pill--gated),.cortex-tool-pill:not(.cortex-tool-pill--gated) .cortex-tool-pill__icon{transition:translate .42s cubic-bezier(.76,0,.24,1) .16s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity,.cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated),.cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated) .cortex-tool-pill__icon{transition-delay:0s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity{translate:2rem}[dir=rtl] .cortex-message--working-turn .cortex-text-bubble--assistant,[dir=rtl] .cortex-message--working-turn .cortex-subtle-activity{translate:-2rem}.cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated){translate:.875rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated){translate:-.875rem}.cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated) .cortex-tool-pill__icon{translate:-.5rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill:not(.cortex-tool-pill--gated) .cortex-tool-pill__icon{translate:.5rem}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-actions{display:flex;align-items:center;gap:.375rem;margin-top:-.25rem}.cortex-message-actions--user{justify-content:flex-end}.cortex-message-actions__time{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:0;transition:opacity .15s ease}.cortex-message-actions:not(:has(.cortex-copy-btn)) .cortex-message-actions__time{opacity:1}.cortex-message:hover .cortex-message-actions .cortex-copy-btn__button,.cortex-message:hover .cortex-message-actions .cortex-message-actions__time,.cortex-message-actions:focus-within .cortex-copy-btn__button,.cortex-message-actions:focus-within .cortex-message-actions__time{opacity:1}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr;min-width:0;transition:grid-template-rows .42s cubic-bezier(.76,0,.24,1),margin-block-end .42s cubic-bezier(.76,0,.24,1),opacity .3s ease,visibility 0s,overflow 0s .42s allow-discrete}.cortex-message-part>*{min-height:0}.cortex-message-part:empty{display:none}.cortex-message-part--folded{grid-template-rows:0fr;margin-block-end:-.5rem;opacity:0;overflow:clip;visibility:hidden;transition-delay:.6s,.6s,.6s,1.02s,0s}[data-cortex-frontier] .cortex-tool-pill__spinner{visibility:hidden}[data-cortex-frontier] .cortex-subtle-activity__dots{display:none}.cortex-message-part--animated{--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-message-part--animated{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}@keyframes cortex-part-reveal{0%{opacity:0;transform:translate(var(--cortex-reveal-from));filter:blur(5px);-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-start) 0;mask-position:var(--cortex-reveal-start) 0}40%{opacity:1}to{transform:none;filter:none;-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-end) 0;mask-position:var(--cortex-reveal-end) 0}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;min-width:0;overflow-wrap:anywhere;font-size:var(--cortex-font-size);line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-code-surface);border-radius:var(--cortex-radius);max-width:100%;overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-code-text)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-stream-fade{animation:cortex-stream-fade .3s ease-out}@keyframes cortex-stream-fade{0%{opacity:0}}.cortex-media-block{margin:.75em 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-media-block__head{display:flex}.cortex-media-block__head[hidden]{display:none}.cortex-media-block__head{align-items:center;justify-content:space-between;gap:.5rem;padding:.25rem .5rem .25rem .75rem;background:var(--cortex-color-surface-subtle);border-bottom:1px solid var(--cortex-color-border);font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-media-block__lang{font-family:var(--cortex-font-mono)}.cortex-media-block__pending{display:inline-flex;align-items:center;gap:.375rem}.cortex-media-block__pending:before{content:"";width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-media-block__actions{display:inline-flex;align-items:center;gap:.125rem}.cortex-media-block__action{background:transparent;border:0;padding:.125rem .375rem;border-radius:calc(var(--cortex-radius) * .5);font:inherit;color:inherit;cursor:pointer}.cortex-media-block__action:hover,.cortex-media-block__action[aria-pressed=true]{background:var(--cortex-color-hover);color:var(--cortex-color-text-strong)}.cortex-media-block__body{padding:.75rem}.cortex-media-block__body[hidden]{display:none}.cortex-media-block__body{min-height:6rem;overflow-x:auto}.cortex-media-block__body svg{display:block;max-width:100%;height:auto}.cortex-media-block__body--map{padding:0;height:18rem}.cortex-media-block__body--map>div{height:100%}.cortex-media-block__error{margin:0;font-size:.8125rem;color:var(--cortex-color-danger)}.cortex-media-block .cortex-media-block__source{margin:0;padding:.75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.5;white-space:pre;overflow-x:auto;color:var(--cortex-color-text)}.cortex-attachment-image{margin:.75em 0}.cortex-attachment-image img{display:block;max-width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border)}.cortex-attachment-image__caption{margin:.25rem 0 0;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-trigger-block{display:inline-flex;width:fit-content;padding:.375rem .75rem;border-radius:999px;background:var(--cortex-color-accent-surface);color:var(--cortex-color-text-strong);font-size:.75rem}.cortex-trigger-block__head{display:flex;align-items:center;gap:.5rem}.cortex-trigger-block__icon{flex-shrink:0;color:var(--cortex-color-accent)}.cortex-trigger-block__name{font-family:var(--cortex-font-mono);font-weight:600}.cortex-trigger-block__time{color:var(--cortex-color-text-secondary);font-size:.6875rem}.cortex-trigger-block--debug{display:flex;flex-direction:column;width:auto;gap:.375rem;padding:.5rem .75rem;border:1px dashed var(--cortex-color-border-strong);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.6875rem}.cortex-trigger-block--debug .cortex-trigger-block__head{font-family:var(--cortex-font-mono);letter-spacing:.04em;text-transform:uppercase;color:var(--cortex-color-text-secondary)}.cortex-trigger-block--debug .cortex-trigger-block__name{color:var(--cortex-color-text-strong)}.cortex-trigger-block--debug .cortex-trigger-block__time{margin-inline-start:auto;font-size:inherit;text-transform:none;letter-spacing:0}.cortex-trigger-block__payload{font-size:.75rem}.cortex-trigger-block__payload>summary{cursor:pointer;color:var(--cortex-color-text-secondary);-webkit-user-select:none;user-select:none}.cortex-trigger-block__payload[open]>summary{margin-bottom:.25rem}.cortex-widget__messages-disabled{padding:.75rem 1rem;text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-message-attachments{display:flex;flex-wrap:wrap;gap:.375rem}.cortex-message-attachments--user{justify-content:flex-end}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-debug-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-debug-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.cortex-debug-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.cortex-debug-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.cortex-debug-tool[data-state=awaiting-input],.cortex-debug-tool[data-state=input-streaming],.cortex-debug-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.cortex-debug-tool[data-state=approval-requested],.cortex-debug-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.cortex-debug-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.cortex-debug-tool__summary::-webkit-details-marker{display:none}.cortex-debug-tool__header{display:flex;align-items:flex-start;gap:.75rem}.cortex-debug-tool__meta{flex:1;min-width:0}.cortex-debug-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-debug-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.cortex-debug-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.cortex-debug-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.cortex-debug-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.cortex-debug-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.cortex-debug-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.cortex-debug-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.cortex-debug-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.cortex-debug-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.cortex-debug-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .cortex-debug-tool__chevron{transform:rotate(180deg)}.cortex-debug-tool__body{padding:0 .875rem .75rem 1.125rem}.cortex-debug-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.cortex-debug-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-debug-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__section-label--success{color:var(--cortex-color-success)}.cortex-debug-tool__section-label--error{color:var(--cortex-color-danger)}.cortex-debug-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.cortex-debug-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.cortex-debug-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.cortex-debug-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.cortex-debug-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.cortex-debug-tool__section--success .cortex-debug-tool__tree{background:light-dark(#f0fdf4,#052e16)}.cortex-debug-tool__section--error .cortex-debug-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--cortex-color-text-muted)}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title--pending{color:var(--cortex-color-text-muted);opacity:.6}.cortex-tool-pill__meta{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:.8;white-space:nowrap;font-variant-numeric:tabular-nums}.cortex-tool-pill--gated{border:1px solid var(--cortex-color-border);border-radius:9999px;background:var(--cortex-color-surface-subtle);padding:.3rem .75rem .3rem .65rem;gap:.6rem}.cortex-tool-pill--asking{padding-inline-end:.3rem;flex-wrap:wrap}.cortex-tool-pill__dot{width:.5rem;height:.5rem;border-radius:9999px;background:var(--cortex-color-accent)}.cortex-tool-pill--gated .cortex-tool-pill__title{color:var(--cortex-color-text-heading);white-space:normal}.cortex-tool-pill__actions{display:flex;gap:.3rem;margin-inline-start:.25rem}.cortex-tool-pill__action{border:1px solid var(--cortex-color-border-strong);border-radius:9999px;background:none;padding:4px 11px;font:inherit;font-size:12.5px;color:var(--cortex-color-text-secondary);cursor:pointer}.cortex-tool-pill__action--approve{background:var(--cortex-color-accent);border-color:var(--cortex-color-accent);color:#fff}.cortex-tool-fold{display:block;align-self:flex-start;text-align:start;border:0;background:none;padding:0 0 .25rem;margin-block-start:-.625rem;margin-inline-start:1.125rem;font:inherit;font-size:.75rem;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-tool-fold:hover,.cortex-tool-fold:focus-visible{color:var(--cortex-color-text-secondary)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-location-input{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-location-input--settled{display:flex;gap:10px;border-color:var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-location-input__map{position:relative;block-size:11rem;background:var(--cortex-color-surface-muted)}.cortex-location-input__map--still{flex:none;inline-size:120px;block-size:84px}.cortex-location-input__canvas{block-size:100%}.cortex-location-input__still-failed{display:flex;align-items:center;justify-content:center;block-size:100%;padding:0 8px;font-size:11px;text-align:center;color:var(--cortex-color-text-muted)}.cortex-location-input__locate{position:absolute;inset-inline-end:10px;inset-block-start:10px;z-index:1001;display:inline-flex;align-items:center;justify-content:center;inline-size:30px;block-size:30px;border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 1px 3px #0003;cursor:pointer}.cortex-location-input__locate svg{inline-size:15px;block-size:15px}.cortex-location-input__locate:disabled{opacity:.45;cursor:default}.cortex-location-input__foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-block-start:1px solid var(--cortex-color-border-strong);font-size:12px}.cortex-location-input__hint{display:inline-flex;align-items:center;gap:6px;min-inline-size:0;color:var(--cortex-color-text-muted)}.cortex-location-input__hint--failed{color:var(--cortex-color-danger)}.cortex-location-input__spinner{inline-size:.625rem;block-size:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-location-input__coords{font-family:var(--cortex-font-mono);font-size:.75rem;color:var(--cortex-color-text-secondary);direction:ltr;unicode-bidi:isolate}.cortex-location-input__actions{display:flex;align-items:center;gap:8px}.cortex-location-input__skip{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-location-input__skip:hover{color:var(--cortex-color-danger)}.cortex-location-input__skip:disabled{opacity:.45;cursor:default}.cortex-location-input__send{border:1px solid var(--cortex-color-primary);border-radius:8px;background:var(--cortex-color-primary);padding:4px 10px;font:inherit;font-size:12px;color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-location-input__send:disabled{opacity:.45;cursor:default}.cortex-location-input__body{display:flex;flex-direction:column;justify-content:center;gap:2px;min-inline-size:0;padding-block:8px;padding-inline-end:12px}.cortex-location-input__title{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--cortex-color-text-strong)}.cortex-location-input__title svg{inline-size:13px;block-size:13px;color:var(--cortex-color-success)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__summary{flex-wrap:wrap;max-width:100%;text-align:start}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.cortex-json-tree__indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.cortex-json-tree__line{position:relative}.cortex-json-tree__toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.cortex-json-tree__toggle:hover .cortex-json-tree__arrow{color:var(--cortex-color-text)}.cortex-json-tree__arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.cortex-json-tree__arrow--collapsed{transform:rotate(-90deg)}.cortex-json-tree__bracket{color:var(--cortex-color-text-secondary)}.cortex-json-tree__key{color:light-dark(#6366f1,#818cf8)}.cortex-json-tree__colon{color:var(--cortex-color-text-secondary)}.cortex-json-tree__comma{color:var(--cortex-color-text-muted)}.cortex-json-tree__string{color:var(--cortex-color-success)}.cortex-json-tree__number{color:light-dark(#2563eb,#60a5fa)}.cortex-json-tree__boolean{color:light-dark(#d97706,#fbbf24)}.cortex-json-tree__null{color:var(--cortex-color-text-muted);font-style:italic}.cortex-json-tree__collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.cortex-json-tree__collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important}}\n']
|
|
11459
|
+
styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-code-surface: light-dark(#e8edf3, #111111);--cortex-color-code-text: light-dark(#334155, #e5e5e5);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer cortex-preflight{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}@media(min-width:769px){.cortex-widget__container--full>.cortex-widget__screen:nth-child(2) .cortex-widget__new-btn{display:none}}.cortex-widget__container--full .cortex-widget__chat-title{font-size:var(--cortex-font-size-header, .875rem)}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__header-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__header-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, var(--cortex-font-size));font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__input-area{width:100%;max-width:26rem;padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}cortex-chat-composer,cortex-message-tool-call-outcome,cortex-llm-usage-chips{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface));transition:border-color .15s,background-color .15s}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea,.cortex-widget__textarea:focus,.cortex-widget__textarea:focus-visible,.cortex-widget__textarea:disabled{background:transparent;border:0;outline:none;box-shadow:none}.cortex-widget__textarea{flex:1;resize:none;font-size:var(--cortex-font-size-message, var(--cortex-font-size));padding:.375rem .5rem;min-height:28px;max-height:calc(5.5 * var(--cortex-font-size-message, var(--cortex-font-size)) + .75rem);overflow-y:auto;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-send-empty, transparent);color:var(--cortex-color-send-empty-text, var(--cortex-color-text-muted))}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, .9375rem);font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;overflow-x:hidden;width:100%;padding:1rem}.cortex-message-list__content{position:relative;display:flex;flex-direction:column;gap:.5rem}.cortex-message-list__content--settling{animation:cortex-content-settle .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-content-settle{0%{translate:0 var(--cortex-slide)}}.cortex-widget__screen>.cortex-send-flight{position:absolute;z-index:2;margin:0;max-width:none;pointer-events:none;animation:cortex-send-fade 80ms linear both,cortex-send-fly .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-send-fade{0%{opacity:0}}@keyframes cortex-send-fly{0%{translate:var(--cortex-fly-x) var(--cortex-fly-y)}}.cortex-working-thinking{padding-inline-start:2rem;--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-working-thinking{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}.cortex-working-avatar{position:absolute;top:0;inset-inline-start:0;z-index:1;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground);translate:0 var(--cortex-avatar-y, 0);visibility:hidden;pointer-events:none}.cortex-working-avatar svg{width:.875rem;height:.875rem}.cortex-working-avatar--shown{visibility:visible;transition:translate .42s cubic-bezier(.76,0,.24,1);animation:cortex-avatar-in .7s cubic-bezier(.16,1,.3,1) both}.cortex-working-avatar--leaving{animation:cortex-avatar-out .36s cubic-bezier(.5,0,.75,0) .12s both}.cortex-working-avatar__ring{position:absolute;inset:-.25rem;border-radius:9999px;border:1.5px solid color-mix(in oklab,var(--cortex-color-accent) 18%,transparent);border-top-color:var(--cortex-color-accent);border-right-color:color-mix(in oklab,var(--cortex-color-accent) 45%,transparent)}.cortex-working-avatar--shown .cortex-working-avatar__ring{animation:cortex-tool-spin 1s linear infinite}.cortex-working-avatar--leaving .cortex-working-avatar__ring{animation:cortex-avatar-ring-out .22s ease-out both}@keyframes cortex-avatar-in{0%{opacity:0;transform:translateY(2.5rem) scale(.7)}}@keyframes cortex-avatar-out{to{opacity:0;transform:scale(.4)}}@keyframes cortex-avatar-ring-out{to{opacity:0}}.cortex-message{min-width:0;transition:margin-block-start .42s cubic-bezier(.76,0,.24,1)}.cortex-message:empty{display:none}.cortex-message:has(.cortex-message-part--folded):not(:has(.cortex-message-part:not(.cortex-message-part--folded))){margin-block-start:-.5rem;transition-delay:.6s}.cortex-text-bubble--assistant,.cortex-subtle-activity,.cortex-tool-pill,.cortex-tool-pill .cortex-tool-pill__icon{transition:translate .42s cubic-bezier(.76,0,.24,1) .16s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity,.cortex-message--working-turn .cortex-tool-pill,.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{transition-delay:0s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity{translate:2rem}[dir=rtl] .cortex-message--working-turn .cortex-text-bubble--assistant,[dir=rtl] .cortex-message--working-turn .cortex-subtle-activity{translate:-2rem}.cortex-message--working-turn .cortex-tool-pill{translate:.875rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill{translate:-.875rem}.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:-.5rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:.5rem}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-actions{display:flex;align-items:center;gap:.375rem;margin-top:-.25rem}.cortex-message-actions--user{justify-content:flex-end}.cortex-message-actions__time{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:0;transition:opacity .15s ease}.cortex-message-actions:not(:has(.cortex-copy-btn)) .cortex-message-actions__time{opacity:1}.cortex-message:hover .cortex-message-actions .cortex-copy-btn__button,.cortex-message:hover .cortex-message-actions .cortex-message-actions__time,.cortex-message-actions:focus-within .cortex-copy-btn__button,.cortex-message-actions:focus-within .cortex-message-actions__time{opacity:1}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr;min-width:0;transition:grid-template-rows .42s cubic-bezier(.76,0,.24,1),margin-block-end .42s cubic-bezier(.76,0,.24,1),opacity .3s ease,visibility 0s,overflow 0s .42s allow-discrete}.cortex-message-part>*{min-height:0}.cortex-message-part:empty{display:none}.cortex-message-part--folded{grid-template-rows:0fr;margin-block-end:-.5rem;opacity:0;overflow:clip;visibility:hidden;transition-delay:.6s,.6s,.6s,1.02s,0s}[data-cortex-frontier] .cortex-tool-pill__spinner{visibility:hidden}[data-cortex-frontier] .cortex-subtle-activity__dots{display:none}.cortex-message-part--animated{--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-message-part--animated{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}@keyframes cortex-part-reveal{0%{opacity:0;transform:translate(var(--cortex-reveal-from));filter:blur(5px);-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-start) 0;mask-position:var(--cortex-reveal-start) 0}40%{opacity:1}to{transform:none;filter:none;-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-end) 0;mask-position:var(--cortex-reveal-end) 0}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;min-width:0;overflow-wrap:anywhere;font-size:var(--cortex-font-size-message, var(--cortex-font-size));line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-code-surface);border-radius:var(--cortex-radius);max-width:100%;overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-code-text)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-stream-fade{animation:cortex-stream-fade .3s ease-out}@keyframes cortex-stream-fade{0%{opacity:0}}.cortex-media-block{margin:.75em 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-media-block__head{display:flex}.cortex-media-block__head[hidden]{display:none}.cortex-media-block__head{align-items:center;justify-content:space-between;gap:.5rem;padding:.25rem .5rem .25rem .75rem;background:var(--cortex-color-surface-subtle);border-bottom:1px solid var(--cortex-color-border);font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-media-block__lang{font-family:var(--cortex-font-mono)}.cortex-media-block__pending{display:inline-flex;align-items:center;gap:.375rem}.cortex-media-block__pending:before{content:"";width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-media-block__actions{display:inline-flex;align-items:center;gap:.125rem}.cortex-media-block__action{background:transparent;border:0;padding:.125rem .375rem;border-radius:calc(var(--cortex-radius) * .5);font:inherit;color:inherit;cursor:pointer}.cortex-media-block__action:hover,.cortex-media-block__action[aria-pressed=true]{background:var(--cortex-color-hover);color:var(--cortex-color-text-strong)}.cortex-media-block__body{padding:.75rem}.cortex-media-block__body[hidden]{display:none}.cortex-media-block__body{min-height:6rem;overflow-x:auto}.cortex-media-block__body svg{display:block;max-width:100%;height:auto}.cortex-media-block__body--map{padding:0;height:18rem}.cortex-media-block__body--map>div{height:100%}.cortex-media-block__error{margin:0;font-size:.8125rem;color:var(--cortex-color-danger)}.cortex-media-block .cortex-media-block__source{margin:0;padding:.75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.5;white-space:pre;overflow-x:auto;color:var(--cortex-color-text)}.cortex-attachment-image{margin:.75em 0}.cortex-attachment-image img{display:block;max-width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border)}.cortex-attachment-image__caption{margin:.25rem 0 0;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-table-block{display:block;margin:.5em 0 .75em}.cortex-table-block th{white-space:nowrap}.cortex-table-block td{max-width:20rem}.cortex-table-block table{margin:0}.cortex-table-block__actions{display:flex;justify-content:flex-end;gap:.125rem;min-height:1.75rem;margin-bottom:.25rem;opacity:0;transition:opacity .15s}.cortex-table-block:hover .cortex-table-block__actions,.cortex-table-block:focus-within .cortex-table-block__actions{opacity:1}@media(hover:none){.cortex-table-block__actions{opacity:1}}.cortex-table-block__action{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;width:1.75rem;height:1.75rem;color:var(--cortex-color-text-muted)}.cortex-table-block__action:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-table-block__dialog{width:min(72rem,100vw - 2rem);max-width:none;max-height:calc(100vh - 2rem);margin:auto;padding:0;border:1px solid var(--cortex-color-border);border-radius:calc(var(--cortex-radius) * 1.5);background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 20px 50px #0003}.cortex-table-block__dialog[open]{display:flex;flex-direction:column}.cortex-table-block__dialog::backdrop{background:#0006}.cortex-table-block__dialog-head{display:flex;justify-content:flex-end;gap:.125rem;padding:.375rem;border-bottom:1px solid var(--cortex-color-border)}.cortex-table-block__dialog-body{overflow:auto;padding:0 1rem}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-trigger-block{display:inline-flex;width:fit-content;padding:.375rem .75rem;border-radius:999px;background:var(--cortex-color-accent-surface);color:var(--cortex-color-text-strong);font-size:.75rem}.cortex-trigger-block__head{display:flex;align-items:center;gap:.5rem}.cortex-trigger-block__icon{flex-shrink:0;color:var(--cortex-color-accent)}.cortex-trigger-block__name{font-family:var(--cortex-font-mono);font-weight:600}.cortex-trigger-block__time{color:var(--cortex-color-text-secondary);font-size:.6875rem}.cortex-trigger-block--debug{display:flex;flex-direction:column;width:auto;gap:.375rem;padding:.5rem .75rem;border:1px dashed var(--cortex-color-border-strong);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.6875rem}.cortex-trigger-block--debug .cortex-trigger-block__head{font-family:var(--cortex-font-mono);letter-spacing:.04em;text-transform:uppercase;color:var(--cortex-color-text-secondary)}.cortex-trigger-block--debug .cortex-trigger-block__name{color:var(--cortex-color-text-strong)}.cortex-trigger-block--debug .cortex-trigger-block__time{margin-inline-start:auto;font-size:inherit;text-transform:none;letter-spacing:0}.cortex-trigger-block__payload{font-size:.75rem}.cortex-trigger-block__payload>summary{cursor:pointer;color:var(--cortex-color-text-secondary);-webkit-user-select:none;user-select:none}.cortex-trigger-block__payload[open]>summary{margin-bottom:.25rem}.cortex-widget__messages-disabled{padding:.75rem 1rem;text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-message-attachments{display:flex;flex-wrap:wrap;gap:.375rem}.cortex-message-attachments--user{justify-content:flex-end}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-debug-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-debug-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.cortex-debug-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.cortex-debug-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.cortex-debug-tool[data-state=awaiting-input],.cortex-debug-tool[data-state=input-streaming],.cortex-debug-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.cortex-debug-tool[data-state=approval-requested],.cortex-debug-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.cortex-debug-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.cortex-debug-tool__summary::-webkit-details-marker{display:none}.cortex-debug-tool__header{display:flex;align-items:flex-start;gap:.75rem}.cortex-debug-tool__meta{flex:1;min-width:0}.cortex-debug-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-debug-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.cortex-debug-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.cortex-debug-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.cortex-debug-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.cortex-debug-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.cortex-debug-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.cortex-debug-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.cortex-debug-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.cortex-debug-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.cortex-debug-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .cortex-debug-tool__chevron{transform:rotate(180deg)}.cortex-debug-tool__body{padding:0 .875rem .75rem 1.125rem}.cortex-debug-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.cortex-debug-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-debug-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__section-label--success{color:var(--cortex-color-success)}.cortex-debug-tool__section-label--error{color:var(--cortex-color-danger)}.cortex-debug-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.cortex-debug-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.cortex-debug-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.cortex-debug-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.cortex-debug-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.cortex-debug-tool__section--success .cortex-debug-tool__tree{background:light-dark(#f0fdf4,#052e16)}.cortex-debug-tool__section--error .cortex-debug-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--cortex-color-text-muted)}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title--pending{color:var(--cortex-color-text-muted);opacity:.6}.cortex-tool-pill__meta{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:.8;white-space:nowrap;font-variant-numeric:tabular-nums}.cortex-approval-card{display:block;max-width:min(100%,28rem);margin:.25rem 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-approval-card--asking{border-color:color-mix(in oklab,var(--cortex-color-accent) 45%,var(--cortex-color-border));box-shadow:0 0 0 3px color-mix(in oklab,var(--cortex-color-accent) 10%,transparent)}.cortex-approval-card__head{display:flex;align-items:center;gap:.5rem;padding:.625rem .75rem 0;font-size:.75rem;font-weight:600;color:var(--cortex-color-accent)}.cortex-approval-card__sentence{margin:0;padding:.375rem .75rem .5rem;font-weight:600;color:var(--cortex-color-text-heading)}.cortex-approval-card__sentence--full{padding-top:0;font-weight:400;color:var(--cortex-color-text-strong)}.cortex-approval-card__rows{display:grid;grid-template-columns:fit-content(40%) minmax(0,1fr);gap:.1875rem .75rem;margin:0;padding:0 .75rem .75rem;font-size:.78125rem}.cortex-approval-card__rows dt{color:var(--cortex-color-text-secondary);overflow-wrap:anywhere}.cortex-approval-card__rows dd{max-height:6rem;margin:0;overflow-y:auto;white-space:pre-wrap;color:var(--cortex-color-text-strong);overflow-wrap:anywhere}.cortex-approval-card__foot{display:flex;gap:.5rem;padding:.625rem .75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-approval-card__button{border:1px solid var(--cortex-color-border-strong);border-radius:calc(var(--cortex-radius) * .75);background:var(--cortex-color-surface);padding:.375rem .875rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--cortex-color-text-strong);cursor:pointer}.cortex-approval-card__button--approve{border-color:var(--cortex-color-accent);background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground)}.cortex-approval-card__line{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:.8125rem;color:var(--cortex-color-text-secondary)}.cortex-approval-card__line .cortex-tool-pill__icon{flex-shrink:0}.cortex-approval-card__decision{font-weight:600;color:var(--cortex-color-text-strong)}.cortex-approval-card__summary{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-approval-card__details{flex-shrink:0;border:0;background:none;padding:0;font:inherit;font-size:.75rem;color:var(--cortex-color-text-secondary);text-decoration:underline;text-underline-offset:2px;cursor:pointer}.cortex-tool-fold{display:block;align-self:flex-start;text-align:start;border:0;background:none;padding:0 0 .25rem;margin-block-start:-.625rem;margin-inline-start:1.125rem;font:inherit;font-size:.75rem;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-tool-fold:hover,.cortex-tool-fold:focus-visible{color:var(--cortex-color-text-secondary)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-location-input{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-location-input--settled{display:flex;gap:10px;border-color:var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-location-input__map{position:relative;block-size:11rem;background:var(--cortex-color-surface-muted)}.cortex-location-input__map--still{flex:none;inline-size:120px;block-size:84px}.cortex-location-input__canvas{block-size:100%}.cortex-location-input__still-failed{display:flex;align-items:center;justify-content:center;block-size:100%;padding:0 8px;font-size:11px;text-align:center;color:var(--cortex-color-text-muted)}.cortex-location-input__locate{position:absolute;inset-inline-end:10px;inset-block-start:10px;z-index:1001;display:inline-flex;align-items:center;justify-content:center;inline-size:30px;block-size:30px;border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 1px 3px #0003;cursor:pointer}.cortex-location-input__locate svg{inline-size:15px;block-size:15px}.cortex-location-input__locate:disabled{opacity:.45;cursor:default}.cortex-location-input__foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-block-start:1px solid var(--cortex-color-border-strong);font-size:12px}.cortex-location-input__hint{display:inline-flex;align-items:center;gap:6px;min-inline-size:0;color:var(--cortex-color-text-muted)}.cortex-location-input__hint--failed{color:var(--cortex-color-danger)}.cortex-location-input__spinner{inline-size:.625rem;block-size:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-location-input__coords{font-family:var(--cortex-font-mono);font-size:.75rem;color:var(--cortex-color-text-secondary);direction:ltr;unicode-bidi:isolate}.cortex-location-input__actions{display:flex;align-items:center;gap:8px}.cortex-location-input__skip{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-location-input__skip:hover{color:var(--cortex-color-danger)}.cortex-location-input__skip:disabled{opacity:.45;cursor:default}.cortex-location-input__send{border:1px solid var(--cortex-color-primary);border-radius:8px;background:var(--cortex-color-primary);padding:4px 10px;font:inherit;font-size:12px;color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-location-input__send:disabled{opacity:.45;cursor:default}.cortex-location-input__body{display:flex;flex-direction:column;justify-content:center;gap:2px;min-inline-size:0;padding-block:8px;padding-inline-end:12px}.cortex-location-input__title{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--cortex-color-text-strong)}.cortex-location-input__title svg{inline-size:13px;block-size:13px;color:var(--cortex-color-success)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__summary{flex-wrap:wrap;max-width:100%;text-align:start}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.cortex-json-tree__indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.cortex-json-tree__line{position:relative}.cortex-json-tree__toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.cortex-json-tree__toggle:hover .cortex-json-tree__arrow{color:var(--cortex-color-text)}.cortex-json-tree__arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.cortex-json-tree__arrow--collapsed{transform:rotate(-90deg)}.cortex-json-tree__bracket{color:var(--cortex-color-text-secondary)}.cortex-json-tree__key{color:light-dark(#6366f1,#818cf8)}.cortex-json-tree__colon{color:var(--cortex-color-text-secondary)}.cortex-json-tree__comma{color:var(--cortex-color-text-muted)}.cortex-json-tree__string{color:var(--cortex-color-success)}.cortex-json-tree__number{color:light-dark(#2563eb,#60a5fa)}.cortex-json-tree__boolean{color:light-dark(#d97706,#fbbf24)}.cortex-json-tree__null{color:var(--cortex-color-text-muted);font-style:italic}.cortex-json-tree__collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.cortex-json-tree__collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important}}\n']
|
|
10526
11460
|
}]
|
|
10527
11461
|
}],
|
|
10528
11462
|
propDecorators: {
|
|
@@ -10537,9 +11471,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10537
11471
|
composer: [{
|
|
10538
11472
|
type: i0.ViewChild,
|
|
10539
11473
|
args: [i0.forwardRef(() => ChatComposerComponent), { isSignal: true }]
|
|
11474
|
+
}],
|
|
11475
|
+
customHeader: [{
|
|
11476
|
+
type: i0.ContentChild,
|
|
11477
|
+
args: [i0.forwardRef(() => CortexHeaderDirective), { isSignal: true }]
|
|
10540
11478
|
}]
|
|
10541
11479
|
}
|
|
10542
11480
|
});
|
|
10543
11481
|
export {
|
|
11482
|
+
CortexHeaderDirective,
|
|
10544
11483
|
CortexChatWidgetComponent
|
|
10545
11484
|
};
|