@copilotkit/react-ui 0.11.0 → 0.13.0-alpha.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.
Files changed (183) hide show
  1. package/.turbo/turbo-build.log +216 -197
  2. package/CHANGELOG.md +22 -0
  3. package/dist/components/chat-components/chat-list.mjs +440 -12
  4. package/dist/components/chat-components/chat-list.mjs.map +1 -1
  5. package/dist/components/chat-components/chat-message-actions.mjs +168 -7
  6. package/dist/components/chat-components/chat-message-actions.mjs.map +1 -1
  7. package/dist/components/chat-components/chat-message.mjs +403 -10
  8. package/dist/components/chat-components/chat-message.mjs.map +1 -1
  9. package/dist/components/chat-components/chat-panel.mjs +300 -9
  10. package/dist/components/chat-components/chat-panel.mjs.map +1 -1
  11. package/dist/components/chat-components/chat-scroll-anchor.mjs +44 -4
  12. package/dist/components/chat-components/chat-scroll-anchor.mjs.map +1 -1
  13. package/dist/components/chat-components/clear-history.mjs +273 -74
  14. package/dist/components/chat-components/clear-history.mjs.map +1 -1
  15. package/dist/components/chat-components/copilot-chat.mjs +808 -21
  16. package/dist/components/chat-components/copilot-chat.mjs.map +1 -1
  17. package/dist/components/chat-components/default-empty-screen.mjs +175 -7
  18. package/dist/components/chat-components/default-empty-screen.mjs.map +1 -1
  19. package/dist/components/chat-components/external-link.d.ts +1 -1
  20. package/dist/components/chat-components/external-link.mjs +25 -3
  21. package/dist/components/chat-components/external-link.mjs.map +1 -1
  22. package/dist/components/chat-components/markdown.mjs +10 -3
  23. package/dist/components/chat-components/markdown.mjs.map +1 -1
  24. package/dist/components/chat-components/prompt-form.d.ts +1 -1
  25. package/dist/components/chat-components/prompt-form.mjs +227 -8
  26. package/dist/components/chat-components/prompt-form.mjs.map +1 -1
  27. package/dist/components/chat-components/theme-toggle.mjs +143 -31
  28. package/dist/components/chat-components/theme-toggle.mjs.map +1 -1
  29. package/dist/components/chat-components/toaster.mjs +7 -3
  30. package/dist/components/chat-components/toaster.mjs.map +1 -1
  31. package/dist/components/chat-components/ui/alert-dialog.mjs +199 -5
  32. package/dist/components/chat-components/ui/alert-dialog.mjs.map +1 -1
  33. package/dist/components/chat-components/ui/badge.d.ts +1 -1
  34. package/dist/components/chat-components/ui/badge.mjs +50 -10
  35. package/dist/components/chat-components/ui/badge.mjs.map +1 -1
  36. package/dist/components/chat-components/ui/button.mjs +85 -4
  37. package/dist/components/chat-components/ui/button.mjs.map +1 -1
  38. package/dist/components/chat-components/ui/codeblock.mjs +283 -7
  39. package/dist/components/chat-components/ui/codeblock.mjs.map +1 -1
  40. package/dist/components/chat-components/ui/dialog.mjs +128 -85
  41. package/dist/components/chat-components/ui/dialog.mjs.map +1 -1
  42. package/dist/components/chat-components/ui/dropdown-menu.mjs +103 -47
  43. package/dist/components/chat-components/ui/dropdown-menu.mjs.map +1 -1
  44. package/dist/components/chat-components/ui/icons.mjs +554 -4
  45. package/dist/components/chat-components/ui/icons.mjs.map +1 -1
  46. package/dist/components/chat-components/ui/input.mjs +59 -15
  47. package/dist/components/chat-components/ui/input.mjs.map +1 -1
  48. package/dist/components/chat-components/ui/label.mjs +52 -13
  49. package/dist/components/chat-components/ui/label.mjs.map +1 -1
  50. package/dist/components/chat-components/ui/select.mjs +156 -71
  51. package/dist/components/chat-components/ui/select.mjs.map +1 -1
  52. package/dist/components/chat-components/ui/separator.mjs +68 -4
  53. package/dist/components/chat-components/ui/separator.mjs.map +1 -1
  54. package/dist/components/chat-components/ui/sheet.mjs +127 -74
  55. package/dist/components/chat-components/ui/sheet.mjs.map +1 -1
  56. package/dist/components/chat-components/ui/switch.mjs +69 -18
  57. package/dist/components/chat-components/ui/switch.mjs.map +1 -1
  58. package/dist/components/chat-components/ui/textarea.mjs +58 -14
  59. package/dist/components/chat-components/ui/textarea.mjs.map +1 -1
  60. package/dist/components/chat-components/ui/tooltip.mjs +72 -4
  61. package/dist/components/chat-components/ui/tooltip.mjs.map +1 -1
  62. package/dist/components/index.mjs +924 -25
  63. package/dist/components/index.mjs.map +1 -1
  64. package/dist/components/sidebar/copilot-sidebar-ui-provider.d.ts +1 -1
  65. package/dist/components/sidebar/copilot-sidebar-ui-provider.mjs +919 -24
  66. package/dist/components/sidebar/copilot-sidebar-ui-provider.mjs.map +1 -1
  67. package/dist/components/sidebar/copilot-sidebar.mjs +841 -22
  68. package/dist/components/sidebar/copilot-sidebar.mjs.map +1 -1
  69. package/dist/components/sidebar/sidebar-context.mjs +10 -3
  70. package/dist/components/sidebar/sidebar-context.mjs.map +1 -1
  71. package/dist/context/index.d.ts +1 -0
  72. package/dist/context/index.mjs +0 -2
  73. package/dist/context/index.mjs.map +1 -1
  74. package/dist/hooks/index.d.ts +1 -0
  75. package/dist/hooks/index.mjs +0 -2
  76. package/dist/hooks/index.mjs.map +1 -1
  77. package/dist/hooks/use-at-bottom.mjs +19 -3
  78. package/dist/hooks/use-at-bottom.mjs.map +1 -1
  79. package/dist/hooks/use-copy-to-clipboard.d.ts +1 -1
  80. package/dist/hooks/use-copy-to-clipboard.mjs +26 -3
  81. package/dist/hooks/use-copy-to-clipboard.mjs.map +1 -1
  82. package/dist/hooks/use-enter-submit.mjs +16 -3
  83. package/dist/hooks/use-enter-submit.mjs.map +1 -1
  84. package/dist/index.mjs +924 -28
  85. package/dist/index.mjs.map +1 -1
  86. package/dist/lib/utils.mjs +62 -3
  87. package/dist/lib/utils.mjs.map +1 -1
  88. package/dist/lib/utils.test.d.ts +1 -0
  89. package/dist/lib/utils.test.mjs +0 -1
  90. package/dist/lib/utils.test.mjs.map +1 -1
  91. package/dist/types/index.d.ts +1 -0
  92. package/dist/types/index.mjs +0 -2
  93. package/dist/types/index.mjs.map +1 -1
  94. package/dist/types/types.mjs +0 -2
  95. package/dist/types/types.mjs.map +1 -1
  96. package/package.json +6 -6
  97. package/src/components/chat-components/chat-list.tsx +2 -6
  98. package/src/components/chat-components/chat-message-actions.tsx +2 -6
  99. package/src/components/chat-components/chat-message.tsx +2 -6
  100. package/src/components/chat-components/chat-panel.tsx +3 -17
  101. package/src/components/chat-components/clear-history.tsx +1 -2
  102. package/src/components/chat-components/copilot-chat.tsx +6 -5
  103. package/src/components/chat-components/default-empty-screen.tsx +3 -9
  104. package/src/components/chat-components/external-link.tsx +2 -14
  105. package/src/components/chat-components/markdown.tsx +1 -2
  106. package/src/components/chat-components/prompt-form.tsx +2 -8
  107. package/src/components/chat-components/ui/alert-dialog.tsx +9 -33
  108. package/src/components/chat-components/ui/badge.tsx +3 -6
  109. package/src/components/chat-components/ui/button.tsx +7 -15
  110. package/src/components/chat-components/ui/codeblock.tsx +1 -4
  111. package/src/components/chat-components/ui/dialog.tsx +8 -30
  112. package/src/components/chat-components/ui/dropdown-menu.tsx +7 -18
  113. package/src/components/chat-components/ui/icons.tsx +6 -29
  114. package/src/components/chat-components/ui/input.tsx +3 -4
  115. package/src/components/chat-components/ui/label.tsx +3 -8
  116. package/src/components/chat-components/ui/select.tsx +4 -4
  117. package/src/components/chat-components/ui/separator.tsx +13 -18
  118. package/src/components/chat-components/ui/sheet.tsx +7 -23
  119. package/src/components/chat-components/ui/switch.tsx +2 -2
  120. package/src/components/chat-components/ui/textarea.tsx +3 -4
  121. package/src/components/chat-components/ui/tooltip.tsx +1 -1
  122. package/src/components/sidebar/copilot-sidebar-ui-provider.tsx +2 -6
  123. package/src/components/sidebar/copilot-sidebar.tsx +1 -3
  124. package/src/hooks/use-at-bottom.tsx +1 -4
  125. package/src/hooks/use-copy-to-clipboard.tsx +1 -3
  126. package/src/hooks/use-enter-submit.tsx +2 -8
  127. package/src/lib/utils.ts +2 -5
  128. package/dist/chunk-2NO6SF5H.mjs +0 -53
  129. package/dist/chunk-2NO6SF5H.mjs.map +0 -1
  130. package/dist/chunk-6LAC5RA2.mjs +0 -28
  131. package/dist/chunk-6LAC5RA2.mjs.map +0 -1
  132. package/dist/chunk-6LRNF2VU.mjs +0 -12
  133. package/dist/chunk-6LRNF2VU.mjs.map +0 -1
  134. package/dist/chunk-6UJWRTL6.mjs +0 -45
  135. package/dist/chunk-6UJWRTL6.mjs.map +0 -1
  136. package/dist/chunk-7KPMJBGH.mjs +0 -48
  137. package/dist/chunk-7KPMJBGH.mjs.map +0 -1
  138. package/dist/chunk-7NSRDJ5C.mjs +0 -3
  139. package/dist/chunk-7NSRDJ5C.mjs.map +0 -1
  140. package/dist/chunk-APH6ZQHG.mjs +0 -69
  141. package/dist/chunk-APH6ZQHG.mjs.map +0 -1
  142. package/dist/chunk-BIPCPNHG.mjs +0 -18
  143. package/dist/chunk-BIPCPNHG.mjs.map +0 -1
  144. package/dist/chunk-BS6RR2DJ.mjs +0 -25
  145. package/dist/chunk-BS6RR2DJ.mjs.map +0 -1
  146. package/dist/chunk-DOMJCSI6.mjs +0 -26
  147. package/dist/chunk-DOMJCSI6.mjs.map +0 -1
  148. package/dist/chunk-H4VKQGVU.mjs +0 -3
  149. package/dist/chunk-H4VKQGVU.mjs.map +0 -1
  150. package/dist/chunk-HKSY5T7Y.mjs +0 -140
  151. package/dist/chunk-HKSY5T7Y.mjs.map +0 -1
  152. package/dist/chunk-I2AB5FK4.mjs +0 -123
  153. package/dist/chunk-I2AB5FK4.mjs.map +0 -1
  154. package/dist/chunk-IU3WTXLQ.mjs +0 -3
  155. package/dist/chunk-IU3WTXLQ.mjs.map +0 -1
  156. package/dist/chunk-KR7MH7XO.mjs +0 -481
  157. package/dist/chunk-KR7MH7XO.mjs.map +0 -1
  158. package/dist/chunk-KXJV37FS.mjs +0 -33
  159. package/dist/chunk-KXJV37FS.mjs.map +0 -1
  160. package/dist/chunk-LMCFSE4V.mjs +0 -29
  161. package/dist/chunk-LMCFSE4V.mjs.map +0 -1
  162. package/dist/chunk-MC6KTH4X.mjs +0 -12
  163. package/dist/chunk-MC6KTH4X.mjs.map +0 -1
  164. package/dist/chunk-MRXNTQOX.mjs +0 -55
  165. package/dist/chunk-MRXNTQOX.mjs.map +0 -1
  166. package/dist/chunk-N7KB3Z57.mjs +0 -23
  167. package/dist/chunk-N7KB3Z57.mjs.map +0 -1
  168. package/dist/chunk-RSONJDLO.mjs +0 -28
  169. package/dist/chunk-RSONJDLO.mjs.map +0 -1
  170. package/dist/chunk-TUPGAO7T.mjs +0 -72
  171. package/dist/chunk-TUPGAO7T.mjs.map +0 -1
  172. package/dist/chunk-TVTG3V4F.mjs +0 -40
  173. package/dist/chunk-TVTG3V4F.mjs.map +0 -1
  174. package/dist/chunk-U6NJWGTV.mjs +0 -3
  175. package/dist/chunk-U6NJWGTV.mjs.map +0 -1
  176. package/dist/chunk-UKKJ6H2K.mjs +0 -90
  177. package/dist/chunk-UKKJ6H2K.mjs.map +0 -1
  178. package/dist/chunk-V6QYUEJR.mjs +0 -47
  179. package/dist/chunk-V6QYUEJR.mjs.map +0 -1
  180. package/dist/chunk-VSNDSL6W.mjs +0 -74
  181. package/dist/chunk-VSNDSL6W.mjs.map +0 -1
  182. package/dist/chunk-ZB6JHNDT.mjs +0 -75
  183. package/dist/chunk-ZB6JHNDT.mjs.map +0 -1
