diff --git a/sdk/ATTACHMENTS.md b/sdk/ATTACHMENTS.md deleted file mode 100644 index 16c29c5..0000000 --- a/sdk/ATTACHMENTS.md +++ /dev/null @@ -1,11 +0,0 @@ -# Objective -I want the AI to be able to handle uploading attachments. Things such as upload images and PDFs, etc. - -The user should be able to upload the attachment by clicking on the "+" sign in sdk/widget/src/components/Composer.tsx and selectting on the file. They should also be able to drag and drop a file from their computer into the chat widget. - -Upon uploading the file, the Composer should show a very small attachment preview of what they've attached. - -Upon hitting submit with the attachment, the attachments, along with the message, should be sent to Vercel AI-SDK on the backend. - -# Consider -Also consider how we can handle images on the backend too. I want to be able to do cool workflows like ask the AI "What is in this image" and it be able to tell me what it is by analyzing the image. \ No newline at end of file diff --git a/sdk/sandbox/src/App.tsx b/sdk/sandbox/src/App.tsx index 2c0b937..03af7f6 100644 --- a/sdk/sandbox/src/App.tsx +++ b/sdk/sandbox/src/App.tsx @@ -1,7 +1,7 @@ import { OpenChatWidget } from "../../widget/src"; const chatApiUrl = - import.meta.env.VITE_CHAT_API_URL ?? "http://localhost:8787/api/chat/notion"; + import.meta.env.VITE_CHAT_API_URL ?? "http://localhost:8787/api/chat/default"; export default function App() { return ( diff --git a/sdk/widget/src/components/ChatToggleButton.tsx b/sdk/widget/src/components/ChatToggleButton.tsx index b0ef65d..7ace502 100644 --- a/sdk/widget/src/components/ChatToggleButton.tsx +++ b/sdk/widget/src/components/ChatToggleButton.tsx @@ -10,12 +10,12 @@ type OpenChatWidgetToggleProps = { }; const DEFAULT_LOGO_SRC = HELPFUL_CHAT_LOGO_DATA_URI; -const BUTTON_SIZE_PX = 68; -const ICON_SIZE_PX = 54; -const CLOSE_ICON_SIZE_PX = 22; -const MOBILE_BUTTON_SIZE_PX = 56; -const MOBILE_ICON_SIZE_PX = 42; -const MOBILE_CLOSE_ICON_SIZE_PX = 18; +const BUTTON_SIZE_PX = 62; +const ICON_SIZE_PX = 48; +const CLOSE_ICON_SIZE_PX = 20; +const MOBILE_BUTTON_SIZE_PX = 46; +const MOBILE_ICON_SIZE_PX = 32; +const MOBILE_CLOSE_ICON_SIZE_PX = 16; function CloseIcon({ size }: { size: number }) { return ( @@ -56,7 +56,7 @@ export const ChatToggleButton = React.forwardRef< const closeIconSize = isMobile ? MOBILE_CLOSE_ICON_SIZE_PX : CLOSE_ICON_SIZE_PX; - const offset = isMobile ? "12px" : "16px"; + const offset = isMobile ? "10px" : "16px"; const hasUnread = !isOpen && unreadCount > 0; const unreadLabel = unreadCount > 99 ? "99+" : String(unreadCount); @@ -91,10 +91,10 @@ export const ChatToggleButton = React.forwardRef< position: "absolute", top: isMobile ? "-2px" : "0px", right: isMobile ? "-2px" : "0px", - minWidth: isMobile ? "18px" : "20px", - height: isMobile ? "18px" : "20px", + minWidth: isMobile ? "16px" : "20px", + height: isMobile ? "16px" : "20px", borderRadius: "9999px", - padding: "0 5px", + padding: isMobile ? "0 4px" : "0 5px", background: "#ef4444", color: "#ffffff", fontSize: isMobile ? "10px" : "11px",