@copilotkit/react-core 2.0.0-rc.1 → 2.0.0-rc.3

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.umd.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
 
3
3
  (function(global, factory) {
4
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('./index.css'), require('@copilotkit/core'), require('@ag-ui/client'), require('react'), require('react/jsx-runtime'), require('@copilotkit/markdown-renderer/react'), require('@copilotkit/markdown-renderer'), require('tailwind-merge'), require('lucide-react'), require('@copilotkit/shared'), require('@radix-ui/react-slot'), require('class-variance-authority'), require('clsx'), require('@radix-ui/react-tooltip'), require('@radix-ui/react-dropdown-menu'), require('@ag-ui/core'), require('zod'), require('@copilotkit/mcp-apps-renderer/activity'), require('@copilotkit/a2ui-renderer'), require('zod-to-json-schema'), require('@a2ui/web_core/v0_9'), require('@radix-ui/react-popover'), require('react-dom'), require('@tanstack/react-virtual'), require('use-stick-to-bottom'), require('@copilotkit/web-components/threads-drawer')) :
5
- typeof define === 'function' && define.amd ? define(['exports', './index.css', '@copilotkit/core', '@ag-ui/client', 'react', 'react/jsx-runtime', '@copilotkit/markdown-renderer/react', '@copilotkit/markdown-renderer', 'tailwind-merge', 'lucide-react', '@copilotkit/shared', '@radix-ui/react-slot', 'class-variance-authority', 'clsx', '@radix-ui/react-tooltip', '@radix-ui/react-dropdown-menu', '@ag-ui/core', 'zod', '@copilotkit/mcp-apps-renderer/activity', '@copilotkit/a2ui-renderer', 'zod-to-json-schema', '@a2ui/web_core/v0_9', '@radix-ui/react-popover', 'react-dom', '@tanstack/react-virtual', 'use-stick-to-bottom', '@copilotkit/web-components/threads-drawer'], factory) :
6
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CopilotKitReactCore = {}), global.src_index_css,global.CopilotKitCore,global.AgUIClient,global.React,global.ReactJsxRuntime,global.CopilotKitMarkdownRendererReact,global.CopilotKitMarkdownRenderer,global.tailwindMerge,global.lucideReact,global.CopilotKitShared,global.RadixReactSlot,global.classVarianceAuthority,global.clsx,global.RadixReactTooltip,global.RadixReactDropdownMenu,global.AgUICore,global.Zod,global.CopilotKitMcpAppsRendererActivity,global.CopilotKitA2UIRenderer,global.zod_to_json_schema,global._a2ui_web_core_v0_9,global._radix_ui_react_popover,global.ReactDOM,global._tanstack_react_virtual,global.useStickToBottom,global._copilotkit_web_components_threads_drawer));
7
- })(this, function(exports, src_index_css, _copilotkit_core, _ag_ui_client, react, react_jsx_runtime, _copilotkit_markdown_renderer_react, _copilotkit_markdown_renderer, tailwind_merge, lucide_react, _copilotkit_shared, _radix_ui_react_slot, class_variance_authority, clsx, _radix_ui_react_tooltip, _radix_ui_react_dropdown_menu, _ag_ui_core, zod, _copilotkit_mcp_apps_renderer_activity, _copilotkit_a2ui_renderer, zod_to_json_schema, _a2ui_web_core_v0_9, _radix_ui_react_popover, react_dom, _tanstack_react_virtual, use_stick_to_bottom, _copilotkit_web_components_threads_drawer) {
4
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@copilotkit/core'), require('@ag-ui/client'), require('react'), require('react/jsx-runtime'), require('@copilotkit/markdown-renderer/react'), require('@copilotkit/markdown-renderer'), require('lucide-react'), require('@copilotkit/shared'), require('@radix-ui/react-slot'), require('@radix-ui/react-tooltip'), require('@radix-ui/react-dropdown-menu'), require('@ag-ui/core'), require('zod'), require('@copilotkit/mcp-apps-renderer/activity'), require('@copilotkit/a2ui-renderer'), require('zod-to-json-schema'), require('@a2ui/web_core/v0_9'), require('@copilotkit/core/styles'), require('@radix-ui/react-popover'), require('react-dom'), require('@tanstack/react-virtual'), require('use-stick-to-bottom'), require('@copilotkit/web-components/threads-drawer')) :
5
+ typeof define === 'function' && define.amd ? define(['exports', '@copilotkit/core', '@ag-ui/client', 'react', 'react/jsx-runtime', '@copilotkit/markdown-renderer/react', '@copilotkit/markdown-renderer', 'lucide-react', '@copilotkit/shared', '@radix-ui/react-slot', '@radix-ui/react-tooltip', '@radix-ui/react-dropdown-menu', '@ag-ui/core', 'zod', '@copilotkit/mcp-apps-renderer/activity', '@copilotkit/a2ui-renderer', 'zod-to-json-schema', '@a2ui/web_core/v0_9', '@copilotkit/core/styles', '@radix-ui/react-popover', 'react-dom', '@tanstack/react-virtual', 'use-stick-to-bottom', '@copilotkit/web-components/threads-drawer'], factory) :
6
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CopilotKitReactCore = {}), global.CopilotKitCore,global.AgUIClient,global.React,global.ReactJsxRuntime,global.CopilotKitMarkdownRendererReact,global.CopilotKitMarkdownRenderer,global.lucideReact,global.CopilotKitShared,global.RadixReactSlot,global.RadixReactTooltip,global.RadixReactDropdownMenu,global.AgUICore,global.Zod,global.CopilotKitMcpAppsRendererActivity,global.CopilotKitA2UIRenderer,global.zod_to_json_schema,global._a2ui_web_core_v0_9,global._copilotkit_core_styles,global._radix_ui_react_popover,global.ReactDOM,global._tanstack_react_virtual,global.useStickToBottom,global._copilotkit_web_components_threads_drawer));
7
+ })(this, function(exports, _copilotkit_core, _ag_ui_client, react, react_jsx_runtime, _copilotkit_markdown_renderer_react, _copilotkit_markdown_renderer, lucide_react, _copilotkit_shared, _radix_ui_react_slot, _radix_ui_react_tooltip, _radix_ui_react_dropdown_menu, _ag_ui_core, zod, _copilotkit_mcp_apps_renderer_activity, _copilotkit_a2ui_renderer, zod_to_json_schema, _a2ui_web_core_v0_9, _copilotkit_core_styles, _radix_ui_react_popover, react_dom, _tanstack_react_virtual, use_stick_to_bottom, _copilotkit_web_components_threads_drawer) {
8
8
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
9
9
  //#region \0rolldown/runtime.js
10
10
  var __create = Object.create;
@@ -72,7 +72,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
72
72
  case "em": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: renderInline(token.tokens) }, i);
73
73
  case "del": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("del", { children: renderInline(token.tokens) }, i);
74
74
  case "codespan": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
75
- className: "cpk:rounded cpk:bg-black/5 cpk:px-1 cpk:py-0.5",
75
+ className: "cpk-markdown-inline-code",
76
76
  children: token.text
77
77
  }, i);
78
78
  case "br": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("br", {}, i);
@@ -90,7 +90,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
90
90
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
91
91
  src: sanitizeImgSrc(img.href),
92
92
  alt: img.text,
93
- className: "cpk:max-w-full"
93
+ className: "cpk-markdown-image"
94
94
  }, i);
95
95
  }
96
96
  case "escape": return token.text;
@@ -110,7 +110,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
110
110
  case "code": {
111
111
  const c = token;
112
112
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
113
- className: "cpk:overflow-x-auto cpk:rounded-lg cpk:bg-muted cpk:text-foreground cpk:p-3",
113
+ className: "cpk-markdown-code-block",
114
114
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
115
115
  "data-language": c.lang || void 0,
116
116
  children: c.text
@@ -129,7 +129,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
129
129
  case "table": {
130
130
  const tbl = token;
131
131
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
132
- className: "cpk:overflow-x-auto",
132
+ className: "cpk-markdown-table-container",
133
133
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", { children: tbl.header.map((cell, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: renderInline(cell.tokens) }, i)) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", { children: tbl.rows.map((row, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", { children: row.map((cell, j) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: renderInline(cell.tokens) }, j)) }, i)) })] })
134
134
  });
135
135
  }
@@ -145,7 +145,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
145
145
  //#endregion
146
146
  //#region src/components/chat/StreamingMarkdownDefaultRenderer.tsx
147
147
  const defaultNodeRenderers = (0, _copilotkit_markdown_renderer_react.createStreamingMarkdownNodeRenderers)({ codeBlock: ({ node }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
148
- className: "cpk:overflow-x-auto cpk:rounded-lg cpk:bg-muted cpk:text-foreground cpk:p-3",
148
+ className: "cpk-markdown-code-block",
149
149
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
150
150
  "data-code-info": node.info ?? void 0,
151
151
  children: node.text
@@ -653,83 +653,63 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
653
653
 
654
654
  //#endregion
655
655
  //#region src/lib/utils.ts
656
- const twMerge$12 = (0, tailwind_merge.extendTailwindMerge)({ prefix: "cpk" });
656
+ /**
657
+ * Joins class names, skipping falsy values. Takes the same inputs as `clsx`.
658
+ * Classes are not merged: every rule CopilotKit ships sits in `:where()`, so a
659
+ * class the app adds wins without removing ours.
660
+ */
657
661
  function cn(...inputs) {
658
- return twMerge$12((0, clsx.clsx)(inputs));
662
+ const out = [];
663
+ for (const input of inputs) {
664
+ if (!input) continue;
665
+ if (typeof input === "string" || typeof input === "number" || typeof input === "bigint") out.push(String(input));
666
+ else if (Array.isArray(input)) {
667
+ const nested = cn(...input);
668
+ if (nested) out.push(nested);
669
+ } else if (typeof input === "object") {
670
+ for (const key in input) if (input[key]) out.push(key);
671
+ }
672
+ }
673
+ return out.join(" ");
659
674
  }
660
675
 
661
676
  //#endregion
662
677
  //#region src/components/ui/button.tsx
663
- const buttonVariants = (0, class_variance_authority.cva)("cpk:inline-flex cpk:items-center cpk:justify-center cpk:gap-2 cpk:whitespace-nowrap cpk:rounded-md cpk:text-sm cpk:font-medium cpk:transition-all cpk:disabled:pointer-events-none cpk:disabled:opacity-50 cpk:[&_svg]:pointer-events-none cpk:[&_svg:not([class*='size-'])]:size-4 cpk:shrink-0 cpk:[&_svg]:shrink-0 cpk:outline-none cpk:focus-visible:border-ring cpk:focus-visible:ring-ring/50 cpk:focus-visible:ring-[3px] cpk:aria-invalid:ring-destructive/20 cpk:dark:aria-invalid:ring-destructive/40 cpk:aria-invalid:border-destructive", {
664
- variants: {
665
- variant: {
666
- default: "cpk:bg-primary cpk:text-primary-foreground cpk:shadow-xs cpk:hover:bg-primary/90",
667
- destructive: "cpk:bg-destructive cpk:text-white cpk:shadow-xs cpk:hover:bg-destructive/90 cpk:focus-visible:ring-destructive/20 cpk:dark:focus-visible:ring-destructive/40 cpk:dark:bg-destructive/60",
668
- outline: "cpk:border cpk:bg-background cpk:shadow-xs cpk:hover:bg-accent cpk:hover:text-accent-foreground cpk:dark:bg-input/30 cpk:dark:border-input cpk:dark:hover:bg-input/50",
669
- secondary: "cpk:bg-secondary cpk:text-secondary-foreground cpk:shadow-xs cpk:hover:bg-secondary/80",
670
- ghost: "cpk:hover:bg-accent cpk:hover:text-accent-foreground cpk:dark:hover:bg-accent/50 cpk:cursor-pointer",
671
- link: "cpk:text-primary cpk:underline-offset-4 cpk:hover:underline",
672
- assistantMessageToolbarButton: [
673
- "cpk:cursor-pointer",
674
- "cpk:p-0 cpk:text-[rgb(93,93,93)] cpk:hover:bg-[#E8E8E8]",
675
- "cpk:dark:text-[rgb(243,243,243)] cpk:dark:hover:bg-[#303030]",
676
- "cpk:h-8 cpk:w-8",
677
- "cpk:transition-colors",
678
- "cpk:hover:text-[rgb(93,93,93)]",
679
- "cpk:dark:hover:text-[rgb(243,243,243)]"
680
- ],
681
- chatInputToolbarPrimary: [
682
- "cpk:cursor-pointer",
683
- "cpk:bg-black cpk:text-white",
684
- "cpk:dark:bg-white cpk:dark:text-black cpk:dark:focus-visible:outline-white",
685
- "cpk:rounded-full",
686
- "cpk:transition-colors",
687
- "cpk:focus:outline-none",
688
- "cpk:hover:opacity-70 cpk:disabled:hover:opacity-100",
689
- "cpk:disabled:cursor-not-allowed cpk:disabled:bg-[#00000014] cpk:disabled:text-[rgb(13,13,13)]",
690
- "cpk:dark:disabled:bg-[#454545] cpk:dark:disabled:text-white "
691
- ],
692
- chatInputToolbarSecondary: [
693
- "cpk:cursor-pointer",
694
- "cpk:bg-transparent cpk:text-[#444444]",
695
- "cpk:dark:text-white cpk:dark:border-[#404040]",
696
- "cpk:rounded-full",
697
- "cpk:transition-colors",
698
- "cpk:focus:outline-none",
699
- "cpk:hover:bg-[#f8f8f8] cpk:hover:text-[#333333]",
700
- "cpk:dark:hover:bg-[#404040] cpk:dark:hover:text-[#FFFFFF]",
701
- "cpk:disabled:cursor-not-allowed cpk:disabled:opacity-50",
702
- "cpk:disabled:hover:bg-transparent cpk:disabled:hover:text-[#444444]",
703
- "cpk:dark:disabled:hover:bg-transparent cpk:dark:disabled:hover:text-[#CCCCCC]"
704
- ]
705
- },
706
- size: {
707
- default: "cpk:h-9 cpk:px-4 cpk:py-2 cpk:has-[>svg]:px-3",
708
- sm: "cpk:h-8 cpk:rounded-md cpk:gap-1.5 cpk:px-3 cpk:has-[>svg]:px-2.5",
709
- lg: "cpk:h-10 cpk:rounded-md cpk:px-6 cpk:has-[>svg]:px-4",
710
- icon: "cpk:size-9",
711
- chatInputToolbarIcon: ["cpk:h-9 cpk:w-9 cpk:rounded-full"],
712
- chatInputToolbarIconLabel: [
713
- "cpk:h-9 cpk:px-3 cpk:rounded-full",
714
- "cpk:gap-2",
715
- "cpk:font-normal"
716
- ]
717
- }
718
- },
719
- defaultVariants: {
720
- variant: "default",
721
- size: "default"
722
- }
723
- });
678
+ const variantClasses = {
679
+ default: "cpk-button-default",
680
+ destructive: "cpk-button-destructive",
681
+ outline: "cpk-button-outline",
682
+ secondary: "cpk-button-secondary",
683
+ ghost: "cpk-button-ghost",
684
+ link: "cpk-button-link",
685
+ assistantMessageToolbarButton: "cpk-button-assistant-message-toolbar",
686
+ chatInputToolbarPrimary: "cpk-button-chat-input-toolbar-primary",
687
+ chatInputToolbarSecondary: "cpk-button-chat-input-toolbar-secondary"
688
+ };
689
+ const sizeClasses = {
690
+ default: "cpk-button-size-default",
691
+ sm: "cpk-button-size-sm",
692
+ lg: "cpk-button-size-lg",
693
+ icon: "cpk-button-size-icon",
694
+ chatInputToolbarIcon: "cpk-button-size-chat-input-toolbar-icon",
695
+ chatInputToolbarIconLabel: "cpk-button-size-chat-input-toolbar-icon-label"
696
+ };
697
+ /**
698
+ * Returns the class names for a button with the given variant and size,
699
+ * followed by `className`.
700
+ */
701
+ function buttonVariants({ variant, size, className, class: classProp } = {}) {
702
+ return cn("cpk-button", variant !== null && variantClasses[variant ?? "default"], size !== null && sizeClasses[size ?? "default"], classProp, className);
703
+ }
724
704
  const Button = react.forwardRef(function Button({ className, variant, size, asChild = false, ...props }, ref) {
725
705
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(asChild ? _radix_ui_react_slot.Slot : "button", {
726
706
  ref,
727
707
  "data-slot": "button",
728
- className: cn(buttonVariants({
708
+ className: buttonVariants({
729
709
  variant,
730
710
  size,
731
711
  className
732
- })),
712
+ }),
733
713
  ...props
734
714
  });
735
715
  });
@@ -761,9 +741,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
761
741
  "data-copilotkit": true,
762
742
  "data-slot": "tooltip-content",
763
743
  sideOffset,
764
- className: cn("cpk:bg-primary cpk:text-primary-foreground cpk:animate-in cpk:fade-in-0 cpk:zoom-in-95 cpk:data-[state=closed]:animate-out cpk:data-[state=closed]:fade-out-0 cpk:data-[state=closed]:zoom-out-95 cpk:data-[side=bottom]:slide-in-from-top-2 cpk:data-[side=left]:slide-in-from-right-2 cpk:data-[side=right]:slide-in-from-left-2 cpk:data-[side=top]:slide-in-from-bottom-2 cpk:z-50 cpk:w-fit cpk:origin-(--radix-tooltip-content-transform-origin) cpk:rounded-md cpk:px-3 cpk:py-1.5 cpk:text-xs cpk:text-balance", className),
744
+ className: cn("cpk-tooltip", className),
765
745
  ...props,
766
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tooltip.Arrow, { className: "cpk:bg-primary cpk:fill-primary cpk:z-50 cpk:size-2.5 cpk:translate-y-[calc(-50%_-_2px)] cpk:rotate-45 cpk:rounded-[2px]" })]
746
+ children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tooltip.Arrow, { className: "cpk-tooltip-arrow" })]
767
747
  }) });
768
748
  }
769
749
 
@@ -787,7 +767,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
787
767
  "data-copilotkit": true,
788
768
  "data-slot": "dropdown-menu-content",
789
769
  sideOffset,
790
- className: cn("cpk:bg-popover cpk:text-popover-foreground cpk:data-[state=open]:animate-in cpk:data-[state=closed]:animate-out cpk:data-[state=closed]:fade-out-0 cpk:data-[state=open]:fade-in-0 cpk:data-[state=closed]:zoom-out-95 cpk:data-[state=open]:zoom-in-95 cpk:data-[side=bottom]:slide-in-from-top-2 cpk:data-[side=left]:slide-in-from-right-2 cpk:data-[side=right]:slide-in-from-left-2 cpk:data-[side=top]:slide-in-from-bottom-2 cpk:z-50 cpk:max-h-(--radix-dropdown-menu-content-available-height) cpk:min-w-[8rem] cpk:origin-(--radix-dropdown-menu-content-transform-origin) cpk:overflow-x-hidden cpk:overflow-y-auto cpk:rounded-md cpk:border cpk:p-1 cpk:shadow-md", className),
770
+ className: cn("cpk-dropdown-menu-content", className),
791
771
  ...props
792
772
  }) });
793
773
  }
@@ -796,7 +776,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
796
776
  "data-slot": "dropdown-menu-item",
797
777
  "data-inset": inset,
798
778
  "data-variant": variant,
799
- className: cn("cpk:focus:bg-accent cpk:focus:text-accent-foreground cpk:data-[variant=destructive]:text-destructive cpk:data-[variant=destructive]:focus:bg-destructive/10 cpk:dark:data-[variant=destructive]:focus:bg-destructive/20 cpk:data-[variant=destructive]:focus:text-destructive cpk:data-[variant=destructive]:*:[svg]:!text-destructive cpk:[&_svg:not([class*='text-'])]:text-muted-foreground cpk:relative cpk:flex cpk:cursor-default cpk:items-center cpk:gap-2 cpk:rounded-sm cpk:px-2 cpk:py-1.5 cpk:text-sm cpk:outline-hidden cpk:select-none cpk:data-[disabled]:pointer-events-none cpk:data-[disabled]:opacity-50 cpk:data-[inset]:pl-8 cpk:[&_svg]:pointer-events-none cpk:[&_svg]:shrink-0 cpk:[&_svg:not([class*='size-'])]:size-4", className),
779
+ className: cn("cpk-dropdown-menu-item", className),
800
780
  ...props
