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