@invergent/agent-chat-react 1.6.0 → 1.6.1

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/index.cjs CHANGED
@@ -308,11 +308,14 @@ function BrowserControlBar({
308
308
  error && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-40 truncate text-[11px] text-destructive", children: error })
309
309
  ] });
310
310
  }
311
- function BrowserLiveView({ src }) {
311
+ function BrowserLiveView({
312
+ src,
313
+ testId = "browser-iframe"
314
+ }) {
312
315
  return /* @__PURE__ */ jsxRuntime.jsx(
313
316
  "iframe",
314
317
  {
315
- "data-testid": "browser-iframe",
318
+ "data-testid": testId,
316
319
  title: "Browser live view",
317
320
  src,
318
321
  className: "h-full w-full border-0 bg-black",
@@ -340,40 +343,282 @@ function BrowserStatusDot({
340
343
  }
341
344
  );
342
345
  }
343
- function BrowserPane({ sessionId, state, adapter }) {
344
- const liveViewUrl = react.useMemo(
345
- () => adapter.browserLiveViewUrl(sessionId),
346
- [adapter, sessionId]
346
+
347
+ // src/components/ui/dialog.tsx
348
+ init_utils();
349
+ function Dialog({
350
+ ...props
351
+ }) {
352
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Root, { "data-slot": "dialog", ...props });
353
+ }
354
+ function DialogPortal({
355
+ ...props
356
+ }) {
357
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
358
+ }
359
+ function DialogOverlay({
360
+ className,
361
+ ...props
362
+ }) {
363
+ return /* @__PURE__ */ jsxRuntime.jsx(
364
+ radixUi.Dialog.Overlay,
365
+ {
366
+ "data-slot": "dialog-overlay",
367
+ className: cn(
368
+ "fixed inset-0 isolate z-50 bg-black/20 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
369
+ className
370
+ ),
371
+ ...props
372
+ }
347
373
  );
348
- const hasLiveView = state.status !== "provisioning" && state.status !== "closed";
374
+ }
375
+ function DialogContent({
376
+ className,
377
+ children,
378
+ showCloseButton = true,
379
+ ...props
380
+ }) {
381
+ return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
382
+ /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
383
+ /* @__PURE__ */ jsxRuntime.jsxs(
384
+ radixUi.Dialog.Content,
385
+ {
386
+ "data-slot": "dialog-content",
387
+ className: cn(
388
+ "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-none bg-popover p-6 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
389
+ className
390
+ ),
391
+ ...props,
392
+ children: [
393
+ children,
394
+ showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Close, { "data-slot": "dialog-close", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
395
+ Button,
396
+ {
397
+ variant: "ghost",
398
+ className: "absolute top-5 right-5 bg-secondary",
399
+ size: "icon-sm",
400
+ children: [
401
+ /* @__PURE__ */ jsxRuntime.jsx(
402
+ lucideReact.XIcon,
403
+ {}
404
+ ),
405
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
406
+ ]
407
+ }
408
+ ) })
409
+ ]
410
+ }
411
+ )
412
+ ] });
413
+ }
414
+ function DialogHeader({ className, ...props }) {
415
+ return /* @__PURE__ */ jsxRuntime.jsx(
416
+ "div",
417
+ {
418
+ "data-slot": "dialog-header",
419
+ className: cn("flex flex-col gap-2", className),
420
+ ...props
421
+ }
422
+ );
423
+ }
424
+ function DialogFooter({
425
+ className,
426
+ showCloseButton = false,
427
+ children,
428
+ ...props
429
+ }) {
349
430
  return /* @__PURE__ */ jsxRuntime.jsxs(
350
431
  "div",
351
432
  {
352
- "data-testid": "browser-pane",
353
- className: "flex h-full min-h-0 flex-col bg-background",
433
+ "data-slot": "dialog-footer",
434
+ className: cn(
435
+ "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
436
+ className
437
+ ),
438
+ ...props,
354
439
  children: [
355
- /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex min-h-10 items-center gap-2 border-b border-line bg-card px-3 text-xs text-foreground", children: [
356
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ZapIcon, { className: "size-3.5 text-muted-foreground", "aria-hidden": "true" }),
357
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "Browser" }),
358
- /* @__PURE__ */ jsxRuntime.jsx(BrowserStatusDot, { status: state.status }),
359
- state.controlOwner && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 truncate text-amber-500", children: [
360
- state.controlOwner,
361
- " has control"
362
- ] })
363
- ] }),
364
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1 bg-black", children: state.status === "provisioning" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center bg-background text-sm text-muted-foreground", children: "Starting browser..." }) : state.status === "closed" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center bg-background text-sm text-muted-foreground", children: "Browser closed." }) : /* @__PURE__ */ jsxRuntime.jsx(BrowserLiveView, { src: liveViewUrl }) }),
365
- hasLiveView && /* @__PURE__ */ jsxRuntime.jsx(
366
- BrowserControlBar,
367
- {
368
- sessionId,
369
- hasControl: state.status === "user-control",
370
- adapter
371
- }
372
- )
440
+ children,
441
+ showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", children: "Close" }) })
373
442
  ]