801
781
  });
802
782
  }
@@ -804,14 +784,14 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
804
784
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Label, {
805
785
  "data-slot": "dropdown-menu-label",
806
786
  "data-inset": inset,
807
- className: cn("cpk:px-2 cpk:py-1.5 cpk:text-sm cpk:font-medium cpk:data-[inset]:pl-8", className),
787
+ className: cn("cpk-dropdown-menu-label", className),
808
788
  ...props
809
789
  });
810
790
  }
811
791
  function DropdownMenuSeparator({ className, ...props }) {
812
792
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Separator, {
813
793
  "data-slot": "dropdown-menu-separator",
814
- className: cn("cpk:bg-border cpk:-mx-1 cpk:my-1 cpk:h-px", className),
794
+ className: cn("cpk-dropdown-menu-separator", className),
815
795
  ...props
816
796
  });
817
797
  }
@@ -825,15 +805,15 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
825
805
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dropdown_menu.SubTrigger, {
826
806
  "data-slot": "dropdown-menu-sub-trigger",
827
807
  "data-inset": inset,
828
- className: cn("cpk:focus:bg-accent cpk:focus:text-accent-foreground cpk:data-[state=open]:bg-accent cpk:data-[state=open]:text-accent-foreground cpk:flex cpk:cursor-default cpk:items-center cpk:rounded-sm cpk:px-2 cpk:py-1.5 cpk:text-sm cpk:outline-hidden cpk:select-none cpk:data-[inset]:pl-8", className),
808
+ className: cn("cpk-dropdown-menu-sub-trigger", className),
829
809
  ...props,
830
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, { className: "cpk:ml-auto cpk:size-4" })]
810
+ children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, { className: "cpk-dropdown-menu-sub-trigger-icon" })]
831
811
  });
832
812
  }
833
813
  function DropdownMenuSubContent({ className, ...props }) {
834
814
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.SubContent, {
835
815
  "data-slot": "dropdown-menu-sub-content",
836
- className: cn("cpk:bg-popover cpk:text-popover-foreground cpk:data-[state=open]:animate-in cpk:data-[state=closed]:animate-out cpk:data-[state=closed]:fade-out-0 cpk:data-[state=open]:fade-in-0 cpk:data-[state=closed]:zoom-out-95 cpk:data-[state=open]:zoom-in-95 cpk:data-[side=bottom]:slide-in-from-top-2 cpk:data-[side=left]:slide-in-from-right-2 cpk:data-[side=right]:slide-in-from-left-2 cpk:data-[side=top]:slide-in-from-bottom-2 cpk:z-50 cpk:min-w-[8rem] cpk:origin-(--radix-dropdown-menu-content-transform-origin) cpk:overflow-hidden cpk:rounded-md cpk:border cpk:p-1 cpk:shadow-lg", className),
816
+ className: cn("cpk-dropdown-menu-sub-content", className),
837
817
  ...props
838
818
  });
839
819
  }
@@ -1028,11 +1008,11 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1028
1008
  cleanup
1029
1009
  ]);
1030
1010
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1031
- className: (0, tailwind_merge.twMerge)("cpk:w-full cpk:py-3 cpk:px-5", className),
1011
+ className: cn("cpk-audio-recorder", className),
1032
1012
  ...divProps,
1033
1013
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("canvas", {
1034
1014
  ref: canvasRef,
1035
- className: "cpk:block cpk:w-full cpk:h-[26px]"
1015
+ className: "cpk-audio-recorder-canvas"
1036
1016
  })
1037
1017
  });
1038
1018
  });
@@ -1056,7 +1036,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1056
1036
  const existingClassName = props.className;
1057
1037
  return react.default.createElement(DefaultComponent, {
1058
1038
  ...props,
1059
- className: (0, tailwind_merge.twMerge)(existingClassName, slot)
1039
+ className: cn(existingClassName, slot)
1060
1040
  });
1061
1041
  }
1062
1042
  if (isReactComponentType(slot)) return react.default.createElement(slot, props);
@@ -1314,7 +1294,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1314
1294
  isComposingRef.current = false;
1315
1295
  },
1316
1296
  autoFocus,
1317
- className: (0, tailwind_merge.twMerge)("cpk:w-full cpk:py-3", isExpanded ? "cpk:px-5" : "cpk:pr-5")
1297
+ className: isExpanded ? "cpk-chat-input-textarea-expanded" : "cpk-chat-input-textarea-compact"
1318
1298
  });
1319
1299
  const isProcessing = mode !== "transcribe" && isRunning;
1320
1300
  const canSend = resolvedValue.trim().length > 0 && !!onSubmitMessage;
@@ -1332,7 +1312,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1332
1312
  onClick: handleSendButtonClick,
1333
1313
  disabled: isProcessing ? !canStop : !canSend,
1334
1314
  "aria-label": showsStop ? labels.chatInputToolbarStopButtonLabel : labels.chatInputToolbarSendButtonLabel,
1335
- children: showsStop ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Square, { className: "cpk:size-[18px] cpk:fill-current" }) : void 0
1315
+ children: showsStop ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Square, { className: "cpk-chat-input-stop-icon" }) : void 0
1336
1316
  });
1337
1317
  const BoundStartTranscribeButton = renderSlot(startTranscribeButton, CopilotChatInput.StartTranscribeButton, { onClick: onStartTranscribe });
1338
1318
  const BoundCancelTranscribeButton = renderSlot(cancelTranscribeButton, CopilotChatInput.CancelTranscribeButton, { onClick: onCancelTranscribe });
@@ -1547,10 +1527,10 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1547
1527
  role: "listbox",
1548
1528
  "aria-label": labels.chatInputSlashMenuLabel,
1549
1529
  ref: slashMenuRef,
1550
- className: "cpk:absolute cpk:bottom-full cpk:left-0 cpk:right-0 cpk:z-30 cpk:mb-2 cpk:max-h-64 cpk:overflow-y-auto cpk:rounded-lg cpk:border cpk:border-border cpk:bg-white cpk:shadow-lg cpk:dark:border-[#3a3a3a] cpk:dark:bg-[#1f1f1f]",
1530
+ className: "cpk-chat-input-slash-menu",
1551
1531
  style: { maxHeight: `${SLASH_MENU_MAX_VISIBLE_ITEMS * SLASH_MENU_ITEM_HEIGHT_PX}px` },
1552
1532
  children: filteredCommands.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1553
- className: "cpk:px-3 cpk:py-2 cpk:text-sm cpk:text-muted-foreground",
1533
+ className: "cpk-chat-input-slash-menu-empty",
1554
1534
  children: labels.chatInputSlashMenuEmptyText
1555
1535
  }) : filteredCommands.map((item, index) => {
1556
1536
  const isActive = index === slashHighlightIndex;
@@ -1560,7 +1540,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1560
1540
  "aria-selected": isActive,
1561
1541
  "data-active": isActive ? "true" : void 0,
1562
1542
  "data-slash-index": index,
1563
- className: (0, tailwind_merge.twMerge)("cpk:w-full cpk:px-3 cpk:py-2 cpk:text-left cpk:text-sm cpk:transition-colors", "cpk:hover:bg-muted cpk:dark:hover:bg-[#2f2f2f]", isActive ? "cpk:bg-muted cpk:dark:bg-[#2f2f2f]" : "cpk:bg-transparent"),
1543
+ className: "cpk-chat-input-slash-menu-item",
1564
1544
  onMouseEnter: () => setSlashHighlightIndex(index),
1565
1545
  onMouseDown: (event) => {
1566
1546
  event.preventDefault();
@@ -1572,29 +1552,29 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1572
1552
  }) : null;
1573
1553
  const inputPill = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1574
1554
  "data-testid": "copilot-chat-input",
1575
- className: (0, tailwind_merge.twMerge)("copilotKitInput", "cpk:flex cpk:w-full cpk:flex-col cpk:items-center cpk:justify-center", "cpk:cursor-text", "cpk:overflow-visible cpk:bg-clip-padding cpk:contain-inline-size", "cpk:bg-white cpk:dark:bg-[#303030]", "cpk:shadow-[0_4px_4px_0_#0000000a,0_0_1px_0_#0000009e] cpk:rounded-[28px]"),
1555
+ className: "copilotKitInput cpk-chat-input-pill",
1576
1556
  onClick: handleContainerClick,
1577
1557
  "data-layout": isExpanded ? "expanded" : "compact",
1578
1558
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1579
1559
  ref: gridRef,
1580
- className: (0, tailwind_merge.twMerge)("cpk:grid cpk:w-full cpk:gap-x-3 cpk:gap-y-3 cpk:px-3 cpk:py-2", isExpanded ? "cpk:grid-cols-[auto_minmax(0,1fr)_auto] cpk:grid-rows-[auto_auto]" : "cpk:grid-cols-[auto_minmax(0,1fr)_auto] cpk:items-center"),
1560
+ className: "cpk-chat-input-grid",
1581
1561
  "data-layout": isExpanded ? "expanded" : "compact",
1582
1562
  children: [
1583
1563
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1584
1564
  ref: addButtonContainerRef,
1585
- className: (0, tailwind_merge.twMerge)("cpk:flex cpk:items-center", isExpanded ? "cpk:row-start-2" : "cpk:row-start-1", "cpk:col-start-1"),
1565
+ className: "cpk-chat-input-start",
1586
1566
  children: BoundAddMenuButton
1587
1567
  }),
1588
1568
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1589
- className: (0, tailwind_merge.twMerge)("cpk:relative cpk:flex cpk:min-w-0 cpk:flex-col cpk:min-h-[50px] cpk:justify-center", isExpanded ? "cpk:col-span-3 cpk:row-start-1" : "cpk:col-start-2 cpk:row-start-1"),
1569
+ className: "cpk-chat-input-field",
1590
1570
  children: mode === "transcribe" ? BoundAudioRecorder : mode === "processing" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1591
- className: "cpk:flex cpk:w-full cpk:items-center cpk:justify-center cpk:py-3 cpk:px-5",
1592
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Loader2, { className: "cpk:size-[26px] cpk:animate-spin cpk:text-muted-foreground" })
1571
+ className: "cpk-chat-input-processing",
1572
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Loader2, { className: "cpk-chat-input-processing-spinner" })
1593
1573
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [BoundTextArea, slashMenu] })
1594
1574
  }),
1595
1575
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1596
1576
  ref: actionsContainerRef,
1597
- className: (0, tailwind_merge.twMerge)("cpk:flex cpk:items-center cpk:justify-end cpk:gap-2", isExpanded ? "cpk:col-start-3 cpk:row-start-2" : "cpk:col-start-3 cpk:row-start-1"),
1577
+ className: "cpk-chat-input-actions",
1598
1578
  children: mode === "transcribe" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [onCancelTranscribe && BoundCancelTranscribeButton, onFinishTranscribe && BoundFinishTranscribeButton] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [onStartTranscribe && BoundStartTranscribeButton, BoundSendButton] })
1599
1579
  })
1600
1580
  ]
@@ -1634,7 +1614,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1634
1614
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1635
1615
  "data-copilotkit": true,
1636
1616
  ref: containerRef,
1637
- className: cn("cpk:pointer-events-none cpk:relative cpk:z-20", positioning === "absolute" && "cpk:absolute cpk:bottom-0 cpk:left-0 cpk:right-0", className),
1617
+ className: cn("cpk-chat-input", positioning === "absolute" && "cpk-chat-input-absolute", className),
1638
1618
  style: {
1639
1619
  transform: keyboardHeight > 0 ? `translateY(-${keyboardHeight}px)` : void 0,
1640
1620
  transition: "transform 0.2s ease-out",
@@ -1642,7 +1622,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1642
1622
  },
1643
1623
  ...props,
1644
1624
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1645
- className: "cpk:max-w-3xl cpk:mx-auto cpk:py-0 cpk:px-4 cpk:@3xl:px-0 cpk:[div[data-sidebar-chat]_&]:px-8 cpk:[div[data-popup-chat]_&]:px-4 cpk:pointer-events-auto",
1625
+ className: "cpk-chat-input-wrapper",
1646
1626
  children: inputPill
1647
1627
  }), shouldShowDisclaimer && BoundDisclaimer]
1648
1628
  });
@@ -1651,16 +1631,16 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1651
1631
  _CopilotChatInput.SendButton = ({ className, children, ...props }) => {
1652
1632
  const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
1653
1633
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1654
- className: "cpk:mr-[10px]",
1634
+ className: "cpk-chat-input-send",
1655
1635
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
1656
1636
  type: "button",
1657
1637
  "data-testid": "copilot-send-button",
1658
1638
  variant: "chatInputToolbarPrimary",
1659
1639
  size: "chatInputToolbarIcon",
1660
- className,
1640
+ className: cn("cpk-chat-input-send-button", className),
1661
1641
  "aria-label": labels.chatInputToolbarSendButtonLabel,
1662
1642
  ...props,
1663
- children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ArrowUp, { className: "cpk:size-[18px]" })
1643
+ children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ArrowUp, { className: "cpk-chat-input-send-icon" })
1664
1644
  })
1665
1645
  });
1666
1646
  };
@@ -1672,7 +1652,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1672
1652
  type: "button",
1673
1653
  variant: "chatInputToolbarSecondary",
1674
1654
  size: "chatInputToolbarIcon",
1675
- className: (0, tailwind_merge.twMerge)(defaultClassName, className),
1655
+ className: cn(defaultClassName, className),
1676
1656
  "aria-label": labels[labelKey],
1677
1657
  ...props,
1678
1658
  children: icon
@@ -1684,23 +1664,23 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1684
1664
  };
1685
1665
  _CopilotChatInput.StartTranscribeButton = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
1686
1666
  "data-testid": "copilot-start-transcribe-button",
1687
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Mic, { className: "cpk:size-[18px]" }),
1667
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Mic, { className: "cpk-chat-input-toolbar-icon" }),
1688
1668
  labelKey: "chatInputToolbarStartTranscribeButtonLabel",
1689
- defaultClassName: "cpk:mr-2",
1669
+ defaultClassName: "cpk-chat-input-start-transcribe-button",
1690
1670
  ...props
1691
1671
  });
1692
1672
  _CopilotChatInput.CancelTranscribeButton = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
1693
1673
  "data-testid": "copilot-cancel-transcribe-button",
1694
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "cpk:size-[18px]" }),
1674
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "cpk-chat-input-toolbar-icon" }),
1695
1675
  labelKey: "chatInputToolbarCancelTranscribeButtonLabel",
1696
- defaultClassName: "cpk:mr-2",
1676
+ defaultClassName: "cpk-chat-input-cancel-transcribe-button",
1697
1677
  ...props
1698
1678
  });
1699
1679
  _CopilotChatInput.FinishTranscribeButton = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolbarButton, {
1700
1680
  "data-testid": "copilot-finish-transcribe-button",
1701
- icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "cpk:size-[18px]" }),
1681
+ icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "cpk-chat-input-toolbar-icon" }),
1702
1682
  labelKey: "chatInputToolbarFinishTranscribeButtonLabel",
1703
- defaultClassName: "cpk:mr-[10px]",
1683
+ defaultClassName: "cpk-chat-input-finish-transcribe-button",
1704
1684
  ...props
1705
1685
  });
1706
1686
  _CopilotChatInput.AddMenuButton = ({ className, toolsMenu, onAddFile, disabled, ...props }) => {
@@ -1742,11 +1722,11 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1742
1722
  "data-testid": "copilot-add-menu-button",
1743
1723
  variant: "chatInputToolbarSecondary",
1744
1724
  size: "chatInputToolbarIcon",
1745
- className: (0, tailwind_merge.twMerge)("cpk:ml-1", className),
1725
+ className: cn("cpk-chat-input-add-menu-button", className),
1746
1726
  disabled: isDisabled,
1747
1727
  "aria-label": labels.chatInputToolbarAddButtonLabel,
1748
1728
  ...props,
1749
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, { className: "cpk:size-[20px]" })
1729
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Plus, { className: "cpk-chat-input-add-menu-icon" })
1750
1730
  });
1751
1731
  if (!mounted) return button;
1752
1732
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DropdownMenu, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Tooltip, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipTrigger, {
@@ -1758,9 +1738,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1758
1738
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipContent, {
1759
1739
  side: "bottom",
1760
1740
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
1761
- className: "cpk:flex cpk:items-center cpk:gap-1 cpk:text-xs cpk:font-medium",
1741
+ className: "cpk-chat-input-add-menu-tooltip",
1762
1742
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: labels.chatInputToolbarAddButtonLabel }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", {
1763
- className: "cpk:rounded cpk:bg-[#4a4a4a] cpk:px-1 cpk:py-[1px] cpk:font-mono cpk:text-[11px] cpk:text-white cpk:dark:bg-[#e0e0e0] cpk:dark:text-black",
1743
+ className: "cpk-chat-input-add-menu-shortcut",
1764
1744
  children: "/"
1765
1745
  })]
1766
1746
  })
@@ -1781,7 +1761,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1781
1761
  ref: internalTextareaRef,
1782
1762
  "data-testid": "copilot-chat-textarea",
1783
1763
  placeholder: placeholder ?? labels.chatInputPlaceholder,
1784
- className: (0, tailwind_merge.twMerge)("cpk:bg-transparent cpk:outline-none cpk:antialiased cpk:font-regular cpk:leading-relaxed cpk:text-[16px] cpk:placeholder:text-[#00000077] cpk:dark:placeholder:text-[#fffc]", className),
1764
+ className: cn("cpk-chat-input-textarea", className),
1785
1765
  style: {
1786
1766
  overflow: "auto",
1787
1767
  resize: "none",
@@ -1795,7 +1775,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1795
1775
  _CopilotChatInput.Disclaimer = ({ className, ...props }) => {
1796
1776
  const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
1797
1777
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1798
- className: cn("cpk:text-center cpk:text-xs cpk:text-muted-foreground cpk:py-3 cpk:px-4 cpk:max-w-3xl cpk:mx-auto", className),
1778
+ className: cn("cpk-chat-input-disclaimer", className),
1799
1779
  ...props,
1800
1780
  children: labels.chatDisclaimerText
1801
1781
  });
@@ -1963,7 +1943,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1963
1943
 
1964
1944
  //#endregion
1965
1945
  //#region package.json
1966
- var version = "2.0.0-rc.1";
1946
+ var version$1 = "2.0.0-rc.3";
1967
1947
 
1968
1948
  //#endregion
1969
1949
  //#region src/components/CopilotKitInspector.tsx
@@ -1990,7 +1970,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1990
1970
  mod.configureWebInspectorElement(inspector, latestCoreRef.current, {
1991
1971
  development: process.env.NODE_ENV === "development",
1992
1972
  framework: "react",
1993
- sdkVersion: version
1973
+ sdkVersion: version$1
1994
1974
  });
1995
1975
  inspector.addEventListener("cpk-inspector-visibility-change", handleVisibilityChange);
1996
1976
  mountRef.current.appendChild(inspector);
@@ -2814,14 +2794,14 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
2814
2794
  /** failed: a clean hard-failure card that replaces the skeleton in place. */
2815
2795
  function A2UIRecoveryFailure({ content, debugExposure }) {
2816
2796
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2817
- className: "cpk:rounded-lg cpk:border cpk:border-amber-200 cpk:bg-amber-50 cpk:p-3 cpk:text-sm cpk:text-amber-800",
2797
+ className: "cpk-a2ui-recovery-failure",
2818
2798
  children: [
2819
2799
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2820
- className: "cpk:font-medium",
2800
+ className: "cpk-a2ui-recovery-failure-title",
2821
2801
  children: "Couldn't generate the UI"
2822
2802
  }),
