feat(compass-assistant): add follow-up question chips to assistant response COMPASS-10712#8163
Open
pavithrachidambaram-afk wants to merge 1 commit into
Open
feat(compass-assistant): add follow-up question chips to assistant response COMPASS-10712#8163pavithrachidambaram-afk wants to merge 1 commit into
pavithrachidambaram-afk wants to merge 1 commit into
Conversation
ff7eee7 to
8a47836
Compare
73cbbfb to
1349dae
Compare
6a60f5f to
37fba16
Compare
…sponse COMPASS-10712 - Parse the ### Follow-Up Questions section from AI responses, strip it from the displayed message text, and render the extracted questions as clickable chips below the last assistant message - Clicking a chip sends that question and hides all chips (enableHideOnSelect) - Chips are only shown for the last assistant message, after streaming completes, and when the SearchActivationProgramP2 experiment is enabled - FOLLOW_UP_QUESTIONS_HEADER constant is shared between the prompt template and the parser as a single source of truth for the section marker - Prompt format updated to specify explicit numbered output for predictable parsing
37fba16 to
be859e0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Parses and renders follow-up question chips from AI assistant responses for the SearchActivationPhase2 experiment (COMPASS-10712).
When the
enableSearchActivationProgramP2experiment is active and the AI response includes a### Follow-Up Questionssection, the questions are extracted from the response text, stripped from the displayed message, and rendered as clickable chips below the last assistant message.For last message:
The follow-up section is hidden from response as soon as the header appears (even mid-stream), but chips are only shown once the response is fully complete as we don't want to display incomplete question chips. By stripping the section from the rawText early (as the header appears), we prevent the raw
### Follow-Up Questionssection from flashing during streaming.For older messages (non-last message):
We strip the Follow-up section completely and do not display the chips as well
enableHideOnSelect)isLastMessageandisResponseCompleteare passed intoparseFollowUpQuestionsso all gating logic lives in the parser, not in JSXbuildExplainPlanPrompt) is updated to specify an explicit numbered format (1.,2.,3.) for predictable parsingFOLLOW_UP_QUESTIONS_HEADERis exported fromprompts.tsand used in both the prompt template and the parser — single source of truthenableSearchActivationProgramP2experiment variantScreen.Recording.2026-06-19.at.1.29.24.PM.mov
(Note: For local testing, use the Feature Flag gate since it is not possible to turn ON the experiment directly)
Checklist
Motivation and Context
Types of changes