374
443
  }
375
444
  );
376
445
  }
446
+ function DialogTitle({
447
+ className,
448
+ ...props
449
+ }) {
450
+ return /* @__PURE__ */ jsxRuntime.jsx(
451
+ radixUi.Dialog.Title,
452
+ {
453
+ "data-slot": "dialog-title",
454
+ className: cn(
455
+ "font-heading text-lg leading-none font-semibold tracking-wider uppercase",
456
+ className
457
+ ),
458
+ ...props
459
+ }
460
+ );
461
+ }
462
+ function DialogDescription({
463
+ className,
464
+ ...props
465
+ }) {
466
+ return /* @__PURE__ */ jsxRuntime.jsx(
467
+ radixUi.Dialog.Description,
468
+ {
469
+ "data-slot": "dialog-description",
470
+ className: cn(
471
+ "mt-0.5 text-sm leading-relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
472
+ className
473
+ ),
474
+ ...props
475
+ }
476
+ );
477
+ }
478
+
479
+ // src/components/ui/tooltip.tsx
480
+ init_utils();
481
+ function TooltipProvider({
482
+ delayDuration = 0,
483
+ ...props
484
+ }) {
485
+ return /* @__PURE__ */ jsxRuntime.jsx(
486
+ radixUi.Tooltip.Provider,
487
+ {
488
+ "data-slot": "tooltip-provider",
489
+ delayDuration,
490
+ ...props
491
+ }
492
+ );
493
+ }
494
+ function Tooltip({
495
+ ...props
496
+ }) {
497
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Tooltip.Root, { "data-slot": "tooltip", ...props });
498
+ }
499
+ function TooltipTrigger({
500
+ ...props
501
+ }) {
502
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
503
+ }
504
+ function TooltipContent({
505
+ className,
506
+ sideOffset = 0,
507
+ children,
508
+ ...props
509
+ }) {
510
+ return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Tooltip.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
511
+ radixUi.Tooltip.Content,
512
+ {
513
+ "data-slot": "tooltip-content",
514
+ sideOffset,
515
+ className: cn(
516
+ "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-none bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-none data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
517
+ className
518
+ ),
519
+ ...props,
520
+ children: [
521
+ children,
522
+ /* @__PURE__ */ jsxRuntime.jsx(radixUi.Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-none bg-foreground fill-foreground" })
523
+ ]
524
+ }
525
+ ) });
526
+ }
527
+ function BrowserPane({ sessionId, state, adapter }) {
528
+ const [fullscreenOpen, setFullscreenOpen] = react.useState(false);
529
+ const [inlinePreviewOpen, setInlinePreviewOpen] = react.useState(false);
530
+ const hasLiveViewAdapter = typeof adapter.browserLiveViewUrl === "function";
531
+ const hasControlAdapter = typeof adapter.acquireBrowserControl === "function" && typeof adapter.releaseBrowserControl === "function";
532
+ const liveViewUrl = react.useMemo(() => {
533
+ if (!hasLiveViewAdapter) return "";
534
+ return adapter.browserLiveViewUrl(sessionId);
535
+ }, [adapter, hasLiveViewAdapter, sessionId]);
536
+ const hasLiveView = state.status !== "provisioning" && state.status !== "closed";
537
+ const canOpenFullscreen = hasLiveView && Boolean(liveViewUrl);
538
+ react.useEffect(() => {
539
+ setFullscreenOpen(false);
540
+ setInlinePreviewOpen(false);
541
+ }, [sessionId]);
542
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
543
+ /* @__PURE__ */ jsxRuntime.jsxs(
544
+ "div",
545
+ {
546
+ "data-testid": "browser-pane",
547
+ className: "flex h-full min-h-0 flex-col bg-background",
548
+ children: [
549
+ /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex min-h-10 items-center gap-2 border-b border-line bg-card px-3 text-xs text-foreground", children: [
550
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ZapIcon, { className: "size-3.5 text-muted-foreground", "aria-hidden": "true" }),
551
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "Browser" }),
552
+ /* @__PURE__ */ jsxRuntime.jsx(BrowserStatusDot, { status: state.status }),
553
+ state.controlOwner && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 truncate text-amber-500", children: [
554
+ state.controlOwner,
555
+ " has control"
556
+ ] }),
557
+ canOpenFullscreen && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
558
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
559
+ "button",
560
+ {
561
+ type: "button",
562
+ "aria-label": "Maximize browser",
563
+ className: "inline-flex size-7 items-center justify-center text-muted-foreground transition-colors hover:bg-secondary hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
564
+ onClick: () => setFullscreenOpen(true),
565
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Maximize2Icon, { className: "size-3.5", "aria-hidden": "true" })
566
+ }
567
+ ) }),
568
+ /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { side: "bottom", children: "Full screen" })
569
+ ] }) }) })
570
+ ] }),
571
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1 bg-black", children: state.status === "provisioning" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center bg-background text-sm text-muted-foreground", children: "Starting browser..." }) : state.status === "closed" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center bg-background text-sm text-muted-foreground", children: "Browser closed." }) : liveViewUrl && inlinePreviewOpen ? /* @__PURE__ */ jsxRuntime.jsx(BrowserLiveView, { src: liveViewUrl }) : liveViewUrl ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center bg-background text-sm text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsxs(
572
+ "button",
573
+ {
574
+ type: "button",
575
+ "aria-label": "Open browser live preview",
576
+ className: "inline-flex items-center gap-2 border border-line bg-card px-3 py-2 text-xs font-medium text-foreground transition-colors hover:bg-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
577
+ onClick: () => setInlinePreviewOpen(true),
578
+ children: [
579
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlayIcon, { className: "size-3.5", "aria-hidden": "true" }),
580
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Open live preview" })
581
+ ]
582
+ }
583
+ ) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center bg-background text-sm text-muted-foreground", children: "Browser live view is unavailable." }) }),
584
+ hasLiveView && hasControlAdapter && /* @__PURE__ */ jsxRuntime.jsx(
585
+ BrowserControlBar,
586
+ {
587
+ sessionId,
588
+ hasControl: state.status === "user-control",
589
+ adapter
590
+ }
591
+ )
592
+ ]
593
+ }
594
+ ),
595
+ /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: fullscreenOpen, onOpenChange: setFullscreenOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(
596
+ DialogContent,
597
+ {
598
+ "aria-describedby": void 0,
599
+ className: "flex h-screen w-screen max-w-none flex-col gap-0 overflow-hidden rounded-none border-0 bg-background p-0 shadow-none ring-0 sm:max-w-none",
600
+ children: [
601
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { className: "h-10 shrink-0 flex-row items-center gap-2 border-b border-line bg-card px-4 py-0", children: [
602
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ZapIcon, { className: "size-3.5 text-muted-foreground", "aria-hidden": "true" }),
603
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "text-xs normal-case tracking-normal", children: "Browser" }),
604
+ /* @__PURE__ */ jsxRuntime.jsx(BrowserStatusDot, { status: state.status }),
605
+ state.controlOwner && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 truncate text-xs text-amber-500", children: [
606
+ state.controlOwner,
607
+ " has control"
608
+ ] })
609
+ ] }),
610
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-h-0 flex-1 bg-black", children: liveViewUrl ? /* @__PURE__ */ jsxRuntime.jsx(
611
+ BrowserLiveView,
612
+ {
613
+ src: liveViewUrl,
614
+ testId: "browser-fullscreen-iframe"
615
+ }
616
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center bg-background text-sm text-muted-foreground", children: "Browser live view is unavailable." }) })
617
+ ]
618
+ }
619
+ ) })
620
+ ] });
621
+ }
377
622
 
