@yourgpt/copilot-sdk 1.2.10 → 1.3.0

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/ui/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { useCopilot, useThreadManager } from '../chunk-EYNSW3NR.js';
1
+ import { useCopilot, useThreadManager } from '../chunk-N2SMQKRK.js';
2
2
  import { createServerAdapter } from '../chunk-CVD3X4MN.js';
3
3
  import { clsx } from 'clsx';
4
4
  import { twMerge } from 'tailwind-merge';
@@ -462,7 +462,7 @@ function CodeBlock({ children, className, ...props }) {
462
462
  );
463
463
  }
464
464
  var buttonVariants = cva(
465
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
465
+ "csdk-button inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
466
466
  {
467
467
  variants: {
468
468
  variant: {
@@ -782,14 +782,14 @@ var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__P
782
782
  {
783
783
  ref,
784
784
  className: cn(
785
- "flex h-full w-full items-center justify-center rounded-full bg-muted",
785
+ "csdk-avatar-fallback flex h-full w-full items-center justify-center rounded-full bg-muted",
786
786
  className
787
787
  ),
788
788
  ...props
789
789
  }
790
790
  ));
791
791
  AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
792
- var Message = ({ children, className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex gap-3", className), ...props, children });
792
+ var Message = ({ children, className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("csdk-message flex gap-3", className), ...props, children });
793
793
  var MessageAvatar = ({
794
794
  src,
795
795
  alt,
@@ -798,7 +798,7 @@ var MessageAvatar = ({
798
798
  delayMs,
799
799
  className
800
800
  }) => {
801
- return /* @__PURE__ */ jsxs(Avatar, { className: cn("size-7 shrink-0", className), children: [
801
+ return /* @__PURE__ */ jsxs(Avatar, { className: cn("csdk-avatar size-7 shrink-0", className), children: [
802
802
  /* @__PURE__ */ jsx(AvatarImage, { src, alt }),
803
803
  /* @__PURE__ */ jsx(AvatarFallback, { delayMs, children: fallbackIcon || fallback })
804
804
  ] });
@@ -816,7 +816,7 @@ var MessageContent = ({
816
816
  ...props
817
817
  }) => {
818
818
  const classNames = cn(
819
- "rounded-lg p-2 break-words whitespace-normal max-w-none leading-relaxed",
819
+ "csdk-message-content rounded-lg p-2 break-words whitespace-normal max-w-none leading-relaxed",
820
820
  // Typography - simple Tailwind utilities (no prose)
821
821
  "[&_p]:my-1 [&_p]:leading-relaxed",
822
822
  "[&_ul]:my-1 [&_ul]:pl-4 [&_ul]:list-disc [&_ul]:list-outside",
@@ -897,7 +897,7 @@ function PromptInput({
897
897
  {
898
898
  onClick: handleClick,
899
899
  className: cn(
900
- "border-input bg-background cursor-text rounded-3xl border p-2 shadow-xs",
900
+ "csdk-input border-input bg-background cursor-text rounded-3xl border p-2 shadow-xs",
901
901
  disabled && "cursor-not-allowed opacity-60",
902
902
  className
903
903
  ),
@@ -957,7 +957,7 @@ function PromptInputTextarea({
957
957
  onChange: handleChange,
958
958
  onKeyDown: handleKeyDown,
959
959
  className: cn(
960
- "text-foreground min-h-[44px] w-full resize-none border-none bg-transparent shadow-none outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
960
+ "csdk-input-textarea text-foreground min-h-[44px] w-full resize-none border-none bg-transparent shadow-none outline-none focus-visible:ring-0 focus-visible:ring-offset-0",
961
961
  className
962
962
  ),
963
963
  rows: 1,
@@ -2263,12 +2263,12 @@ function FollowUpQuestions({
2263
2263
  if (!questions || questions.length === 0) {
2264
2264
  return null;
2265
2265
  }
2266
- return /* @__PURE__ */ jsx("div", { className: cn("flex flex-wrap gap-2 mt-2", className), children: questions.map((question, index) => /* @__PURE__ */ jsx(
2266
+ return /* @__PURE__ */ jsx("div", { className: cn("csdk-followup flex flex-wrap gap-2 mt-2", className), children: questions.map((question, index) => /* @__PURE__ */ jsx(
2267
2267
  "button",
2268
2268
  {
2269
2269
  onClick: () => onSelect(question),
2270
2270
  className: cn(
2271
- "px-3 py-1.5 text-sm rounded-full",
2271
+ "csdk-followup-button px-3 py-1.5 text-sm rounded-full",
2272
2272
  "bg-primary/10 hover:bg-primary/20 text-primary",
2273
2273
  "border border-primary/20 hover:border-primary/40",
2274
2274
  "transition-colors duration-150",
@@ -3563,7 +3563,7 @@ function DefaultMessage({
3563
3563
  MessageContent,
3564
3564
  {
3565
3565
  className: cn(
3566
- "rounded-lg px-4 py-2 bg-primary text-primary-foreground",
3566
+ "csdk-message-user rounded-lg px-4 py-2 bg-primary text-primary-foreground",
3567
3567
  userMessageClassName
3568
3568
  ),
3569
3569
  markdown: true,
@@ -3635,7 +3635,7 @@ function DefaultMessage({
3635
3635
  MessageContent,
3636
3636
  {
3637
3637
  className: cn(
3638
- "rounded-lg px-4 py-2 bg-muted",
3638
+ "csdk-message-assistant rounded-lg px-4 py-2 bg-muted",
3639
3639
  assistantMessageClassName
3640
3640
  ),
3641
3641
  markdown: true,
@@ -4636,7 +4636,7 @@ function Chat({
4636
4636
  {
4637
4637
  htmlFor: fileInputId,
4638
4638
  className: cn(
4639
- "flex h-8 w-8 items-center justify-center rounded-2xl",
4639
+ "csdk-button-attach flex h-8 w-8 items-center justify-center rounded-2xl",
4640
4640
  attachmentsEnabled ? "hover:bg-secondary-foreground/10 cursor-pointer" : "opacity-50 cursor-not-allowed"
4641
4641
  ),
4642
4642
  children: [
@@ -4664,7 +4664,7 @@ function Chat({
4664
4664
  {
4665
4665
  size: "sm",
4666
4666
  variant: "destructive",
4667
- className: "rounded-full size-9",
4667
+ className: "csdk-button-stop rounded-full size-9",
4668
4668
  onClick: onStop,
4669
4669
  children: /* @__PURE__ */ jsx(StopIcon, { className: "h-4 w-4" })
4670
4670
  }
@@ -4672,7 +4672,7 @@ function Chat({
4672
4672
  Button,
4673
4673
  {
4674
4674
  size: "sm",
4675
- className: "rounded-full size-9",
4675
+ className: "csdk-button-send rounded-full size-9",
4676
4676
  onClick: handleSubmit,
4677
4677
  disabled: !input.trim() && !pendingAttachments.some(
4678
4678
  (att) => att.status === "ready"