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