378
623
  // src/components/ai-elements/conversation.tsx
379
624
  init_utils();
@@ -446,55 +691,6 @@ var ConversationScrollButton = ({
446
691
  );
447
692
  };
448
693
 
449
- // src/components/ui/tooltip.tsx
450
- init_utils();
451
- function TooltipProvider({
452
- delayDuration = 0,
453
- ...props
454
- }) {
455
- return /* @__PURE__ */ jsxRuntime.jsx(
456
- radixUi.Tooltip.Provider,
457
- {
458
- "data-slot": "tooltip-provider",
459
- delayDuration,
460
- ...props
461
- }
462
- );
463
- }
464
- function Tooltip({
465
- ...props
466
- }) {
467
- return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Tooltip.Root, { "data-slot": "tooltip", ...props });
468
- }
469
- function TooltipTrigger({
470
- ...props
471
- }) {
472
- return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Tooltip.Trigger, { "data-slot": "tooltip-trigger", ...props });
473
- }
474
- function TooltipContent({
475
- className,
476
- sideOffset = 0,
477
- children,
478
- ...props
479
- }) {
480
- return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Tooltip.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
481
- radixUi.Tooltip.Content,
482
- {
483
- "data-slot": "tooltip-content",
484
- sideOffset,
485
- className: cn(
486
- "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-none bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-none data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
487
- className
488
- ),
489
- ...props,
490
- children: [
491
- children,
492
- /* @__PURE__ */ jsxRuntime.jsx(radixUi.Tooltip.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-none bg-foreground fill-foreground" })
493
- ]
494
- }
495
- ) });
496
- }
497
-
498
694
  // src/components/ai-elements/message.tsx
