This commit is contained in:
Br1an 2026-04-09 10:15:18 -06:00 committed by GitHub
commit 0b77057e7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -245,7 +245,7 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
}, [selectedType, searchQuery])
const handleEnhancePrompt = useCallback(() => {
const trimmedInput = inputValue.trim()
const trimmedInput = (inputValue || "").trim()
if (trimmedInput) {
setIsEnhancingPrompt(true)
@ -259,7 +259,7 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
// Memoized check for whether the input has content (text or images)
const hasInputContent = useMemo(() => {
return inputValue.trim().length > 0 || selectedImages.length > 0
return (inputValue || "").trim().length > 0 || selectedImages.length > 0
}, [inputValue, selectedImages])
// Compute the key combination text for the send button tooltip based on enterBehavior