@burtson-labs/bandit-engine 2.0.88 → 2.0.89

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.
package/dist/index.js CHANGED
@@ -29868,6 +29868,17 @@ var init_chat2 = __esm({
29868
29868
  (0, import_react38.useEffect)(() => {
29869
29869
  historyRef.current = history;
29870
29870
  }, [history]);
29871
+ (0, import_react38.useEffect)(() => {
29872
+ if (!hydrated) return;
29873
+ const params = new URLSearchParams(window.location.search);
29874
+ const title = params.get("title") || "";
29875
+ const text = params.get("text") || "";
29876
+ const url = params.get("url") || "";
29877
+ if (!title && !text && !url) return;
29878
+ const shared = [title, text, url].filter(Boolean).join("\n").trim();
29879
+ if (shared) setInputValue(shared);
29880
+ window.history.replaceState({}, "", window.location.pathname);
29881
+ }, [hydrated, setInputValue]);
29871
29882
  const {
29872
29883
  speak: ttsSpeak,
29873
29884
  stop: ttsStop,