diff --git a/apps/web/components/chat/home-chat-composer.tsx b/apps/web/components/chat/home-chat-composer.tsx index 98d75eed..9e50fe33 100644 --- a/apps/web/components/chat/home-chat-composer.tsx +++ b/apps/web/components/chat/home-chat-composer.tsx @@ -38,7 +38,7 @@ export function HomeChatComposer({ return (
-
+
setInput(e.target.value)} diff --git a/apps/web/components/chat/index.tsx b/apps/web/components/chat/index.tsx index adfeabf2..5780bc61 100644 --- a/apps/web/components/chat/index.tsx +++ b/apps/web/components/chat/index.tsx @@ -776,6 +776,9 @@ export function ChatSidebar({ const isStackedInput = layout === "page" const showHeaderRow = !isPageDesktop || isMobile || !isStackedInput + const isResponding = status === "submitted" || status === "streaming" + const showInputStatusStrip = + !isStackedInput || isResponding || messages.length > 0 const chatHistorySheet = ( )} -
+
setInput(e.target.value)} onSend={handleSend} onStop={stop} onKeyDown={handleKeyDown} - isResponding={status === "submitted" || status === "streaming"} + isResponding={isResponding} activeStatus={ status === "submitted" ? "Thinking…" @@ -1142,6 +1151,7 @@ export function ChatSidebar({ ? "Structuring response…" : "Waiting for input…" } + showStatusStrip={showInputStatusStrip} onExpandedChange={setIsInputExpanded} chainOfThoughtComponent={ messages.length > 0 ? : null diff --git a/apps/web/components/chat/input/index.tsx b/apps/web/components/chat/input/index.tsx index b1ee1109..1c66e7aa 100644 --- a/apps/web/components/chat/input/index.tsx +++ b/apps/web/components/chat/input/index.tsx @@ -4,7 +4,7 @@ import { ChevronUpIcon } from "lucide-react" import NovaOrb from "@/components/nova/nova-orb" import { cn } from "@lib/utils" import { dmSansClassName } from "@/lib/fonts" -import { type ReactNode, useRef, useState } from "react" +import { type ReactNode, useEffect, useRef, useState } from "react" import { motion } from "motion/react" import { SendButton, StopButton } from "./actions" @@ -41,6 +41,13 @@ export default function ChatInput({ const [isExpanded, setIsExpanded] = useState(false) const textareaRef = useRef(null) + useEffect(() => { + if (!showStatusStrip && isExpanded) { + setIsExpanded(false) + onExpandedChange?.(false) + } + }, [isExpanded, onExpandedChange, showStatusStrip]) + const handleChange = (e: React.ChangeEvent) => { onChange(e)