@@ -5,6 +5,8 @@ import { defineToolComponent } from './types'
55import { useTerminalDimensions } from '../../hooks/use-terminal-dimensions'
66import { useTheme } from '../../hooks/use-theme'
77import { getLatestFollowupToolCallId , useChatStore } from '../../state/chat-store'
8+ import { useFreebuffSessionStore } from '../../state/freebuff-session-store'
9+ import { IS_FREEBUFF } from '../../utils/constants'
810import { Button } from '../button'
911
1012import type { ToolRenderConfig } from './types'
@@ -223,6 +225,9 @@ const SuggestFollowupsItem = ({
223225} : SuggestFollowupsItemProps ) => {
224226 const theme = useTheme ( )
225227 const inputFocused = useChatStore ( ( state ) => state . inputFocused )
228+ const isFreebuffSessionOver = useFreebuffSessionStore (
229+ ( state ) => IS_FREEBUFF && state . session ?. status === 'ended' ,
230+ )
226231 const setSuggestedFollowups = useChatStore (
227232 ( state ) => state . setSuggestedFollowups ,
228233 )
@@ -305,7 +310,7 @@ const SuggestFollowupsItem = ({
305310 isHovered = { hoveredIndex === index }
306311 onSendFollowup = { onSendFollowup }
307312 onHover = { setHoveredIndex }
308- disabled = { ! inputFocused }
313+ disabled = { ! inputFocused || isFreebuffSessionOver }
309314 labelColumnWidth = { labelColumnWidth }
310315 />
311316 ) ) }
0 commit comments