From 060cf3998e08e99b4bc5de4e34100a34190ec533 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 21 Apr 2026 17:13:41 -0700 Subject: [PATCH] Disable followup clicks after freebuff session ends --- cli/src/components/tools/suggest-followups.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cli/src/components/tools/suggest-followups.tsx b/cli/src/components/tools/suggest-followups.tsx index 883459430c..88fc060775 100644 --- a/cli/src/components/tools/suggest-followups.tsx +++ b/cli/src/components/tools/suggest-followups.tsx @@ -5,6 +5,8 @@ import { defineToolComponent } from './types' import { useTerminalDimensions } from '../../hooks/use-terminal-dimensions' import { useTheme } from '../../hooks/use-theme' import { getLatestFollowupToolCallId, useChatStore } from '../../state/chat-store' +import { useFreebuffSessionStore } from '../../state/freebuff-session-store' +import { IS_FREEBUFF } from '../../utils/constants' import { Button } from '../button' import type { ToolRenderConfig } from './types' @@ -223,6 +225,9 @@ const SuggestFollowupsItem = ({ }: SuggestFollowupsItemProps) => { const theme = useTheme() const inputFocused = useChatStore((state) => state.inputFocused) + const isFreebuffSessionOver = useFreebuffSessionStore( + (state) => IS_FREEBUFF && state.session?.status === 'ended', + ) const setSuggestedFollowups = useChatStore( (state) => state.setSuggestedFollowups, ) @@ -305,7 +310,7 @@ const SuggestFollowupsItem = ({ isHovered={hoveredIndex === index} onSendFollowup={onSendFollowup} onHover={setHoveredIndex} - disabled={!inputFocused} + disabled={!inputFocused || isFreebuffSessionOver} labelColumnWidth={labelColumnWidth} /> ))}