2823
2803
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2824
- className: "cpk:mt-1 cpk:text-xs cpk:text-amber-700",
2804
+ className: "cpk-a2ui-recovery-failure-description",
2825
2805
  children: "Something went wrong rendering this. You can keep chatting and try again."
2826
2806
  }),
2827
2807
  debugExposure !== "hidden" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UIDebugDetails, {
@@ -3080,12 +3060,12 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
3080
3060
  function A2UIDebugDetails({ label, open, payload }) {
3081
3061
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", {
3082
3062
  open,
3083
- className: "cpk:mt-2 cpk:text-xs",
3063
+ className: "cpk-a2ui-debug-details",
3084
3064
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", {
3085
- className: "cpk:cursor-pointer cpk:text-gray-500",
3065
+ className: "cpk-a2ui-debug-details-summary",
3086
3066
  children: label
3087
3067
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
3088
- className: "cpk:mt-1 cpk:overflow-auto cpk:rounded cpk:bg-gray-100 cpk:p-2 cpk:text-gray-700",
3068
+ className: "cpk-a2ui-debug-details-payload",
3089
3069
  style: { fontSize: 11 },
3090
3070
  children: JSON.stringify(payload, null, 2)
3091
3071
  })]
@@ -3316,7 +3296,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
3316
3296
  }, [hasOps]);
3317
3297
  if (!hasOps) return renderLifecycle(content);
3318
3298
  const surfaces = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3319
- className: "cpk:flex cpk:min-h-0 cpk:flex-1 cpk:flex-col cpk:gap-6 cpk:overflow-auto cpk:py-6",
3299
+ className: "cpk-a2ui-message-surfaces",
3320
3300
  children: Array.from(groupedOperations.entries()).map(([surfaceId, ops]) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReactSurfaceHost, {
3321
3301
  surfaceId,
3322
3302
  operations: ops,
@@ -3387,7 +3367,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
3387
3367
  */
3388
3368
  function ReactSurfaceHost({ surfaceId, operations, theme, agent, copilotkit, catalog, onAction, onReady }) {
3389
3369
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
3390
- className: "cpk:flex cpk:w-full cpk:flex-none cpk:flex-col cpk:gap-4",
3370
+ className: "cpk-a2ui-message-surface-host",
3391
3371
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_copilotkit_a2ui_renderer.A2UIProvider, {
3392
3372
  onAction: (0, react.useCallback)((message) => runA2UIAction({
3393
3373
  message,
@@ -3416,12 +3396,12 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
3416
3396
  function A2UISurfaceOrError({ surfaceId }) {
3417
3397
  const error = (0, _copilotkit_a2ui_renderer.useA2UIError)();
3418
3398
  if (error) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
3419
- className: "cpk:rounded-lg cpk:border cpk:border-red-200 cpk:bg-red-50 cpk:p-3 cpk:text-sm cpk:text-red-700",
3399
+ className: "cpk-a2ui-message-error",
3420
3400
  children: ["A2UI render error: ", error]
3421
3401
  });
3422
3402
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_copilotkit_a2ui_renderer.A2UIRenderer, {
3423
3403
  surfaceId,
3424
- className: "cpk:flex cpk:flex-1"
3404
+ className: "cpk-a2ui-message-surface"
3425
3405
  });
3426
3406
  }
3427
3407
  /**
@@ -7966,10 +7946,10 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
7966
7946
  function DefaultGenerativeUIChatCard({ surfaceId, isStreaming, error, children }) {
7967
7947
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
7968
7948
  "data-generative-ui-chat-surface": surfaceId,
7969
- className: "cpk:my-2 cpk:w-full cpk:rounded-xl cpk:border cpk:border-gray-200 cpk:p-3",
7949
+ className: "cpk-generative-ui-chat-card",
7970
7950
  children: [children, error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
7971
7951
  role: "alert",
7972
- className: "cpk:mt-2 cpk:text-xs cpk:text-red-600",
7952
+ className: "cpk-generative-ui-chat-card-error",
7973
7953
  children: "Part of this UI couldn't be shown."
7974
7954
  })]
7975
7955
  });
@@ -8049,6 +8029,43 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
8049
8029
  return null;
8050
8030
  }
8051
8031
 
8032
+ //#endregion
8033
+ //#region src/styles/copilot-kit-styles.tsx
8034
+ const StyleOptionsContext = (0, react.createContext)({ inject: true });
8035
+ /** React 19 moves a `<style precedence>` into `<head>` and keeps one copy. */
8036
+ const hoistsStyles = Number.parseInt(react.version, 10) >= 19;
8037
+ /** Passes the provider's style options to `<CopilotKitStyles>`. */
8038
+ const CopilotStyleOptionsProvider = StyleOptionsContext.Provider;
8039
+ /**
8040
+ * Renders the CSS for CopilotKit's UI, so apps never import a stylesheet.
8041
+ * `CopilotChat` (and so `CopilotPopup` and `CopilotSidebar`) renders it for
8042
+ * you. Render it yourself only when you build a layout from the chat parts
8043
+ * without `CopilotChat`.
8044
+ *
8045
+ * React 19 moves the tag into `<head>` and keeps one copy, including in the
8046
+ * server HTML. React 18 renders it in place, one copy per `CopilotChat`.
8047
+ * Each copy holds the same CSS, so a second copy changes nothing.
8048
+ *
8049
+ * With a CSP nonce the tag always renders in place. React only adds a nonce to
8050
+ * a hoisted style when the app renders with `nonce: { style }`, and Next.js
8051
+ * passes a plain string, so a hoisted tag would be blocked.
8052
+ *
8053
+ * Renders nothing when `CopilotKitProvider` has `injectStyles={false}`.
8054
+ */
8055
+ function CopilotKitStyles() {
8056
+ const { nonce, inject } = (0, react.useContext)(StyleOptionsContext);
8057
+ if (!inject) return null;
8058
+ if (nonce || !hoistsStyles) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", {
8059
+ nonce,
8060
+ dangerouslySetInnerHTML: { __html: _copilotkit_core_styles.stylesheet }
8061
+ });
8062
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", {
8063
+ href: "copilotkit",
8064
+ precedence: "copilotkit",
8065
+ children: _copilotkit_core_styles.stylesheet
8066
+ });
8067
+ }
8068
+
8052
8069
  //#endregion
8053
8070
  //#region src/providers/CopilotKitProvider.tsx
8054
8071
  const zodToJsonSchemaAdapter = (schema, options) => {
@@ -8095,7 +8112,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
8095
8112
  return value;
8096
8113
  }
8097
8114
  /** Provide a shared core instance and synchronize runtime, tool, and UI configuration. */
8098
- const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, messageFilter, publicApiKey, publicLicenseKey, licenseToken, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, markdownRenderer, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, showIntelligenceIndicator = true, useSingleEndpoint, onError, a2ui, generativeUI, mcpApps, defaultThrottleMs, debug, learning }) => {
8115
+ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, nonce, injectStyles = true, messageFilter, publicApiKey, publicLicenseKey, licenseToken, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, markdownRenderer, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, showIntelligenceIndicator = true, useSingleEndpoint, onError, a2ui, generativeUI, mcpApps, defaultThrottleMs, debug, learning }) => {
8099
8116
  const learningConfig = (0, react.useMemo)(() => toLearningConfig(learning), [learning]);
8100
8117
  const [shouldRenderInspector, setShouldRenderInspector] = (0, react.useState)(false);
8101
8118
  const [inspectorVisible, setInspectorVisible] = (0, react.useState)(false);
@@ -8574,41 +8591,47 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
8574
8591
  runtimeLicenseStatus
8575
8592
  ]);
8576
8593
  const runtimeLicenseWarningStatus = runtimeEntitlementRetryInProgress ? void 0 : licenseContextValue.status ?? void 0;
8577
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SandboxFunctionsContext.Provider, {
8578
- value: sandboxFunctionsList,
8579
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotKitContext.Provider, {
8580
- value: contextValue,
8581
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(LicenseContext.Provider, {
8582
- value: licenseContextValue,
8583
- children: [
8584
- a2uiActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UIBuiltInToolCallRenderer, {}),
8585
- generativeUIActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GenerativeUIToolCallRenderer, {}),
8586
- a2uiActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UICatalogContext, {
8587
- catalog: filteredCatalog,
8588
- includeSchema: a2ui?.includeSchema
8589
- }),
8590
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MarkdownRendererProvider, {
8591
- renderer: markdownRenderer,
8592
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CopilotKitInspectorContextProvider, {
8593
- value: inspectorContextValue,
8594
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotKitAgentIdContext.Provider, {
8595
- value: agentId,
8596
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GenerativeUIRuntimeContext.Provider, {
8597
- value: generativeUIRuntime,
8598
- children
8599
- })
8600
- }), shouldRenderInspector ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotKitInspector, {
8601
- core: copilotkit,
8602
- openRequest: inspectorOpenRequest,
8603
- onVisibilityChange: setInspectorVisible
8604
- }) : null]
8605
- })
8606
- }),
8607
- runtimeLicenseWarningStatus === "none" && !resolvedPublicKey && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "no_license" }),
8608
- runtimeLicenseWarningStatus === "expired" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "expired" }),
8609
- runtimeLicenseWarningStatus === "invalid" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "invalid" }),
8610
- runtimeLicenseWarningStatus === "expiring" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "expiring" })
8611
- ]
8594
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotStyleOptionsProvider, {
8595
+ value: (0, react.useMemo)(() => ({
8596
+ nonce,
8597
+ inject: injectStyles
8598
+ }), [nonce, injectStyles]),
8599
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SandboxFunctionsContext.Provider, {
8600
+ value: sandboxFunctionsList,
8601
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotKitContext.Provider, {
8602
+ value: contextValue,
8603
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(LicenseContext.Provider, {
8604
+ value: licenseContextValue,
8605
+ children: [
8606
+ a2uiActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UIBuiltInToolCallRenderer, {}),
8607
+ generativeUIActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GenerativeUIToolCallRenderer, {}),
8608
+ a2uiActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UICatalogContext, {
8609
+ catalog: filteredCatalog,
8610
+ includeSchema: a2ui?.includeSchema
8611
+ }),
8612
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MarkdownRendererProvider, {
8613
+ renderer: markdownRenderer,
8614
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CopilotKitInspectorContextProvider, {
8615
+ value: inspectorContextValue,
8616
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotKitAgentIdContext.Provider, {
8617
+ value: agentId,
8618
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GenerativeUIRuntimeContext.Provider, {
8619
+ value: generativeUIRuntime,
8620
+ children
8621
+ })
8622
+ }), shouldRenderInspector ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotKitInspector, {
8623
+ core: copilotkit,
8624
+ openRequest: inspectorOpenRequest,
8625
+ onVisibilityChange: setInspectorVisible
8626
+ }) : null]
8627
+ })
8628
+ }),
8629
+ runtimeLicenseWarningStatus === "none" && !resolvedPublicKey && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "no_license" }),
8630
+ runtimeLicenseWarningStatus === "expired" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "expired" }),
8631
+ runtimeLicenseWarningStatus === "invalid" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "invalid" }),
8632
+ runtimeLicenseWarningStatus === "expiring" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LicenseWarningBanner, { type: "expiring" })
8633
+ ]
8634
+ })
8612
8635
  })
8613
8636
  })
8614
8637
  });
@@ -9107,10 +9130,10 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9107
9130
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9108
9131
  ref,
9109
9132
  id,
9110
- className: (0, tailwind_merge.twMerge)("cpk:grid cpk:transition-[grid-template-rows] cpk:duration-300 cpk:ease-[cubic-bezier(0.16,1,0.3,1)] cpk:motion-reduce:transition-none", className),
9133
+ className: cn("cpk-collapsible", className),
9111
9134
  style: { gridTemplateRows: open ? "1fr" : "0fr" },
9112
9135
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9113
- className: "cpk:min-h-0 cpk:overflow-hidden",
9136
+ className: "cpk-collapsible-content",
9114
9137
  children
9115
9138
  })
9116
9139
  });
@@ -9124,20 +9147,20 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9124
9147
  }[status];
9125
9148
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
9126
9149
  "aria-hidden": "true",
9127
- className: (0, tailwind_merge.twMerge)("cpk:size-3.5 cpk:shrink-0 cpk:text-muted-foreground", status === "running" && "cpk:animate-spin", status === "failed" && "cpk:text-destructive", className)
9150
+ className: cn("cpk-tool-call-status-icon", status === "running" && "cpk-tool-call-status-icon-running", status === "failed" && "cpk-tool-call-status-icon-failed", className)
9128
9151
  });
9129
9152
  }
9130
9153
  function Chevron({ open, className }) {
9131
9154
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, {
9132
9155
  "aria-hidden": "true",
9133
- className: (0, tailwind_merge.twMerge)("cpk:size-3.5 cpk:shrink-0 cpk:transition-transform cpk:duration-200", open && "cpk:rotate-90", className)
9156
+ className: cn("cpk-tool-call-chevron", open && "cpk-tool-call-chevron-open", className)
9134
9157
  });
9135
9158
  }
9136
9159
  function FailedCount({ calls }) {
9137
9160
  const failed = calls.filter((call) => call.toolMessage?.error).length;
9138
9161
  if (!failed) return null;
9139
9162
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
9140
- className: "cpk:shrink-0 cpk:text-destructive",
9163
+ className: "cpk-tool-call-failed-count",
9141
9164
  children: [failed, " failed"]
9142
9165
  });
9143
9166
  }
@@ -9160,10 +9183,10 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9160
9183
  }
9161
9184
  function Payload({ label, value }) {
9162
9185
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9163
- className: "cpk:text-[11px] cpk:font-medium cpk:uppercase cpk:tracking-wide cpk:text-muted-foreground",
9186
+ className: "cpk-tool-call-payload-label",
9164
9187
  children: label
9165
9188
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
9166
- className: "cpk:m-0 cpk:mt-1.5 cpk:max-h-[200px] cpk:overflow-auto cpk:rounded-lg cpk:bg-muted cpk:p-2.5 cpk:font-mono cpk:text-xs cpk:leading-relaxed cpk:text-foreground cpk:whitespace-pre-wrap cpk:break-words",
9189
+ className: "cpk-tool-call-payload-code",
9167
9190
  children: stringifyPayload(value)
9168
9191
  })] });
9169
9192
  }
@@ -9173,7 +9196,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9173
9196
  */
9174
9197
  function ToolCallPayloads({ parameters, result, className }) {
9175
9198
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9176
- className: (0, tailwind_merge.twMerge)("cpk:grid cpk:gap-3", className),
9199
+ className: cn("cpk-tool-call-payloads", className),
9177
9200
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Payload, {
9178
9201
  label: "Arguments",
9179
9202
  value: parameters ?? {}
@@ -9192,36 +9215,35 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9192
9215
  const [open, setOpen] = (0, react.useState)(false);
9193
9216
  const detailsId = (0, react.useId)();
9194
9217
  const preview = argumentPreview(parameters);
9195
- const line = appearance === "line";
9196
9218
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9197
9219
  "data-copilotkit": true,
9198
- className: (0, tailwind_merge.twMerge)(appearance === "card" && "cpk:border-t cpk:border-border", className),
9220
+ className: cn("cpk-tool-call-row", `cpk-tool-call-row-${appearance}`, className),
9199
9221
  ...props,
9200
9222
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
9201
9223
  type: "button",
9202
9224
  "aria-expanded": open,
9203
9225
  "aria-controls": detailsId,
9204
9226
  onClick: () => setOpen((value) => !value),
9205
- className: (0, tailwind_merge.twMerge)("cpk:group/row cpk:m-0 cpk:flex cpk:min-w-0 cpk:cursor-pointer cpk:items-center cpk:gap-2 cpk:border-none cpk:bg-transparent cpk:text-left cpk:text-[13px] cpk:text-inherit cpk:transition-colors cpk:hover:bg-accent/60 cpk:focus-visible:outline-2 cpk:focus-visible:-outline-offset-2 cpk:focus-visible:outline-ring", line ? "cpk:-mx-1.5 cpk:w-[calc(100%+0.75rem)] cpk:rounded-md cpk:px-1.5 cpk:py-1" : appearance === "stack" ? "cpk:w-full cpk:px-3.5 cpk:py-2.5" : "cpk:w-full cpk:px-3.5 cpk:py-2"),
9227
+ className: "cpk-tool-call-row-button",
9206
9228
  children: [
9207
9229
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusIcon, { status }),
9208
9230
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9209
9231
  "data-testid": "copilot-tool-render-name",
9210
- className: (0, tailwind_merge.twMerge)("cpk:shrink-0 cpk:font-mono cpk:text-[13px] cpk:font-medium cpk:text-foreground", status === "running" && "cpk-shimmer"),
9232
+ className: cn("cpk-tool-call-row-name", status === "running" && "cpk-shimmer"),
9211
9233
  children: name
9212
9234
  }),
9213
9235
  preview && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9214
- className: "cpk:min-w-0 cpk:truncate cpk:font-mono cpk:text-[13px] cpk:text-muted-foreground",
9236
+ className: "cpk-tool-call-row-preview",
9215
9237
  children: preview
9216
9238
  }),
9217
9239
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9218
9240
  "data-testid": "copilot-tool-render-status",
9219
- className: "cpk:sr-only",
9241
+ className: "cpk-tool-call-row-status",
9220
9242
  children: statusLabels[status]
9221
9243
  }),
9222
9244
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron, {
9223
9245
  open,
9224
- className: (0, tailwind_merge.twMerge)("cpk:ml-auto cpk:text-muted-foreground", !open && "cpk:opacity-0 cpk:group-hover/row:opacity-100 cpk:group-focus-visible/row:opacity-100")
9246
+ className: "cpk-tool-call-row-chevron"
9225
9247
  })
9226
9248
  ]
9227
9249
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Collapsible, {
@@ -9230,7 +9252,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9230
9252
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolCallPayloads, {
9231
9253
  parameters,
9232
9254
  result,
9233
- className: line ? "cpk:mt-1 cpk:mb-2 cpk:ml-5.5" : "cpk:px-3.5 cpk:pt-1 cpk:pb-3"
9255
+ className: "cpk-tool-call-row-payloads"
9234
9256
  })
9235
9257
  })]
9236
9258
  });
@@ -9272,16 +9294,16 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9272
9294
  ...props
9273
9295
  };
9274
9296
  const runningLabel = current && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
9275
- className: "cpk:shrink-0 cpk:font-medium cpk-shimmer",
9297
+ className: "cpk-tool-call-group-running cpk-shimmer",
9276
9298
  children: ["Running ", current.toolCall.function.name]
9277
9299
  }), preview && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9278
- className: "cpk:min-w-0 cpk:truncate cpk:font-mono cpk:text-xs cpk:opacity-70",
9300
+ className: "cpk-tool-call-group-preview",
9279
9301
  children: preview
9280
9302
  })] });
9281
9303
  if (appearance === "line") {
9282
9304
  if (calls.length === 1 && !current) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9283
9305
  ...groupProps,
9284
- className: (0, tailwind_merge.twMerge)("cpk:my-2", className),
9306
+ className: cn("cpk-tool-call-group cpk-tool-call-group-line cpk-tool-call-group-single", className),
9285
9307
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolCallGroupContext.Provider, {
9286
9308
  value: {
9287
9309
  appearance: "line",
@@ -9293,20 +9315,20 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9293
9315
  });
9294
9316
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9295
9317
  ...groupProps,
9296
- className: (0, tailwind_merge.twMerge)("cpk:my-3", className),
9318
+ className: cn("cpk-tool-call-group cpk-tool-call-group-line", className),
9297
9319
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
9298
9320
  type: "button",
9299
9321
  "aria-expanded": open,
9300
9322
  "aria-controls": bodyId,
9301
9323
  onClick: () => setOpen((value) => !value),
9302
- className: "cpk:m-0 cpk:inline-flex cpk:max-w-full cpk:min-w-0 cpk:cursor-pointer cpk:items-center cpk:gap-1.5 cpk:rounded-md cpk:border-none cpk:bg-transparent cpk:p-0 cpk:py-0.5 cpk:text-sm cpk:text-muted-foreground cpk:transition-colors cpk:hover:text-foreground cpk:focus-visible:outline-2 cpk:focus-visible:outline-ring",
9324
+ className: "cpk-tool-call-group-line-toggle",
9303
9325
  children: [runningLabel || /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
9304
9326
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
9305
- className: "cpk:shrink-0 cpk:font-medium",
9327
+ className: "cpk-tool-call-group-line-summary",
9306
9328
  children: ["Used ", pluralize(calls.length, "tool")]
9307
9329
  }),
