@krak-stack/registry 0.1.59 → 0.1.61
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/CHANGELOG.md +13 -1
- package/dist/components/ui/data-table.d.ts +2 -0
- package/dist/components/ui/data-table.js +6 -2
- package/dist/components/ui/item.d.ts +22 -0
- package/dist/components/ui/trace.d.ts +18 -0
- package/dist/services/agent/client/index.js +584 -434
- package/dist/services/agent/client/widget.d.ts +1 -0
- package/dist/services/events/browser.js +29 -3
- package/dist/services/events/client/audit-log-table.js +6 -2
- package/dist/services/events/client/tracking-notice.js +2 -1
- package/dist/services/events/index.d.ts +26 -56
- package/dist/services/events/index.js +118 -7
- package/dist/services/events/schema.d.ts +66 -24
- package/dist/services/events/schema.js +34 -3
- package/dist/services/opentelemetry/api.js +2 -1
- package/dist/services/opentelemetry/browser.d.ts +1 -1
- package/dist/services/opentelemetry/browser.js +2 -1
- package/dist/services/opentelemetry/events.d.ts +1 -1
- package/dist/services/opentelemetry/index.d.ts +1 -1
- package/dist/services/opentelemetry/index.js +2 -1
- package/dist/services/opentelemetry/schema.d.ts +3 -1
- package/dist/services/opentelemetry/web-vitals.js +2 -1
- package/dist/services/webhooks/client/delivery-table.d.ts +62 -0
- package/dist/services/webhooks/client/delivery-table.js +4698 -0
- package/dist/services/webhooks/http-client.d.ts +8 -0
- package/dist/services/webhooks/http-client.js +69 -0
- package/dist/services/webhooks/index.d.ts +343 -0
- package/dist/services/webhooks/index.js +872 -0
- package/dist/services/webhooks/migrations.d.ts +8 -0
- package/dist/services/webhooks/migrations.js +63 -0
- package/dist/services/webhooks/receiver.d.ts +41 -0
- package/dist/services/webhooks/schema.d.ts +251 -0
- package/dist/services/webhooks/schema.js +353 -0
- package/dist/services/webhooks/url.d.ts +8 -0
- package/dist/services/webhooks/url.js +48 -0
- package/package.json +29 -1
- package/dist/components/ui/marker.d.ts +0 -10
|
@@ -152,13 +152,13 @@ import { Dialog as DialogPrimitive2 } from "@base-ui/react/dialog";
|
|
|
152
152
|
import {
|
|
153
153
|
ArrowDownIcon as ArrowDownIcon2,
|
|
154
154
|
BotIcon,
|
|
155
|
-
ChevronDownIcon,
|
|
156
155
|
Maximize2Icon,
|
|
157
156
|
MessageCircleDashedIcon,
|
|
158
157
|
Minimize2Icon,
|
|
159
158
|
MinusIcon,
|
|
160
159
|
SendIcon,
|
|
161
160
|
SquareIcon,
|
|
161
|
+
WrenchIcon,
|
|
162
162
|
XIcon as XIcon2
|
|
163
163
|
} from "lucide-react";
|
|
164
164
|
|
|
@@ -464,11 +464,113 @@ function AlertDescription({
|
|
|
464
464
|
});
|
|
465
465
|
}
|
|
466
466
|
|
|
467
|
-
// ../../src/components/ui/
|
|
467
|
+
// ../../src/components/ui/attachment.tsx
|
|
468
468
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
469
469
|
import { useRender } from "@base-ui/react/use-render";
|
|
470
470
|
import { cva as cva3 } from "class-variance-authority";
|
|
471
|
-
|
|
471
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
472
|
+
var attachmentVariants = cva3("group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed", {
|
|
473
|
+
variants: {
|
|
474
|
+
size: {
|
|
475
|
+
default: "gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2",
|
|
476
|
+
sm: "gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5",
|
|
477
|
+
xs: "gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1"
|
|
478
|
+
},
|
|
479
|
+
orientation: {
|
|
480
|
+
horizontal: "min-w-40 items-center",
|
|
481
|
+
vertical: "w-24 flex-col has-data-[slot=attachment-content]:w-30"
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
function Attachment({
|
|
486
|
+
className,
|
|
487
|
+
state = "done",
|
|
488
|
+
size = "default",
|
|
489
|
+
orientation = "horizontal",
|
|
490
|
+
...props
|
|
491
|
+
}) {
|
|
492
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
493
|
+
"data-slot": "attachment",
|
|
494
|
+
"data-state": state,
|
|
495
|
+
"data-size": size,
|
|
496
|
+
"data-orientation": orientation,
|
|
497
|
+
className: cn(attachmentVariants({ size, orientation }), className),
|
|
498
|
+
...props
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
var attachmentMediaVariants = cva3("relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5", {
|
|
502
|
+
variants: {
|
|
503
|
+
variant: {
|
|
504
|
+
icon: "",
|
|
505
|
+
image: "opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover"
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
defaultVariants: {
|
|
509
|
+
variant: "icon"
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
function AttachmentMedia({
|
|
513
|
+
className,
|
|
514
|
+
variant = "icon",
|
|
515
|
+
...props
|
|
516
|
+
}) {
|
|
517
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
518
|
+
"data-slot": "attachment-media",
|
|
519
|
+
"data-variant": variant,
|
|
520
|
+
className: cn(attachmentMediaVariants({ variant }), className),
|
|
521
|
+
...props
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
function AttachmentContent({
|
|
525
|
+
className,
|
|
526
|
+
...props
|
|
527
|
+
}) {
|
|
528
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
529
|
+
"data-slot": "attachment-content",
|
|
530
|
+
className: cn("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", className),
|
|
531
|
+
...props
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
function AttachmentTitle({
|
|
535
|
+
className,
|
|
536
|
+
...props
|
|
537
|
+
}) {
|
|
538
|
+
return /* @__PURE__ */ jsx6("span", {
|
|
539
|
+
"data-slot": "attachment-title",
|
|
540
|
+
className: cn("block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer", className),
|
|
541
|
+
...props
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
function AttachmentActions({
|
|
545
|
+
className,
|
|
546
|
+
...props
|
|
547
|
+
}) {
|
|
548
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
549
|
+
"data-slot": "attachment-actions",
|
|
550
|
+
className: cn("relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1", className),
|
|
551
|
+
...props
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
function AttachmentAction({
|
|
555
|
+
className,
|
|
556
|
+
variant,
|
|
557
|
+
size = "icon-xs",
|
|
558
|
+
...props
|
|
559
|
+
}) {
|
|
560
|
+
return /* @__PURE__ */ jsx6(Button, {
|
|
561
|
+
"data-slot": "attachment-action",
|
|
562
|
+
variant: variant ?? "ghost",
|
|
563
|
+
size,
|
|
564
|
+
className: cn(className),
|
|
565
|
+
...props
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
// ../../src/components/ui/badge.tsx
|
|
570
|
+
import { mergeProps as mergeProps2 } from "@base-ui/react/merge-props";
|
|
571
|
+
import { useRender as useRender2 } from "@base-ui/react/use-render";
|
|
572
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
573
|
+
var badgeVariants = cva4("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
472
574
|
variants: {
|
|
473
575
|
variant: {
|
|
474
576
|
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
@@ -489,9 +591,9 @@ function Badge({
|
|
|
489
591
|
render,
|
|
490
592
|
...props
|
|
491
593
|
}) {
|
|
492
|
-
return
|
|
594
|
+
return useRender2({
|
|
493
595
|
defaultTagName: "span",
|
|
494
|
-
props:
|
|
596
|
+
props: mergeProps2({
|
|
495
597
|
className: cn(badgeVariants({ variant }), className)
|
|
496
598
|
}, props),
|
|
497
599
|
render,
|
|
@@ -503,11 +605,11 @@ function Badge({
|
|
|
503
605
|
}
|
|
504
606
|
|
|
505
607
|
// ../../src/components/ui/bubble.tsx
|
|
506
|
-
import { mergeProps as
|
|
507
|
-
import { useRender as
|
|
508
|
-
import { cva as
|
|
509
|
-
import { jsx as
|
|
510
|
-
var bubbleVariants =
|
|
608
|
+
import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
|
|
609
|
+
import { useRender as useRender3 } from "@base-ui/react/use-render";
|
|
610
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
611
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
612
|
+
var bubbleVariants = cva5("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
|
|
511
613
|
variants: {
|
|
512
614
|
variant: {
|
|
513
615
|
default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
|
|
@@ -529,7 +631,7 @@ function Bubble({
|
|
|
529
631
|
className,
|
|
530
632
|
...props
|
|
531
633
|
}) {
|
|
532
|
-
return /* @__PURE__ */
|
|
634
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
533
635
|
"data-slot": "bubble",
|
|
534
636
|
"data-variant": variant,
|
|
535
637
|
"data-align": align,
|
|
@@ -542,9 +644,9 @@ function BubbleContent({
|
|
|
542
644
|
render,
|
|
543
645
|
...props
|
|
544
646
|
}) {
|
|
545
|
-
return
|
|
647
|
+
return useRender3({
|
|
546
648
|
defaultTagName: "div",
|
|
547
|
-
props:
|
|
649
|
+
props: mergeProps3({
|
|
548
650
|
className: cn("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50", className)
|
|
549
651
|
}, props),
|
|
550
652
|
render,
|
|
@@ -553,7 +655,7 @@ function BubbleContent({
|
|
|
553
655
|
}
|
|
554
656
|
});
|
|
555
657
|
}
|
|
556
|
-
var bubbleReactionsVariants =
|
|
658
|
+
var bubbleReactionsVariants = cva5("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0", {
|
|
557
659
|
variants: {
|
|
558
660
|
side: {
|
|
559
661
|
top: "top-0 -translate-y-3/4",
|
|
@@ -570,78 +672,6 @@ var bubbleReactionsVariants = cva4("absolute z-10 flex w-fit shrink-0 items-cent
|
|
|
570
672
|
}
|
|
571
673
|
});
|
|
572
674
|
|
|
573
|
-
// ../../src/components/ui/card.tsx
|
|
574
|
-
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
575
|
-
function Card({
|
|
576
|
-
className,
|
|
577
|
-
size = "default",
|
|
578
|
-
...props
|
|
579
|
-
}) {
|
|
580
|
-
return /* @__PURE__ */ jsx7("div", {
|
|
581
|
-
"data-slot": "card",
|
|
582
|
-
"data-size": size,
|
|
583
|
-
className: cn("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
|
|
584
|
-
...props
|
|
585
|
-
});
|
|
586
|
-
}
|
|
587
|
-
function CardHeader({ className, ...props }) {
|
|
588
|
-
return /* @__PURE__ */ jsx7("div", {
|
|
589
|
-
"data-slot": "card-header",
|
|
590
|
-
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className),
|
|
591
|
-
...props
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
function CardTitle({ className, ...props }) {
|
|
595
|
-
return /* @__PURE__ */ jsx7("div", {
|
|
596
|
-
"data-slot": "card-title",
|
|
597
|
-
className: cn("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm", className),
|
|
598
|
-
...props
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
function CardDescription({ className, ...props }) {
|
|
602
|
-
return /* @__PURE__ */ jsx7("div", {
|
|
603
|
-
"data-slot": "card-description",
|
|
604
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
605
|
-
...props
|
|
606
|
-
});
|
|
607
|
-
}
|
|
608
|
-
function CardContent({ className, ...props }) {
|
|
609
|
-
return /* @__PURE__ */ jsx7("div", {
|
|
610
|
-
"data-slot": "card-content",
|
|
611
|
-
className: cn("px-(--card-spacing)", className),
|
|
612
|
-
...props
|
|
613
|
-
});
|
|
614
|
-
}
|
|
615
|
-
function CardFooter({ className, ...props }) {
|
|
616
|
-
return /* @__PURE__ */ jsx7("div", {
|
|
617
|
-
"data-slot": "card-footer",
|
|
618
|
-
className: cn("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)", className),
|
|
619
|
-
...props
|
|
620
|
-
});
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
// ../../src/components/ui/collapsible.tsx
|
|
624
|
-
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
625
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
626
|
-
function Collapsible({ ...props }) {
|
|
627
|
-
return /* @__PURE__ */ jsx8(CollapsiblePrimitive.Root, {
|
|
628
|
-
"data-slot": "collapsible",
|
|
629
|
-
...props
|
|
630
|
-
});
|
|
631
|
-
}
|
|
632
|
-
function CollapsibleTrigger({ ...props }) {
|
|
633
|
-
return /* @__PURE__ */ jsx8(CollapsiblePrimitive.Trigger, {
|
|
634
|
-
"data-slot": "collapsible-trigger",
|
|
635
|
-
...props
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
function CollapsibleContent({ ...props }) {
|
|
639
|
-
return /* @__PURE__ */ jsx8(CollapsiblePrimitive.Panel, {
|
|
640
|
-
"data-slot": "collapsible-content",
|
|
641
|
-
...props
|
|
642
|
-
});
|
|
643
|
-
}
|
|
644
|
-
|
|
645
675
|
// ../../src/components/ui/command.tsx
|
|
646
676
|
import { Command as CommandPrimitive } from "cmdk";
|
|
647
677
|
import { SearchIcon } from "lucide-react";
|
|
@@ -649,33 +679,33 @@ import { SearchIcon } from "lucide-react";
|
|
|
649
679
|
// ../../src/components/ui/dialog.tsx
|
|
650
680
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
651
681
|
import { XIcon } from "lucide-react";
|
|
652
|
-
import { jsx as
|
|
682
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
653
683
|
function Dialog({ ...props }) {
|
|
654
|
-
return /* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive.Root, {
|
|
655
685
|
"data-slot": "dialog",
|
|
656
686
|
...props
|
|
657
687
|
});
|
|
658
688
|
}
|
|
659
689
|
function DialogTrigger({ ...props }) {
|
|
660
|
-
return /* @__PURE__ */
|
|
690
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive.Trigger, {
|
|
661
691
|
"data-slot": "dialog-trigger",
|
|
662
692
|
...props
|
|
663
693
|
});
|
|
664
694
|
}
|
|
665
695
|
function DialogPortal({ ...props }) {
|
|
666
|
-
return /* @__PURE__ */
|
|
696
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive.Portal, {
|
|
667
697
|
"data-slot": "dialog-portal",
|
|
668
698
|
...props
|
|
669
699
|
});
|
|
670
700
|
}
|
|
671
701
|
function DialogClose({ ...props }) {
|
|
672
|
-
return /* @__PURE__ */
|
|
702
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive.Close, {
|
|
673
703
|
"data-slot": "dialog-close",
|
|
674
704
|
...props
|
|
675
705
|
});
|
|
676
706
|
}
|
|
677
707
|
function DialogHeader({ className, ...props }) {
|
|
678
|
-
return /* @__PURE__ */
|
|
708
|
+
return /* @__PURE__ */ jsx8("div", {
|
|
679
709
|
"data-slot": "dialog-header",
|
|
680
710
|
className: cn("grid gap-1.5", className),
|
|
681
711
|
...props
|
|
@@ -685,7 +715,7 @@ function DialogTitle({
|
|
|
685
715
|
className,
|
|
686
716
|
...props
|
|
687
717
|
}) {
|
|
688
|
-
return /* @__PURE__ */
|
|
718
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive.Title, {
|
|
689
719
|
"data-slot": "dialog-title",
|
|
690
720
|
className: cn("text-lg font-medium", className),
|
|
691
721
|
...props
|
|
@@ -693,12 +723,12 @@ function DialogTitle({
|
|
|
693
723
|
}
|
|
694
724
|
|
|
695
725
|
// ../../src/components/ui/command.tsx
|
|
696
|
-
import { jsx as
|
|
726
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
697
727
|
function Command({
|
|
698
728
|
className,
|
|
699
729
|
...props
|
|
700
730
|
}) {
|
|
701
|
-
return /* @__PURE__ */
|
|
731
|
+
return /* @__PURE__ */ jsx9(CommandPrimitive, {
|
|
702
732
|
"data-slot": "command",
|
|
703
733
|
className: cn("flex size-full flex-col overflow-hidden rounded-xl bg-popover p-1 text-popover-foreground", className),
|
|
704
734
|
...props
|
|
@@ -708,7 +738,7 @@ function CommandList({
|
|
|
708
738
|
className,
|
|
709
739
|
...props
|
|
710
740
|
}) {
|
|
711
|
-
return /* @__PURE__ */
|
|
741
|
+
return /* @__PURE__ */ jsx9(CommandPrimitive.List, {
|
|
712
742
|
"data-slot": "command-list",
|
|
713
743
|
className: cn("max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", className),
|
|
714
744
|
...props
|
|
@@ -718,7 +748,7 @@ function CommandEmpty({
|
|
|
718
748
|
className,
|
|
719
749
|
...props
|
|
720
750
|
}) {
|
|
721
|
-
return /* @__PURE__ */
|
|
751
|
+
return /* @__PURE__ */ jsx9(CommandPrimitive.Empty, {
|
|
722
752
|
"data-slot": "command-empty",
|
|
723
753
|
className: cn("py-6 text-center text-sm", className),
|
|
724
754
|
...props
|
|
@@ -728,7 +758,7 @@ function CommandGroup({
|
|
|
728
758
|
className,
|
|
729
759
|
...props
|
|
730
760
|
}) {
|
|
731
|
-
return /* @__PURE__ */
|
|
761
|
+
return /* @__PURE__ */ jsx9(CommandPrimitive.Group, {
|
|
732
762
|
"data-slot": "command-group",
|
|
733
763
|
className: cn("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", className),
|
|
734
764
|
...props
|
|
@@ -738,7 +768,7 @@ function CommandItem({
|
|
|
738
768
|
className,
|
|
739
769
|
...props
|
|
740
770
|
}) {
|
|
741
|
-
return /* @__PURE__ */
|
|
771
|
+
return /* @__PURE__ */ jsx9(CommandPrimitive.Item, {
|
|
742
772
|
"data-slot": "command-item",
|
|
743
773
|
className: cn("group/command-item relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
744
774
|
...props
|
|
@@ -746,23 +776,23 @@ function CommandItem({
|
|
|
746
776
|
}
|
|
747
777
|
|
|
748
778
|
// ../../src/components/ui/empty.tsx
|
|
749
|
-
import { cva as
|
|
750
|
-
import { jsx as
|
|
779
|
+
import { cva as cva6 } from "class-variance-authority";
|
|
780
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
751
781
|
function Empty({ className, ...props }) {
|
|
752
|
-
return /* @__PURE__ */
|
|
782
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
753
783
|
"data-slot": "empty",
|
|
754
784
|
className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance", className),
|
|
755
785
|
...props
|
|
756
786
|
});
|
|
757
787
|
}
|
|
758
788
|
function EmptyHeader({ className, ...props }) {
|
|
759
|
-
return /* @__PURE__ */
|
|
789
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
760
790
|
"data-slot": "empty-header",
|
|
761
791
|
className: cn("flex max-w-sm flex-col items-center gap-2", className),
|
|
762
792
|
...props
|
|
763
793
|
});
|
|
764
794
|
}
|
|
765
|
-
var emptyMediaVariants =
|
|
795
|
+
var emptyMediaVariants = cva6("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
766
796
|
variants: {
|
|
767
797
|
variant: {
|
|
768
798
|
default: "bg-transparent",
|
|
@@ -778,7 +808,7 @@ function EmptyMedia({
|
|
|
778
808
|
variant = "default",
|
|
779
809
|
...props
|
|
780
810
|
}) {
|
|
781
|
-
return /* @__PURE__ */
|
|
811
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
782
812
|
"data-slot": "empty-icon",
|
|
783
813
|
"data-variant": variant,
|
|
784
814
|
className: cn(emptyMediaVariants({ variant, className })),
|
|
@@ -786,14 +816,14 @@ function EmptyMedia({
|
|
|
786
816
|
});
|
|
787
817
|
}
|
|
788
818
|
function EmptyTitle({ className, ...props }) {
|
|
789
|
-
return /* @__PURE__ */
|
|
819
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
790
820
|
"data-slot": "empty-title",
|
|
791
821
|
className: cn("text-lg font-medium tracking-tight", className),
|
|
792
822
|
...props
|
|
793
823
|
});
|
|
794
824
|
}
|
|
795
825
|
function EmptyDescription({ className, ...props }) {
|
|
796
|
-
return /* @__PURE__ */
|
|
826
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
797
827
|
"data-slot": "empty-description",
|
|
798
828
|
className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
799
829
|
...props
|
|
@@ -801,15 +831,15 @@ function EmptyDescription({ className, ...props }) {
|
|
|
801
831
|
}
|
|
802
832
|
|
|
803
833
|
// ../../src/components/ui/input-group.tsx
|
|
804
|
-
import { cva as
|
|
834
|
+
import { cva as cva7 } from "class-variance-authority";
|
|
805
835
|
|
|
806
836
|
// ../../src/components/ui/input.tsx
|
|
807
837
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
808
838
|
|
|
809
839
|
// ../../src/components/ui/textarea.tsx
|
|
810
|
-
import { jsx as
|
|
840
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
811
841
|
function Textarea({ className, ...props }) {
|
|
812
|
-
return /* @__PURE__ */
|
|
842
|
+
return /* @__PURE__ */ jsx11("textarea", {
|
|
813
843
|
"data-slot": "textarea",
|
|
814
844
|
className: cn("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
815
845
|
...props
|
|
@@ -817,16 +847,16 @@ function Textarea({ className, ...props }) {
|
|
|
817
847
|
}
|
|
818
848
|
|
|
819
849
|
// ../../src/components/ui/input-group.tsx
|
|
820
|
-
import { jsx as
|
|
850
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
821
851
|
function InputGroup({ className, ...props }) {
|
|
822
|
-
return /* @__PURE__ */
|
|
852
|
+
return /* @__PURE__ */ jsx12("div", {
|
|
823
853
|
"data-slot": "input-group",
|
|
824
854
|
role: "group",
|
|
825
855
|
className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
|
|
826
856
|
...props
|
|
827
857
|
});
|
|
828
858
|
}
|
|
829
|
-
var inputGroupAddonVariants =
|
|
859
|
+
var inputGroupAddonVariants = cva7("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
830
860
|
variants: {
|
|
831
861
|
align: {
|
|
832
862
|
"inline-start": "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
|
|
@@ -842,7 +872,7 @@ function InputGroupAddon({
|
|
|
842
872
|
align = "inline-start",
|
|
843
873
|
...props
|
|
844
874
|
}) {
|
|
845
|
-
return /* @__PURE__ */
|
|
875
|
+
return /* @__PURE__ */ jsx12("div", {
|
|
846
876
|
role: "group",
|
|
847
877
|
"data-slot": "input-group-addon",
|
|
848
878
|
"data-align": align,
|
|
@@ -856,7 +886,7 @@ function InputGroupAddon({
|
|
|
856
886
|
...props
|
|
857
887
|
});
|
|
858
888
|
}
|
|
859
|
-
var inputGroupButtonVariants =
|
|
889
|
+
var inputGroupButtonVariants = cva7("flex items-center gap-2 text-sm shadow-none", {
|
|
860
890
|
variants: {
|
|
861
891
|
size: {
|
|
862
892
|
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
@@ -874,7 +904,7 @@ function InputGroupButton({
|
|
|
874
904
|
size = "xs",
|
|
875
905
|
...props
|
|
876
906
|
}) {
|
|
877
|
-
return /* @__PURE__ */
|
|
907
|
+
return /* @__PURE__ */ jsx12(Button, {
|
|
878
908
|
type,
|
|
879
909
|
"data-size": size,
|
|
880
910
|
variant,
|
|
@@ -886,61 +916,130 @@ function InputGroupTextarea({
|
|
|
886
916
|
className,
|
|
887
917
|
...props
|
|
888
918
|
}) {
|
|
889
|
-
return /* @__PURE__ */
|
|
919
|
+
return /* @__PURE__ */ jsx12(Textarea, {
|
|
890
920
|
"data-slot": "input-group-control",
|
|
891
921
|
className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
|
|
892
922
|
...props
|
|
893
923
|
});
|
|
894
924
|
}
|
|
895
925
|
|
|
896
|
-
// ../../src/components/ui/
|
|
897
|
-
import { mergeProps as
|
|
898
|
-
import { useRender as
|
|
899
|
-
import { cva as
|
|
900
|
-
import {
|
|
901
|
-
|
|
926
|
+
// ../../src/components/ui/item.tsx
|
|
927
|
+
import { mergeProps as mergeProps4 } from "@base-ui/react/merge-props";
|
|
928
|
+
import { useRender as useRender4 } from "@base-ui/react/use-render";
|
|
929
|
+
import { cva as cva8 } from "class-variance-authority";
|
|
930
|
+
import { cn as cn2 } from "cn";
|
|
931
|
+
|
|
932
|
+
// ../../src/components/ui/separator.tsx
|
|
933
|
+
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
934
|
+
|
|
935
|
+
// ../../src/components/ui/item.tsx
|
|
936
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
937
|
+
var itemVariants = cva8("group/item flex w-full flex-wrap items-center rounded-md border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted", {
|
|
902
938
|
variants: {
|
|
903
939
|
variant: {
|
|
904
|
-
default: "",
|
|
905
|
-
|
|
906
|
-
|
|
940
|
+
default: "border-transparent",
|
|
941
|
+
outline: "border-border",
|
|
942
|
+
muted: "border-transparent bg-muted/50"
|
|
943
|
+
},
|
|
944
|
+
size: {
|
|
945
|
+
default: "gap-3.5 px-4 py-3.5",
|
|
946
|
+
sm: "gap-2.5 px-3 py-2.5",
|
|
947
|
+
xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
|
|
907
948
|
}
|
|
949
|
+
},
|
|
950
|
+
defaultVariants: {
|
|
951
|
+
variant: "default",
|
|
952
|
+
size: "default"
|
|
908
953
|
}
|
|
909
954
|
});
|
|
910
|
-
function
|
|
955
|
+
function Item({
|
|
911
956
|
className,
|
|
912
957
|
variant = "default",
|
|
958
|
+
size = "default",
|
|
913
959
|
render,
|
|
914
960
|
...props
|
|
915
961
|
}) {
|
|
916
|
-
return
|
|
962
|
+
return useRender4({
|
|
917
963
|
defaultTagName: "div",
|
|
918
|
-
props:
|
|
919
|
-
className:
|
|
964
|
+
props: mergeProps4({
|
|
965
|
+
className: cn2(itemVariants({ variant, size, className }))
|
|
920
966
|
}, props),
|
|
921
967
|
render,
|
|
922
968
|
state: {
|
|
923
|
-
slot: "
|
|
924
|
-
variant
|
|
969
|
+
slot: "item",
|
|
970
|
+
variant,
|
|
971
|
+
size
|
|
925
972
|
}
|
|
926
973
|
});
|
|
927
974
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
975
|
+
var itemMediaVariants = cva8("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none", {
|
|
976
|
+
variants: {
|
|
977
|
+
variant: {
|
|
978
|
+
default: "bg-transparent",
|
|
979
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
980
|
+
image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
defaultVariants: {
|
|
984
|
+
variant: "default"
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
function ItemMedia({
|
|
988
|
+
className,
|
|
989
|
+
variant = "default",
|
|
990
|
+
...props
|
|
991
|
+
}) {
|
|
992
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
993
|
+
"data-slot": "item-media",
|
|
994
|
+
"data-variant": variant,
|
|
995
|
+
className: cn2(itemMediaVariants({ variant, className })),
|
|
996
|
+
...props
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
function ItemContent({ className, ...props }) {
|
|
1000
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
1001
|
+
"data-slot": "item-content",
|
|
1002
|
+
className: cn2("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
|
|
1003
|
+
...props
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
function ItemTitle({ className, ...props }) {
|
|
1007
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
1008
|
+
"data-slot": "item-title",
|
|
1009
|
+
className: cn2("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
|
|
1010
|
+
...props
|
|
1011
|
+
});
|
|
1012
|
+
}
|
|
1013
|
+
function ItemDescription({ className, ...props }) {
|
|
1014
|
+
return /* @__PURE__ */ jsx13("p", {
|
|
1015
|
+
"data-slot": "item-description",
|
|
1016
|
+
className: cn2("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
1017
|
+
...props
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
function ItemActions({ className, ...props }) {
|
|
1021
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
1022
|
+
"data-slot": "item-actions",
|
|
1023
|
+
className: cn2("flex items-center gap-2", className),
|
|
1024
|
+
...props
|
|
1025
|
+
});
|
|
1026
|
+
}
|
|
1027
|
+
function ItemFooter({ className, ...props }) {
|
|
1028
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
1029
|
+
"data-slot": "item-footer",
|
|
1030
|
+
className: cn2("flex basis-full items-center justify-between gap-2", className),
|
|
932
1031
|
...props
|
|
933
1032
|
});
|
|
934
1033
|
}
|
|
935
1034
|
|
|
936
1035
|
// ../../src/components/ui/message.tsx
|
|
937
|
-
import { jsx as
|
|
1036
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
938
1037
|
function Message({
|
|
939
1038
|
className,
|
|
940
1039
|
align = "start",
|
|
941
1040
|
...props
|
|
942
1041
|
}) {
|
|
943
|
-
return /* @__PURE__ */
|
|
1042
|
+
return /* @__PURE__ */ jsx14("div", {
|
|
944
1043
|
"data-slot": "message",
|
|
945
1044
|
"data-align": align,
|
|
946
1045
|
className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
|
|
@@ -948,7 +1047,7 @@ function Message({
|
|
|
948
1047
|
});
|
|
949
1048
|
}
|
|
950
1049
|
function MessageContent({ className, ...props }) {
|
|
951
|
-
return /* @__PURE__ */
|
|
1050
|
+
return /* @__PURE__ */ jsx14("div", {
|
|
952
1051
|
"data-slot": "message-content",
|
|
953
1052
|
className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className),
|
|
954
1053
|
...props
|
|
@@ -963,9 +1062,9 @@ import {
|
|
|
963
1062
|
useMessageScrollerVisibility
|
|
964
1063
|
} from "@shadcn/react/message-scroller";
|
|
965
1064
|
import { ArrowDownIcon } from "lucide-react";
|
|
966
|
-
import { jsx as
|
|
1065
|
+
import { jsx as jsx15, jsxs as jsxs5, Fragment } from "react/jsx-runtime";
|
|
967
1066
|
function MessageScrollerProvider(props) {
|
|
968
|
-
return /* @__PURE__ */
|
|
1067
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Provider, {
|
|
969
1068
|
...props
|
|
970
1069
|
});
|
|
971
1070
|
}
|
|
@@ -973,7 +1072,7 @@ function MessageScroller({
|
|
|
973
1072
|
className,
|
|
974
1073
|
...props
|
|
975
1074
|
}) {
|
|
976
|
-
return /* @__PURE__ */
|
|
1075
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Root, {
|
|
977
1076
|
"data-slot": "message-scroller",
|
|
978
1077
|
className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className),
|
|
979
1078
|
...props
|
|
@@ -983,7 +1082,7 @@ function MessageScrollerViewport({
|
|
|
983
1082
|
className,
|
|
984
1083
|
...props
|
|
985
1084
|
}) {
|
|
986
|
-
return /* @__PURE__ */
|
|
1085
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Viewport, {
|
|
987
1086
|
"data-slot": "message-scroller-viewport",
|
|
988
1087
|
className: cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent", className),
|
|
989
1088
|
...props
|
|
@@ -993,7 +1092,7 @@ function MessageScrollerContent({
|
|
|
993
1092
|
className,
|
|
994
1093
|
...props
|
|
995
1094
|
}) {
|
|
996
|
-
return /* @__PURE__ */
|
|
1095
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Content, {
|
|
997
1096
|
"data-slot": "message-scroller-content",
|
|
998
1097
|
className: cn("flex h-max min-h-full flex-col gap-8", className),
|
|
999
1098
|
...props
|
|
@@ -1004,7 +1103,7 @@ function MessageScrollerItem({
|
|
|
1004
1103
|
scrollAnchor = false,
|
|
1005
1104
|
...props
|
|
1006
1105
|
}) {
|
|
1007
|
-
return /* @__PURE__ */
|
|
1106
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Item, {
|
|
1008
1107
|
"data-slot": "message-scroller-item",
|
|
1009
1108
|
scrollAnchor,
|
|
1010
1109
|
className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
|
|
@@ -1020,22 +1119,22 @@ function MessageScrollerButton({
|
|
|
1020
1119
|
size = "icon-sm",
|
|
1021
1120
|
...props
|
|
1022
1121
|
}) {
|
|
1023
|
-
return /* @__PURE__ */
|
|
1122
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Button, {
|
|
1024
1123
|
"data-slot": "message-scroller-button",
|
|
1025
1124
|
"data-direction": direction,
|
|
1026
1125
|
"data-variant": variant,
|
|
1027
1126
|
"data-size": size,
|
|
1028
1127
|
direction,
|
|
1029
1128
|
className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className),
|
|
1030
|
-
render: render ?? /* @__PURE__ */
|
|
1129
|
+
render: render ?? /* @__PURE__ */ jsx15(Button, {
|
|
1031
1130
|
variant,
|
|
1032
1131
|
size
|
|
1033
1132
|
}),
|
|
1034
1133
|
...props,
|
|
1035
1134
|
children: children ?? /* @__PURE__ */ jsxs5(Fragment, {
|
|
1036
1135
|
children: [
|
|
1037
|
-
/* @__PURE__ */
|
|
1038
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ jsx15(ArrowDownIcon, {}),
|
|
1137
|
+
/* @__PURE__ */ jsx15("span", {
|
|
1039
1138
|
className: "sr-only",
|
|
1040
1139
|
children: direction === "end" ? "Scroll to end" : "Scroll to start"
|
|
1041
1140
|
})
|
|
@@ -1046,15 +1145,15 @@ function MessageScrollerButton({
|
|
|
1046
1145
|
|
|
1047
1146
|
// ../../src/components/ui/popover.tsx
|
|
1048
1147
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
1049
|
-
import { jsx as
|
|
1148
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1050
1149
|
function Popover({ ...props }) {
|
|
1051
|
-
return /* @__PURE__ */
|
|
1150
|
+
return /* @__PURE__ */ jsx16(PopoverPrimitive.Root, {
|
|
1052
1151
|
"data-slot": "popover",
|
|
1053
1152
|
...props
|
|
1054
1153
|
});
|
|
1055
1154
|
}
|
|
1056
1155
|
function PopoverTrigger({ ...props }) {
|
|
1057
|
-
return /* @__PURE__ */
|
|
1156
|
+
return /* @__PURE__ */ jsx16(PopoverPrimitive.Trigger, {
|
|
1058
1157
|
"data-slot": "popover-trigger",
|
|
1059
1158
|
...props
|
|
1060
1159
|
});
|
|
@@ -1067,14 +1166,14 @@ function PopoverContent({
|
|
|
1067
1166
|
sideOffset = 4,
|
|
1068
1167
|
...props
|
|
1069
1168
|
}) {
|
|
1070
|
-
return /* @__PURE__ */
|
|
1071
|
-
children: /* @__PURE__ */
|
|
1169
|
+
return /* @__PURE__ */ jsx16(PopoverPrimitive.Portal, {
|
|
1170
|
+
children: /* @__PURE__ */ jsx16(PopoverPrimitive.Positioner, {
|
|
1072
1171
|
align,
|
|
1073
1172
|
alignOffset,
|
|
1074
1173
|
side,
|
|
1075
1174
|
sideOffset,
|
|
1076
1175
|
className: "isolate z-50",
|
|
1077
|
-
children: /* @__PURE__ */
|
|
1176
|
+
children: /* @__PURE__ */ jsx16(PopoverPrimitive.Popup, {
|
|
1078
1177
|
"data-slot": "popover-content",
|
|
1079
1178
|
className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
1080
1179
|
...props
|
|
@@ -1083,49 +1182,119 @@ function PopoverContent({
|
|
|
1083
1182
|
});
|
|
1084
1183
|
}
|
|
1085
1184
|
|
|
1086
|
-
// ../../src/components/ui/
|
|
1087
|
-
import {
|
|
1185
|
+
// ../../src/components/ui/trace.tsx
|
|
1186
|
+
import { cn as cn3 } from "cn";
|
|
1187
|
+
|
|
1188
|
+
// ../../src/components/ui/collapsible.tsx
|
|
1189
|
+
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
1190
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1191
|
+
function Collapsible({ ...props }) {
|
|
1192
|
+
return /* @__PURE__ */ jsx17(CollapsiblePrimitive.Root, {
|
|
1193
|
+
"data-slot": "collapsible",
|
|
1194
|
+
...props
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
function CollapsibleTrigger({ ...props }) {
|
|
1198
|
+
return /* @__PURE__ */ jsx17(CollapsiblePrimitive.Trigger, {
|
|
1199
|
+
"data-slot": "collapsible-trigger",
|
|
1200
|
+
...props
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
function CollapsibleContent({ ...props }) {
|
|
1204
|
+
return /* @__PURE__ */ jsx17(CollapsiblePrimitive.Panel, {
|
|
1205
|
+
"data-slot": "collapsible-content",
|
|
1206
|
+
...props
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
// ../../src/components/ui/trace.tsx
|
|
1211
|
+
import { ChevronRightIcon } from "lucide-react";
|
|
1088
1212
|
import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
"data-slot
|
|
1213
|
+
function Trace({ className, ...props }) {
|
|
1214
|
+
return /* @__PURE__ */ jsx18("div", {
|
|
1215
|
+
"data-slot": "trace",
|
|
1216
|
+
className: cn3("flex w-full min-w-0 flex-col gap-2 *:has-[>[data-slot=trace-line]]:flex *:has-[>[data-slot=trace-line]]:w-fit *:has-[>[data-slot=trace-line]]:max-w-full *:has-[>[data-slot=trace-line]]:min-w-0 *:has-[>[data-slot=trace-line]]:rounded-md *:has-[>[data-slot=trace-line]]:text-left *:has-[>[data-slot=trace-line]]:outline-none *:has-[>[data-slot=trace-line]]:focus-visible:ring-3 *:has-[>[data-slot=trace-line]]:focus-visible:ring-ring/50", className),
|
|
1217
|
+
...props
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
function TraceLine({
|
|
1221
|
+
className,
|
|
1222
|
+
status,
|
|
1223
|
+
...props
|
|
1224
|
+
}) {
|
|
1225
|
+
return /* @__PURE__ */ jsx18("span", {
|
|
1226
|
+
"data-slot": "trace-line",
|
|
1227
|
+
"data-status": status,
|
|
1228
|
+
className: cn3("flex w-fit max-w-full min-w-0 items-center gap-2 text-sm text-muted-foreground transition-colors in-[a,button]:cursor-pointer in-[a:hover,button:hover]:text-foreground data-[status=error]:text-destructive data-[status=error]:in-[a:hover,button:hover]:text-destructive data-[status=pending]:opacity-60 data-[status=running]:*:data-[slot=trace-title]:shimmer", className),
|
|
1229
|
+
...props
|
|
1230
|
+
});
|
|
1231
|
+
}
|
|
1232
|
+
function TraceIcon({ className, ...props }) {
|
|
1233
|
+
return /* @__PURE__ */ jsx18("span", {
|
|
1234
|
+
"data-slot": "trace-icon",
|
|
1235
|
+
"aria-hidden": "true",
|
|
1236
|
+
className: cn3("flex size-4 shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [[data-slot=trace-title]~&]:-ml-1", className),
|
|
1093
1237
|
...props
|
|
1094
1238
|
});
|
|
1095
1239
|
}
|
|
1096
|
-
function
|
|
1097
|
-
return /* @__PURE__ */ jsx18(
|
|
1098
|
-
"data-slot": "
|
|
1240
|
+
function TraceTitle({ className, ...props }) {
|
|
1241
|
+
return /* @__PURE__ */ jsx18("span", {
|
|
1242
|
+
"data-slot": "trace-title",
|
|
1243
|
+
className: cn3("min-w-0 truncate motion-reduce:shimmer-none", className),
|
|
1099
1244
|
...props
|
|
1100
1245
|
});
|
|
1101
1246
|
}
|
|
1102
|
-
function
|
|
1247
|
+
function TraceDescription({
|
|
1248
|
+
className,
|
|
1249
|
+
...props
|
|
1250
|
+
}) {
|
|
1251
|
+
return /* @__PURE__ */ jsx18("span", {
|
|
1252
|
+
"data-slot": "trace-description",
|
|
1253
|
+
className: cn3("shrink-0 text-muted-foreground/70 tabular-nums", className),
|
|
1254
|
+
...props
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
function TraceCollapsible({
|
|
1258
|
+
className,
|
|
1259
|
+
...props
|
|
1260
|
+
}) {
|
|
1261
|
+
return /* @__PURE__ */ jsx18(Collapsible, {
|
|
1262
|
+
"data-slot": "trace-collapsible",
|
|
1263
|
+
className: cn3("flex w-full min-w-0 flex-col", className),
|
|
1264
|
+
...props
|
|
1265
|
+
});
|
|
1266
|
+
}
|
|
1267
|
+
function TraceCollapsibleTrigger({
|
|
1103
1268
|
className,
|
|
1104
|
-
side = "top",
|
|
1105
|
-
sideOffset = 4,
|
|
1106
|
-
align = "center",
|
|
1107
|
-
alignOffset = 0,
|
|
1108
1269
|
children,
|
|
1109
1270
|
...props
|
|
1110
1271
|
}) {
|
|
1111
|
-
return /* @__PURE__ */
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
1121
|
-
...props,
|
|
1122
|
-
children: [
|
|
1123
|
-
children,
|
|
1124
|
-
/* @__PURE__ */ jsx18(TooltipPrimitive.Arrow, {
|
|
1125
|
-
className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"
|
|
1126
|
-
})
|
|
1127
|
-
]
|
|
1272
|
+
return /* @__PURE__ */ jsxs6(CollapsibleTrigger, {
|
|
1273
|
+
"data-slot": "trace-collapsible-trigger",
|
|
1274
|
+
className: cn3("group/trace-collapsible-trigger flex w-fit max-w-full min-w-0 cursor-pointer items-center gap-1 rounded-md text-left text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 has-[[data-status=error]]:text-destructive", className),
|
|
1275
|
+
...props,
|
|
1276
|
+
children: [
|
|
1277
|
+
children,
|
|
1278
|
+
/* @__PURE__ */ jsx18(TraceIcon, {
|
|
1279
|
+
className: "transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90",
|
|
1280
|
+
children: /* @__PURE__ */ jsx18(ChevronRightIcon, {})
|
|
1128
1281
|
})
|
|
1282
|
+
]
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
function TraceCollapsibleContent({
|
|
1286
|
+
className,
|
|
1287
|
+
children,
|
|
1288
|
+
...props
|
|
1289
|
+
}) {
|
|
1290
|
+
return /* @__PURE__ */ jsx18(CollapsibleContent, {
|
|
1291
|
+
"data-slot": "trace-collapsible-content",
|
|
1292
|
+
className: "h-(--collapsible-panel-height) min-w-0 overflow-hidden transition-[height] duration-200 data-ending-style:h-0 data-starting-style:h-0",
|
|
1293
|
+
...props,
|
|
1294
|
+
children: /* @__PURE__ */ jsx18("div", {
|
|
1295
|
+
"data-slot": "trace-collapsible-content-inner",
|
|
1296
|
+
className: cn3("mt-2 mb-1 ml-[calc(--spacing(2)-1px)] min-w-0 border-l pr-1 pl-4 leading-relaxed wrap-break-word text-muted-foreground", className),
|
|
1297
|
+
children
|
|
1129
1298
|
})
|
|
1130
1299
|
});
|
|
1131
1300
|
}
|
|
@@ -1243,9 +1412,10 @@ var messages3 = {
|
|
|
1243
1412
|
send: "Send message",
|
|
1244
1413
|
stop: "Stop response",
|
|
1245
1414
|
title: "AI Assistant",
|
|
1415
|
+
toolActivity: "Tool activity",
|
|
1246
1416
|
toolDenied: "Cancelled",
|
|
1247
1417
|
toolFailed: "Failed",
|
|
1248
|
-
toolRunning: "
|
|
1418
|
+
toolRunning: "Working",
|
|
1249
1419
|
toolWorked: (seconds) => `Worked for ${seconds} ${seconds === 1 ? "second" : "seconds"}`,
|
|
1250
1420
|
viewLess: "View less",
|
|
1251
1421
|
viewMore: "View more",
|
|
@@ -1277,9 +1447,10 @@ var messages3 = {
|
|
|
1277
1447
|
send: "Envoyer le message",
|
|
1278
1448
|
stop: "Arrêter la réponse",
|
|
1279
1449
|
title: "Assistant IA",
|
|
1450
|
+
toolActivity: "Activité des outils",
|
|
1280
1451
|
toolDenied: "Annulé",
|
|
1281
1452
|
toolFailed: "Échec",
|
|
1282
|
-
toolRunning: "
|
|
1453
|
+
toolRunning: "En cours",
|
|
1283
1454
|
toolWorked: (seconds) => `A travaillé pendant ${seconds} ${seconds === 1 ? "seconde" : "secondes"}`,
|
|
1284
1455
|
viewLess: "Voir moins",
|
|
1285
1456
|
viewMore: "Voir plus",
|
|
@@ -1340,139 +1511,147 @@ var completesSelectedReference = (input, search, references) => {
|
|
|
1340
1511
|
const searchText = input.slice(search.start + 1, search.end);
|
|
1341
1512
|
return references.some(({ label }) => searchText.startsWith(`${label} `));
|
|
1342
1513
|
};
|
|
1343
|
-
var
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1514
|
+
var ToolInput = ({
|
|
1515
|
+
labels,
|
|
1516
|
+
locale,
|
|
1517
|
+
tool
|
|
1518
|
+
}) => /* @__PURE__ */ jsxs7("div", {
|
|
1519
|
+
className: "min-w-0 space-y-2",
|
|
1520
|
+
children: [
|
|
1521
|
+
tool.metadata.description ? /* @__PURE__ */ jsx19("p", {
|
|
1522
|
+
children: tool.metadata.description
|
|
1523
|
+
}) : null,
|
|
1524
|
+
/* @__PURE__ */ jsx19(CodeBlock, {
|
|
1525
|
+
code: inputCode(tool.input),
|
|
1526
|
+
language: "json",
|
|
1527
|
+
locale,
|
|
1528
|
+
messages: {
|
|
1529
|
+
[locale]: {
|
|
1530
|
+
codeDescription: labels.codeDescription,
|
|
1531
|
+
copied: labels.copied,
|
|
1532
|
+
copy: labels.copy
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
})
|
|
1536
|
+
]
|
|
1537
|
+
});
|
|
1538
|
+
var ToolApproval = ({
|
|
1366
1539
|
disabled,
|
|
1367
1540
|
labels,
|
|
1368
1541
|
locale,
|
|
1369
1542
|
onApproval,
|
|
1370
1543
|
tool
|
|
1371
|
-
}) {
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
label
|
|
1384
|
-
})
|
|
1385
|
-
})
|
|
1386
|
-
}),
|
|
1387
|
-
tool.status === "failed" || tool.status === "denied" ? /* @__PURE__ */ jsx19(Badge, {
|
|
1388
|
-
variant: "destructive",
|
|
1389
|
-
children: tool.status === "failed" ? labels.toolFailed : labels.toolDenied
|
|
1390
|
-
}) : null
|
|
1391
|
-
]
|
|
1392
|
-
});
|
|
1393
|
-
}
|
|
1394
|
-
return /* @__PURE__ */ jsx19(Collapsible, {
|
|
1395
|
-
className: "mx-1",
|
|
1396
|
-
open: detailsOpen,
|
|
1397
|
-
onOpenChange: setDetailsOpen,
|
|
1398
|
-
children: /* @__PURE__ */ jsxs7(Card, {
|
|
1399
|
-
size: "sm",
|
|
1400
|
-
className: "w-full border shadow-none ring-0",
|
|
1544
|
+
}) => /* @__PURE__ */ jsxs7(Item, {
|
|
1545
|
+
variant: "outline",
|
|
1546
|
+
size: "sm",
|
|
1547
|
+
role: "group",
|
|
1548
|
+
"aria-label": tool.metadata.title ?? tool.name,
|
|
1549
|
+
children: [
|
|
1550
|
+
/* @__PURE__ */ jsx19(ItemMedia, {
|
|
1551
|
+
variant: "icon",
|
|
1552
|
+
children: /* @__PURE__ */ jsx19(WrenchIcon, {})
|
|
1553
|
+
}),
|
|
1554
|
+
/* @__PURE__ */ jsxs7(ItemContent, {
|
|
1555
|
+
className: "min-w-0",
|
|
1401
1556
|
children: [
|
|
1402
|
-
/* @__PURE__ */ jsxs7(
|
|
1557
|
+
/* @__PURE__ */ jsxs7(ItemTitle, {
|
|
1558
|
+
className: "line-clamp-none",
|
|
1403
1559
|
children: [
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
label
|
|
1410
|
-
}),
|
|
1411
|
-
tool.metadata.destructive ? /* @__PURE__ */ jsx19(Badge, {
|
|
1412
|
-
variant: "destructive",
|
|
1413
|
-
children: labels.approvalDestructiveLabel
|
|
1414
|
-
}) : null
|
|
1415
|
-
]
|
|
1416
|
-
}),
|
|
1417
|
-
/* @__PURE__ */ jsx19(CardDescription, {
|
|
1418
|
-
children: tool.metadata.destructive ? labels.approvalDestructive : labels.approvalRequired
|
|
1419
|
-
})
|
|
1560
|
+
tool.metadata.title ?? tool.name,
|
|
1561
|
+
tool.metadata.destructive ? /* @__PURE__ */ jsx19(Badge, {
|
|
1562
|
+
variant: "destructive",
|
|
1563
|
+
children: labels.approvalDestructiveLabel
|
|
1564
|
+
}) : null
|
|
1420
1565
|
]
|
|
1421
1566
|
}),
|
|
1422
|
-
/* @__PURE__ */ jsx19(
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
})
|
|
1437
|
-
})
|
|
1567
|
+
/* @__PURE__ */ jsx19(ItemDescription, {
|
|
1568
|
+
className: "line-clamp-none",
|
|
1569
|
+
children: tool.metadata.destructive ? labels.approvalDestructive : labels.approvalRequired
|
|
1570
|
+
})
|
|
1571
|
+
]
|
|
1572
|
+
}),
|
|
1573
|
+
/* @__PURE__ */ jsxs7(ItemActions, {
|
|
1574
|
+
children: [
|
|
1575
|
+
/* @__PURE__ */ jsx19(Button, {
|
|
1576
|
+
size: "sm",
|
|
1577
|
+
variant: tool.metadata.destructive ? "destructive" : "default",
|
|
1578
|
+
disabled,
|
|
1579
|
+
onClick: () => onApproval(tool, true),
|
|
1580
|
+
children: labels.approve
|
|
1438
1581
|
}),
|
|
1439
|
-
/* @__PURE__ */
|
|
1440
|
-
|
|
1582
|
+
/* @__PURE__ */ jsx19(Button, {
|
|
1583
|
+
size: "sm",
|
|
1584
|
+
variant: "outline",
|
|
1585
|
+
disabled,
|
|
1586
|
+
onClick: () => onApproval(tool, false),
|
|
1587
|
+
children: labels.cancel
|
|
1588
|
+
})
|
|
1589
|
+
]
|
|
1590
|
+
}),
|
|
1591
|
+
/* @__PURE__ */ jsx19(ItemFooter, {
|
|
1592
|
+
className: "block min-w-0",
|
|
1593
|
+
children: /* @__PURE__ */ jsx19(Trace, {
|
|
1594
|
+
children: /* @__PURE__ */ jsxs7(TraceCollapsible, {
|
|
1441
1595
|
children: [
|
|
1442
|
-
/* @__PURE__ */ jsx19(
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
}),
|
|
1449
|
-
/* @__PURE__ */ jsx19(Button, {
|
|
1450
|
-
size: "sm",
|
|
1451
|
-
variant: "outline",
|
|
1452
|
-
disabled,
|
|
1453
|
-
onClick: () => onApproval(tool, false),
|
|
1454
|
-
children: labels.cancel
|
|
1596
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleTrigger, {
|
|
1597
|
+
children: /* @__PURE__ */ jsx19(TraceLine, {
|
|
1598
|
+
children: /* @__PURE__ */ jsx19(TraceTitle, {
|
|
1599
|
+
children: labels.viewMore
|
|
1600
|
+
})
|
|
1601
|
+
})
|
|
1455
1602
|
}),
|
|
1456
|
-
/* @__PURE__ */ jsx19(
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
children: [
|
|
1462
|
-
detailsOpen ? labels.viewLess : labels.viewMore,
|
|
1463
|
-
/* @__PURE__ */ jsx19(ChevronDownIcon, {
|
|
1464
|
-
"data-icon": "inline-end",
|
|
1465
|
-
className: cn("transition-transform", detailsOpen && "rotate-180")
|
|
1466
|
-
})
|
|
1467
|
-
]
|
|
1603
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleContent, {
|
|
1604
|
+
children: /* @__PURE__ */ jsx19(ToolInput, {
|
|
1605
|
+
labels,
|
|
1606
|
+
locale,
|
|
1607
|
+
tool
|
|
1468
1608
|
})
|
|
1469
1609
|
})
|
|
1470
1610
|
]
|
|
1471
1611
|
})
|
|
1472
|
-
|
|
1612
|
+
})
|
|
1473
1613
|
})
|
|
1614
|
+
]
|
|
1615
|
+
});
|
|
1616
|
+
var ToolActivity = ({
|
|
1617
|
+
labels,
|
|
1618
|
+
locale,
|
|
1619
|
+
pending,
|
|
1620
|
+
tool
|
|
1621
|
+
}) => {
|
|
1622
|
+
const running = pending && (tool.status === "running" || tool.status === "approved");
|
|
1623
|
+
const statusLabel = tool.status === "failed" ? labels.toolFailed : tool.status === "denied" ? labels.toolDenied : running ? labels.toolRunning : undefined;
|
|
1624
|
+
const line = /* @__PURE__ */ jsxs7(TraceLine, {
|
|
1625
|
+
status: tool.status === "failed" ? "error" : running ? "running" : undefined,
|
|
1626
|
+
children: [
|
|
1627
|
+
/* @__PURE__ */ jsx19(TraceIcon, {
|
|
1628
|
+
children: /* @__PURE__ */ jsx19(WrenchIcon, {})
|
|
1629
|
+
}),
|
|
1630
|
+
/* @__PURE__ */ jsx19(TraceTitle, {
|
|
1631
|
+
children: tool.metadata.title ?? tool.name
|
|
1632
|
+
}),
|
|
1633
|
+
statusLabel ? /* @__PURE__ */ jsx19(TraceDescription, {
|
|
1634
|
+
children: statusLabel
|
|
1635
|
+
}) : null
|
|
1636
|
+
]
|
|
1474
1637
|
});
|
|
1475
|
-
|
|
1638
|
+
if (running)
|
|
1639
|
+
return line;
|
|
1640
|
+
return /* @__PURE__ */ jsxs7(TraceCollapsible, {
|
|
1641
|
+
children: [
|
|
1642
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleTrigger, {
|
|
1643
|
+
children: line
|
|
1644
|
+
}),
|
|
1645
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleContent, {
|
|
1646
|
+
children: /* @__PURE__ */ jsx19(ToolInput, {
|
|
1647
|
+
labels,
|
|
1648
|
+
locale,
|
|
1649
|
+
tool
|
|
1650
|
+
})
|
|
1651
|
+
})
|
|
1652
|
+
]
|
|
1653
|
+
});
|
|
1654
|
+
};
|
|
1476
1655
|
function ToolActivityLog({
|
|
1477
1656
|
disabled,
|
|
1478
1657
|
labels,
|
|
@@ -1482,115 +1661,71 @@ function ToolActivityLog({
|
|
|
1482
1661
|
tools,
|
|
1483
1662
|
workedSeconds
|
|
1484
1663
|
}) {
|
|
1485
|
-
const [
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1664
|
+
const [open, setOpen] = useState2();
|
|
1665
|
+
const approvals = tools.filter((tool) => tool.status === "approval-required");
|
|
1666
|
+
const activity = tools.filter((tool) => tool.status !== "approval-required");
|
|
1667
|
+
const currentTool = activity.at(-1);
|
|
1668
|
+
const running = pending && approvals.length === 0;
|
|
1669
|
+
const failed = activity.some((tool) => tool.status === "failed");
|
|
1670
|
+
if (tools.length === 0) {
|
|
1671
|
+
return /* @__PURE__ */ jsx19(Trace, {
|
|
1672
|
+
children: /* @__PURE__ */ jsxs7(TraceLine, {
|
|
1673
|
+
status: pending ? "running" : undefined,
|
|
1674
|
+
children: [
|
|
1675
|
+
/* @__PURE__ */ jsx19(TraceIcon, {
|
|
1676
|
+
children: /* @__PURE__ */ jsx19(WrenchIcon, {})
|
|
1677
|
+
}),
|
|
1678
|
+
/* @__PURE__ */ jsx19(TraceTitle, {
|
|
1679
|
+
children: labels.toolRunning
|
|
1680
|
+
})
|
|
1681
|
+
]
|
|
1494
1682
|
})
|
|
1495
1683
|
});
|
|
1496
1684
|
}
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
children: [
|
|
1505
|
-
loggedTools.length > 0 ? /* @__PURE__ */ jsxs7(Collapsible, {
|
|
1506
|
-
open: logOpen,
|
|
1507
|
-
onOpenChange: setLogOpen,
|
|
1685
|
+
return /* @__PURE__ */ jsxs7("div", {
|
|
1686
|
+
className: "flex flex-col gap-2",
|
|
1687
|
+
children: [
|
|
1688
|
+
currentTool ? /* @__PURE__ */ jsx19(Trace, {
|
|
1689
|
+
children: /* @__PURE__ */ jsxs7(TraceCollapsible, {
|
|
1690
|
+
open: open ?? running,
|
|
1691
|
+
onOpenChange: setOpen,
|
|
1508
1692
|
children: [
|
|
1509
|
-
/* @__PURE__ */
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1693
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleTrigger, {
|
|
1694
|
+
children: /* @__PURE__ */ jsxs7(TraceLine, {
|
|
1695
|
+
status: failed ? "error" : running ? "running" : undefined,
|
|
1696
|
+
children: [
|
|
1697
|
+
/* @__PURE__ */ jsx19(TraceIcon, {
|
|
1698
|
+
children: /* @__PURE__ */ jsx19(WrenchIcon, {})
|
|
1699
|
+
}),
|
|
1700
|
+
/* @__PURE__ */ jsx19(TraceTitle, {
|
|
1701
|
+
children: approvals.length > 0 || running ? labels.toolActivity : workedSeconds !== undefined ? labels.toolWorked(workedSeconds) : currentTool.metadata.title ?? currentTool.name
|
|
1702
|
+
}),
|
|
1703
|
+
failed || running ? /* @__PURE__ */ jsx19(TraceDescription, {
|
|
1704
|
+
children: failed ? labels.toolFailed : labels.toolRunning
|
|
1705
|
+
}) : null
|
|
1706
|
+
]
|
|
1707
|
+
})
|
|
1522
1708
|
}),
|
|
1523
|
-
/* @__PURE__ */ jsx19(
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
tool
|
|
1531
|
-
}
|
|
1709
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleContent, {
|
|
1710
|
+
children: /* @__PURE__ */ jsx19(Trace, {
|
|
1711
|
+
children: activity.map((tool) => /* @__PURE__ */ jsx19(ToolActivity, {
|
|
1712
|
+
labels,
|
|
1713
|
+
locale,
|
|
1714
|
+
pending,
|
|
1715
|
+
tool
|
|
1716
|
+
}, tool.toolCallId))
|
|
1717
|
+
})
|
|
1532
1718
|
})
|
|
1533
1719
|
]
|
|
1534
|
-
}) : null,
|
|
1535
|
-
/* @__PURE__ */ jsx19(ToolActivityCard, {
|
|
1536
|
-
disabled,
|
|
1537
|
-
labels,
|
|
1538
|
-
locale,
|
|
1539
|
-
onApproval,
|
|
1540
|
-
tool: currentTool
|
|
1541
1720
|
})
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
render: /* @__PURE__ */ jsx19(Marker, {
|
|
1551
|
-
className: "focus-visible:ring-ring/50 cursor-pointer rounded-sm outline-none focus-visible:ring-3",
|
|
1552
|
-
render: /* @__PURE__ */ jsx19("button", {
|
|
1553
|
-
type: "button"
|
|
1554
|
-
})
|
|
1555
|
-
}),
|
|
1556
|
-
children: [
|
|
1557
|
-
/* @__PURE__ */ jsx19(MarkerContent, {
|
|
1558
|
-
className: "flex-1",
|
|
1559
|
-
children: /* @__PURE__ */ jsx19("span", {
|
|
1560
|
-
className: cn("block w-fit max-w-full", isWorking && "shimmer"),
|
|
1561
|
-
children: showWorkedSummary ? labels.toolWorked(workedSeconds) : label
|
|
1562
|
-
})
|
|
1563
|
-
}),
|
|
1564
|
-
currentTool.status === "failed" || currentTool.status === "denied" ? /* @__PURE__ */ jsx19(Badge, {
|
|
1565
|
-
variant: "destructive",
|
|
1566
|
-
children: currentTool.status === "failed" ? labels.toolFailed : labels.toolDenied
|
|
1567
|
-
}) : null,
|
|
1568
|
-
/* @__PURE__ */ jsx19(ChevronDownIcon, {
|
|
1569
|
-
className: cn("transition-transform", logOpen && "rotate-180")
|
|
1570
|
-
}),
|
|
1571
|
-
/* @__PURE__ */ jsx19("span", {
|
|
1572
|
-
className: "sr-only",
|
|
1573
|
-
children: logOpen ? labels.viewLess : labels.viewMore
|
|
1574
|
-
})
|
|
1575
|
-
]
|
|
1576
|
-
}),
|
|
1577
|
-
/* @__PURE__ */ jsxs7(CollapsibleContent, {
|
|
1578
|
-
className: "mt-2 ml-2 flex flex-col gap-2 border-l pl-3",
|
|
1579
|
-
children: [
|
|
1580
|
-
/* @__PURE__ */ jsx19(Marker, {
|
|
1581
|
-
children: /* @__PURE__ */ jsx19(MarkerContent, {
|
|
1582
|
-
children: labels.toolRunning
|
|
1583
|
-
})
|
|
1584
|
-
}),
|
|
1585
|
-
loggedTools.map((tool) => /* @__PURE__ */ jsx19(ToolActivityCard, {
|
|
1586
|
-
disabled,
|
|
1587
|
-
labels,
|
|
1588
|
-
locale,
|
|
1589
|
-
onApproval,
|
|
1590
|
-
tool
|
|
1591
|
-
}, tool.toolCallId))
|
|
1592
|
-
]
|
|
1593
|
-
})
|
|
1721
|
+
}) : null,
|
|
1722
|
+
approvals.map((tool) => /* @__PURE__ */ jsx19(ToolApproval, {
|
|
1723
|
+
disabled,
|
|
1724
|
+
labels,
|
|
1725
|
+
locale,
|
|
1726
|
+
onApproval,
|
|
1727
|
+
tool
|
|
1728
|
+
}, tool.toolCallId))
|
|
1594
1729
|
]
|
|
1595
1730
|
});
|
|
1596
1731
|
}
|
|
@@ -1651,21 +1786,28 @@ function AgentMessageRow({
|
|
|
1651
1786
|
className: "whitespace-pre-wrap",
|
|
1652
1787
|
children: message.text
|
|
1653
1788
|
})
|
|
1654
|
-
}) :
|
|
1789
|
+
}) : /* @__PURE__ */ jsx19(Bubble, {
|
|
1790
|
+
variant: "ghost",
|
|
1655
1791
|
className: "w-full",
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1792
|
+
children: /* @__PURE__ */ jsx19(BubbleContent, {
|
|
1793
|
+
className: "w-full",
|
|
1794
|
+
children: message.markdown ? /* @__PURE__ */ jsx19(MarkdownContent, {
|
|
1795
|
+
className: "w-full",
|
|
1796
|
+
codeBlocks: message.markdown.codeBlocks,
|
|
1797
|
+
html: message.markdown.html,
|
|
1798
|
+
messages: {
|
|
1799
|
+
[locale]: {
|
|
1800
|
+
codeDescription: labels.codeDescription,
|
|
1801
|
+
copied: labels.copied,
|
|
1802
|
+
copy: labels.copy
|
|
1803
|
+
}
|
|
1804
|
+
},
|
|
1805
|
+
locale
|
|
1806
|
+
}) : /* @__PURE__ */ jsx19("div", {
|
|
1807
|
+
className: "whitespace-pre-wrap",
|
|
1808
|
+
children: message.text
|
|
1809
|
+
})
|
|
1810
|
+
})
|
|
1669
1811
|
}) : null
|
|
1670
1812
|
]
|
|
1671
1813
|
})
|
|
@@ -1858,7 +2000,6 @@ function AgentWidget({
|
|
|
1858
2000
|
children: [
|
|
1859
2001
|
/* @__PURE__ */ jsx19(MessageScrollerViewport, {
|
|
1860
2002
|
"aria-label": labels.title,
|
|
1861
|
-
className: "[scrollbar-width:thin] [scrollbar-color:var(--border)_transparent]",
|
|
1862
2003
|
children: /* @__PURE__ */ jsxs7(MessageScrollerContent, {
|
|
1863
2004
|
"aria-busy": state.pending,
|
|
1864
2005
|
className: "p-4",
|
|
@@ -1913,22 +2054,30 @@ function AgentWidget({
|
|
|
1913
2054
|
},
|
|
1914
2055
|
children: /* @__PURE__ */ jsxs7(InputGroup, {
|
|
1915
2056
|
children: [
|
|
1916
|
-
activeContext ? /* @__PURE__ */
|
|
2057
|
+
activeContext ? /* @__PURE__ */ jsx19(InputGroupAddon, {
|
|
1917
2058
|
align: "block-start",
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
2059
|
+
children: /* @__PURE__ */ jsxs7(Attachment, {
|
|
2060
|
+
size: "xs",
|
|
2061
|
+
className: "min-w-0",
|
|
2062
|
+
children: [
|
|
2063
|
+
activeContext.icon ? /* @__PURE__ */ jsx19(AttachmentMedia, {
|
|
2064
|
+
children: activeContext.icon
|
|
2065
|
+
}) : null,
|
|
2066
|
+
/* @__PURE__ */ jsx19(AttachmentContent, {
|
|
2067
|
+
children: /* @__PURE__ */ jsx19(AttachmentTitle, {
|
|
2068
|
+
children: activeContext.label
|
|
2069
|
+
})
|
|
2070
|
+
}),
|
|
2071
|
+
onRemoveContext ? /* @__PURE__ */ jsx19(AttachmentActions, {
|
|
2072
|
+
children: /* @__PURE__ */ jsx19(AttachmentAction, {
|
|
2073
|
+
type: "button",
|
|
2074
|
+
"aria-label": `${labels.removeContext}: ${activeContext.label}`,
|
|
2075
|
+
onClick: onRemoveContext,
|
|
2076
|
+
children: /* @__PURE__ */ jsx19(XIcon2, {})
|
|
2077
|
+
})
|
|
2078
|
+
}) : null
|
|
2079
|
+
]
|
|
2080
|
+
})
|
|
1932
2081
|
}) : null,
|
|
1933
2082
|
/* @__PURE__ */ jsxs7("div", {
|
|
1934
2083
|
className: "relative w-full min-w-0 self-stretch text-left",
|
|
@@ -1945,6 +2094,7 @@ function AgentWidget({
|
|
|
1945
2094
|
children: [
|
|
1946
2095
|
/* @__PURE__ */ jsx19(PopoverTrigger, {
|
|
1947
2096
|
id: referenceInputId,
|
|
2097
|
+
nativeButton: false,
|
|
1948
2098
|
render: /* @__PURE__ */ jsx19(InputGroupTextarea, {
|
|
1949
2099
|
ref: inputRef,
|
|
1950
2100
|
className: "caret-foreground selection:bg-primary selection:text-primary-foreground relative max-h-32 w-full [scrollbar-width:thin] [scrollbar-color:var(--border)_transparent] [scrollbar-gutter:stable] overflow-y-auto overscroll-contain text-left text-transparent",
|