@@ -30,7 +30,7 @@ const AlertDialogOverlay = React.forwardRef<
30
30
  <AlertDialogPrimitive.Overlay
31
31
  className={cn(
32
32
  "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm transition-opacity animate-in fade-in",
33
- className
33
+ className,
34
34
  )}
35
35
  {...props}
36
36
  ref={ref}
@@ -48,7 +48,7 @@ const AlertDialogContent = React.forwardRef<
48
48
  ref={ref}
49
49
  className={cn(
50
50
  "fixed z-50 grid w-full max-w-lg scale-100 gap-4 border bg-background p-6 opacity-100 shadow-lg animate-in fade-in-90 slide-in-from-bottom-10 sm:rounded-lg sm:zoom-in-90 sm:slide-in-from-bottom-0 md:w-full",
51
- className
51
+ className,
52
52
  )}
53
53
  {...props}
54
54
  />
@@ -56,29 +56,14 @@ const AlertDialogContent = React.forwardRef<
56
56
  ));
57
57
  AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
58
58
 
59
- const AlertDialogHeader = ({
60
- className,
61
- ...props
62
- }: React.HTMLAttributes<HTMLDivElement>) => (
63
- <div
64
- className={cn(
65
- "flex flex-col space-y-2 text-center sm:text-left",
66
- className
67
- )}
68
- {...props}
69
- />
59
+ const AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
60
+ <div className={cn("flex flex-col space-y-2 text-center sm:text-left", className)} {...props} />
70
61
  );
