@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.
@@ -1,6 +1,6 @@
1
1
  import { ChevronDown, Check, ChevronRight, Circle, ChevronUp, ArrowUp, ArrowDown, Pencil, Trash2, Image, File, X, Paperclip, Mic, Send, Square, ShoppingBag, Code2, FileText, Search, Palette, Sparkles, ArrowLeft, Upload, ArrowUpRight, Plus, Pin, SquarePen, Blocks, MessageSquare, Bot, Settings, TerminalSquare, Clock3, FileOutput, Download, Loader2, CircleAlert, ListFilter, Link2, ExternalLink, PanelRightClose, Wrench, BookOpen, RefreshCw, CheckCircle2, XCircle, CircleStop, AlertCircle, GitFork, PencilLine, Copy, RotateCcw, FileCode2, Files, TestTube2, Globe2, Film, Presentation, FileImage, Music2, Ellipsis } from 'lucide-react';
2
- import * as React2 from 'react';
3
- import { createContext, useRef, useState, useMemo, useEffect, useContext } from 'react';
2
+ import * as React5 from 'react';
3
+ import { useImperativeHandle, createContext, useRef, useState, useMemo, useEffect, useContext } from 'react';
4
4
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -370,7 +370,118 @@ function cn(...parts) {
370
370
  function cn2(...inputs) {
371
371
  return inputs.filter(Boolean).join(" ");
372
372
  }
373
- var AccordionItem = React2.forwardRef(({ className, style, ...props }, ref) => /* @__PURE__ */ jsx(
373
+ var useAutosizeTextArea = ({
374
+ textAreaRef,
375
+ triggerAutoSize,
376
+ maxHeight = Number.MAX_SAFE_INTEGER,
377
+ minHeight = 0
378
+ }) => {
379
+ const [init, setInit] = React5.useState(true);
380
+ React5.useEffect(() => {
381
+ const offsetBorder = 2;
382
+ if (textAreaRef) {
383
+ if (init) {
384
+ textAreaRef.style.minHeight = `${minHeight + offsetBorder}px`;
385
+ if (maxHeight > minHeight) {
386
+ textAreaRef.style.maxHeight = `${maxHeight}px`;
387
+ }
388
+ setInit(false);
389
+ }
390
+ textAreaRef.style.height = `${minHeight + offsetBorder}px`;
391
+ const scrollHeight = textAreaRef.scrollHeight;
392
+ if (scrollHeight > maxHeight) {
393
+ textAreaRef.style.height = `${maxHeight}px`;
394
+ } else {
395
+ textAreaRef.style.height = `${scrollHeight + offsetBorder}px`;
396
+ }
397
+ }
398
+ }, [textAreaRef, triggerAutoSize]);
399
+ };
400
+ var AutosizeTextarea = React5.forwardRef(
401
+ ({
402
+ maxHeight = Number.MAX_SAFE_INTEGER,
403
+ minHeight = 52,
404
+ className,
405
+ onChange,
406
+ value,
407
+ onKeyDown,
408
+ onSubmit,
409
+ onCompositionStart: propsOnCompositionStart,
410
+ onCompositionEnd: propsOnCompositionEnd,
411
+ ...props
412
+ }, ref) => {
413
+ const textAreaRef = React5.useRef(null);
414
+ const [triggerAutoSize, setTriggerAutoSize] = React5.useState("");
415
+ const [isComposing, setIsComposing] = React5.useState(false);
416
+ const [compositionValue, setCompositionValue] = React5.useState("");
417
+ useAutosizeTextArea({
418
+ textAreaRef: textAreaRef.current,
419
+ triggerAutoSize,
420
+ maxHeight,
421
+ minHeight
422
+ });
423
+ useImperativeHandle(ref, () => ({
424
+ textArea: textAreaRef.current,
425
+ focus: () => textAreaRef.current?.focus(),
426
+ maxHeight,
427
+ minHeight
428
+ }));
429
+ React5.useEffect(() => {
430
+ setTriggerAutoSize(value);
431
+ }, [props?.defaultValue, value]);
432
+ const handleKeyDown = React5.useCallback((e) => {
433
+ if (e.key === "ArrowUp" && triggerAutoSize.length <= 0 && !(e.metaKey || e.altKey || e.ctrlKey)) {
434
+ e.preventDefault();
435
+ return;
436
+ }
437
+ if (onSubmit) {
438
+ const shouldSubmit = e.key === "Enter" && e.keyCode !== 229 && !e.nativeEvent.isComposing && !isComposing && !e.altKey && !e.ctrlKey && !e.shiftKey && !e.metaKey;
439
+ if (shouldSubmit) {
440
+ e.preventDefault();
441
+ onSubmit(e);
442
+ }
443
+ }
444
+ onKeyDown?.(e);
445
+ }, [isComposing, onKeyDown, onSubmit, triggerAutoSize.length]);
446
+ return /* @__PURE__ */ jsx(
447
+ "textarea",
448
+ {
449
+ ...props,
450
+ onKeyDown: handleKeyDown,
451
+ value: typeof value !== "undefined" ? isComposing ? compositionValue : value ?? "" : void 0,
452
+ ref: textAreaRef,
453
+ className: cn(
454
+ "flex w-full resize-y rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background 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",
455
+ className
456
+ ),
457
+ onCompositionStart: (e) => {
458
+ setIsComposing(true);
459
+ setCompositionValue(e.currentTarget.value);
460
+ propsOnCompositionStart?.(e);
461
+ },
462
+ onCompositionEnd: (e) => {
463
+ setIsComposing(false);
464
+ const finalValue = e.currentTarget.value;
465
+ setCompositionValue(finalValue);
466
+ setTriggerAutoSize(finalValue);
467
+ onChange?.(e);
468
+ propsOnCompositionEnd?.(e);
469
+ },
470
+ onChange: (e) => {
471
+ if (e.nativeEvent.isComposing) {
472
+ setCompositionValue(e.target.value);
473
+ setTriggerAutoSize(e.target.value);
474
+ return;
475
+ }
476
+ setTriggerAutoSize(e.target.value);
477
+ onChange?.(e);
478
+ }
479
+ }
480
+ );
481
+ }
482
+ );
483
+ AutosizeTextarea.displayName = "AutosizeTextarea";
484
+ var AccordionItem = React5.forwardRef(({ className, style, ...props }, ref) => /* @__PURE__ */ jsx(
374
485
  AccordionPrimitive.Item,
375
486
  {
376
487
  ref,
@@ -383,7 +494,7 @@ var AccordionItem = React2.forwardRef(({ className, style, ...props }, ref) => /
383
494
  }
384
495
  ));
385
496
  AccordionItem.displayName = "AccordionItem";
386
- var AccordionTrigger = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
497
+ var AccordionTrigger = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
387
498
  AccordionPrimitive.Trigger,
388
499
  {
389
500
  ref,
@@ -405,7 +516,7 @@ var AccordionTrigger = React2.forwardRef(({ className, children, ...props }, ref
405
516
  }
406
517
  ) }));
407
518
  AccordionTrigger.displayName = "AccordionTrigger";
408
- var AccordionContent = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
519
+ var AccordionContent = React5.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
409
520
  AccordionPrimitive.Content,
410
521
  {
411
522
  ref,
@@ -415,7 +526,7 @@ var AccordionContent = React2.forwardRef(({ className, children, ...props }, ref
415
526
  }
416
527
  ));
417
528
  AccordionContent.displayName = "AccordionContent";
418
- var Checkbox = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
529
+ var Checkbox = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
419
530
  CheckboxPrimitive.Root,
420
531
  {
421
532
  ref,
@@ -450,7 +561,7 @@ var buttonVariants = cva(
450
561
  defaultVariants: { variant: "default", size: "default" }
451
562
  }
452
563
  );
453
- var Button = React2.forwardRef(
564
+ var Button = React5.forwardRef(
454
565
  ({ className, variant, size, asChild = false, ...props }, ref) => {
455
566
  const Component = asChild ? Slot : "button";
456
567
  return /* @__PURE__ */ jsx(
@@ -464,7 +575,7 @@ var Button = React2.forwardRef(
464
575
  }
465
576
  );
466
577
  Button.displayName = "Button";
467
- var PopoverContent = React2.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx(
578
+ var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx(
468
579
  PopoverPrimitive2.Content,
469
580
  {
470
581
  ref,
@@ -478,7 +589,7 @@ var PopoverContent = React2.forwardRef(({ className, align = "center", sideOffse
478
589
  }
479
590
  ) }));
480
591
  PopoverContent.displayName = "PopoverContent";
481
- var ScrollArea = React2.forwardRef(
592
+ var ScrollArea = React5.forwardRef(
482
593
  ({
483
594
  className,
484
595
  children,
@@ -522,7 +633,7 @@ var ScrollArea = React2.forwardRef(
522
633
  )
523
634
  );
524
635
  ScrollArea.displayName = "ScrollArea";
525
- var ScrollBar = React2.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
636
+ var ScrollBar = React5.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
526
637
  ScrollAreaPrimitive.ScrollAreaScrollbar,
527
638
  {
528
639
  ref,
@@ -538,7 +649,7 @@ var ScrollBar = React2.forwardRef(({ className, orientation = "vertical", ...pro
538
649
  }
539
650
  ));
540
651
  ScrollBar.displayName = "ScrollBar";
541
- var Switch = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
652
+ var Switch = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
542
653
  SwitchPrimitive.Root,
543
654
  {
544
655
  ref,
@@ -551,9 +662,9 @@ var Switch = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
551
662
  }
552
663
  ));
553
664
  Switch.displayName = "Switch";
554
- var Tabs = React2.forwardRef(({ variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Root, { ref, "data-variant": variant, ...props }));
665
+ var Tabs = React5.forwardRef(({ variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(TabsPrimitive.Root, { ref, "data-variant": variant, ...props }));
555
666
  Tabs.displayName = "Tabs";
556
- var TabsList = React2.forwardRef(({ className, gap, style, ...props }, ref) => /* @__PURE__ */ jsx(
667
+ var TabsList = React5.forwardRef(({ className, gap, style, ...props }, ref) => /* @__PURE__ */ jsx(
557
668
  TabsPrimitive.List,
558
669
  {
559
670
  ref,
@@ -566,7 +677,7 @@ var TabsList = React2.forwardRef(({ className, gap, style, ...props }, ref) => /
566
677
  }
567
678
  ));
568
679
  TabsList.displayName = "TabsList";
569
- var TabsTrigger = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
680
+ var TabsTrigger = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
570
681
  TabsPrimitive.Trigger,
571
682
  {
572
683
  ref,
@@ -578,7 +689,7 @@ var TabsTrigger = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
578
689
  }
579
690
  ));
580
691
  TabsTrigger.displayName = "TabsTrigger";
581
- var TabsContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
692
+ var TabsContent = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
582
693
  TabsPrimitive.Content,
583
694
  {
584
695
  ref,
@@ -590,7 +701,7 @@ var TabsContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
590
701
  }
591
702
  ));
592
703
  TabsContent.displayName = "TabsContent";
593
- var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
704
+ var TooltipContent = React5.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
594
705
  TooltipPrimitive.Content,
595
706
  {
596
707
  ref,
@@ -603,67 +714,215 @@ var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, ...props },
603
714
  }
604
715
  ) }));
605
716
  TooltipContent.displayName = "TooltipContent";
717
+ var Input = React5.forwardRef(({ className, appearance = "standard", type, ...props }, ref) => /* @__PURE__ */ jsx(
718
+ "input",
719
+ {
720
+ ref,
721
+ type,
722
+ className: cn(
723
+ "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",
724
+ appearance === "compact" ? "h-9 rounded-md py-1 text-sm shadow-sm" : "h-10 rounded-md py-2 text-sm shadow-sm",
725
+ appearance === "shadow" && "rounded-lg shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",
726
+ className
727
+ ),
728
+ ...props
729
+ }
730
+ ));
731
+ Input.displayName = "Input";
732
+ var Textarea = React5.forwardRef(({ className, appearance = "standard", ...props }, ref) => /* @__PURE__ */ jsx(
733
+ "textarea",
734
+ {
735
+ ref,
736
+ className: cn(
737
+ "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",
738
+ appearance === "compact" ? "min-h-[60px] rounded-md text-sm shadow-sm" : "min-h-[80px] rounded-md text-sm",
739
+ appearance === "shadow" && "shadow-sm shadow-black/[0.02] dark:border-white/10 dark:bg-white/[0.04] dark:shadow-none",
740
+ className
741
+ ),
742
+ ...props
743
+ }
744
+ ));
745
+ Textarea.displayName = "Textarea";
746
+ function InputGroup({ className, ...props }) {
747
+ return /* @__PURE__ */ jsx(
748
+ "div",
749
+ {
750
+ "data-slot": "input-group",
751
+ role: "group",
752
+ className: cn(
753
+ "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",
754
+ "h-9 has-[>textarea]:h-auto",
755
+ // Variants based on alignment.
756
+ "has-[>[data-align=inline-start]]:[&>input]:pl-2",
757
+ "has-[>[data-align=inline-end]]:[&>input]:pr-2",
758
+ "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
759
+ "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
760
+ // Focus state.
761
+ "has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-ring",
762
+ // Error state.
763
+ "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",
764
+ className
765
+ ),
766
+ ...props
767
+ }
768
+ );
769
+ }
770
+ var inputGroupAddonVariants = cva(
771
+ "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",
772
+ {
773
+ variants: {
774
+ align: {
775
+ "inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
776
+ "inline-end": "order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]",
777
+ "block-start": "[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5",
778
+ "block-end": "[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5"
779
+ }
780
+ },
781
+ defaultVariants: {
782
+ align: "inline-start"
783
+ }
784
+ }
785
+ );
786
+ function InputGroupAddon({
787
+ className,
788
+ align = "inline-start",
789
+ ...props
790
+ }) {
791
+ return /* @__PURE__ */ jsx(
792
+ "div",
793
+ {
794
+ role: "group",
795
+ "data-slot": "input-group-addon",
796
+ "data-align": align,
797
+ className: cn(inputGroupAddonVariants({ align }), className),
798
+ onClick: (e) => {
799
+ if (e.target.closest("button")) {
800
+ return;
801
+ }
802
+ e.currentTarget.parentElement?.querySelector("input")?.focus();
803
+ },
804
+ ...props
805
+ }
806
+ );
807
+ }
808
+ var inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
809
+ variants: {
810
+ size: {
811
+ xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
812
+ sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
813
+ "icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
814
+ "icon-sm": "size-8 p-0 has-[>svg]:p-0"
815
+ }
816
+ },
817
+ defaultVariants: {
818
+ size: "xs"
819
+ }
820
+ });
821
+ function InputGroupButton({
822
+ className,
823
+ type = "button",
824
+ variant = "ghost",
825
+ size = "xs",
826
+ ...props
827
+ }) {
828
+ return /* @__PURE__ */ jsx(
829
+ Button,
830
+ {
831
+ type,
832
+ "data-size": size,
833
+ variant,
834
+ className: cn(inputGroupButtonVariants({ size }), className),
835
+ ...props
836
+ }
837
+ );
838
+ }
839
+ var InputGroupInput = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
840
+ Input,
841
+ {
842
+ ref,
843
+ "data-slot": "input-group-control",
844
+ className: cn(
845
+ "flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",
846
+ className
847
+ ),
848
+ ...props
849
+ }
850
+ ));
851
+ InputGroupInput.displayName = "InputGroupInput";
852
+ var InputGroupTextarea = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
853
+ Textarea,
854
+ {
855
+ ref,
856
+ "data-slot": "input-group-control",
857
+ className: cn(
858
+ "flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
859
+ className
860
+ ),
861
+ ...props
862
+ }
863
+ ));
864
+ InputGroupTextarea.displayName = "InputGroupTextarea";
606
865
  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";
