@inf-monkeys-tech/monkeys-design 1.0.49 → 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/agent-workbench/index.js +492 -192
- package/dist/components/agent-workbench/index.js.map +1 -1
- package/dist/components/agent-workbench/index.mjs +452 -152
- package/dist/components/agent-workbench/index.mjs.map +1 -1
- package/dist/components/primitives/index.d.mts +2 -2
- package/dist/components/primitives/index.d.ts +2 -2
- package/dist/components/primitives/index.js +183 -183
- package/dist/components/primitives/index.js.map +1 -1
- package/dist/components/primitives/index.mjs +171 -171
- package/dist/components/primitives/index.mjs.map +1 -1
- package/dist/index.js +714 -538
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +292 -116
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import debounce from 'lodash/debounce.js';
|
|
2
2
|
import { resolveThemeTokens, buildApplicationHandoffUrl } from '@inf-monkeys-tech/monkeys/runtime';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as React4 from 'react';
|
|
4
|
+
import React4__default, { forwardRef, useId, useState, useRef, useEffect, createElement, createContext, useCallback, useMemo, useContext, Children, isValidElement, Fragment as Fragment$1, useLayoutEffect } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import * as DropdownMenu2 from '@radix-ui/react-dropdown-menu';
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -17467,7 +17467,7 @@ function NavigationLayout({
|
|
|
17467
17467
|
}
|
|
17468
17468
|
);
|
|
17469
17469
|
}
|
|
17470
|
-
var AccordionItem =
|
|
17470
|
+
var AccordionItem = React4.forwardRef(({ className, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17471
17471
|
AccordionPrimitive.Item,
|
|
17472
17472
|
{
|
|
17473
17473
|
ref,
|
|
@@ -17480,7 +17480,7 @@ var AccordionItem = React2.forwardRef(({ className, style, ...props }, ref) => /
|
|
|
17480
17480
|
}
|
|
17481
17481
|
));
|
|
17482
17482
|
AccordionItem.displayName = "AccordionItem";
|
|
17483
|
-
var AccordionTrigger =
|
|
17483
|
+
var AccordionTrigger = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
17484
17484
|
AccordionPrimitive.Trigger,
|
|
17485
17485
|
{
|
|
17486
17486
|
ref,
|
|
@@ -17502,7 +17502,7 @@ var AccordionTrigger = React2.forwardRef(({ className, children, ...props }, ref
|
|
|
17502
17502
|
}
|
|
17503
17503
|
) }));
|
|
17504
17504
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
17505
|
-
var AccordionContent =
|
|
17505
|
+
var AccordionContent = React4.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17506
17506
|
AccordionPrimitive.Content,
|
|
17507
17507
|
{
|
|
17508
17508
|
ref,
|
|
@@ -17512,7 +17512,7 @@ var AccordionContent = React2.forwardRef(({ className, children, ...props }, ref
|
|
|
17512
17512
|
}
|
|
17513
17513
|
));
|
|
17514
17514
|
AccordionContent.displayName = "AccordionContent";
|
|
17515
|
-
var Checkbox =
|
|
17515
|
+
var Checkbox = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17516
17516
|
CheckboxPrimitive.Root,
|
|
17517
17517
|
{
|
|
17518
17518
|
ref,
|
|
@@ -17547,7 +17547,7 @@ var buttonVariants = cva(
|
|
|
17547
17547
|
defaultVariants: { variant: "default", size: "default" }
|
|
17548
17548
|
}
|
|
17549
17549
|
);
|
|
17550
|
-
var Button =
|
|
17550
|
+
var Button = React4.forwardRef(
|
|
17551
17551
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
17552
17552
|
const Component = asChild ? Slot : "button";
|
|
17553
17553
|
return /* @__PURE__ */ jsx(
|
|
@@ -17561,7 +17561,7 @@ var Button = React2.forwardRef(
|
|
|
17561
17561
|
}
|
|
17562
17562
|
);
|
|
17563
17563
|
Button.displayName = "Button";
|
|
17564
|
-
var PopoverContent =
|
|
17564
|
+
var PopoverContent = React4.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
17565
17565
|
PopoverPrimitive.Content,
|
|
17566
17566
|
{
|
|
17567
17567
|
ref,
|
|
@@ -17575,7 +17575,7 @@ var PopoverContent = React2.forwardRef(({ className, align = "center", sideOffse
|
|
|
17575
17575
|
}
|
|
17576
17576
|
) }));
|
|
17577
17577
|
PopoverContent.displayName = "PopoverContent";
|
|
17578
|
-
var ScrollArea =
|
|
17578
|
+
var ScrollArea = React4.forwardRef(
|
|
17579
17579
|
({
|
|
17580
17580
|
className,
|
|
17581
17581
|
children,
|
|
@@ -17619,7 +17619,7 @@ var ScrollArea = React2.forwardRef(
|
|
|
17619
17619
|
)
|
|
17620
17620
|
);
|
|
17621
17621
|
ScrollArea.displayName = "ScrollArea";
|
|
17622
|
-
var ScrollBar =
|
|
17622
|
+
var ScrollBar = React4.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17623
17623
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
17624
17624
|
{
|
|
17625
17625
|
ref,
|
|
@@ -17635,7 +17635,7 @@ var ScrollBar = React2.forwardRef(({ className, orientation = "vertical", ...pro
|
|
|
17635
17635
|
}
|
|
17636
17636
|
));
|
|
17637
17637
|
ScrollBar.displayName = "ScrollBar";
|
|
17638
|
-
var Switch =
|
|
17638
|
+
var Switch = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17639
17639
|
SwitchPrimitive.Root,
|
|
17640
17640
|
{
|
|
17641
17641
|
ref,
|
|
@@ -17648,9 +17648,9 @@ var Switch = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
17648
17648
|
}
|
|
17649
17649
|
));
|
|
17650
17650
|
Switch.displayName = "Switch";
|
|
17651
|
-
var Tabs =
|
|
17651
|
+
var Tabs = React4.forwardRef(({ variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Root, { ref, "data-variant": variant, ...props }));
|
|
17652
17652
|
Tabs.displayName = "Tabs";
|
|
17653
|
-
var TabsList =
|
|
17653
|
+
var TabsList = React4.forwardRef(({ className, gap, style, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17654
17654
|
TabsPrimitive.List,
|
|
17655
17655
|
{
|
|
17656
17656
|
ref,
|
|
@@ -17663,7 +17663,7 @@ var TabsList = React2.forwardRef(({ className, gap, style, ...props }, ref) => /
|
|
|
17663
17663
|
}
|
|
17664
17664
|
));
|
|
17665
17665
|
TabsList.displayName = "TabsList";
|
|
17666
|
-
var TabsTrigger =
|
|
17666
|
+
var TabsTrigger = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17667
17667
|
TabsPrimitive.Trigger,
|
|
17668
17668
|
{
|
|
17669
17669
|
ref,
|
|
@@ -17675,7 +17675,7 @@ var TabsTrigger = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
17675
17675
|
}
|
|
17676
17676
|
));
|
|
17677
17677
|
TabsTrigger.displayName = "TabsTrigger";
|
|
17678
|
-
var TabsContent =
|
|
17678
|
+
var TabsContent = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17679
17679
|
TabsPrimitive.Content,
|
|
17680
17680
|
{
|
|
17681
17681
|
ref,
|
|
@@ -17687,7 +17687,7 @@ var TabsContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
17687
17687
|
}
|
|
17688
17688
|
));
|
|
17689
17689
|
TabsContent.displayName = "TabsContent";
|
|
17690
|
-
var TooltipContent =
|
|
17690
|
+
var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Tooltip2.Portal, { children: /* @__PURE__ */ jsx(
|
|
17691
17691
|
Tooltip2.Content,
|
|
17692
17692
|
{
|
|
17693
17693
|
ref,
|
|
@@ -17700,65 +17700,213 @@ var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
17700
17700
|
}
|
|
17701
17701
|
) }));
|
|
17702
17702
|
TooltipContent.displayName = "TooltipContent";
|
|
17703
|
+
var Input = React4.forwardRef(({ className, appearance = "standard", type, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17704
|
+
"input",
|
|
17705
|
+
{
|
|
17706
|
+
ref,
|
|
17707
|
+
type,
|
|
17708
|
+
className: cn(
|
|
17709
|
+
"flex w-full border border-input bg-control-surface px-3 text-foreground ring-offset-control-surface transition-[border-color,background-color,color,box-shadow] file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
17710
|
+
appearance === "compact" ? "h-9 rounded-md py-1 text-sm shadow-sm" : "h-10 rounded-md py-2 text-sm shadow-sm",
|
|
17711
|
+
appearance === "shadow" && "rounded-lg shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",
|
|
17712
|
+
className
|
|
17713
|
+
),
|
|
17714
|
+
...props
|
|
17715
|
+
}
|
|
17716
|
+
));
|
|
17717
|
+
Input.displayName = "Input";
|
|
17718
|
+
var Textarea = React4.forwardRef(({ className, appearance = "standard", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17719
|
+
"textarea",
|
|
17720
|
+
{
|
|
17721
|
+
ref,
|
|
17722
|
+
className: cn(
|
|
17723
|
+
"flex w-full border border-input bg-control-surface px-3 py-2 text-foreground ring-offset-control-surface placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
17724
|
+
appearance === "compact" ? "min-h-[60px] rounded-md text-sm shadow-sm" : "min-h-[80px] rounded-md text-sm",
|
|
17725
|
+
appearance === "shadow" && "shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",
|
|
17726
|
+
className
|
|
17727
|
+
),
|
|
17728
|
+
...props
|
|
17729
|
+
}
|
|
17730
|
+
));
|
|
17731
|
+
Textarea.displayName = "Textarea";
|
|
17732
|
+
function InputGroup({ className, ...props }) {
|
|
17733
|
+
return /* @__PURE__ */ jsx(
|
|
17734
|
+
"div",
|
|
17735
|
+
{
|
|
17736
|
+
"data-slot": "input-group",
|
|
17737
|
+
role: "group",
|
|
17738
|
+
className: cn(
|
|
17739
|
+
"group/input-group shadow-xs relative flex w-full items-center rounded-md border border-input outline-none transition-[color,box-shadow] dark:bg-input/30",
|
|
17740
|
+
"h-9 has-[>textarea]:h-auto",
|
|
17741
|
+
// Variants based on alignment.
|
|
17742
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
17743
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
17744
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
17745
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
17746
|
+
// Focus state.
|
|
17747
|
+
"has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-ring",
|
|
17748
|
+
// Error state.
|
|
17749
|
+
"has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40",
|
|
17750
|
+
className
|
|
17751
|
+
),
|
|
17752
|
+
...props
|
|
17753
|
+
}
|
|
17754
|
+
);
|
|
17755
|
+
}
|
|
17756
|
+
var inputGroupAddonVariants = cva(
|
|
17757
|
+
"text-muted-foreground flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
17758
|
+
{
|
|
17759
|
+
variants: {
|
|
17760
|
+
align: {
|
|
17761
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
17762
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]",
|
|
17763
|
+
"block-start": "[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5",
|
|
17764
|
+
"block-end": "[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5"
|
|
17765
|
+
}
|
|
17766
|
+
},
|
|
17767
|
+
defaultVariants: {
|
|
17768
|
+
align: "inline-start"
|
|
17769
|
+
}
|
|
17770
|
+
}
|
|
17771
|
+
);
|
|
17772
|
+
function InputGroupAddon({
|
|
17773
|
+
className,
|
|
17774
|
+
align = "inline-start",
|
|
17775
|
+
...props
|
|
17776
|
+
}) {
|
|
17777
|
+
return /* @__PURE__ */ jsx(
|
|
17778
|
+
"div",
|
|
17779
|
+
{
|
|
17780
|
+
role: "group",
|
|
17781
|
+
"data-slot": "input-group-addon",
|
|
17782
|
+
"data-align": align,
|
|
17783
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
17784
|
+
onClick: (e) => {
|
|
17785
|
+
if (e.target.closest("button")) {
|
|
17786
|
+
return;
|
|
17787
|
+
}
|
|
17788
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
17789
|
+
},
|
|
17790
|
+
...props
|
|
17791
|
+
}
|
|
17792
|
+
);
|
|
17793
|
+
}
|
|
17794
|
+
var inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
|
|
17795
|
+
variants: {
|
|
17796
|
+
size: {
|
|
17797
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
17798
|
+
sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
|
|
17799
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
17800
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
17801
|
+
}
|
|
17802
|
+
},
|
|
17803
|
+
defaultVariants: {
|
|
17804
|
+
size: "xs"
|
|
17805
|
+
}
|
|
17806
|
+
});
|
|
17807
|
+
function InputGroupButton({
|
|
17808
|
+
className,
|
|
17809
|
+
type = "button",
|
|
17810
|
+
variant = "ghost",
|
|
17811
|
+
size = "xs",
|
|
17812
|
+
...props
|
|
17813
|
+
}) {
|
|
17814
|
+
return /* @__PURE__ */ jsx(
|
|
17815
|
+
Button,
|
|
17816
|
+
{
|
|
17817
|
+
type,
|
|
17818
|
+
"data-size": size,
|
|
17819
|
+
variant,
|
|
17820
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
17821
|
+
...props
|
|
17822
|
+
}
|
|
17823
|
+
);
|
|
17824
|
+
}
|
|
17825
|
+
var InputGroupInput = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17826
|
+
Input,
|
|
17827
|
+
{
|
|
17828
|
+
ref,
|
|
17829
|
+
"data-slot": "input-group-control",
|
|
17830
|
+
className: cn(
|
|
17831
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
17832
|
+
className
|
|
17833
|
+
),
|
|
17834
|
+
...props
|
|
17835
|
+
}
|
|
17836
|
+
));
|
|
17837
|
+
InputGroupInput.displayName = "InputGroupInput";
|
|
17838
|
+
var InputGroupTextarea = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
17839
|
+
Textarea,
|
|
17840
|
+
{
|
|
17841
|
+
ref,
|
|
17842
|
+
"data-slot": "input-group-control",
|
|
17843
|
+
className: cn(
|
|
17844
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
17845
|
+
className
|
|
17846
|
+
),
|
|
17847
|
+
...props
|
|
17848
|
+
}
|
|
17849
|
+
));
|
|
17850
|
+
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
17703
17851
|
var menuItemClassName = "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0";
|
|
17704
17852
|
var menuContentClassName = "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-menu-surface p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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";
|
|
17705
17853
|
var DropdownMenu4 = DropdownMenu2.Root;
|
|
17706
17854
|
var DropdownMenuTrigger = DropdownMenu2.Trigger;
|
|
17707
|
-
var DropdownMenuSubTrigger =
|
|
17855
|
+
var DropdownMenuSubTrigger = React4.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenu2.SubTrigger, { ref, className: cn(menuItemClassName, "data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [
|
|
17708
17856
|
children,
|
|
17709
17857
|
/* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true", className: "ml-auto" })
|
|
17710
17858
|
] }));
|
|
17711
17859
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
17712
|
-
var DropdownMenuSubContent =
|
|
17860
|
+
var DropdownMenuSubContent = React4.forwardRef(
|
|
17713
17861
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu2.SubContent, { ref, className: cn(menuContentClassName, className), ...props })
|
|
17714
17862
|
);
|
|
17715
17863
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
17716
|
-
var DropdownMenuContent =
|
|
17864
|
+
var DropdownMenuContent = React4.forwardRef(
|
|
17717
17865
|
({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu2.Portal, { children: /* @__PURE__ */ jsx(DropdownMenu2.Content, { ref, sideOffset, className: cn(menuContentClassName, className), ...props }) })
|
|
17718
17866
|
);
|
|
17719
17867
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
17720
|
-
var DropdownMenuItem =
|
|
17868
|
+
var DropdownMenuItem = React4.forwardRef(
|
|
17721
17869
|
({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu2.Item, { ref, className: cn(menuItemClassName, inset && "pl-8", className), ...props })
|
|
17722
17870
|
);
|
|
17723
17871
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
17724
|
-
var DropdownMenuCheckboxItem =
|
|
17872
|
+
var DropdownMenuCheckboxItem = React4.forwardRef(
|
|
17725
17873
|
({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenu2.CheckboxItem, { ref, className: cn(menuItemClassName, "pl-8", className), checked, ...props, children: [
|
|
17726
17874
|
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenu2.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true", className: "h-4 w-4" }) }) }),
|
|
17727
17875
|
children
|
|
17728
17876
|
] })
|
|
17729
17877
|
);
|
|
17730
17878
|
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
17731
|
-
var DropdownMenuRadioItem =
|
|
17879
|
+
var DropdownMenuRadioItem = React4.forwardRef(
|
|
17732
17880
|
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenu2.RadioItem, { ref, className: cn(menuItemClassName, "pl-8", className), ...props, children: [
|
|
17733
17881
|
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenu2.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { "aria-hidden": "true", className: "h-2 w-2 fill-current" }) }) }),
|
|
17734
17882
|
children
|
|
17735
17883
|
] })
|
|
17736
17884
|
);
|
|
17737
17885
|
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
17738
|
-
var DropdownMenuLabel =
|
|
17886
|
+
var DropdownMenuLabel = React4.forwardRef(
|
|
17739
17887
|
({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu2.Label, { ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })
|
|
17740
17888
|
);
|
|
17741
17889
|
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
17742
|
-
var DropdownMenuSeparator =
|
|
17890
|
+
var DropdownMenuSeparator = React4.forwardRef(
|
|
17743
17891
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenu2.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })
|
|
17744
17892
|
);
|
|
17745
17893
|
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
17746
|
-
var SelectTrigger =
|
|
17747
|
-
({ className, children, iconClassName, size = "default", ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, { ref, className: cn("flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-control-surface px-3 py-2 text-left text-sm shadow-sm ring-offset-control-surface data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:min-w-0 [&>span]:flex-1 [&>span]:text-left", size === "sm" && "h-8 px-2 py-1 text-xs", className), ...props, children: [
|
|
17894
|
+
var SelectTrigger = React4.forwardRef(
|
|
17895
|
+
({ className, children, iconClassName, size = "default", ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, { ref, className: cn("flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-control-surface px-3 py-2 text-left text-sm text-foreground shadow-sm ring-offset-control-surface data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:min-w-0 [&>span]:flex-1 [&>span]:text-left", size === "sm" && "h-8 px-2 py-1 text-xs", className), ...props, children: [
|
|
17748
17896
|
children,
|
|
17749
17897
|
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true", className: cn("h-4 w-4 opacity-50", iconClassName) }) })
|
|
17750
17898
|
] })
|
|
17751
17899
|
);
|
|
17752
17900
|
SelectTrigger.displayName = "SelectTrigger";
|
|
17753
|
-
var SelectScrollUpButton =
|
|
17901
|
+
var SelectScrollUpButton = React4.forwardRef(
|
|
17754
17902
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, { ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: /* @__PURE__ */ jsx(ChevronUp, { "aria-hidden": "true", className: "h-4 w-4" }) })
|
|
17755
17903
|
);
|
|
17756
17904
|
SelectScrollUpButton.displayName = "SelectScrollUpButton";
|
|
17757
|
-
var SelectScrollDownButton =
|
|
17905
|
+
var SelectScrollDownButton = React4.forwardRef(
|
|
17758
17906
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, { ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true", className: "h-4 w-4" }) })
|
|
17759
17907
|
);
|
|
17760
17908
|
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
17761
|
-
var SelectContent =
|
|
17909
|
+
var SelectContent = React4.forwardRef(
|
|
17762
17910
|
({ className, children, position = "popper", viewportClassName, disableTriggerViewportSizing = false, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, { ref, position, className: cn(menuContentClassName, "relative max-h-[var(--radix-select-content-available-height)] overflow-y-auto overflow-x-hidden", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), ...props, children: [
|
|
17763
17911
|
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
17764
17912
|
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]", position === "popper" && !disableTriggerViewportSizing && "h-[var(--radix-select-trigger-height)]", viewportClassName), children }),
|
|
@@ -17766,11 +17914,11 @@ var SelectContent = React2.forwardRef(
|
|
|
17766
17914
|
] }) })
|
|
17767
17915
|
);
|
|
17768
17916
|
SelectContent.displayName = "SelectContent";
|
|
17769
|
-
var SelectLabel =
|
|
17917
|
+
var SelectLabel = React4.forwardRef(
|
|
17770
17918
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Label, { ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), ...props })
|
|
17771
17919
|
);
|
|
17772
17920
|
SelectLabel.displayName = "SelectLabel";
|
|
17773
|
-
var SelectItem =
|
|
17921
|
+
var SelectItem = React4.forwardRef(
|
|
17774
17922
|
({ className, children, indicatorClassName, itemText, hideIndicator = false, ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Item, { ref, className: cn(menuItemClassName, "w-full", hideIndicator ? "px-2" : "pl-8 pr-2", className), ...props, children: [
|
|
17775
17923
|
!hideIndicator ? /* @__PURE__ */ jsx("span", { className: cn("absolute left-2 flex h-3.5 w-3.5 items-center justify-center", indicatorClassName), children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true", className: "h-4 w-4" }) }) }) : null,
|
|
17776
17924
|
itemText ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -17780,7 +17928,7 @@ var SelectItem = React2.forwardRef(
|
|
|
17780
17928
|
] })
|
|
17781
17929
|
);
|
|
17782
17930
|
SelectItem.displayName = "SelectItem";
|
|
17783
|
-
var SelectSeparator =
|
|
17931
|
+
var SelectSeparator = React4.forwardRef(
|
|
17784
17932
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })
|
|
17785
17933
|
);
|
|
17786
17934
|
SelectSeparator.displayName = "SelectSeparator";
|
|
@@ -17831,7 +17979,7 @@ function CollectionState({
|
|
|
17831
17979
|
if (status === "error") {
|
|
17832
17980
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 px-3 py-8 text-center", children: [
|
|
17833
17981
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", role: "alert", children: error }),
|
|
17834
|
-
/* @__PURE__ */ jsxs(
|
|
17982
|
+
/* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", size: "sm", className: "gap-1.5 px-0 text-sm text-primary hover:text-primary", onClick: onRetry, children: [
|
|
17835
17983
|
/* @__PURE__ */ jsx(RefreshCw, { className: "size-3.5", "aria-hidden": "true" }),
|
|
17836
17984
|
messages.retry
|
|
17837
17985
|
] })
|
|
@@ -17863,7 +18011,7 @@ function SessionActions({
|
|
|
17863
18011
|
const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
|
|
17864
18012
|
if (!capabilities.renameSessions && !capabilities.deleteSessions) return null;
|
|
17865
18013
|
return /* @__PURE__ */ jsxs(DropdownMenu4, { children: [
|
|
17866
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
18014
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", className: "size-8", "aria-label": messages.actions, children: /* @__PURE__ */ jsx(Ellipsis, { className: "size-4", "aria-hidden": "true" }) }) }),
|
|
17867
18015
|
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
|
|
17868
18016
|
capabilities.renameSessions ? /* @__PURE__ */ jsxs(DropdownMenuItem, { onSelect: () => onIntent?.({ type: "rename-session", sessionId: item.id, title: item.title }), children: [
|
|
17869
18017
|
/* @__PURE__ */ jsx(Pencil, { className: "mr-2 size-4", "aria-hidden": "true" }),
|
|
@@ -17939,12 +18087,13 @@ function AgentWorkbenchSidebar({
|
|
|
17939
18087
|
/* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx(SessionAvatar, { item }) }),
|
|
17940
18088
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
17941
18089
|
/* @__PURE__ */ jsx(
|
|
17942
|
-
|
|
18090
|
+
Input,
|
|
17943
18091
|
{
|
|
17944
18092
|
ref: renameInputRef,
|
|
17945
18093
|
value: editingTitle,
|
|
17946
18094
|
"aria-label": messages.rename,
|
|
17947
|
-
|
|
18095
|
+
appearance: "compact",
|
|
18096
|
+
className: "h-6 w-full border-primary px-1.5 text-sm font-medium",
|
|
17948
18097
|
onChange: (event) => setEditingTitle(event.target.value),
|
|
17949
18098
|
onClick: (event) => event.stopPropagation(),
|
|
17950
18099
|
onBlur: () => saveRenameSession(item),
|
|
@@ -17974,7 +18123,7 @@ function AgentWorkbenchSidebar({
|
|
|
17974
18123
|
percent,
|
|
17975
18124
|
"%"
|
|
17976
18125
|
] }) : /* @__PURE__ */ jsx(StatusIndicator, { status: item.status }),
|
|
17977
|
-
viewModel.capabilities.pinSessions ? /* @__PURE__ */ jsx(
|
|
18126
|
+
viewModel.capabilities.pinSessions ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": item.pinned ? messages.unpin : messages.pin, className: cn2("size-8 text-muted-foreground opacity-0 group-hover:opacity-100", item.pinned && "text-primary opacity-100"), onClick: (event) => {
|
|
17978
18127
|
event.stopPropagation();
|
|
17979
18128
|
onIntent?.({ type: "toggle-session-pin", sessionId: item.id, pinned: !item.pinned });
|
|
17980
18129
|
}, children: /* @__PURE__ */ jsx(Pin, { className: cn2("size-4", item.pinned && "fill-current") }) }) : null,
|
|
@@ -17992,17 +18141,17 @@ function AgentWorkbenchSidebar({
|
|
|
17992
18141
|
className: "flex h-full min-h-0 flex-col bg-background text-foreground",
|
|
17993
18142
|
children: [
|
|
17994
18143
|
/* @__PURE__ */ jsxs("div", { className: "shrink-0 space-y-3 p-4 pb-2", children: [
|
|
17995
|
-
/* @__PURE__ */ jsxs(
|
|
17996
|
-
/* @__PURE__ */ jsx(Search, { className: "size-4
|
|
18144
|
+
/* @__PURE__ */ jsxs(InputGroup, { className: cn2("h-10 rounded-lg bg-card", classNames?.search), children: [
|
|
18145
|
+
/* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Search, { className: "size-4", "aria-hidden": "true" }) }),
|
|
17997
18146
|
/* @__PURE__ */ jsx(
|
|
17998
|
-
|
|
18147
|
+
InputGroupInput,
|
|
17999
18148
|
{
|
|
18000
18149
|
ref: searchRef,
|
|
18001
18150
|
type: "search",
|
|
18002
18151
|
value: viewModel.searchQuery,
|
|
18003
18152
|
"aria-label": sessionsOnly ? messages.searchSessions : messages.search,
|
|
18004
18153
|
placeholder: sessionsOnly ? messages.searchSessions : messages.search,
|
|
18005
|
-
className: "min-w-0
|
|
18154
|
+
className: "min-w-0 [&::-webkit-search-cancel-button]:hidden",
|
|
18006
18155
|
onChange: (event) => onIntent?.({ type: "change-search", query: event.target.value }),
|
|
18007
18156
|
onKeyDown: (event) => {
|
|
18008
18157
|
if (event.key !== "Escape") return;
|
|
@@ -18011,7 +18160,7 @@ function AgentWorkbenchSidebar({
|
|
|
18011
18160
|
}
|
|
18012
18161
|
}
|
|
18013
18162
|
),
|
|
18014
|
-
viewModel.searchQuery ? /* @__PURE__ */ jsx(
|
|
18163
|
+
viewModel.searchQuery ? /* @__PURE__ */ jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx(InputGroupButton, { size: "icon-xs", "aria-label": messages.clearSearch, onClick: () => onIntent?.({ type: "change-search", query: "" }), children: /* @__PURE__ */ jsx(X, { className: "size-3.5", "aria-hidden": "true" }) }) }) : /* @__PURE__ */ jsx(InputGroupAddon, { align: "inline-end", children: /* @__PURE__ */ jsx("kbd", { className: "border border-border px-1.5 py-0.5 text-[10px]", children: "Ctrl K" }) })
|
|
18015
18164
|
] }),
|
|
18016
18165
|
!sessionsOnly || headerActions ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
18017
18166
|
!sessionsOnly ? /* @__PURE__ */ jsxs(TabsList, { className: cn2("grid min-w-0 flex-1 grid-cols-2 text-foreground", classNames?.tabs), "aria-label": messages.tabsLabel, children: [
|
|
@@ -18022,7 +18171,7 @@ function AgentWorkbenchSidebar({
|
|
|
18022
18171
|
] }) : null
|
|
18023
18172
|
] }),
|
|
18024
18173
|
!sessionsOnly ? /* @__PURE__ */ jsxs(TabsContent, { value: "agents", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
|
|
18025
|
-
viewModel.capabilities.createAgent ? /* @__PURE__ */ jsxs(
|
|
18174
|
+
viewModel.capabilities.createAgent ? /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", className: "mb-3 h-9 w-full justify-start gap-2 px-3 text-sm", onClick: () => onIntent?.({ type: "create-agent" }), children: [
|
|
18026
18175
|
/* @__PURE__ */ jsx(Plus, { className: "size-4", "aria-hidden": "true" }),
|
|
18027
18176
|
messages.newAgent
|
|
18028
18177
|
] }) : null,
|
|
@@ -18043,11 +18192,13 @@ function AgentWorkbenchSidebar({
|
|
|
18043
18192
|
] }),
|
|
18044
18193
|
item.builtIn ? /* @__PURE__ */ jsx("span", { className: "rounded-full bg-muted px-1.5 py-1 text-[10px] text-foreground", children: messages.builtIn }) : null,
|
|
18045
18194
|
viewModel.capabilities.pinAgents ? /* @__PURE__ */ jsx(
|
|
18046
|
-
|
|
18195
|
+
Button,
|
|
18047
18196
|
{
|
|
18048
18197
|
type: "button",
|
|
18198
|
+
variant: "ghost",
|
|
18199
|
+
size: "icon",
|
|
18049
18200
|
"aria-label": item.pinned ? messages.unpin : messages.pin,
|
|
18050
|
-
className: cn2("
|
|
18201
|
+
className: cn2("size-8 text-muted-foreground opacity-0 group-hover:opacity-100", item.pinned && "text-primary opacity-100"),
|
|
18051
18202
|
onClick: (event) => {
|
|
18052
18203
|
event.stopPropagation();
|
|
18053
18204
|
onIntent?.({ type: "toggle-agent-pin", itemId: item.id, pinned: !item.pinned });
|
|
@@ -18068,11 +18219,11 @@ function AgentWorkbenchSidebar({
|
|
|
18068
18219
|
)) })
|
|
18069
18220
|
] }) : null,
|
|
18070
18221
|
/* @__PURE__ */ jsxs(TabsContent, { value: "sessions", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
|
|
18071
|
-
viewModel.capabilities.createSession ? /* @__PURE__ */ jsxs(
|
|
18222
|
+
viewModel.capabilities.createSession ? /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", className: "h-9 w-full justify-start gap-2 px-3 text-sm", onClick: () => onIntent?.({ type: "create-session" }), children: [
|
|
18072
18223
|
/* @__PURE__ */ jsx(SquarePen, { className: "size-4", "aria-hidden": "true" }),
|
|
18073
18224
|
messages.newSession
|
|
18074
18225
|
] }) : null,
|
|
18075
|
-
!sessionsOnly && viewModel.capabilities.manageCapabilities ? /* @__PURE__ */ jsxs(
|
|
18226
|
+
!sessionsOnly && viewModel.capabilities.manageCapabilities ? /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", className: "mb-3 h-9 w-full justify-start gap-2 px-3 text-sm", onClick: () => onIntent?.({ type: "open-capabilities" }), children: [
|
|
18076
18227
|
/* @__PURE__ */ jsx(Blocks, { className: "size-4", "aria-hidden": "true" }),
|
|
18077
18228
|
messages.capabilities
|
|
18078
18229
|
] }) : null,
|
|
@@ -18089,7 +18240,7 @@ function AgentWorkbenchSidebar({
|
|
|
18089
18240
|
renderSessionItems(items)
|
|
18090
18241
|
] }, id)) }) : !sessionsOnly ? renderSessionItems(sessions) : null
|
|
18091
18242
|
] }),
|
|
18092
|
-
!sessionsOnly && viewModel.capabilities.manageAgentSettings ? /* @__PURE__ */ jsx("div", { className: cn2("shrink-0 border-t border-border p-4", classNames?.footer), children: /* @__PURE__ */ jsxs(
|
|
18243
|
+
!sessionsOnly && viewModel.capabilities.manageAgentSettings ? /* @__PURE__ */ jsx("div", { className: cn2("shrink-0 border-t border-border p-4", classNames?.footer), children: /* @__PURE__ */ jsxs(Button, { type: "button", variant: "ghost", className: "h-10 w-full justify-start gap-2 px-3 text-sm", onClick: () => onIntent?.({ type: "open-agent-settings" }), children: [
|
|
18093
18244
|
/* @__PURE__ */ jsx(Settings, { className: "size-4", "aria-hidden": "true" }),
|
|
18094
18245
|
messages.settings
|
|
18095
18246
|
] }) }) : null
|
|
@@ -18500,10 +18651,11 @@ function AgentWorkbenchActivity({
|
|
|
18500
18651
|
event.payload.requestedAction !== void 0 ? /* @__PURE__ */ jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsx(JsonValue2, { value: event.payload.requestedAction }) }) : null,
|
|
18501
18652
|
requested ? /* @__PURE__ */ jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
18502
18653
|
/* @__PURE__ */ jsx(
|
|
18503
|
-
|
|
18654
|
+
Button,
|
|
18504
18655
|
{
|
|
18505
18656
|
type: "button",
|
|
18506
|
-
|
|
18657
|
+
size: "sm",
|
|
18658
|
+
className: "h-auto px-3 py-1.5 text-sm",
|
|
18507
18659
|
disabled: !onApprovalDecision,
|
|
18508
18660
|
onClick: () => onApprovalDecision?.({
|
|
18509
18661
|
approvalId: event.payload.approvalId,
|
|
@@ -18513,10 +18665,12 @@ function AgentWorkbenchActivity({
|
|
|
18513
18665
|
}
|
|
18514
18666
|
),
|
|
18515
18667
|
/* @__PURE__ */ jsx(
|
|
18516
|
-
|
|
18668
|
+
Button,
|
|
18517
18669
|
{
|
|
18518
18670
|
type: "button",
|
|
18519
|
-
|
|
18671
|
+
variant: "outline",
|
|
18672
|
+
size: "sm",
|
|
18673
|
+
className: "h-auto px-3 py-1.5 text-sm",
|
|
18520
18674
|
disabled: !onApprovalDecision,
|
|
18521
18675
|
onClick: () => onApprovalDecision?.({
|
|
18522
18676
|
approvalId: event.payload.approvalId,
|
|
@@ -18548,10 +18702,12 @@ function AgentWorkbenchActivity({
|
|
|
18548
18702
|
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: messages.artifact[event.payload.status] })
|
|
18549
18703
|
] }),
|
|
18550
18704
|
event.payload.url ? /* @__PURE__ */ jsx(
|
|
18551
|
-
|
|
18705
|
+
Button,
|
|
18552
18706
|
{
|
|
18553
18707
|
type: "button",
|
|
18554
|
-
|
|
18708
|
+
variant: "ghost",
|
|
18709
|
+
size: "icon",
|
|
18710
|
+
className: "text-muted-foreground hover:text-foreground",
|
|
18555
18711
|
"aria-label": messages.artifact.open({
|
|
18556
18712
|
name: event.payload.name
|
|
18557
18713
|
}),
|
|
@@ -18819,20 +18975,23 @@ function SummaryPanel({
|
|
|
18819
18975
|
error ? /* @__PURE__ */ jsx("div", { className: "mt-3 rounded-md border border-destructive/30 bg-destructive/5 p-2.5 text-sm text-destructive-text", role: "alert", children: error.payload.message }) : null,
|
|
18820
18976
|
retryable || canResume ? /* @__PURE__ */ jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
|
|
18821
18977
|
retryable ? /* @__PURE__ */ jsx(
|
|
18822
|
-
|
|
18978
|
+
Button,
|
|
18823
18979
|
{
|
|
18824
18980
|
type: "button",
|
|
18825
|
-
|
|
18981
|
+
variant: "outline",
|
|
18982
|
+
size: "sm",
|
|
18983
|
+
className: "h-auto px-2.5 py-1.5 text-xs",
|
|
18826
18984
|
disabled: !onIntent,
|
|
18827
18985
|
onClick: () => onIntent?.({ type: "retry", eventId: error.eventId }),
|
|
18828
18986
|
children: messages.actions.retry
|
|
18829
18987
|
}
|
|
18830
18988
|
) : null,
|
|
18831
18989
|
canResume ? /* @__PURE__ */ jsx(
|
|
18832
|
-
|
|
18990
|
+
Button,
|
|
18833
18991
|
{
|
|
18834
18992
|
type: "button",
|
|
18835
|
-
|
|
18993
|
+
size: "sm",
|
|
18994
|
+
className: "h-auto px-2.5 py-1.5 text-xs",
|
|
18836
18995
|
disabled: !onIntent,
|
|
18837
18996
|
onClick: () => onIntent?.({ type: "resume", sessionId: model.sessionId }),
|
|
18838
18997
|
children: messages.actions.resume
|
|
@@ -18842,10 +19001,12 @@ function SummaryPanel({
|
|
|
18842
19001
|
] }),
|
|
18843
19002
|
/* @__PURE__ */ jsxs("section", { className: "flex flex-wrap gap-2 rounded-lg border border-border bg-card p-3 text-card-foreground", children: [
|
|
18844
19003
|
canContinueInNewTask ? /* @__PURE__ */ jsxs(
|
|
18845
|
-
|
|
19004
|
+
Button,
|
|
18846
19005
|
{
|
|
18847
19006
|
type: "button",
|
|
18848
|
-
|
|
19007
|
+
variant: "outline",
|
|
19008
|
+
size: "sm",
|
|
19009
|
+
className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
|
|
18849
19010
|
disabled: !onIntent,
|
|
18850
19011
|
onClick: () => onIntent?.({ type: "continue-in-new-task", sessionId: model.sessionId }),
|
|
18851
19012
|
children: [
|
|
@@ -18855,10 +19016,12 @@ function SummaryPanel({
|
|
|
18855
19016
|
}
|
|
18856
19017
|
) : null,
|
|
18857
19018
|
canEditAndRerun ? /* @__PURE__ */ jsxs(
|
|
18858
|
-
|
|
19019
|
+
Button,
|
|
18859
19020
|
{
|
|
18860
19021
|
type: "button",
|
|
18861
|
-
|
|
19022
|
+
variant: "outline",
|
|
19023
|
+
size: "sm",
|
|
19024
|
+
className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
|
|
18862
19025
|
disabled: !onIntent,
|
|
18863
19026
|
onClick: () => onIntent?.({ type: "edit-and-rerun", sessionId: model.sessionId }),
|
|
18864
19027
|
children: [
|
|
@@ -18868,10 +19031,12 @@ function SummaryPanel({
|
|
|
18868
19031
|
}
|
|
18869
19032
|
) : null,
|
|
18870
19033
|
/* @__PURE__ */ jsxs(
|
|
18871
|
-
|
|
19034
|
+
Button,
|
|
18872
19035
|
{
|
|
18873
19036
|
type: "button",
|
|
18874
|
-
|
|
19037
|
+
variant: "outline",
|
|
19038
|
+
size: "sm",
|
|
19039
|
+
className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
|
|
18875
19040
|
disabled: !onIntent,
|
|
18876
19041
|
onClick: () => onIntent?.({ type: "export", sessionId: model.sessionId }),
|
|
18877
19042
|
children: [
|
|
@@ -18885,10 +19050,12 @@ function SummaryPanel({
|
|
|
18885
19050
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
18886
19051
|
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold", children: messages.summary }),
|
|
18887
19052
|
summary?.payload.text ? /* @__PURE__ */ jsx(
|
|
18888
|
-
|
|
19053
|
+
Button,
|
|
18889
19054
|
{
|
|
18890
19055
|
type: "button",
|
|
18891
|
-
|
|
19056
|
+
variant: "ghost",
|
|
19057
|
+
size: "icon",
|
|
19058
|
+
className: "size-8 text-muted-foreground hover:text-foreground",
|
|
18892
19059
|
"aria-label": messages.actions.copySummary,
|
|
18893
19060
|
disabled: !onIntent,
|
|
18894
19061
|
onClick: () => onIntent?.({
|
|
@@ -18903,10 +19070,12 @@ function SummaryPanel({
|
|
|
18903
19070
|
summary?.payload.status === "failed" ? /* @__PURE__ */ jsxs("div", { className: "mt-3 space-y-2", children: [
|
|
18904
19071
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-destructive-text", role: "alert", children: messages.summaryFailed }),
|
|
18905
19072
|
/* @__PURE__ */ jsxs(
|
|
18906
|
-
|
|
19073
|
+
Button,
|
|
18907
19074
|
{
|
|
18908
19075
|
type: "button",
|
|
18909
|
-
|
|
19076
|
+
variant: "outline",
|
|
19077
|
+
size: "sm",
|
|
19078
|
+
className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
|
|
18910
19079
|
disabled: !onIntent,
|
|
18911
19080
|
onClick: () => onIntent?.({ type: "retry-summary", eventId: summary.eventId }),
|
|
18912
19081
|
children: [
|
|
@@ -19043,16 +19212,6 @@ function AgentWorkbenchTaskDetails({
|
|
|
19043
19212
|
{ id: "summary", label: messages.tabs.summary, count: model.summary ? 1 : 0 },
|
|
19044
19213
|
...workspaceAvailable ? [{ id: "workspace", label: messages.tabs.workspace, count: workspaceCount }] : []
|
|
19045
19214
|
];
|
|
19046
|
-
const tabId = (tab) => `agent-workbench-details-${viewModel.sessionId}-${tab}`.replace(
|
|
19047
|
-
/[^a-zA-Z0-9_-]/g,
|
|
19048
|
-
"-"
|
|
19049
|
-
);
|
|
19050
|
-
const onTabKeyDown = (event, index) => {
|
|
19051
|
-
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
|
|
19052
|
-
event.preventDefault();
|
|
19053
|
-
const nextIndex = event.key === "Home" ? 0 : event.key === "End" ? tabs.length - 1 : (index + (event.key === "ArrowRight" ? 1 : -1) + tabs.length) % tabs.length;
|
|
19054
|
-
onActiveTabChange?.(tabs[nextIndex].id);
|
|
19055
|
-
};
|
|
19056
19215
|
return /* @__PURE__ */ jsxs(
|
|
19057
19216
|
"aside",
|
|
19058
19217
|
{
|
|
@@ -19069,54 +19228,71 @@ function AgentWorkbenchTaskDetails({
|
|
|
19069
19228
|
/* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: messages.description })
|
|
19070
19229
|
] }),
|
|
19071
19230
|
onIntent ? /* @__PURE__ */ jsx(
|
|
19072
|
-
|
|
19231
|
+
Button,
|
|
19073
19232
|
{
|
|
19074
19233
|
type: "button",
|
|
19075
|
-
|
|
19234
|
+
variant: "ghost",
|
|
19235
|
+
size: "icon",
|
|
19236
|
+
className: "text-muted-foreground hover:text-foreground",
|
|
19076
19237
|
"aria-label": messages.actions.close,
|
|
19077
19238
|
onClick: () => onIntent({ type: "close" }),
|
|
19078
19239
|
children: /* @__PURE__ */ jsx(X, { className: "size-4", "aria-hidden": "true" })
|
|
19079
19240
|
}
|
|
19080
19241
|
) : null
|
|
19081
19242
|
] }),
|
|
19082
|
-
/* @__PURE__ */
|
|
19083
|
-
|
|
19243
|
+
/* @__PURE__ */ jsxs(
|
|
19244
|
+
Tabs,
|
|
19084
19245
|
{
|
|
19085
|
-
|
|
19086
|
-
|
|
19087
|
-
|
|
19088
|
-
"aria-selected": resolvedTab === tab.id,
|
|
19089
|
-
"aria-controls": `${tabId(tab.id)}-panel`,
|
|
19090
|
-
tabIndex: resolvedTab === tab.id ? 0 : -1,
|
|
19091
|
-
className: cn2(
|
|
19092
|
-
"inline-flex min-w-0 flex-1 items-center justify-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
19093
|
-
resolvedTab === tab.id ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
19094
|
-
),
|
|
19095
|
-
onClick: () => onActiveTabChange?.(tab.id),
|
|
19096
|
-
onKeyDown: (event) => onTabKeyDown(event, index),
|
|
19246
|
+
value: resolvedTab,
|
|
19247
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
19248
|
+
onValueChange: (tab) => onActiveTabChange?.(tab),
|
|
19097
19249
|
children: [
|
|
19098
|
-
/* @__PURE__ */ jsx(
|
|
19099
|
-
|
|
19250
|
+
/* @__PURE__ */ jsx(
|
|
19251
|
+
TabsList,
|
|
19252
|
+
{
|
|
19253
|
+
"aria-label": messages.tabs.label,
|
|
19254
|
+
className: cn2(
|
|
19255
|
+
"flex h-auto shrink-0 gap-1 rounded-none border-b border-border bg-transparent px-3 py-2",
|
|
19256
|
+
classNames?.tabs
|
|
19257
|
+
),
|
|
19258
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxs(
|
|
19259
|
+
TabsTrigger,
|
|
19260
|
+
{
|
|
19261
|
+
value: tab.id,
|
|
19262
|
+
className: "min-w-0 flex-1 gap-1 px-2 py-1.5 text-xs shadow-none data-[state=active]:bg-primary/10 data-[state=active]:text-primary data-[state=active]:shadow-none",
|
|
19263
|
+
children: [
|
|
19264
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: tab.label }),
|
|
19265
|
+
/* @__PURE__ */ jsx(Count, { value: tab.count })
|
|
19266
|
+
]
|
|
19267
|
+
},
|
|
19268
|
+
tab.id
|
|
19269
|
+
))
|
|
19270
|
+
}
|
|
19271
|
+
),
|
|
19272
|
+
/* @__PURE__ */ jsx(
|
|
19273
|
+
TabsContent,
|
|
19274
|
+
{
|
|
19275
|
+
value: "summary",
|
|
19276
|
+
className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto p-3", classNames?.body),
|
|
19277
|
+
children: /* @__PURE__ */ jsx(SummaryPanel, { model, onIntent })
|
|
19278
|
+
}
|
|
19279
|
+
),
|
|
19280
|
+
workspaceAvailable ? /* @__PURE__ */ jsx(
|
|
19281
|
+
TabsContent,
|
|
19282
|
+
{
|
|
19283
|
+
value: "workspace",
|
|
19284
|
+
className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto p-3", classNames?.body),
|
|
19285
|
+
children: /* @__PURE__ */ jsx(
|
|
19286
|
+
WorkspacePanel,
|
|
19287
|
+
{
|
|
19288
|
+
model,
|
|
19289
|
+
sectionClassName: classNames?.section,
|
|
19290
|
+
codeClassName: classNames?.code
|
|
19291
|
+
}
|
|
19292
|
+
)
|
|
19293
|
+
}
|
|
19294
|
+
) : null
|
|
19100
19295
|
]
|
|
19101
|
-
},
|
|
19102
|
-
tab.id
|
|
19103
|
-
)) }),
|
|
19104
|
-
/* @__PURE__ */ jsx(
|
|
19105
|
-
"div",
|
|
19106
|
-
{
|
|
19107
|
-
id: `${tabId(resolvedTab)}-panel`,
|
|
19108
|
-
role: "tabpanel",
|
|
19109
|
-
"aria-labelledby": tabId(resolvedTab),
|
|
19110
|
-
tabIndex: 0,
|
|
19111
|
-
className: cn2("min-h-0 flex-1 overflow-y-auto p-3 outline-none", classNames?.body),
|
|
19112
|
-
children: resolvedTab === "summary" ? /* @__PURE__ */ jsx(SummaryPanel, { model, onIntent }) : /* @__PURE__ */ jsx(
|
|
19113
|
-
WorkspacePanel,
|
|
19114
|
-
{
|
|
19115
|
-
model,
|
|
19116
|
-
sectionClassName: classNames?.section,
|
|
19117
|
-
codeClassName: classNames?.code
|
|
19118
|
-
}
|
|
19119
|
-
)
|
|
19120
19296
|
}
|
|
19121
19297
|
)
|
|
19122
19298
|
]
|
|
@@ -19340,7 +19516,7 @@ function LoginPage({
|
|
|
19340
19516
|
]
|
|
19341
19517
|
}
|
|
19342
19518
|
);
|
|
19343
|
-
return /* @__PURE__ */ jsx(
|
|
19519
|
+
return /* @__PURE__ */ jsx(React4__default.Fragment, { children: method.render ? method.render(button) : button }, method.id);
|
|
19344
19520
|
};
|
|
19345
19521
|
return /* @__PURE__ */ jsxs(
|
|
19346
19522
|
"main",
|