71
62
  AlertDialogHeader.displayName = "AlertDialogHeader";
72
63
 
73
- const AlertDialogFooter = ({
74
- className,
75
- ...props
76
- }: React.HTMLAttributes<HTMLDivElement>) => (
64
+ const AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
77
65
  <div
78
- className={cn(
79
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
80
- className
81
- )}
66
+ className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
82
67
  {...props}
83
68
  />
84
69
  );
@@ -106,18 +91,13 @@ const AlertDialogDescription = React.forwardRef<
106
91
  {...props}
107
92
  />
108
93
  ));
109
- AlertDialogDescription.displayName =
110
- AlertDialogPrimitive.Description.displayName;
94
+ AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
111
95
 
112
96
  const AlertDialogAction = React.forwardRef<
113
97
  React.ElementRef<typeof AlertDialogPrimitive.Action>,
114
98
  React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
115
99
  >(({ className, ...props }, ref) => (
116
- <AlertDialogPrimitive.Action
117
- ref={ref}
118
- className={cn(buttonVariants(), className)}
119
- {...props}
120
- />
100
+ <AlertDialogPrimitive.Action ref={ref} className={cn(buttonVariants(), className)} {...props} />
121
101
  ));
122
102
  AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
123
103
 
@@ -127,11 +107,7 @@ const AlertDialogCancel = React.forwardRef<
127
107
  >(({ className, ...props }, ref) => (
128
108
  <AlertDialogPrimitive.Cancel
129
109
  ref={ref}
130
- className={cn(
131
- buttonVariants({ variant: "outline" }),
132
- "mt-2 sm:mt-0",
133
- className
134
- )}
110
+ className={cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className)}
135
111
  {...props}
136
112
  />
137
113
  ));
