@krak-stack/registry 0.2.0 → 0.2.2
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 +12 -0
- package/dist/components/ui/app-brand.js +17 -17
- package/dist/components/ui/code-block.js +6 -6
- package/dist/components/ui/color-picker.js +26 -28
- package/dist/components/ui/copy-button.js +4 -4
- package/dist/components/ui/data-table.js +441 -442
- package/dist/components/ui/editing-locale-switcher.js +10 -10
- package/dist/components/ui/effect-form.js +185 -186
- package/dist/components/ui/error-component.js +6 -6
- package/dist/components/ui/file-picker.js +2 -2
- package/dist/components/ui/form.d.ts +5 -5
- package/dist/components/ui/form.js +138 -139
- package/dist/components/ui/google-map.js +2 -2
- package/dist/components/ui/icon-input.js +47 -50
- package/dist/components/ui/krakstack-provider.js +2 -2
- package/dist/components/ui/locale-switcher.js +4 -4
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/search-menu.js +2 -2
- package/dist/components/ui/sidebar-layout.js +67 -72
- package/dist/components/ui/theme-switcher.js +6 -6
- package/dist/components/ui/virtualized-combobox.js +33 -36
- package/dist/lib/docs.js +166 -171
- package/dist/lib/docs.server.js +18 -40
- package/dist/lib/documentation-toolkit.js +19 -41
- package/dist/lib/httpapi-adapter.js +2 -2
- package/dist/lib/httpapi-cli.js +7 -7
- package/dist/lib/query.js +11 -11
- package/dist/lib/seo.js +2 -2
- package/dist/lib/webfetch-toolkit.js +6 -6
- package/dist/oxlint/anti-slop/index.js +2 -2
- package/dist/services/agent/client/index.js +153 -155
- package/dist/services/agent/index.js +2 -2
- package/dist/services/agent/schema.js +5 -5
- package/dist/services/events/browser.js +6 -6
- package/dist/services/events/client/audit-log-table.js +445 -446
- package/dist/services/events/index.js +59 -59
- package/dist/services/events/migrations.js +2 -2
- package/dist/services/events/record.js +2 -2
- package/dist/services/events/schema.js +39 -39
- 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/opentelemetry/api.js +2 -2
- package/dist/services/opentelemetry/browser.js +7 -7
- package/dist/services/opentelemetry/web-vitals.js +2 -2
- package/dist/services/s3/index.js +2 -2
- package/dist/services/s3/schema.js +2 -2
- package/dist/services/speech/schema.js +9 -9
- package/dist/services/webhooks/client/delivery-table.js +479 -480
- package/dist/services/webhooks/http-client.js +5 -5
- package/dist/services/webhooks/index.js +34 -34
- package/dist/services/webhooks/migrations.js +5 -5
- package/dist/services/webhooks/schema.js +20 -20
- package/dist/services/webhooks/url.js +5 -5
- package/package.json +1 -1
|
@@ -229,7 +229,7 @@ function CopyButton({
|
|
|
229
229
|
valueDescription,
|
|
230
230
|
copyVariant = "default",
|
|
231
231
|
locale: localeOverride,
|
|
232
|
-
messages
|
|
232
|
+
messages,
|
|
233
233
|
onCopied,
|
|
234
234
|
onCopyError,
|
|
235
235
|
resetDelay = 1500,
|
|
@@ -241,7 +241,7 @@ function CopyButton({
|
|
|
241
241
|
const locale = useKrakstackLocale(localeOverride);
|
|
242
242
|
const [copyState, setCopyState] = useState("idle");
|
|
243
243
|
const copyTimeout = useRef(undefined);
|
|
244
|
-
const labels = copyButtonMessages(locale,
|
|
244
|
+
const labels = copyButtonMessages(locale, messages);
|
|
245
245
|
const accessibleLabel = ariaLabel ?? (valueDescription ? `${labels.copy} ${valueDescription}` : labels.copy);
|
|
246
246
|
const isLarge = copyVariant === "large";
|
|
247
247
|
const defaultSize = copyVariant === "sm" ? "icon-xs" : isLarge ? "sm" : "icon-sm";
|
|
@@ -343,12 +343,12 @@ function CodeBlock({
|
|
|
343
343
|
code,
|
|
344
344
|
language = "text",
|
|
345
345
|
locale: localeOverride,
|
|
346
|
-
messages
|
|
346
|
+
messages
|
|
347
347
|
}) {
|
|
348
348
|
const locale = useKrakstackLocale2(localeOverride);
|
|
349
349
|
const normalizedLanguage = language.toLowerCase() || "text";
|
|
350
350
|
const highlighted = highlight(code, { lang: normalizedLanguage });
|
|
351
|
-
const labels = codeBlockMessages(locale,
|
|
351
|
+
const labels = codeBlockMessages(locale, messages);
|
|
352
352
|
return /* @__PURE__ */ jsxs2("div", {
|
|
353
353
|
className: "not-prose bg-muted overflow-hidden rounded-md border text-[var(--th-token)]",
|
|
354
354
|
"data-code-theme": true,
|
|
@@ -387,7 +387,7 @@ var MarkdownContent = ({
|
|
|
387
387
|
codeBlocks,
|
|
388
388
|
html,
|
|
389
389
|
locale,
|
|
390
|
-
messages
|
|
390
|
+
messages
|
|
391
391
|
}) => {
|
|
392
392
|
const content = [];
|
|
393
393
|
let remainingHtml = html;
|
|
@@ -406,7 +406,7 @@ var MarkdownContent = ({
|
|
|
406
406
|
code: block.code,
|
|
407
407
|
language: block.language,
|
|
408
408
|
locale,
|
|
409
|
-
messages
|
|
409
|
+
messages
|
|
410
410
|
})
|
|
411
411
|
}, `code-${index}`));
|
|
412
412
|
remainingHtml = remainingHtml.slice(markerIndex + marker.length);
|
|
@@ -835,12 +835,11 @@ import { cva as cva7 } from "class-variance-authority";
|
|
|
835
835
|
|
|
836
836
|
// ../../src/components/ui/input.tsx
|
|
837
837
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
838
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
839
838
|
|
|
840
839
|
// ../../src/components/ui/textarea.tsx
|
|
841
|
-
import { jsx as
|
|
840
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
842
841
|
function Textarea({ className, ...props }) {
|
|
843
|
-
return /* @__PURE__ */
|
|
842
|
+
return /* @__PURE__ */ jsx11("textarea", {
|
|
844
843
|
"data-slot": "textarea",
|
|
845
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),
|
|
846
845
|
...props
|
|
@@ -848,9 +847,9 @@ function Textarea({ className, ...props }) {
|
|
|
848
847
|
}
|
|
849
848
|
|
|
850
849
|
// ../../src/components/ui/input-group.tsx
|
|
851
|
-
import { jsx as
|
|
850
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
852
851
|
function InputGroup({ className, ...props }) {
|
|
853
|
-
return /* @__PURE__ */
|
|
852
|
+
return /* @__PURE__ */ jsx12("div", {
|
|
854
853
|
"data-slot": "input-group",
|
|
855
854
|
role: "group",
|
|
856
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),
|
|
@@ -873,7 +872,7 @@ function InputGroupAddon({
|
|
|
873
872
|
align = "inline-start",
|
|
874
873
|
...props
|
|
875
874
|
}) {
|
|
876
|
-
return /* @__PURE__ */
|
|
875
|
+
return /* @__PURE__ */ jsx12("div", {
|
|
877
876
|
role: "group",
|
|
878
877
|
"data-slot": "input-group-addon",
|
|
879
878
|
"data-align": align,
|
|
@@ -905,7 +904,7 @@ function InputGroupButton({
|
|
|
905
904
|
size = "xs",
|
|
906
905
|
...props
|
|
907
906
|
}) {
|
|
908
|
-
return /* @__PURE__ */
|
|
907
|
+
return /* @__PURE__ */ jsx12(Button, {
|
|
909
908
|
type,
|
|
910
909
|
"data-size": size,
|
|
911
910
|
variant,
|
|
@@ -917,7 +916,7 @@ function InputGroupTextarea({
|
|
|
917
916
|
className,
|
|
918
917
|
...props
|
|
919
918
|
}) {
|
|
920
|
-
return /* @__PURE__ */
|
|
919
|
+
return /* @__PURE__ */ jsx12(Textarea, {
|
|
921
920
|
"data-slot": "input-group-control",
|
|
922
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),
|
|
923
922
|
...props
|
|
@@ -932,10 +931,9 @@ import { cn as cn2 } from "cn";
|
|
|
932
931
|
|
|
933
932
|
// ../../src/components/ui/separator.tsx
|
|
934
933
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
935
|
-
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
936
934
|
|
|
937
935
|
// ../../src/components/ui/item.tsx
|
|
938
|
-
import { jsx as
|
|
936
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
939
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", {
|
|
940
938
|
variants: {
|
|
941
939
|
variant: {
|
|
@@ -991,7 +989,7 @@ function ItemMedia({
|
|
|
991
989
|
variant = "default",
|
|
992
990
|
...props
|
|
993
991
|
}) {
|
|
994
|
-
return /* @__PURE__ */
|
|
992
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
995
993
|
"data-slot": "item-media",
|
|
996
994
|
"data-variant": variant,
|
|
997
995
|
className: cn2(itemMediaVariants({ variant, className })),
|
|
@@ -999,35 +997,35 @@ function ItemMedia({
|
|
|
999
997
|
});
|
|
1000
998
|
}
|
|
1001
999
|
function ItemContent({ className, ...props }) {
|
|
1002
|
-
return /* @__PURE__ */
|
|
1000
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
1003
1001
|
"data-slot": "item-content",
|
|
1004
1002
|
className: cn2("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
|
|
1005
1003
|
...props
|
|
1006
1004
|
});
|
|
1007
1005
|
}
|
|
1008
1006
|
function ItemTitle({ className, ...props }) {
|
|
1009
|
-
return /* @__PURE__ */
|
|
1007
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
1010
1008
|
"data-slot": "item-title",
|
|
1011
1009
|
className: cn2("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
|
|
1012
1010
|
...props
|
|
1013
1011
|
});
|
|
1014
1012
|
}
|
|
1015
1013
|
function ItemDescription({ className, ...props }) {
|
|
1016
|
-
return /* @__PURE__ */
|
|
1014
|
+
return /* @__PURE__ */ jsx13("p", {
|
|
1017
1015
|
"data-slot": "item-description",
|
|
1018
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),
|
|
1019
1017
|
...props
|
|
1020
1018
|
});
|
|
1021
1019
|
}
|
|
1022
1020
|
function ItemActions({ className, ...props }) {
|
|
1023
|
-
return /* @__PURE__ */
|
|
1021
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
1024
1022
|
"data-slot": "item-actions",
|
|
1025
1023
|
className: cn2("flex items-center gap-2", className),
|
|
1026
1024
|
...props
|
|
1027
1025
|
});
|
|
1028
1026
|
}
|
|
1029
1027
|
function ItemFooter({ className, ...props }) {
|
|
1030
|
-
return /* @__PURE__ */
|
|
1028
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
1031
1029
|
"data-slot": "item-footer",
|
|
1032
1030
|
className: cn2("flex basis-full items-center justify-between gap-2", className),
|
|
1033
1031
|
...props
|
|
@@ -1035,13 +1033,13 @@ function ItemFooter({ className, ...props }) {
|
|
|
1035
1033
|
}
|
|
1036
1034
|
|
|
1037
1035
|
// ../../src/components/ui/message.tsx
|
|
1038
|
-
import { jsx as
|
|
1036
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1039
1037
|
function Message({
|
|
1040
1038
|
className,
|
|
1041
1039
|
align = "start",
|
|
1042
1040
|
...props
|
|
1043
1041
|
}) {
|
|
1044
|
-
return /* @__PURE__ */
|
|
1042
|
+
return /* @__PURE__ */ jsx14("div", {
|
|
1045
1043
|
"data-slot": "message",
|
|
1046
1044
|
"data-align": align,
|
|
1047
1045
|
className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
|
|
@@ -1049,7 +1047,7 @@ function Message({
|
|
|
1049
1047
|
});
|
|
1050
1048
|
}
|
|
1051
1049
|
function MessageContent({ className, ...props }) {
|
|
1052
|
-
return /* @__PURE__ */
|
|
1050
|
+
return /* @__PURE__ */ jsx14("div", {
|
|
1053
1051
|
"data-slot": "message-content",
|
|
1054
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),
|
|
1055
1053
|
...props
|
|
@@ -1064,9 +1062,9 @@ import {
|
|
|
1064
1062
|
useMessageScrollerVisibility
|
|
1065
1063
|
} from "@shadcn/react/message-scroller";
|
|
1066
1064
|
import { ArrowDownIcon } from "lucide-react";
|
|
1067
|
-
import { jsx as
|
|
1065
|
+
import { jsx as jsx15, jsxs as jsxs5, Fragment } from "react/jsx-runtime";
|
|
1068
1066
|
function MessageScrollerProvider(props) {
|
|
1069
|
-
return /* @__PURE__ */
|
|
1067
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Provider, {
|
|
1070
1068
|
...props
|
|
1071
1069
|
});
|
|
1072
1070
|
}
|
|
@@ -1074,7 +1072,7 @@ function MessageScroller({
|
|
|
1074
1072
|
className,
|
|
1075
1073
|
...props
|
|
1076
1074
|
}) {
|
|
1077
|
-
return /* @__PURE__ */
|
|
1075
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Root, {
|
|
1078
1076
|
"data-slot": "message-scroller",
|
|
1079
1077
|
className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className),
|
|
1080
1078
|
...props
|
|
@@ -1084,7 +1082,7 @@ function MessageScrollerViewport({
|
|
|
1084
1082
|
className,
|
|
1085
1083
|
...props
|
|
1086
1084
|
}) {
|
|
1087
|
-
return /* @__PURE__ */
|
|
1085
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Viewport, {
|
|
1088
1086
|
"data-slot": "message-scroller-viewport",
|
|
1089
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),
|
|
1090
1088
|
...props
|
|
@@ -1094,7 +1092,7 @@ function MessageScrollerContent({
|
|
|
1094
1092
|
className,
|
|
1095
1093
|
...props
|
|
1096
1094
|
}) {
|
|
1097
|
-
return /* @__PURE__ */
|
|
1095
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Content, {
|
|
1098
1096
|
"data-slot": "message-scroller-content",
|
|
1099
1097
|
className: cn("flex h-max min-h-full flex-col gap-8", className),
|
|
1100
1098
|
...props
|
|
@@ -1105,7 +1103,7 @@ function MessageScrollerItem({
|
|
|
1105
1103
|
scrollAnchor = false,
|
|
1106
1104
|
...props
|
|
1107
1105
|
}) {
|
|
1108
|
-
return /* @__PURE__ */
|
|
1106
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Item, {
|
|
1109
1107
|
"data-slot": "message-scroller-item",
|
|
1110
1108
|
scrollAnchor,
|
|
1111
1109
|
className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
|
|
@@ -1121,22 +1119,22 @@ function MessageScrollerButton({
|
|
|
1121
1119
|
size = "icon-sm",
|
|
1122
1120
|
...props
|
|
1123
1121
|
}) {
|
|
1124
|
-
return /* @__PURE__ */
|
|
1122
|
+
return /* @__PURE__ */ jsx15(MessageScrollerPrimitive.Button, {
|
|
1125
1123
|
"data-slot": "message-scroller-button",
|
|
1126
1124
|
"data-direction": direction,
|
|
1127
1125
|
"data-variant": variant,
|
|
1128
1126
|
"data-size": size,
|
|
1129
1127
|
direction,
|
|
1130
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),
|
|
1131
|
-
render: render ?? /* @__PURE__ */
|
|
1129
|
+
render: render ?? /* @__PURE__ */ jsx15(Button, {
|
|
1132
1130
|
variant,
|
|
1133
1131
|
size
|
|
1134
1132
|
}),
|
|
1135
1133
|
...props,
|
|
1136
1134
|
children: children ?? /* @__PURE__ */ jsxs5(Fragment, {
|
|
1137
1135
|
children: [
|
|
1138
|
-
/* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ jsx15(ArrowDownIcon, {}),
|
|
1137
|
+
/* @__PURE__ */ jsx15("span", {
|
|
1140
1138
|
className: "sr-only",
|
|
1141
1139
|
children: direction === "end" ? "Scroll to end" : "Scroll to start"
|
|
1142
1140
|
})
|
|
@@ -1147,15 +1145,15 @@ function MessageScrollerButton({
|
|
|
1147
1145
|
|
|
1148
1146
|
// ../../src/components/ui/popover.tsx
|
|
1149
1147
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
1150
|
-
import { jsx as
|
|
1148
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1151
1149
|
function Popover({ ...props }) {
|
|
1152
|
-
return /* @__PURE__ */
|
|
1150
|
+
return /* @__PURE__ */ jsx16(PopoverPrimitive.Root, {
|
|
1153
1151
|
"data-slot": "popover",
|
|
1154
1152
|
...props
|
|
1155
1153
|
});
|
|
1156
1154
|
}
|
|
1157
1155
|
function PopoverTrigger({ ...props }) {
|
|
1158
|
-
return /* @__PURE__ */
|
|
1156
|
+
return /* @__PURE__ */ jsx16(PopoverPrimitive.Trigger, {
|
|
1159
1157
|
"data-slot": "popover-trigger",
|
|
1160
1158
|
...props
|
|
1161
1159
|
});
|
|
@@ -1168,14 +1166,14 @@ function PopoverContent({
|
|
|
1168
1166
|
sideOffset = 4,
|
|
1169
1167
|
...props
|
|
1170
1168
|
}) {
|
|
1171
|
-
return /* @__PURE__ */
|
|
1172
|
-
children: /* @__PURE__ */
|
|
1169
|
+
return /* @__PURE__ */ jsx16(PopoverPrimitive.Portal, {
|
|
1170
|
+
children: /* @__PURE__ */ jsx16(PopoverPrimitive.Positioner, {
|
|
1173
1171
|
align,
|
|
1174
1172
|
alignOffset,
|
|
1175
1173
|
side,
|
|
1176
1174
|
sideOffset,
|
|
1177
1175
|
className: "isolate z-50",
|
|
1178
|
-
children: /* @__PURE__ */
|
|
1176
|
+
children: /* @__PURE__ */ jsx16(PopoverPrimitive.Popup, {
|
|
1179
1177
|
"data-slot": "popover-content",
|
|
1180
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),
|
|
1181
1179
|
...props
|
|
@@ -1189,21 +1187,21 @@ import { cn as cn3 } from "cn";
|
|
|
1189
1187
|
|
|
1190
1188
|
// ../../src/components/ui/collapsible.tsx
|
|
1191
1189
|
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
1192
|
-
import { jsx as
|
|
1190
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1193
1191
|
function Collapsible({ ...props }) {
|
|
1194
|
-
return /* @__PURE__ */
|
|
1192
|
+
return /* @__PURE__ */ jsx17(CollapsiblePrimitive.Root, {
|
|
1195
1193
|
"data-slot": "collapsible",
|
|
1196
1194
|
...props
|
|
1197
1195
|
});
|
|
1198
1196
|
}
|
|
1199
1197
|
function CollapsibleTrigger({ ...props }) {
|
|
1200
|
-
return /* @__PURE__ */
|
|
1198
|
+
return /* @__PURE__ */ jsx17(CollapsiblePrimitive.Trigger, {
|
|
1201
1199
|
"data-slot": "collapsible-trigger",
|
|
1202
1200
|
...props
|
|
1203
1201
|
});
|
|
1204
1202
|
}
|
|
1205
1203
|
function CollapsibleContent({ ...props }) {
|
|
1206
|
-
return /* @__PURE__ */
|
|
1204
|
+
return /* @__PURE__ */ jsx17(CollapsiblePrimitive.Panel, {
|
|
1207
1205
|
"data-slot": "collapsible-content",
|
|
1208
1206
|
...props
|
|
1209
1207
|
});
|
|
@@ -1211,9 +1209,9 @@ function CollapsibleContent({ ...props }) {
|
|
|
1211
1209
|
|
|
1212
1210
|
// ../../src/components/ui/trace.tsx
|
|
1213
1211
|
import { ChevronRightIcon } from "lucide-react";
|
|
1214
|
-
import { jsx as
|
|
1212
|
+
import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1215
1213
|
function Trace({ className, ...props }) {
|
|
1216
|
-
return /* @__PURE__ */
|
|
1214
|
+
return /* @__PURE__ */ jsx18("div", {
|
|
1217
1215
|
"data-slot": "trace",
|
|
1218
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),
|
|
1219
1217
|
...props
|
|
@@ -1224,7 +1222,7 @@ function TraceLine({
|
|
|
1224
1222
|
status,
|
|
1225
1223
|
...props
|
|
1226
1224
|
}) {
|
|
1227
|
-
return /* @__PURE__ */
|
|
1225
|
+
return /* @__PURE__ */ jsx18("span", {
|
|
1228
1226
|
"data-slot": "trace-line",
|
|
1229
1227
|
"data-status": status,
|
|
1230
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),
|
|
@@ -1232,7 +1230,7 @@ function TraceLine({
|
|
|
1232
1230
|
});
|
|
1233
1231
|
}
|
|
1234
1232
|
function TraceIcon({ className, ...props }) {
|
|
1235
|
-
return /* @__PURE__ */
|
|
1233
|
+
return /* @__PURE__ */ jsx18("span", {
|
|
1236
1234
|
"data-slot": "trace-icon",
|
|
1237
1235
|
"aria-hidden": "true",
|
|
1238
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),
|
|
@@ -1240,7 +1238,7 @@ function TraceIcon({ className, ...props }) {
|
|
|
1240
1238
|
});
|
|
1241
1239
|
}
|
|
1242
1240
|
function TraceTitle({ className, ...props }) {
|
|
1243
|
-
return /* @__PURE__ */
|
|
1241
|
+
return /* @__PURE__ */ jsx18("span", {
|
|
1244
1242
|
"data-slot": "trace-title",
|
|
1245
1243
|
className: cn3("min-w-0 truncate motion-reduce:shimmer-none", className),
|
|
1246
1244
|
...props
|
|
@@ -1250,7 +1248,7 @@ function TraceDescription({
|
|
|
1250
1248
|
className,
|
|
1251
1249
|
...props
|
|
1252
1250
|
}) {
|
|
1253
|
-
return /* @__PURE__ */
|
|
1251
|
+
return /* @__PURE__ */ jsx18("span", {
|
|
1254
1252
|
"data-slot": "trace-description",
|
|
1255
1253
|
className: cn3("shrink-0 text-muted-foreground/70 tabular-nums", className),
|
|
1256
1254
|
...props
|
|
@@ -1260,7 +1258,7 @@ function TraceCollapsible({
|
|
|
1260
1258
|
className,
|
|
1261
1259
|
...props
|
|
1262
1260
|
}) {
|
|
1263
|
-
return /* @__PURE__ */
|
|
1261
|
+
return /* @__PURE__ */ jsx18(Collapsible, {
|
|
1264
1262
|
"data-slot": "trace-collapsible",
|
|
1265
1263
|
className: cn3("flex w-full min-w-0 flex-col", className),
|
|
1266
1264
|
...props
|
|
@@ -1277,9 +1275,9 @@ function TraceCollapsibleTrigger({
|
|
|
1277
1275
|
...props,
|
|
1278
1276
|
children: [
|
|
1279
1277
|
children,
|
|
1280
|
-
/* @__PURE__ */
|
|
1278
|
+
/* @__PURE__ */ jsx18(TraceIcon, {
|
|
1281
1279
|
className: "transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90",
|
|
1282
|
-
children: /* @__PURE__ */
|
|
1280
|
+
children: /* @__PURE__ */ jsx18(ChevronRightIcon, {})
|
|
1283
1281
|
})
|
|
1284
1282
|
]
|
|
1285
1283
|
});
|
|
@@ -1289,11 +1287,11 @@ function TraceCollapsibleContent({
|
|
|
1289
1287
|
children,
|
|
1290
1288
|
...props
|
|
1291
1289
|
}) {
|
|
1292
|
-
return /* @__PURE__ */
|
|
1290
|
+
return /* @__PURE__ */ jsx18(CollapsibleContent, {
|
|
1293
1291
|
"data-slot": "trace-collapsible-content",
|
|
1294
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",
|
|
1295
1293
|
...props,
|
|
1296
|
-
children: /* @__PURE__ */
|
|
1294
|
+
children: /* @__PURE__ */ jsx18("div", {
|
|
1297
1295
|
"data-slot": "trace-collapsible-content-inner",
|
|
1298
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),
|
|
1299
1297
|
children
|
|
@@ -1386,7 +1384,7 @@ var AgentStreamError = Schema2.Struct({
|
|
|
1386
1384
|
|
|
1387
1385
|
// ../../src/services/agent/client/widget.tsx
|
|
1388
1386
|
import { useKrakstackLocale as useKrakstackLocale3 } from "@krak-stack/registry/krakstack-provider";
|
|
1389
|
-
import { jsx as
|
|
1387
|
+
import { jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1390
1388
|
var messages3 = {
|
|
1391
1389
|
en: {
|
|
1392
1390
|
approve: "Approve",
|
|
@@ -1484,7 +1482,7 @@ var highlightedInput = (input, references) => {
|
|
|
1484
1482
|
return input;
|
|
1485
1483
|
const mentionPattern = new RegExp(`(${mentions.map(escapeRegExp).join("|")})(?![\\p{L}\\p{N}_-])`, "gu");
|
|
1486
1484
|
const mentionSet = new Set(mentions);
|
|
1487
|
-
return input.split(mentionPattern).map((part, index) => mentionSet.has(part) ? /* @__PURE__ */
|
|
1485
|
+
return input.split(mentionPattern).map((part, index) => mentionSet.has(part) ? /* @__PURE__ */ jsx19("span", {
|
|
1488
1486
|
className: "bg-primary text-primary-foreground rounded-sm [box-shadow:2px_0_0_var(--primary),-2px_0_0_var(--primary)]",
|
|
1489
1487
|
children: part
|
|
1490
1488
|
}, `${part}:${index}`) : part);
|
|
@@ -1520,10 +1518,10 @@ var ToolInput = ({
|
|
|
1520
1518
|
}) => /* @__PURE__ */ jsxs7("div", {
|
|
1521
1519
|
className: "min-w-0 space-y-2",
|
|
1522
1520
|
children: [
|
|
1523
|
-
tool.metadata.description ? /* @__PURE__ */
|
|
1521
|
+
tool.metadata.description ? /* @__PURE__ */ jsx19("p", {
|
|
1524
1522
|
children: tool.metadata.description
|
|
1525
1523
|
}) : null,
|
|
1526
|
-
/* @__PURE__ */
|
|
1524
|
+
/* @__PURE__ */ jsx19(CodeBlock, {
|
|
1527
1525
|
code: inputCode(tool.input),
|
|
1528
1526
|
language: "json",
|
|
1529
1527
|
locale,
|
|
@@ -1549,9 +1547,9 @@ var ToolApproval = ({
|
|
|
1549
1547
|
role: "group",
|
|
1550
1548
|
"aria-label": tool.metadata.title ?? tool.name,
|
|
1551
1549
|
children: [
|
|
1552
|
-
/* @__PURE__ */
|
|
1550
|
+
/* @__PURE__ */ jsx19(ItemMedia, {
|
|
1553
1551
|
variant: "icon",
|
|
1554
|
-
children: /* @__PURE__ */
|
|
1552
|
+
children: /* @__PURE__ */ jsx19(WrenchIcon, {})
|
|
1555
1553
|
}),
|
|
1556
1554
|
/* @__PURE__ */ jsxs7(ItemContent, {
|
|
1557
1555
|
className: "min-w-0",
|
|
@@ -1560,13 +1558,13 @@ var ToolApproval = ({
|
|
|
1560
1558
|
className: "line-clamp-none",
|
|
1561
1559
|
children: [
|
|
1562
1560
|
tool.metadata.title ?? tool.name,
|
|
1563
|
-
tool.metadata.destructive ? /* @__PURE__ */
|
|
1561
|
+
tool.metadata.destructive ? /* @__PURE__ */ jsx19(Badge, {
|
|
1564
1562
|
variant: "destructive",
|
|
1565
1563
|
children: labels.approvalDestructiveLabel
|
|
1566
1564
|
}) : null
|
|
1567
1565
|
]
|
|
1568
1566
|
}),
|
|
1569
|
-
/* @__PURE__ */
|
|
1567
|
+
/* @__PURE__ */ jsx19(ItemDescription, {
|
|
1570
1568
|
className: "line-clamp-none",
|
|
1571
1569
|
children: tool.metadata.destructive ? labels.approvalDestructive : labels.approvalRequired
|
|
1572
1570
|
})
|
|
@@ -1574,14 +1572,14 @@ var ToolApproval = ({
|
|
|
1574
1572
|
}),
|
|
1575
1573
|
/* @__PURE__ */ jsxs7(ItemActions, {
|
|
1576
1574
|
children: [
|
|
1577
|
-
/* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ jsx19(Button, {
|
|
1578
1576
|
size: "sm",
|
|
1579
1577
|
variant: tool.metadata.destructive ? "destructive" : "default",
|
|
1580
1578
|
disabled,
|
|
1581
1579
|
onClick: () => onApproval(tool, true),
|
|
1582
1580
|
children: labels.approve
|
|
1583
1581
|
}),
|
|
1584
|
-
/* @__PURE__ */
|
|
1582
|
+
/* @__PURE__ */ jsx19(Button, {
|
|
1585
1583
|
size: "sm",
|
|
1586
1584
|
variant: "outline",
|
|
1587
1585
|
disabled,
|
|
@@ -1590,20 +1588,20 @@ var ToolApproval = ({
|
|
|
1590
1588
|
})
|
|
1591
1589
|
]
|
|
1592
1590
|
}),
|
|
1593
|
-
/* @__PURE__ */
|
|
1591
|
+
/* @__PURE__ */ jsx19(ItemFooter, {
|
|
1594
1592
|
className: "block min-w-0",
|
|
1595
|
-
children: /* @__PURE__ */
|
|
1593
|
+
children: /* @__PURE__ */ jsx19(Trace, {
|
|
1596
1594
|
children: /* @__PURE__ */ jsxs7(TraceCollapsible, {
|
|
1597
1595
|
children: [
|
|
1598
|
-
/* @__PURE__ */
|
|
1599
|
-
children: /* @__PURE__ */
|
|
1600
|
-
children: /* @__PURE__ */
|
|
1596
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleTrigger, {
|
|
1597
|
+
children: /* @__PURE__ */ jsx19(TraceLine, {
|
|
1598
|
+
children: /* @__PURE__ */ jsx19(TraceTitle, {
|
|
1601
1599
|
children: labels.viewMore
|
|
1602
1600
|
})
|
|
1603
1601
|
})
|
|
1604
1602
|
}),
|
|
1605
|
-
/* @__PURE__ */
|
|
1606
|
-
children: /* @__PURE__ */
|
|
1603
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleContent, {
|
|
1604
|
+
children: /* @__PURE__ */ jsx19(ToolInput, {
|
|
1607
1605
|
labels,
|
|
1608
1606
|
locale,
|
|
1609
1607
|
tool
|
|
@@ -1626,13 +1624,13 @@ var ToolActivity = ({
|
|
|
1626
1624
|
const line = /* @__PURE__ */ jsxs7(TraceLine, {
|
|
1627
1625
|
status: tool.status === "failed" ? "error" : running ? "running" : undefined,
|
|
1628
1626
|
children: [
|
|
1629
|
-
/* @__PURE__ */
|
|
1630
|
-
children: /* @__PURE__ */
|
|
1627
|
+
/* @__PURE__ */ jsx19(TraceIcon, {
|
|
1628
|
+
children: /* @__PURE__ */ jsx19(WrenchIcon, {})
|
|
1631
1629
|
}),
|
|
1632
|
-
/* @__PURE__ */
|
|
1630
|
+
/* @__PURE__ */ jsx19(TraceTitle, {
|
|
1633
1631
|
children: tool.metadata.title ?? tool.name
|
|
1634
1632
|
}),
|
|
1635
|
-
statusLabel ? /* @__PURE__ */
|
|
1633
|
+
statusLabel ? /* @__PURE__ */ jsx19(TraceDescription, {
|
|
1636
1634
|
children: statusLabel
|
|
1637
1635
|
}) : null
|
|
1638
1636
|
]
|
|
@@ -1641,11 +1639,11 @@ var ToolActivity = ({
|
|
|
1641
1639
|
return line;
|
|
1642
1640
|
return /* @__PURE__ */ jsxs7(TraceCollapsible, {
|
|
1643
1641
|
children: [
|
|
1644
|
-
/* @__PURE__ */
|
|
1642
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleTrigger, {
|
|
1645
1643
|
children: line
|
|
1646
1644
|
}),
|
|
1647
|
-
/* @__PURE__ */
|
|
1648
|
-
children: /* @__PURE__ */
|
|
1645
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleContent, {
|
|
1646
|
+
children: /* @__PURE__ */ jsx19(ToolInput, {
|
|
1649
1647
|
labels,
|
|
1650
1648
|
locale,
|
|
1651
1649
|
tool
|
|
@@ -1670,14 +1668,14 @@ function ToolActivityLog({
|
|
|
1670
1668
|
const running = pending && approvals.length === 0;
|
|
1671
1669
|
const failed = activity.some((tool) => tool.status === "failed");
|
|
1672
1670
|
if (tools.length === 0) {
|
|
1673
|
-
return /* @__PURE__ */
|
|
1671
|
+
return /* @__PURE__ */ jsx19(Trace, {
|
|
1674
1672
|
children: /* @__PURE__ */ jsxs7(TraceLine, {
|
|
1675
1673
|
status: pending ? "running" : undefined,
|
|
1676
1674
|
children: [
|
|
1677
|
-
/* @__PURE__ */
|
|
1678
|
-
children: /* @__PURE__ */
|
|
1675
|
+
/* @__PURE__ */ jsx19(TraceIcon, {
|
|
1676
|
+
children: /* @__PURE__ */ jsx19(WrenchIcon, {})
|
|
1679
1677
|
}),
|
|
1680
|
-
/* @__PURE__ */
|
|
1678
|
+
/* @__PURE__ */ jsx19(TraceTitle, {
|
|
1681
1679
|
children: labels.toolRunning
|
|
1682
1680
|
})
|
|
1683
1681
|
]
|
|
@@ -1687,30 +1685,30 @@ function ToolActivityLog({
|
|
|
1687
1685
|
return /* @__PURE__ */ jsxs7("div", {
|
|
1688
1686
|
className: "flex flex-col gap-2",
|
|
1689
1687
|
children: [
|
|
1690
|
-
currentTool ? /* @__PURE__ */
|
|
1688
|
+
currentTool ? /* @__PURE__ */ jsx19(Trace, {
|
|
1691
1689
|
children: /* @__PURE__ */ jsxs7(TraceCollapsible, {
|
|
1692
1690
|
open: open ?? running,
|
|
1693
1691
|
onOpenChange: setOpen,
|
|
1694
1692
|
children: [
|
|
1695
|
-
/* @__PURE__ */
|
|
1693
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleTrigger, {
|
|
1696
1694
|
children: /* @__PURE__ */ jsxs7(TraceLine, {
|
|
1697
1695
|
status: failed ? "error" : running ? "running" : undefined,
|
|
1698
1696
|
children: [
|
|
1699
|
-
/* @__PURE__ */
|
|
1700
|
-
children: /* @__PURE__ */
|
|
1697
|
+
/* @__PURE__ */ jsx19(TraceIcon, {
|
|
1698
|
+
children: /* @__PURE__ */ jsx19(WrenchIcon, {})
|
|
1701
1699
|
}),
|
|
1702
|
-
/* @__PURE__ */
|
|
1700
|
+
/* @__PURE__ */ jsx19(TraceTitle, {
|
|
1703
1701
|
children: approvals.length > 0 || running ? labels.toolActivity : workedSeconds !== undefined ? labels.toolWorked(workedSeconds) : currentTool.metadata.title ?? currentTool.name
|
|
1704
1702
|
}),
|
|
1705
|
-
failed || running ? /* @__PURE__ */
|
|
1703
|
+
failed || running ? /* @__PURE__ */ jsx19(TraceDescription, {
|
|
1706
1704
|
children: failed ? labels.toolFailed : labels.toolRunning
|
|
1707
1705
|
}) : null
|
|
1708
1706
|
]
|
|
1709
1707
|
})
|
|
1710
1708
|
}),
|
|
1711
|
-
/* @__PURE__ */
|
|
1712
|
-
children: /* @__PURE__ */
|
|
1713
|
-
children: activity.map((tool) => /* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ jsx19(TraceCollapsibleContent, {
|
|
1710
|
+
children: /* @__PURE__ */ jsx19(Trace, {
|
|
1711
|
+
children: activity.map((tool) => /* @__PURE__ */ jsx19(ToolActivity, {
|
|
1714
1712
|
labels,
|
|
1715
1713
|
locale,
|
|
1716
1714
|
pending,
|
|
@@ -1721,7 +1719,7 @@ function ToolActivityLog({
|
|
|
1721
1719
|
]
|
|
1722
1720
|
})
|
|
1723
1721
|
}) : null,
|
|
1724
|
-
approvals.map((tool) => /* @__PURE__ */
|
|
1722
|
+
approvals.map((tool) => /* @__PURE__ */ jsx19(ToolApproval, {
|
|
1725
1723
|
disabled,
|
|
1726
1724
|
labels,
|
|
1727
1725
|
locale,
|
|
@@ -1769,11 +1767,11 @@ function AgentMessageRow({
|
|
|
1769
1767
|
pending,
|
|
1770
1768
|
workedSeconds
|
|
1771
1769
|
]);
|
|
1772
|
-
return /* @__PURE__ */
|
|
1770
|
+
return /* @__PURE__ */ jsx19(Message, {
|
|
1773
1771
|
align: isUser ? "end" : "start",
|
|
1774
1772
|
children: /* @__PURE__ */ jsxs7(MessageContent, {
|
|
1775
1773
|
children: [
|
|
1776
|
-
!isUser && (message.tools.length > 0 || pending && !message.text) ? /* @__PURE__ */
|
|
1774
|
+
!isUser && (message.tools.length > 0 || pending && !message.text) ? /* @__PURE__ */ jsx19(ToolActivityLog, {
|
|
1777
1775
|
disabled,
|
|
1778
1776
|
labels,
|
|
1779
1777
|
locale,
|
|
@@ -1782,18 +1780,18 @@ function AgentMessageRow({
|
|
|
1782
1780
|
tools: message.tools,
|
|
1783
1781
|
workedSeconds
|
|
1784
1782
|
}) : null,
|
|
1785
|
-
message.text ? isUser ? /* @__PURE__ */
|
|
1783
|
+
message.text ? isUser ? /* @__PURE__ */ jsx19(Bubble, {
|
|
1786
1784
|
align: "end",
|
|
1787
|
-
children: /* @__PURE__ */
|
|
1785
|
+
children: /* @__PURE__ */ jsx19(BubbleContent, {
|
|
1788
1786
|
className: "whitespace-pre-wrap",
|
|
1789
1787
|
children: message.text
|
|
1790
1788
|
})
|
|
1791
|
-
}) : /* @__PURE__ */
|
|
1789
|
+
}) : /* @__PURE__ */ jsx19(Bubble, {
|
|
1792
1790
|
variant: "ghost",
|
|
1793
1791
|
className: "w-full",
|
|
1794
|
-
children: /* @__PURE__ */
|
|
1792
|
+
children: /* @__PURE__ */ jsx19(BubbleContent, {
|
|
1795
1793
|
className: "w-full",
|
|
1796
|
-
children: message.markdown ? /* @__PURE__ */
|
|
1794
|
+
children: message.markdown ? /* @__PURE__ */ jsx19(MarkdownContent, {
|
|
1797
1795
|
className: "w-full",
|
|
1798
1796
|
codeBlocks: message.markdown.codeBlocks,
|
|
1799
1797
|
html: message.markdown.html,
|
|
@@ -1805,7 +1803,7 @@ function AgentMessageRow({
|
|
|
1805
1803
|
}
|
|
1806
1804
|
},
|
|
1807
1805
|
locale
|
|
1808
|
-
}) : /* @__PURE__ */
|
|
1806
|
+
}) : /* @__PURE__ */ jsx19("div", {
|
|
1809
1807
|
className: "whitespace-pre-wrap",
|
|
1810
1808
|
children: message.text
|
|
1811
1809
|
})
|
|
@@ -1912,29 +1910,29 @@ function AgentWidget({
|
|
|
1912
1910
|
disablePointerDismissal: true,
|
|
1913
1911
|
children: [
|
|
1914
1912
|
/* @__PURE__ */ jsxs7(DialogTrigger, {
|
|
1915
|
-
render: /* @__PURE__ */
|
|
1913
|
+
render: /* @__PURE__ */ jsx19(Button, {
|
|
1916
1914
|
size: "icon-lg",
|
|
1917
1915
|
className: "fixed right-4 bottom-4 z-9999 rounded-full shadow-lg md:right-6 md:bottom-6"
|
|
1918
1916
|
}),
|
|
1919
1917
|
children: [
|
|
1920
|
-
/* @__PURE__ */
|
|
1921
|
-
/* @__PURE__ */
|
|
1918
|
+
/* @__PURE__ */ jsx19(BotIcon, {}),
|
|
1919
|
+
/* @__PURE__ */ jsx19("span", {
|
|
1922
1920
|
className: "sr-only",
|
|
1923
1921
|
children: labels.open
|
|
1924
1922
|
})
|
|
1925
1923
|
]
|
|
1926
1924
|
}),
|
|
1927
|
-
/* @__PURE__ */
|
|
1925
|
+
/* @__PURE__ */ jsx19(DialogPortal, {
|
|
1928
1926
|
children: /* @__PURE__ */ jsxs7(DialogPrimitive2.Popup, {
|
|
1929
1927
|
"data-slot": "dialog-content",
|
|
1930
1928
|
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"),
|
|
1931
1929
|
children: [
|
|
1932
|
-
/* @__PURE__ */
|
|
1930
|
+
/* @__PURE__ */ jsx19(DialogHeader, {
|
|
1933
1931
|
className: "shrink-0 border-b p-4",
|
|
1934
1932
|
children: /* @__PURE__ */ jsxs7("div", {
|
|
1935
1933
|
className: "flex items-center gap-1",
|
|
1936
1934
|
children: [
|
|
1937
|
-
/* @__PURE__ */
|
|
1935
|
+
/* @__PURE__ */ jsx19(DialogTitle, {
|
|
1938
1936
|
className: "min-w-0 flex-1 truncate text-sm leading-none font-medium",
|
|
1939
1937
|
children: labels.title
|
|
1940
1938
|
}),
|
|
@@ -1943,8 +1941,8 @@ function AgentWidget({
|
|
|
1943
1941
|
size: "icon-sm",
|
|
1944
1942
|
onClick: () => setOpen(false),
|
|
1945
1943
|
children: [
|
|
1946
|
-
/* @__PURE__ */
|
|
1947
|
-
/* @__PURE__ */
|
|
1944
|
+
/* @__PURE__ */ jsx19(MinusIcon, {}),
|
|
1945
|
+
/* @__PURE__ */ jsx19("span", {
|
|
1948
1946
|
className: "sr-only",
|
|
1949
1947
|
children: labels.minimize
|
|
1950
1948
|
})
|
|
@@ -1955,21 +1953,21 @@ function AgentWidget({
|
|
|
1955
1953
|
size: "icon-sm",
|
|
1956
1954
|
onClick: () => setMaximized((current) => !current),
|
|
1957
1955
|
children: [
|
|
1958
|
-
maximized ? /* @__PURE__ */
|
|
1959
|
-
/* @__PURE__ */
|
|
1956
|
+
maximized ? /* @__PURE__ */ jsx19(Minimize2Icon, {}) : /* @__PURE__ */ jsx19(Maximize2Icon, {}),
|
|
1957
|
+
/* @__PURE__ */ jsx19("span", {
|
|
1960
1958
|
className: "sr-only",
|
|
1961
1959
|
children: maximized ? labels.restore : labels.maximize
|
|
1962
1960
|
})
|
|
1963
1961
|
]
|
|
1964
1962
|
}),
|
|
1965
1963
|
/* @__PURE__ */ jsxs7(DialogClose, {
|
|
1966
|
-
render: /* @__PURE__ */
|
|
1964
|
+
render: /* @__PURE__ */ jsx19(Button, {
|
|
1967
1965
|
variant: "ghost",
|
|
1968
1966
|
size: "icon-sm"
|
|
1969
1967
|
}),
|
|
1970
1968
|
children: [
|
|
1971
|
-
/* @__PURE__ */
|
|
1972
|
-
/* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ jsx19(XIcon2, {}),
|
|
1970
|
+
/* @__PURE__ */ jsx19("span", {
|
|
1973
1971
|
className: "sr-only",
|
|
1974
1972
|
children: labels.close
|
|
1975
1973
|
})
|
|
@@ -1978,38 +1976,38 @@ function AgentWidget({
|
|
|
1978
1976
|
]
|
|
1979
1977
|
})
|
|
1980
1978
|
}),
|
|
1981
|
-
/* @__PURE__ */
|
|
1979
|
+
/* @__PURE__ */ jsx19("div", {
|
|
1982
1980
|
className: "min-h-0 flex-1 overflow-hidden",
|
|
1983
|
-
children: state.messages.length === 0 && !state.error ? /* @__PURE__ */
|
|
1981
|
+
children: state.messages.length === 0 && !state.error ? /* @__PURE__ */ jsx19(Empty, {
|
|
1984
1982
|
className: "h-full",
|
|
1985
1983
|
children: /* @__PURE__ */ jsxs7(EmptyHeader, {
|
|
1986
1984
|
children: [
|
|
1987
|
-
/* @__PURE__ */
|
|
1985
|
+
/* @__PURE__ */ jsx19(EmptyMedia, {
|
|
1988
1986
|
variant: "icon",
|
|
1989
|
-
children: /* @__PURE__ */
|
|
1987
|
+
children: /* @__PURE__ */ jsx19(MessageCircleDashedIcon, {})
|
|
1990
1988
|
}),
|
|
1991
|
-
/* @__PURE__ */
|
|
1989
|
+
/* @__PURE__ */ jsx19(EmptyTitle, {
|
|
1992
1990
|
children: labels.welcome
|
|
1993
1991
|
}),
|
|
1994
|
-
/* @__PURE__ */
|
|
1992
|
+
/* @__PURE__ */ jsx19(EmptyDescription, {
|
|
1995
1993
|
children: labels.description
|
|
1996
1994
|
})
|
|
1997
1995
|
]
|
|
1998
1996
|
})
|
|
1999
|
-
}) : /* @__PURE__ */
|
|
1997
|
+
}) : /* @__PURE__ */ jsx19(MessageScrollerProvider, {
|
|
2000
1998
|
autoScroll: true,
|
|
2001
1999
|
children: /* @__PURE__ */ jsxs7(MessageScroller, {
|
|
2002
2000
|
children: [
|
|
2003
|
-
/* @__PURE__ */
|
|
2001
|
+
/* @__PURE__ */ jsx19(MessageScrollerViewport, {
|
|
2004
2002
|
"aria-label": labels.title,
|
|
2005
2003
|
children: /* @__PURE__ */ jsxs7(MessageScrollerContent, {
|
|
2006
2004
|
"aria-busy": state.pending,
|
|
2007
2005
|
className: "p-4",
|
|
2008
2006
|
children: [
|
|
2009
|
-
state.messages.map((message, index) => /* @__PURE__ */
|
|
2007
|
+
state.messages.map((message, index) => /* @__PURE__ */ jsx19(MessageScrollerItem, {
|
|
2010
2008
|
messageId: message.id,
|
|
2011
2009
|
scrollAnchor: message.role === "user",
|
|
2012
|
-
children: /* @__PURE__ */
|
|
2010
|
+
children: /* @__PURE__ */ jsx19(AgentMessageRow, {
|
|
2013
2011
|
disabled: state.pending,
|
|
2014
2012
|
labels,
|
|
2015
2013
|
locale,
|
|
@@ -2018,15 +2016,15 @@ function AgentWidget({
|
|
|
2018
2016
|
pending: state.pending && index === state.messages.length - 1
|
|
2019
2017
|
})
|
|
2020
2018
|
}, message.id)),
|
|
2021
|
-
state.error ? /* @__PURE__ */
|
|
2019
|
+
state.error ? /* @__PURE__ */ jsx19(MessageScrollerItem, {
|
|
2022
2020
|
messageId: "error",
|
|
2023
2021
|
children: /* @__PURE__ */ jsxs7(Alert, {
|
|
2024
2022
|
variant: "destructive",
|
|
2025
2023
|
children: [
|
|
2026
|
-
/* @__PURE__ */
|
|
2024
|
+
/* @__PURE__ */ jsx19(AlertTitle, {
|
|
2027
2025
|
children: labels.title
|
|
2028
2026
|
}),
|
|
2029
|
-
/* @__PURE__ */
|
|
2027
|
+
/* @__PURE__ */ jsx19(AlertDescription, {
|
|
2030
2028
|
children: errorMessage(state.error, labels)
|
|
2031
2029
|
})
|
|
2032
2030
|
]
|
|
@@ -2037,8 +2035,8 @@ function AgentWidget({
|
|
|
2037
2035
|
}),
|
|
2038
2036
|
/* @__PURE__ */ jsxs7(MessageScrollerButton, {
|
|
2039
2037
|
children: [
|
|
2040
|
-
/* @__PURE__ */
|
|
2041
|
-
/* @__PURE__ */
|
|
2038
|
+
/* @__PURE__ */ jsx19(ArrowDownIcon2, {}),
|
|
2039
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2042
2040
|
className: "sr-only",
|
|
2043
2041
|
children: labels.scrollLatest
|
|
2044
2042
|
})
|
|
@@ -2048,7 +2046,7 @@ function AgentWidget({
|
|
|
2048
2046
|
})
|
|
2049
2047
|
})
|
|
2050
2048
|
}),
|
|
2051
|
-
/* @__PURE__ */
|
|
2049
|
+
/* @__PURE__ */ jsx19("form", {
|
|
2052
2050
|
className: "shrink-0 border-t p-3",
|
|
2053
2051
|
onSubmit: (event) => {
|
|
2054
2052
|
event.preventDefault();
|
|
@@ -2056,26 +2054,26 @@ function AgentWidget({
|
|
|
2056
2054
|
},
|
|
2057
2055
|
children: /* @__PURE__ */ jsxs7(InputGroup, {
|
|
2058
2056
|
children: [
|
|
2059
|
-
activeContext ? /* @__PURE__ */
|
|
2057
|
+
activeContext ? /* @__PURE__ */ jsx19(InputGroupAddon, {
|
|
2060
2058
|
align: "block-start",
|
|
2061
2059
|
children: /* @__PURE__ */ jsxs7(Attachment, {
|
|
2062
2060
|
size: "xs",
|
|
2063
2061
|
className: "min-w-0",
|
|
2064
2062
|
children: [
|
|
2065
|
-
activeContext.icon ? /* @__PURE__ */
|
|
2063
|
+
activeContext.icon ? /* @__PURE__ */ jsx19(AttachmentMedia, {
|
|
2066
2064
|
children: activeContext.icon
|
|
2067
2065
|
}) : null,
|
|
2068
|
-
/* @__PURE__ */
|
|
2069
|
-
children: /* @__PURE__ */
|
|
2066
|
+
/* @__PURE__ */ jsx19(AttachmentContent, {
|
|
2067
|
+
children: /* @__PURE__ */ jsx19(AttachmentTitle, {
|
|
2070
2068
|
children: activeContext.label
|
|
2071
2069
|
})
|
|
2072
2070
|
}),
|
|
2073
|
-
onRemoveContext ? /* @__PURE__ */
|
|
2074
|
-
children: /* @__PURE__ */
|
|
2071
|
+
onRemoveContext ? /* @__PURE__ */ jsx19(AttachmentActions, {
|
|
2072
|
+
children: /* @__PURE__ */ jsx19(AttachmentAction, {
|
|
2075
2073
|
type: "button",
|
|
2076
2074
|
"aria-label": `${labels.removeContext}: ${activeContext.label}`,
|
|
2077
2075
|
onClick: onRemoveContext,
|
|
2078
|
-
children: /* @__PURE__ */
|
|
2076
|
+
children: /* @__PURE__ */ jsx19(XIcon2, {})
|
|
2079
2077
|
})
|
|
2080
2078
|
}) : null
|
|
2081
2079
|
]
|
|
@@ -2084,7 +2082,7 @@ function AgentWidget({
|
|
|
2084
2082
|
/* @__PURE__ */ jsxs7("div", {
|
|
2085
2083
|
className: "relative w-full min-w-0 self-stretch text-left",
|
|
2086
2084
|
children: [
|
|
2087
|
-
/* @__PURE__ */
|
|
2085
|
+
/* @__PURE__ */ jsx19("div", {
|
|
2088
2086
|
ref: inputOverlayRef,
|
|
2089
2087
|
"aria-hidden": "true",
|
|
2090
2088
|
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",
|
|
@@ -2094,10 +2092,10 @@ function AgentWidget({
|
|
|
2094
2092
|
open: referencePickerOpen,
|
|
2095
2093
|
triggerId: referenceInputId,
|
|
2096
2094
|
children: [
|
|
2097
|
-
/* @__PURE__ */
|
|
2095
|
+
/* @__PURE__ */ jsx19(PopoverTrigger, {
|
|
2098
2096
|
id: referenceInputId,
|
|
2099
2097
|
nativeButton: false,
|
|
2100
|
-
render: /* @__PURE__ */
|
|
2098
|
+
render: /* @__PURE__ */ jsx19(InputGroupTextarea, {
|
|
2101
2099
|
ref: inputRef,
|
|
2102
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",
|
|
2103
2101
|
value: input,
|
|
@@ -2149,22 +2147,22 @@ function AgentWidget({
|
|
|
2149
2147
|
}
|
|
2150
2148
|
})
|
|
2151
2149
|
}),
|
|
2152
|
-
/* @__PURE__ */
|
|
2150
|
+
/* @__PURE__ */ jsx19(PopoverContent, {
|
|
2153
2151
|
align: "start",
|
|
2154
2152
|
initialFocus: false,
|
|
2155
2153
|
side: "top",
|
|
2156
2154
|
className: "w-[min(24rem,calc(100vw-2rem))] p-0",
|
|
2157
|
-
children: /* @__PURE__ */
|
|
2155
|
+
children: /* @__PURE__ */ jsx19(Command, {
|
|
2158
2156
|
shouldFilter: false,
|
|
2159
2157
|
value: activeReference?.key ?? "",
|
|
2160
2158
|
onValueChange: setActiveReferenceKey,
|
|
2161
2159
|
children: /* @__PURE__ */ jsxs7(CommandList, {
|
|
2162
2160
|
id: referenceListId,
|
|
2163
2161
|
children: [
|
|
2164
|
-
/* @__PURE__ */
|
|
2162
|
+
/* @__PURE__ */ jsx19(CommandEmpty, {
|
|
2165
2163
|
children: labels.noReferences
|
|
2166
2164
|
}),
|
|
2167
|
-
matchingReferences.length > 0 ? /* @__PURE__ */
|
|
2165
|
+
matchingReferences.length > 0 ? /* @__PURE__ */ jsx19(CommandGroup, {
|
|
2168
2166
|
heading: labels.references,
|
|
2169
2167
|
children: matchingReferences.map((reference, index) => /* @__PURE__ */ jsxs7(CommandItem, {
|
|
2170
2168
|
id: `${referenceInputId}-reference-${index}`,
|
|
@@ -2172,7 +2170,7 @@ function AgentWidget({
|
|
|
2172
2170
|
onSelect: () => selectReference(reference),
|
|
2173
2171
|
children: [
|
|
2174
2172
|
reference.icon,
|
|
2175
|
-
/* @__PURE__ */
|
|
2173
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2176
2174
|
className: "truncate",
|
|
2177
2175
|
children: reference.label
|
|
2178
2176
|
})
|
|
@@ -2187,15 +2185,15 @@ function AgentWidget({
|
|
|
2187
2185
|
})
|
|
2188
2186
|
]
|
|
2189
2187
|
}),
|
|
2190
|
-
/* @__PURE__ */
|
|
2188
|
+
/* @__PURE__ */ jsx19(InputGroupAddon, {
|
|
2191
2189
|
align: "block-end",
|
|
2192
2190
|
className: "justify-end",
|
|
2193
2191
|
children: state.pending ? /* @__PURE__ */ jsxs7(InputGroupButton, {
|
|
2194
2192
|
size: "icon-xs",
|
|
2195
2193
|
onClick: onInterrupt,
|
|
2196
2194
|
children: [
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */
|
|
2195
|
+
/* @__PURE__ */ jsx19(SquareIcon, {}),
|
|
2196
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2199
2197
|
className: "sr-only",
|
|
2200
2198
|
children: labels.stop
|
|
2201
2199
|
})
|
|
@@ -2205,8 +2203,8 @@ function AgentWidget({
|
|
|
2205
2203
|
size: "icon-xs",
|
|
2206
2204
|
disabled: !input.trim() || hasPendingApproval,
|
|
2207
2205
|
children: [
|
|
2208
|
-
/* @__PURE__ */
|
|
2209
|
-
/* @__PURE__ */
|
|
2206
|
+
/* @__PURE__ */ jsx19(SendIcon, {}),
|
|
2207
|
+
/* @__PURE__ */ jsx19("span", {
|
|
2210
2208
|
className: "sr-only",
|
|
2211
2209
|
children: labels.send
|
|
2212
2210
|
})
|
|
@@ -2223,9 +2221,9 @@ function AgentWidget({
|
|
|
2223
2221
|
});
|
|
2224
2222
|
}
|
|
2225
2223
|
export {
|
|
2226
|
-
|
|
2227
|
-
makeAgentAtoms,
|
|
2228
|
-
initialAgentState,
|
|
2224
|
+
AgentWidget,
|
|
2229
2225
|
agentWidgetMessages,
|
|
2230
|
-
|
|
2226
|
+
initialAgentState,
|
|
2227
|
+
makeAgentAtoms,
|
|
2228
|
+
reduceAgentEvent
|
|
2231
2229
|
};
|