@chrryai/chrry 1.4.89 → 1.4.90

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
@@ -1902,7 +1902,7 @@ var init_utils = __esm({
1902
1902
  };
1903
1903
  isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes("Firefox");
1904
1904
  config = getSiteConfig(getClientHostname());
1905
- VERSION = config.version || "1.4.89";
1905
+ VERSION = config.version || "1.4.90";
1906
1906
  getSlugFromPathname = (path) => {
1907
1907
  return getAppAndStoreSlugs(path, {
1908
1908
  defaultAppSlug: config.slug,
@@ -24068,7 +24068,7 @@ function DataProvider({ children, ...rest }) {
24068
24068
  const [instructions, setInstructions] = (0, import_react21.useState)([]);
24069
24069
  const [affiliateStats, setAffiliateStats] = (0, import_react21.useState)(null);
24070
24070
  const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react21.useState)(false);
24071
- const VERSION4 = "1.4.89";
24071
+ const VERSION4 = "1.4.90";
24072
24072
  const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
24073
24073
  const {
24074
24074
  API_URL: API_URL2,
@@ -26463,6 +26463,7 @@ function ChatProvider({
26463
26463
  if (id) {
26464
26464
  setThreadId(id);
26465
26465
  setShouldFetchThread(true);
26466
+ } else {
26466
26467
  setIsChatFloating(false);
26467
26468
  }
26468
26469
  }, [pathname]);
@@ -36887,7 +36888,7 @@ function Chat({
36887
36888
  setDebateAgent,
36888
36889
  isDebating,
36889
36890
  setIsDebating,
36890
- setIsChatFloating,
36891
+ setIsChatFloating: setIsChatFloatingContext,
36891
36892
  setIsWebSearchEnabled: setWebSearchEnabledInternal,
36892
36893
  isWebSearchEnabled,
36893
36894
  setInput: setInputInternal,
@@ -36908,7 +36909,7 @@ function Chat({
36908
36909
  setIsImageGenerationEnabled,
36909
36910
  setShouldFocus,
36910
36911
  shouldFocus,
36911
- isChatFloating: isChatFloatingInternal
36912
+ isChatFloating: isChatFloatingContext
36912
36913
  } = useChat();
36913
36914
  const {
36914
36915
  router,
@@ -37016,18 +37017,12 @@ function Chat({
37016
37017
  }, [isNewChat]);
37017
37018
  const [hasBottomOffset, setHasBottomOffset] = (0, import_react57.useState)(false);
37018
37019
  const shouldUseCompactMode = compactMode || hasBottomOffset;
37019
- const isChatFloating = isChatFloatingInternal || shouldUseCompactMode || !empty && !showChatInput;
37020
+ const floatingInitial = (isChatFloatingContext || shouldUseCompactMode) && !empty && !showChatInput;
37021
+ const [isChatFloating, setIsChatFloatingState] = (0, import_react57.useState)(floatingInitial);
37020
37022
  (0, import_react57.useEffect)(() => {
37021
- if (process.env.NODE_ENV !== "production") {
37022
- console.log(" Chat floating state", {
37023
- isChatFloating,
37024
- empty,
37025
- showChatInput,
37026
- shouldUseCompactMode
37027
- });
37028
- }
37029
- setIsChatFloating(isChatFloating);
37030
- }, [isChatFloating]);
37023
+ setIsChatFloatingContext(floatingInitial);
37024
+ setIsChatFloatingState(floatingInitial);
37025
+ }, [floatingInitial]);
37031
37026
  const stripActionFromText = (text3) => {
37032
37027
  const actionMatch = text3.match(/ACTION:\s*(\{(?:[^{}]|\{[^}]*\})*\})\s*$/);
37033
37028
  if (actionMatch) {