@@ -8,8 +8,7 @@ const badgeVariants = cva(
8
8
  {
9
9
  variants: {
10
10
  variant: {
11
- default:
12
- "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
11
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
13
12
  secondary:
14
13
  "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
15
14
  destructive:
@@ -20,7 +19,7 @@ const badgeVariants = cva(
20
19
  defaultVariants: {
21
20
  variant: "default",
22
21
  },
23
- }
22
+ },
24
23
  );
25
24
 
26
25
  export interface BadgeProps
@@ -28,9 +27,7 @@ export interface BadgeProps
28
27
  VariantProps<typeof badgeVariants> {}
29
28
 
30
29
  function Badge({ className, variant, ...props }: BadgeProps) {
31
- return (
32
- <div className={cn(badgeVariants({ variant }), className)} {...props} />
33
- );
30
+ return <div className={cn(badgeVariants({ variant }), className)} {...props} />;
34
31
  }
35
32
 
36
33
  export { Badge, badgeVariants };
@@ -9,14 +9,10 @@ const buttonVariants = cva(
9
9
  {
10
10
  variants: {
11
11
  variant: {
12
- default:
13
- "bg-primary text-primary-foreground shadow-md hover:bg-primary/90",
14
- destructive:
15
- "bg-destructive text-destructive-foreground hover:bg-destructive/90",
16
- outline:
17
- "border border-input hover:bg-accent hover:text-accent-foreground",
18
- secondary:
19
- "bg-secondary text-secondary-foreground hover:bg-secondary/80",
12
+ default: "bg-primary text-primary-foreground shadow-md hover:bg-primary/90",
13
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
14
+ outline: "border border-input hover:bg-accent hover:text-accent-foreground",
15
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
20
16
  ghost: "shadow-none hover:bg-accent hover:text-accent-foreground",
21
17
  link: "text-primary underline-offset-4 shadow-none hover:underline",
22
18
  },
@@ -31,7 +27,7 @@ const buttonVariants = cva(
31
27
  variant: "default",
32
28
  size: "default",
33
29
  },
34
- }
30
+ },
35
31
  );
36
32
 
37
33
  export interface ButtonProps
@@ -44,13 +40,9 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
44
40
  ({ className, variant, size, asChild = false, ...props }, ref) => {
45
41
  const Comp = asChild ? Slot : "button";
46
42
  return (
47
- <Comp
48
- className={cn(buttonVariants({ variant, size, className }))}
49
- ref={ref}
50
- {...props}
51
- />
43
+ <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />
52
44
  );
53
- }
45
+ },
54
46
  );