9308
9330
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9309
- className: "cpk:min-w-0 cpk:truncate cpk:font-mono cpk:text-xs cpk:opacity-70",
9331
+ className: "cpk-tool-call-group-line-names",
9310
9332
  children: toolNames(calls)
9311
9333
  }),
9312
9334
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FailedCount, { calls })
@@ -9315,7 +9337,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9315
9337
  open,
9316
9338
  id: bodyId,
9317
9339
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9318
- className: "cpk:mt-1 cpk:ml-1 cpk:border-l-2 cpk:border-border cpk:py-0.5 cpk:pl-3",
9340
+ className: "cpk-tool-call-group-line-body",
9319
9341
  children: rows("line")
9320
9342
  })
9321
9343
  })]
@@ -9323,22 +9345,22 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9323
9345
  }
9324
9346
  if (appearance === "stack") {
9325
9347
  const behind = open ? 0 : Math.min(calls.length - 1, 2);
9326
- const layer = "cpk:rounded-xl cpk:border cpk:border-border cpk:bg-card cpk:text-card-foreground";
9348
+ const layer = "cpk-tool-call-group-stack-layer";
9327
9349
  const latestStatus = entryStatus(latest, isActive);
9328
9350
  const latestPreview = entryPreview(latest);
9329
9351
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9330
9352
  ...groupProps,
9331
- className: (0, tailwind_merge.twMerge)("cpk:my-3", className),
9353
+ className: cn("cpk-tool-call-group cpk-tool-call-group-stack", className),
9332
9354
  style: {
9333
9355
  paddingBottom: behind * 6,
9334
9356
  ...props.style
9335
9357
  },
9336
9358
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9337
- className: "cpk:relative cpk:isolate",
9359
+ className: "cpk-tool-call-group-stack-pile",
9338
9360
  children: [
9339
9361
  Array.from({ length: behind }, (_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9340
9362
  "aria-hidden": "true",
9341
- className: (0, tailwind_merge.twMerge)(layer, "cpk:absolute cpk:inset-0"),
9363
+ className: cn(layer, "cpk-tool-call-group-stack-behind"),
9342
9364
  style: {
9343
9365
  transform: `translateY(${(index + 1) * 6}px) scaleX(${1 - (index + 1) * .045})`,
9344
9366
  zIndex: -1 - index,
@@ -9350,58 +9372,58 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9350
9372
  "aria-expanded": open,
9351
9373
  "aria-controls": open ? bodyId : void 0,
9352
9374
  onClick: () => setOpen((value) => !value),
9353
- className: (0, tailwind_merge.twMerge)("cpk:relative cpk:m-0 cpk:flex cpk:min-w-0 cpk:cursor-pointer cpk:items-center cpk:text-left cpk:transition-colors cpk:focus-visible:outline-2 cpk:focus-visible:outline-ring", open ? "cpk:mb-1.5 cpk:w-full cpk:gap-1.5 cpk:rounded-md cpk:border-none cpk:bg-transparent cpk:p-0 cpk:py-0.5 cpk:text-xs cpk:text-muted-foreground cpk:hover:text-foreground" : (0, tailwind_merge.twMerge)(layer, "cpk:w-full cpk:gap-2 cpk:px-3.5 cpk:py-2.5 cpk:text-[13px] cpk:shadow-[0_1px_2px_rgb(0_0_0/0.04)] cpk:hover:bg-accent")),
9375
+ className: cn("cpk-tool-call-group-stack-toggle", open ? "cpk-tool-call-group-stack-toggle-open" : [layer, "cpk-tool-call-group-stack-toggle-closed"]),
9354
9376
  children: open ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
9355
9377
  pluralize(calls.length, "tool call"),
9356
9378
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FailedCount, { calls }),
9357
9379
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
9358
- className: "cpk:ml-auto cpk:inline-flex cpk:items-center cpk:gap-1",
9380
+ className: "cpk-tool-call-group-stack-collapse",
9359
9381
  children: ["Collapse", /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron, {
9360
9382
  open: true,
9361
- className: "cpk:-rotate-90"
9383
+ className: "cpk-tool-call-group-stack-collapse-icon"
9362
9384
  })]
9363
9385
  })
9364
9386
  ] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
9365
- className: "cpk:flex cpk:min-w-0 cpk:flex-1 cpk:items-center cpk:gap-2 cpk:animate-[cpk-stack-drop_260ms_cubic-bezier(0.16,1,0.3,1)] cpk:motion-reduce:animate-none",
9387
+ className: "cpk-tool-call-group-stack-latest",
9366
9388
  children: [
9367
9389
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusIcon, { status: latestStatus }),
9368
9390
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9369
- className: (0, tailwind_merge.twMerge)("cpk:shrink-0 cpk:font-mono cpk:font-medium cpk:text-foreground", latestStatus === "running" && "cpk-shimmer"),
9391
+ className: cn("cpk-tool-call-group-stack-name", latestStatus === "running" && "cpk-shimmer"),
9370
9392
  children: latest.toolCall.function.name
9371
9393
  }),
9372
9394
  latestPreview && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9373
- className: "cpk:min-w-0 cpk:truncate cpk:font-mono cpk:text-muted-foreground",
9395
+ className: "cpk-tool-call-group-stack-preview",
9374
9396
  children: latestPreview
9375
9397
  }),
9376
9398
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9377
- className: "cpk:sr-only",
9399
+ className: "cpk-tool-call-group-stack-status",
9378
9400
  children: statusLabels[latestStatus]
9379
9401
  })
9380
9402
  ]
9381
9403
  }, latest.toolCall.id), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
9382
- className: "cpk:ml-2 cpk:inline-flex cpk:shrink-0 cpk:items-center cpk:gap-2 cpk:text-xs cpk:text-muted-foreground",
9404
+ className: "cpk-tool-call-group-stack-meta",
9383
9405
  children: [
9384
9406
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FailedCount, { calls }),
9385
9407
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9386
- className: "cpk:tabular-nums",
9408
+ className: "cpk-tool-call-group-stack-count",
9387
9409
  children: pluralize(calls.length, "call")
9388
9410
  }),
9389
9411
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron, {
9390
9412
  open: false,
9391
- className: "cpk:rotate-90"
9413
+ className: "cpk-tool-call-group-stack-expand-icon"
9392
9414
  })
9393
9415
  ]
9394
9416
  })] })
9395
9417
  }),
9396
9418
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9397
9419
  "aria-live": "polite",
9398
- className: "cpk:sr-only",
9420
+ className: "cpk-tool-call-group-stack-live",
9399
9421
  children: open ? "" : `${latest.toolCall.function.name}: ${statusLabels[latestStatus]}`
9400
9422
  })
9401
9423
  ]
9402
9424
  }), open && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9403
9425
  id: bodyId,
9404
- className: "cpk:grid cpk:gap-1.5",
9426
+ className: "cpk-tool-call-group-stack-items",
9405
9427
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolCallGroupContext.Provider, {
9406
9428
  value: {
9407
9429
  appearance: "stack",
@@ -9409,7 +9431,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9409
9431
  active: isActive
9410
9432
  },
9411
9433
  children: calls.map((call, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9412
- className: (0, tailwind_merge.twMerge)(layer, "cpk:overflow-hidden cpk:shadow-[0_1px_2px_rgb(0_0_0/0.04)] cpk:animate-[cpk-stack-fan_240ms_cubic-bezier(0.16,1,0.3,1)_both] cpk:motion-reduce:animate-none"),
9434
+ className: cn(layer, "cpk-tool-call-group-stack-item"),
9413
9435
  style: { animationDelay: `${index * 30}ms` },
9414
9436
  children: renderCall(call)
9415
9437
  }, call.toolCall.id))
@@ -9419,26 +9441,26 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9419
9441
  }
9420
9442
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9421
9443
  ...groupProps,
9422
- className: (0, tailwind_merge.twMerge)("cpk:my-3 cpk:overflow-hidden cpk:rounded-xl cpk:border cpk:border-border cpk:bg-card cpk:text-card-foreground", className),
9444
+ className: cn("cpk-tool-call-group cpk-tool-call-group-card", className),
9423
9445
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
9424
9446
  type: "button",
9425
9447
  "aria-expanded": open,
9426
9448
  "aria-controls": bodyId,
9427
9449
  onClick: () => setOpen((value) => !value),
9428
- className: "cpk:m-0 cpk:flex cpk:w-full cpk:min-w-0 cpk:cursor-pointer cpk:items-center cpk:gap-2.5 cpk:border-none cpk:bg-transparent cpk:px-3.5 cpk:py-2.5 cpk:text-left cpk:text-[13px] cpk:text-inherit cpk:transition-colors cpk:hover:bg-accent/60 cpk:focus-visible:outline-2 cpk:focus-visible:-outline-offset-2 cpk:focus-visible:outline-ring",
9450
+ className: "cpk-tool-call-group-card-toggle",
9429
9451
  children: [
9430
9452
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusIcon, { status }),
9431
9453
  runningLabel || /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
9432
- className: "cpk:shrink-0 cpk:font-medium cpk:text-foreground",
9454
+ className: "cpk-tool-call-group-card-summary",
9433
9455
  children: ["Used ", pluralize(calls.length, "tool")]
9434
9456
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9435
- className: "cpk:min-w-0 cpk:truncate cpk:font-mono cpk:text-xs cpk:text-muted-foreground",
9457
+ className: "cpk-tool-call-group-card-names",
9436
9458
  children: toolNames(calls)
9437
9459
  })] }),
9438
9460
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
9439
- className: "cpk:ml-auto cpk:flex cpk:shrink-0 cpk:items-center cpk:gap-2 cpk:pl-2 cpk:text-xs cpk:text-muted-foreground",
9461
+ className: "cpk-tool-call-group-card-meta",
9440
9462
  children: [status === "failed" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FailedCount, { calls }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9441
- className: "cpk:tabular-nums",
9463
+ className: "cpk-tool-call-group-card-status",
9442
9464
  children: status !== "running" ? statusLabels[status] : done > 0 && `${done} done`
9443
9465
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Chevron, { open })]
9444
9466
  })
@@ -9574,8 +9596,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9574
9596
  appearance: group.appearance
9575
9597
  });
9576
9598
  const statusLabel = isActive ? "Running" : isComplete ? "Done" : status;
9577
- const dotClassName = isActive ? "cpk:bg-amber-500" : isComplete ? "cpk:bg-emerald-500" : "cpk:bg-zinc-400";
9578
- const badgeClassName = isActive ? "cpk:bg-amber-100 cpk:text-amber-800 cpk:dark:bg-amber-500/15 cpk:dark:text-amber-400" : isComplete ? "cpk:bg-emerald-100 cpk:text-emerald-800 cpk:dark:bg-emerald-500/15 cpk:dark:text-emerald-400" : "cpk:bg-zinc-100 cpk:text-zinc-800 cpk:dark:bg-zinc-700/40 cpk:dark:text-zinc-300";
9599
+ const tone = isActive ? "running" : isComplete ? "done" : "other";
9579
9600
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9580
9601
  "data-testid": "copilot-tool-render",
9581
9602
  "data-tool-name": name,
@@ -9583,20 +9604,20 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9583
9604
  "data-status": status,
9584
9605
  "data-args": safeStringifyForAttr(parameters),
9585
9606
  "data-result": safeStringifyForAttr(result),
9586
- className: "cpk:mt-2 cpk:pb-2",
9607
+ className: "cpk-default-tool-call",
9587
9608
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9588
- className: "cpk:rounded-xl cpk:border cpk:border-zinc-200/60 cpk:bg-white/70 cpk:p-4 cpk:shadow-sm cpk:backdrop-blur cpk:dark:border-zinc-800/60 cpk:dark:bg-zinc-900/50",
9609
+ className: "cpk-default-tool-call-card",
9589
9610
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
9590
9611
  type: "button",
9591
9612
  "aria-expanded": isExpanded,
9592
9613
  onClick: () => setIsExpanded(!isExpanded),
9593
- className: "cpk:flex cpk:w-full cpk:cursor-pointer cpk:select-none cpk:items-center cpk:justify-between cpk:gap-2.5 cpk:border-none cpk:bg-transparent cpk:p-0 cpk:m-0 cpk:text-left cpk:text-inherit",
9614
+ className: "cpk-default-tool-call-header",
9594
9615
  style: { font: "inherit" },
9595
9616
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9596
- className: "cpk:flex cpk:min-w-0 cpk:items-center cpk:gap-2",
9617
+ className: "cpk-default-tool-call-title",
9597
9618
  children: [
9598
9619
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
9599
- className: `cpk:h-3.5 cpk:w-3.5 cpk:flex-shrink-0 cpk:text-zinc-500 cpk:transition-transform cpk:dark:text-zinc-400 ${isExpanded ? "cpk:rotate-90" : ""}`,
9620
+ className: cn("cpk-default-tool-call-chevron", isExpanded && "cpk-default-tool-call-chevron-open"),
9600
9621
  fill: "none",
9601
9622
  viewBox: "0 0 24 24",
9602
9623
  strokeWidth: 2,
@@ -9607,31 +9628,31 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9607
9628
  d: "M8.25 4.5l7.5 7.5-7.5 7.5"
9608
9629
  })
9609
9630
  }),
9610
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `cpk:inline-block cpk:h-2 cpk:w-2 cpk:flex-shrink-0 cpk:rounded-full ${dotClassName}` }),
9631
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `cpk-default-tool-call-dot cpk-default-tool-call-dot-${tone}` }),
9611
9632
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9612
9633
  "data-testid": "copilot-tool-render-name",
9613
- className: "cpk:truncate cpk:text-[13px] cpk:font-semibold cpk:text-zinc-900 cpk:dark:text-zinc-100",
9634
+ className: "cpk-default-tool-call-name",
9614
9635
  children: name
9615
9636
  })
9616
9637
  ]
9617
9638
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
9618
9639
  "data-testid": "copilot-tool-render-status",
9619
- className: `cpk:inline-flex cpk:flex-shrink-0 cpk:items-center cpk:rounded-full cpk:px-2 cpk:py-0.5 cpk:text-[11px] cpk:font-medium ${badgeClassName}`,
9640
+ className: `cpk-default-tool-call-badge cpk-default-tool-call-badge-${tone}`,
9620
9641
  children: statusLabel
9621
9642
  })]
9622
9643
  }), isExpanded && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
9623
- className: "cpk:mt-3 cpk:grid cpk:gap-3",
9644
+ className: "cpk-default-tool-call-details",
9624
9645
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9625
- className: "cpk:text-[10px] cpk:uppercase cpk:text-zinc-500 cpk:dark:text-zinc-400",
9646
+ className: "cpk-default-tool-call-label",
9626
9647
  children: "Arguments"
9627
9648
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
9628
- className: "cpk:mt-1.5 cpk:max-h-[200px] cpk:overflow-auto cpk:rounded-md cpk:bg-zinc-100 cpk:p-2.5 cpk:text-[11px] cpk:leading-relaxed cpk:text-zinc-800 cpk:whitespace-pre-wrap cpk:break-words cpk:dark:bg-zinc-800/60 cpk:dark:text-zinc-200",
9649
+ className: "cpk-default-tool-call-code",
9629
9650
  children: safeStringifyForPre(parameters ?? {})
9630
9651
  })] }), result !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
9631
- className: "cpk:text-[10px] cpk:uppercase cpk:text-zinc-500 cpk:dark:text-zinc-400",
9652
+ className: "cpk-default-tool-call-label",
9632
9653
  children: "Result"
9633
9654
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
9634
- className: "cpk:mt-1.5 cpk:max-h-[200px] cpk:overflow-auto cpk:rounded-md cpk:bg-zinc-100 cpk:p-2.5 cpk:text-[11px] cpk:leading-relaxed cpk:text-zinc-800 cpk:whitespace-pre-wrap cpk:break-words cpk:dark:bg-zinc-800/60 cpk:dark:text-zinc-200",
9655
+ className: "cpk-default-tool-call-code",
9635
9656
  children: typeof result === "string" ? result : safeStringifyForPre(result)
9636
9657
  })] })]
9637
9658
  })]
@@ -11474,9 +11495,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
11474
11495
  const failedIds = new Set(segment.calls.filter((call) => call.toolMessage?.error).map((call) => call.toolCall.id));
11475
11496
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Collapsible, {
11476
11497
  open: workOpen ?? true,
11477
- className: "cpk:-mx-2",
11498
+ className: "cpk-tool-calls-view-turn",
11478
11499
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
11479
- className: "cpk:px-2 cpk:py-1.5",
11500
+ className: "cpk-tool-calls-view-turn-rows",
11480
11501
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToolCallGroupContext.Provider, {
11481
11502
  value: {
11482
11503
  appearance: "line",
@@ -11521,7 +11542,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
11521
11542
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
11522
11543
  ...props,
11523
11544
  "aria-hidden": "true",
11524
- className: (0, tailwind_merge.twMerge)("cpk:size-4", className),
11545
+ className: cn("cpk-inspector-button-kite-icon", className),
11525
11546
  viewBox: "4.57 3.36 17.8 17.8",
11526
11547
  fill: "none",
11527
11548
  children: [
@@ -11669,7 +11690,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
11669
11690
  size: "icon",
11670
11691
  "data-testid": "copilot-inspector-button",
11671
11692
  "aria-label": `${labels.assistantMessageToolbarInspectorTitle} (${labels.assistantMessageToolbarInspectorLocalOnlyLabel.toLowerCase()})`,
11672
- className: (0, tailwind_merge.twMerge)("cpk:size-8 cpk:p-1.5", className),
11693
+ className: cn("cpk-inspector-button", className),
11673
11694
  onPointerEnter: (event) => {
11674
11695
  onPointerEnter?.(event);
11675
11696
  if (!disabled && event.pointerType !== "touch") {
@@ -11699,7 +11720,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
11699
11720
  },
11700
11721
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Wrench, {
11701
11722
  "aria-hidden": "true",
11702
- className: "cpk:size-4",
11723
+ className: "cpk-inspector-button-icon",
11703
11724
  "data-testid": "copilot-inspector-icon"
11704
11725
  })
11705
11726
  })
@@ -11707,7 +11728,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
11707
11728
  align: "start",
11708
11729
  side: "top",
11709
11730
  sideOffset: 6,
11710
- className: (0, tailwind_merge.twMerge)("cpk:w-64 cpk:p-1 cpk:text-sm", dark && "dark"),
11731
+ className: cn("cpk-inspector-button-menu", dark && "dark"),
11711
11732
  onPointerEnter: cancelClose,
11712
11733
  onPointerLeave: scheduleClose,
11713
11734
  onKeyDown: () => {
@@ -11722,9 +11743,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
11722
11743
  onFocusOutside: () => changeOpen(false),
11723
11744
  children: [
11724
11745
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DropdownMenuLabel, {
11725
- className: "cpk:flex cpk:items-center cpk:justify-between cpk:gap-3 cpk:px-2 cpk:py-2",
11746
+ className: "cpk-inspector-button-menu-header",
11726
11747
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11727
- className: "cpk:text-xs cpk:font-medium",
11748
+ className: "cpk-inspector-button-menu-title",
11728
11749
  children: labels.assistantMessageToolbarInspectorTitle
11729
11750
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Tooltip, {
11730
11751
  delayDuration: 1e3,
@@ -11732,13 +11753,13 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
11732
11753
  asChild: true,
11733
11754
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11734
11755
  tabIndex: 0,
11735
- className: "cpk:cursor-help cpk:rounded cpk:bg-muted cpk:px-1.5 cpk:py-0.5 cpk:text-[10px] cpk:font-normal cpk:text-muted-foreground",
11756
+ className: "cpk-inspector-button-local-badge",
11736
11757
  children: labels.assistantMessageToolbarInspectorLocalOnlyLabel
11737
11758
  })
11738
11759
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TooltipContent, {
11739
11760
  side: "top",
11740
11761
  sideOffset: 6,
11741
- className: (0, tailwind_merge.twMerge)("cpk:max-w-48 cpk:text-wrap", dark && "dark"),
11762
+ className: cn("cpk-inspector-button-local-tooltip", dark && "dark"),
11742
11763
  onPointerEnter: cancelClose,
11743
11764
  onPointerLeave: scheduleClose,
11744
11765
  children: labels.assistantMessageToolbarInspectorLocalOnlyDescription
@@ -11751,27 +11772,27 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
11751
11772
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
11752
11773
  type: "button",
11753
11774
  onClick,
11754
- className: "cpk:w-full cpk:cursor-pointer cpk:items-start cpk:text-left",
11755
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(InspectorKiteIcon, { className: "cpk:mt-0.5" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11756
- className: "cpk:block",
11775
+ className: "cpk-inspector-button-menu-item cpk-inspector-button-inspect-item",
11776
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(InspectorKiteIcon, { className: "cpk-inspector-button-menu-item-icon" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11777
+ className: "cpk-inspector-button-menu-item-label",
11757
11778
  children: primaryLabel
11758
11779
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11759
- className: "cpk:block cpk:text-xs cpk:text-muted-foreground",
11780
+ className: "cpk-inspector-button-menu-item-description",
11760
11781
  children: labels.assistantMessageToolbarInspectorDescription
11761
11782
  })] })]
11762
11783
  })
11763
11784
  }),