499
695
  init_utils();
500
696
  var Message = ({ className, from, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -1997,140 +2193,6 @@ function WebToolBlock({ tc }) {
1997
2193
  displayText && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground/70 truncate text-xs", children: displayText })
1998
2194
  ] });
1999
2195
  }
2000
-
2001
- // src/components/ui/dialog.tsx
2002
- init_utils();
2003
- function Dialog({
2004
- ...props
2005
- }) {
2006
- return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Root, { "data-slot": "dialog", ...props });
2007
- }
2008
- function DialogPortal({
2009
- ...props
2010
- }) {
2011
- return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Portal, { "data-slot": "dialog-portal", ...props });
2012
- }
2013
- function DialogOverlay({
2014
- className,
2015
- ...props
2016
- }) {
2017
- return /* @__PURE__ */ jsxRuntime.jsx(
2018
- radixUi.Dialog.Overlay,
2019
- {
2020
- "data-slot": "dialog-overlay",
2021
- className: cn(
2022
- "fixed inset-0 isolate z-50 bg-black/20 duration-100 supports-backdrop-filter:backdrop-blur-sm data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
2023
- className
2024
- ),
2025
- ...props
2026
- }
2027
- );
2028
- }
2029
- function DialogContent({
2030
- className,
2031
- children,
2032
- showCloseButton = true,
2033
- ...props
2034
- }) {
2035
- return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
2036
- /* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
2037
- /* @__PURE__ */ jsxRuntime.jsxs(
2038
- radixUi.Dialog.Content,
2039
- {
2040
- "data-slot": "dialog-content",
2041
- className: cn(
2042
- "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-none bg-popover p-6 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
2043
- className
2044
- ),
2045
- ...props,
2046
- children: [
2047
- children,
2048
- showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Close, { "data-slot": "dialog-close", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
2049
- Button,
2050
- {
2051
- variant: "ghost",
2052
- className: "absolute top-5 right-5 bg-secondary",
2053
- size: "icon-sm",
2054
- children: [
2055
- /* @__PURE__ */ jsxRuntime.jsx(
2056
- lucideReact.XIcon,
2057
- {}
2058
- ),
2059
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
2060
- ]
2061
- }
2062
- ) })
2063
- ]
2064
- }
2065
- )
2066
- ] });
2067
- }
2068
- function DialogHeader({ className, ...props }) {
2069
- return /* @__PURE__ */ jsxRuntime.jsx(
2070
- "div",
2071
- {
2072
- "data-slot": "dialog-header",
2073
- className: cn("flex flex-col gap-2", className),
2074
- ...props
2075
- }
2076
- );
2077
- }
2078
- function DialogFooter({
2079
- className,
2080
- showCloseButton = false,
2081
- children,
2082
- ...props
2083
- }) {
2084
- return /* @__PURE__ */ jsxRuntime.jsxs(
2085
- "div",
2086
- {
2087
- "data-slot": "dialog-footer",
2088
- className: cn(
2089
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
2090
- className
2091
- ),
2092
- ...props,
2093
- children: [
2094
- children,
2095
- showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(radixUi.Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", children: "Close" }) })
2096
- ]
2097
- }
2098
- );
2099
- }
2100
- function DialogTitle({
2101
- className,
2102
- ...props
2103
- }) {
2104
- return /* @__PURE__ */ jsxRuntime.jsx(
2105
- radixUi.Dialog.Title,
2106
- {
2107
- "data-slot": "dialog-title",
2108
- className: cn(
2109
- "font-heading text-lg leading-none font-semibold tracking-wider uppercase",
2110
- className
2111
- ),
2112
- ...props
2113
- }
2114
- );
2115
- }
2116
- function DialogDescription({
2117
- className,
2118
- ...props
2119
- }) {
2120
- return /* @__PURE__ */ jsxRuntime.jsx(
2121
- radixUi.Dialog.Description,
2122
- {
2123
- "data-slot": "dialog-description",
2124
- className: cn(
2125
- "mt-0.5 text-sm leading-relaxed text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
2126
- className
2127
- ),
2128
- ...props
2129
- }
2130
- );
2131
- }
2132
-
2133
- // src/components/chat/tools/file-tools.tsx
2134
2196
  init_utils();
2135
2197
 
2136
2198
  // src/components/chat/diff-viewer.tsx