55
47
  Button.displayName = "Button";
56
48
 
@@ -60,10 +60,7 @@ const CodeBlock: FC<Props> = memo(({ language, value }) => {
60
60
  return;
61
61
  }
62
62
  const fileExtension = programmingLanguages[language] || ".file";
63
- const suggestedFileName = `file-${generateRandomString(
64
- 3,
65
- true
66
- )}${fileExtension}`;
63
+ const suggestedFileName = `file-${generateRandomString(3, true)}${fileExtension}`;
67
64
  const fileName = window.prompt("Enter file name" || "", suggestedFileName);
68
65
 
69
66
  if (!fileName) {
@@ -10,11 +10,7 @@ const Dialog = DialogPrimitive.Root;
10
10
 
11
11
  const DialogTrigger = DialogPrimitive.Trigger;
12
12
 
13
- const DialogPortal = ({
14
- className,
15
- children,
16
- ...props
17
- }: DialogPrimitive.DialogPortalProps) => (
13
+ const DialogPortal = ({ className, children, ...props }: DialogPrimitive.DialogPortalProps) => (
18
14
  <DialogPrimitive.Portal className={cn(className)} {...props}>
19
15
  <div className="fixed inset-0 z-50 flex items-start justify-center sm:items-center">
20
16
  {children}
@@ -31,7 +27,7 @@ const DialogOverlay = React.forwardRef<
31
27
  ref={ref}
32
28
  className={cn(
33
29
  "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm transition-all duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in",
34
- className
30
+ className,
35
31
  )}
36
32
  {...props}
37
33
  />
@@ -48,7 +44,7 @@ const DialogContent = React.forwardRef<
48
44
  ref={ref}
49
45
  className={cn(
50
46
  "fixed z-50 grid w-full gap-4 rounded-b-lg border bg-background p-6 shadow-sm animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-lg sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0",
51
- className
47
+ className,
52
48
  )}
53
49
  {...props}
54
50
  >
@@ -62,29 +58,14 @@ const DialogContent = React.forwardRef<
62
58
  ));
63
59
  DialogContent.displayName = DialogPrimitive.Content.displayName;
64
60
 
65
- const DialogHeader = ({
66
- className,
67
- ...props
68
- }: React.HTMLAttributes<HTMLDivElement>) => (
69
- <div
70
- className={cn(
71
- "flex flex-col space-y-1.5 text-center sm:text-left",
72
- className
73
- )}
74
- {...props}
75
- />
61
+ const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
62
+ <div className={cn("flex flex-col space-y-1.5 text-center sm:text-left", className)} {...props} />
76
63
  );
77
64
  DialogHeader.displayName = "DialogHeader";
78
65
 
79
- const DialogFooter = ({
80
- className,
81
- ...props
82
- }: React.HTMLAttributes<HTMLDivElement>) => (
66
+ const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
83
67
  <div
84
- className={cn(
85
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
86
- className
87
- )}
68
+ className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
88
69
  {...props}
89
70
  />
90
71
  );
@@ -96,10 +77,7 @@ const DialogTitle = React.forwardRef<
96
77
  >(({ className, ...props }, ref) => (
97
78
  <DialogPrimitive.Title
98
79
  ref={ref}
99
- className={cn(
100
- "text-lg font-semibold leading-none tracking-tight",
101
- className
102
- )}
80
+ className={cn("text-lg font-semibold leading-none tracking-tight", className)}
103
81
  {...props}
104
82
  />
105
83
  ));
@@ -25,13 +25,12 @@ const DropdownMenuSubContent = React.forwardRef<
25
25
  ref={ref}
26
26
  className={cn(
27
27
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
28
- className
28
+ className,
29
29
  )}
30
30
  {...props}
31
31
  />
32
32
  ));
33
- DropdownMenuSubContent.displayName =
34
- DropdownMenuPrimitive.SubContent.displayName;
33
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
35
34
 
36
35
  const DropdownMenuContent = React.forwardRef<
37
36
  React.ElementRef<typeof DropdownMenuPrimitive.Content>,
