@krak-stack/registry 0.1.27 → 0.1.28
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/dist/components/ui/data-table.js +238 -237
- package/dist/components/ui/effect-form.js +169 -170
- package/dist/components/ui/form.js +112 -113
- package/dist/components/ui/icon-input.js +40 -43
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/sidebar-layout.js +66 -71
- package/dist/components/ui/theme-switcher.js +3 -3
- package/dist/components/ui/virtualized-combobox.js +31 -34
- package/dist/lib/docs.js +133 -138
- package/dist/lib/docs.server.js +23 -47
- package/dist/lib/documentation-toolkit.js +24 -48
- package/dist/lib/httpapi-cli.js +7 -7
- package/dist/lib/httpapi-client.js +3 -3
- package/dist/lib/httpapi-helpers.js +11 -11
- package/dist/lib/httpapi-mcp.js +2 -2
- package/dist/lib/httpapi-toolkit.js +2 -2
- package/dist/lib/query.d.ts +16 -6
- package/dist/lib/query.js +17 -8
- package/dist/lib/seo.js +2 -2
- package/dist/lib/webfetch-toolkit.js +6 -6
- package/dist/services/agent/client/index.js +127 -128
- package/dist/services/agent/schema.js +5 -5
- package/dist/services/file-extraction/index.js +4 -4
- package/dist/services/file-extraction/schema.js +2 -2
- package/dist/services/health/index.js +9 -9
- package/dist/services/notification/channels/ses/index.js +2 -2
- package/dist/services/notification/channels/ses/schema.js +2 -2
- package/dist/services/notification/client/index.js +5 -5
- package/dist/services/notification/index.js +2 -2
- package/dist/services/notification/persistence/drizzle.js +2 -2
- package/dist/services/notification/persistence/index.js +15 -15
- package/dist/services/notification/persistence/schema.js +12 -12
- package/dist/services/notification/public.js +7 -7
- package/dist/services/notification/schema.js +2 -2
- package/dist/services/s3/index.js +2 -2
- package/dist/services/s3/schema.js +2 -2
- package/package.json +1 -1
|
@@ -780,12 +780,11 @@ import { cva as cva6 } from "class-variance-authority";
|
|
|
780
780
|
|
|
781
781
|
// ../../src/components/ui/input.tsx
|
|
782
782
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
783
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
784
783
|
|
|
785
784
|
// ../../src/components/ui/textarea.tsx
|
|
786
|
-
import { jsx as
|
|
785
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
787
786
|
function Textarea({ className, ...props }) {
|
|
788
|
-
return /* @__PURE__ */
|
|
787
|
+
return /* @__PURE__ */ jsx12("textarea", {
|
|
789
788
|
"data-slot": "textarea",
|
|
790
789
|
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),
|
|
791
790
|
...props
|
|
@@ -793,9 +792,9 @@ function Textarea({ className, ...props }) {
|
|
|
793
792
|
}
|
|
794
793
|
|
|
795
794
|
// ../../src/components/ui/input-group.tsx
|
|
796
|
-
import { jsx as
|
|
795
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
797
796
|
function InputGroup({ className, ...props }) {
|
|
798
|
-
return /* @__PURE__ */
|
|
797
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
799
798
|
"data-slot": "input-group",
|
|
800
799
|
role: "group",
|
|
801
800
|
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),
|
|
@@ -818,7 +817,7 @@ function InputGroupAddon({
|
|
|
818
817
|
align = "inline-start",
|
|
819
818
|
...props
|
|
820
819
|
}) {
|
|
821
|
-
return /* @__PURE__ */
|
|
820
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
822
821
|
role: "group",
|
|
823
822
|
"data-slot": "input-group-addon",
|
|
824
823
|
"data-align": align,
|
|
@@ -850,7 +849,7 @@ function InputGroupButton({
|
|
|
850
849
|
size = "xs",
|
|
851
850
|
...props
|
|
852
851
|
}) {
|
|
853
|
-
return /* @__PURE__ */
|
|
852
|
+
return /* @__PURE__ */ jsx13(Button, {
|
|
854
853
|
type,
|
|
855
854
|
"data-size": size,
|
|
856
855
|
variant,
|
|
@@ -862,7 +861,7 @@ function InputGroupTextarea({
|
|
|
862
861
|
className,
|
|
863
862
|
...props
|
|
864
863
|
}) {
|
|
865
|
-
return /* @__PURE__ */
|
|
864
|
+
return /* @__PURE__ */ jsx13(Textarea, {
|
|
866
865
|
"data-slot": "input-group-control",
|
|
867
866
|
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),
|
|
868
867
|
...props
|
|
@@ -873,7 +872,7 @@ function InputGroupTextarea({
|
|
|
873
872
|
import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
|
|
874
873
|
import { useRender as useRender3 } from "@base-ui/react/use-render";
|
|
875
874
|
import { cva as cva7 } from "class-variance-authority";
|
|
876
|
-
import { jsx as
|
|
875
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
877
876
|
var markerVariants = cva7("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", {
|
|
878
877
|
variants: {
|
|
879
878
|
variant: {
|
|
@@ -902,7 +901,7 @@ function Marker({
|
|
|
902
901
|
});
|
|
903
902
|
}
|
|
904
903
|
function MarkerContent({ className, ...props }) {
|
|
905
|
-
return /* @__PURE__ */
|
|
904
|
+
return /* @__PURE__ */ jsx14("span", {
|
|
906
905
|
"data-slot": "marker-content",
|
|
907
906
|
className: cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
908
907
|
...props
|
|
@@ -910,13 +909,13 @@ function MarkerContent({ className, ...props }) {
|
|
|
910
909
|
}
|
|
911
910
|
|
|
912
911
|
// ../../src/components/ui/message.tsx
|
|
913
|
-
import { jsx as
|
|
912
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
914
913
|
function Message({
|
|
915
914
|
className,
|
|
916
915
|
align = "start",
|
|
917
916
|
...props
|
|
918
917
|
}) {
|
|
919
|
-
return /* @__PURE__ */
|
|
918
|
+
return /* @__PURE__ */ jsx15("div", {
|
|
920
919
|
"data-slot": "message",
|
|
921
920
|
"data-align": align,
|
|
922
921
|
className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
|
|
@@ -924,7 +923,7 @@ function Message({
|
|
|
924
923
|
});
|
|
925
924
|
}
|
|
926
925
|
function MessageContent({ className, ...props }) {
|
|
927
|
-
return /* @__PURE__ */
|
|
926
|
+
return /* @__PURE__ */ jsx15("div", {
|
|
928
927
|
"data-slot": "message-content",
|
|
929
928
|
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),
|
|
930
929
|
...props
|
|
@@ -939,9 +938,9 @@ import {
|
|
|
939
938
|
useMessageScrollerVisibility
|
|
940
939
|
} from "@shadcn/react/message-scroller";
|
|
941
940
|
import { ArrowDownIcon } from "lucide-react";
|
|
942
|
-
import { jsx as
|
|
941
|
+
import { jsx as jsx16, jsxs as jsxs5, Fragment } from "react/jsx-runtime";
|
|
943
942
|
function MessageScrollerProvider(props) {
|
|
944
|
-
return /* @__PURE__ */
|
|
943
|
+
return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Provider, {
|
|
945
944
|
...props
|
|
946
945
|
});
|
|
947
946
|
}
|
|
@@ -949,7 +948,7 @@ function MessageScroller({
|
|
|
949
948
|
className,
|
|
950
949
|
...props
|
|
951
950
|
}) {
|
|
952
|
-
return /* @__PURE__ */
|
|
951
|
+
return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Root, {
|
|
953
952
|
"data-slot": "message-scroller",
|
|
954
953
|
className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className),
|
|
955
954
|
...props
|
|
@@ -959,7 +958,7 @@ function MessageScrollerViewport({
|
|
|
959
958
|
className,
|
|
960
959
|
...props
|
|
961
960
|
}) {
|
|
962
|
-
return /* @__PURE__ */
|
|
961
|
+
return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Viewport, {
|
|
963
962
|
"data-slot": "message-scroller-viewport",
|
|
964
963
|
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),
|
|
965
964
|
...props
|
|
@@ -969,7 +968,7 @@ function MessageScrollerContent({
|
|
|
969
968
|
className,
|
|
970
969
|
...props
|
|
971
970
|
}) {
|
|
972
|
-
return /* @__PURE__ */
|
|
971
|
+
return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Content, {
|
|
973
972
|
"data-slot": "message-scroller-content",
|
|
974
973
|
className: cn("flex h-max min-h-full flex-col gap-8", className),
|
|
975
974
|
...props
|
|
@@ -980,7 +979,7 @@ function MessageScrollerItem({
|
|
|
980
979
|
scrollAnchor = false,
|
|
981
980
|
...props
|
|
982
981
|
}) {
|
|
983
|
-
return /* @__PURE__ */
|
|
982
|
+
return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Item, {
|
|
984
983
|
"data-slot": "message-scroller-item",
|
|
985
984
|
scrollAnchor,
|
|
986
985
|
className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
|
|
@@ -996,22 +995,22 @@ function MessageScrollerButton({
|
|
|
996
995
|
size = "icon-sm",
|
|
997
996
|
...props
|
|
998
997
|
}) {
|
|
999
|
-
return /* @__PURE__ */
|
|
998
|
+
return /* @__PURE__ */ jsx16(MessageScrollerPrimitive.Button, {
|
|
1000
999
|
"data-slot": "message-scroller-button",
|
|
1001
1000
|
"data-direction": direction,
|
|
1002
1001
|
"data-variant": variant,
|
|
1003
1002
|
"data-size": size,
|
|
1004
1003
|
direction,
|
|
1005
1004
|
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),
|
|
1006
|
-
render: render ?? /* @__PURE__ */
|
|
1005
|
+
render: render ?? /* @__PURE__ */ jsx16(Button, {
|
|
1007
1006
|
variant,
|
|
1008
1007
|
size
|
|
1009
1008
|
}),
|
|
1010
1009
|
...props,
|
|
1011
1010
|
children: children ?? /* @__PURE__ */ jsxs5(Fragment, {
|
|
1012
1011
|
children: [
|
|
1013
|
-
/* @__PURE__ */
|
|
1014
|
-
/* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ jsx16(ArrowDownIcon, {}),
|
|
1013
|
+
/* @__PURE__ */ jsx16("span", {
|
|
1015
1014
|
className: "sr-only",
|
|
1016
1015
|
children: direction === "end" ? "Scroll to end" : "Scroll to start"
|
|
1017
1016
|
})
|
|
@@ -1022,15 +1021,15 @@ function MessageScrollerButton({
|
|
|
1022
1021
|
|
|
1023
1022
|
// ../../src/components/ui/popover.tsx
|
|
1024
1023
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
1025
|
-
import { jsx as
|
|
1024
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1026
1025
|
function Popover({ ...props }) {
|
|
1027
|
-
return /* @__PURE__ */
|
|
1026
|
+
return /* @__PURE__ */ jsx17(PopoverPrimitive.Root, {
|
|
1028
1027
|
"data-slot": "popover",
|
|
1029
1028
|
...props
|
|
1030
1029
|
});
|
|
1031
1030
|
}
|
|
1032
1031
|
function PopoverTrigger({ ...props }) {
|
|
1033
|
-
return /* @__PURE__ */
|
|
1032
|
+
return /* @__PURE__ */ jsx17(PopoverPrimitive.Trigger, {
|
|
1034
1033
|
"data-slot": "popover-trigger",
|
|
1035
1034
|
...props
|
|
1036
1035
|
});
|
|
@@ -1043,14 +1042,14 @@ function PopoverContent({
|
|
|
1043
1042
|
sideOffset = 4,
|
|
1044
1043
|
...props
|
|
1045
1044
|
}) {
|
|
1046
|
-
return /* @__PURE__ */
|
|
1047
|
-
children: /* @__PURE__ */
|
|
1045
|
+
return /* @__PURE__ */ jsx17(PopoverPrimitive.Portal, {
|
|
1046
|
+
children: /* @__PURE__ */ jsx17(PopoverPrimitive.Positioner, {
|
|
1048
1047
|
align,
|
|
1049
1048
|
alignOffset,
|
|
1050
1049
|
side,
|
|
1051
1050
|
sideOffset,
|
|
1052
1051
|
className: "isolate z-50",
|
|
1053
|
-
children: /* @__PURE__ */
|
|
1052
|
+
children: /* @__PURE__ */ jsx17(PopoverPrimitive.Popup, {
|
|
1054
1053
|
"data-slot": "popover-content",
|
|
1055
1054
|
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),
|
|
1056
1055
|
...props
|
|
@@ -1061,16 +1060,16 @@ function PopoverContent({
|
|
|
1061
1060
|
|
|
1062
1061
|
// ../../src/components/ui/tooltip.tsx
|
|
1063
1062
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
1064
|
-
import { jsx as
|
|
1063
|
+
import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1065
1064
|
"use client";
|
|
1066
1065
|
function Tooltip({ ...props }) {
|
|
1067
|
-
return /* @__PURE__ */
|
|
1066
|
+
return /* @__PURE__ */ jsx18(TooltipPrimitive.Root, {
|
|
1068
1067
|
"data-slot": "tooltip",
|
|
1069
1068
|
...props
|
|
1070
1069
|
});
|
|
1071
1070
|
}
|
|
1072
1071
|
function TooltipTrigger({ ...props }) {
|
|
1073
|
-
return /* @__PURE__ */
|
|
1072
|
+
return /* @__PURE__ */ jsx18(TooltipPrimitive.Trigger, {
|
|
1074
1073
|
"data-slot": "tooltip-trigger",
|
|
1075
1074
|
...props
|
|
1076
1075
|
});
|
|
@@ -1084,8 +1083,8 @@ function TooltipContent({
|
|
|
1084
1083
|
children,
|
|
1085
1084
|
...props
|
|
1086
1085
|
}) {
|
|
1087
|
-
return /* @__PURE__ */
|
|
1088
|
-
children: /* @__PURE__ */
|
|
1086
|
+
return /* @__PURE__ */ jsx18(TooltipPrimitive.Portal, {
|
|
1087
|
+
children: /* @__PURE__ */ jsx18(TooltipPrimitive.Positioner, {
|
|
1089
1088
|
align,
|
|
1090
1089
|
alignOffset,
|
|
1091
1090
|
side,
|
|
@@ -1097,7 +1096,7 @@ function TooltipContent({
|
|
|
1097
1096
|
...props,
|
|
1098
1097
|
children: [
|
|
1099
1098
|
children,
|
|
1100
|
-
/* @__PURE__ */
|
|
1099
|
+
/* @__PURE__ */ jsx18(TooltipPrimitive.Arrow, {
|
|
1101
1100
|
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"
|
|
1102
1101
|
})
|
|
1103
1102
|
]
|
|
@@ -1625,7 +1624,7 @@ var AgentStreamError = Schema2.Struct({
|
|
|
1625
1624
|
});
|
|
1626
1625
|
|
|
1627
1626
|
// ../../src/services/agent/client/widget.tsx
|
|
1628
|
-
import { jsx as
|
|
1627
|
+
import { jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1629
1628
|
var messages = {
|
|
1630
1629
|
en: {
|
|
1631
1630
|
approve: "Approve",
|
|
@@ -1718,7 +1717,7 @@ var highlightedInput = (input, references) => {
|
|
|
1718
1717
|
return input;
|
|
1719
1718
|
const mentionPattern = new RegExp(`(${mentions.map(escapeRegExp).join("|")})(?![\\p{L}\\p{N}_-])`, "gu");
|
|
1720
1719
|
const mentionSet = new Set(mentions);
|
|
1721
|
-
return input.split(mentionPattern).map((part, index) => mentionSet.has(part) ? /* @__PURE__ */
|
|
1720
|
+
return input.split(mentionPattern).map((part, index) => mentionSet.has(part) ? /* @__PURE__ */ jsx19("span", {
|
|
1722
1721
|
className: "bg-primary text-primary-foreground rounded-sm [box-shadow:2px_0_0_var(--primary),-2px_0_0_var(--primary)]",
|
|
1723
1722
|
children: part
|
|
1724
1723
|
}, `${part}:${index}`) : part);
|
|
@@ -1755,14 +1754,14 @@ var ToolLabel = ({
|
|
|
1755
1754
|
return label;
|
|
1756
1755
|
return /* @__PURE__ */ jsxs7(Tooltip, {
|
|
1757
1756
|
children: [
|
|
1758
|
-
/* @__PURE__ */
|
|
1759
|
-
render: /* @__PURE__ */
|
|
1757
|
+
/* @__PURE__ */ jsx19(TooltipTrigger, {
|
|
1758
|
+
render: /* @__PURE__ */ jsx19("span", {
|
|
1760
1759
|
className: "cursor-help",
|
|
1761
1760
|
tabIndex: 0
|
|
1762
1761
|
}),
|
|
1763
1762
|
children: label
|
|
1764
1763
|
}),
|
|
1765
|
-
/* @__PURE__ */
|
|
1764
|
+
/* @__PURE__ */ jsx19(TooltipContent, {
|
|
1766
1765
|
className: "max-w-sm",
|
|
1767
1766
|
children: description
|
|
1768
1767
|
})
|
|
@@ -1781,23 +1780,23 @@ function ToolActivityCard({
|
|
|
1781
1780
|
if (!requiresApproval) {
|
|
1782
1781
|
return /* @__PURE__ */ jsxs7(Marker, {
|
|
1783
1782
|
children: [
|
|
1784
|
-
/* @__PURE__ */
|
|
1785
|
-
children: /* @__PURE__ */
|
|
1783
|
+
/* @__PURE__ */ jsx19(MarkerContent, {
|
|
1784
|
+
children: /* @__PURE__ */ jsx19("span", {
|
|
1786
1785
|
className: cn("block w-fit max-w-full", tool.status === "running" && "shimmer"),
|
|
1787
|
-
children: /* @__PURE__ */
|
|
1786
|
+
children: /* @__PURE__ */ jsx19(ToolLabel, {
|
|
1788
1787
|
description: tool.metadata.description,
|
|
1789
1788
|
label
|
|
1790
1789
|
})
|
|
1791
1790
|
})
|
|
1792
1791
|
}),
|
|
1793
|
-
tool.status === "failed" || tool.status === "denied" ? /* @__PURE__ */
|
|
1792
|
+
tool.status === "failed" || tool.status === "denied" ? /* @__PURE__ */ jsx19(Badge, {
|
|
1794
1793
|
variant: "destructive",
|
|
1795
1794
|
children: tool.status === "failed" ? labels.toolFailed : labels.toolDenied
|
|
1796
1795
|
}) : null
|
|
1797
1796
|
]
|
|
1798
1797
|
});
|
|
1799
1798
|
}
|
|
1800
|
-
return /* @__PURE__ */
|
|
1799
|
+
return /* @__PURE__ */ jsx19(Collapsible, {
|
|
1801
1800
|
className: "mx-1",
|
|
1802
1801
|
open: detailsOpen,
|
|
1803
1802
|
onOpenChange: setDetailsOpen,
|
|
@@ -1810,25 +1809,25 @@ function ToolActivityCard({
|
|
|
1810
1809
|
/* @__PURE__ */ jsxs7(CardTitle, {
|
|
1811
1810
|
className: "flex items-center gap-2",
|
|
1812
1811
|
children: [
|
|
1813
|
-
/* @__PURE__ */
|
|
1812
|
+
/* @__PURE__ */ jsx19(ToolLabel, {
|
|
1814
1813
|
description: tool.metadata.description,
|
|
1815
1814
|
label
|
|
1816
1815
|
}),
|
|
1817
|
-
tool.metadata.destructive ? /* @__PURE__ */
|
|
1816
|
+
tool.metadata.destructive ? /* @__PURE__ */ jsx19(Badge, {
|
|
1818
1817
|
variant: "destructive",
|
|
1819
1818
|
children: labels.approvalDestructiveLabel
|
|
1820
1819
|
}) : null
|
|
1821
1820
|
]
|
|
1822
1821
|
}),
|
|
1823
|
-
/* @__PURE__ */
|
|
1822
|
+
/* @__PURE__ */ jsx19(CardDescription, {
|
|
1824
1823
|
children: tool.metadata.destructive ? labels.approvalDestructive : labels.approvalRequired
|
|
1825
1824
|
})
|
|
1826
1825
|
]
|
|
1827
1826
|
}),
|
|
1828
|
-
/* @__PURE__ */
|
|
1829
|
-
children: /* @__PURE__ */
|
|
1827
|
+
/* @__PURE__ */ jsx19(CollapsibleContent, {
|
|
1828
|
+
children: /* @__PURE__ */ jsx19(CardContent, {
|
|
1830
1829
|
className: "min-w-0 overflow-hidden border-y py-3",
|
|
1831
|
-
children: /* @__PURE__ */
|
|
1830
|
+
children: /* @__PURE__ */ jsx19(CodeBlock, {
|
|
1832
1831
|
code: inputCode(tool.input),
|
|
1833
1832
|
language: "json",
|
|
1834
1833
|
messages: { copied: labels.copied, copy: labels.copy }
|
|
@@ -1838,28 +1837,28 @@ function ToolActivityCard({
|
|
|
1838
1837
|
/* @__PURE__ */ jsxs7(CardFooter, {
|
|
1839
1838
|
className: "flex flex-wrap gap-2",
|
|
1840
1839
|
children: [
|
|
1841
|
-
/* @__PURE__ */
|
|
1840
|
+
/* @__PURE__ */ jsx19(Button, {
|
|
1842
1841
|
size: "sm",
|
|
1843
1842
|
variant: tool.metadata.destructive ? "destructive" : "default",
|
|
1844
1843
|
disabled,
|
|
1845
1844
|
onClick: () => onApproval(tool, true),
|
|
1846
1845
|
children: labels.approve
|
|
1847
1846
|
}),
|
|
1848
|
-
/* @__PURE__ */
|
|
1847
|
+
/* @__PURE__ */ jsx19(Button, {
|
|
1849
1848
|
size: "sm",
|
|
1850
1849
|
variant: "outline",
|
|
1851
1850
|
disabled,
|
|
1852
1851
|
onClick: () => onApproval(tool, false),
|
|
1853
1852
|
children: labels.cancel
|
|
1854
1853
|
}),
|
|
1855
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ jsx19(CollapsibleTrigger, {
|
|
1856
1855
|
render: /* @__PURE__ */ jsxs7(Button, {
|
|
1857
1856
|
variant: "ghost",
|
|
1858
1857
|
size: "sm",
|
|
1859
1858
|
className: "ml-auto",
|
|
1860
1859
|
children: [
|
|
1861
1860
|
detailsOpen ? labels.viewLess : labels.viewMore,
|
|
1862
|
-
/* @__PURE__ */
|
|
1861
|
+
/* @__PURE__ */ jsx19(ChevronDownIcon, {
|
|
1863
1862
|
"data-icon": "inline-end",
|
|
1864
1863
|
className: cn("transition-transform", detailsOpen && "rotate-180")
|
|
1865
1864
|
})
|
|
@@ -1883,9 +1882,9 @@ function ToolActivityLog({
|
|
|
1883
1882
|
const [logOpen, setLogOpen] = useState2(false);
|
|
1884
1883
|
const currentTool = tools.at(-1);
|
|
1885
1884
|
if (!currentTool) {
|
|
1886
|
-
return /* @__PURE__ */
|
|
1887
|
-
children: /* @__PURE__ */
|
|
1888
|
-
children: /* @__PURE__ */
|
|
1885
|
+
return /* @__PURE__ */ jsx19(Marker, {
|
|
1886
|
+
children: /* @__PURE__ */ jsx19(MarkerContent, {
|
|
1887
|
+
children: /* @__PURE__ */ jsx19("span", {
|
|
1889
1888
|
className: "shimmer block w-fit max-w-full",
|
|
1890
1889
|
children: labels.toolRunning
|
|
1891
1890
|
})
|
|
@@ -1905,22 +1904,22 @@ function ToolActivityLog({
|
|
|
1905
1904
|
onOpenChange: setLogOpen,
|
|
1906
1905
|
children: [
|
|
1907
1906
|
/* @__PURE__ */ jsxs7(CollapsibleTrigger, {
|
|
1908
|
-
render: /* @__PURE__ */
|
|
1907
|
+
render: /* @__PURE__ */ jsx19(Button, {
|
|
1909
1908
|
variant: "ghost",
|
|
1910
1909
|
size: "sm",
|
|
1911
1910
|
className: "ml-auto"
|
|
1912
1911
|
}),
|
|
1913
1912
|
children: [
|
|
1914
1913
|
logOpen ? labels.viewLess : labels.viewMore,
|
|
1915
|
-
/* @__PURE__ */
|
|
1914
|
+
/* @__PURE__ */ jsx19(ChevronDownIcon, {
|
|
1916
1915
|
"data-icon": "inline-end",
|
|
1917
1916
|
className: cn("transition-transform", logOpen && "rotate-180")
|
|
1918
1917
|
})
|
|
1919
1918
|
]
|
|
1920
1919
|
}),
|
|
1921
|
-
/* @__PURE__ */
|
|
1920
|
+
/* @__PURE__ */ jsx19(CollapsibleContent, {
|
|
1922
1921
|
className: "mt-2 ml-2 flex flex-col gap-2 border-l pl-3",
|
|
1923
|
-
children: loggedTools.map((tool) => /* @__PURE__ */
|
|
1922
|
+
children: loggedTools.map((tool) => /* @__PURE__ */ jsx19(ToolActivityCard, {
|
|
1924
1923
|
disabled,
|
|
1925
1924
|
labels,
|
|
1926
1925
|
onApproval,
|
|
@@ -1929,7 +1928,7 @@ function ToolActivityLog({
|
|
|
1929
1928
|
})
|
|
1930
1929
|
]
|
|
1931
1930
|
}) : null,
|
|
1932
|
-
/* @__PURE__ */
|
|
1931
|
+
/* @__PURE__ */ jsx19(ToolActivityCard, {
|
|
1933
1932
|
disabled,
|
|
1934
1933
|
labels,
|
|
1935
1934
|
onApproval,
|
|
@@ -1943,28 +1942,28 @@ function ToolActivityLog({
|
|
|
1943
1942
|
onOpenChange: setLogOpen,
|
|
1944
1943
|
children: [
|
|
1945
1944
|
/* @__PURE__ */ jsxs7(CollapsibleTrigger, {
|
|
1946
|
-
render: /* @__PURE__ */
|
|
1945
|
+
render: /* @__PURE__ */ jsx19(Marker, {
|
|
1947
1946
|
className: "focus-visible:ring-ring/50 cursor-pointer rounded-sm outline-none focus-visible:ring-3",
|
|
1948
|
-
render: /* @__PURE__ */
|
|
1947
|
+
render: /* @__PURE__ */ jsx19("button", {
|
|
1949
1948
|
type: "button"
|
|
1950
1949
|
})
|
|
1951
1950
|
}),
|
|
1952
1951
|
children: [
|
|
1953
|
-
/* @__PURE__ */
|
|
1952
|
+
/* @__PURE__ */ jsx19(MarkerContent, {
|
|
1954
1953
|
className: "flex-1",
|
|
1955
|
-
children: /* @__PURE__ */
|
|
1954
|
+
children: /* @__PURE__ */ jsx19("span", {
|
|
1956
1955
|
className: cn("block w-fit max-w-full", isWorking && "shimmer"),
|
|
1957
1956
|
children: showWorkedSummary ? labels.toolWorked(workedSeconds) : label
|
|
1958
1957
|
})
|
|
1959
1958
|
}),
|
|
1960
|
-
currentTool.status === "failed" || currentTool.status === "denied" ? /* @__PURE__ */
|
|
1959
|
+
currentTool.status === "failed" || currentTool.status === "denied" ? /* @__PURE__ */ jsx19(Badge, {
|
|
1961
1960
|
variant: "destructive",
|
|
1962
1961
|
children: currentTool.status === "failed" ? labels.toolFailed : labels.toolDenied
|
|
1963
1962
|
}) : null,
|
|
1964
|
-
/* @__PURE__ */
|
|
1963
|
+
/* @__PURE__ */ jsx19(ChevronDownIcon, {
|
|
1965
1964
|
className: cn("transition-transform", logOpen && "rotate-180")
|
|
1966
1965
|
}),
|
|
1967
|
-
/* @__PURE__ */
|
|
1966
|
+
/* @__PURE__ */ jsx19("span", {
|
|
1968
1967
|
className: "sr-only",
|
|
1969
1968
|
children: logOpen ? labels.viewLess : labels.viewMore
|
|
1970
1969
|
})
|
|
@@ -1973,12 +1972,12 @@ function ToolActivityLog({
|
|
|
1973
1972
|
/* @__PURE__ */ jsxs7(CollapsibleContent, {
|
|
1974
1973
|
className: "mt-2 ml-2 flex flex-col gap-2 border-l pl-3",
|
|
1975
1974
|
children: [
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
children: /* @__PURE__ */
|
|
1975
|
+
/* @__PURE__ */ jsx19(Marker, {
|
|
1976
|
+
children: /* @__PURE__ */ jsx19(MarkerContent, {
|
|
1978
1977
|
children: labels.toolRunning
|
|
1979
1978
|
})
|
|
1980
1979
|
}),
|
|
1981
|
-
loggedTools.map((tool) => /* @__PURE__ */
|
|
1980
|
+
loggedTools.map((tool) => /* @__PURE__ */ jsx19(ToolActivityCard, {
|
|
1982
1981
|
disabled,
|
|
1983
1982
|
labels,
|
|
1984
1983
|
onApproval,
|
|
@@ -2026,11 +2025,11 @@ function AgentMessageRow({
|
|
|
2026
2025
|
pending,
|
|
2027
2026
|
workedSeconds
|
|
2028
2027
|
]);
|
|
2029
|
-
return /* @__PURE__ */
|
|
2028
|
+
return /* @__PURE__ */ jsx19(Message, {
|
|
2030
2029
|
align: isUser ? "end" : "start",
|
|
2031
2030
|
children: /* @__PURE__ */ jsxs7(MessageContent, {
|
|
2032
2031
|
children: [
|
|
2033
|
-
!isUser && (message.tools.length > 0 || pending && !message.text) ? /* @__PURE__ */
|
|
2032
|
+
!isUser && (message.tools.length > 0 || pending && !message.text) ? /* @__PURE__ */ jsx19(ToolActivityLog, {
|
|
2034
2033
|
disabled,
|
|
2035
2034
|
labels,
|
|
2036
2035
|
onApproval,
|
|
@@ -2038,18 +2037,18 @@ function AgentMessageRow({
|
|
|
2038
2037
|
tools: message.tools,
|
|
2039
2038
|
workedSeconds
|
|
2040
2039
|
}) : null,
|
|
2041
|
-
message.text ? isUser ? /* @__PURE__ */
|
|
2040
|
+
message.text ? isUser ? /* @__PURE__ */ jsx19(Bubble, {
|
|
2042
2041
|
align: "end",
|
|
2043
|
-
children: /* @__PURE__ */
|
|
2042
|
+
children: /* @__PURE__ */ jsx19(BubbleContent, {
|
|
2044
2043
|
className: "whitespace-pre-wrap",
|
|
2045
2044
|
children: message.text
|
|
2046
2045
|
})
|
|
2047
|
-
}) : message.markdown ? /* @__PURE__ */
|
|
2046
|
+
}) : message.markdown ? /* @__PURE__ */ jsx19(MarkdownContent, {
|
|
2048
2047
|
className: "w-full",
|
|
2049
2048
|
codeBlocks: message.markdown.codeBlocks,
|
|
2050
2049
|
html: message.markdown.html,
|
|
2051
2050
|
messages: { copied: labels.copied, copy: labels.copy }
|
|
2052
|
-
}) : /* @__PURE__ */
|
|
2051
|
+
}) : /* @__PURE__ */ jsx19("div", {
|
|
2053
2052
|
className: "w-full whitespace-pre-wrap",
|
|
2054
2053
|
children: message.text
|
|
2055
2054
|
}) : null
|
|
@@ -2152,29 +2151,29 @@ function AgentWidget({
|
|
|
2152
2151
|
disablePointerDismissal: true,
|
|
2153
2152
|
children: [
|
|
2154
2153
|
/* @__PURE__ */ jsxs7(DialogTrigger, {
|
|
2155
|
-
render: /* @__PURE__ */
|
|
2154
|
+
render: /* @__PURE__ */ jsx19(Button, {
|
|
2156
2155
|
size: "icon-lg",
|
|
2157
2156
|
className: "fixed right-4 bottom-4 z-9999 rounded-full shadow-lg md:right-6 md:bottom-6"
|
|
2158
2157
|
}),
|
|
2159
2158
|
children: [
|
|
2160
|
-
/* @__PURE__ */
|
|
2161
|
-
/* @__PURE__ */
|
|
2159
|
+
/* @__PURE__ */ jsx19(BotIcon, {}),
|
|
2160
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2162
2161
|
className: "sr-only",
|
|
2163
2162
|
children: labels.open
|
|
2164
2163
|
})
|
|
2165
2164
|
]
|
|
2166
2165
|
}),
|
|
2167
|
-
/* @__PURE__ */
|
|
2166
|
+
/* @__PURE__ */ jsx19(DialogPortal, {
|
|
2168
2167
|
children: /* @__PURE__ */ jsxs7(DialogPrimitive2.Popup, {
|
|
2169
2168
|
"data-slot": "dialog-content",
|
|
2170
2169
|
className: cn("bg-popover text-popover-foreground ring-foreground/10 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 fixed z-50 flex flex-col gap-0 overflow-hidden rounded-xl text-sm shadow-lg ring-1 duration-100 outline-none", maximized ? "inset-4 max-h-none max-w-none md:inset-6" : "right-4 bottom-20 h-[min(42rem,calc(100svh-6rem))] w-[calc(100%-2rem)] max-w-md md:right-6"),
|
|
2171
2170
|
children: [
|
|
2172
|
-
/* @__PURE__ */
|
|
2171
|
+
/* @__PURE__ */ jsx19(DialogHeader, {
|
|
2173
2172
|
className: "shrink-0 border-b p-4",
|
|
2174
2173
|
children: /* @__PURE__ */ jsxs7("div", {
|
|
2175
2174
|
className: "flex items-center gap-1",
|
|
2176
2175
|
children: [
|
|
2177
|
-
/* @__PURE__ */
|
|
2176
|
+
/* @__PURE__ */ jsx19(DialogTitle, {
|
|
2178
2177
|
className: "min-w-0 flex-1 truncate text-sm leading-none font-medium",
|
|
2179
2178
|
children: labels.title
|
|
2180
2179
|
}),
|
|
@@ -2183,8 +2182,8 @@ function AgentWidget({
|
|
|
2183
2182
|
size: "icon-sm",
|
|
2184
2183
|
onClick: () => setOpen(false),
|
|
2185
2184
|
children: [
|
|
2186
|
-
/* @__PURE__ */
|
|
2187
|
-
/* @__PURE__ */
|
|
2185
|
+
/* @__PURE__ */ jsx19(MinusIcon, {}),
|
|
2186
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2188
2187
|
className: "sr-only",
|
|
2189
2188
|
children: labels.minimize
|
|
2190
2189
|
})
|
|
@@ -2195,21 +2194,21 @@ function AgentWidget({
|
|
|
2195
2194
|
size: "icon-sm",
|
|
2196
2195
|
onClick: () => setMaximized((current) => !current),
|
|
2197
2196
|
children: [
|
|
2198
|
-
maximized ? /* @__PURE__ */
|
|
2199
|
-
/* @__PURE__ */
|
|
2197
|
+
maximized ? /* @__PURE__ */ jsx19(Minimize2Icon, {}) : /* @__PURE__ */ jsx19(Maximize2Icon, {}),
|
|
2198
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2200
2199
|
className: "sr-only",
|
|
2201
2200
|
children: maximized ? labels.restore : labels.maximize
|
|
2202
2201
|
})
|
|
2203
2202
|
]
|
|
2204
2203
|
}),
|
|
2205
2204
|
/* @__PURE__ */ jsxs7(DialogClose, {
|
|
2206
|
-
render: /* @__PURE__ */
|
|
2205
|
+
render: /* @__PURE__ */ jsx19(Button, {
|
|
2207
2206
|
variant: "ghost",
|
|
2208
2207
|
size: "icon-sm"
|
|
2209
2208
|
}),
|
|
2210
2209
|
children: [
|
|
2211
|
-
/* @__PURE__ */
|
|
2212
|
-
/* @__PURE__ */
|
|
2210
|
+
/* @__PURE__ */ jsx19(XIcon2, {}),
|
|
2211
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2213
2212
|
className: "sr-only",
|
|
2214
2213
|
children: labels.close
|
|
2215
2214
|
})
|
|
@@ -2218,39 +2217,39 @@ function AgentWidget({
|
|
|
2218
2217
|
]
|
|
2219
2218
|
})
|
|
2220
2219
|
}),
|
|
2221
|
-
/* @__PURE__ */
|
|
2220
|
+
/* @__PURE__ */ jsx19("div", {
|
|
2222
2221
|
className: "min-h-0 flex-1 overflow-hidden",
|
|
2223
|
-
children: state.messages.length === 0 && !state.error ? /* @__PURE__ */
|
|
2222
|
+
children: state.messages.length === 0 && !state.error ? /* @__PURE__ */ jsx19(Empty, {
|
|
2224
2223
|
className: "h-full",
|
|
2225
2224
|
children: /* @__PURE__ */ jsxs7(EmptyHeader, {
|
|
2226
2225
|
children: [
|
|
2227
|
-
/* @__PURE__ */
|
|
2226
|
+
/* @__PURE__ */ jsx19(EmptyMedia, {
|
|
2228
2227
|
variant: "icon",
|
|
2229
|
-
children: /* @__PURE__ */
|
|
2228
|
+
children: /* @__PURE__ */ jsx19(MessageCircleDashedIcon, {})
|
|
2230
2229
|
}),
|
|
2231
|
-
/* @__PURE__ */
|
|
2230
|
+
/* @__PURE__ */ jsx19(EmptyTitle, {
|
|
2232
2231
|
children: labels.welcome
|
|
2233
2232
|
}),
|
|
2234
|
-
/* @__PURE__ */
|
|
2233
|
+
/* @__PURE__ */ jsx19(EmptyDescription, {
|
|
2235
2234
|
children: labels.description
|
|
2236
2235
|
})
|
|
2237
2236
|
]
|
|
2238
2237
|
})
|
|
2239
|
-
}) : /* @__PURE__ */
|
|
2238
|
+
}) : /* @__PURE__ */ jsx19(MessageScrollerProvider, {
|
|
2240
2239
|
autoScroll: true,
|
|
2241
2240
|
children: /* @__PURE__ */ jsxs7(MessageScroller, {
|
|
2242
2241
|
children: [
|
|
2243
|
-
/* @__PURE__ */
|
|
2242
|
+
/* @__PURE__ */ jsx19(MessageScrollerViewport, {
|
|
2244
2243
|
"aria-label": labels.title,
|
|
2245
2244
|
className: "[scrollbar-width:thin] [scrollbar-color:var(--border)_transparent]",
|
|
2246
2245
|
children: /* @__PURE__ */ jsxs7(MessageScrollerContent, {
|
|
2247
2246
|
"aria-busy": state.pending,
|
|
2248
2247
|
className: "p-4",
|
|
2249
2248
|
children: [
|
|
2250
|
-
state.messages.map((message, index) => /* @__PURE__ */
|
|
2249
|
+
state.messages.map((message, index) => /* @__PURE__ */ jsx19(MessageScrollerItem, {
|
|
2251
2250
|
messageId: message.id,
|
|
2252
2251
|
scrollAnchor: message.role === "user",
|
|
2253
|
-
children: /* @__PURE__ */
|
|
2252
|
+
children: /* @__PURE__ */ jsx19(AgentMessageRow, {
|
|
2254
2253
|
disabled: state.pending,
|
|
2255
2254
|
labels,
|
|
2256
2255
|
message,
|
|
@@ -2258,15 +2257,15 @@ function AgentWidget({
|
|
|
2258
2257
|
pending: state.pending && index === state.messages.length - 1
|
|
2259
2258
|
})
|
|
2260
2259
|
}, message.id)),
|
|
2261
|
-
state.error ? /* @__PURE__ */
|
|
2260
|
+
state.error ? /* @__PURE__ */ jsx19(MessageScrollerItem, {
|
|
2262
2261
|
messageId: "error",
|
|
2263
2262
|
children: /* @__PURE__ */ jsxs7(Alert, {
|
|
2264
2263
|
variant: "destructive",
|
|
2265
2264
|
children: [
|
|
2266
|
-
/* @__PURE__ */
|
|
2265
|
+
/* @__PURE__ */ jsx19(AlertTitle, {
|
|
2267
2266
|
children: labels.title
|
|
2268
2267
|
}),
|
|
2269
|
-
/* @__PURE__ */
|
|
2268
|
+
/* @__PURE__ */ jsx19(AlertDescription, {
|
|
2270
2269
|
children: errorMessage(state.error, labels)
|
|
2271
2270
|
})
|
|
2272
2271
|
]
|
|
@@ -2277,8 +2276,8 @@ function AgentWidget({
|
|
|
2277
2276
|
}),
|
|
2278
2277
|
/* @__PURE__ */ jsxs7(MessageScrollerButton, {
|
|
2279
2278
|
children: [
|
|
2280
|
-
/* @__PURE__ */
|
|
2281
|
-
/* @__PURE__ */
|
|
2279
|
+
/* @__PURE__ */ jsx19(ArrowDownIcon2, {}),
|
|
2280
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2282
2281
|
className: "sr-only",
|
|
2283
2282
|
children: labels.scrollLatest
|
|
2284
2283
|
})
|
|
@@ -2288,7 +2287,7 @@ function AgentWidget({
|
|
|
2288
2287
|
})
|
|
2289
2288
|
})
|
|
2290
2289
|
}),
|
|
2291
|
-
/* @__PURE__ */
|
|
2290
|
+
/* @__PURE__ */ jsx19("form", {
|
|
2292
2291
|
className: "shrink-0 border-t p-3",
|
|
2293
2292
|
onSubmit: (event) => {
|
|
2294
2293
|
event.preventDefault();
|
|
@@ -2301,22 +2300,22 @@ function AgentWidget({
|
|
|
2301
2300
|
className: "bg-background rounded-t-[calc(var(--radius-md)-1px)] border-b",
|
|
2302
2301
|
children: [
|
|
2303
2302
|
activeContext.icon,
|
|
2304
|
-
/* @__PURE__ */
|
|
2303
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2305
2304
|
className: "min-w-0 flex-1 truncate text-left",
|
|
2306
2305
|
children: activeContext.label
|
|
2307
2306
|
}),
|
|
2308
|
-
onRemoveContext ? /* @__PURE__ */
|
|
2307
|
+
onRemoveContext ? /* @__PURE__ */ jsx19(InputGroupButton, {
|
|
2309
2308
|
size: "icon-xs",
|
|
2310
2309
|
"aria-label": `${labels.removeContext}: ${activeContext.label}`,
|
|
2311
2310
|
onClick: onRemoveContext,
|
|
2312
|
-
children: /* @__PURE__ */
|
|
2311
|
+
children: /* @__PURE__ */ jsx19(XIcon2, {})
|
|
2313
2312
|
}) : null
|
|
2314
2313
|
]
|
|
2315
2314
|
}) : null,
|
|
2316
2315
|
/* @__PURE__ */ jsxs7("div", {
|
|
2317
2316
|
className: "relative w-full min-w-0 self-stretch text-left",
|
|
2318
2317
|
children: [
|
|
2319
|
-
/* @__PURE__ */
|
|
2318
|
+
/* @__PURE__ */ jsx19("div", {
|
|
2320
2319
|
ref: inputOverlayRef,
|
|
2321
2320
|
"aria-hidden": "true",
|
|
2322
2321
|
className: "text-foreground pointer-events-none absolute inset-0 [scrollbar-width:thin] [scrollbar-gutter:stable] overflow-hidden px-2.5 py-2 text-left font-[inherit] text-base break-words whitespace-pre-wrap md:text-sm",
|
|
@@ -2326,9 +2325,9 @@ function AgentWidget({
|
|
|
2326
2325
|
open: referencePickerOpen,
|
|
2327
2326
|
triggerId: referenceInputId,
|
|
2328
2327
|
children: [
|
|
2329
|
-
/* @__PURE__ */
|
|
2328
|
+
/* @__PURE__ */ jsx19(PopoverTrigger, {
|
|
2330
2329
|
id: referenceInputId,
|
|
2331
|
-
render: /* @__PURE__ */
|
|
2330
|
+
render: /* @__PURE__ */ jsx19(InputGroupTextarea, {
|
|
2332
2331
|
ref: inputRef,
|
|
2333
2332
|
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",
|
|
2334
2333
|
value: input,
|
|
@@ -2380,22 +2379,22 @@ function AgentWidget({
|
|
|
2380
2379
|
}
|
|
2381
2380
|
})
|
|
2382
2381
|
}),
|
|
2383
|
-
/* @__PURE__ */
|
|
2382
|
+
/* @__PURE__ */ jsx19(PopoverContent, {
|
|
2384
2383
|
align: "start",
|
|
2385
2384
|
initialFocus: false,
|
|
2386
2385
|
side: "top",
|
|
2387
2386
|
className: "w-[min(24rem,calc(100vw-2rem))] p-0",
|
|
2388
|
-
children: /* @__PURE__ */
|
|
2387
|
+
children: /* @__PURE__ */ jsx19(Command, {
|
|
2389
2388
|
shouldFilter: false,
|
|
2390
2389
|
value: activeReference?.key ?? "",
|
|
2391
2390
|
onValueChange: setActiveReferenceKey,
|
|
2392
2391
|
children: /* @__PURE__ */ jsxs7(CommandList, {
|
|
2393
2392
|
id: referenceListId,
|
|
2394
2393
|
children: [
|
|
2395
|
-
/* @__PURE__ */
|
|
2394
|
+
/* @__PURE__ */ jsx19(CommandEmpty, {
|
|
2396
2395
|
children: labels.noReferences
|
|
2397
2396
|
}),
|
|
2398
|
-
matchingReferences.length > 0 ? /* @__PURE__ */
|
|
2397
|
+
matchingReferences.length > 0 ? /* @__PURE__ */ jsx19(CommandGroup, {
|
|
2399
2398
|
heading: labels.references,
|
|
2400
2399
|
children: matchingReferences.map((reference, index) => /* @__PURE__ */ jsxs7(CommandItem, {
|
|
2401
2400
|
id: `${referenceInputId}-reference-${index}`,
|
|
@@ -2403,7 +2402,7 @@ function AgentWidget({
|
|
|
2403
2402
|
onSelect: () => selectReference(reference),
|
|
2404
2403
|
children: [
|
|
2405
2404
|
reference.icon,
|
|
2406
|
-
/* @__PURE__ */
|
|
2405
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2407
2406
|
className: "truncate",
|
|
2408
2407
|
children: reference.label
|
|
2409
2408
|
})
|
|
@@ -2418,15 +2417,15 @@ function AgentWidget({
|
|
|
2418
2417
|
})
|
|
2419
2418
|
]
|
|
2420
2419
|
}),
|
|
2421
|
-
/* @__PURE__ */
|
|
2420
|
+
/* @__PURE__ */ jsx19(InputGroupAddon, {
|
|
2422
2421
|
align: "block-end",
|
|
2423
2422
|
className: "justify-end",
|
|
2424
2423
|
children: state.pending ? /* @__PURE__ */ jsxs7(InputGroupButton, {
|
|
2425
2424
|
size: "icon-xs",
|
|
2426
2425
|
onClick: onInterrupt,
|
|
2427
2426
|
children: [
|
|
2428
|
-
/* @__PURE__ */
|
|
2429
|
-
/* @__PURE__ */
|
|
2427
|
+
/* @__PURE__ */ jsx19(SquareIcon, {}),
|
|
2428
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2430
2429
|
className: "sr-only",
|
|
2431
2430
|
children: labels.stop
|
|
2432
2431
|
})
|
|
@@ -2436,8 +2435,8 @@ function AgentWidget({
|
|
|
2436
2435
|
size: "icon-xs",
|
|
2437
2436
|
disabled: !input.trim() || hasPendingApproval,
|
|
2438
2437
|
children: [
|
|
2439
|
-
/* @__PURE__ */
|
|
2440
|
-
/* @__PURE__ */
|
|
2438
|
+
/* @__PURE__ */ jsx19(SendIcon, {}),
|
|
2439
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2441
2440
|
className: "sr-only",
|
|
2442
2441
|
children: labels.send
|
|
2443
2442
|
})
|
|
@@ -2454,9 +2453,9 @@ function AgentWidget({
|
|
|
2454
2453
|
});
|
|
2455
2454
|
}
|
|
2456
2455
|
export {
|
|
2457
|
-
|
|
2458
|
-
makeAgentAtoms,
|
|
2459
|
-
initialAgentState,
|
|
2456
|
+
AgentWidget,
|
|
2460
2457
|
agentWidgetMessages,
|
|
2461
|
-
|
|
2458
|
+
initialAgentState,
|
|
2459
|
+
makeAgentAtoms,
|
|
2460
|
+
reduceAgentEvent
|
|
2462
2461
|
};
|