607
866
  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";
608
867
  var DropdownMenu2 = DropdownMenuPrimitive.Root;
609
868
  var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
610
- var DropdownMenuSubTrigger = React2.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, { ref, className: cn(menuItemClassName, "data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [
869
+ var DropdownMenuSubTrigger = React5.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, { ref, className: cn(menuItemClassName, "data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [
611
870
  children,
612
871
  /* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": "true", className: "ml-auto" })
613
872
  ] }));
614
873
  DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
615
- var DropdownMenuSubContent = React2.forwardRef(
874
+ var DropdownMenuSubContent = React5.forwardRef(
616
875
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, { ref, className: cn(menuContentClassName, className), ...props })
617
876
  );
618
877
  DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
619
- var DropdownMenuContent = React2.forwardRef(
878
+ var DropdownMenuContent = React5.forwardRef(
620
879
  ({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, { ref, sideOffset, className: cn(menuContentClassName, className), ...props }) })
621
880
  );
622
881
  DropdownMenuContent.displayName = "DropdownMenuContent";
623
- var DropdownMenuItem = React2.forwardRef(
882
+ var DropdownMenuItem = React5.forwardRef(
624
883
  ({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, { ref, className: cn(menuItemClassName, inset && "pl-8", className), ...props })
625
884
  );
626
885
  DropdownMenuItem.displayName = "DropdownMenuItem";
627
- var DropdownMenuCheckboxItem = React2.forwardRef(
886
+ var DropdownMenuCheckboxItem = React5.forwardRef(
628
887
  ({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, { ref, className: cn(menuItemClassName, "pl-8", className), checked, ...props, children: [
629
888
  /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { "aria-hidden": "true", className: "h-4 w-4" }) }) }),
630
889
  children
631
890
  ] })
632
891
  );
633
892
  DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
634
- var DropdownMenuRadioItem = React2.forwardRef(
893
+ var DropdownMenuRadioItem = React5.forwardRef(
635
894
  ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, { ref, className: cn(menuItemClassName, "pl-8", className), ...props, children: [
636
895
  /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, { "aria-hidden": "true", className: "h-2 w-2 fill-current" }) }) }),
637
896
  children
638
897
  ] })
639
898
  );
640
899
  DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
641
- var DropdownMenuLabel = React2.forwardRef(
900
+ var DropdownMenuLabel = React5.forwardRef(
642
901
  ({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, { ref, className: cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className), ...props })
643
902
  );
644
903
  DropdownMenuLabel.displayName = "DropdownMenuLabel";
645
- var DropdownMenuSeparator = React2.forwardRef(
904
+ var DropdownMenuSeparator = React5.forwardRef(
646
905
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })
647
906
  );
648
907
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
649
908
  var Select = SelectPrimitive.Root;
650
909
  var SelectValue = SelectPrimitive.Value;
651
- var SelectTrigger = React2.forwardRef(
652
- ({ 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: [
910
+ var SelectTrigger = React5.forwardRef(
911
+ ({ 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: [
653
912
  children,
654
913
  /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { "aria-hidden": "true", className: cn("h-4 w-4 opacity-50", iconClassName) }) })
655
914
  ] })
656
915
  );
657
916
  SelectTrigger.displayName = "SelectTrigger";
658
- var SelectScrollUpButton = React2.forwardRef(
917
+ var SelectScrollUpButton = React5.forwardRef(
659
918
  ({ 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" }) })
660
919
  );
661
920
  SelectScrollUpButton.displayName = "SelectScrollUpButton";
662
- var SelectScrollDownButton = React2.forwardRef(
921
+ var SelectScrollDownButton = React5.forwardRef(
663
922
  ({ 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" }) })
664
923
  );
665
924
  SelectScrollDownButton.displayName = "SelectScrollDownButton";
666
- var SelectContent = React2.forwardRef(
925
+ var SelectContent = React5.forwardRef(
667
926
  ({ 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: [
668
927
  /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
669
928
  /* @__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 }),
@@ -671,11 +930,11 @@ var SelectContent = React2.forwardRef(
671
930
  ] }) })
672
931
  );
673
932
  SelectContent.displayName = "SelectContent";
674
- var SelectLabel = React2.forwardRef(
933
+ var SelectLabel = React5.forwardRef(
675
934
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Label, { ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), ...props })
676
935
  );
677
936
  SelectLabel.displayName = "SelectLabel";
678
- var SelectItem = React2.forwardRef(
937
+ var SelectItem = React5.forwardRef(
679
938
  ({ 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: [
680
939
  !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,
681
940
  itemText ? /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -685,7 +944,7 @@ var SelectItem = React2.forwardRef(
685
944
  ] })
686
945
  );
687
946
  SelectItem.displayName = "SelectItem";
688
- var SelectSeparator = React2.forwardRef(
947
+ var SelectSeparator = React5.forwardRef(
689
948
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Separator, { ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })
690
949
  );
691
950
  SelectSeparator.displayName = "SelectSeparator";
@@ -770,12 +1029,13 @@ function AgentWorkbenchComposer({
770
1029
  children: /* @__PURE__ */ jsx("ol", { className: "space-y-1.5", children: viewModel.queuedDrafts.map((draft, index) => /* @__PURE__ */ jsxs("li", { className: "flex min-h-9 min-w-0 max-w-full items-center gap-2 overflow-hidden rounded-md bg-background px-2 py-1.5 text-sm", children: [
771
1030
  /* @__PURE__ */ jsx("span", { className: "w-5 shrink-0 text-center text-xs text-muted-foreground", children: index + 1 }),
772
1031
  editingDraftId === draft.id ? /* @__PURE__ */ jsx(
773
- "input",
1032
+ Input,
774
1033
  {
775
1034
  autoFocus: true,
776
1035
  value: editingText,
777
1036
  "aria-label": messages.composer.editQueued,
778
- className: "min-w-0 flex-1 rounded border border-input bg-background px-2 py-1 outline-none focus-visible:ring-2 focus-visible:ring-ring",
1037
+ appearance: "compact",
1038
+ className: "h-8 min-w-0 flex-1 px-2 py-1",
779
1039
  onChange: (event) => setEditingText(event.target.value),
780
1040
  onBlur: () => {
781
1041
  if (editingText.trim()) onIntent?.({ type: "edit-queued-draft", draftId: draft.id, text: editingText });
@@ -813,7 +1073,7 @@ function AgentWorkbenchComposer({
813
1073
  type: "button",
814
1074
  variant: "secondary",
815
1075
  size: "icon",
816
- className: "absolute right-1 top-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground shadow",
1076
+ className: "absolute right-1 top-1 !size-5 min-w-5 rounded-full bg-background/90 p-0 text-foreground shadow [&_svg]:!size-3",
817
1077
  "aria-label": messages.composer.removeAttachment,
818
1078
  onClick: () => onIntent?.({ type: "remove-attachment", attachmentId: attachment.id }),
819
1079
  children: /* @__PURE__ */ jsx(X, { className: "size-3" })
@@ -822,13 +1082,14 @@ function AgentWorkbenchComposer({
822
1082
  /* @__PURE__ */ jsx("span", { className: "absolute inset-x-0 bottom-0 truncate bg-background/85 px-1 py-0.5 text-[9px]", children: attachment.name })
823
1083
  ] }, attachment.id)) }) : null,
824
1084
  /* @__PURE__ */ jsx(
825
- "textarea",
1085
+ AutosizeTextarea,
826
1086
  {
827
1087
  value: viewModel.value,
828
- rows: 2,
1088
+ minHeight: 54,
1089
+ maxHeight: 256,
829
1090
  "aria-label": messages.composer.message,
830
1091
  placeholder: viewModel.placeholder,
831
- className: cn2("max-h-64 min-h-14 min-w-0 w-full resize-none border-0 bg-transparent text-sm leading-relaxed text-foreground outline-none placeholder:text-muted-foreground", classNames?.textarea),
1092
+ className: cn2("min-w-0 w-full resize-none rounded-none border-0 bg-transparent px-0 py-0 text-sm leading-relaxed text-foreground shadow-none focus-visible:ring-0 focus-visible:ring-offset-0", classNames?.textarea),
832
1093
  onChange: (event) => onIntent?.({ type: "change-value", value: event.target.value }),
833
1094
  onKeyDown: (event) => {
834
1095
  if (event.key === "Enter" && !event.shiftKey && !event.nativeEvent.isComposing) {
@@ -862,28 +1123,30 @@ function AgentWorkbenchComposer({
862
1123
  messages.composer.webSearch,
863
1124
  /* @__PURE__ */ jsx(Switch, { checked: viewModel.webSearchEnabled, onCheckedChange: (enabled) => onIntent?.({ type: "toggle-web-search", enabled }) })
864
1125
  ] }) : null,
865
- modeSelectionEnabled ? /* @__PURE__ */ jsx(
866
- "div",
1126
+ modeSelectionEnabled ? /* @__PURE__ */ jsxs(
1127
+ Tabs,
867
1128
  {
868
- className: "flex h-8 shrink-0 items-center rounded-md border border-border bg-muted p-0.5",
869
- role: "group",
870
- "aria-label": messages.composer.chatMode,
871
- children: ["chat", "work"].map((mode) => /* @__PURE__ */ jsx(
872
- Button,
873
- {
874
- type: "button",
875
- variant: "ghost",
876
- size: "sm",
877
- "aria-pressed": viewModel.mode === mode,
878
- className: cn2(
879
- "h-7 rounded px-2.5 text-xs font-medium shadow-none",
880
- viewModel.mode === mode ? "bg-background text-foreground shadow-sm" : "text-foreground/75 hover:text-foreground"
881
- ),
882
- onClick: () => onIntent?.({ type: "change-mode", mode }),
883
- children: messages.modes[mode]
884
- },
885
- mode
886
- ))
1129
+ value: viewModel.mode,
1130
+ onValueChange: (mode) => onIntent?.({ type: "change-mode", mode }),
1131
+ children: [
1132
+ /* @__PURE__ */ jsx(
1133
+ TabsList,
1134
+ {
1135
+ "aria-label": messages.composer.chatMode,
1136
+ className: "h-8 shrink-0 gap-0.5 rounded-md bg-muted/60 p-0.5",
1137
+ children: ["chat", "work"].map((mode) => /* @__PURE__ */ jsx(
1138
+ TabsTrigger,
1139
+ {
1140
+ value: mode,
1141
+ className: "h-7 min-w-0 px-2.5 text-xs text-foreground/75 shadow-none hover:text-foreground data-[state=active]:bg-primary/10 data-[state=active]:text-primary data-[state=active]:shadow-none",
1142
+ children: messages.modes[mode]
1143
+ },
1144
+ mode
1145
+ ))
1146
+ }
1147
+ ),
1148
+ ["chat", "work"].map((mode) => /* @__PURE__ */ jsx(TabsContent, { value: mode, className: "hidden" }, mode))
1149
+ ]
887
1150
  }
888
1151
  ) : null,
889
1152
  viewModel.capabilities.modelSelection ? /* @__PURE__ */ jsx(
@@ -1183,7 +1446,7 @@ function CollectionState({
1183
1446
  if (status === "error") {
1184
1447
  return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 px-3 py-8 text-center", children: [
1185
1448
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", role: "alert", children: error }),
1186
- /* @__PURE__ */ jsxs("button", { type: "button", className: "inline-flex items-center gap-1.5 text-sm font-medium text-primary", onClick: onRetry, children: [
1449
+ /* @__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: [
1187
1450
  /* @__PURE__ */ jsx(RefreshCw, { className: "size-3.5", "aria-hidden": "true" }),
1188
1451
  messages.retry
1189
1452
  ] })
@@ -1215,7 +1478,7 @@ function SessionActions({
1215
1478
  const messages = useMonkeysLocaleMessages().agentWorkbench.navigation;
1216
1479
  if (!capabilities.renameSessions && !capabilities.deleteSessions) return null;
1217
1480
  return /* @__PURE__ */ jsxs(DropdownMenu2, { children: [
1218
- /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { type: "button", className: "flex size-8 items-center justify-center rounded-md hover:bg-muted", "aria-label": messages.actions, children: /* @__PURE__ */ jsx(Ellipsis, { className: "size-4", "aria-hidden": "true" }) }) }),
1481
+ /* @__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" }) }) }),
1219
1482
  /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
1220
1483
  capabilities.renameSessions ? /* @__PURE__ */ jsxs(DropdownMenuItem, { onSelect: () => onIntent?.({ type: "rename-session", sessionId: item.id, title: item.title }), children: [
1221
1484
  /* @__PURE__ */ jsx(Pencil, { className: "mr-2 size-4", "aria-hidden": "true" }),
@@ -1291,12 +1554,13 @@ function AgentWorkbenchSidebar({
1291
1554
  /* @__PURE__ */ jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted", children: /* @__PURE__ */ jsx(SessionAvatar, { item }) }),
1292
1555
  /* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
1293
1556
  /* @__PURE__ */ jsx(
1294
- "input",
1557
+ Input,
1295
1558
  {
1296
1559
  ref: renameInputRef,
1297
1560
  value: editingTitle,
1298
1561
  "aria-label": messages.rename,
1299
- className: "h-6 w-full rounded border border-primary bg-background px-1.5 text-sm font-medium outline-none",
1562
+ appearance: "compact",
1563
+ className: "h-6 w-full border-primary px-1.5 text-sm font-medium",
1300
1564
  onChange: (event) => setEditingTitle(event.target.value),
1301
1565
  onClick: (event) => event.stopPropagation(),
1302
1566
  onBlur: () => saveRenameSession(item),
@@ -1326,7 +1590,7 @@ function AgentWorkbenchSidebar({
1326
1590
  percent,
1327
1591
  "%"
1328
1592
  ] }) : /* @__PURE__ */ jsx(StatusIndicator, { status: item.status }),
1329
- viewModel.capabilities.pinSessions ? /* @__PURE__ */ jsx("button", { type: "button", "aria-label": item.pinned ? messages.unpin : messages.pin, className: cn2("flex size-8 items-center justify-center rounded-md text-muted-foreground opacity-0 hover:bg-muted group-hover:opacity-100", item.pinned && "text-primary opacity-100"), onClick: (event) => {
1593
+ 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) => {
1330
1594
  event.stopPropagation();
1331
1595
  onIntent?.({ type: "toggle-session-pin", sessionId: item.id, pinned: !item.pinned });
1332
1596
  }, children: /* @__PURE__ */ jsx(Pin, { className: cn2("size-4", item.pinned && "fill-current") }) }) : null,
@@ -1344,17 +1608,17 @@ function AgentWorkbenchSidebar({
1344
1608
  className: "flex h-full min-h-0 flex-col bg-background text-foreground",
1345
1609
  children: [
1346
1610
  /* @__PURE__ */ jsxs("div", { className: "shrink-0 space-y-3 p-4 pb-2", children: [
1347
- /* @__PURE__ */ jsxs("div", { className: cn2("flex h-10 items-center gap-2 rounded-lg border border-border bg-card px-3 focus-within:ring-2 focus-within:ring-ring", classNames?.search), children: [
1348
- /* @__PURE__ */ jsx(Search, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" }),
1611
+ /* @__PURE__ */ jsxs(InputGroup, { className: cn2("h-10 rounded-lg bg-card", classNames?.search), children: [
1612
+ /* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(Search, { className: "size-4", "aria-hidden": "true" }) }),
1349
1613
  /* @__PURE__ */ jsx(
1350
- "input",
1614
+ InputGroupInput,
1351
1615
  {
1352
1616
  ref: searchRef,
1353
1617
  type: "search",
1354
1618
  value: viewModel.searchQuery,
1355
1619
  "aria-label": sessionsOnly ? messages.searchSessions : messages.search,
1356
1620
  placeholder: sessionsOnly ? messages.searchSessions : messages.search,
1357
- className: "min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:hidden",
1621
+ className: "min-w-0 [&::-webkit-search-cancel-button]:hidden",
1358
1622
  onChange: (event) => onIntent?.({ type: "change-search", query: event.target.value }),
1359
1623
  onKeyDown: (event) => {
1360
1624
  if (event.key !== "Escape") return;
@@ -1363,7 +1627,7 @@ function AgentWorkbenchSidebar({
1363
1627
  }
1364
1628
  }
1365
1629
  ),
1366
- viewModel.searchQuery ? /* @__PURE__ */ jsx("button", { type: "button", className: "flex size-6 items-center justify-center rounded-md hover:bg-muted", "aria-label": messages.clearSearch, onClick: () => onIntent?.({ type: "change-search", query: "" }), children: /* @__PURE__ */ jsx(X, { className: "size-3.5", "aria-hidden": "true" }) }) : /* @__PURE__ */ jsx("kbd", { className: "rounded border border-border px-1.5 py-0.5 text-[10px] text-muted-foreground", children: "Ctrl K" })
1630
+ 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" }) })
1367
1631
  ] }),
1368
1632
  !sessionsOnly || headerActions ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
1369
1633
  !sessionsOnly ? /* @__PURE__ */ jsxs(TabsList, { className: cn2("grid min-w-0 flex-1 grid-cols-2 text-foreground", classNames?.tabs), "aria-label": messages.tabsLabel, children: [
@@ -1374,7 +1638,7 @@ function AgentWorkbenchSidebar({
1374
1638
  ] }) : null
1375
1639
  ] }),
1376
1640
  !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: [
1377
- viewModel.capabilities.createAgent ? /* @__PURE__ */ jsxs("button", { type: "button", className: "mb-3 flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "create-agent" }), children: [
1641
+ 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: [
1378
1642
  /* @__PURE__ */ jsx(Plus, { className: "size-4", "aria-hidden": "true" }),
1379
1643
  messages.newAgent
1380
1644
  ] }) : null,
@@ -1395,11 +1659,13 @@ function AgentWorkbenchSidebar({
1395
1659
  ] }),
1396
1660
  item.builtIn ? /* @__PURE__ */ jsx("span", { className: "rounded-full bg-muted px-1.5 py-1 text-[10px] text-foreground", children: messages.builtIn }) : null,
1397
1661
  viewModel.capabilities.pinAgents ? /* @__PURE__ */ jsx(
1398
- "button",
1662
+ Button,
1399
1663
  {
1400
1664
  type: "button",
1665
+ variant: "ghost",
1666
+ size: "icon",
1401
1667
  "aria-label": item.pinned ? messages.unpin : messages.pin,
1402
- className: cn2("flex size-8 items-center justify-center rounded-md text-muted-foreground opacity-0 hover:bg-muted group-hover:opacity-100", item.pinned && "text-primary opacity-100"),
1668
+ className: cn2("size-8 text-muted-foreground opacity-0 group-hover:opacity-100", item.pinned && "text-primary opacity-100"),
1403
1669
  onClick: (event) => {
1404
1670
  event.stopPropagation();
1405
1671
  onIntent?.({ type: "toggle-agent-pin", itemId: item.id, pinned: !item.pinned });
@@ -1420,11 +1686,11 @@ function AgentWorkbenchSidebar({
1420
1686
  )) })
1421
1687
  ] }) : null,
1422
1688
  /* @__PURE__ */ jsxs(TabsContent, { value: "sessions", className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto px-4 pb-4", classNames?.body), children: [
1423
- viewModel.capabilities.createSession ? /* @__PURE__ */ jsxs("button", { type: "button", className: "flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "create-session" }), children: [
1689
+ 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: [
1424
1690
  /* @__PURE__ */ jsx(SquarePen, { className: "size-4", "aria-hidden": "true" }),
1425
1691
  messages.newSession
1426
1692
  ] }) : null,
1427
- !sessionsOnly && viewModel.capabilities.manageCapabilities ? /* @__PURE__ */ jsxs("button", { type: "button", className: "mb-3 flex h-9 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "open-capabilities" }), children: [
1693
+ !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: [
1428
1694
  /* @__PURE__ */ jsx(Blocks, { className: "size-4", "aria-hidden": "true" }),
1429
1695
  messages.capabilities
1430
1696
  ] }) : null,
@@ -1441,7 +1707,7 @@ function AgentWorkbenchSidebar({
1441
1707
  renderSessionItems(items)
1442
1708
  ] }, id)) }) : !sessionsOnly ? renderSessionItems(sessions) : null
1443
1709
  ] }),
1444
- !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", className: "flex h-10 w-full items-center gap-2 rounded-md px-3 text-left text-sm font-medium hover:bg-muted", onClick: () => onIntent?.({ type: "open-agent-settings" }), children: [
1710
+ !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: [
1445
1711
  /* @__PURE__ */ jsx(Settings, { className: "size-4", "aria-hidden": "true" }),
1446
1712
  messages.settings
1447
1713
  ] }) }) : null
@@ -1852,10 +2118,11 @@ function AgentWorkbenchActivity({
1852
2118
  event.payload.requestedAction !== void 0 ? /* @__PURE__ */ jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsx(JsonValue2, { value: event.payload.requestedAction }) }) : null,
1853
2119
  requested ? /* @__PURE__ */ jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
1854
2120
  /* @__PURE__ */ jsx(
1855
- "button",
2121
+ Button,
1856
2122
  {
1857
2123
  type: "button",
1858
- className: "rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground outline-none hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2124
+ size: "sm",
2125
+ className: "h-auto px-3 py-1.5 text-sm",
1859
2126
  disabled: !onApprovalDecision,
1860
2127
  onClick: () => onApprovalDecision?.({
1861
2128
  approvalId: event.payload.approvalId,
@@ -1865,10 +2132,12 @@ function AgentWorkbenchActivity({
1865
2132
  }
1866
2133
  ),
1867
2134
  /* @__PURE__ */ jsx(
1868
- "button",
2135
+ Button,
1869
2136
  {
1870
2137
  type: "button",
1871
- className: "rounded-md border border-border bg-background px-3 py-1.5 text-sm font-medium text-foreground outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2138
+ variant: "outline",
2139
+ size: "sm",
2140
+ className: "h-auto px-3 py-1.5 text-sm",
1872
2141
  disabled: !onApprovalDecision,
1873
2142
  onClick: () => onApprovalDecision?.({
1874
2143
  approvalId: event.payload.approvalId,
@@ -1900,10 +2169,12 @@ function AgentWorkbenchActivity({
1900
2169
  /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: messages.artifact[event.payload.status] })
1901
2170
  ] }),
1902
2171
  event.payload.url ? /* @__PURE__ */ jsx(
1903
- "button",
2172
+ Button,
1904
2173
  {
1905
2174
  type: "button",
1906
- className: "rounded-md p-2 text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
2175
+ variant: "ghost",
2176
+ size: "icon",
2177
+ className: "text-muted-foreground hover:text-foreground",
1907
2178
  "aria-label": messages.artifact.open({
1908
2179
  name: event.payload.name
1909
2180
  }),
@@ -2171,20 +2442,23 @@ function SummaryPanel({
2171
2442
  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,
2172
2443
  retryable || canResume ? /* @__PURE__ */ jsxs("div", { className: "mt-3 flex flex-wrap gap-2", children: [
2173
2444
  retryable ? /* @__PURE__ */ jsx(
2174
- "button",
2445
+ Button,
2175
2446
  {
2176
2447
  type: "button",
2177
- className: "rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
2448
+ variant: "outline",
2449
+ size: "sm",
2450
+ className: "h-auto px-2.5 py-1.5 text-xs",
2178
2451
  disabled: !onIntent,
2179
2452
  onClick: () => onIntent?.({ type: "retry", eventId: error.eventId }),
2180
2453
  children: messages.actions.retry
2181
2454
  }
2182
2455
  ) : null,
2183
2456
  canResume ? /* @__PURE__ */ jsx(
2184
- "button",
2457
+ Button,
2185
2458
  {
2186
2459
  type: "button",
2187
- className: "rounded-md bg-primary px-2.5 py-1.5 text-xs font-medium text-primary-foreground outline-none hover:bg-primary/90 focus-visible:ring-2 focus-visible:ring-ring",
2460
+ size: "sm",
2461
+ className: "h-auto px-2.5 py-1.5 text-xs",
2188
2462
  disabled: !onIntent,
2189
2463
  onClick: () => onIntent?.({ type: "resume", sessionId: model.sessionId }),
2190
2464
  children: messages.actions.resume
@@ -2194,10 +2468,12 @@ function SummaryPanel({
2194
2468
  ] }),
2195
2469
  /* @__PURE__ */ jsxs("section", { className: "flex flex-wrap gap-2 rounded-lg border border-border bg-card p-3 text-card-foreground", children: [
2196
2470
  canContinueInNewTask ? /* @__PURE__ */ jsxs(
2197
- "button",
2471
+ Button,
2198
2472
  {
2199
2473
  type: "button",
2200
- className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
2474
+ variant: "outline",
2475
+ size: "sm",
2476
+ className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
2201
2477
  disabled: !onIntent,
2202
2478
  onClick: () => onIntent?.({ type: "continue-in-new-task", sessionId: model.sessionId }),
2203
2479
  children: [
@@ -2207,10 +2483,12 @@ function SummaryPanel({
2207
2483
  }
2208
2484
  ) : null,
2209
2485
  canEditAndRerun ? /* @__PURE__ */ jsxs(
2210
- "button",
2486
+ Button,
2211
2487
  {
2212
2488
  type: "button",
2213
- className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
2489
+ variant: "outline",
2490
+ size: "sm",
2491
+ className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
2214
2492
  disabled: !onIntent,
2215
2493
  onClick: () => onIntent?.({ type: "edit-and-rerun", sessionId: model.sessionId }),
2216
2494
  children: [
@@ -2220,10 +2498,12 @@ function SummaryPanel({
2220
2498
  }
2221
2499
  ) : null,
2222
2500
  /* @__PURE__ */ jsxs(
2223
- "button",
2501
+ Button,
2224
2502
  {
2225
2503
  type: "button",
2226
- className: "inline-flex items-center gap-1.5 rounded-md border border-border bg-background px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
2504
+ variant: "outline",
2505
+ size: "sm",
2506
+ className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
2227
2507
  disabled: !onIntent,
2228
2508
  onClick: () => onIntent?.({ type: "export", sessionId: model.sessionId }),
2229
2509
  children: [
@@ -2237,10 +2517,12 @@ function SummaryPanel({
2237
2517
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
2238
2518
  /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold", children: messages.summary }),
2239
2519
  summary?.payload.text ? /* @__PURE__ */ jsx(
2240
- "button",
2520
+ Button,
2241
2521
  {
2242
2522
  type: "button",
2243
- className: "rounded-md p-1.5 text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
2523
+ variant: "ghost",
2524
+ size: "icon",
2525
+ className: "size-8 text-muted-foreground hover:text-foreground",
2244
2526
  "aria-label": messages.actions.copySummary,
2245
2527
  disabled: !onIntent,
2246
2528
  onClick: () => onIntent?.({
@@ -2255,10 +2537,12 @@ function SummaryPanel({
2255
2537
  summary?.payload.status === "failed" ? /* @__PURE__ */ jsxs("div", { className: "mt-3 space-y-2", children: [
2256
2538
  /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive-text", role: "alert", children: messages.summaryFailed }),
2257
2539
  /* @__PURE__ */ jsxs(
2258
- "button",
2540
+ Button,
2259
2541
  {
2260
2542
  type: "button",
2261
- className: "inline-flex items-center gap-1.5 rounded-md border border-border px-2.5 py-1.5 text-xs font-medium outline-none hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring",
2543
+ variant: "outline",
2544
+ size: "sm",
2545
+ className: "h-auto gap-1.5 px-2.5 py-1.5 text-xs",
2262
2546
  disabled: !onIntent,
2263
2547
  onClick: () => onIntent?.({ type: "retry-summary", eventId: summary.eventId }),
2264
2548
  children: [
@@ -2395,16 +2679,6 @@ function AgentWorkbenchTaskDetails({
2395
2679
  { id: "summary", label: messages.tabs.summary, count: model.summary ? 1 : 0 },
2396
2680
  ...workspaceAvailable ? [{ id: "workspace", label: messages.tabs.workspace, count: workspaceCount }] : []
2397
2681
  ];
2398
- const tabId = (tab) => `agent-workbench-details-${viewModel.sessionId}-${tab}`.replace(
2399
- /[^a-zA-Z0-9_-]/g,
2400
- "-"
2401
- );
2402
- const onTabKeyDown = (event, index) => {
2403
- if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) return;
2404
- event.preventDefault();
2405
- const nextIndex = event.key === "Home" ? 0 : event.key === "End" ? tabs.length - 1 : (index + (event.key === "ArrowRight" ? 1 : -1) + tabs.length) % tabs.length;
2406
- onActiveTabChange?.(tabs[nextIndex].id);
2407
- };
2408
2682
  return /* @__PURE__ */ jsxs(
2409
2683
  "aside",
2410
2684
  {
@@ -2421,54 +2695,71 @@ function AgentWorkbenchTaskDetails({
2421
2695
  /* @__PURE__ */ jsx("p", { className: "mt-0.5 truncate text-xs text-muted-foreground", children: messages.description })
2422
2696
  ] }),
2423
2697
  onIntent ? /* @__PURE__ */ jsx(
2424
- "button",
2698
+ Button,
2425
2699
  {
2426
2700
  type: "button",
2427
- className: "rounded-md p-2 text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
2701
+ variant: "ghost",
2702
+ size: "icon",
2703
+ className: "text-muted-foreground hover:text-foreground",
2428
2704
  "aria-label": messages.actions.close,
2429
2705
  onClick: () => onIntent({ type: "close" }),
2430
2706
  children: /* @__PURE__ */ jsx(X, { className: "size-4", "aria-hidden": "true" })
2431
2707
  }
2432
2708
  ) : null
2433
2709
  ] }),
2434
- /* @__PURE__ */ jsx("div", { className: cn2("flex shrink-0 gap-1 border-b border-border px-3 py-2", classNames?.tabs), role: "tablist", "aria-label": messages.tabs.label, children: tabs.map((tab, index) => /* @__PURE__ */ jsxs(
2435
- "button",
2710
+ /* @__PURE__ */ jsxs(
2711
+ Tabs,
2436
2712
  {
2437
- id: tabId(tab.id),
2438
- type: "button",
2439
- role: "tab",
2440
- "aria-selected": resolvedTab === tab.id,
2441
- "aria-controls": `${tabId(tab.id)}-panel`,
2442
- tabIndex: resolvedTab === tab.id ? 0 : -1,
2443
- className: cn2(
2444
- "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",
2445
- resolvedTab === tab.id ? "bg-primary/10 text-primary" : "text-muted-foreground hover:bg-muted hover:text-foreground"
2446
- ),
2447
- onClick: () => onActiveTabChange?.(tab.id),
2448
- onKeyDown: (event) => onTabKeyDown(event, index),
2713
+ value: resolvedTab,
2714
+ className: "flex min-h-0 flex-1 flex-col",
2715
+ onValueChange: (tab) => onActiveTabChange?.(tab),
2449
2716
  children: [
2450
- /* @__PURE__ */ jsx("span", { className: "truncate", children: tab.label }),
2451
- /* @__PURE__ */ jsx(Count, { value: tab.count })
2717
+ /* @__PURE__ */ jsx(
2718
+ TabsList,
2719
+ {
2720
+ "aria-label": messages.tabs.label,
2721
+ className: cn2(
2722
+ "flex h-auto shrink-0 gap-1 rounded-none border-b border-border bg-transparent px-3 py-2",
2723
+ classNames?.tabs
2724
+ ),
2725
+ children: tabs.map((tab) => /* @__PURE__ */ jsxs(
2726
+ TabsTrigger,
2727
+ {
2728
+ value: tab.id,
2729
+ 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",
2730
+ children: [
2731
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: tab.label }),
2732
+ /* @__PURE__ */ jsx(Count, { value: tab.count })
2733
+ ]
2734
+ },
2735
+ tab.id
2736
+ ))
2737
+ }
2738
+ ),
2739
+ /* @__PURE__ */ jsx(
2740
+ TabsContent,
2741
+ {
2742
+ value: "summary",
2743
+ className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto p-3", classNames?.body),
2744
+ children: /* @__PURE__ */ jsx(SummaryPanel, { model, onIntent })
2745
+ }
2746
+ ),
2747
+ workspaceAvailable ? /* @__PURE__ */ jsx(
2748
+ TabsContent,
2749
+ {
2750
+ value: "workspace",
2751
+ className: cn2("mt-0 min-h-0 flex-1 overflow-y-auto p-3", classNames?.body),
2752
+ children: /* @__PURE__ */ jsx(
2753
+ WorkspacePanel,
2754
+ {
2755
+ model,
2756
+ sectionClassName: classNames?.section,
2757
+ codeClassName: classNames?.code
2758
+ }
2759
+ )
2760
+ }
2761
+ ) : null
2452
2762
  ]
2453
- },
2454
- tab.id
2455
- )) }),
2456
- /* @__PURE__ */ jsx(
2457
- "div",
2458
- {
2459
- id: `${tabId(resolvedTab)}-panel`,
2460
- role: "tabpanel",
2461
- "aria-labelledby": tabId(resolvedTab),
2462
- tabIndex: 0,
2463
- className: cn2("min-h-0 flex-1 overflow-y-auto p-3 outline-none", classNames?.body),
2464
- children: resolvedTab === "summary" ? /* @__PURE__ */ jsx(SummaryPanel, { model, onIntent }) : /* @__PURE__ */ jsx(
2465
- WorkspacePanel,
2466
- {
2467
- model,
2468
- sectionClassName: classNames?.section,
2469
- codeClassName: classNames?.code
2470
- }
2471
- )
2472
2763
  }
2473
2764
  )
2474
2765
  ]
@@ -2831,10 +3122,11 @@ function ArtifactGroup({
2831
3122
  return /* @__PURE__ */ jsxs("section", { className: "flex min-w-0 flex-col gap-2", children: [
2832
3123
  /* @__PURE__ */ jsx("div", { role: "heading", "aria-level": 2, className: "text-sm font-medium text-muted-foreground", children: title }),
2833
3124
  artifacts.slice(0, maxItems).map((artifact) => /* @__PURE__ */ jsxs(
2834
- "button",
3125
+ Button,
2835
3126
  {
2836
3127
  type: "button",
2837
- className: "flex min-w-0 items-center gap-2 rounded-md px-0.5 py-0.5 text-left text-sm outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-default",
3128
+ variant: "ghost",
3129
+ className: "h-auto min-w-0 justify-start gap-2 px-0.5 py-0.5 text-left text-sm font-normal disabled:cursor-default",
2838
3130
  disabled: !onArtifactOpen || artifact.status === "loading",
2839
3131
  onClick: () => onArtifactOpen?.(artifact),
2840
3132
  children: [
@@ -2909,10 +3201,12 @@ function AgentWorkbenchArtifactSummary({
2909
3201
  }
2910
3202
  ) : null,
2911
3203
  onViewAll && !showAll && (outputs.length > maxItemsPerGroup || sources.length > maxItemsPerGroup) ? /* @__PURE__ */ jsxs(
2912
- "button",
3204
+ Button,
2913
3205
  {
2914
3206
  type: "button",
2915
- className: "flex min-h-8 items-center gap-2 rounded-md text-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
3207
+ variant: "ghost",
3208
+ size: "sm",
3209
+ className: "min-h-8 gap-2 px-0 text-sm text-muted-foreground hover:text-foreground",
2916
3210
  onClick: onViewAll,
2917
3211
  children: [
2918
3212
  /* @__PURE__ */ jsx(Link2, { className: "size-4", "aria-hidden": "true" }),
@@ -3049,20 +3343,24 @@ function AgentWorkbenchArtifactWorkspace({
3049
3343
  /* @__PURE__ */ jsxs("div", { className: "relative z-20 flex shrink-0 items-center gap-2", children: [
3050
3344
  activeArtifact.url ? /* @__PURE__ */ jsxs(Fragment, { children: [
3051
3345
  /* @__PURE__ */ jsx(
3052
- "button",
3346
+ Button,
3053
3347
  {
3054
3348
  type: "button",
3055
- className: "flex size-8 shrink-0 items-center justify-center rounded-md text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
3349
+ variant: "ghost",
3350
+ size: "icon",
3351
+ className: "size-8 shrink-0 text-muted-foreground hover:text-foreground",
3056
3352
  "aria-label": messages.download({ name: activeArtifact.name }),
3057
3353
  onClick: () => onIntent?.({ type: "download", artifactId: activeArtifact.id }),
3058
3354
  children: /* @__PURE__ */ jsx(Download, { className: "size-4", "aria-hidden": "true" })
3059
3355
  }
3060
3356
  ),
3061
3357
  /* @__PURE__ */ jsx(
3062
- "button",
3358
+ Button,
3063
3359
  {
3064
3360
  type: "button",
3065
- className: "flex size-8 shrink-0 items-center justify-center rounded-md text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
3361
+ variant: "ghost",
3362
+ size: "icon",
3363
+ className: "size-8 shrink-0 text-muted-foreground hover:text-foreground",
3066
3364
  "aria-label": messages.openExternal({ name: activeArtifact.name }),
3067
3365
  onClick: () => onIntent?.({ type: "open-external", artifactId: activeArtifact.id }),
3068
3366
  children: /* @__PURE__ */ jsx(ExternalLink, { className: "size-4", "aria-hidden": "true" })
@@ -3070,10 +3368,12 @@ function AgentWorkbenchArtifactWorkspace({
3070
3368
  )
3071
3369
  ] }) : null,
3072
3370
  /* @__PURE__ */ jsx(
3073
- "button",
3371
+ Button,
3074
3372
  {
3075
3373
  type: "button",
3076
- className: "flex size-8 shrink-0 items-center justify-center rounded-md text-muted-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
3374
+ variant: "ghost",
3375
+ size: "icon",
3376
+ className: "size-8 shrink-0 text-muted-foreground hover:text-foreground",
3077
3377
  "aria-label": messages.closeWorkspace,
3078
3378
  onClick: () => onIntent?.({ type: "close-workspace" }),
3079
3379
  children: /* @__PURE__ */ jsx(PanelRightClose, { className: "size-4", "aria-hidden": "true" })