diff --git a/frontend/src/components/message/PromptInput.tsx b/frontend/src/components/message/PromptInput.tsx index 5c25c3df..c677666c 100644 --- a/frontend/src/components/message/PromptInput.tsx +++ b/frontend/src/components/message/PromptInput.tsx @@ -8,7 +8,8 @@ import { useModelSelection } from '@/hooks/useModelSelection' import { useUserBash } from '@/stores/userBashStore' import { useMobile } from '@/hooks/useMobile' -import { ChevronDown } from 'lucide-react' +import { useSessionStatusForSession } from '@/stores/sessionStatusStore' +import { ChevronDown, Square } from 'lucide-react' import { CommandSuggestions } from '@/components/command/CommandSuggestions' import { MentionSuggestions, type MentionItem } from './MentionSuggestions' @@ -451,7 +452,9 @@ export function PromptInput({ const { model: selectedModel, modelString } = useModelSelection(opcodeUrl, directory) const currentModel = modelString || '' const isMobile = useMobile() - const hideSecondaryButtons = isMobile && (hasActiveStream || showScrollButton) + const sessionStatus = useSessionStatusForSession(sessionID) + const showStopButton = hasActiveStream && (sessionStatus.type === 'busy' || sessionStatus.type === 'retry') + const hideSecondaryButtons = isMobile && hasActiveStream useEffect(() => { const loadModelName = async () => { @@ -485,7 +488,7 @@ export function PromptInput({ return (
{hasActiveStream && ( -
+
)} @@ -566,14 +569,14 @@ export function PromptInput({ )} - {hasActiveStream && ( +{showStopButton && ( )}