@@ -43,7 +42,7 @@ const DropdownMenuContent = React.forwardRef<
43
42
  sideOffset={sideOffset}
44
43
  className={cn(
45
44
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
46
- className
45
+ className,
47
46
  )}
48
47
  {...props}
49
48
  />
@@ -62,7 +61,7 @@ const DropdownMenuItem = React.forwardRef<
62
61
  className={cn(
63
62
  "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
64
63
  inset && "pl-8",
65
- className
64
+ className,
66
65
  )}
67
66
  {...props}
68
67
  />
@@ -77,11 +76,7 @@ const DropdownMenuLabel = React.forwardRef<
77
76
  >(({ className, inset, ...props }, ref) => (
78
77
  <DropdownMenuPrimitive.Label
79
78
  ref={ref}
80
- className={cn(
81
- "px-2 py-1.5 text-sm font-semibold",
82
- inset && "pl-8",
83
- className
84
- )}
79
+ className={cn("px-2 py-1.5 text-sm font-semibold", inset && "pl-8", className)}
85
80
  {...props}
86
81
  />
87
82
  ));
@@ -99,15 +94,9 @@ const DropdownMenuSeparator = React.forwardRef<
99
94
  ));
100
95
  DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
101
96
 
102
- const DropdownMenuShortcut = ({
103
- className,
104
- ...props
105
- }: React.HTMLAttributes<HTMLSpanElement>) => {
97
+ const DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
106
98
  return (
107
- <span
108
- className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
109
- {...props}
110
- />
99
+ <span className={cn("ml-auto text-xs tracking-widest opacity-60", className)} {...props} />
111
100
  );
112
101
  };
113
102
  DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
