@krak-stack/registry 0.11.3 → 0.11.5
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 +18 -0
- package/README.md +23 -9
- package/dist/components/agent/react.js +226 -1072
- package/dist/components/app-switcher/html.js +10 -53
- package/dist/components/app-switcher/react.js +29 -139
- package/dist/components/async-action-button/html.js +3 -34
- package/dist/components/async-action-button/react.d.ts +1 -1
- package/dist/components/async-action-button/react.js +8 -54
- package/dist/components/audit-log-table/react.js +555 -1265
- package/dist/components/bulk-list-input/html.js +3 -40
- package/dist/components/bulk-list-input/react.d.ts +1 -1
- package/dist/components/bulk-list-input/react.js +6 -59
- package/dist/components/code-block/html.js +1 -35
- package/dist/components/code-block/react.js +12 -59
- package/dist/components/color-input/html.js +2 -19
- package/dist/components/color-input/react.js +6 -97
- package/dist/components/copy-button/html.js +1 -35
- package/dist/components/copy-button/react.d.ts +1 -1
- package/dist/components/copy-button/react.js +7 -54
- package/dist/components/copy-value/html.js +11 -52
- package/dist/components/copy-value/react.js +25 -165
- package/dist/components/cron-input/html.js +2 -18
- package/dist/components/cron-input/react.js +15 -30
- package/dist/components/danger-confirmation/html.js +11 -57
- package/dist/components/danger-confirmation/react.js +26 -187
- package/dist/components/data-table/html.d.ts +12 -12
- package/dist/components/data-table/html.js +200 -174
- package/dist/components/data-table/react.js +549 -1259
- package/dist/components/date-input/html.js +19 -74
- package/dist/components/date-input/react.d.ts +1 -1
- package/dist/components/date-input/react.js +28 -313
- package/dist/components/docs/classes.d.ts +15 -0
- package/dist/components/docs/html.d.ts +55 -0
- package/dist/components/docs/html.js +837 -0
- package/dist/components/docs/index.d.ts +49 -0
- package/dist/components/docs/react.d.ts +10 -0
- package/dist/components/docs/react.js +949 -0
- package/dist/components/docs/schema.d.ts +49 -0
- package/dist/components/editable-text/html.js +6 -52
- package/dist/components/editable-text/react.js +13 -83
- package/dist/components/editing-locale-switcher/html.d.ts +2 -2
- package/dist/components/editing-locale-switcher/html.js +13 -43
- package/dist/components/editing-locale-switcher/react.js +17 -141
- package/dist/components/effect-form/react.js +249 -812
- package/dist/components/email-composer/react.js +62 -279
- package/dist/components/email-editor/html.js +13 -58
- package/dist/components/email-editor/react.js +187 -483
- package/dist/components/error-component/html.js +2 -47
- package/dist/components/error-component/react.js +33 -137
- package/dist/components/file-input/html.js +9 -40
- package/dist/components/file-input/react.js +39 -208
- package/dist/components/form/react.js +212 -777
- package/dist/components/hint/react.d.ts +15 -0
- package/dist/components/hint/react.js +133 -0
- package/dist/components/icon-input/html.js +9 -56
- package/dist/components/icon-input/react.js +43 -143
- package/dist/components/image-crop-editor/html.js +1 -35
- package/dist/components/image-crop-editor/react.js +21 -66
- package/dist/components/locale-switcher/html.js +8 -55
- package/dist/components/locale-switcher/react.js +21 -146
- package/dist/components/map-menu/html.d.ts +8 -8
- package/dist/components/map-menu/html.js +13 -72
- package/dist/components/map-menu/react.js +92 -309
- package/dist/components/markdown/html.js +1 -35
- package/dist/components/markdown/react.js +20 -64
- package/dist/components/notification-menu/html.js +14 -50
- package/dist/components/notification-menu/react.js +73 -343
- package/dist/components/pagination/html.js +17 -73
- package/dist/components/pagination/react.js +37 -200
- package/dist/components/phone-number-input/html.js +19 -57
- package/dist/components/phone-number-input/react.d.ts +1 -1
- package/dist/components/phone-number-input/react.js +43 -142
- package/dist/components/presence-transition/index.d.ts +2 -2
- package/dist/components/registry-previews/component-example.js +26 -126
- package/dist/components/rich-text-editor/html.d.ts +12 -12
- package/dist/components/rich-text-editor/html.js +12 -85
- package/dist/components/rich-text-editor/react.js +55 -272
- package/dist/components/search-menu/classes.d.ts +2 -0
- package/dist/components/search-menu/html.d.ts +2 -0
- package/dist/components/search-menu/html.js +40 -73
- package/dist/components/search-menu/index.d.ts +27 -2
- package/dist/components/search-menu/react.d.ts +1 -1
- package/dist/components/search-menu/react.js +59 -280
- package/dist/components/search-menu/schema.d.ts +1 -0
- package/dist/components/select-with-custom-input/html.d.ts +2 -2
- package/dist/components/select-with-custom-input/html.js +13 -48
- package/dist/components/select-with-custom-input/react.js +22 -146
- package/dist/components/sidebar-layout/html.d.ts +16 -6
- package/dist/components/sidebar-layout/html.js +83 -69
- package/dist/components/sidebar-layout/index.d.ts +16 -0
- package/dist/components/sidebar-layout/react.js +105 -698
- package/dist/components/stats-card/react.js +13 -58
- package/dist/components/support/html.js +14 -69
- package/dist/components/support/react.js +74 -320
- package/dist/components/theme-switcher/html.js +11 -55
- package/dist/components/theme-switcher/react.js +28 -152
- package/dist/components/time-input/html.d.ts +2 -2
- package/dist/components/time-input/html.js +8 -53
- package/dist/components/time-input/react.js +34 -188
- package/dist/components/timezone-input/html.js +11 -67
- package/dist/components/timezone-input/react.js +41 -143
- package/dist/components/toast/html.d.ts +6 -6
- package/dist/components/toast/html.js +13 -46
- package/dist/components/tracking-notice/react.js +39 -188
- package/dist/components/unsaved-changes-guard/html.js +9 -43
- package/dist/components/unsaved-changes-guard/react.js +19 -169
- package/dist/components/upload-attachment/html.d.ts +4 -4
- package/dist/components/upload-attachment/html.js +4 -35
- package/dist/components/upload-attachment/react.js +25 -164
- package/dist/components/virtualized-combobox/html.js +10 -35
- package/dist/components/virtualized-combobox/react.js +28 -129
- package/dist/components/webhook-delivery-table/html.js +211 -184
- package/dist/components/webhook-delivery-table/react.js +585 -1362
- package/dist/lib/docs.integrations.server.js +150 -202
- package/dist/lib/docs.js +305 -1085
- package/dist/lib/docs.server.js +134 -186
- package/dist/lib/documentation-toolkit.js +144 -196
- package/dist/services/agent/client/index.js +226 -1072
- package/dist/services/notification/client/index.js +73 -343
- package/dist/services/notification/public.js +73 -343
- package/package.json +4 -8
- package/dist/components/effectcn/alert-dialog.d.ts +0 -13
- package/dist/components/effectcn/button.d.ts +0 -31
- package/dist/components/effectcn/calendar.d.ts +0 -12
- package/dist/components/effectcn/checkbox.d.ts +0 -10
- package/dist/components/effectcn/combobox.d.ts +0 -25
- package/dist/components/effectcn/dialog.d.ts +0 -19
- package/dist/components/effectcn/field.d.ts +0 -11
- package/dist/components/effectcn/file-drop.d.ts +0 -8
- package/dist/components/effectcn/input.d.ts +0 -26
- package/dist/components/effectcn/menu.d.ts +0 -85
- package/dist/components/effectcn/menubar.d.ts +0 -8
- package/dist/components/effectcn/popover.d.ts +0 -18
- package/dist/components/effectcn/scroll-area.d.ts +0 -12
- package/dist/components/effectcn/select.d.ts +0 -68
- package/dist/components/effectcn/toast.d.ts +0 -29
- package/dist/components/ui/alert-dialog.d.ts +0 -18
- package/dist/components/ui/alert.d.ts +0 -10
- package/dist/components/ui/attachment.d.ts +0 -23
- package/dist/components/ui/badge.d.ts +0 -7
- package/dist/components/ui/bubble.d.ts +0 -16
- package/dist/components/ui/button.d.ts +0 -8
- package/dist/components/ui/calendar.d.ts +0 -10
- package/dist/components/ui/card.d.ts +0 -11
- package/dist/components/ui/checkbox.d.ts +0 -3
- package/dist/components/ui/collapsible.d.ts +0 -5
- package/dist/components/ui/command.d.ts +0 -18
- package/dist/components/ui/dialog.d.ts +0 -17
- package/dist/components/ui/dropdown-menu.d.ts +0 -29
- package/dist/components/ui/empty.d.ts +0 -11
- package/dist/components/ui/field.d.ts +0 -24
- package/dist/components/ui/input-group.d.ts +0 -17
- package/dist/components/ui/input.d.ts +0 -3
- package/dist/components/ui/item.d.ts +0 -22
- package/dist/components/ui/label.d.ts +0 -3
- package/dist/components/ui/menubar.d.ts +0 -29
- package/dist/components/ui/message-scroller.d.ts +0 -10
- package/dist/components/ui/message.d.ts +0 -10
- package/dist/components/ui/popover.d.ts +0 -9
- package/dist/components/ui/scroll-area.d.ts +0 -4
- package/dist/components/ui/select.d.ts +0 -15
- package/dist/components/ui/select.js +0 -159
- package/dist/components/ui/separator.d.ts +0 -3
- package/dist/components/ui/sheet.d.ts +0 -14
- package/dist/components/ui/sidebar.d.ts +0 -63
- package/dist/components/ui/skeleton.d.ts +0 -2
- package/dist/components/ui/table.d.ts +0 -10
- package/dist/components/ui/tabs.d.ts +0 -10
- package/dist/components/ui/textarea.d.ts +0 -3
- package/dist/components/ui/tooltip.d.ts +0 -6
- package/dist/components/ui/trace.d.ts +0 -18
- package/dist/lib/effectcn-form.d.ts +0 -3
- package/dist/lib/effectcn-form.js +0 -54
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// ../../src/components/agent/react.tsx
|
|
2
2
|
import { useEffect, useId, useRef as useRef2, useState as useState2 } from "react";
|
|
3
|
-
import { Dialog as
|
|
3
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
4
4
|
import {
|
|
5
|
-
ArrowDownIcon
|
|
5
|
+
ArrowDownIcon,
|
|
6
6
|
BotIcon,
|
|
7
7
|
Maximize2Icon,
|
|
8
8
|
MessageCircleDashedIcon,
|
|
@@ -11,58 +11,11 @@ import {
|
|
|
11
11
|
SendIcon,
|
|
12
12
|
SquareIcon,
|
|
13
13
|
WrenchIcon,
|
|
14
|
-
XIcon
|
|
14
|
+
XIcon
|
|
15
15
|
} from "lucide-react";
|
|
16
16
|
|
|
17
|
-
// ../../src/components/ui/button.tsx
|
|
18
|
-
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
19
|
-
import { cva } from "class-variance-authority";
|
|
20
|
-
|
|
21
|
-
// ../../src/lib/utils.ts
|
|
22
|
-
import { cn } from "cn";
|
|
23
|
-
|
|
24
|
-
// ../../src/components/ui/button.tsx
|
|
25
|
-
import { jsx } from "react/jsx-runtime";
|
|
26
|
-
var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
27
|
-
variants: {
|
|
28
|
-
variant: {
|
|
29
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
30
|
-
outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
31
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
32
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
33
|
-
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
34
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
35
|
-
},
|
|
36
|
-
size: {
|
|
37
|
-
default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
38
|
-
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
39
|
-
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
40
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
41
|
-
icon: "size-9",
|
|
42
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
43
|
-
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
44
|
-
"icon-lg": "size-10"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
defaultVariants: {
|
|
48
|
-
variant: "default",
|
|
49
|
-
size: "default"
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
function Button({
|
|
53
|
-
className,
|
|
54
|
-
variant = "default",
|
|
55
|
-
size = "default",
|
|
56
|
-
...props
|
|
57
|
-
}) {
|
|
58
|
-
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
59
|
-
"data-slot": "button",
|
|
60
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
61
|
-
...props
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
17
|
// ../../src/components/copy-button/react.tsx
|
|
18
|
+
import { Button } from "@/components/ui/button";
|
|
66
19
|
import { Check, Copy, TriangleAlert } from "lucide-react";
|
|
67
20
|
import { Redacted as Redacted2 } from "effect";
|
|
68
21
|
import { Component as Component2 } from "effect/ui";
|
|
@@ -165,7 +118,7 @@ var copyButtonStatus = (status, copy, description) => {
|
|
|
165
118
|
};
|
|
166
119
|
|
|
167
120
|
// ../../src/components/copy-button/react.tsx
|
|
168
|
-
import { jsx
|
|
121
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
169
122
|
"use client";
|
|
170
123
|
function CopyButton({
|
|
171
124
|
value,
|
|
@@ -223,22 +176,22 @@ function CopyButton({
|
|
|
223
176
|
size: size ?? defaultSize,
|
|
224
177
|
...props,
|
|
225
178
|
children: [
|
|
226
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ jsx("span", {
|
|
227
180
|
"aria-live": "polite",
|
|
228
181
|
className: "sr-only",
|
|
229
182
|
role: "status",
|
|
230
183
|
children: copyButtonStatus(status, labels, valueDescription)
|
|
231
184
|
}),
|
|
232
|
-
status === "copied" ? /* @__PURE__ */
|
|
185
|
+
status === "copied" ? /* @__PURE__ */ jsx(Check, {
|
|
233
186
|
"aria-hidden": "true"
|
|
234
187
|
}) : null,
|
|
235
|
-
status === "failed" ? /* @__PURE__ */
|
|
188
|
+
status === "failed" ? /* @__PURE__ */ jsx(TriangleAlert, {
|
|
236
189
|
"aria-hidden": "true"
|
|
237
190
|
}) : null,
|
|
238
|
-
status === "idle" ? /* @__PURE__ */
|
|
191
|
+
status === "idle" ? /* @__PURE__ */ jsx(Copy, {
|
|
239
192
|
"aria-hidden": "true"
|
|
240
193
|
}) : null,
|
|
241
|
-
isLarge ? /* @__PURE__ */
|
|
194
|
+
isLarge ? /* @__PURE__ */ jsx("span", {
|
|
242
195
|
children: labels.copy
|
|
243
196
|
}) : null
|
|
244
197
|
]
|
|
@@ -306,7 +259,7 @@ var codeBlockMessages = (locale = "en", translations) => ({
|
|
|
306
259
|
var codeLanguage = (language = "text") => language.toLowerCase() || "text";
|
|
307
260
|
|
|
308
261
|
// ../../src/components/code-block/react.tsx
|
|
309
|
-
import { jsx as
|
|
262
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
310
263
|
function CodeBlock({
|
|
311
264
|
classes: classOverrides,
|
|
312
265
|
code,
|
|
@@ -323,17 +276,17 @@ function CodeBlock({
|
|
|
323
276
|
className: codeBlockClasses.root,
|
|
324
277
|
"data-code-theme": true,
|
|
325
278
|
children: [
|
|
326
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ jsx2("style", {
|
|
327
280
|
children: codeThemeCss
|
|
328
281
|
}),
|
|
329
282
|
/* @__PURE__ */ jsxs2("div", {
|
|
330
283
|
className: codeBlockClasses.header,
|
|
331
284
|
children: [
|
|
332
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ jsx2("span", {
|
|
333
286
|
className: codeBlockClasses.language,
|
|
334
287
|
children: highlighted.lang
|
|
335
288
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ jsx2(CopyButton, {
|
|
337
290
|
value: code,
|
|
338
291
|
valueDescription: labels.codeDescription(highlighted.lang),
|
|
339
292
|
variant: "ghost",
|
|
@@ -342,13 +295,16 @@ function CodeBlock({
|
|
|
342
295
|
})
|
|
343
296
|
]
|
|
344
297
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ jsx2("div", {
|
|
346
299
|
className: codeBlockClasses.viewport,
|
|
347
300
|
dangerouslySetInnerHTML: { __html: highlighted.html }
|
|
348
301
|
})
|
|
349
302
|
]
|
|
350
303
|
});
|
|
351
304
|
}
|
|
305
|
+
// ../../src/lib/utils.ts
|
|
306
|
+
import { cn } from "cn";
|
|
307
|
+
|
|
352
308
|
// ../../src/components/markdown/classes.ts
|
|
353
309
|
var markdownClass = "[&_a:hover]:text-primary [&_a]:decoration-border [&_blockquote]:border-primary/40 [&_blockquote]:bg-muted/40 [&_h2_a]:text-muted-foreground [&_h3_a]:text-muted-foreground [&_[data-inline-code]]:bg-muted text-[0.98rem] leading-7 [&_[data-inline-code]]:rounded [&_[data-inline-code]]:px-1.5 [&_[data-inline-code]]:py-0.5 [&_[data-inline-code]]:font-mono [&_[data-inline-code]]:text-[0.875em] [&_[data-markdown-table]]:overflow-x-auto [&_a]:font-medium [&_a]:underline [&_a]:decoration-1 [&_a]:underline-offset-4 [&_a]:transition-colors [&_blockquote]:my-5 [&_blockquote]:rounded-r-lg [&_blockquote]:border-l-4 [&_blockquote]:px-5 [&_blockquote]:py-1 [&_h2]:mt-12 [&_h2]:scroll-mt-20 [&_h2]:border-t [&_h2]:pt-8 [&_h2]:text-2xl [&_h2]:font-bold [&_h2]:tracking-tight [&_h2_a]:ml-2 [&_h2_a]:no-underline [&_h2:first-of-type]:mt-0 [&_h2:first-of-type]:border-t-0 [&_h2:first-of-type]:pt-0 [&_h3]:mt-8 [&_h3]:scroll-mt-20 [&_h3]:text-xl [&_h3]:font-semibold [&_h3]:tracking-tight [&_h3_a]:ml-2 [&_h3_a]:no-underline [&_ol]:my-5 [&_p]:my-5 [&_table]:w-full [&_table]:text-sm [&_td]:border-b [&_td]:p-2 [&_th]:border-b [&_th]:p-2 [&_th]:text-left [&_ul]:my-5 [&_li]:my-1 [&_li>ol]:my-2 [&_li>p]:my-2 [&_li>ul]:my-2 [&_ol]:list-decimal [&_ol]:ps-6 [&_ul]:list-disc [&_ul]:ps-6";
|
|
354
310
|
|
|
@@ -372,7 +328,7 @@ var markdownSegments = ({
|
|
|
372
328
|
};
|
|
373
329
|
|
|
374
330
|
// ../../src/components/markdown/react.tsx
|
|
375
|
-
import { jsx as
|
|
331
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
376
332
|
var MarkdownContent = ({
|
|
377
333
|
classes,
|
|
378
334
|
className,
|
|
@@ -384,13 +340,13 @@ var MarkdownContent = ({
|
|
|
384
340
|
const content = [];
|
|
385
341
|
for (const segment of markdownSegments({ html, codeBlocks })) {
|
|
386
342
|
const { block, index } = segment;
|
|
387
|
-
content.push(/* @__PURE__ */
|
|
343
|
+
content.push(/* @__PURE__ */ jsx3("div", {
|
|
388
344
|
dangerouslySetInnerHTML: { __html: segment.html }
|
|
389
345
|
}, `html-${index}`));
|
|
390
346
|
if (block)
|
|
391
|
-
content.push(/* @__PURE__ */
|
|
347
|
+
content.push(/* @__PURE__ */ jsx3("div", {
|
|
392
348
|
className: "my-5",
|
|
393
|
-
children: /* @__PURE__ */
|
|
349
|
+
children: /* @__PURE__ */ jsx3(CodeBlock, {
|
|
394
350
|
code: block.code,
|
|
395
351
|
language: block.language,
|
|
396
352
|
locale,
|
|
@@ -398,887 +354,85 @@ var MarkdownContent = ({
|
|
|
398
354
|
})
|
|
399
355
|
}, `code-${index}`));
|
|
400
356
|
}
|
|
401
|
-
return /* @__PURE__ */
|
|
357
|
+
return /* @__PURE__ */ jsx3("div", {
|
|
402
358
|
className: cn(classes?.root ?? markdownClass, className),
|
|
403
359
|
children: content
|
|
404
360
|
});
|
|
405
361
|
};
|
|
406
|
-
// ../../src/components/
|
|
407
|
-
import {
|
|
408
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
409
|
-
var alertVariants = cva2("group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
|
|
410
|
-
variants: {
|
|
411
|
-
variant: {
|
|
412
|
-
default: "bg-card text-card-foreground",
|
|
413
|
-
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"
|
|
414
|
-
}
|
|
415
|
-
},
|
|
416
|
-
defaultVariants: {
|
|
417
|
-
variant: "default"
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
function Alert({
|
|
421
|
-
className,
|
|
422
|
-
variant,
|
|
423
|
-
...props
|
|
424
|
-
}) {
|
|
425
|
-
return /* @__PURE__ */ jsx5("div", {
|
|
426
|
-
"data-slot": "alert",
|
|
427
|
-
role: "alert",
|
|
428
|
-
className: cn(alertVariants({ variant }), className),
|
|
429
|
-
...props
|
|
430
|
-
});
|
|
431
|
-
}
|
|
432
|
-
function AlertTitle({ className, ...props }) {
|
|
433
|
-
return /* @__PURE__ */ jsx5("div", {
|
|
434
|
-
"data-slot": "alert-title",
|
|
435
|
-
className: cn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground", className),
|
|
436
|
-
...props
|
|
437
|
-
});
|
|
438
|
-
}
|
|
439
|
-
function AlertDescription({
|
|
440
|
-
className,
|
|
441
|
-
...props
|
|
442
|
-
}) {
|
|
443
|
-
return /* @__PURE__ */ jsx5("div", {
|
|
444
|
-
"data-slot": "alert-description",
|
|
445
|
-
className: cn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4", className),
|
|
446
|
-
...props
|
|
447
|
-
});
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
// ../../src/components/ui/attachment.tsx
|
|
451
|
-
import { mergeProps } from "@base-ui/react/merge-props";
|
|
452
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
453
|
-
import { cva as cva3 } from "class-variance-authority";
|
|
454
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
455
|
-
var attachmentVariants = cva3("group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed", {
|
|
456
|
-
variants: {
|
|
457
|
-
size: {
|
|
458
|
-
default: "gap-2 text-sm has-data-[slot=attachment-content]:px-2.5 has-data-[slot=attachment-content]:py-2 has-data-[slot=attachment-media]:p-2",
|
|
459
|
-
sm: "gap-2.5 text-xs has-data-[slot=attachment-content]:px-2 has-data-[slot=attachment-content]:py-1.5 has-data-[slot=attachment-media]:p-1.5",
|
|
460
|
-
xs: "gap-1.5 rounded-lg text-xs has-data-[slot=attachment-content]:px-1.5 has-data-[slot=attachment-content]:py-1 has-data-[slot=attachment-media]:p-1"
|
|
461
|
-
},
|
|
462
|
-
orientation: {
|
|
463
|
-
horizontal: "min-w-40 items-center",
|
|
464
|
-
vertical: "w-24 flex-col has-data-[slot=attachment-content]:w-30"
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
});
|
|
468
|
-
function Attachment({
|
|
469
|
-
className,
|
|
470
|
-
state = "done",
|
|
471
|
-
size = "default",
|
|
472
|
-
orientation = "horizontal",
|
|
473
|
-
...props
|
|
474
|
-
}) {
|
|
475
|
-
return /* @__PURE__ */ jsx6("div", {
|
|
476
|
-
"data-slot": "attachment",
|
|
477
|
-
"data-state": state,
|
|
478
|
-
"data-size": size,
|
|
479
|
-
"data-orientation": orientation,
|
|
480
|
-
className: cn(attachmentVariants({ size, orientation }), className),
|
|
481
|
-
...props
|
|
482
|
-
});
|
|
483
|
-
}
|
|
484
|
-
var attachmentMediaVariants = cva3("relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5", {
|
|
485
|
-
variants: {
|
|
486
|
-
variant: {
|
|
487
|
-
icon: "",
|
|
488
|
-
image: "opacity-60 group-data-[state=done]/attachment:opacity-100 group-data-[state=idle]/attachment:opacity-100 *:[img]:aspect-square *:[img]:w-full *:[img]:object-cover"
|
|
489
|
-
}
|
|
490
|
-
},
|
|
491
|
-
defaultVariants: {
|
|
492
|
-
variant: "icon"
|
|
493
|
-
}
|
|
494
|
-
});
|
|
495
|
-
function AttachmentMedia({
|
|
496
|
-
className,
|
|
497
|
-
variant = "icon",
|
|
498
|
-
...props
|
|
499
|
-
}) {
|
|
500
|
-
return /* @__PURE__ */ jsx6("div", {
|
|
501
|
-
"data-slot": "attachment-media",
|
|
502
|
-
"data-variant": variant,
|
|
503
|
-
className: cn(attachmentMediaVariants({ variant }), className),
|
|
504
|
-
...props
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
function AttachmentContent({
|
|
508
|
-
className,
|
|
509
|
-
...props
|
|
510
|
-
}) {
|
|
511
|
-
return /* @__PURE__ */ jsx6("div", {
|
|
512
|
-
"data-slot": "attachment-content",
|
|
513
|
-
className: cn("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", className),
|
|
514
|
-
...props
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
function AttachmentTitle({
|
|
518
|
-
className,
|
|
519
|
-
...props
|
|
520
|
-
}) {
|
|
521
|
-
return /* @__PURE__ */ jsx6("span", {
|
|
522
|
-
"data-slot": "attachment-title",
|
|
523
|
-
className: cn("block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer", className),
|
|
524
|
-
...props
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
function AttachmentActions({
|
|
528
|
-
className,
|
|
529
|
-
...props
|
|
530
|
-
}) {
|
|
531
|
-
return /* @__PURE__ */ jsx6("div", {
|
|
532
|
-
"data-slot": "attachment-actions",
|
|
533
|
-
className: cn("relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1", className),
|
|
534
|
-
...props
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
function AttachmentAction({
|
|
538
|
-
className,
|
|
539
|
-
variant,
|
|
540
|
-
size = "icon-xs",
|
|
541
|
-
...props
|
|
542
|
-
}) {
|
|
543
|
-
return /* @__PURE__ */ jsx6(Button, {
|
|
544
|
-
"data-slot": "attachment-action",
|
|
545
|
-
variant: variant ?? "ghost",
|
|
546
|
-
size,
|
|
547
|
-
className: cn(className),
|
|
548
|
-
...props
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
// ../../src/components/ui/badge.tsx
|
|
553
|
-
import { mergeProps as mergeProps2 } from "@base-ui/react/merge-props";
|
|
554
|
-
import { useRender as useRender2 } from "@base-ui/react/use-render";
|
|
555
|
-
import { cva as cva4 } from "class-variance-authority";
|
|
556
|
-
var badgeVariants = cva4("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
557
|
-
variants: {
|
|
558
|
-
variant: {
|
|
559
|
-
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
560
|
-
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
561
|
-
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
562
|
-
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
563
|
-
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
564
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
565
|
-
}
|
|
566
|
-
},
|
|
567
|
-
defaultVariants: {
|
|
568
|
-
variant: "default"
|
|
569
|
-
}
|
|
570
|
-
});
|
|
571
|
-
function Badge({
|
|
572
|
-
className,
|
|
573
|
-
variant = "default",
|
|
574
|
-
render,
|
|
575
|
-
...props
|
|
576
|
-
}) {
|
|
577
|
-
return useRender2({
|
|
578
|
-
defaultTagName: "span",
|
|
579
|
-
props: mergeProps2({
|
|
580
|
-
className: cn(badgeVariants({ variant }), className)
|
|
581
|
-
}, props),
|
|
582
|
-
render,
|
|
583
|
-
state: {
|
|
584
|
-
slot: "badge",
|
|
585
|
-
variant
|
|
586
|
-
}
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
// ../../src/components/ui/bubble.tsx
|
|
591
|
-
import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
|
|
592
|
-
import { useRender as useRender3 } from "@base-ui/react/use-render";
|
|
593
|
-
import { cva as cva5 } from "class-variance-authority";
|
|
594
|
-
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
595
|
-
var bubbleVariants = cva5("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
|
|
596
|
-
variants: {
|
|
597
|
-
variant: {
|
|
598
|
-
default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
|
|
599
|
-
secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
|
|
600
|
-
muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
|
|
601
|
-
tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
|
|
602
|
-
outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
|
|
603
|
-
ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
|
|
604
|
-
destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"
|
|
605
|
-
}
|
|
606
|
-
},
|
|
607
|
-
defaultVariants: {
|
|
608
|
-
variant: "default"
|
|
609
|
-
}
|
|
610
|
-
});
|
|
611
|
-
function Bubble({
|
|
612
|
-
variant = "default",
|
|
613
|
-
align = "start",
|
|
614
|
-
className,
|
|
615
|
-
...props
|
|
616
|
-
}) {
|
|
617
|
-
return /* @__PURE__ */ jsx7("div", {
|
|
618
|
-
"data-slot": "bubble",
|
|
619
|
-
"data-variant": variant,
|
|
620
|
-
"data-align": align,
|
|
621
|
-
className: cn(bubbleVariants({ variant }), className),
|
|
622
|
-
...props
|
|
623
|
-
});
|
|
624
|
-
}
|
|
625
|
-
function BubbleContent({
|
|
626
|
-
className,
|
|
627
|
-
render,
|
|
628
|
-
...props
|
|
629
|
-
}) {
|
|
630
|
-
return useRender3({
|
|
631
|
-
defaultTagName: "div",
|
|
632
|
-
props: mergeProps3({
|
|
633
|
-
className: cn("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50", className)
|
|
634
|
-
}, props),
|
|
635
|
-
render,
|
|
636
|
-
state: {
|
|
637
|
-
slot: "bubble-content"
|
|
638
|
-
}
|
|
639
|
-
});
|
|
640
|
-
}
|
|
641
|
-
var bubbleReactionsVariants = cva5("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0", {
|
|
642
|
-
variants: {
|
|
643
|
-
side: {
|
|
644
|
-
top: "top-0 -translate-y-3/4",
|
|
645
|
-
bottom: "bottom-0 translate-y-3/4"
|
|
646
|
-
},
|
|
647
|
-
align: {
|
|
648
|
-
start: "left-3",
|
|
649
|
-
end: "right-3"
|
|
650
|
-
}
|
|
651
|
-
},
|
|
652
|
-
defaultVariants: {
|
|
653
|
-
side: "bottom",
|
|
654
|
-
align: "end"
|
|
655
|
-
}
|
|
656
|
-
});
|
|
657
|
-
|
|
658
|
-
// ../../src/components/ui/command.tsx
|
|
659
|
-
import { Command as CommandPrimitive } from "cmdk";
|
|
660
|
-
import { SearchIcon } from "lucide-react";
|
|
661
|
-
|
|
662
|
-
// ../../src/components/ui/dialog.tsx
|
|
663
|
-
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
664
|
-
import { cn as cn2 } from "cn";
|
|
665
|
-
import { XIcon } from "lucide-react";
|
|
666
|
-
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
667
|
-
function Dialog({ ...props }) {
|
|
668
|
-
return /* @__PURE__ */ jsx8(DialogPrimitive.Root, {
|
|
669
|
-
"data-slot": "dialog",
|
|
670
|
-
...props
|
|
671
|
-
});
|
|
672
|
-
}
|
|
673
|
-
function DialogTrigger({ ...props }) {
|
|
674
|
-
return /* @__PURE__ */ jsx8(DialogPrimitive.Trigger, {
|
|
675
|
-
"data-slot": "dialog-trigger",
|
|
676
|
-
...props
|
|
677
|
-
});
|
|
678
|
-
}
|
|
679
|
-
function DialogPortal({ ...props }) {
|
|
680
|
-
return /* @__PURE__ */ jsx8(DialogPrimitive.Portal, {
|
|
681
|
-
"data-slot": "dialog-portal",
|
|
682
|
-
...props
|
|
683
|
-
});
|
|
684
|
-
}
|
|
685
|
-
function DialogClose({ ...props }) {
|
|
686
|
-
return /* @__PURE__ */ jsx8(DialogPrimitive.Close, {
|
|
687
|
-
"data-slot": "dialog-close",
|
|
688
|
-
...props
|
|
689
|
-
});
|
|
690
|
-
}
|
|
691
|
-
function DialogHeader({ className, ...props }) {
|
|
692
|
-
return /* @__PURE__ */ jsx8("div", {
|
|
693
|
-
"data-slot": "dialog-header",
|
|
694
|
-
className: cn2("flex flex-col gap-2", className),
|
|
695
|
-
...props
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
function DialogTitle({ className, ...props }) {
|
|
699
|
-
return /* @__PURE__ */ jsx8(DialogPrimitive.Title, {
|
|
700
|
-
"data-slot": "dialog-title",
|
|
701
|
-
className: cn2("leading-none font-medium", className),
|
|
702
|
-
...props
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
// ../../src/components/ui/command.tsx
|
|
707
|
-
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
708
|
-
function Command2({
|
|
709
|
-
className,
|
|
710
|
-
...props
|
|
711
|
-
}) {
|
|
712
|
-
return /* @__PURE__ */ jsx9(CommandPrimitive, {
|
|
713
|
-
"data-slot": "command",
|
|
714
|
-
className: cn("flex size-full flex-col overflow-hidden rounded-xl bg-popover p-1 text-popover-foreground", className),
|
|
715
|
-
...props
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
function CommandList({
|
|
719
|
-
className,
|
|
720
|
-
...props
|
|
721
|
-
}) {
|
|
722
|
-
return /* @__PURE__ */ jsx9(CommandPrimitive.List, {
|
|
723
|
-
"data-slot": "command-list",
|
|
724
|
-
className: cn("max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", className),
|
|
725
|
-
...props
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
function CommandEmpty({
|
|
729
|
-
className,
|
|
730
|
-
...props
|
|
731
|
-
}) {
|
|
732
|
-
return /* @__PURE__ */ jsx9(CommandPrimitive.Empty, {
|
|
733
|
-
"data-slot": "command-empty",
|
|
734
|
-
className: cn("py-6 text-center text-sm", className),
|
|
735
|
-
...props
|
|
736
|
-
});
|
|
737
|
-
}
|
|
738
|
-
function CommandGroup({
|
|
739
|
-
className,
|
|
740
|
-
...props
|
|
741
|
-
}) {
|
|
742
|
-
return /* @__PURE__ */ jsx9(CommandPrimitive.Group, {
|
|
743
|
-
"data-slot": "command-group",
|
|
744
|
-
className: cn("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", className),
|
|
745
|
-
...props
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
function CommandItem({
|
|
749
|
-
className,
|
|
750
|
-
...props
|
|
751
|
-
}) {
|
|
752
|
-
return /* @__PURE__ */ jsx9(CommandPrimitive.Item, {
|
|
753
|
-
"data-slot": "command-item",
|
|
754
|
-
className: cn("group/command-item relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
755
|
-
...props
|
|
756
|
-
});
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
// ../../src/components/ui/empty.tsx
|
|
760
|
-
import { cva as cva6 } from "class-variance-authority";
|
|
761
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
762
|
-
function Empty({ className, ...props }) {
|
|
763
|
-
return /* @__PURE__ */ jsx10("div", {
|
|
764
|
-
"data-slot": "empty",
|
|
765
|
-
className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg border-dashed p-12 text-center text-balance", className),
|
|
766
|
-
...props
|
|
767
|
-
});
|
|
768
|
-
}
|
|
769
|
-
function EmptyHeader({ className, ...props }) {
|
|
770
|
-
return /* @__PURE__ */ jsx10("div", {
|
|
771
|
-
"data-slot": "empty-header",
|
|
772
|
-
className: cn("flex max-w-sm flex-col items-center gap-2", className),
|
|
773
|
-
...props
|
|
774
|
-
});
|
|
775
|
-
}
|
|
776
|
-
var emptyMediaVariants = cva6("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
777
|
-
variants: {
|
|
778
|
-
variant: {
|
|
779
|
-
default: "bg-transparent",
|
|
780
|
-
icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6"
|
|
781
|
-
}
|
|
782
|
-
},
|
|
783
|
-
defaultVariants: {
|
|
784
|
-
variant: "default"
|
|
785
|
-
}
|
|
786
|
-
});
|
|
787
|
-
function EmptyMedia({
|
|
788
|
-
className,
|
|
789
|
-
variant = "default",
|
|
790
|
-
...props
|
|
791
|
-
}) {
|
|
792
|
-
return /* @__PURE__ */ jsx10("div", {
|
|
793
|
-
"data-slot": "empty-icon",
|
|
794
|
-
"data-variant": variant,
|
|
795
|
-
className: cn(emptyMediaVariants({ variant, className })),
|
|
796
|
-
...props
|
|
797
|
-
});
|
|
798
|
-
}
|
|
799
|
-
function EmptyTitle({ className, ...props }) {
|
|
800
|
-
return /* @__PURE__ */ jsx10("div", {
|
|
801
|
-
"data-slot": "empty-title",
|
|
802
|
-
className: cn("text-lg font-medium tracking-tight", className),
|
|
803
|
-
...props
|
|
804
|
-
});
|
|
805
|
-
}
|
|
806
|
-
function EmptyDescription({ className, ...props }) {
|
|
807
|
-
return /* @__PURE__ */ jsx10("div", {
|
|
808
|
-
"data-slot": "empty-description",
|
|
809
|
-
className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
810
|
-
...props
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
// ../../src/components/ui/input-group.tsx
|
|
815
|
-
import { cva as cva7 } from "class-variance-authority";
|
|
816
|
-
|
|
817
|
-
// ../../src/components/ui/input.tsx
|
|
818
|
-
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
819
|
-
|
|
820
|
-
// ../../src/components/ui/textarea.tsx
|
|
821
|
-
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
822
|
-
function Textarea({ className, ...props }) {
|
|
823
|
-
return /* @__PURE__ */ jsx11("textarea", {
|
|
824
|
-
"data-slot": "textarea",
|
|
825
|
-
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),
|
|
826
|
-
...props
|
|
827
|
-
});
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
// ../../src/components/ui/input-group.tsx
|
|
831
|
-
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
832
|
-
function InputGroup({ className, ...props }) {
|
|
833
|
-
return /* @__PURE__ */ jsx12("div", {
|
|
834
|
-
"data-slot": "input-group",
|
|
835
|
-
role: "group",
|
|
836
|
-
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),
|
|
837
|
-
...props
|
|
838
|
-
});
|
|
839
|
-
}
|
|
840
|
-
var inputGroupAddonVariants = cva7("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
841
|
-
variants: {
|
|
842
|
-
align: {
|
|
843
|
-
"inline-start": "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
|
|
844
|
-
"inline-end": "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]",
|
|
845
|
-
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
846
|
-
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
847
|
-
}
|
|
848
|
-
},
|
|
849
|
-
defaultVariants: { align: "inline-start" }
|
|
850
|
-
});
|
|
851
|
-
function InputGroupAddon({
|
|
852
|
-
className,
|
|
853
|
-
align = "inline-start",
|
|
854
|
-
...props
|
|
855
|
-
}) {
|
|
856
|
-
return /* @__PURE__ */ jsx12("div", {
|
|
857
|
-
role: "group",
|
|
858
|
-
"data-slot": "input-group-addon",
|
|
859
|
-
"data-align": align,
|
|
860
|
-
className: cn(inputGroupAddonVariants({ align }), className),
|
|
861
|
-
onClick: (event) => {
|
|
862
|
-
if (event.target instanceof HTMLElement && event.target.closest("button")) {
|
|
863
|
-
return;
|
|
864
|
-
}
|
|
865
|
-
event.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
866
|
-
},
|
|
867
|
-
...props
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
var inputGroupButtonVariants = cva7("flex items-center gap-2 text-sm shadow-none", {
|
|
871
|
-
variants: {
|
|
872
|
-
size: {
|
|
873
|
-
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
874
|
-
sm: "",
|
|
875
|
-
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
876
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
877
|
-
}
|
|
878
|
-
},
|
|
879
|
-
defaultVariants: { size: "xs" }
|
|
880
|
-
});
|
|
881
|
-
function InputGroupButton({
|
|
882
|
-
className,
|
|
883
|
-
type = "button",
|
|
884
|
-
variant = "ghost",
|
|
885
|
-
size = "xs",
|
|
886
|
-
...props
|
|
887
|
-
}) {
|
|
888
|
-
return /* @__PURE__ */ jsx12(Button, {
|
|
889
|
-
type,
|
|
890
|
-
"data-size": size,
|
|
891
|
-
variant,
|
|
892
|
-
className: cn(inputGroupButtonVariants({ size }), className),
|
|
893
|
-
...props
|
|
894
|
-
});
|
|
895
|
-
}
|
|
896
|
-
function InputGroupTextarea({
|
|
897
|
-
className,
|
|
898
|
-
...props
|
|
899
|
-
}) {
|
|
900
|
-
return /* @__PURE__ */ jsx12(Textarea, {
|
|
901
|
-
"data-slot": "input-group-control",
|
|
902
|
-
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),
|
|
903
|
-
...props
|
|
904
|
-
});
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
// ../../src/components/ui/item.tsx
|
|
908
|
-
import { mergeProps as mergeProps4 } from "@base-ui/react/merge-props";
|
|
909
|
-
import { useRender as useRender4 } from "@base-ui/react/use-render";
|
|
910
|
-
import { cva as cva8 } from "class-variance-authority";
|
|
911
|
-
import { cn as cn3 } from "cn";
|
|
912
|
-
|
|
913
|
-
// ../../src/components/ui/separator.tsx
|
|
914
|
-
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
915
|
-
|
|
916
|
-
// ../../src/components/ui/item.tsx
|
|
917
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
918
|
-
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", {
|
|
919
|
-
variants: {
|
|
920
|
-
variant: {
|
|
921
|
-
default: "border-transparent",
|
|
922
|
-
outline: "border-border",
|
|
923
|
-
muted: "border-transparent bg-muted/50"
|
|
924
|
-
},
|
|
925
|
-
size: {
|
|
926
|
-
default: "gap-3.5 px-4 py-3.5",
|
|
927
|
-
sm: "gap-2.5 px-3 py-2.5",
|
|
928
|
-
xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
|
|
929
|
-
}
|
|
930
|
-
},
|
|
931
|
-
defaultVariants: {
|
|
932
|
-
variant: "default",
|
|
933
|
-
size: "default"
|
|
934
|
-
}
|
|
935
|
-
});
|
|
936
|
-
function Item({
|
|
937
|
-
className,
|
|
938
|
-
variant = "default",
|
|
939
|
-
size = "default",
|
|
940
|
-
render,
|
|
941
|
-
...props
|
|
942
|
-
}) {
|
|
943
|
-
return useRender4({
|
|
944
|
-
defaultTagName: "div",
|
|
945
|
-
props: mergeProps4({
|
|
946
|
-
className: cn3(itemVariants({ variant, size, className }))
|
|
947
|
-
}, props),
|
|
948
|
-
render,
|
|
949
|
-
state: {
|
|
950
|
-
slot: "item",
|
|
951
|
-
variant,
|
|
952
|
-
size
|
|
953
|
-
}
|
|
954
|
-
});
|
|
955
|
-
}
|
|
956
|
-
var itemMediaVariants = cva8("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none", {
|
|
957
|
-
variants: {
|
|
958
|
-
variant: {
|
|
959
|
-
default: "bg-transparent",
|
|
960
|
-
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
961
|
-
image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
|
|
962
|
-
}
|
|
963
|
-
},
|
|
964
|
-
defaultVariants: {
|
|
965
|
-
variant: "default"
|
|
966
|
-
}
|
|
967
|
-
});
|
|
968
|
-
function ItemMedia({
|
|
969
|
-
className,
|
|
970
|
-
variant = "default",
|
|
971
|
-
...props
|
|
972
|
-
}) {
|
|
973
|
-
return /* @__PURE__ */ jsx13("div", {
|
|
974
|
-
"data-slot": "item-media",
|
|
975
|
-
"data-variant": variant,
|
|
976
|
-
className: cn3(itemMediaVariants({ variant, className })),
|
|
977
|
-
...props
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
|
-
function ItemContent({ className, ...props }) {
|
|
981
|
-
return /* @__PURE__ */ jsx13("div", {
|
|
982
|
-
"data-slot": "item-content",
|
|
983
|
-
className: cn3("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
|
|
984
|
-
...props
|
|
985
|
-
});
|
|
986
|
-
}
|
|
987
|
-
function ItemTitle({ className, ...props }) {
|
|
988
|
-
return /* @__PURE__ */ jsx13("div", {
|
|
989
|
-
"data-slot": "item-title",
|
|
990
|
-
className: cn3("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
|
|
991
|
-
...props
|
|
992
|
-
});
|
|
993
|
-
}
|
|
994
|
-
function ItemDescription({ className, ...props }) {
|
|
995
|
-
return /* @__PURE__ */ jsx13("p", {
|
|
996
|
-
"data-slot": "item-description",
|
|
997
|
-
className: cn3("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),
|
|
998
|
-
...props
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
function ItemActions({ className, ...props }) {
|
|
1002
|
-
return /* @__PURE__ */ jsx13("div", {
|
|
1003
|
-
"data-slot": "item-actions",
|
|
1004
|
-
className: cn3("flex items-center gap-2", className),
|
|
1005
|
-
...props
|
|
1006
|
-
});
|
|
1007
|
-
}
|
|
1008
|
-
function ItemFooter({ className, ...props }) {
|
|
1009
|
-
return /* @__PURE__ */ jsx13("div", {
|
|
1010
|
-
"data-slot": "item-footer",
|
|
1011
|
-
className: cn3("flex basis-full items-center justify-between gap-2", className),
|
|
1012
|
-
...props
|
|
1013
|
-
});
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
// ../../src/components/ui/message.tsx
|
|
1017
|
-
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1018
|
-
function Message({
|
|
1019
|
-
className,
|
|
1020
|
-
align = "start",
|
|
1021
|
-
...props
|
|
1022
|
-
}) {
|
|
1023
|
-
return /* @__PURE__ */ jsx14("div", {
|
|
1024
|
-
"data-slot": "message",
|
|
1025
|
-
"data-align": align,
|
|
1026
|
-
className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
|
|
1027
|
-
...props
|
|
1028
|
-
});
|
|
1029
|
-
}
|
|
1030
|
-
function MessageContent({ className, ...props }) {
|
|
1031
|
-
return /* @__PURE__ */ jsx14("div", {
|
|
1032
|
-
"data-slot": "message-content",
|
|
1033
|
-
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),
|
|
1034
|
-
...props
|
|
1035
|
-
});
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
// ../../src/components/ui/message-scroller.tsx
|
|
362
|
+
// ../../src/components/agent/react.tsx
|
|
363
|
+
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
|
|
1039
364
|
import {
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
}
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
variant,
|
|
1112
|
-
size
|
|
1113
|
-
}),
|
|
1114
|
-
...props,
|
|
1115
|
-
children: children ?? /* @__PURE__ */ jsxs5(Fragment, {
|
|
1116
|
-
children: [
|
|
1117
|
-
/* @__PURE__ */ jsx15(ArrowDownIcon, {}),
|
|
1118
|
-
/* @__PURE__ */ jsx15("span", {
|
|
1119
|
-
className: "sr-only",
|
|
1120
|
-
children: direction === "end" ? "Scroll to end" : "Scroll to start"
|
|
1121
|
-
})
|
|
1122
|
-
]
|
|
1123
|
-
})
|
|
1124
|
-
});
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
// ../../src/components/ui/popover.tsx
|
|
1128
|
-
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
1129
|
-
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1130
|
-
function Popover({ ...props }) {
|
|
1131
|
-
return /* @__PURE__ */ jsx16(PopoverPrimitive.Root, {
|
|
1132
|
-
"data-slot": "popover",
|
|
1133
|
-
...props
|
|
1134
|
-
});
|
|
1135
|
-
}
|
|
1136
|
-
function PopoverTrigger({ ...props }) {
|
|
1137
|
-
return /* @__PURE__ */ jsx16(PopoverPrimitive.Trigger, {
|
|
1138
|
-
"data-slot": "popover-trigger",
|
|
1139
|
-
...props
|
|
1140
|
-
});
|
|
1141
|
-
}
|
|
1142
|
-
function PopoverContent({
|
|
1143
|
-
className,
|
|
1144
|
-
align = "center",
|
|
1145
|
-
alignOffset = 0,
|
|
1146
|
-
side = "bottom",
|
|
1147
|
-
sideOffset = 4,
|
|
1148
|
-
...props
|
|
1149
|
-
}) {
|
|
1150
|
-
return /* @__PURE__ */ jsx16(PopoverPrimitive.Portal, {
|
|
1151
|
-
children: /* @__PURE__ */ jsx16(PopoverPrimitive.Positioner, {
|
|
1152
|
-
align,
|
|
1153
|
-
alignOffset,
|
|
1154
|
-
side,
|
|
1155
|
-
sideOffset,
|
|
1156
|
-
className: "isolate z-50",
|
|
1157
|
-
children: /* @__PURE__ */ jsx16(PopoverPrimitive.Popup, {
|
|
1158
|
-
"data-slot": "popover-content",
|
|
1159
|
-
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),
|
|
1160
|
-
...props
|
|
1161
|
-
})
|
|
1162
|
-
})
|
|
1163
|
-
});
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
// ../../src/components/ui/trace.tsx
|
|
1167
|
-
import { cn as cn4 } from "cn";
|
|
1168
|
-
|
|
1169
|
-
// ../../src/components/ui/collapsible.tsx
|
|
1170
|
-
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
1171
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1172
|
-
function Collapsible({ ...props }) {
|
|
1173
|
-
return /* @__PURE__ */ jsx17(CollapsiblePrimitive.Root, {
|
|
1174
|
-
"data-slot": "collapsible",
|
|
1175
|
-
...props
|
|
1176
|
-
});
|
|
1177
|
-
}
|
|
1178
|
-
function CollapsibleTrigger({ ...props }) {
|
|
1179
|
-
return /* @__PURE__ */ jsx17(CollapsiblePrimitive.Trigger, {
|
|
1180
|
-
"data-slot": "collapsible-trigger",
|
|
1181
|
-
...props
|
|
1182
|
-
});
|
|
1183
|
-
}
|
|
1184
|
-
function CollapsibleContent({ ...props }) {
|
|
1185
|
-
return /* @__PURE__ */ jsx17(CollapsiblePrimitive.Panel, {
|
|
1186
|
-
"data-slot": "collapsible-content",
|
|
1187
|
-
...props
|
|
1188
|
-
});
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1191
|
-
// ../../src/components/ui/trace.tsx
|
|
1192
|
-
import { ChevronRightIcon } from "lucide-react";
|
|
1193
|
-
import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1194
|
-
function Trace({ className, ...props }) {
|
|
1195
|
-
return /* @__PURE__ */ jsx18("div", {
|
|
1196
|
-
"data-slot": "trace",
|
|
1197
|
-
className: cn4("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),
|
|
1198
|
-
...props
|
|
1199
|
-
});
|
|
1200
|
-
}
|
|
1201
|
-
function TraceLine({
|
|
1202
|
-
className,
|
|
1203
|
-
status,
|
|
1204
|
-
...props
|
|
1205
|
-
}) {
|
|
1206
|
-
return /* @__PURE__ */ jsx18("span", {
|
|
1207
|
-
"data-slot": "trace-line",
|
|
1208
|
-
"data-status": status,
|
|
1209
|
-
className: cn4("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),
|
|
1210
|
-
...props
|
|
1211
|
-
});
|
|
1212
|
-
}
|
|
1213
|
-
function TraceIcon({ className, ...props }) {
|
|
1214
|
-
return /* @__PURE__ */ jsx18("span", {
|
|
1215
|
-
"data-slot": "trace-icon",
|
|
1216
|
-
"aria-hidden": "true",
|
|
1217
|
-
className: cn4("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),
|
|
1218
|
-
...props
|
|
1219
|
-
});
|
|
1220
|
-
}
|
|
1221
|
-
function TraceTitle({ className, ...props }) {
|
|
1222
|
-
return /* @__PURE__ */ jsx18("span", {
|
|
1223
|
-
"data-slot": "trace-title",
|
|
1224
|
-
className: cn4("min-w-0 truncate motion-reduce:shimmer-none", className),
|
|
1225
|
-
...props
|
|
1226
|
-
});
|
|
1227
|
-
}
|
|
1228
|
-
function TraceDescription({
|
|
1229
|
-
className,
|
|
1230
|
-
...props
|
|
1231
|
-
}) {
|
|
1232
|
-
return /* @__PURE__ */ jsx18("span", {
|
|
1233
|
-
"data-slot": "trace-description",
|
|
1234
|
-
className: cn4("shrink-0 text-muted-foreground/70 tabular-nums", className),
|
|
1235
|
-
...props
|
|
1236
|
-
});
|
|
1237
|
-
}
|
|
1238
|
-
function TraceCollapsible({
|
|
1239
|
-
className,
|
|
1240
|
-
...props
|
|
1241
|
-
}) {
|
|
1242
|
-
return /* @__PURE__ */ jsx18(Collapsible, {
|
|
1243
|
-
"data-slot": "trace-collapsible",
|
|
1244
|
-
className: cn4("flex w-full min-w-0 flex-col", className),
|
|
1245
|
-
...props
|
|
1246
|
-
});
|
|
1247
|
-
}
|
|
1248
|
-
function TraceCollapsibleTrigger({
|
|
1249
|
-
className,
|
|
1250
|
-
children,
|
|
1251
|
-
...props
|
|
1252
|
-
}) {
|
|
1253
|
-
return /* @__PURE__ */ jsxs6(CollapsibleTrigger, {
|
|
1254
|
-
"data-slot": "trace-collapsible-trigger",
|
|
1255
|
-
className: cn4("group/trace-collapsible-trigger flex w-fit max-w-full min-w-0 cursor-pointer items-center gap-1 rounded-md text-left text-muted-foreground transition-colors outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 has-[[data-status=error]]:text-destructive", className),
|
|
1256
|
-
...props,
|
|
1257
|
-
children: [
|
|
1258
|
-
children,
|
|
1259
|
-
/* @__PURE__ */ jsx18(TraceIcon, {
|
|
1260
|
-
className: "transition-transform group-aria-expanded/trace-collapsible-trigger:rotate-90",
|
|
1261
|
-
children: /* @__PURE__ */ jsx18(ChevronRightIcon, {})
|
|
1262
|
-
})
|
|
1263
|
-
]
|
|
1264
|
-
});
|
|
1265
|
-
}
|
|
1266
|
-
function TraceCollapsibleContent({
|
|
1267
|
-
className,
|
|
1268
|
-
children,
|
|
1269
|
-
...props
|
|
1270
|
-
}) {
|
|
1271
|
-
return /* @__PURE__ */ jsx18(CollapsibleContent, {
|
|
1272
|
-
"data-slot": "trace-collapsible-content",
|
|
1273
|
-
className: "h-(--collapsible-panel-height) min-w-0 overflow-hidden transition-[height] duration-200 data-ending-style:h-0 data-starting-style:h-0",
|
|
1274
|
-
...props,
|
|
1275
|
-
children: /* @__PURE__ */ jsx18("div", {
|
|
1276
|
-
"data-slot": "trace-collapsible-content-inner",
|
|
1277
|
-
className: cn4("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),
|
|
1278
|
-
children
|
|
1279
|
-
})
|
|
1280
|
-
});
|
|
1281
|
-
}
|
|
365
|
+
Attachment,
|
|
366
|
+
AttachmentAction,
|
|
367
|
+
AttachmentActions,
|
|
368
|
+
AttachmentContent,
|
|
369
|
+
AttachmentMedia,
|
|
370
|
+
AttachmentTitle
|
|
371
|
+
} from "@/components/ui/attachment";
|
|
372
|
+
import { Badge } from "@/components/ui/badge";
|
|
373
|
+
import { Bubble, BubbleContent } from "@/components/ui/bubble";
|
|
374
|
+
import { Button as Button2 } from "@/components/ui/button";
|
|
375
|
+
import {
|
|
376
|
+
Command as Command3,
|
|
377
|
+
CommandEmpty,
|
|
378
|
+
CommandGroup,
|
|
379
|
+
CommandItem,
|
|
380
|
+
CommandList
|
|
381
|
+
} from "@/components/ui/command";
|
|
382
|
+
import {
|
|
383
|
+
Dialog,
|
|
384
|
+
DialogClose,
|
|
385
|
+
DialogHeader,
|
|
386
|
+
DialogPortal,
|
|
387
|
+
DialogTitle,
|
|
388
|
+
DialogTrigger
|
|
389
|
+
} from "@/components/ui/dialog";
|
|
390
|
+
import {
|
|
391
|
+
Empty,
|
|
392
|
+
EmptyDescription,
|
|
393
|
+
EmptyHeader,
|
|
394
|
+
EmptyMedia,
|
|
395
|
+
EmptyTitle
|
|
396
|
+
} from "@/components/ui/empty";
|
|
397
|
+
import {
|
|
398
|
+
InputGroup,
|
|
399
|
+
InputGroupAddon,
|
|
400
|
+
InputGroupButton,
|
|
401
|
+
InputGroupTextarea
|
|
402
|
+
} from "@/components/ui/input-group";
|
|
403
|
+
import {
|
|
404
|
+
Item,
|
|
405
|
+
ItemActions,
|
|
406
|
+
ItemContent,
|
|
407
|
+
ItemDescription,
|
|
408
|
+
ItemFooter,
|
|
409
|
+
ItemMedia,
|
|
410
|
+
ItemTitle
|
|
411
|
+
} from "@/components/ui/item";
|
|
412
|
+
import { Message, MessageContent } from "@/components/ui/message";
|
|
413
|
+
import {
|
|
414
|
+
MessageScroller,
|
|
415
|
+
MessageScrollerButton,
|
|
416
|
+
MessageScrollerContent,
|
|
417
|
+
MessageScrollerItem,
|
|
418
|
+
MessageScrollerProvider,
|
|
419
|
+
MessageScrollerViewport
|
|
420
|
+
} from "@/components/ui/message-scroller";
|
|
421
|
+
import {
|
|
422
|
+
Popover,
|
|
423
|
+
PopoverContent,
|
|
424
|
+
PopoverTrigger
|
|
425
|
+
} from "@/components/ui/popover";
|
|
426
|
+
import {
|
|
427
|
+
Trace,
|
|
428
|
+
TraceCollapsible,
|
|
429
|
+
TraceCollapsibleContent,
|
|
430
|
+
TraceCollapsibleTrigger,
|
|
431
|
+
TraceDescription,
|
|
432
|
+
TraceIcon,
|
|
433
|
+
TraceLine,
|
|
434
|
+
TraceTitle
|
|
435
|
+
} from "@/components/ui/trace";
|
|
1282
436
|
|
|
1283
437
|
// ../../src/services/agent/schema.ts
|
|
1284
438
|
import { Schema as Schema3 } from "effect";
|
|
@@ -1369,7 +523,7 @@ import { useKrakstackLocale as useKrakstackLocale3 } from "@krak-stack/registry/
|
|
|
1369
523
|
// ../../src/components/agent/index.ts
|
|
1370
524
|
import { Context, Effect as Effect2, Layer, Redacted as Redacted3, Schema as Schema5, Stream } from "effect";
|
|
1371
525
|
import { AtomRegistry } from "effect/reactivity";
|
|
1372
|
-
import { Command as
|
|
526
|
+
import { Command as Command2, Component as Component3, Subscription, UiSchema as UiSchema2 } from "effect/ui";
|
|
1373
527
|
|
|
1374
528
|
// ../../src/components/agent/schema.ts
|
|
1375
529
|
import { Schema as Schema4 } from "effect";
|
|
@@ -1530,7 +684,7 @@ var AgentWidgetMessage = UiSchema2.TaggedEnum({
|
|
|
1530
684
|
Delivered: { success: Schema5.Boolean }
|
|
1531
685
|
}).annotate({ identifier: "AgentWidgetMessage" });
|
|
1532
686
|
|
|
1533
|
-
class DispatchIntent extends
|
|
687
|
+
class DispatchIntent extends Command2.Service()("agent/DispatchIntent", { args: { intent: AgentWidgetIntentSchema }, success: AgentWidgetMessage }) {
|
|
1534
688
|
}
|
|
1535
689
|
var agentWidgetOptions = {
|
|
1536
690
|
name: "AgentWidget",
|
|
@@ -1631,7 +785,7 @@ var agentWidgetBehaviours = {
|
|
|
1631
785
|
};
|
|
1632
786
|
|
|
1633
787
|
// ../../src/components/agent/react.tsx
|
|
1634
|
-
import { jsx as
|
|
788
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1635
789
|
var messages2 = {
|
|
1636
790
|
en: {
|
|
1637
791
|
codeDescription: (language) => `${language} code`,
|
|
@@ -1694,7 +848,7 @@ var highlightedInput = (input, references) => {
|
|
|
1694
848
|
return input;
|
|
1695
849
|
const mentionPattern = new RegExp(`(${mentions.map(escapeRegExp).join("|")})(?![\\p{L}\\p{N}_-])`, "gu");
|
|
1696
850
|
const mentionSet = new Set(mentions);
|
|
1697
|
-
return input.split(mentionPattern).map((part, index) => mentionSet.has(part) ? /* @__PURE__ */
|
|
851
|
+
return input.split(mentionPattern).map((part, index) => mentionSet.has(part) ? /* @__PURE__ */ jsx4("span", {
|
|
1698
852
|
className: "bg-primary text-primary-foreground rounded-sm [box-shadow:2px_0_0_var(--primary),-2px_0_0_var(--primary)]",
|
|
1699
853
|
children: part
|
|
1700
854
|
}, `${part}:${index}`) : part);
|
|
@@ -1727,13 +881,13 @@ var ToolInput = ({
|
|
|
1727
881
|
labels,
|
|
1728
882
|
locale,
|
|
1729
883
|
tool
|
|
1730
|
-
}) => /* @__PURE__ */
|
|
884
|
+
}) => /* @__PURE__ */ jsxs3("div", {
|
|
1731
885
|
className: "min-w-0 space-y-2",
|
|
1732
886
|
children: [
|
|
1733
|
-
tool.metadata.description ? /* @__PURE__ */
|
|
887
|
+
tool.metadata.description ? /* @__PURE__ */ jsx4("p", {
|
|
1734
888
|
children: tool.metadata.description
|
|
1735
889
|
}) : null,
|
|
1736
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ jsx4(CodeBlock, {
|
|
1737
891
|
code: agentToolInput(tool.input),
|
|
1738
892
|
language: "json",
|
|
1739
893
|
locale,
|
|
@@ -1753,45 +907,45 @@ var ToolApproval = ({
|
|
|
1753
907
|
locale,
|
|
1754
908
|
onApproval,
|
|
1755
909
|
tool
|
|
1756
|
-
}) => /* @__PURE__ */
|
|
910
|
+
}) => /* @__PURE__ */ jsxs3(Item, {
|
|
1757
911
|
variant: "outline",
|
|
1758
912
|
size: "sm",
|
|
1759
913
|
role: "group",
|
|
1760
914
|
"aria-label": tool.metadata.title ?? tool.name,
|
|
1761
915
|
children: [
|
|
1762
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ jsx4(ItemMedia, {
|
|
1763
917
|
variant: "icon",
|
|
1764
|
-
children: /* @__PURE__ */
|
|
918
|
+
children: /* @__PURE__ */ jsx4(WrenchIcon, {})
|
|
1765
919
|
}),
|
|
1766
|
-
/* @__PURE__ */
|
|
920
|
+
/* @__PURE__ */ jsxs3(ItemContent, {
|
|
1767
921
|
className: "min-w-0",
|
|
1768
922
|
children: [
|
|
1769
|
-
/* @__PURE__ */
|
|
923
|
+
/* @__PURE__ */ jsxs3(ItemTitle, {
|
|
1770
924
|
className: "line-clamp-none",
|
|
1771
925
|
children: [
|
|
1772
926
|
tool.metadata.title ?? tool.name,
|
|
1773
|
-
tool.metadata.destructive ? /* @__PURE__ */
|
|
927
|
+
tool.metadata.destructive ? /* @__PURE__ */ jsx4(Badge, {
|
|
1774
928
|
variant: "destructive",
|
|
1775
929
|
children: labels.approvalDestructiveLabel
|
|
1776
930
|
}) : null
|
|
1777
931
|
]
|
|
1778
932
|
}),
|
|
1779
|
-
/* @__PURE__ */
|
|
933
|
+
/* @__PURE__ */ jsx4(ItemDescription, {
|
|
1780
934
|
className: "line-clamp-none",
|
|
1781
935
|
children: tool.metadata.destructive ? labels.approvalDestructive : labels.approvalRequired
|
|
1782
936
|
})
|
|
1783
937
|
]
|
|
1784
938
|
}),
|
|
1785
|
-
/* @__PURE__ */
|
|
939
|
+
/* @__PURE__ */ jsxs3(ItemActions, {
|
|
1786
940
|
children: [
|
|
1787
|
-
/* @__PURE__ */
|
|
941
|
+
/* @__PURE__ */ jsx4(Button2, {
|
|
1788
942
|
size: "sm",
|
|
1789
943
|
variant: tool.metadata.destructive ? "destructive" : "default",
|
|
1790
944
|
disabled,
|
|
1791
945
|
onClick: () => onApproval(tool, true),
|
|
1792
946
|
children: labels.approve
|
|
1793
947
|
}),
|
|
1794
|
-
/* @__PURE__ */
|
|
948
|
+
/* @__PURE__ */ jsx4(Button2, {
|
|
1795
949
|
size: "sm",
|
|
1796
950
|
variant: "outline",
|
|
1797
951
|
disabled,
|
|
@@ -1800,20 +954,20 @@ var ToolApproval = ({
|
|
|
1800
954
|
})
|
|
1801
955
|
]
|
|
1802
956
|
}),
|
|
1803
|
-
/* @__PURE__ */
|
|
957
|
+
/* @__PURE__ */ jsx4(ItemFooter, {
|
|
1804
958
|
className: "block min-w-0",
|
|
1805
|
-
children: /* @__PURE__ */
|
|
1806
|
-
children: /* @__PURE__ */
|
|
959
|
+
children: /* @__PURE__ */ jsx4(Trace, {
|
|
960
|
+
children: /* @__PURE__ */ jsxs3(TraceCollapsible, {
|
|
1807
961
|
children: [
|
|
1808
|
-
/* @__PURE__ */
|
|
1809
|
-
children: /* @__PURE__ */
|
|
1810
|
-
children: /* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ jsx4(TraceCollapsibleTrigger, {
|
|
963
|
+
children: /* @__PURE__ */ jsx4(TraceLine, {
|
|
964
|
+
children: /* @__PURE__ */ jsx4(TraceTitle, {
|
|
1811
965
|
children: labels.viewMore
|
|
1812
966
|
})
|
|
1813
967
|
})
|
|
1814
968
|
}),
|
|
1815
|
-
/* @__PURE__ */
|
|
1816
|
-
children: /* @__PURE__ */
|
|
969
|
+
/* @__PURE__ */ jsx4(TraceCollapsibleContent, {
|
|
970
|
+
children: /* @__PURE__ */ jsx4(ToolInput, {
|
|
1817
971
|
labels,
|
|
1818
972
|
locale,
|
|
1819
973
|
tool
|
|
@@ -1833,29 +987,29 @@ var ToolActivity = ({
|
|
|
1833
987
|
}) => {
|
|
1834
988
|
const running = pending && (tool.status === "running" || tool.status === "approved");
|
|
1835
989
|
const statusLabel = tool.status === "failed" ? labels.toolFailed : tool.status === "denied" ? labels.toolDenied : running ? labels.toolRunning : undefined;
|
|
1836
|
-
const line = /* @__PURE__ */
|
|
990
|
+
const line = /* @__PURE__ */ jsxs3(TraceLine, {
|
|
1837
991
|
status: tool.status === "failed" ? "error" : running ? "running" : undefined,
|
|
1838
992
|
children: [
|
|
1839
|
-
/* @__PURE__ */
|
|
1840
|
-
children: /* @__PURE__ */
|
|
993
|
+
/* @__PURE__ */ jsx4(TraceIcon, {
|
|
994
|
+
children: /* @__PURE__ */ jsx4(WrenchIcon, {})
|
|
1841
995
|
}),
|
|
1842
|
-
/* @__PURE__ */
|
|
996
|
+
/* @__PURE__ */ jsx4(TraceTitle, {
|
|
1843
997
|
children: tool.metadata.title ?? tool.name
|
|
1844
998
|
}),
|
|
1845
|
-
statusLabel ? /* @__PURE__ */
|
|
999
|
+
statusLabel ? /* @__PURE__ */ jsx4(TraceDescription, {
|
|
1846
1000
|
children: statusLabel
|
|
1847
1001
|
}) : null
|
|
1848
1002
|
]
|
|
1849
1003
|
});
|
|
1850
1004
|
if (running)
|
|
1851
1005
|
return line;
|
|
1852
|
-
return /* @__PURE__ */
|
|
1006
|
+
return /* @__PURE__ */ jsxs3(TraceCollapsible, {
|
|
1853
1007
|
children: [
|
|
1854
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ jsx4(TraceCollapsibleTrigger, {
|
|
1855
1009
|
children: line
|
|
1856
1010
|
}),
|
|
1857
|
-
/* @__PURE__ */
|
|
1858
|
-
children: /* @__PURE__ */
|
|
1011
|
+
/* @__PURE__ */ jsx4(TraceCollapsibleContent, {
|
|
1012
|
+
children: /* @__PURE__ */ jsx4(ToolInput, {
|
|
1859
1013
|
labels,
|
|
1860
1014
|
locale,
|
|
1861
1015
|
tool
|
|
@@ -1880,47 +1034,47 @@ function ToolActivityLog({
|
|
|
1880
1034
|
const running = pending && approvals.length === 0;
|
|
1881
1035
|
const failed = activity.some((tool) => tool.status === "failed");
|
|
1882
1036
|
if (tools.length === 0) {
|
|
1883
|
-
return /* @__PURE__ */
|
|
1884
|
-
children: /* @__PURE__ */
|
|
1037
|
+
return /* @__PURE__ */ jsx4(Trace, {
|
|
1038
|
+
children: /* @__PURE__ */ jsxs3(TraceLine, {
|
|
1885
1039
|
status: pending ? "running" : undefined,
|
|
1886
1040
|
children: [
|
|
1887
|
-
/* @__PURE__ */
|
|
1888
|
-
children: /* @__PURE__ */
|
|
1041
|
+
/* @__PURE__ */ jsx4(TraceIcon, {
|
|
1042
|
+
children: /* @__PURE__ */ jsx4(WrenchIcon, {})
|
|
1889
1043
|
}),
|
|
1890
|
-
/* @__PURE__ */
|
|
1044
|
+
/* @__PURE__ */ jsx4(TraceTitle, {
|
|
1891
1045
|
children: labels.toolRunning
|
|
1892
1046
|
})
|
|
1893
1047
|
]
|
|
1894
1048
|
})
|
|
1895
1049
|
});
|
|
1896
1050
|
}
|
|
1897
|
-
return /* @__PURE__ */
|
|
1051
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
1898
1052
|
className: "flex flex-col gap-2",
|
|
1899
1053
|
children: [
|
|
1900
|
-
currentTool ? /* @__PURE__ */
|
|
1901
|
-
children: /* @__PURE__ */
|
|
1054
|
+
currentTool ? /* @__PURE__ */ jsx4(Trace, {
|
|
1055
|
+
children: /* @__PURE__ */ jsxs3(TraceCollapsible, {
|
|
1902
1056
|
open: open ?? running,
|
|
1903
1057
|
onOpenChange: setOpen,
|
|
1904
1058
|
children: [
|
|
1905
|
-
/* @__PURE__ */
|
|
1906
|
-
children: /* @__PURE__ */
|
|
1059
|
+
/* @__PURE__ */ jsx4(TraceCollapsibleTrigger, {
|
|
1060
|
+
children: /* @__PURE__ */ jsxs3(TraceLine, {
|
|
1907
1061
|
status: failed ? "error" : running ? "running" : undefined,
|
|
1908
1062
|
children: [
|
|
1909
|
-
/* @__PURE__ */
|
|
1910
|
-
children: /* @__PURE__ */
|
|
1063
|
+
/* @__PURE__ */ jsx4(TraceIcon, {
|
|
1064
|
+
children: /* @__PURE__ */ jsx4(WrenchIcon, {})
|
|
1911
1065
|
}),
|
|
1912
|
-
/* @__PURE__ */
|
|
1066
|
+
/* @__PURE__ */ jsx4(TraceTitle, {
|
|
1913
1067
|
children: approvals.length > 0 || running ? labels.toolActivity : workedSeconds !== undefined ? labels.toolWorked(workedSeconds) : currentTool.metadata.title ?? currentTool.name
|
|
1914
1068
|
}),
|
|
1915
|
-
failed || running ? /* @__PURE__ */
|
|
1069
|
+
failed || running ? /* @__PURE__ */ jsx4(TraceDescription, {
|
|
1916
1070
|
children: failed ? labels.toolFailed : labels.toolRunning
|
|
1917
1071
|
}) : null
|
|
1918
1072
|
]
|
|
1919
1073
|
})
|
|
1920
1074
|
}),
|
|
1921
|
-
/* @__PURE__ */
|
|
1922
|
-
children: /* @__PURE__ */
|
|
1923
|
-
children: activity.map((tool) => /* @__PURE__ */
|
|
1075
|
+
/* @__PURE__ */ jsx4(TraceCollapsibleContent, {
|
|
1076
|
+
children: /* @__PURE__ */ jsx4(Trace, {
|
|
1077
|
+
children: activity.map((tool) => /* @__PURE__ */ jsx4(ToolActivity, {
|
|
1924
1078
|
labels,
|
|
1925
1079
|
locale,
|
|
1926
1080
|
pending,
|
|
@@ -1931,7 +1085,7 @@ function ToolActivityLog({
|
|
|
1931
1085
|
]
|
|
1932
1086
|
})
|
|
1933
1087
|
}) : null,
|
|
1934
|
-
approvals.map((tool) => /* @__PURE__ */
|
|
1088
|
+
approvals.map((tool) => /* @__PURE__ */ jsx4(ToolApproval, {
|
|
1935
1089
|
disabled,
|
|
1936
1090
|
labels,
|
|
1937
1091
|
locale,
|
|
@@ -1979,11 +1133,11 @@ function AgentMessageRow({
|
|
|
1979
1133
|
pending,
|
|
1980
1134
|
workedSeconds
|
|
1981
1135
|
]);
|
|
1982
|
-
return /* @__PURE__ */
|
|
1136
|
+
return /* @__PURE__ */ jsx4(Message, {
|
|
1983
1137
|
align: isUser ? "end" : "start",
|
|
1984
|
-
children: /* @__PURE__ */
|
|
1138
|
+
children: /* @__PURE__ */ jsxs3(MessageContent, {
|
|
1985
1139
|
children: [
|
|
1986
|
-
!isUser && (message.tools.length > 0 || pending && !message.text) ? /* @__PURE__ */
|
|
1140
|
+
!isUser && (message.tools.length > 0 || pending && !message.text) ? /* @__PURE__ */ jsx4(ToolActivityLog, {
|
|
1987
1141
|
disabled,
|
|
1988
1142
|
labels,
|
|
1989
1143
|
locale,
|
|
@@ -1992,18 +1146,18 @@ function AgentMessageRow({
|
|
|
1992
1146
|
tools: message.tools,
|
|
1993
1147
|
workedSeconds
|
|
1994
1148
|
}) : null,
|
|
1995
|
-
message.text ? isUser ? /* @__PURE__ */
|
|
1149
|
+
message.text ? isUser ? /* @__PURE__ */ jsx4(Bubble, {
|
|
1996
1150
|
align: "end",
|
|
1997
|
-
children: /* @__PURE__ */
|
|
1151
|
+
children: /* @__PURE__ */ jsx4(BubbleContent, {
|
|
1998
1152
|
className: "whitespace-pre-wrap",
|
|
1999
1153
|
children: message.text
|
|
2000
1154
|
})
|
|
2001
|
-
}) : /* @__PURE__ */
|
|
1155
|
+
}) : /* @__PURE__ */ jsx4(Bubble, {
|
|
2002
1156
|
variant: "ghost",
|
|
2003
1157
|
className: "w-full",
|
|
2004
|
-
children: /* @__PURE__ */
|
|
1158
|
+
children: /* @__PURE__ */ jsx4(BubbleContent, {
|
|
2005
1159
|
className: "w-full",
|
|
2006
|
-
children: message.markdown ? /* @__PURE__ */
|
|
1160
|
+
children: message.markdown ? /* @__PURE__ */ jsx4(MarkdownContent, {
|
|
2007
1161
|
className: "w-full",
|
|
2008
1162
|
codeBlocks: message.markdown.codeBlocks,
|
|
2009
1163
|
html: message.markdown.html,
|
|
@@ -2015,7 +1169,7 @@ function AgentMessageRow({
|
|
|
2015
1169
|
}
|
|
2016
1170
|
},
|
|
2017
1171
|
locale
|
|
2018
|
-
}) : /* @__PURE__ */
|
|
1172
|
+
}) : /* @__PURE__ */ jsx4("div", {
|
|
2019
1173
|
className: "whitespace-pre-wrap",
|
|
2020
1174
|
children: message.text
|
|
2021
1175
|
})
|
|
@@ -2115,71 +1269,71 @@ function AgentWidget({
|
|
|
2115
1269
|
}
|
|
2116
1270
|
setOpen(nextOpen);
|
|
2117
1271
|
};
|
|
2118
|
-
return /* @__PURE__ */
|
|
1272
|
+
return /* @__PURE__ */ jsxs3(Dialog, {
|
|
2119
1273
|
open,
|
|
2120
1274
|
onOpenChange: handleOpenChange,
|
|
2121
1275
|
modal: false,
|
|
2122
1276
|
disablePointerDismissal: true,
|
|
2123
1277
|
children: [
|
|
2124
|
-
/* @__PURE__ */
|
|
2125
|
-
render: /* @__PURE__ */
|
|
1278
|
+
/* @__PURE__ */ jsxs3(DialogTrigger, {
|
|
1279
|
+
render: /* @__PURE__ */ jsx4(Button2, {
|
|
2126
1280
|
size: "icon-lg",
|
|
2127
1281
|
className: "fixed right-4 bottom-4 z-9999 rounded-full shadow-lg md:right-6 md:bottom-6"
|
|
2128
1282
|
}),
|
|
2129
1283
|
children: [
|
|
2130
|
-
/* @__PURE__ */
|
|
2131
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ jsx4(BotIcon, {}),
|
|
1285
|
+
/* @__PURE__ */ jsx4("span", {
|
|
2132
1286
|
className: "sr-only",
|
|
2133
1287
|
children: labels.open
|
|
2134
1288
|
})
|
|
2135
1289
|
]
|
|
2136
1290
|
}),
|
|
2137
|
-
/* @__PURE__ */
|
|
2138
|
-
children: /* @__PURE__ */
|
|
1291
|
+
/* @__PURE__ */ jsx4(DialogPortal, {
|
|
1292
|
+
children: /* @__PURE__ */ jsxs3(DialogPrimitive.Popup, {
|
|
2139
1293
|
"data-slot": "dialog-content",
|
|
2140
1294
|
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"),
|
|
2141
1295
|
children: [
|
|
2142
|
-
/* @__PURE__ */
|
|
1296
|
+
/* @__PURE__ */ jsx4(DialogHeader, {
|
|
2143
1297
|
className: "shrink-0 border-b p-4",
|
|
2144
|
-
children: /* @__PURE__ */
|
|
1298
|
+
children: /* @__PURE__ */ jsxs3("div", {
|
|
2145
1299
|
className: "flex items-center gap-1",
|
|
2146
1300
|
children: [
|
|
2147
|
-
/* @__PURE__ */
|
|
1301
|
+
/* @__PURE__ */ jsx4(DialogTitle, {
|
|
2148
1302
|
className: "min-w-0 flex-1 truncate text-sm leading-none font-medium",
|
|
2149
1303
|
children: labels.title
|
|
2150
1304
|
}),
|
|
2151
|
-
/* @__PURE__ */
|
|
1305
|
+
/* @__PURE__ */ jsxs3(Button2, {
|
|
2152
1306
|
variant: "ghost",
|
|
2153
1307
|
size: "icon-sm",
|
|
2154
1308
|
onClick: () => setOpen(false),
|
|
2155
1309
|
children: [
|
|
2156
|
-
/* @__PURE__ */
|
|
2157
|
-
/* @__PURE__ */
|
|
1310
|
+
/* @__PURE__ */ jsx4(MinusIcon, {}),
|
|
1311
|
+
/* @__PURE__ */ jsx4("span", {
|
|
2158
1312
|
className: "sr-only",
|
|
2159
1313
|
children: labels.minimize
|
|
2160
1314
|
})
|
|
2161
1315
|
]
|
|
2162
1316
|
}),
|
|
2163
|
-
/* @__PURE__ */
|
|
1317
|
+
/* @__PURE__ */ jsxs3(Button2, {
|
|
2164
1318
|
variant: "ghost",
|
|
2165
1319
|
size: "icon-sm",
|
|
2166
1320
|
onClick: () => setMaximized((current) => !current),
|
|
2167
1321
|
children: [
|
|
2168
|
-
maximized ? /* @__PURE__ */
|
|
2169
|
-
/* @__PURE__ */
|
|
1322
|
+
maximized ? /* @__PURE__ */ jsx4(Minimize2Icon, {}) : /* @__PURE__ */ jsx4(Maximize2Icon, {}),
|
|
1323
|
+
/* @__PURE__ */ jsx4("span", {
|
|
2170
1324
|
className: "sr-only",
|
|
2171
1325
|
children: maximized ? labels.restore : labels.maximize
|
|
2172
1326
|
})
|
|
2173
1327
|
]
|
|
2174
1328
|
}),
|
|
2175
|
-
/* @__PURE__ */
|
|
2176
|
-
render: /* @__PURE__ */
|
|
1329
|
+
/* @__PURE__ */ jsxs3(DialogClose, {
|
|
1330
|
+
render: /* @__PURE__ */ jsx4(Button2, {
|
|
2177
1331
|
variant: "ghost",
|
|
2178
1332
|
size: "icon-sm"
|
|
2179
1333
|
}),
|
|
2180
1334
|
children: [
|
|
2181
|
-
/* @__PURE__ */
|
|
2182
|
-
/* @__PURE__ */
|
|
1335
|
+
/* @__PURE__ */ jsx4(XIcon, {}),
|
|
1336
|
+
/* @__PURE__ */ jsx4("span", {
|
|
2183
1337
|
className: "sr-only",
|
|
2184
1338
|
children: labels.close
|
|
2185
1339
|
})
|
|
@@ -2188,38 +1342,38 @@ function AgentWidget({
|
|
|
2188
1342
|
]
|
|
2189
1343
|
})
|
|
2190
1344
|
}),
|
|
2191
|
-
/* @__PURE__ */
|
|
1345
|
+
/* @__PURE__ */ jsx4("div", {
|
|
2192
1346
|
className: "min-h-0 flex-1 overflow-hidden",
|
|
2193
|
-
children: state.messages.length === 0 && !state.error ? /* @__PURE__ */
|
|
1347
|
+
children: state.messages.length === 0 && !state.error ? /* @__PURE__ */ jsx4(Empty, {
|
|
2194
1348
|
className: "h-full",
|
|
2195
|
-
children: /* @__PURE__ */
|
|
1349
|
+
children: /* @__PURE__ */ jsxs3(EmptyHeader, {
|
|
2196
1350
|
children: [
|
|
2197
|
-
/* @__PURE__ */
|
|
1351
|
+
/* @__PURE__ */ jsx4(EmptyMedia, {
|
|
2198
1352
|
variant: "icon",
|
|
2199
|
-
children: /* @__PURE__ */
|
|
1353
|
+
children: /* @__PURE__ */ jsx4(MessageCircleDashedIcon, {})
|
|
2200
1354
|
}),
|
|
2201
|
-
/* @__PURE__ */
|
|
1355
|
+
/* @__PURE__ */ jsx4(EmptyTitle, {
|
|
2202
1356
|
children: labels.welcome
|
|
2203
1357
|
}),
|
|
2204
|
-
/* @__PURE__ */
|
|
1358
|
+
/* @__PURE__ */ jsx4(EmptyDescription, {
|
|
2205
1359
|
children: labels.description
|
|
2206
1360
|
})
|
|
2207
1361
|
]
|
|
2208
1362
|
})
|
|
2209
|
-
}) : /* @__PURE__ */
|
|
1363
|
+
}) : /* @__PURE__ */ jsx4(MessageScrollerProvider, {
|
|
2210
1364
|
autoScroll: true,
|
|
2211
|
-
children: /* @__PURE__ */
|
|
1365
|
+
children: /* @__PURE__ */ jsxs3(MessageScroller, {
|
|
2212
1366
|
children: [
|
|
2213
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ jsx4(MessageScrollerViewport, {
|
|
2214
1368
|
"aria-label": labels.title,
|
|
2215
|
-
children: /* @__PURE__ */
|
|
1369
|
+
children: /* @__PURE__ */ jsxs3(MessageScrollerContent, {
|
|
2216
1370
|
"aria-busy": state.pending,
|
|
2217
1371
|
className: "p-4",
|
|
2218
1372
|
children: [
|
|
2219
|
-
state.messages.map((message, index) => /* @__PURE__ */
|
|
1373
|
+
state.messages.map((message, index) => /* @__PURE__ */ jsx4(MessageScrollerItem, {
|
|
2220
1374
|
messageId: message.id,
|
|
2221
1375
|
scrollAnchor: message.role === "user",
|
|
2222
|
-
children: /* @__PURE__ */
|
|
1376
|
+
children: /* @__PURE__ */ jsx4(AgentMessageRow, {
|
|
2223
1377
|
disabled: state.pending,
|
|
2224
1378
|
labels,
|
|
2225
1379
|
locale,
|
|
@@ -2228,15 +1382,15 @@ function AgentWidget({
|
|
|
2228
1382
|
pending: state.pending && index === state.messages.length - 1
|
|
2229
1383
|
})
|
|
2230
1384
|
}, message.id)),
|
|
2231
|
-
state.error ? /* @__PURE__ */
|
|
1385
|
+
state.error ? /* @__PURE__ */ jsx4(MessageScrollerItem, {
|
|
2232
1386
|
messageId: "error",
|
|
2233
|
-
children: /* @__PURE__ */
|
|
1387
|
+
children: /* @__PURE__ */ jsxs3(Alert, {
|
|
2234
1388
|
variant: "destructive",
|
|
2235
1389
|
children: [
|
|
2236
|
-
/* @__PURE__ */
|
|
1390
|
+
/* @__PURE__ */ jsx4(AlertTitle, {
|
|
2237
1391
|
children: labels.title
|
|
2238
1392
|
}),
|
|
2239
|
-
/* @__PURE__ */
|
|
1393
|
+
/* @__PURE__ */ jsx4(AlertDescription, {
|
|
2240
1394
|
children: errorMessage(state.error, labels)
|
|
2241
1395
|
})
|
|
2242
1396
|
]
|
|
@@ -2245,10 +1399,10 @@ function AgentWidget({
|
|
|
2245
1399
|
]
|
|
2246
1400
|
})
|
|
2247
1401
|
}),
|
|
2248
|
-
/* @__PURE__ */
|
|
1402
|
+
/* @__PURE__ */ jsxs3(MessageScrollerButton, {
|
|
2249
1403
|
children: [
|
|
2250
|
-
/* @__PURE__ */
|
|
2251
|
-
/* @__PURE__ */
|
|
1404
|
+
/* @__PURE__ */ jsx4(ArrowDownIcon, {}),
|
|
1405
|
+
/* @__PURE__ */ jsx4("span", {
|
|
2252
1406
|
className: "sr-only",
|
|
2253
1407
|
children: labels.scrollLatest
|
|
2254
1408
|
})
|
|
@@ -2258,58 +1412,58 @@ function AgentWidget({
|
|
|
2258
1412
|
})
|
|
2259
1413
|
})
|
|
2260
1414
|
}),
|
|
2261
|
-
/* @__PURE__ */
|
|
1415
|
+
/* @__PURE__ */ jsx4("form", {
|
|
2262
1416
|
className: "shrink-0 border-t p-3",
|
|
2263
1417
|
onSubmit: (event) => {
|
|
2264
1418
|
event.preventDefault();
|
|
2265
1419
|
sendMessage();
|
|
2266
1420
|
},
|
|
2267
|
-
children: /* @__PURE__ */
|
|
1421
|
+
children: /* @__PURE__ */ jsxs3(InputGroup, {
|
|
2268
1422
|
children: [
|
|
2269
|
-
activeContext ? /* @__PURE__ */
|
|
1423
|
+
activeContext ? /* @__PURE__ */ jsx4(InputGroupAddon, {
|
|
2270
1424
|
align: "block-start",
|
|
2271
|
-
children: /* @__PURE__ */
|
|
1425
|
+
children: /* @__PURE__ */ jsxs3(Attachment, {
|
|
2272
1426
|
size: "xs",
|
|
2273
1427
|
className: "min-w-0",
|
|
2274
1428
|
children: [
|
|
2275
|
-
activeContext.icon ? /* @__PURE__ */
|
|
1429
|
+
activeContext.icon ? /* @__PURE__ */ jsx4(AttachmentMedia, {
|
|
2276
1430
|
children: activeContext.icon
|
|
2277
1431
|
}) : null,
|
|
2278
|
-
/* @__PURE__ */
|
|
2279
|
-
children: /* @__PURE__ */
|
|
1432
|
+
/* @__PURE__ */ jsx4(AttachmentContent, {
|
|
1433
|
+
children: /* @__PURE__ */ jsx4(AttachmentTitle, {
|
|
2280
1434
|
children: activeContext.label
|
|
2281
1435
|
})
|
|
2282
1436
|
}),
|
|
2283
|
-
onRemoveContext ? /* @__PURE__ */
|
|
2284
|
-
children: /* @__PURE__ */
|
|
1437
|
+
onRemoveContext ? /* @__PURE__ */ jsx4(AttachmentActions, {
|
|
1438
|
+
children: /* @__PURE__ */ jsx4(AttachmentAction, {
|
|
2285
1439
|
type: "button",
|
|
2286
1440
|
"aria-label": `${labels.removeContext}: ${activeContext.label}`,
|
|
2287
1441
|
onClick: onRemoveContext,
|
|
2288
|
-
children: /* @__PURE__ */
|
|
1442
|
+
children: /* @__PURE__ */ jsx4(XIcon, {})
|
|
2289
1443
|
})
|
|
2290
1444
|
}) : null
|
|
2291
1445
|
]
|
|
2292
1446
|
})
|
|
2293
1447
|
}) : null,
|
|
2294
|
-
/* @__PURE__ */
|
|
1448
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
2295
1449
|
className: "relative w-full min-w-0 self-stretch text-left",
|
|
2296
1450
|
children: [
|
|
2297
|
-
/* @__PURE__ */
|
|
1451
|
+
/* @__PURE__ */ jsx4("div", {
|
|
2298
1452
|
ref: inputOverlayRef,
|
|
2299
1453
|
"aria-hidden": "true",
|
|
2300
1454
|
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",
|
|
2301
1455
|
children: highlightedInput(input, references)
|
|
2302
1456
|
}),
|
|
2303
|
-
/* @__PURE__ */
|
|
1457
|
+
/* @__PURE__ */ jsxs3(Popover, {
|
|
2304
1458
|
open: referencePickerOpen,
|
|
2305
1459
|
triggerId: referenceInputId,
|
|
2306
1460
|
children: [
|
|
2307
|
-
/* @__PURE__ */
|
|
1461
|
+
/* @__PURE__ */ jsx4(PopoverTrigger, {
|
|
2308
1462
|
id: referenceInputId,
|
|
2309
1463
|
nativeButton: false,
|
|
2310
1464
|
onKeyDown: (event) => event.preventBaseUIHandler(),
|
|
2311
1465
|
onKeyUp: (event) => event.preventBaseUIHandler(),
|
|
2312
|
-
render: /* @__PURE__ */
|
|
1466
|
+
render: /* @__PURE__ */ jsx4(InputGroupTextarea, {
|
|
2313
1467
|
ref: inputRef,
|
|
2314
1468
|
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",
|
|
2315
1469
|
value: input,
|
|
@@ -2361,30 +1515,30 @@ function AgentWidget({
|
|
|
2361
1515
|
}
|
|
2362
1516
|
})
|
|
2363
1517
|
}),
|
|
2364
|
-
/* @__PURE__ */
|
|
1518
|
+
/* @__PURE__ */ jsx4(PopoverContent, {
|
|
2365
1519
|
align: "start",
|
|
2366
1520
|
initialFocus: false,
|
|
2367
1521
|
side: "top",
|
|
2368
1522
|
className: "w-[min(24rem,calc(100vw-2rem))] p-0",
|
|
2369
|
-
children: /* @__PURE__ */
|
|
1523
|
+
children: /* @__PURE__ */ jsx4(Command3, {
|
|
2370
1524
|
shouldFilter: false,
|
|
2371
1525
|
value: activeReference?.key ?? "",
|
|
2372
1526
|
onValueChange: setActiveReferenceKey,
|
|
2373
|
-
children: /* @__PURE__ */
|
|
1527
|
+
children: /* @__PURE__ */ jsxs3(CommandList, {
|
|
2374
1528
|
id: referenceListId,
|
|
2375
1529
|
children: [
|
|
2376
|
-
/* @__PURE__ */
|
|
1530
|
+
/* @__PURE__ */ jsx4(CommandEmpty, {
|
|
2377
1531
|
children: labels.noReferences
|
|
2378
1532
|
}),
|
|
2379
|
-
matchingReferences.length > 0 ? /* @__PURE__ */
|
|
1533
|
+
matchingReferences.length > 0 ? /* @__PURE__ */ jsx4(CommandGroup, {
|
|
2380
1534
|
heading: labels.references,
|
|
2381
|
-
children: matchingReferences.map((reference, index) => /* @__PURE__ */
|
|
1535
|
+
children: matchingReferences.map((reference, index) => /* @__PURE__ */ jsxs3(CommandItem, {
|
|
2382
1536
|
id: `${referenceInputId}-reference-${index}`,
|
|
2383
1537
|
value: reference.key,
|
|
2384
1538
|
onSelect: () => selectReference(reference),
|
|
2385
1539
|
children: [
|
|
2386
1540
|
reference.icon,
|
|
2387
|
-
/* @__PURE__ */
|
|
1541
|
+
/* @__PURE__ */ jsx4("span", {
|
|
2388
1542
|
className: "truncate",
|
|
2389
1543
|
children: reference.label
|
|
2390
1544
|
})
|
|
@@ -2399,26 +1553,26 @@ function AgentWidget({
|
|
|
2399
1553
|
})
|
|
2400
1554
|
]
|
|
2401
1555
|
}),
|
|
2402
|
-
/* @__PURE__ */
|
|
1556
|
+
/* @__PURE__ */ jsx4(InputGroupAddon, {
|
|
2403
1557
|
align: "block-end",
|
|
2404
1558
|
className: "justify-end",
|
|
2405
|
-
children: state.pending ? /* @__PURE__ */
|
|
1559
|
+
children: state.pending ? /* @__PURE__ */ jsxs3(InputGroupButton, {
|
|
2406
1560
|
size: "icon-xs",
|
|
2407
1561
|
onClick: onInterrupt,
|
|
2408
1562
|
children: [
|
|
2409
|
-
/* @__PURE__ */
|
|
2410
|
-
/* @__PURE__ */
|
|
1563
|
+
/* @__PURE__ */ jsx4(SquareIcon, {}),
|
|
1564
|
+
/* @__PURE__ */ jsx4("span", {
|
|
2411
1565
|
className: "sr-only",
|
|
2412
1566
|
children: labels.stop
|
|
2413
1567
|
})
|
|
2414
1568
|
]
|
|
2415
|
-
}) : /* @__PURE__ */
|
|
1569
|
+
}) : /* @__PURE__ */ jsxs3(InputGroupButton, {
|
|
2416
1570
|
type: "submit",
|
|
2417
1571
|
size: "icon-xs",
|
|
2418
1572
|
disabled: !input.trim() || hasPendingApproval2,
|
|
2419
1573
|
children: [
|
|
2420
|
-
/* @__PURE__ */
|
|
2421
|
-
/* @__PURE__ */
|
|
1574
|
+
/* @__PURE__ */ jsx4(SendIcon, {}),
|
|
1575
|
+
/* @__PURE__ */ jsx4("span", {
|
|
2422
1576
|
className: "sr-only",
|
|
2423
1577
|
children: labels.send
|
|
2424
1578
|
})
|