@copilotkit/react-ui 0.15.0-alpha.0 → 0.15.0-alpha.2
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/.turbo/turbo-build.log +196 -209
- package/CHANGELOG.md +27 -1
- package/dist/chunk-3M4HWSE7.mjs +61 -0
- package/dist/chunk-3M4HWSE7.mjs.map +1 -0
- package/dist/chunk-47SYBLI2.mjs +110 -0
- package/dist/chunk-47SYBLI2.mjs.map +1 -0
- package/dist/chunk-5O2MCJZ2.mjs +21 -0
- package/dist/chunk-5O2MCJZ2.mjs.map +1 -0
- package/dist/chunk-7YXG7D47.mjs +191 -0
- package/dist/chunk-7YXG7D47.mjs.map +1 -0
- package/dist/chunk-CKJXXQ2W.mjs +26 -0
- package/dist/chunk-CKJXXQ2W.mjs.map +1 -0
- package/dist/{chunk-6LAZQHEB.mjs → chunk-DPRH4HX3.mjs} +18 -43
- package/dist/chunk-DPRH4HX3.mjs.map +1 -0
- package/dist/chunk-GWGHQNRI.mjs +54 -0
- package/dist/chunk-GWGHQNRI.mjs.map +1 -0
- package/dist/chunk-JD7BAH7U.mjs +3 -0
- package/dist/chunk-KBGIPFXA.mjs +14 -0
- package/dist/chunk-KBGIPFXA.mjs.map +1 -0
- package/dist/chunk-NNVWLSYK.mjs +72 -0
- package/dist/chunk-NNVWLSYK.mjs.map +1 -0
- package/dist/chunk-NYLOXKYT.mjs +51 -0
- package/dist/chunk-NYLOXKYT.mjs.map +1 -0
- package/dist/chunk-OF66AL5Z.mjs +56 -0
- package/dist/chunk-OF66AL5Z.mjs.map +1 -0
- package/dist/chunk-P4GBO6MW.mjs +3 -0
- package/dist/chunk-UWPFPWAW.mjs +14 -0
- package/dist/chunk-UWPFPWAW.mjs.map +1 -0
- package/dist/chunk-WB3YULQ4.mjs +3 -0
- package/dist/chunk-WM6BS77F.mjs +53 -0
- package/dist/chunk-WM6BS77F.mjs.map +1 -0
- package/dist/chunk-Z34F3WLK.mjs +14 -0
- package/dist/chunk-Z34F3WLK.mjs.map +1 -0
- package/dist/components/chat/Button.d.ts +6 -0
- package/dist/components/chat/Button.js +38 -0
- package/dist/components/chat/Button.js.map +1 -0
- package/dist/components/chat/Button.mjs +6 -0
- package/dist/components/chat/Chat.d.ts +96 -0
- package/dist/components/chat/Chat.js +800 -0
- package/dist/components/chat/Chat.js.map +1 -0
- package/dist/components/chat/Chat.mjs +16 -0
- package/dist/components/chat/ChatContext.d.ts +105 -0
- package/dist/components/chat/ChatContext.js +220 -0
- package/dist/components/chat/ChatContext.js.map +1 -0
- package/dist/components/chat/ChatContext.mjs +5 -0
- package/dist/components/chat/CodeBlock.js +221 -0
- package/dist/components/chat/CodeBlock.js.map +1 -0
- package/dist/components/chat/CodeBlock.mjs +6 -0
- package/dist/components/chat/Header.d.ts +6 -0
- package/dist/components/chat/Header.js +31 -0
- package/dist/components/chat/Header.js.map +1 -0
- package/dist/components/chat/Header.mjs +6 -0
- package/dist/components/chat/Icons.d.ts +15 -0
- package/dist/components/chat/Icons.js +233 -0
- package/dist/components/chat/Icons.js.map +1 -0
- package/dist/components/chat/Icons.mjs +4 -0
- package/dist/components/chat/Input.d.ts +6 -0
- package/dist/components/chat/Input.js +111 -0
- package/dist/components/chat/Input.js.map +1 -0
- package/dist/components/chat/Input.mjs +7 -0
- package/dist/components/chat/Markdown.d.ts +6 -0
- package/dist/components/chat/Markdown.js +269 -0
- package/dist/components/chat/Markdown.js.map +1 -0
- package/dist/components/chat/Markdown.mjs +7 -0
- package/dist/components/chat/Messages.d.ts +6 -0
- package/dist/components/chat/Messages.js +331 -0
- package/dist/components/chat/Messages.js.map +1 -0
- package/dist/components/chat/Messages.mjs +9 -0
- package/dist/components/chat/Popup.d.ts +10 -0
- package/dist/components/chat/Popup.js +806 -0
- package/dist/components/chat/Popup.js.map +1 -0
- package/dist/components/chat/Popup.mjs +17 -0
- package/dist/components/chat/Response.d.ts +6 -0
- package/dist/components/chat/Response.js +31 -0
- package/dist/components/chat/Response.js.map +1 -0
- package/dist/components/chat/Response.mjs +6 -0
- package/dist/components/chat/Sidebar.d.ts +13 -0
- package/dist/components/chat/Sidebar.js +817 -0
- package/dist/components/chat/Sidebar.js.map +1 -0
- package/dist/components/chat/Sidebar.mjs +17 -0
- package/dist/components/chat/Textarea.d.ts +13 -0
- package/dist/components/chat/Textarea.js +55 -0
- package/dist/components/chat/Textarea.js.map +1 -0
- package/dist/components/chat/Textarea.mjs +4 -0
- package/dist/components/chat/Window.d.ts +6 -0
- package/dist/components/chat/Window.js +116 -0
- package/dist/components/chat/Window.js.map +1 -0
- package/dist/components/chat/Window.mjs +4 -0
- package/dist/components/chat/index.d.ts +8 -0
- package/dist/components/chat/index.js +824 -0
- package/dist/components/chat/index.js.map +1 -0
- package/dist/components/chat/index.mjs +20 -0
- package/dist/components/chat/props.d.ts +33 -0
- package/dist/components/chat/props.js +4 -0
- package/dist/components/chat/props.mjs +3 -0
- package/dist/components/index.d.ts +6 -7
- package/dist/components/index.js +824 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +17 -22
- package/dist/context/index.js +4 -0
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/use-copy-to-clipboard.js +47 -0
- package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
- package/dist/index.css +565 -917
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +6 -7
- package/dist/index.js +824 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +18 -23
- package/dist/lib/utils.js +64 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/utils.mjs +38 -2
- package/dist/lib/utils.mjs.map +1 -1
- package/dist/lib/utils.test.js +10 -0
- package/dist/lib/utils.test.js.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/types.d.ts +1 -1
- package/dist/types/types.js +4 -0
- package/dist/types/types.js.map +1 -0
- package/package.json +8 -7
- package/src/components/chat/Button.tsx +23 -0
- package/src/components/chat/Chat.tsx +186 -0
- package/src/components/chat/ChatContext.tsx +176 -0
- package/src/components/{chat-components/ui/codeblock.tsx → chat/CodeBlock.tsx} +21 -33
- package/src/components/chat/Header.tsx +15 -0
- package/src/components/chat/Icons.tsx +179 -0
- package/src/components/chat/Input.tsx +51 -0
- package/src/components/chat/Markdown.tsx +68 -0
- package/src/components/chat/Messages.tsx +113 -0
- package/src/components/chat/Popup.tsx +9 -0
- package/src/components/chat/Response.tsx +12 -0
- package/src/components/chat/Sidebar.tsx +28 -0
- package/src/components/chat/Textarea.tsx +61 -0
- package/src/components/chat/Window.tsx +141 -0
- package/src/components/chat/index.tsx +3 -0
- package/src/components/chat/props.ts +36 -0
- package/src/components/index.ts +1 -7
- package/src/css/animations.css +35 -0
- package/src/css/button.css +54 -0
- package/src/css/colors.css +61 -0
- package/src/css/header.css +43 -0
- package/src/css/input.css +79 -0
- package/src/css/markdown.css +123 -0
- package/src/css/messages.css +57 -0
- package/src/css/popup.css +22 -0
- package/src/css/response.css +29 -0
- package/src/css/sidebar.css +34 -0
- package/src/css/window.css +58 -0
- package/src/styles.css +12 -0
- package/src/types/types.ts +1 -1
- package/tsup.config.ts +1 -2
- package/dist/chunk-2KAF7NKC.mjs +0 -484
- package/dist/chunk-2KAF7NKC.mjs.map +0 -1
- package/dist/chunk-5KEDV5VC.mjs +0 -27
- package/dist/chunk-5KEDV5VC.mjs.map +0 -1
- package/dist/chunk-6LAZQHEB.mjs.map +0 -1
- package/dist/chunk-CF3BK4OX.mjs +0 -53
- package/dist/chunk-CF3BK4OX.mjs.map +0 -1
- package/dist/chunk-CNQX2VY3.mjs +0 -66
- package/dist/chunk-CNQX2VY3.mjs.map +0 -1
- package/dist/chunk-GCOPYGHH.mjs +0 -27
- package/dist/chunk-GCOPYGHH.mjs.map +0 -1
- package/dist/chunk-IJLMKBSZ.mjs +0 -25
- package/dist/chunk-IJLMKBSZ.mjs.map +0 -1
- package/dist/chunk-INCNMGJ7.mjs +0 -72
- package/dist/chunk-INCNMGJ7.mjs.map +0 -1
- package/dist/chunk-M3CZWJI3.mjs +0 -44
- package/dist/chunk-M3CZWJI3.mjs.map +0 -1
- package/dist/chunk-MC6KTH4X.mjs +0 -12
- package/dist/chunk-MC6KTH4X.mjs.map +0 -1
- package/dist/chunk-NMT7XT2R.mjs +0 -39
- package/dist/chunk-NMT7XT2R.mjs.map +0 -1
- package/dist/chunk-OHWEJUCS.mjs +0 -18
- package/dist/chunk-OHWEJUCS.mjs.map +0 -1
- package/dist/chunk-OOBQC5H6.mjs +0 -34
- package/dist/chunk-OOBQC5H6.mjs.map +0 -1
- package/dist/chunk-Q6YO7LDK.mjs +0 -40
- package/dist/chunk-Q6YO7LDK.mjs.map +0 -1
- package/dist/chunk-RPTRCFSO.mjs +0 -42
- package/dist/chunk-RPTRCFSO.mjs.map +0 -1
- package/dist/chunk-SEH5PQVW.mjs +0 -52
- package/dist/chunk-SEH5PQVW.mjs.map +0 -1
- package/dist/chunk-SHOTWRKC.mjs +0 -18
- package/dist/chunk-SHOTWRKC.mjs.map +0 -1
- package/dist/chunk-SRBUGQTM.mjs +0 -109
- package/dist/chunk-SRBUGQTM.mjs.map +0 -1
- package/dist/chunk-TEYIQHMK.mjs +0 -12
- package/dist/chunk-TEYIQHMK.mjs.map +0 -1
- package/dist/chunk-U6NJWGTV.mjs +0 -3
- package/dist/chunk-VGX2W5ZB.mjs +0 -28
- package/dist/chunk-VGX2W5ZB.mjs.map +0 -1
- package/dist/chunk-WLTEQ2FW.mjs +0 -80
- package/dist/chunk-WLTEQ2FW.mjs.map +0 -1
- package/dist/chunk-ZYC5YVDO.mjs +0 -21
- package/dist/chunk-ZYC5YVDO.mjs.map +0 -1
- package/dist/components/chat-components/chat-list.d.ts +0 -8
- package/dist/components/chat-components/chat-list.mjs +0 -13
- package/dist/components/chat-components/chat-message-actions.d.ts +0 -8
- package/dist/components/chat-components/chat-message-actions.mjs +0 -8
- package/dist/components/chat-components/chat-message.d.ts +0 -8
- package/dist/components/chat-components/chat-message.mjs +0 -11
- package/dist/components/chat-components/chat-panel.d.ts +0 -8
- package/dist/components/chat-components/chat-panel.mjs +0 -10
- package/dist/components/chat-components/chat-scroll-anchor.d.ts +0 -6
- package/dist/components/chat-components/chat-scroll-anchor.mjs +0 -5
- package/dist/components/chat-components/clear-history.d.ts +0 -9
- package/dist/components/chat-components/clear-history.mjs +0 -56
- package/dist/components/chat-components/clear-history.mjs.map +0 -1
- package/dist/components/chat-components/copilot-chat.d.ts +0 -12
- package/dist/components/chat-components/copilot-chat.mjs +0 -22
- package/dist/components/chat-components/default-empty-screen.d.ts +0 -8
- package/dist/components/chat-components/default-empty-screen.mjs +0 -8
- package/dist/components/chat-components/external-link.d.ts +0 -6
- package/dist/components/chat-components/external-link.mjs +0 -4
- package/dist/components/chat-components/markdown.d.ts +0 -6
- package/dist/components/chat-components/markdown.mjs +0 -4
- package/dist/components/chat-components/prompt-form.d.ts +0 -9
- package/dist/components/chat-components/prompt-form.mjs +0 -9
- package/dist/components/chat-components/theme-toggle.d.ts +0 -3
- package/dist/components/chat-components/theme-toggle.mjs +0 -32
- package/dist/components/chat-components/theme-toggle.mjs.map +0 -1
- package/dist/components/chat-components/toaster.d.ts +0 -1
- package/dist/components/chat-components/toaster.mjs +0 -4
- package/dist/components/chat-components/toaster.mjs.map +0 -1
- package/dist/components/chat-components/ui/alert-dialog.d.ts +0 -20
- package/dist/components/chat-components/ui/alert-dialog.mjs +0 -6
- package/dist/components/chat-components/ui/badge.d.ts +0 -12
- package/dist/components/chat-components/ui/badge.mjs +0 -29
- package/dist/components/chat-components/ui/badge.mjs.map +0 -1
- package/dist/components/chat-components/ui/button.d.ts +0 -14
- package/dist/components/chat-components/ui/button.mjs +0 -5
- package/dist/components/chat-components/ui/codeblock.mjs +0 -8
- package/dist/components/chat-components/ui/dialog.d.ts +0 -18
- package/dist/components/chat-components/ui/dialog.mjs +0 -94
- package/dist/components/chat-components/ui/dialog.mjs.map +0 -1
- package/dist/components/chat-components/ui/dropdown-menu.d.ts +0 -24
- package/dist/components/chat-components/ui/dropdown-menu.mjs +0 -87
- package/dist/components/chat-components/ui/dropdown-menu.mjs.map +0 -1
- package/dist/components/chat-components/ui/icons.d.ts +0 -33
- package/dist/components/chat-components/ui/icons.mjs +0 -5
- package/dist/components/chat-components/ui/input.d.ts +0 -7
- package/dist/components/chat-components/ui/input.mjs +0 -26
- package/dist/components/chat-components/ui/input.mjs.map +0 -1
- package/dist/components/chat-components/ui/label.d.ts +0 -8
- package/dist/components/chat-components/ui/label.mjs +0 -19
- package/dist/components/chat-components/ui/label.mjs.map +0 -1
- package/dist/components/chat-components/ui/select.d.ts +0 -13
- package/dist/components/chat-components/ui/select.mjs +0 -101
- package/dist/components/chat-components/ui/select.mjs.map +0 -1
- package/dist/components/chat-components/ui/separator.d.ts +0 -6
- package/dist/components/chat-components/ui/separator.mjs +0 -5
- package/dist/components/chat-components/ui/sheet.d.ts +0 -19
- package/dist/components/chat-components/ui/sheet.mjs +0 -93
- package/dist/components/chat-components/ui/sheet.mjs.map +0 -1
- package/dist/components/chat-components/ui/switch.d.ts +0 -6
- package/dist/components/chat-components/ui/switch.mjs +0 -33
- package/dist/components/chat-components/ui/switch.mjs.map +0 -1
- package/dist/components/chat-components/ui/textarea.d.ts +0 -7
- package/dist/components/chat-components/ui/textarea.mjs +0 -25
- package/dist/components/chat-components/ui/textarea.mjs.map +0 -1
- package/dist/components/chat-components/ui/tooltip.d.ts +0 -9
- package/dist/components/chat-components/ui/tooltip.mjs +0 -5
- package/dist/components/sidebar/copilot-sidebar-ui-provider.d.ts +0 -9
- package/dist/components/sidebar/copilot-sidebar-ui-provider.mjs +0 -25
- package/dist/components/sidebar/copilot-sidebar.d.ts +0 -7
- package/dist/components/sidebar/copilot-sidebar.mjs +0 -23
- package/dist/components/sidebar/sidebar-context.d.ts +0 -9
- package/dist/components/sidebar/sidebar-context.mjs +0 -4
- package/dist/hooks/use-at-bottom.d.ts +0 -3
- package/dist/hooks/use-at-bottom.mjs +0 -4
- package/dist/hooks/use-enter-submit.d.ts +0 -8
- package/dist/hooks/use-enter-submit.mjs +0 -4
- package/src/components/chat-components/chat-list.tsx +0 -28
- package/src/components/chat-components/chat-message-actions.tsx +0 -36
- package/src/components/chat-components/chat-message.tsx +0 -70
- package/src/components/chat-components/chat-panel.tsx +0 -64
- package/src/components/chat-components/chat-scroll-anchor.tsx +0 -29
- package/src/components/chat-components/clear-history.tsx +0 -72
- package/src/components/chat-components/copilot-chat.tsx +0 -57
- package/src/components/chat-components/default-empty-screen.tsx +0 -57
- package/src/components/chat-components/external-link.tsx +0 -17
- package/src/components/chat-components/markdown.tsx +0 -8
- package/src/components/chat-components/prompt-form.tsx +0 -85
- package/src/components/chat-components/theme-toggle.tsx +0 -31
- package/src/components/chat-components/toaster.tsx +0 -3
- package/src/components/chat-components/ui/alert-dialog.tsx +0 -126
- package/src/components/chat-components/ui/badge.tsx +0 -33
- package/src/components/chat-components/ui/button.tsx +0 -49
- package/src/components/chat-components/ui/dialog.tsx +0 -106
- package/src/components/chat-components/ui/dropdown-menu.tsx +0 -117
- package/src/components/chat-components/ui/icons.tsx +0 -484
- package/src/components/chat-components/ui/input.tsx +0 -24
- package/src/components/chat-components/ui/label.tsx +0 -21
- package/src/components/chat-components/ui/select.tsx +0 -119
- package/src/components/chat-components/ui/separator.tsx +0 -26
- package/src/components/chat-components/ui/sheet.tsx +0 -106
- package/src/components/chat-components/ui/switch.tsx +0 -29
- package/src/components/chat-components/ui/textarea.tsx +0 -23
- package/src/components/chat-components/ui/tooltip.tsx +0 -30
- package/src/components/sidebar/copilot-sidebar-ui-provider.tsx +0 -77
- package/src/components/sidebar/copilot-sidebar.tsx +0 -39
- package/src/components/sidebar/sidebar-context.tsx +0 -11
- package/src/hooks/use-at-bottom.tsx +0 -20
- package/src/hooks/use-enter-submit.tsx +0 -17
- /package/dist/{chunk-U6NJWGTV.mjs.map → chunk-JD7BAH7U.mjs.map} +0 -0
- /package/dist/{components/chat-components/chat-list.mjs.map → chunk-P4GBO6MW.mjs.map} +0 -0
- /package/dist/{components/chat-components/chat-message-actions.mjs.map → chunk-WB3YULQ4.mjs.map} +0 -0
- /package/dist/components/{chat-components/chat-message.mjs.map → chat/Button.mjs.map} +0 -0
- /package/dist/components/{chat-components/chat-panel.mjs.map → chat/Chat.mjs.map} +0 -0
- /package/dist/components/{chat-components/chat-scroll-anchor.mjs.map → chat/ChatContext.mjs.map} +0 -0
- /package/dist/components/{chat-components/ui/codeblock.d.ts → chat/CodeBlock.d.ts} +0 -0
- /package/dist/components/{chat-components/copilot-chat.mjs.map → chat/CodeBlock.mjs.map} +0 -0
- /package/dist/components/{chat-components/default-empty-screen.mjs.map → chat/Header.mjs.map} +0 -0
- /package/dist/components/{chat-components/external-link.mjs.map → chat/Icons.mjs.map} +0 -0
- /package/dist/components/{chat-components/markdown.mjs.map → chat/Input.mjs.map} +0 -0
- /package/dist/components/{chat-components/prompt-form.mjs.map → chat/Markdown.mjs.map} +0 -0
- /package/dist/components/{chat-components/ui/alert-dialog.mjs.map → chat/Messages.mjs.map} +0 -0
- /package/dist/components/{chat-components/ui/button.mjs.map → chat/Popup.mjs.map} +0 -0
- /package/dist/components/{chat-components/ui/codeblock.mjs.map → chat/Response.mjs.map} +0 -0
- /package/dist/components/{chat-components/ui/icons.mjs.map → chat/Sidebar.mjs.map} +0 -0
- /package/dist/components/{chat-components/ui/separator.mjs.map → chat/Textarea.mjs.map} +0 -0
- /package/dist/components/{chat-components/ui/tooltip.mjs.map → chat/Window.mjs.map} +0 -0
- /package/dist/components/{sidebar/copilot-sidebar-ui-provider.mjs.map → chat/index.mjs.map} +0 -0
- /package/dist/components/{sidebar/copilot-sidebar.mjs.map → chat/props.js.map} +0 -0
- /package/dist/components/{sidebar/sidebar-context.mjs.map → chat/props.mjs.map} +0 -0
- /package/dist/{hooks/use-at-bottom.mjs.map → context/index.js.map} +0 -0
- /package/dist/hooks/{use-enter-submit.mjs.map → index.js.map} +0 -0
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../../lib/utils";
|
|
7
|
-
import { IconClose } from "./icons";
|
|
8
|
-
|
|
9
|
-
const Sheet = SheetPrimitive.Root;
|
|
10
|
-
|
|
11
|
-
const SheetTrigger = SheetPrimitive.Trigger;
|
|
12
|
-
|
|
13
|
-
const SheetClose = SheetPrimitive.Close;
|
|
14
|
-
|
|
15
|
-
const SheetPortal = ({ className, children, ...props }: SheetPrimitive.DialogPortalProps) => (
|
|
16
|
-
<SheetPrimitive.Portal className={cn("fixed inset-0 z-50 flex", className)} {...props}>
|
|
17
|
-
{children}
|
|
18
|
-
</SheetPrimitive.Portal>
|
|
19
|
-
);
|
|
20
|
-
SheetPortal.displayName = SheetPrimitive.Portal.displayName;
|
|
21
|
-
|
|
22
|
-
const SheetOverlay = React.forwardRef<
|
|
23
|
-
React.ElementRef<typeof SheetPrimitive.Overlay>,
|
|
24
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>
|
|
25
|
-
>(({ className, children, ...props }, ref) => (
|
|
26
|
-
<SheetPrimitive.Overlay
|
|
27
|
-
className={cn(
|
|
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",
|
|
29
|
-
className,
|
|
30
|
-
)}
|
|
31
|
-
{...props}
|
|
32
|
-
ref={ref}
|
|
33
|
-
/>
|
|
34
|
-
));
|
|
35
|
-
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
36
|
-
|
|
37
|
-
const SheetContent = React.forwardRef<
|
|
38
|
-
React.ElementRef<typeof SheetPrimitive.Content>,
|
|
39
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>
|
|
40
|
-
>(({ className, children, ...props }, ref) => (
|
|
41
|
-
<SheetPortal>
|
|
42
|
-
<SheetPrimitive.Content
|
|
43
|
-
ref={ref}
|
|
44
|
-
className={cn(
|
|
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",
|
|
46
|
-
className,
|
|
47
|
-
)}
|
|
48
|
-
{...props}
|
|
49
|
-
>
|
|
50
|
-
{children}
|
|
51
|
-
<SheetPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
|
|
52
|
-
<IconClose />
|
|
53
|
-
<span className="sr-only">Close</span>
|
|
54
|
-
</SheetPrimitive.Close>
|
|
55
|
-
</SheetPrimitive.Content>
|
|
56
|
-
</SheetPortal>
|
|
57
|
-
));
|
|
58
|
-
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
59
|
-
|
|
60
|
-
const SheetHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
61
|
-
<div className={cn("flex flex-col space-y-2", className)} {...props} />
|
|
62
|
-
);
|
|
63
|
-
SheetHeader.displayName = "SheetHeader";
|
|
64
|
-
|
|
65
|
-
const SheetFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (
|
|
66
|
-
<div
|
|
67
|
-
className={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
|
|
68
|
-
{...props}
|
|
69
|
-
/>
|
|
70
|
-
);
|
|
71
|
-
SheetFooter.displayName = "SheetFooter";
|
|
72
|
-
|
|
73
|
-
const SheetTitle = React.forwardRef<
|
|
74
|
-
React.ElementRef<typeof SheetPrimitive.Title>,
|
|
75
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>
|
|
76
|
-
>(({ className, ...props }, ref) => (
|
|
77
|
-
<SheetPrimitive.Title
|
|
78
|
-
ref={ref}
|
|
79
|
-
className={cn("text-lg font-semibold text-foreground", className)}
|
|
80
|
-
{...props}
|
|
81
|
-
/>
|
|
82
|
-
));
|
|
83
|
-
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
84
|
-
|
|
85
|
-
const SheetDescription = React.forwardRef<
|
|
86
|
-
React.ElementRef<typeof SheetPrimitive.Description>,
|
|
87
|
-
React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>
|
|
88
|
-
>(({ className, ...props }, ref) => (
|
|
89
|
-
<SheetPrimitive.Description
|
|
90
|
-
ref={ref}
|
|
91
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
92
|
-
{...props}
|
|
93
|
-
/>
|
|
94
|
-
));
|
|
95
|
-
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
96
|
-
|
|
97
|
-
export {
|
|
98
|
-
Sheet,
|
|
99
|
-
SheetTrigger,
|
|
100
|
-
SheetClose,
|
|
101
|
-
SheetContent,
|
|
102
|
-
SheetHeader,
|
|
103
|
-
SheetFooter,
|
|
104
|
-
SheetTitle,
|
|
105
|
-
SheetDescription,
|
|
106
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const Switch = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof SwitchPrimitives.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
|
|
11
|
-
>(({ className, ...props }, ref) => (
|
|
12
|
-
<SwitchPrimitives.Root
|
|
13
|
-
className={cn(
|
|
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,
|
|
16
|
-
)}
|
|
17
|
-
{...props}
|
|
18
|
-
ref={ref}
|
|
19
|
-
>
|
|
20
|
-
<SwitchPrimitives.Thumb
|
|
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",
|
|
23
|
-
)}
|
|
24
|
-
/>
|
|
25
|
-
</SwitchPrimitives.Root>
|
|
26
|
-
));
|
|
27
|
-
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
28
|
-
|
|
29
|
-
export { Switch };
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../../lib/utils";
|
|
4
|
-
|
|
5
|
-
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
|
|
6
|
-
|
|
7
|
-
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
8
|
-
({ className, ...props }, ref) => {
|
|
9
|
-
return (
|
|
10
|
-
<textarea
|
|
11
|
-
className={cn(
|
|
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",
|
|
13
|
-
className,
|
|
14
|
-
)}
|
|
15
|
-
ref={ref}
|
|
16
|
-
{...props}
|
|
17
|
-
/>
|
|
18
|
-
);
|
|
19
|
-
},
|
|
20
|
-
);
|
|
21
|
-
Textarea.displayName = "Textarea";
|
|
22
|
-
|
|
23
|
-
export { Textarea };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const TooltipProvider = TooltipPrimitive.Provider;
|
|
9
|
-
|
|
10
|
-
const Tooltip = TooltipPrimitive.Root;
|
|
11
|
-
|
|
12
|
-
const TooltipTrigger = TooltipPrimitive.Trigger;
|
|
13
|
-
|
|
14
|
-
const TooltipContent = React.forwardRef<
|
|
15
|
-
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
16
|
-
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
17
|
-
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
18
|
-
<TooltipPrimitive.Content
|
|
19
|
-
ref={ref}
|
|
20
|
-
sideOffset={sideOffset}
|
|
21
|
-
className={cn(
|
|
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,
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
));
|
|
28
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
29
|
-
|
|
30
|
-
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode, useCallback } from "react";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { CopilotSidebar } from "./copilot-sidebar";
|
|
4
|
-
import { CopilotSidebarContext } from "./sidebar-context";
|
|
5
|
-
import { TooltipProvider } from "../chat-components/ui/tooltip";
|
|
6
|
-
|
|
7
|
-
export interface CopilotSidebarUIProviderProps {
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
makeSystemMessage?: (contextString: string) => string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function CopilotSidebarUIProvider({ children, ...props }: CopilotSidebarUIProviderProps) {
|
|
13
|
-
const [sidebarOpen, setSidebarOpen] = useState(true);
|
|
14
|
-
|
|
15
|
-
const toggleSidebar = useCallback(() => {
|
|
16
|
-
setSidebarOpen((prev) => !prev);
|
|
17
|
-
}, []);
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<CopilotSidebarContext.Provider value={{ isSidebarOpen: sidebarOpen, toggleSidebar }}>
|
|
21
|
-
<>
|
|
22
|
-
<div
|
|
23
|
-
style={{
|
|
24
|
-
height: "100vh",
|
|
25
|
-
width: "100vw",
|
|
26
|
-
position: "relative",
|
|
27
|
-
}}
|
|
28
|
-
>
|
|
29
|
-
<div
|
|
30
|
-
style={{
|
|
31
|
-
overflowY: "auto",
|
|
32
|
-
overflowX: "hidden",
|
|
33
|
-
height: "100%",
|
|
34
|
-
width: sidebarOpen ? "calc(100% - 450px)" : "100%",
|
|
35
|
-
position: "absolute",
|
|
36
|
-
transition: "width 0.5s ease-in-out", // New
|
|
37
|
-
}}
|
|
38
|
-
>
|
|
39
|
-
<main>{children}</main>
|
|
40
|
-
</div>
|
|
41
|
-
<div
|
|
42
|
-
style={{
|
|
43
|
-
overflowY: "auto",
|
|
44
|
-
height: "100%",
|
|
45
|
-
width: "450px",
|
|
46
|
-
position: "absolute",
|
|
47
|
-
right: sidebarOpen ? "0" : "-450px",
|
|
48
|
-
transition: "right 0.5s ease-in-out",
|
|
49
|
-
}}
|
|
50
|
-
>
|
|
51
|
-
<TooltipProvider>
|
|
52
|
-
<CopilotSidebar
|
|
53
|
-
setSidebarOpen={setSidebarOpen}
|
|
54
|
-
makeSystemMessage={props.makeSystemMessage}
|
|
55
|
-
/>
|
|
56
|
-
</TooltipProvider>
|
|
57
|
-
</div>
|
|
58
|
-
{!sidebarOpen && (
|
|
59
|
-
<button
|
|
60
|
-
onClick={toggleSidebar}
|
|
61
|
-
style={{
|
|
62
|
-
position: "absolute",
|
|
63
|
-
top: "5%",
|
|
64
|
-
right: "20px",
|
|
65
|
-
transform: "translateY(-50%)",
|
|
66
|
-
transition: "opacity 0.5s ease-in-out",
|
|
67
|
-
}}
|
|
68
|
-
className="bg-slate-100 ring-2 ring-slate-600 font-semibold text-black p-2 rounded-lg shadow-lg"
|
|
69
|
-
>
|
|
70
|
-
Open Copilot
|
|
71
|
-
</button>
|
|
72
|
-
)}
|
|
73
|
-
</div>
|
|
74
|
-
</>
|
|
75
|
-
</CopilotSidebarContext.Provider>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CopilotChat } from "../chat-components/copilot-chat";
|
|
3
|
-
|
|
4
|
-
export interface SidebarProps {
|
|
5
|
-
setSidebarOpen: (open: boolean) => void;
|
|
6
|
-
makeSystemMessage?: (contextString: string) => string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function CopilotSidebar(props: SidebarProps): JSX.Element {
|
|
10
|
-
return (
|
|
11
|
-
<div
|
|
12
|
-
className="shadow-lg bg-gray-50 flex flex-col border-l-2"
|
|
13
|
-
style={{ width: "100%", height: "100%" }}
|
|
14
|
-
>
|
|
15
|
-
<TopBar {...props} />
|
|
16
|
-
<CopilotChat makeSystemMessage={props.makeSystemMessage} />
|
|
17
|
-
</div>
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
import { XMarkIcon } from "@heroicons/react/24/outline";
|
|
22
|
-
|
|
23
|
-
function TopBar(props: SidebarProps): JSX.Element {
|
|
24
|
-
return (
|
|
25
|
-
<div className="py-6 flex bg-gray-50 items-center justify-between px-4">
|
|
26
|
-
<h1 className="text-base font-semibold leading-6 text-gray-900">Copilot Chat</h1>
|
|
27
|
-
<div className="ml-3 flex h-7 items-center">
|
|
28
|
-
<button
|
|
29
|
-
type="button"
|
|
30
|
-
className="rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
|
|
31
|
-
onClick={() => props.setSidebarOpen(false)}
|
|
32
|
-
>
|
|
33
|
-
<span className="sr-only">Close panel</span>
|
|
34
|
-
<XMarkIcon className="h-6 w-6" aria-hidden="true" />
|
|
35
|
-
</button>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { createContext, ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
export interface CopilotSidebarContextType {
|
|
4
|
-
isSidebarOpen: boolean;
|
|
5
|
-
toggleSidebar: () => void;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const CopilotSidebarContext = createContext<CopilotSidebarContextType>({
|
|
9
|
-
isSidebarOpen: false,
|
|
10
|
-
toggleSidebar: () => {},
|
|
11
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export function useAtBottom(offset = 0) {
|
|
4
|
-
const [isAtBottom, setIsAtBottom] = React.useState(false);
|
|
5
|
-
|
|
6
|
-
React.useEffect(() => {
|
|
7
|
-
const handleScroll = () => {
|
|
8
|
-
setIsAtBottom(window.innerHeight + window.scrollY >= document.body.offsetHeight - offset);
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
12
|
-
handleScroll();
|
|
13
|
-
|
|
14
|
-
return () => {
|
|
15
|
-
window.removeEventListener("scroll", handleScroll);
|
|
16
|
-
};
|
|
17
|
-
}, [offset]);
|
|
18
|
-
|
|
19
|
-
return isAtBottom;
|
|
20
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { useRef, type RefObject } from "react";
|
|
2
|
-
|
|
3
|
-
export function useEnterSubmit(): {
|
|
4
|
-
formRef: RefObject<HTMLFormElement>;
|
|
5
|
-
onKeyDown: (event: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
6
|
-
} {
|
|
7
|
-
const formRef = useRef<HTMLFormElement>(null);
|
|
8
|
-
|
|
9
|
-
const handleKeyDown = (event: React.KeyboardEvent<HTMLTextAreaElement>): void => {
|
|
10
|
-
if (event.key === "Enter" && !event.shiftKey && !event.nativeEvent.isComposing) {
|
|
11
|
-
formRef.current?.requestSubmit();
|
|
12
|
-
event.preventDefault();
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
return { formRef, onKeyDown: handleKeyDown };
|
|
17
|
-
}
|
|
File without changes
|
|
File without changes
|
/package/dist/{components/chat-components/chat-message-actions.mjs.map → chunk-WB3YULQ4.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/components/{chat-components/chat-scroll-anchor.mjs.map → chat/ChatContext.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/components/{chat-components/default-empty-screen.mjs.map → chat/Header.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|