11764
11785
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DropdownMenuItem, {
11765
11786
  onSelect: hideShortcuts,
11766
- className: "cpk:cursor-pointer cpk:items-start",
11787
+ className: "cpk-inspector-button-menu-item cpk-inspector-button-hide-item",
11767
11788
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.EyeOff, {
11768
11789
  "aria-hidden": "true",
11769
- className: "cpk:mt-0.5"
11790
+ className: "cpk-inspector-button-menu-item-icon"
11770
11791
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11771
- className: "cpk:block",
11792
+ className: "cpk-inspector-button-menu-item-label",
11772
11793
  children: labels.assistantMessageToolbarInspectorHideLabel
11773
11794
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
11774
- className: "cpk:block cpk:text-xs cpk:text-muted-foreground",
11795
+ className: "cpk-inspector-button-menu-item-description",
11775
11796
  children: labels.assistantMessageToolbarInspectorHideDescription
11776
11797
  })] })]
11777
11798
  })
@@ -11838,10 +11859,10 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
11838
11859
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
11839
11860
  "data-generative-ui-chat-surface": surfaceId,
11840
11861
  "data-a2ui-markdown-surface": surfaceId,
11841
- className: "cpk:relative cpk:my-4 cpk:flex cpk:w-full cpk:min-w-0 cpk:max-w-full cpk:flex-col",
11862
+ className: "cpk-markdown-chat-surface",
11842
11863
  children: [children, error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
11843
11864
  role: "alert",
11844
- className: "cpk:mt-2 cpk:text-xs cpk:text-red-600",
11865
+ className: "cpk-markdown-chat-surface-error",
11845
11866
  children: "Part of this UI couldn't be shown."
11846
11867
  })]
11847
11868
  });
@@ -11952,7 +11973,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
11952
11973
  "data-slot": "popover-content",
11953
11974
  align,
11954
11975
  sideOffset,
11955
- className: cn("cpk:z-50 cpk:outline-none cpk:data-[state=open]:animate-in cpk:data-[state=open]:fade-in-0 cpk:data-[state=open]:zoom-in-95 cpk:data-[side=bottom]:slide-in-from-top-1 cpk:data-[side=top]:slide-in-from-bottom-1", className),
11976
+ className: cn("cpk-popover", className),
11956
11977
  ...props
11957
11978
  }) }));
11958
11979
  PopoverContent.displayName = "PopoverContent";
@@ -12247,9 +12268,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12247
12268
  const open = context.workTextOpen.get(messageId);
12248
12269
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Collapsible, {
12249
12270
  open: open ?? true,
12250
- className: "cpk:-mx-2",
12271
+ className: "cpk-assistant-message-work-text",
12251
12272
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12252
- className: "cpk:px-2",
12273
+ className: "cpk-assistant-message-work-text-content",
12253
12274
  "data-work-text": open === void 0 ? "reply" : "narration",
12254
12275
  children
12255
12276
  })
@@ -12355,7 +12376,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12355
12376
  },
12356
12377
  onPointerEnter: () => comment.enter("pointer"),
12357
12378
  onPointerLeave: () => comment.leave("pointer"),
12358
- className: "cpk:z-[1300]",
12379
+ className: "cpk-assistant-message-feedback-popover",
12359
12380
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: renderSlot(feedbackComment, CopilotChatAssistantMessage.FeedbackComment, {
12360
12381
  value: comment.draft,
12361
12382
  savedComment,
@@ -12482,7 +12503,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12482
12503
  const boundReadAloudButton = renderSlot(readAloudButton, CopilotChatAssistantMessage.ReadAloudButton, { onClick: onReadAloud ? () => onReadAloud(message) : void 0 });
12483
12504
  const boundRegenerateButton = renderSlot(regenerateButton, CopilotChatAssistantMessage.RegenerateButton, { onClick: onRegenerate ? () => onRegenerate(message) : void 0 });
12484
12505
  const boundToolbar = renderSlot(toolbar, CopilotChatAssistantMessage.Toolbar, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12485
- className: "cpk:flex cpk:w-full cpk:items-center cpk:gap-1",
12506
+ className: "cpk-assistant-message-toolbar-items",
12486
12507
  children: [
12487
12508
  boundCopyButton,
12488
12509
  (onThumbsUp || thumbsUpButton || feedback) && boundThumbsUpButton,
@@ -12547,14 +12568,14 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12547
12568
  ref: root,
12548
12569
  "data-copilotkit": true,
12549
12570
  "data-testid": "copilot-assistant-message",
12550
- className: (0, tailwind_merge.twMerge)("copilotKitMessage copilotKitAssistantMessage", className),
12571
+ className: cn("copilotKitMessage copilotKitAssistantMessage", className),
12551
12572
  ...props,
12552
12573
  "data-message-id": message.id,
12553
12574
  children: [
12554
12575
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorkText, {
12555
12576
  messageId: message.id,
12556
12577
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12557
- className: "cpk:prose cpk:max-w-full cpk:break-words cpk:dark:prose-invert",
12578
+ className: "cpk-markdown cpk-assistant-message-markdown",
12558
12579
  children: boundMarkdownRenderer
12559
12580
  })
12560
12581
  }),
@@ -12582,7 +12603,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12582
12603
  };
12583
12604
  _CopilotChatAssistantMessage.Toolbar = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12584
12605
  "data-testid": "copilot-assistant-toolbar",
12585
- className: (0, tailwind_merge.twMerge)("cpk:w-full cpk:bg-transparent cpk:flex cpk:items-center cpk:-ml-[5px] cpk:-mt-[0px]", className),
12606
+ className: cn("cpk-assistant-message-toolbar", className),
12586
12607
  ...props
12587
12608
  });
12588
12609
  const ToolbarButton = _CopilotChatAssistantMessage.ToolbarButton = ({ title, tooltip, tooltipClassName, children, ...props }) => {
@@ -12635,7 +12656,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12635
12656
  onClick: handleClick,
12636
12657
  className,
12637
12658
  ...props,
12638
- children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "cpk:size-[18px]" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Copy, { className: "cpk:size-[18px]" })
12659
+ children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "cpk-assistant-message-toolbar-icon" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Copy, { className: "cpk-assistant-message-toolbar-icon" })
12639
12660
  });
12640
12661
  };
12641
12662
  _CopilotChatAssistantMessage.InspectorButton = CopilotChatInspectorButton;
@@ -12646,7 +12667,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12646
12667
  title: title || labels.assistantMessageToolbarThumbsUpLabel,
12647
12668
  ...props,
12648
12669
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ThumbsUp, {
12649
- className: "cpk:size-[18px]",
12670
+ className: "cpk-assistant-message-toolbar-icon",
12650
12671
  fill: props["aria-pressed"] === true ? "currentColor" : "none"
12651
12672
  })
12652
12673
  });
@@ -12658,7 +12679,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12658
12679
  title: title || labels.assistantMessageToolbarThumbsDownLabel,
12659
12680
  ...props,
12660
12681
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ThumbsDown, {
12661
- className: "cpk:size-[18px]",
12682
+ className: "cpk-assistant-message-toolbar-icon",
12662
12683
  fill: props["aria-pressed"] === true ? "currentColor" : "none"
12663
12684
  })
12664
12685
  });
@@ -12668,7 +12689,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12668
12689
  const changed = value.trim() !== savedComment;
12669
12690
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
12670
12691
  "data-testid": "copilot-feedback-comment",
12671
- className: (0, tailwind_merge.twMerge)("cpk:flex cpk:w-80 cpk:max-w-[calc(100vw-1rem)] cpk:items-center cpk:gap-1 cpk:rounded-full cpk:border cpk:border-border cpk:bg-background cpk:py-0.5 cpk:pl-3 cpk:pr-0.5 cpk:text-sm cpk:shadow-md", className),
12692
+ className: cn("cpk-assistant-message-feedback-comment", className),
12672
12693
  onSubmit: (event) => {
12673
12694
  event.preventDefault();
12674
12695
  onSubmit();
@@ -12688,13 +12709,13 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12688
12709
  onChange: (event) => onChange(event.target.value),
12689
12710
  placeholder: labels.assistantMessageFeedbackCommentPlaceholder,
12690
12711
  "aria-label": labels.assistantMessageFeedbackCommentPlaceholder,
12691
- className: "cpk:min-w-0 cpk:flex-1 cpk:bg-transparent cpk:py-1 cpk:text-foreground cpk:outline-none cpk:placeholder:text-muted-foreground"
12712
+ className: "cpk-assistant-message-feedback-comment-input"
12692
12713
  }), changed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
12693
12714
  type: "submit",
12694
12715
  variant: "assistantMessageToolbarButton",
12695
12716
  "aria-label": labels.assistantMessageFeedbackCommentSubmitLabel,
12696
12717
  title: labels.assistantMessageFeedbackCommentSubmitLabel,
12697
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ArrowUp, { className: "cpk:size-[16px]" })
12718
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ArrowUp, { className: "cpk-assistant-message-feedback-comment-submit-icon" })
12698
12719
  })]
12699
12720
  });
12700
12721
  };
@@ -12704,7 +12725,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12704
12725
  "data-testid": "copilot-read-aloud-button",
12705
12726
  title: title || labels.assistantMessageToolbarReadAloudLabel,
12706
12727
  ...props,
12707
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Volume2, { className: "cpk:size-[20px]" })
12728
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Volume2, { className: "cpk-assistant-message-read-aloud-icon" })
12708
12729
  });
12709
12730
  };
12710
12731
  _CopilotChatAssistantMessage.RegenerateButton = ({ title, ...props }) => {
@@ -12713,7 +12734,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12713
12734
  "data-testid": "copilot-regenerate-button",
12714
12735
  title: title || labels.assistantMessageToolbarRegenerateLabel,
12715
12736
  ...props,
12716
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.RefreshCw, { className: "cpk:size-[18px]" })
12737
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.RefreshCw, { className: "cpk-assistant-message-toolbar-icon" })
12717
12738
  });
12718
12739
  };
12719
12740
  })(CopilotChatAssistantMessage || (CopilotChatAssistantMessage = {}));
@@ -12746,13 +12767,13 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12746
12767
  }, [onClose]);
12747
12768
  if (typeof document === "undefined") return null;
12748
12769
  return (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12749
- className: "cpk:fixed cpk:inset-0 cpk:z-[9999] cpk:flex cpk:items-center cpk:justify-center cpk:bg-black/80 cpk:animate-fade-in",
12770
+ className: "cpk-attachment-lightbox",
12750
12771
  onClick: onClose,
12751
12772
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
12752
12773
  onClick: onClose,
12753
- className: "cpk:absolute cpk:top-4 cpk:right-4 cpk:text-white cpk:bg-white/10 cpk:hover:bg-white/20 cpk:rounded-full cpk:w-10 cpk:h-10 cpk:flex cpk:items-center cpk:justify-center cpk:cursor-pointer cpk:border-none cpk:z-10",
12774
+ className: "cpk-attachment-lightbox-close-button",
12754
12775
  "aria-label": labels.attachmentPreviewCloseButtonLabel,
12755
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "cpk:w-5 cpk:h-5" })
12776
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, { className: "cpk-attachment-lightbox-close-icon" })
12756
12777
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12757
12778
  onClick: (e) => e.stopPropagation(),
12758
12779
  children
@@ -12810,14 +12831,14 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12810
12831
  const [error, setError] = (0, react.useState)(false);
12811
12832
  const { thumbnailRef, vtName, open, openLightbox, closeLightbox } = useLightbox();
12812
12833
  if (error) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12813
- className: cn("cpk:flex cpk:flex-col cpk:items-center cpk:justify-center cpk:rounded-lg cpk:bg-muted cpk:p-4 cpk:text-sm cpk:text-muted-foreground", className),
12834
+ className: cn("cpk-attachment-renderer cpk-attachment-renderer-image-error", className),
12814
12835
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "Failed to load image" })
12815
12836
  });
12816
12837
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
12817
12838
  ref: thumbnailRef,
12818
12839
  src,
12819
12840
  alt: "Image attachment",
12820
- className: cn("cpk:max-w-[80px] cpk:max-h-[80px] cpk:w-auto cpk:h-auto cpk:rounded-xl cpk:object-cover cpk:cursor-pointer cpk:bg-muted", className),
12841
+ className: cn("cpk-attachment-renderer cpk-attachment-renderer-image", className),
12821
12842
  onClick: openLightbox,
12822
12843
  onError: () => setError(true)
12823
12844
  }), open && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Lightbox, {
@@ -12826,20 +12847,20 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12826
12847
  style: { viewTransitionName: vtName },
12827
12848
  src,
12828
12849
  alt: "Image attachment",
12829
- className: "cpk:max-w-[90vw] cpk:max-h-[90vh] cpk:object-contain cpk:rounded-lg"
12850
+ className: "cpk-attachment-renderer-lightbox-image"
12830
12851
  })
12831
12852
  })] });
12832
12853
  });
12833
12854
  const AudioAttachment = (0, react.memo)(function AudioAttachment({ src, filename, className }) {
12834
12855
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12835
- className: cn("cpk:flex cpk:flex-col cpk:gap-1", className),
12856
+ className: cn("cpk-attachment-renderer cpk-attachment-renderer-audio", className),
12836
12857
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("audio", {
12837
12858
  src,
12838
12859
  controls: true,
12839
12860
  preload: "metadata",
12840
- className: "cpk:max-w-[300px] cpk:w-full cpk:h-10"
12861
+ className: "cpk-attachment-renderer-audio-player"
12841
12862
  }), filename && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12842
- className: "cpk:text-xs cpk:text-muted-foreground cpk:truncate cpk:max-w-[300px]",
12863
+ className: "cpk-attachment-renderer-audio-filename",
12843
12864
  children: filename
12844
12865
  })]
12845
12866
  });
@@ -12849,7 +12870,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12849
12870
  src,
12850
12871
  controls: true,
12851
12872
  preload: "metadata",
12852
- className: cn("cpk:max-w-[400px] cpk:w-full cpk:rounded-lg", className)
12873
+ className: cn("cpk-attachment-renderer cpk-attachment-renderer-video", className)
12853
12874
  });
12854
12875
  });
12855
12876
  const DocumentAttachment = (0, react.memo)(function DocumentAttachment({ src, source, filename, className }) {
@@ -12860,12 +12881,12 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12860
12881
  target: "_blank",
12861
12882
  rel: "noopener noreferrer",
12862
12883
  "aria-label": label,
12863
- className: cn("cpk:inline-flex cpk:max-w-full cpk:items-center cpk:gap-2 cpk:px-3 cpk:py-2 cpk:border cpk:border-border cpk:rounded-lg cpk:bg-muted", className),
12884
+ className: cn("cpk-attachment-renderer cpk-attachment-renderer-document", className),
12864
12885
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12865
- className: "cpk:text-xs cpk:font-bold cpk:uppercase",
12886
+ className: "cpk-attachment-renderer-document-icon",
12866
12887
  children: (0, _copilotkit_shared.getDocumentIcon)(source.mimeType ?? "")
12867
12888
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
12868
- className: "cpk:text-sm cpk:text-muted-foreground cpk:truncate",
12889
+ className: "cpk-attachment-renderer-document-name",
12869
12890
  children: filename || source.mimeType || "Unknown type"
12870
12891
  })]
12871
12892
  });
@@ -12930,7 +12951,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12930
12951
  });
12931
12952
  const showBranchNavigation = numberOfBranches && numberOfBranches > 1 && onSwitchToBranch;
12932
12953
  const BoundToolbar = renderSlot(toolbar, CopilotChatUserMessage.Toolbar, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12933
- className: "cpk:flex cpk:items-center cpk:gap-1 cpk:justify-end",
12954
+ className: "cpk-user-message-toolbar-items",
12934
12955
  children: [
12935
12956
  additionalToolbarItems,
12936
12957
  BoundCopyButton,
@@ -12956,12 +12977,12 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12956
12977
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
12957
12978
  "data-copilotkit": true,
12958
12979
  "data-testid": "copilot-user-message",
12959
- className: (0, tailwind_merge.twMerge)("copilotKitMessage copilotKitUserMessage cpk:flex cpk:flex-col cpk:items-end cpk:group cpk:pt-10", className),
12980
+ className: cn("copilotKitMessage copilotKitUserMessage cpk-user-message", className),
12960
12981
  "data-message-id": message.id,
12961
12982
  ...props,
12962
12983
  children: [
12963
12984
  mediaParts.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12964
- className: "cpk:flex cpk:flex-row cpk:flex-wrap cpk:max-w-full cpk:justify-end cpk:gap-2 cpk:mb-2",
12985
+ className: "cpk-user-message-attachments",
12965
12986
  children: mediaParts.map((part, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotChatAttachmentRenderer, {
12966
12987
  type: part.type,
12967
12988
  source: part.source,
@@ -12975,17 +12996,17 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12975
12996
  }
12976
12997
  (function(_CopilotChatUserMessage) {
12977
12998
  _CopilotChatUserMessage.Container = ({ children, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12978
- className: (0, tailwind_merge.twMerge)("cpk:flex cpk:flex-col cpk:items-end cpk:group", className),
12999
+ className: cn("cpk-user-message-container", className),
12979
13000
  ...props,
12980
13001
  children
12981
13002
  });
12982
13003
  _CopilotChatUserMessage.MessageRenderer = ({ content, className }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12983
- className: (0, tailwind_merge.twMerge)("cpk:prose cpk:dark:prose-invert cpk:bg-muted cpk:relative cpk:max-w-[80%] cpk:rounded-[18px] cpk:px-4 cpk:py-1.5 cpk:data-[multiline]:py-3 cpk:inline-block cpk:whitespace-pre-wrap", className),
13004
+ className: cn("cpk-user-message-bubble", className),
12984
13005
  children: content
12985
13006
  });
12986
13007
  _CopilotChatUserMessage.Toolbar = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
12987
13008
  "data-testid": "copilot-user-toolbar",
12988
- className: (0, tailwind_merge.twMerge)("cpk:w-full cpk:bg-transparent cpk:flex cpk:items-center cpk:justify-end cpk:-mr-[5px] cpk:mt-[4px] cpk:invisible cpk:group-hover:visible", className),
13009
+ className: cn("cpk-user-message-toolbar", className),
12989
13010
  ...props
12990
13011
  });
12991
13012
  const ToolbarButton = _CopilotChatUserMessage.ToolbarButton = ({ title, children, className, ...props }) => {
@@ -12995,7 +13016,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
12995
13016
  type: "button",
12996
13017
  variant: "assistantMessageToolbarButton",
12997
13018
  "aria-label": title,
12998
- className: (0, tailwind_merge.twMerge)(className),
13019
+ className,
12999
13020
  ...props,
13000
13021
  children
13001
13022
  })
@@ -13021,7 +13042,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13021
13042
  onClick: handleClick,
13022
13043
  className,
13023
13044
  ...props,
13024
- children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "cpk:size-[18px]" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Copy, { className: "cpk:size-[18px]" })
13045
+ children: copied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "cpk-user-message-toolbar-icon" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Copy, { className: "cpk-user-message-toolbar-icon" })
13025
13046
  });
