@chrryai/chrry 1.2.95 → 1.2.97

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.d.mts CHANGED
@@ -198,6 +198,7 @@ type thread = {
198
198
  user: user;
199
199
  }[] | null;
200
200
  isMainThread: boolean;
201
+ lastMessage?: message;
201
202
  user?: user;
202
203
  guest?: guest;
203
204
  appId: string | null;
@@ -780,7 +781,7 @@ declare const isFirefox: boolean;
780
781
  declare function getFlag({ code }: {
781
782
  code?: string;
782
783
  }): string;
783
- declare const VERSION = "1.2.95";
784
+ declare const VERSION = "1.2.97";
784
785
  type instructionBase = {
785
786
  id: string;
786
787
  title: string;
package/dist/index.d.ts CHANGED
@@ -198,6 +198,7 @@ type thread = {
198
198
  user: user;
199
199
  }[] | null;
200
200
  isMainThread: boolean;
201
+ lastMessage?: message;
201
202
  user?: user;
202
203
  guest?: guest;
203
204
  appId: string | null;
@@ -780,7 +781,7 @@ declare const isFirefox: boolean;
780
781
  declare function getFlag({ code }: {
781
782
  code?: string;
782
783
  }): string;
783
- declare const VERSION = "1.2.95";
784
+ declare const VERSION = "1.2.97";
784
785
  type instructionBase = {
785
786
  id: string;
786
787
  title: string;
package/dist/index.js CHANGED
@@ -21282,7 +21282,7 @@ function DataProvider({
21282
21282
  const [instructions, setInstructions] = (0, import_react14.useState)([]);
21283
21283
  const [affiliateStats, setAffiliateStats] = (0, import_react14.useState)(null);
21284
21284
  const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react14.useState)(false);
21285
- const VERSION3 = "1.2.95";
21285
+ const VERSION3 = "1.2.97";
21286
21286
  const [weather, setWeather] = useLocalStorage("weather", user?.weather || guest?.weather || void 0);
21287
21287
  const {
21288
21288
  API_URL: API_URL2,
@@ -22367,7 +22367,7 @@ var init_utils = __esm({
22367
22367
  window.history.replaceState({}, "", newUrl);
22368
22368
  };
22369
22369
  isFirefox = typeof navigator !== "undefined" && navigator?.userAgent.includes("Firefox");
22370
- VERSION = "1.2.95";
22370
+ VERSION = "1.2.97";
22371
22371
  getSlugFromPathname = (path) => {
22372
22372
  const siteConfig = getSiteConfig();
22373
22373
  return getAppAndStoreSlugs(path, {
@@ -27779,7 +27779,8 @@ function Agent({
27779
27779
  const { chrry, baseApp, token } = useAuth();
27780
27780
  const { app, apps, appForm, appFormWatcher, appStatus, setAppStatus } = useApp();
27781
27781
  const { aiAgents } = useChat();
27782
- const { isMobileDevice, removeParam: removeParam2, searchParams, addParam: addParam2, addParams } = useNavigationContext();
27782
+ const { removeParam: removeParam2, searchParams, addParam: addParam2, addParams } = useNavigationContext();
27783
+ const { isMobileDevice } = useTheme2();
27783
27784
  const {
27784
27785
  register,
27785
27786
  watch,
@@ -29139,6 +29140,7 @@ var init_Agent = __esm({
29139
29140
  init_platform();
29140
29141
  init_providers();
29141
29142
  init_ThemeSwitcher();
29143
+ init_platform();
29142
29144
  }
29143
29145
  });
29144
29146
 
@@ -34587,7 +34589,7 @@ function CollaborationStatus({
34587
34589
  }) {
34588
34590
  const { t: t6 } = useAppContext();
34589
34591
  const { user, token } = useAuth();
34590
- const { isMobileDevice } = useNavigationContext();
34592
+ const { isMobileDevice } = useTheme2();
34591
34593
  const [isLoading, setIsLoading] = import_react54.default.useState(false);
34592
34594
  const [status, setStatus] = (0, import_react54.useState)("pending");
34593
34595
  const collaboration = thread2.collaborations?.find(
@@ -34682,6 +34684,7 @@ var init_CollaborationStatus = __esm({
34682
34684
  init_ConfirmButton();
34683
34685
  init_providers();
34684
34686
  init_DataProvider();
34687
+ init_platform();
34685
34688
  }
34686
34689
  });
34687
34690
 
@@ -35545,7 +35548,7 @@ function CharacterProfile({
35545
35548
  }, [props.characterProfile]);
35546
35549
  const { t: t6 } = useAppContext();
35547
35550
  const { token, user, guest, setUser, setGuest, setShowCharacterProfiles } = useAuth();
35548
- const { thread: thread2, setShouldRefetchThread } = useChat();
35551
+ const { thread: thread2, refetchThread } = useChat();
35549
35552
  const [showActions, setShowActions] = (0, import_react57.useState)(props.showActions);
35550
35553
  const [isPinning, setIsPinning] = (0, import_react57.useState)(false);
35551
35554
  const [isSharing, setIsSharing] = (0, import_react57.useState)(false);
@@ -35571,7 +35574,7 @@ function CharacterProfile({
35571
35574
  const updatedGuest = await actions.getGuest();
35572
35575
  setGuest(updatedGuest);
35573
35576
  }
35574
- thread2?.characterProfile?.id === characterProfile.id && setShouldRefetchThread(true);
35577
+ thread2?.characterProfile?.id === characterProfile.id && await refetchThread();
35575
35578
  } catch (error) {
35576
35579
  console.error("Error pinning thread:", error);
35577
35580
  } finally {
@@ -35594,7 +35597,7 @@ function CharacterProfile({
35594
35597
  visibility: response?.characterProfileVisibility,
35595
35598
  pinned: response?.pinCharacterProfile
35596
35599
  };
35597
- thread2?.characterProfile?.id === characterProfile.id && setShouldRefetchThread(true);
35600
+ thread2?.characterProfile?.id === characterProfile.id && await refetchThread();
35598
35601
  setCharacterProfile(newCharacterProfile);
35599
35602
  } catch (error) {
35600
35603
  console.error("Error pinning thread:", error);
@@ -44104,7 +44107,7 @@ var init_Sidebar = __esm({
44104
44107
  children,
44105
44108
  useExtensionIcon
44106
44109
  }) {
44107
- const { isHome, userNameByUrl, pathname, isSplash, setIsSplash } = useNavigationContext();
44110
+ const { isHome, pathname, isSplash, setIsSplash } = useNavigationContext();
44108
44111
  const { threadId } = useChat();
44109
44112
  const { isLoading, slug, allApps, chrry, getAppSlug, newApp, ...auth } = useAuth();
44110
44113
  const { isDevelopment: isDevelopment3 } = useData();