@burdenoff/website-sdk 2026.829.7 → 2026.830.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -620,7 +620,7 @@ var DEFAULT_EXPLORE_EXAMPLE_PROMPTS = [
620
620
  ];
621
621
  var FALLBACK_WELCOME_TITLE = "Ask anything about our products";
622
622
  var FALLBACK_WELCOME_BODY = "Get straight answers drawn from our product documentation and public pages \u2014 with links back to the exact page each answer came from.";
623
- function buildFallbackCatalog(examplePrompts) {
623
+ function buildFallbackCatalog(examplePrompts, welcome) {
624
624
  return {
625
625
  enabled: true,
626
626
  products: ECOSYSTEM_PRODUCTS.map((p) => ({
@@ -630,8 +630,8 @@ function buildFallbackCatalog(examplePrompts) {
630
630
  website: p.websiteUrl
631
631
  })),
632
632
  examplePrompts: examplePrompts?.length ? examplePrompts : DEFAULT_EXPLORE_EXAMPLE_PROMPTS,
633
- welcomeTitle: FALLBACK_WELCOME_TITLE,
634
- welcomeBody: FALLBACK_WELCOME_BODY,
633
+ welcomeTitle: welcome?.title ?? FALLBACK_WELCOME_TITLE,
634
+ welcomeBody: welcome?.body ?? FALLBACK_WELCOME_BODY,
635
635
  limits: FALLBACK_EXPLORE_LIMITS,
636
636
  captchaRequired: false,
637
637
  recaptchaSiteKey: null
@@ -691,7 +691,15 @@ function classifyExploreError(code, serverMessage) {
691
691
  retryable: true
692
692
  };
693
693
  }
694
- if (c === "TIMEOUT" || c === "TOOL_BUDGET") {
694
+ if (c === "TOOL_BUDGET") {
695
+ return {
696
+ kind: "scope",
697
+ code: c,
698
+ message: "That question spans more of our products than I can look through in one go. Try asking about two or three specific products.",
699
+ retryable: false
700
+ };
701
+ }
702
+ if (c === "TIMEOUT") {
695
703
  return {
696
704
  kind: "timeout",
697
705
  code: c,
@@ -823,6 +831,7 @@ function useExploreChat(options = {}) {
823
831
  pageUrl,
824
832
  locale,
825
833
  examplePrompts,
834
+ fallbackWelcome,
826
835
  pollIntervalMs = DEFAULT_POLL_INTERVAL_MS,
827
836
  pollTimeoutMs = DEFAULT_POLL_TIMEOUT_MS,
828
837
  storageKey = DEFAULT_STORAGE_KEY,
@@ -831,9 +840,13 @@ function useExploreChat(options = {}) {
831
840
  } = options;
832
841
  const client = useWebSDK();
833
842
  const promptKey = JSON.stringify(examplePrompts ?? []);
843
+ const welcomeKey = JSON.stringify(fallbackWelcome ?? null);
834
844
  const fallbackCatalog = useMemo(
835
- () => buildFallbackCatalog(JSON.parse(promptKey)),
836
- [promptKey]
845
+ () => buildFallbackCatalog(
846
+ JSON.parse(promptKey),
847
+ JSON.parse(welcomeKey) ?? void 0
848
+ ),
849
+ [promptKey, welcomeKey]
837
850
  );
838
851
  const [catalog, setCatalog] = useState(fallbackCatalog);
839
852
  const [messages, setMessages] = useState([]);