diff --git a/components/message.tsx b/components/message.tsx index 35114e7..311a055 100644 --- a/components/message.tsx +++ b/components/message.tsx @@ -228,12 +228,15 @@ const PurePreviewMessage = ({ if (part.output && 'error' in part.output) { return ( -
+
Error updating document: {String(part.output.error)}
); } - + return (
{ animate={{ y: 0, opacity: 1, transition: { delay: 1 } }} data-role={role} > -
-
+
+
-
-
- Hmm... -
+
+ +
Hmm...
+
diff --git a/components/multimodal-input.tsx b/components/multimodal-input.tsx index 3d5c94d..04a66dd 100644 --- a/components/multimodal-input.tsx +++ b/components/multimodal-input.tsx @@ -28,10 +28,7 @@ import { PromptInputModelSelectTrigger, PromptInputModelSelectContent, } from './elements/prompt-input'; -import { - SelectItem, - SelectValue, -} from '@/components/ui/select'; +import { SelectItem, SelectValue } from '@/components/ui/select'; import equal from 'fast-deep-equal'; import type { UseChatHelpers } from '@ai-sdk/react'; import { AnimatePresence, motion } from 'framer-motion'; @@ -83,15 +80,13 @@ function PureMultimodalInput({ const adjustHeight = () => { if (textareaRef.current) { - textareaRef.current.style.height = 'auto'; - textareaRef.current.style.height = `${textareaRef.current.scrollHeight + 2}px`; + textareaRef.current.style.height = '72px'; } }; const resetHeight = () => { if (textareaRef.current) { - textareaRef.current.style.height = 'auto'; - textareaRef.current.style.height = '98px'; + textareaRef.current.style.height = '72px'; } }; @@ -269,7 +264,7 @@ function PureMultimodalInput({ /> { event.preventDefault(); if (status !== 'ready') { @@ -319,15 +314,14 @@ function PureMultimodalInput({ placeholder="Send a message..." value={input} onChange={handleInput} - minHeight={48} - maxHeight={48} + minHeight={72} + maxHeight={200} disableAutoResize={true} - style={{ height: '48px', minHeight: '48px', maxHeight: '48px' }} - className="text-sm resize-none py-1 px-3 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]" + className="text-base resize-none py-4 px-4 [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none] bg-transparent !border-0 !border-none outline-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:outline-none" rows={1} autoFocus /> - + @@ -338,9 +332,10 @@ function PureMultimodalInput({ 0} - className="bg-primary hover:bg-primary/90 text-primary-foreground size-8" - size="sm" - /> + className="p-3 text-gray-700 bg-gray-200 rounded-full hover:bg-gray-300 dark:bg-sidebar-accent dark:hover:bg-sidebar-accent/80 dark:text-gray-300" + > + + )} @@ -394,13 +389,15 @@ function PureModelSelectorCompact({ }) { const [optimisticModelId, setOptimisticModelId] = useState(selectedModelId); - const selectedModel = chatModels.find(model => model.id === optimisticModelId); + const selectedModel = chatModels.find( + (model) => model.id === optimisticModelId, + ); return ( { - const model = chatModels.find(m => m.name === modelName); + const model = chatModels.find((m) => m.name === modelName); if (model) { setOptimisticModelId(model.id); startTransition(() => { @@ -409,18 +406,20 @@ function PureModelSelectorCompact({ } }} > - - {selectedModel?.name || "Select model"} + {selectedModel?.name || 'Select model'} {chatModels.map((model) => ( -
+
{model.name}
-
{model.description}
+
+ {model.description} +
))}