13026
13047
  };
13027
13048
  _CopilotChatUserMessage.EditButton = ({ className, title, ...props }) => {
@@ -13031,7 +13052,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13031
13052
  title: title || labels.userMessageToolbarEditMessageLabel,
13032
13053
  className,
13033
13054
  ...props,
13034
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Edit, { className: "cpk:size-[18px]" })
13055
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Edit, { className: "cpk-user-message-toolbar-icon" })
13035
13056
  });
13036
13057
  };
13037
13058
  _CopilotChatUserMessage.BranchNavigation = ({ className, currentBranch = 0, numberOfBranches = 1, onSwitchToBranch, message, ...props }) => {
@@ -13041,7 +13062,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13041
13062
  const canGoNext = currentBranch < numberOfBranches - 1;
13042
13063
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
13043
13064
  "data-testid": "copilot-branch-navigation",
13044
- className: (0, tailwind_merge.twMerge)("cpk:flex cpk:items-center cpk:gap-1", className),
13065
+ className: cn("cpk-user-message-branch-navigation", className),
13045
13066
  ...props,
13046
13067
  children: [
13047
13068
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
@@ -13053,12 +13074,12 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13053
13074
  message
13054
13075
  }),
13055
13076
  disabled: !canGoPrev,
13056
- className: "cpk:h-6 cpk:w-6 cpk:p-0",
13077
+ className: "cpk-user-message-branch-button",
13057
13078
  "aria-label": labels.userMessageToolbarPreviousBranchLabel,
13058
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronLeft, { className: "cpk:size-[20px]" })
13079
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronLeft, { className: "cpk-user-message-branch-icon" })
13059
13080
  }),
13060
13081
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
13061
- className: "cpk:text-sm cpk:text-muted-foreground cpk:px-0 cpk:font-medium",
13082
+ className: "cpk-user-message-branch-counter",
13062
13083
  children: [
13063
13084
  currentBranch + 1,
13064
13085
  "/",
@@ -13074,9 +13095,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13074
13095
  message
13075
13096
  }),
13076
13097
  disabled: !canGoNext,
13077
- className: "cpk:h-6 cpk:w-6 cpk:p-0",
13098
+ className: "cpk-user-message-branch-button",
13078
13099
  "aria-label": labels.userMessageToolbarNextBranchLabel,
13079
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, { className: "cpk:size-[20px]" })
13100
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, { className: "cpk-user-message-branch-icon" })
13080
13101
  })
13081
13102
  ]
13082
13103
  });
@@ -13172,7 +13193,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13172
13193
  })
13173
13194
  });
13174
13195
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
13175
- className: (0, tailwind_merge.twMerge)("cpk:my-1", className),
13196
+ className: cn("cpk-reasoning-message", className),
13176
13197
  "data-message-id": message.id,
13177
13198
  ...props,
13178
13199
  children: [boundHeader, boundToggle]
@@ -13183,47 +13204,47 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13183
13204
  const isExpandable = !!hasContent;
13184
13205
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
13185
13206
  type: "button",
13186
- className: (0, tailwind_merge.twMerge)("cpk:inline-flex cpk:items-center cpk:gap-1 cpk:py-1 cpk:text-sm cpk:text-muted-foreground cpk:transition-colors cpk:select-none", isExpandable ? "cpk:hover:text-foreground cpk:cursor-pointer" : "cpk:cursor-default", className),
13207
+ className: cn("cpk-reasoning-message-header", isExpandable && "cpk-reasoning-message-header-expandable", className),
13187
13208
  "aria-expanded": isExpandable ? isOpen : void 0,
13188
13209
  ...headerProps,
13189
13210
  children: [
13190
13211
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
13191
- className: "cpk:font-medium",
13212
+ className: "cpk-reasoning-message-label",
13192
13213
  children: label
13193
13214
  }),
13194
13215
  isStreaming && !hasContent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
13195
- className: "cpk:inline-flex cpk:items-center cpk:ml-1",
13196
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "cpk:w-1.5 cpk:h-1.5 cpk:rounded-full cpk:bg-muted-foreground cpk:animate-pulse" })
13216
+ className: "cpk-reasoning-message-indicator",
13217
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "cpk-reasoning-message-indicator-dot" })
13197
13218
  }),
13198
13219
  headerChildren,
13199
- isExpandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, { className: (0, tailwind_merge.twMerge)("cpk:size-3.5 cpk:shrink-0 cpk:transition-transform cpk:duration-200", isOpen && "cpk:rotate-90") })
13220
+ isExpandable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, { className: cn("cpk-reasoning-message-chevron", isOpen && "cpk-reasoning-message-chevron-open") })
13200
13221
  ]
13201
13222
  });
13202
13223
  };
13203
13224
  _CopilotChatReasoningMessage.Content = ({ isStreaming, hasContent, className, children: contentChildren, ...contentProps }) => {
13204
13225
  if (!hasContent && !isStreaming) return null;
13205
13226
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
13206
- className: (0, tailwind_merge.twMerge)("cpk:pb-2 cpk:pt-1", className),
13227
+ className: cn("cpk-reasoning-message-content", className),
13207
13228
  ...contentProps,
13208
13229
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
13209
- className: "cpk:text-sm cpk:text-muted-foreground",
13230
+ className: "cpk-reasoning-message-text",
13210
13231
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StreamingMarkdownDefaultRenderer, {
13211
13232
  content: typeof contentChildren === "string" ? contentChildren : "",
13212
13233
  isStreaming
13213
13234
  }), isStreaming && hasContent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
13214
- className: "cpk:inline-flex cpk:items-center cpk:ml-1 cpk:align-middle",
13215
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "cpk:w-2 cpk:h-2 cpk:rounded-full cpk:bg-muted-foreground cpk:animate-pulse-cursor" })
13235
+ className: "cpk-reasoning-message-cursor",
13236
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "cpk-reasoning-message-cursor-dot" })
13216
13237
  })]
13217
13238
  })
13218
13239
  });
13219
13240
  };
13220
13241
  _CopilotChatReasoningMessage.Toggle = ({ isOpen, className, children: toggleChildren, ...toggleProps }) => {
13221
13242
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
13222
- className: (0, tailwind_merge.twMerge)("cpk:grid cpk:transition-[grid-template-rows] cpk:duration-200 cpk:ease-in-out", className),
13243
+ className: cn("cpk-reasoning-message-toggle", className),
13223
13244
  style: { gridTemplateRows: isOpen ? "1fr" : "0fr" },
13224
13245
  ...toggleProps,
13225
13246
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
13226
- className: "cpk:overflow-hidden",
13247
+ className: "cpk-reasoning-message-toggle-content",
13227
13248
  children: toggleChildren
13228
13249
  })
13229
13250
  });
@@ -13236,8 +13257,6 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13236
13257
 
13237
13258
  //#endregion
13238
13259
  //#region src/components/chat/CopilotChatSuggestionPill.tsx
13239
- const baseClasses = "group cpk:inline-flex cpk:h-7 cpk:sm:h-8 cpk:items-center cpk:gap-1 cpk:sm:gap-1.5 cpk:rounded-full cpk:border cpk:border-border/60 cpk:bg-background cpk:px-2.5 cpk:sm:px-3 cpk:text-[11px] cpk:sm:text-xs cpk:leading-none cpk:text-foreground cpk:transition-colors cpk:cursor-pointer cpk:hover:bg-accent/60 cpk:hover:text-foreground cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-ring cpk:focus-visible:ring-offset-2 cpk:focus-visible:ring-offset-background cpk:disabled:cursor-not-allowed cpk:disabled:text-muted-foreground cpk:disabled:hover:bg-background cpk:disabled:hover:text-muted-foreground cpk:pointer-events-auto";
13240
- const labelClasses = "cpk:whitespace-nowrap cpk:font-medium cpk:leading-none";
13241
13260
  const CopilotChatSuggestionPill = react.default.forwardRef(function CopilotChatSuggestionPill({ className, children, icon, isLoading, type, ...props }, ref) {
13242
13261
  const showIcon = !isLoading && icon;
13243
13262
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
@@ -13245,22 +13264,22 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13245
13264
  "data-copilotkit": true,
13246
13265
  "data-testid": "copilot-suggestion",
13247
13266
  "data-slot": "suggestion-pill",
13248
- className: cn(baseClasses, className),
13267
+ className: className ? `cpk-suggestion-pill ${className}` : "cpk-suggestion-pill",
13249
13268
  type: type ?? "button",
13250
13269
  "aria-busy": isLoading || void 0,
13251
13270
  disabled: isLoading || props.disabled,
13252
13271
  ...props,
13253
13272
  children: [isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
13254
- className: "cpk:flex cpk:h-3.5 cpk:sm:h-4 cpk:w-3.5 cpk:sm:w-4 cpk:items-center cpk:justify-center cpk:text-muted-foreground",
13273
+ className: "cpk-suggestion-pill-icon",
13255
13274
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Loader2, {
13256
- className: "cpk:h-3.5 cpk:sm:h-4 cpk:w-3.5 cpk:sm:w-4 cpk:animate-spin",
13275
+ className: "cpk-suggestion-pill-spinner",
13257
13276
  "aria-hidden": "true"
13258
13277
  })
13259
13278
  }) : showIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
13260
- className: "cpk:flex cpk:h-3.5 cpk:sm:h-4 cpk:w-3.5 cpk:sm:w-4 cpk:items-center cpk:justify-center cpk:text-muted-foreground",
13279
+ className: "cpk-suggestion-pill-icon",
13261
13280
  children: icon
13262
13281
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
13263
- className: labelClasses,
13282
+ className: "cpk-suggestion-pill-label",
13264
13283
  children
13265
13284
  })]
13266
13285
  });
@@ -13274,7 +13293,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13274
13293
  ref,
13275
13294
  "data-copilotkit": true,
13276
13295
  "data-testid": "copilot-suggestions",
13277
- className: cn("cpk:flex cpk:flex-wrap cpk:items-center cpk:gap-1.5 cpk:sm:gap-2 cpk:pl-0 cpk:pr-4 cpk:@3xl:px-0 cpk:pointer-events-none", className),
13296
+ className: cn("cpk-suggestion-view", className),
13278
13297
  ...props
13279
13298
  });
13280
13299
  });
@@ -13404,30 +13423,30 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13404
13423
  "data-testid": "copilot-work-summary",
13405
13424
  "data-state": isWorking ? "working" : "done",
13406
13425
  "aria-expanded": isOpen,
13407
- className: (0, tailwind_merge.twMerge)("cpk:m-0 cpk:inline-flex cpk:max-w-full cpk:cursor-pointer cpk:items-center cpk:gap-1.5 cpk:rounded-md cpk:border-none cpk:bg-transparent cpk:p-0 cpk:py-0.5 cpk:text-sm cpk:text-muted-foreground cpk:transition-colors cpk:hover:text-foreground cpk:focus-visible:outline-2 cpk:focus-visible:outline-ring", className),
13426
+ className: cn("cpk-work-summary", className),
13408
13427
  ...props,
13409
13428
  children: [isWorking ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
13410
- className: "cpk:font-medium cpk-shimmer",
13429
+ className: "cpk-work-summary-label cpk-shimmer",
13411
13430
  children: "Working"
13412
13431
  }), liveMs !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
13413
- className: "cpk:text-xs cpk:tabular-nums cpk:opacity-70",
13432
+ className: "cpk-work-summary-detail cpk-work-summary-timer",
13414
13433
  children: formatDuration(liveMs)
13415
13434
  })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
13416
13435
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
13417
- className: "cpk:font-medium",
13436
+ className: "cpk-work-summary-label",
13418
13437
  children: duration ? `Worked for ${duration}` : `Used ${pluralize(calls.length, "tool")}`
13419
13438
  }),
13420
13439
  duration && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
13421
- className: "cpk:text-xs cpk:opacity-70",
13440
+ className: "cpk-work-summary-detail",
13422
13441
  children: pluralize(calls.length, "tool")
13423
13442
  }),
13424
13443
  failed > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
13425
- className: "cpk:text-destructive",
13444
+ className: "cpk-work-summary-failed",
13426
13445
  children: [failed, " failed"]
13427
13446
  })
13428
13447
  ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, {
13429
13448
  "aria-hidden": "true",
13430
- className: (0, tailwind_merge.twMerge)("cpk:size-3.5 cpk:shrink-0 cpk:transition-transform cpk:duration-200", isOpen && "cpk:rotate-90")
13449
+ className: cn("cpk-work-summary-chevron", isOpen && "cpk-work-summary-chevron-open")
13431
13450
  })]
13432
13451
  });
13433
13452
  }
@@ -13444,7 +13463,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13444
13463
  * checkmark — whose geometry lives in each path's `d` ATTRIBUTE so it
13445
13464
  * renders in every browser (the CSS `d:` property is Chrome-only).
13446
13465
  *
13447
- * Two states, driven by the `data-status` attribute (see globals.css
13466
+ * Two states, driven by the `data-status` attribute (see styles/css/intelligence-indicator.css
13448
13467
  * for the exact timing):
13449
13468
  * 1. **In-progress.** The arc spins (CSS rotation) inside the pill and
13450
13469
  * the checkmark is hidden. Label + icon are a saturated purple.
@@ -13458,7 +13477,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13458
13477
  * — the static check plus the color/slant shift carry the "done"
13459
13478
  * meaning, so no wording change is needed.
13460
13479
  *
13461
- * All motion is gated behind `prefers-reduced-motion` (globals.css):
13480
+ * All motion is gated behind `prefers-reduced-motion` (styles/css/intelligence-indicator.css):
13462
13481
  * when reduced motion is requested the arc does not spin and the two
13463
13482
  * states swap instantly, without transitions.
13464
13483
  *
@@ -13469,7 +13488,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
13469
13488
  */
13470
13489
  function IntelligenceIndicatorView({ message, status, label, className, ...rest }) {
13471
13490
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
13472
- className: (0, tailwind_merge.twMerge)("cpk-intelligence-indicator", className),
13491
+ className: cn("cpk-intelligence-indicator", className),
13473
13492
  role: "status",
13474
13493
  "aria-live": "polite",
13475
13494
  "data-testid": `cpk-intelligence-indicator-${message.id}`,
@@ -14041,7 +14060,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14041
14060
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Collapsible, {
14042
14061
  open: working || calls.length > 0,
14043
14062
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14044
- className: "cpk:pt-1 cpk:pb-2",
14063
+ className: "cpk-message-view-work-summary",
14045
14064
  children: renderSlot(workSummary, CopilotChatWorkSummary, {
14046
14065
  isWorking: working,
14047
14066
  isOpen: open,
@@ -14412,7 +14431,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14412
14431
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14413
14432
  "data-copilotkit": true,
14414
14433
  "data-testid": "copilot-message-list",
14415
- className: (0, tailwind_merge.twMerge)("copilotKitMessages cpk:flex cpk:flex-col", className),
14434
+ className: cn("copilotKitMessages cpk-message-view", className),
14416
14435
  ...props,
14417
14436
  children: [
14418
14437
  shouldVirtualize ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -14440,7 +14459,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14440
14459
  interruptElement,
14441
14460
  pendingWorkSummary && renderWorkSummary(latestTurnKey, []),
14442
14461
  showCursor && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14443
- className: "cpk:mt-2",
14462
+ className: "cpk-message-view-cursor-container",
14444
14463
  children: renderSlot(cursor, CopilotChatMessageView.Cursor, {})
14445
14464
  })
14446
14465
  ]
@@ -14451,7 +14470,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14451
14470
  CopilotChatMessageView.Cursor = function Cursor({ className, ...props }) {
14452
14471
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14453
14472
  "data-testid": "copilot-loading-cursor",
14454
- className: (0, tailwind_merge.twMerge)("cpk:w-[11px] cpk:h-[11px] cpk:rounded-full cpk:bg-foreground cpk:animate-pulse-cursor cpk:ml-1", className),
14473
+ className: cn("cpk-message-view-cursor", className),
14455
14474
  ...props
14456
14475
  });
14457
14476
  };
@@ -14467,17 +14486,16 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14467
14486
  if (attachments.length === 0) return null;
14468
14487
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14469
14488
  "data-testid": "copilot-attachment-queue",
14470
- className: cn("cpk:flex cpk:flex-wrap cpk:gap-2 cpk:p-2", className),
14489
+ className: cn("cpk-attachment-queue", className),
14471
14490
  children: attachments.map((attachment) => {
14472
- const isMedia = attachment.type === "image" || attachment.type === "video";
14473
14491
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14474
- className: cn("cpk:relative cpk:inline-flex cpk:rounded-lg cpk:overflow-hidden cpk:border cpk:border-border", isMedia ? "cpk:w-[72px] cpk:h-[72px]" : attachment.type === "audio" ? "cpk:min-w-[200px] cpk:max-w-[280px] cpk:flex-col cpk:p-1 cpk:pr-8" : "cpk:p-2 cpk:px-3 cpk:pr-8 cpk:max-w-[240px]"),
14492
+ className: cn("cpk-attachment-queue-item", attachment.type === "image" || attachment.type === "video" ? "cpk-attachment-queue-item-media" : attachment.type === "audio" ? "cpk-attachment-queue-item-audio" : "cpk-attachment-queue-item-document"),
14475
14493
  children: [
14476
14494
  attachment.status === "uploading" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UploadingOverlay, {}),
14477
14495
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AttachmentPreview, { attachment }),
14478
14496
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
14479
14497
  onClick: () => onRemoveAttachment(attachment.id),
14480
- className: cn("cpk:absolute cpk:bg-black/60 cpk:text-white cpk:border-none cpk:rounded-full cpk:w-5 cpk:h-5 cpk:flex cpk:items-center cpk:justify-center cpk:cursor-pointer cpk:text-[10px] cpk:z-20", isMedia ? "cpk:top-1 cpk:right-1" : "cpk:top-1.5 cpk:right-1.5"),
14498
+ className: "cpk-attachment-queue-remove-button",
14481
14499
  "aria-label": labels.attachmentRemoveButtonLabel,
14482
14500
  children: "✕"
14483
14501
  })
@@ -14488,12 +14506,12 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14488
14506
  };
14489
14507
  function UploadingOverlay() {
14490
14508
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14491
- className: "cpk:absolute cpk:inset-0 cpk:flex cpk:items-center cpk:justify-center cpk:bg-black/40 cpk:z-10",
14492
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "cpk:w-5 cpk:h-5 cpk:border-2 cpk:border-white cpk:border-t-transparent cpk:rounded-full cpk:animate-spin" })
14509
+ className: "cpk-attachment-queue-uploading-overlay",
14510
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "cpk-attachment-queue-uploading-spinner" })
14493
14511
  });
14494
14512
  }
14495
14513
  function AttachmentPreview({ attachment }) {
14496
- if (attachment.status === "uploading") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "cpk:w-full cpk:h-full" });
14514
+ if (attachment.status === "uploading") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "cpk-attachment-queue-placeholder" });
14497
14515
  switch (attachment.type) {
14498
14516
  case "image": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ImagePreview, { attachment });
14499
14517
  case "audio": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AudioPreview, { attachment });
