@@ -9,7 +9,6 @@ import { Button } from '../button'
99import type { ToolRenderConfig } from './types'
1010import type { SuggestedFollowup } from '../../state/chat-store'
1111
12- // Stable empty set to avoid creating new references on each render
1312const EMPTY_CLICKED_SET = new Set < number > ( )
1413const MIN_LABEL_COLUMN_WIDTH = 12
1514const MAX_LABEL_COLUMN_WIDTH = 60
@@ -121,9 +120,6 @@ interface SuggestFollowupsItemProps {
121120 onSendFollowup : ( prompt : string , index : number ) => void
122121}
123122
124- /**
125- * Static display of a followup for past messages (non-interactive)
126- */
127123interface PastFollowupItemProps {
128124 followup : SuggestedFollowup
129125 isClicked : boolean
@@ -156,9 +152,6 @@ const PastFollowupItem = ({ followup, isClicked }: PastFollowupItemProps) => {
156152 )
157153}
158154
159- /**
160- * Collapsed toggle view for past messages showing "Previously suggested followups"
161- */
162155interface PastFollowupsToggleProps {
163156 toolCallId : string
164157 followups : SuggestedFollowup [ ]
@@ -219,8 +212,6 @@ const SuggestFollowupsItem = ({
219212 const latestFollowupToolCallId = useChatStore ( ( state ) =>
220213 getLatestFollowupToolCallId ( state . messages ) ,
221214 )
222- // Get clicked indices from the persistent map
223- // Use stable EMPTY_CLICKED_SET to avoid creating new references that cause infinite re-renders
224215 const clickedIndices = useChatStore (
225216 ( state ) => state . clickedFollowupsMap . get ( toolCallId ) ?? EMPTY_CLICKED_SET ,
226217 )
0 commit comments