@@ -29,11 +29,7 @@ function IconNextChat({
29
29
  gradientUnits="userSpaceOnUse"
30
30
  >
31
31
  <stop stopColor={inverted ? "white" : "black"} />
32
- <stop
33
- offset={1}
34
- stopColor={inverted ? "white" : "black"}
35
- stopOpacity={0}
36
- />
32
+ <stop offset={1} stopColor={inverted ? "white" : "black"} stopOpacity={0} />
37
33
  </linearGradient>
38
34
  <linearGradient
39
35
  id={`gradient-${id}-2`}
@@ -44,11 +40,7 @@ function IconNextChat({
44
40
  gradientUnits="userSpaceOnUse"
45
41
  >
46
42
  <stop stopColor={inverted ? "white" : "black"} />
47
- <stop
48
- offset={1}
49
- stopColor={inverted ? "white" : "black"}
50
- stopOpacity={0}
51
- />
43
+ <stop offset={1} stopColor={inverted ? "white" : "black"} stopOpacity={0} />
52
44
  </linearGradient>
53
45
  </defs>
54
46
  <path
@@ -76,13 +68,7 @@ function IconNextChat({
76
68
  d="M14.2896 14.0018L7.146 4.8H5.80005V11.1973H6.87681V6.16743L13.4444 14.6529C13.7407 14.4545 14.0231 14.2369 14.2896 14.0018Z"
77
69
  fill={`url(#gradient-${id}-1)`}
78
70
  />
79
- <rect
80
- x="11.2222"
81
- y="4.8"
82
- width="1.06667"
83
- height="6.4"
84
- fill={`url(#gradient-${id}-2)`}
85
- />
71
+ <rect x="11.2222" y="4.8" width="1.06667" height="6.4" fill={`url(#gradient-${id}-2)`} />
86
72
  </g>
87
73
  </svg>
88
74
  );
@@ -113,10 +99,7 @@ function IconVercel({ className, ...props }: React.ComponentProps<"svg">) {
113
99
  className={cn("h-4 w-4", className)}
114
100
  {...props}
115
101
  >
116
- <path
117
- d="M37.5896 0.25L74.5396 64.25H0.639648L37.5896 0.25Z"
118
- fill="currentColor"
119
- ></path>
102
+ <path d="M37.5896 0.25L74.5396 64.25H0.639648L37.5896 0.25Z" fill="currentColor"></path>
120
103
  </svg>
121
104
  );
122
105
  }
@@ -442,10 +425,7 @@ function IconUsers({ className, ...props }: React.ComponentProps<"svg">) {
442
425
  );
443
426
  }
444
427
 
445
- function IconExternalLink({
446
- className,
447
- ...props
448
- }: React.ComponentProps<"svg">) {
428
+ function IconExternalLink({ className, ...props }: React.ComponentProps<"svg">) {
449
429
  return (
450
430
  <svg
451
431
  xmlns="http://www.w3.org/2000/svg"
@@ -459,10 +439,7 @@ function IconExternalLink({
459
439
  );
460
440
  }
461
441
 
462
- function IconChevronUpDown({
463
- className,
464
- ...props
465
- }: React.ComponentProps<"svg">) {
442
+ function IconChevronUpDown({ className, ...props }: React.ComponentProps<"svg">) {
466
443
  return (
467
444
  <svg
468
445
  xmlns="http://www.w3.org/2000/svg"
@@ -2,8 +2,7 @@ import * as React from "react";
2
2
 
3
3
  import { cn } from "../../../lib/utils";
4
4
 
5
- export interface InputProps
6
- extends React.InputHTMLAttributes<HTMLInputElement> {}
5
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}
7
6
 
8
7
  const Input = React.forwardRef<HTMLInputElement, InputProps>(
9
8
  ({ className, type, ...props }, ref) => {
@@ -12,13 +11,13 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
12
11
  type={type}
13
12
  className={cn(
14
13
  "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
15
- className
14
+ className,
16
15
  )}
17
16
  ref={ref}
18
17
  {...props}
19
18
  />
20
19
  );
21
- }
20
+ },
22
21
  );
23
22
  Input.displayName = "Input";
24
23
 
@@ -7,19 +7,14 @@ import { cva, type VariantProps } from "class-variance-authority";
7
7
  import { cn } from "../../../lib/utils";
8
8
 
9
9
  const labelVariants = cva(
10
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
10
+ "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
11
11
  );
12
12
 
13
13
  const Label = React.forwardRef<
14
14
  React.ElementRef<typeof LabelPrimitive.Root>,
15
- React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
16
- VariantProps<typeof labelVariants>
15
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>
17
16
  >(({ className, ...props }, ref) => (
18
- <LabelPrimitive.Root
19
- ref={ref}
20
- className={cn(labelVariants(), className)}
21
- {...props}
22
- />
17
+ <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />
23
18
  ));
24
19
  Label.displayName = LabelPrimitive.Root.displayName;
25
20
 
@@ -20,7 +20,7 @@ const SelectTrigger = React.forwardRef<
20
20
  ref={ref}
21
21
  className={cn(
22
22
  "flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
23
- className
23
+ className,
24
24
  )}
25
25
  {...props}
26
26
  >
@@ -42,7 +42,7 @@ const SelectContent = React.forwardRef<
42
42
  className={cn(
43
43
  "relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-80",
44
44
  position === "popper" && "translate-y-1",
45
- className
45
+ className,
46
46
  )}
47
47
  position={position}
48
48
  {...props}
@@ -51,7 +51,7 @@ const SelectContent = React.forwardRef<
51
51
  className={cn(
52
52
  "p-1",
53
53
  position === "popper" &&
54
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
54
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
55
55
  )}
56
56
  >
57
57
  {children}
@@ -81,7 +81,7 @@ const SelectItem = React.forwardRef<
81
81
  ref={ref}
82
82
  className={cn(
83
83
  "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
84
- className
84
+ className,
85
85
  )}
86
86
  {...props}
87
87
  >
@@ -8,24 +8,19 @@ import { cn } from "../../../lib/utils";
8
8
  const Separator = React.forwardRef<
9
9
  React.ElementRef<typeof SeparatorPrimitive.Root>,
10
10
  React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>
11
- >(
12
- (
13
- { className, orientation = "horizontal", decorative = true, ...props },
14
- ref
15
- ) => (
16
- <SeparatorPrimitive.Root
17
- ref={ref}
18
- decorative={decorative}
19
- orientation={orientation}
20
- className={cn(
21
- "shrink-0 bg-border",
22
- orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
23
- className
24
- )}
25
- {...props}
26
- />
27
- )
28
- );
11
+ >(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (
12
+ <SeparatorPrimitive.Root
13
+ ref={ref}
14
+ decorative={decorative}
15
+ orientation={orientation}
16
+ className={cn(
17
+ "shrink-0 bg-border",
18
+ orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
19
+ className,
20
+ )}
21
+ {...props}
22
+ />
23
+ ));
29
24
  Separator.displayName = SeparatorPrimitive.Root.displayName;
30
25
 
31
26
  export { Separator };
@@ -12,15 +12,8 @@ const SheetTrigger = SheetPrimitive.Trigger;
12
12
 
13
13
  const SheetClose = SheetPrimitive.Close;
14
14
 
15
- const SheetPortal = ({
16
- className,
17
- children,
18
- ...props
19
- }: SheetPrimitive.DialogPortalProps) => (
20
- <SheetPrimitive.Portal
21
- className={cn("fixed inset-0 z-50 flex", className)}
22
- {...props}
23
- >
15
+ const SheetPortal = ({ className, children, ...props }: SheetPrimitive.DialogPortalProps) => (
16
+ <SheetPrimitive.Portal className={cn("fixed inset-0 z-50 flex", className)} {...props}>
24
17
  {children}
25
18
  </SheetPrimitive.Portal>
26
19
  );
@@ -33,7 +26,7 @@ const SheetOverlay = React.forwardRef<
33
26
  <SheetPrimitive.Overlay
34
27
  className={cn(
35
28
  "fixed inset-0 z-50 transition-all duration-100 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in",
36
- className
29
+ className,
37
30
  )}
38
31
  {...props}
39
32
  ref={ref}
@@ -50,7 +43,7 @@ const SheetContent = React.forwardRef<
50
43
  ref={ref}
51
44
  className={cn(
52
45
  "fixed z-50 h-full border-r bg-background p-6 opacity-100 shadow-lg data-[state=closed]:animate-slide-to-left data-[state=open]:animate-slide-from-left",
53
- className
46
+ className,
54
47
  )}
55
48
  {...props}
56
49
  >
@@ -64,23 +57,14 @@ const SheetContent = React.forwardRef<
64
57
  ));
65
58
  SheetContent.displayName = SheetPrimitive.Content.displayName;
66
59
 
67
- const SheetHeader = ({
68
- className,
69
- ...props
70
- }: React.HTMLAttributes<HTMLDivElement>) => (
60
+ const SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
71
61
  <div className={cn("flex flex-col space-y-2", className)} {...props} />
72
62
  );
73
63
  SheetHeader.displayName = "SheetHeader";
74
64
 
75
- const SheetFooter = ({
76
- className,
77
- ...props
78
- }: React.HTMLAttributes<HTMLDivElement>) => (
65
+ const SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
79
66
  <div
80
- className={cn(
81
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
82
- className
83
- )}
67
+ className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
84
68
  {...props}
85
69
  />
86
70
  );
@@ -12,14 +12,14 @@ const Switch = React.forwardRef<
12
12
  <SwitchPrimitives.Root
13
13
  className={cn(
14
14
  "peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
15
- className
15
+ className,
16
16
  )}
17
17
  {...props}
18
18
  ref={ref}
19
19
  >
20
20
  <SwitchPrimitives.Thumb
21
21
  className={cn(
22
- "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
22
+ "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
23
23
  )}
24
24
  />
25
25
  </SwitchPrimitives.Root>
@@ -2,8 +2,7 @@ import * as React from "react";
2
2
 
3
3
  import { cn } from "../../../lib/utils";
4
4
 
5
- export interface TextareaProps
6
- extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
5
+ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
7
6
 
8
7
  const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
9
8
  ({ className, ...props }, ref) => {
@@ -11,13 +10,13 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
11
10
  <textarea
12
11
  className={cn(
13
12
  "flex min-h-[80px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
14
- className
13
+ className,
15
14
  )}
16
15
  ref={ref}
17
16
  {...props}
18
17
  />
19
18
  );
20
- }
19
+ },
21
20
  );
22
21
  Textarea.displayName = "Textarea";
23
22
 
@@ -20,7 +20,7 @@ const TooltipContent = React.forwardRef<
20
20
  sideOffset={sideOffset}
21
21
  className={cn(
22
22
  "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-xs font-medium text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
23
- className
23
+ className,
24
24
  )}
25
25
  {...props}
26
26
  />
@@ -8,9 +8,7 @@ export interface CopilotSidebarUIProviderProps {
8
8
  children: ReactNode;
9
9
  }
10
10
 
11
- export function CopilotSidebarUIProvider({
12
- children,
13
- }: CopilotSidebarUIProviderProps) {
11
+ export function CopilotSidebarUIProvider({ children }: CopilotSidebarUIProviderProps) {
14
12
  const [sidebarOpen, setSidebarOpen] = useState(true);
15
13
 
16
14
  const toggleSidebar = useCallback(() => {
@@ -18,9 +16,7 @@ export function CopilotSidebarUIProvider({
18
16
  }, []);
19
17
 
20
18
  return (
21
- <CopilotSidebarContext.Provider
22
- value={{ isSidebarOpen: sidebarOpen, toggleSidebar }}
23
- >
19
+ <CopilotSidebarContext.Provider value={{ isSidebarOpen: sidebarOpen, toggleSidebar }}>
24
20
  <>
25
21
  <div
26
22
  style={{
@@ -22,9 +22,7 @@ import { XMarkIcon } from "@heroicons/react/24/outline";
22
22
  function TopBar(props: SidebarProps): JSX.Element {
23
23
  return (
24
24
  <div className="py-6 flex bg-gray-50 items-center justify-between px-4">
25
- <h1 className="text-base font-semibold leading-6 text-gray-900">
26
- Copilot Chat
27
- </h1>
25
+ <h1 className="text-base font-semibold leading-6 text-gray-900">Copilot Chat</h1>
28
26
  <div className="ml-3 flex h-7 items-center">
29
27
  <button
30
28
  type="button"