From 641ed75543c9c6ce2a9dcbdc3a09e9323431e74f Mon Sep 17 00:00:00 2001 From: "shilpi.mittal" Date: Thu, 19 Nov 2026 03:53:57 +0530 Subject: [PATCH 1/2] Add search-questions attribute for SRP pill support Introduces srpQuestions config field and search-questions HTML attribute so SRP pages can display static opener questions as tappable pills, separate from category-questions used on PLP pages. --- src/ShopperAgentShim.tsx | 2 +- src/custom-element.ts | 1 + src/provider/types.ts | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ShopperAgentShim.tsx b/src/ShopperAgentShim.tsx index 90fad96..18563c0 100644 --- a/src/ShopperAgentShim.tsx +++ b/src/ShopperAgentShim.tsx @@ -151,7 +151,7 @@ function resolvePills( case "plp": return config.categoryQuestions ?? []; case "srp": - return []; + return config.srpQuestions ?? []; case "pdp": default: return config.pdpQuestions ?? []; diff --git a/src/custom-element.ts b/src/custom-element.ts index d42f2ba..66b2a8d 100644 --- a/src/custom-element.ts +++ b/src/custom-element.ts @@ -60,6 +60,7 @@ function readConfig(el: HTMLElement): WidgetConfig { categoryName: attr("category-name"), categoryQuestions: parsePdpQuestions(attr("category-questions")), searchQuery: attr("search-query"), + srpQuestions: parsePdpQuestions(attr("search-questions")), }; } diff --git a/src/provider/types.ts b/src/provider/types.ts index 2bd0b8f..120ae1c 100644 --- a/src/provider/types.ts +++ b/src/provider/types.ts @@ -55,6 +55,9 @@ export interface WidgetConfig { /** Search query string for SRP pages (e.g. "waterproof jackets"). */ searchQuery?: string; + /** Static opener questions for SRP pages, rendered as tappable pills. */ + srpQuestions?: string[]; + /** * Current PDP product name, used to template the InputBar placeholder as * `"Ask me anything about "`. When unset, the InputBar falls From 5892cbedbfddce5d1b9a56936eff1b99c3623349 Mon Sep 17 00:00:00 2001 From: "shilpi.mittal" Date: Thu, 19 Nov 2026 03:59:07 +0530 Subject: [PATCH 2/2] Bump version to 0.5.0 for SRP search-questions support --- CHANGELOG.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9645508..26d1c4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ The release version comes from `package.json`. Keep the newest dated entry first. +## 0.5.0 — 2026-11-19 + +- Add `search-questions` attribute and `srpQuestions` config field for rendering static opener pills on SRP pages, separate from `category-questions` used on PLP. + ## 0.4.0 — 2026-11-17 - Add PLP and SRP page type support for commerce_agent_context in both inline and handoff modes. diff --git a/package-lock.json b/package-lock.json index 12bb38d..6769f2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "inline-agent-widget", - "version": "0.4.0", + "version": "0.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "inline-agent-widget", - "version": "0.4.0", + "version": "0.5.0", "license": "MIT", "devDependencies": { "@testing-library/jest-dom": "^6.9.1", diff --git a/package.json b/package.json index f6bcacf..0c4bfe7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "inline-agent-widget", - "version": "0.4.0", + "version": "0.5.0", "description": "A bare-minimum, embeddable inline chat widget for Salesforce Agentforce (SCRT2 Messaging for In-App and Web). Renders agent replies as sanitized markdown inside a Shadow DOM.", "type": "module", "main": "./dist/inline-agent-widget.umd.js",