@@ -14508,7 +14526,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14508
14526
  ref: thumbnailRef,
14509
14527
  src,
14510
14528
  alt: attachment.filename || "Image attachment",
14511
- className: "cpk:w-full cpk:h-full cpk:object-cover cpk:cursor-pointer",
14529
+ className: "cpk-attachment-queue-image",
14512
14530
  onClick: openLightbox
14513
14531
  }), open && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Lightbox, {
14514
14532
  onClose: closeLightbox,
@@ -14516,20 +14534,20 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14516
14534
  style: { viewTransitionName: vtName },
14517
14535
  src,
14518
14536
  alt: attachment.filename || "Image attachment",
14519
- className: "cpk:max-w-[90vw] cpk:max-h-[90vh] cpk:object-contain cpk:rounded-lg"
14537
+ className: "cpk-attachment-queue-lightbox-image"
14520
14538
  })
14521
14539
  })] });
14522
14540
  }
14523
14541
  function AudioPreview({ attachment }) {
14524
14542
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14525
- className: "cpk:flex cpk:flex-col cpk:gap-1 cpk:w-full",
14543
+ className: "cpk-attachment-queue-audio",
14526
14544
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("audio", {
14527
14545
  src: (0, _copilotkit_shared.getSourceUrl)(attachment.source),
14528
14546
  controls: true,
14529
14547
  preload: "metadata",
14530
- className: "cpk:w-full cpk:h-8"
14548
+ className: "cpk-attachment-queue-audio-player"
14531
14549
  }), attachment.filename && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14532
- className: "cpk:text-xs cpk:font-medium cpk:overflow-hidden cpk:text-ellipsis cpk:whitespace-nowrap",
14550
+ className: "cpk-attachment-queue-audio-filename",
14533
14551
  children: attachment.filename
14534
14552
  })]
14535
14553
  });
@@ -14546,25 +14564,25 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14546
14564
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
14547
14565
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14548
14566
  ref: thumbnailRef,
14549
- className: "cpk:w-full cpk:h-full",
14567
+ className: "cpk-attachment-queue-video",
14550
14568
  children: attachment.thumbnail ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
14551
14569
  src: attachment.thumbnail,
14552
14570
  alt: attachment.filename || "Video thumbnail",
14553
- className: "cpk:w-full cpk:h-full cpk:object-cover"
14571
+ className: "cpk-attachment-queue-video-thumbnail"
14554
14572
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("video", {
14555
14573
  src,
14556
14574
  preload: "metadata",
14557
14575
  muted: true,
14558
- className: "cpk:w-full cpk:h-full cpk:object-cover"
14576
+ className: "cpk-attachment-queue-video-thumbnail"
14559
14577
  })
14560
14578
  }),
14561
14579
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
14562
14580
  onClick: openLightbox,
14563
- className: "cpk:absolute cpk:inset-0 cpk:flex cpk:items-center cpk:justify-center cpk:z-10 cpk:cursor-pointer cpk:bg-black/20 cpk:border-none cpk:p-0",
14581
+ className: "cpk-attachment-queue-video-play-button",
14564
14582
  "aria-label": labels.attachmentPlayVideoButtonLabel,
14565
14583
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14566
- className: "cpk:w-8 cpk:h-8 cpk:rounded-full cpk:bg-black/60 cpk:flex cpk:items-center cpk:justify-center",
14567
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Play, { className: "cpk:w-4 cpk:h-4 cpk:text-white cpk:ml-0.5" })
14584
+ className: "cpk-attachment-queue-video-play-badge",
14585
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Play, { className: "cpk-attachment-queue-video-play-icon" })
14568
14586
  })
14569
14587
  }),
14570
14588
  open && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Lightbox, {
@@ -14574,7 +14592,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14574
14592
  src,
14575
14593
  controls: true,
14576
14594
  autoPlay: true,
14577
- className: "cpk:max-w-[90vw] cpk:max-h-[90vh] cpk:rounded-lg"
14595
+ className: "cpk-attachment-queue-lightbox-video"
14578
14596
  })
14579
14597
  })
14580
14598
  ] });
@@ -14625,7 +14643,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14625
14643
  style: { viewTransitionName: vtName },
14626
14644
  src: blobUrl,
14627
14645
  title: attachment.filename || "PDF preview",
14628
- className: "cpk:w-[90vw] cpk:h-[90vh] cpk:max-w-[1000px] cpk:rounded-lg cpk:bg-white"
14646
+ className: "cpk-attachment-queue-pdf-preview"
14629
14647
  });
14630
14648
  }
14631
14649
  if (isText(mimeType)) {
@@ -14638,40 +14656,40 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14638
14656
  })() : null;
14639
14657
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14640
14658
  style: { viewTransitionName: vtName },
14641
- className: "cpk:w-[90vw] cpk:max-w-[800px] cpk:max-h-[90vh] cpk:overflow-auto cpk:rounded-lg cpk:bg-white cpk:dark:bg-gray-900 cpk:p-6",
14659
+ className: "cpk-attachment-queue-text-preview",
14642
14660
  children: [attachment.filename && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14643
- className: "cpk:text-sm cpk:font-medium cpk:text-gray-500 cpk:dark:text-gray-400 cpk:mb-4 cpk:pb-2 cpk:border-b cpk:border-gray-200 cpk:dark:border-gray-700",
14661
+ className: "cpk-attachment-queue-text-preview-filename",
14644
14662
  children: attachment.filename
14645
14663
  }), textContent ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", {
14646
- className: "cpk:text-sm cpk:whitespace-pre-wrap cpk:break-words cpk:text-gray-800 cpk:dark:text-gray-200 cpk:font-mono cpk:m-0",
14664
+ className: "cpk-attachment-queue-text-preview-content",
14647
14665
  children: textContent
14648
14666
  }) : blobUrl ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("iframe", {
14649
14667
  src: blobUrl,
14650
14668
  title: attachment.filename || "Text preview",
14651
- className: "cpk:w-full cpk:h-[80vh] cpk:border-none"
14669
+ className: "cpk-attachment-queue-text-preview-frame"
14652
14670
  }) : null]
14653
14671
  });
14654
14672
  }
14655
14673
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14656
14674
  style: { viewTransitionName: vtName },
14657
- className: "cpk:flex cpk:flex-col cpk:items-center cpk:gap-4 cpk:p-8 cpk:rounded-lg cpk:bg-white cpk:dark:bg-gray-900",
14675
+ className: "cpk-attachment-queue-document-card",
14658
14676
  children: [
14659
14677
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14660
- className: "cpk:w-16 cpk:h-16 cpk:rounded-xl cpk:bg-primary cpk:text-primary-foreground cpk:flex cpk:items-center cpk:justify-center cpk:text-xl cpk:font-bold",
14678
+ className: "cpk-attachment-queue-document-card-icon",
14661
14679
  children: (0, _copilotkit_shared.getDocumentIcon)(mimeType ?? "")
14662
14680
  }),
14663
14681
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14664
- className: "cpk:text-center",
14682
+ className: "cpk-attachment-queue-document-card-details",
14665
14683
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14666
- className: "cpk:text-base cpk:font-medium cpk:text-gray-800 cpk:dark:text-gray-200",
14684
+ className: "cpk-attachment-queue-document-card-name",
14667
14685
  children: attachment.filename || "Document"
14668
14686
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14669
- className: "cpk:text-sm cpk:text-gray-500 cpk:dark:text-gray-400 cpk:mt-1",
14687
+ className: "cpk-attachment-queue-document-card-meta",
14670
14688
  children: [mimeType || "Unknown type", attachment.size != null && ` · ${(0, _copilotkit_shared.formatFileSize)(attachment.size)}`]
14671
14689
  })]
14672
14690
  }),
14673
14691
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14674
- className: "cpk:text-xs cpk:text-gray-400 cpk:dark:text-gray-500",
14692
+ className: "cpk-attachment-queue-document-card-note",
14675
14693
  children: "No preview available for this file type"
14676
14694
  })
14677
14695
  ]
@@ -14683,18 +14701,18 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14683
14701
  const previewable = canPreviewInBrowser(mimeType);
14684
14702
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14685
14703
  ref: thumbnailRef,
14686
- className: cn("cpk:flex cpk:items-center cpk:gap-2", previewable && "cpk:cursor-pointer"),
14704
+ className: cn("cpk-attachment-queue-document", previewable && "cpk-attachment-queue-document-previewable"),
14687
14705
  onClick: previewable ? openLightbox : void 0,
14688
14706
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14689
- className: "cpk:w-8 cpk:h-8 cpk:rounded-md cpk:bg-primary cpk:text-primary-foreground cpk:flex cpk:items-center cpk:justify-center cpk:text-[10px] cpk:font-semibold cpk:shrink-0",
14707
+ className: "cpk-attachment-queue-document-icon",
14690
14708
  children: (0, _copilotkit_shared.getDocumentIcon)(mimeType ?? "")
14691
14709
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14692
- className: "cpk:flex cpk:flex-col cpk:min-w-0",
14710
+ className: "cpk-attachment-queue-document-info",
14693
14711
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14694
- className: "cpk:text-xs cpk:font-medium cpk:break-all cpk:leading-tight",
14712
+ className: "cpk-attachment-queue-document-name",
14695
14713
  children: attachment.filename || "Document"
14696
14714
  }), attachment.size != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14697
- className: "cpk:text-[11px] cpk:text-muted-foreground",
14715
+ className: "cpk-attachment-queue-document-size",
14698
14716
  children: (0, _copilotkit_shared.formatFileSize)(attachment.size)
14699
14717
  })]
14700
14718
  })]
@@ -14830,11 +14848,11 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14830
14848
  const SCROLL_BUTTON_OFFSET = 16;
14831
14849
  function DropOverlay() {
14832
14850
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14833
- className: cn("cpk:absolute cpk:inset-0 cpk:z-50 cpk:pointer-events-none", "cpk:flex cpk:items-center cpk:justify-center", "cpk:bg-primary/5 cpk:backdrop-blur-[2px]", "cpk:border-2 cpk:border-dashed cpk:border-primary/40 cpk:rounded-lg cpk:m-2"),
14851
+ className: "cpk-chat-view-drop-overlay",
14834
14852
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14835
- className: "cpk:flex cpk:flex-col cpk:items-center cpk:gap-2 cpk:text-primary/70",
14836
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Upload, { className: "cpk:w-8 cpk:h-8" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14837
- className: "cpk:text-sm cpk:font-medium",
14853
+ className: "cpk-chat-view-drop-overlay-content",
14854
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Upload, { className: "cpk-chat-view-drop-overlay-icon" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
14855
+ className: "cpk-chat-view-drop-overlay-label",
14838
14856
  children: "Drop files here"
14839
14857
  })]
14840
14858
  })
@@ -14913,7 +14931,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14913
14931
  suggestions,
14914
14932
  loadingIndexes: suggestionLoadingIndexes,
14915
14933
  onSelectSuggestion,
14916
- className: "cpk:mb-3 cpk:lg:ml-4 cpk:lg:mr-4 cpk:ml-0 cpk:mr-0"
14934
+ className: "cpk-chat-view-suggestion-view"
14917
14935
  }) : null;
14918
14936
  const BoundScrollView = renderSlot(scrollView, CopilotChatView.ScrollView, {
14919
14937
  autoScroll,
@@ -14924,9 +14942,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14924
14942
  "data-testid": "copilot-scroll-content",
14925
14943
  style: { paddingBottom: `${inputContainerHeight + (hasSuggestions ? 4 : 32)}px` },
14926
14944
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14927
- className: "cpk:max-w-3xl cpk:mx-auto",
14945
+ className: "cpk-chat-view-feed",
14928
14946
  children: [BoundMessageView, hasSuggestions ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
14929
- className: "cpk:pl-0 cpk:pr-4 cpk:@3xl:px-0 cpk:mt-4",
14947
+ className: "cpk-chat-view-suggestions",
14930
14948
  children: BoundSuggestionView
14931
14949
  }) : null]
14932
14950
  })
@@ -14951,11 +14969,11 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14951
14969
  });
14952
14970
  const welcomeScreenSlot = welcomeScreen === true ? void 0 : welcomeScreen;
14953
14971
  const inputWithAttachments = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
14954
- className: "cpk:w-full",
14972
+ className: "cpk-chat-view-welcome-input-group",
14955
14973
  children: [attachments && attachments.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotChatAttachmentQueue, {
14956
14974
  attachments,
14957
14975
  onRemoveAttachment: (id) => onRemoveAttachment?.(id),
14958
- className: "cpk:mb-2"
14976
+ className: "cpk-chat-view-welcome-attachment-queue"
14959
14977
  }), BoundInputForWelcome]
14960
14978
  });
14961
14979
  const BoundWelcomeScreen = renderSlot(welcomeScreenSlot, CopilotChatView.WelcomeScreen, {
@@ -14969,7 +14987,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14969
14987
  onDragOver,
14970
14988
  onDragLeave,
14971
14989
  onDrop,
14972
- className: cn("copilotKitChat cpk:@container cpk:relative cpk:h-full cpk:flex cpk:flex-col", className),
14990
+ className: cn("copilotKitChat cpk-chat-view", className),
14973
14991
  ...props,
14974
14992
  children: [dragOver && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropOverlay, {}), BoundWelcomeScreen]
14975
14993
  });
@@ -14991,7 +15009,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14991
15009
  onDragOver,
14992
15010
  onDragLeave,
14993
15011
  onDrop,
14994
- className: cn("copilotKitChat cpk:@container cpk:relative cpk:h-full cpk:flex cpk:flex-col", className),
15012
+ className: cn("copilotKitChat cpk-chat-view", className),
14995
15013
  ...props,
14996
15014
  children: [
14997
15015
  dragOver && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropOverlay, {}),
@@ -14999,13 +15017,13 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
14999
15017
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
15000
15018
  ref: setInputContainerEl,
15001
15019
  "data-testid": "copilot-input-overlay",
15002
- className: "cpk:absolute cpk:bottom-0 cpk:left-0 cpk:right-0 cpk:z-20 cpk:pointer-events-none",
15020
+ className: "cpk-chat-view-input-overlay",
15003
15021
  children: [attachments && attachments.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15004
- className: "cpk:max-w-3xl cpk:mx-auto cpk:w-full cpk:pointer-events-auto",
15022
+ className: "cpk-chat-view-attachments",
15005
15023
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotChatAttachmentQueue, {
15006
15024
  attachments,
15007
15025
  onRemoveAttachment: (id) => onRemoveAttachment?.(id),
15008
- className: "cpk:px-4"
15026
+ className: "cpk-chat-view-attachment-queue"
15009
15027
  })
15010
15028
  }), BoundInput]
15011
15029
  })
@@ -15116,19 +15134,19 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
15116
15134
  value: state.isAtBottom,
15117
15135
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
15118
15136
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(use_stick_to_bottom.StickToBottom.Content, {
15119
- className: "cpk:overflow-y-auto cpk:overflow-x-hidden",
15137
+ className: "cpk-chat-view-scroll-viewport",
15120
15138
  style: {
15121
15139
  flex: "1 1 0%",
15122
15140
  minHeight: 0
15123
15141
  },
15124
15142
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15125
- className: "cpk:px-4 cpk:@3xl:px-0 cpk:[div[data-sidebar-chat]_&]:px-8 cpk:[div[data-popup-chat]_&]:px-6",
15143
+ className: "cpk-chat-view-scroll-content",
15126
15144
  children
15127
15145
  })
15128
15146
  }),
15129
15147
  BoundFeather,
15130
15148
  !isAtBottom && !isResizing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15131
- className: "cpk:absolute cpk:inset-x-0 cpk:flex cpk:justify-center cpk:z-30 cpk:pointer-events-none",
15149
+ className: "cpk-chat-view-scroll-to-bottom",
15132
15150
  style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
15133
15151
  children: renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => startBottomPin() })
15134
15152
  })
@@ -15148,15 +15166,15 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
15148
15166
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScrollElementContext.Provider, {
15149
15167
  value: nonAutoScrollEl,
15150
15168
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
15151
- className: cn("cpk:h-full cpk:max-h-full cpk:flex cpk:flex-col cpk:min-h-0 cpk:relative", className),
15169
+ className: cn("cpk-chat-view-scroll-area", className),
15152
15170
  children: [
15153
15171
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
15154
15172
  ref: nonAutoScrollRefCallback,
15155
- className: "cpk:flex-1 cpk:min-h-0 cpk:overflow-y-auto cpk:overflow-x-hidden",
15173
+ className: "cpk-chat-view-scroll-viewport",
15156
15174
  ...props,
15157
15175
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15158
15176
  ref: contentRef,
15159
- className: "cpk:px-4 cpk:@3xl:px-0 cpk:[div[data-sidebar-chat]_&]:px-8 cpk:[div[data-popup-chat]_&]:px-6",
15177
+ className: "cpk-chat-view-scroll-content",
15160
15178
  children
15161
15179
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15162
15180
  ref: spacerRef,
@@ -15170,7 +15188,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
15170
15188
  }),
15171
15189
  BoundFeather,
15172
15190
  showScrollButton && !isResizing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15173
- className: "cpk:absolute cpk:inset-x-0 cpk:flex cpk:justify-center cpk:z-30 cpk:pointer-events-none",
15191
+ className: "cpk-chat-view-scroll-to-bottom",
15174
15192
  style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
15175
15193
  children: renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
15176
15194
  })
@@ -15216,9 +15234,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
15216
15234
  };
15217
15235
  }, [nonAutoScrollEl, mode]);
15218
15236
  if (!hasMounted) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15219
- className: "cpk:h-full cpk:max-h-full cpk:flex cpk:flex-col cpk:min-h-0 cpk:overflow-y-auto cpk:overflow-x-hidden",
15237
+ className: "cpk-chat-view-scroll-area cpk-chat-view-scroll-viewport",
15220
15238
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15221
- className: "cpk:px-4 cpk:@3xl:px-0 cpk:[div[data-sidebar-chat]_&]:px-8 cpk:[div[data-popup-chat]_&]:px-6",
15239
+ className: "cpk-chat-view-scroll-content",
15222
15240
  children
15223
15241
  })
15224
15242
  });
@@ -15228,17 +15246,17 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
15228
15246
  value: nonAutoScrollEl,
15229
15247
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
15230
15248
  ref: nonAutoScrollRefCallback,
15231
- className: cn("cpk:h-full cpk:max-h-full cpk:flex cpk:flex-col cpk:min-h-0 cpk:overflow-y-auto cpk:overflow-x-hidden cpk:relative", className),
15249
+ className: cn("cpk-chat-view-scroll-area cpk-chat-view-scroll-viewport", className),
15232
15250
  ...props,
15233
15251
  children: [
15234
15252
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15235
15253
  ref: contentRef,
15236
- className: "cpk:px-4 cpk:@3xl:px-0 cpk:[div[data-sidebar-chat]_&]:px-8 cpk:[div[data-popup-chat]_&]:px-6",
15254
+ className: "cpk-chat-view-scroll-content",
15237
15255
  children
15238
15256
  }),
15239
15257
  BoundFeather,
15240
15258
  showScrollButton && !isResizing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15241
- className: "cpk:absolute cpk:inset-x-0 cpk:flex cpk:justify-center cpk:z-30 cpk:pointer-events-none",
15259
+ className: "cpk-chat-view-scroll-to-bottom",
15242
15260
  style: { bottom: `${inputContainerHeight + SCROLL_BUTTON_OFFSET}px` },
15243
15261
  children: renderSlot(scrollToBottomButton, CopilotChatView.ScrollToBottomButton, { onClick: () => scrollToBottom() })
15244
15262
  })
@@ -15262,7 +15280,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
15262
15280
  children
15263
15281
  });
