Repository navigation
feat: follow-up suggestions + bump capabilitiesVersion to 66 - #17
Merged
Merged
Conversation
Extract follow-up suggestions from the BYON response envelope's `suggestions` blocks and render them as pills below the answer. Follow-ups fill the shelf first; remaining slots backfill with unused PDP pills up to MAX_PDP_QUESTIONS. A circular refresh button lets the shopper rotate to different questions when available.
…ust, trim comments - Revert parsePdpQuestions cap removal (keep at MAX_PDP_QUESTIONS) - Restore extractMessageSuggestions cap - Refresh icon only appears after a question is asked and pool > 5 - Cycling: empty currentlyVisible resets dismissedQuestions - Shorten all new comments to max 2 lines
5 of 6 tasks
…w-ups after a question PDP pills show on widget load; after a question is asked, only follow-up suggestions from the agent response are shown. Removed: RefreshIcon, .pill-refresh CSS, REFRESH_PILLS action, dismissedQuestions state, and all related tests.
Version 65 drops all context variables; 66 is the minimum that supports StructuredValue, which commerce_agent_context requires.
chintandesai-cimulate
approved these changes
Oct 14, 2026
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.
Summary
display_textfromsuggestionsblocks in the BYON response envelope (extractMessageSuggestionsintokens.ts) and populatesfollowUpSuggestionsin widget state on everySET_ANSWER.followUpSuggestionsclears onASK_QUESTION(so stale suggestions don't linger) andRESET_CONVERSATION(SPA navigation between PDPs).capabilitiesVersionbumped from"65"to"66": Version 65 drops all context variables; 66 is the minimum that supportsStructuredValue, whichcommerce_agent_contextrequires for the PDP context payload.parsePdpQuestionscap preserved, all pre-existing reducer actions unchanged.Files changed
src/tokens.tsextractMessageSuggestions()+collectSuggestions()helpersrc/provider/types.tsfollowUpSuggestionsstate fieldsrc/provider/reducer.tsSET_ANSWER, clear onASK_QUESTIONandRESET_CONVERSATIONsrc/components/QuestionPills.tsxsrc/sdk/client.tscapabilitiesVersion→"66"(was"65")tests/tokens.test.tsextractMessageSuggestionstests/provider/reducer.test.tsfollowUpSuggestionslifecycletests/sdk/client.test.tscapabilitiesVersionto"66"Test plan
npx tsc --noEmit— cleannpx vitest run— 209 tests pass