@@ -10,6 +10,7 @@ import type { ClineMessage } from "@roo-code/types"
1010import { ClineApiReqInfo , ClineAskUseMcpServer , ClineSayTool } from "@roo/ExtensionMessage"
1111import { COMMAND_OUTPUT_STRING } from "@roo/combineCommandSequences"
1212import { safeJsonParse } from "@roo/safeJsonParse"
13+ import { FollowUpData , SuggestionItem } from "@roo-code/types"
1314
1415import { useCopyToClipboard } from "@src/utils/clipboard"
1516import { useExtensionState } from "@src/context/ExtensionStateContext"
@@ -48,8 +49,9 @@ interface ChatRowProps {
4849 isStreaming : boolean
4950 onToggleExpand : ( ts : number ) => void
5051 onHeightChange : ( isTaller : boolean ) => void
51- onSuggestionClick ?: ( answer : string , event ?: React . MouseEvent ) => void
52+ onSuggestionClick ?: ( suggestion : SuggestionItem , event ?: React . MouseEvent ) => void
5253 onBatchFileResponse ?: ( response : { [ key : string ] : boolean } ) => void
54+ onFollowUpUnmount ?: ( ) => void
5355}
5456
5557// eslint-disable-next-line @typescript-eslint/no-empty-object-type
@@ -98,6 +100,7 @@ export const ChatRowContent = ({
98100 isStreaming,
99101 onToggleExpand,
100102 onSuggestionClick,
103+ onFollowUpUnmount,
101104 onBatchFileResponse,
102105} : ChatRowContentProps ) => {
103106 const { t } = useTranslation ( )
@@ -279,7 +282,7 @@ export const ChatRowContent = ({
279282
280283 const followUpData = useMemo ( ( ) => {
281284 if ( message . type === "ask" && message . ask === "followup" && ! message . partial ) {
282- return safeJsonParse < any > ( message . text )
285+ return safeJsonParse < FollowUpData > ( message . text )
283286 }
284287 return null
285288 } , [ message . type , message . ask , message . partial , message . text ] )
@@ -1215,6 +1218,7 @@ export const ChatRowContent = ({
12151218 suggestions = { followUpData ?. suggest }
12161219 onSuggestionClick = { onSuggestionClick }
12171220 ts = { message ?. ts }
1221+ onUnmount = { onFollowUpUnmount }
12181222 />
12191223 </ >
12201224 )
0 commit comments