15264
15282
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(use_stick_to_bottom.StickToBottom, {
15265
- className: cn("cpk:flex-1 cpk:max-h-full cpk:flex cpk:flex-col cpk:min-h-0", className),
15283
+ className: cn("cpk-chat-view-scroll-view", className),
15266
15284
  resize: "smooth",
15267
15285
  initial: "smooth",
15268
15286
  ...props,
@@ -15282,10 +15300,10 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
15282
15300
  "data-testid": "copilot-scroll-to-bottom",
15283
15301
  variant: "outline",
15284
15302
  size: "sm",
15285
- className: (0, tailwind_merge.twMerge)("cpk:rounded-full cpk:w-10 cpk:h-10 cpk:p-0 cpk:pointer-events-auto", "cpk:bg-white cpk:dark:bg-gray-900", "cpk:shadow-lg cpk:border cpk:border-gray-200 cpk:dark:border-gray-700", "cpk:hover:bg-gray-50 cpk:dark:hover:bg-gray-800", "cpk:flex cpk:items-center cpk:justify-center cpk:cursor-pointer", className),
15303
+ className: cn("cpk-chat-view-scroll-to-bottom-button", className),
15286
15304
  "aria-label": labels.chatScrollToBottomLabel,
15287
15305
  ...props,
15288
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "cpk:w-4 cpk:h-4 cpk:text-gray-600 cpk:dark:text-white" })
15306
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "cpk-chat-view-scroll-to-bottom-icon" })
15289
15307
  });
15290
15308
  };
15291
15309
  _CopilotChatView.Feather = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -15295,7 +15313,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
15295
15313
  _CopilotChatView.WelcomeMessage = ({ className, ...props }) => {
15296
15314
  const labels = useCopilotChatConfiguration()?.labels ?? CopilotChatDefaultLabels;
15297
15315
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", {
15298
- className: cn("cpk:text-xl cpk:sm:text-2xl cpk:font-medium cpk:text-foreground cpk:text-center", className),
15316
+ className: cn("cpk-chat-view-welcome-message", className),
15299
15317
  ...props,
15300
15318
  children: labels.welcomeMessageText
15301
15319
  });
@@ -15315,21 +15333,21 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
15315
15333
  });
15316
15334
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15317
15335
  "data-testid": "copilot-welcome-screen",
15318
- className: cn("cpk:flex-1 cpk:flex cpk:flex-col cpk:items-center cpk:justify-center cpk:px-4", className),
15336
+ className: cn("cpk-chat-view-welcome-screen", className),
15319
15337
  ...props,
15320
15338
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
15321
- className: "cpk:w-full cpk:max-w-3xl cpk:flex cpk:flex-col cpk:items-center",
15339
+ className: "cpk-chat-view-welcome-screen-content",
15322
15340
  children: [
15323
15341
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15324
- className: "cpk:mb-6",
15342
+ className: "cpk-chat-view-welcome-screen-message",
15325
15343
  children: BoundWelcomeMessage
15326
15344
  }),
15327
15345
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15328
- className: "cpk:w-full",
15346
+ className: "cpk-chat-view-welcome-screen-input",
15329
15347
  children: input
15330
15348
  }),
15331
15349
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
15332
- className: "cpk:mt-4 cpk:flex cpk:justify-center",
15350
+ className: "cpk-chat-view-welcome-screen-suggestions",
15333
15351
  children: suggestionView
15334
15352
  })
15335
15353
  ]
@@ -16207,6 +16225,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16207
16225
  ref: chatContainerRef,
16208
16226
  style: { display: "contents" },
16209
16227
  children: [
16228
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotKitStyles, {}),
16210
16229
  attachmentsEnabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
16211
16230
  type: "file",
16212
16231
  multiple: true,
@@ -16251,22 +16270,22 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16251
16270
 
16252
16271
  //#endregion
16253
16272
  //#region src/components/chat/CopilotChatToggleButton.tsx
16273
+ const ICON_CLASS = "cpk-chat-toggle-button-icon";
16254
16274
  const DefaultOpenIcon = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.MessageCircle, {
16255
- className: cn("cpk:h-6 cpk:w-6", className),
16275
+ className: className ?? ICON_CLASS,
16256
16276
  strokeWidth: 1.75,
16257
16277
  fill: "currentColor",
16258
16278
  ...props
16259
16279
  });
16260
16280
  const DefaultCloseIcon = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, {
16261
- className: cn("cpk:h-6 cpk:w-6", className),
16281
+ className: className ?? ICON_CLASS,
16262
16282
  strokeWidth: 1.75,
16263
16283
  ...props
16264
16284
  });
16265
16285
  DefaultOpenIcon.displayName = "CopilotChatToggleButton.OpenIcon";
16266
16286
  DefaultCloseIcon.displayName = "CopilotChatToggleButton.CloseIcon";
16267
16287
  const ICON_TRANSITION_STYLE = Object.freeze({ transition: "opacity 120ms ease-out, transform 260ms cubic-bezier(0.22, 1, 0.36, 1)" });
16268
- const ICON_WRAPPER_BASE = "cpk:pointer-events-none cpk:absolute cpk:inset-0 cpk:flex cpk:items-center cpk:justify-center cpk:will-change-transform";
16269
- const BUTTON_BASE_CLASSES = cn("copilotKitButton", "cpk:fixed cpk:bottom-6 cpk:right-6 cpk:z-[1100] cpk:flex cpk:h-14 cpk:w-14 cpk:items-center cpk:justify-center", "cpk:rounded-full cpk:border cpk:border-primary cpk:bg-primary cpk:text-primary-foreground", "cpk:shadow-sm cpk:transition-all cpk:duration-200 cpk:ease-out", "cpk:hover:scale-[1.04] cpk:hover:shadow-md", "cpk:cursor-pointer", "cpk:active:scale-[0.96]", "cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-primary/50 cpk:focus-visible:ring-offset-2 cpk:focus-visible:ring-offset-background", "cpk:disabled:pointer-events-none cpk:disabled:opacity-60");
16288
+ const ICON_WRAPPER_CLASS = "cpk-chat-toggle-button-icon-wrapper";
16270
16289
  const CopilotChatToggleButton = react.default.forwardRef(function CopilotChatToggleButton({ openIcon, closeIcon, className, ...buttonProps }, ref) {
16271
16290
  const { onClick, type, disabled, ...restProps } = buttonProps;
16272
16291
  const configuration = useCopilotChatConfiguration();
@@ -16281,19 +16300,19 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16281
16300
  setModalOpen(!isOpen);
16282
16301
  };
16283
16302
  const renderedOpenIcon = renderSlot(openIcon, DefaultOpenIcon, {
16284
- className: "cpk:h-6 cpk:w-6",
16303
+ className: ICON_CLASS,
16285
16304
  "aria-hidden": true,
16286
16305
  focusable: false
16287
16306
  });
16288
16307
  const renderedCloseIcon = renderSlot(closeIcon, DefaultCloseIcon, {
16289
- className: "cpk:h-6 cpk:w-6",
16308
+ className: ICON_CLASS,
16290
16309
  "aria-hidden": true,
16291
16310
  focusable: false
16292
16311
  });
16293
16312
  const openIconElement = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
16294
16313
  "aria-hidden": "true",
16295
16314
  "data-slot": "chat-toggle-button-open-icon",
16296
- className: ICON_WRAPPER_BASE,
16315
+ className: ICON_WRAPPER_CLASS,
16297
16316
  style: {
16298
16317
  ...ICON_TRANSITION_STYLE,
16299
16318
  opacity: isOpen ? 0 : 1,
@@ -16304,7 +16323,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16304
16323
  const closeIconElement = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
16305
16324
  "aria-hidden": "true",
16306
16325
  "data-slot": "chat-toggle-button-close-icon",
16307
- className: ICON_WRAPPER_BASE,
16326
+ className: ICON_WRAPPER_CLASS,
16308
16327
  style: {
16309
16328
  ...ICON_TRANSITION_STYLE,
16310
16329
  opacity: isOpen ? 1 : 0,
@@ -16319,7 +16338,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16319
16338
  "data-testid": "copilot-chat-toggle",
16320
16339
  "data-slot": "chat-toggle-button",
16321
16340
  "data-state": isOpen ? "open" : "closed",
16322
- className: cn(BUTTON_BASE_CLASSES, className),
16341
+ className: cn("copilotKitButton cpk-chat-toggle-button", className),
16323
16342
  "aria-label": isOpen ? labels.chatToggleCloseLabel : labels.chatToggleOpenLabel,
16324
16343
  "aria-pressed": isOpen,
16325
16344
  disabled,
@@ -16413,21 +16432,21 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16413
16432
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
16414
16433
  "data-testid": "copilot-modal-header",
16415
16434
  "data-slot": "copilot-modal-header",
16416
- className: cn("copilotKitHeader", "cpk:flex cpk:items-center cpk:justify-between cpk:border-b cpk:border-border cpk:px-4 cpk:py-4", "cpk:bg-background/95 cpk:backdrop-blur cpk:supports-[backdrop-filter]:bg-background/80", className),
16435
+ className: cn("copilotKitHeader cpk-modal-header", className),
16417
16436
  ...rest,
16418
16437
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
16419
- className: "cpk:flex cpk:w-full cpk:items-center cpk:gap-2",
16438
+ className: "cpk-modal-header-content",
16420
16439
  children: [
16421
16440
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16422
- className: "cpk:flex cpk:flex-1 cpk:justify-start",
16441
+ className: "cpk-modal-header-start",
16423
16442
  children: BoundDrawerLauncher ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "aria-hidden": "true" })
16424
16443
  }),
16425
16444
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16426
- className: "cpk:flex cpk:flex-1 cpk:justify-center cpk:text-center",
16445
+ className: "cpk-modal-header-center",
16427
16446
  children: BoundTitle
16428
16447
  }),
16429
16448
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16430
- className: "cpk:flex cpk:flex-1 cpk:justify-end",
16449
+ className: "cpk-modal-header-end",
16431
16450
  children: BoundCloseButton
16432
16451
  })
16433
16452
  ]
@@ -16438,7 +16457,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16438
16457
  (function(_CopilotModalHeader) {
16439
16458
  _CopilotModalHeader.Title = ({ children, className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16440
16459
  "data-testid": "copilot-header-title",
16441
- className: cn("cpk:w-full cpk:text-base cpk:font-medium cpk:leading-none cpk:tracking-tight cpk:text-foreground", className),
16460
+ className: cn("cpk-modal-header-title", className),
16442
16461
  ...props,
16443
16462
  children
16444
16463
  });
@@ -16447,11 +16466,11 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16447
16466
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
16448
16467
  type: "button",
16449
16468
  "data-testid": "copilot-close-button",
16450
- className: cn("cpk:inline-flex cpk:size-8 cpk:items-center cpk:justify-center cpk:rounded-full cpk:text-muted-foreground cpk:transition cpk:cursor-pointer", "cpk:hover:bg-muted cpk:hover:text-foreground cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-ring", className),
16469
+ className: cn("cpk-modal-header-close-button", className),
16451
16470
  "aria-label": labels.modalHeaderCloseButtonLabel,
16452
16471
  ...props,
16453
16472
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, {
16454
- className: "cpk:h-4 cpk:w-4",
16473
+ className: "cpk-modal-header-close-icon",
16455
16474
  "aria-hidden": "true"
16456
16475
  })
16457
16476
  });
@@ -16461,11 +16480,11 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16461
16480
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
16462
16481
  type: "button",
16463
16482
  "data-testid": "copilot-threads-drawer-launcher",
16464
- className: cn("cpk:inline-flex cpk:size-8 cpk:items-center cpk:justify-center cpk:rounded-full cpk:text-muted-foreground cpk:transition cpk:cursor-pointer", "cpk:hover:bg-muted cpk:hover:text-foreground cpk:focus-visible:outline-none cpk:focus-visible:ring-2 cpk:focus-visible:ring-ring", className),
16483
+ className: cn("cpk-modal-header-drawer-launcher", className),
16465
16484
  "aria-label": labels.modalHeaderThreadsButtonLabel,
16466
16485
  ...props,
16467
16486
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.PanelLeftOpen, {
16468
- className: "cpk:h-4 cpk:w-4",
16487
+ className: "cpk-modal-header-drawer-launcher-icon",
16469
16488
  "aria-hidden": "true"
16470
16489
  })
16471
16490
  });
@@ -16556,13 +16575,13 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16556
16575
  position
16557
16576
  ]);
16558
16577
  const headerElement = renderSlot(header, CopilotModalHeader, {});
16559
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [renderSlot(toggleButton, CopilotChatToggleButton, position === "left" ? { className: "cpk:left-6 cpk:right-auto" } : {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("aside", {
16578
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [renderSlot(toggleButton, CopilotChatToggleButton, position === "left" ? { className: "cpk-sidebar-view-toggle-button-left" } : {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("aside", {
16560
16579
  ref: sidebarRef,
16561
16580
  "data-copilotkit": true,
16562
16581
  "data-testid": "copilot-sidebar",
16563
16582
  "data-copilot-sidebar": true,
16564
16583
  "data-position": position,
16565
- className: cn("copilotKitSidebar copilotKitWindow", "cpk:fixed cpk:top-0 cpk:z-[1200] cpk:flex", position === "left" ? "cpk:left-0" : "cpk:right-0", "cpk:h-[100vh] cpk:h-[100dvh] cpk:max-h-screen", "cpk:w-full", position === "left" ? "cpk:border-r" : "cpk:border-l", "cpk:border-border cpk:bg-background cpk:text-foreground cpk:shadow-xl", "cpk:transition-transform cpk:duration-300 cpk:ease-out", isSidebarOpen ? "cpk:translate-x-0" : position === "left" ? "cpk:-translate-x-full cpk:pointer-events-none" : "cpk:translate-x-full cpk:pointer-events-none"),
16584
+ className: cn("copilotKitSidebar copilotKitWindow cpk-sidebar-view", !isSidebarOpen && "cpk-sidebar-view-closed"),
16566
16585
  style: {
16567
16586
  "--sidebar-width": widthToCss(sidebarWidth),
16568
16587
  paddingTop: "env(safe-area-inset-top)",
@@ -16572,9 +16591,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16572
16591
  "aria-label": configuration?.labels.sidebarLabel ?? CopilotChatDefaultLabels.sidebarLabel,
16573
16592
  role: "complementary",
16574
16593
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
16575
- className: "cpk:flex cpk:h-full cpk:w-full cpk:flex-col cpk:overflow-hidden",
16594
+ className: "cpk-sidebar-view-panel",
16576
16595
  children: [headerElement, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16577
- className: "cpk:flex-1 cpk:overflow-hidden",
16596
+ className: "cpk-sidebar-view-chat",
16578
16597
  "data-sidebar-chat": true,
16579
16598
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotChatView_default, { ...props })
16580
16599
  })]
@@ -16597,17 +16616,17 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16597
16616
  })
16598
16617
  });
16599
16618
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
16600
- className: cn("cpk:h-full cpk:flex cpk:flex-col", className),
16619
+ className: cn("cpk-sidebar-view-welcome-screen", className),
16601
16620
  ...props,
16602
16621
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16603
- className: "cpk:flex-1 cpk:flex cpk:flex-col cpk:items-center cpk:justify-center cpk:px-4",
16622
+ className: "cpk-sidebar-view-welcome-screen-message",
16604
16623
  children: BoundWelcomeMessage
16605
16624
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16606
- className: "cpk:px-8 cpk:pb-4",
16625
+ className: "cpk-sidebar-view-welcome-screen-footer",
16607
16626
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
16608
- className: "cpk:max-w-3xl cpk:mx-auto",
16627
+ className: "cpk-sidebar-view-welcome-screen-content",
16609
16628
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16610
- className: "cpk:mb-4 cpk:flex cpk:justify-center",
16629
+ className: "cpk-sidebar-view-welcome-screen-suggestions",
16611
16630
  children: suggestionView
16612
16631
  }), input]
16613
16632
  })
@@ -16721,10 +16740,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16721
16740
  paddingLeft: "env(safe-area-inset-left)",
16722
16741
  paddingRight: "env(safe-area-inset-right)"
16723
16742
  }), [resolvedHeight, resolvedWidth]);
16724
- const popupAnimationClass = isPopupOpen && !isAnimatingOut ? "cpk:pointer-events-auto cpk:translate-y-0 cpk:opacity-100 cpk:md:scale-100" : "cpk:pointer-events-none cpk:translate-y-4 cpk:opacity-0 cpk:md:translate-y-5 cpk:md:scale-[0.95]";
16725
16743
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [toggleButtonElement, isRendered ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16726
16744
  "data-copilotkit": true,
16727
- className: cn("cpk:fixed cpk:inset-0 cpk:z-[1200] cpk:flex cpk:max-w-full cpk:flex-col cpk:items-stretch cpk:bg-transparent", "cpk:md:inset-auto cpk:md:bottom-24 cpk:md:right-6 cpk:md:items-end cpk:md:gap-4"),
16745
+ className: "cpk-popup-view",
16728
16746
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
16729
16747
  ref: containerRef,
16730
16748
  tabIndex: -1,
@@ -16732,14 +16750,14 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16732
16750
  "aria-label": labels.modalHeaderTitle,
16733
16751
  "data-testid": "copilot-popup",
16734
16752
  "data-copilot-popup": true,
16735
- className: cn("copilotKitPopup copilotKitWindow", "cpk:relative cpk:flex cpk:h-full cpk:w-full cpk:flex-col cpk:overflow-hidden cpk:bg-background cpk:text-foreground", "cpk:origin-bottom cpk:focus:outline-none cpk:transform-gpu cpk:transition-transform cpk:transition-opacity cpk:duration-200 cpk:ease-out", "cpk:md:transition-transform cpk:md:transition-opacity", "cpk:rounded-none cpk:border cpk:border-border/0 cpk:shadow-none cpk:ring-0", "cpk:md:h-[var(--copilot-popup-height)] cpk:md:w-[var(--copilot-popup-width)]", "cpk:md:max-h-[var(--copilot-popup-max-height)] cpk:md:max-w-[var(--copilot-popup-max-width)]", "cpk:md:origin-bottom-right cpk:md:rounded-2xl cpk:md:border-border cpk:md:shadow-xl cpk:md:ring-1 cpk:md:ring-border/40", popupAnimationClass),
16753
+ className: cn("copilotKitPopup copilotKitWindow cpk-popup-view-window", isPopupOpen && !isAnimatingOut && "cpk-popup-view-window-open"),
16736
16754
  style: popupStyle,
16737
16755
  children: [headerElement, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16738
- className: "cpk:flex-1 cpk:overflow-hidden",
16756
+ className: "cpk-popup-view-chat",
16739
16757
  "data-popup-chat": true,
16740
16758
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopilotChatView_default, {
16741
16759
  ...restProps,
16742
- className: cn("cpk:h-full cpk:min-h-0", className)
16760
+ className: cn("cpk-popup-view-chat-view", className)
16743
16761
  })
16744
16762
  })]
16745
16763
  })
@@ -16761,13 +16779,13 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16761
16779
  })
16762
16780
  });
16763
16781
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
16764
- className: cn("cpk:h-full cpk:flex cpk:flex-col", className),
16782
+ className: cn("cpk-popup-view-welcome-screen", className),
16765
16783
  ...props,
16766
16784
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16767
- className: "cpk:flex-1 cpk:flex cpk:flex-col cpk:items-center cpk:justify-center cpk:px-4",
16785
+ className: "cpk-popup-view-welcome-screen-message",
16768
16786
  children: BoundWelcomeMessage
16769
16787
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
16770
- className: "cpk:mb-4 cpk:flex cpk:justify-center cpk:px-4",
16788
+ className: "cpk-popup-view-welcome-screen-suggestions",
16771
16789
  children: suggestionView
16772
16790
  }), input] })]
16773
16791
  });
@@ -17434,6 +17452,7 @@ Object.defineProperty(exports, 'CopilotKitHeaderResolutionError', {
17434
17452
  });
17435
17453
  exports.CopilotKitInspector = CopilotKitInspector;
17436
17454
  exports.CopilotKitProvider = CopilotKitProvider;
17455
+ exports.CopilotKitStyles = CopilotKitStyles;
17437
17456
  Object.defineProperty(exports, 'CopilotModalHeader', {
17438
17457
  enumerable: true,
17439
17458
  get: function () {