From fb2a30b6b83fd9e788de6168e944630c634c63cc Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 06:25:42 +0000 Subject: [PATCH] feat: enable follow-up questions for resolution searches - Implement sanitization of message context by filtering out image parts before calling `querySuggestor` to ensure compatibility with text-based models. - Call `querySuggestor` and append the `FollowupPanel` UI in the `resolution_search` action. - Update `aiState` with contextually relevant follow-up questions and markers, using a consistent `groupeId` for all assistant messages. - Ensure TypeScript compatibility for the sanitized message array. --- app/actions.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/actions.tsx b/app/actions.tsx index 46603a93..9840ce04 100644 --- a/app/actions.tsx +++ b/app/actions.tsx @@ -94,7 +94,17 @@ async function submit(formData?: FormData, skip?: boolean) { messages.push({ role: 'assistant', content: analysisResult.summary || 'Analysis complete.' }); - const relatedQueries = await querySuggestor(uiStream, messages); + const sanitizedMessages: CoreMessage[] = messages.map(m => { + if (Array.isArray(m.content)) { + return { + ...m, + content: m.content.filter(part => part.type !== 'image') + } as CoreMessage + } + return m + }) + + const relatedQueries = await querySuggestor(uiStream, sanitizedMessages); uiStream.append(