@chrryai/chrry 1.5.4 → 1.5.6
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/Thread.module.scss +1 -0
- package/dist/index.js +138 -131
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +362 -355
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/Thread.module.scss
CHANGED
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.5.
|
|
1905
|
+
VERSION = config.version || "1.5.6";
|
|
1906
1906
|
getSlugFromPathname = (path) => {
|
|
1907
1907
|
return getAppAndStoreSlugs(path, {
|
|
1908
1908
|
defaultAppSlug: config.slug,
|
|
@@ -5860,72 +5860,6 @@ var init_ThemeContext = __esm({
|
|
|
5860
5860
|
}
|
|
5861
5861
|
});
|
|
5862
5862
|
|
|
5863
|
-
// lib/db.ts
|
|
5864
|
-
var import_idb, dbInstance, getDB, cacheData, getCachedData, clearCache;
|
|
5865
|
-
var init_db = __esm({
|
|
5866
|
-
"lib/db.ts"() {
|
|
5867
|
-
"use strict";
|
|
5868
|
-
import_idb = require("idb");
|
|
5869
|
-
dbInstance = null;
|
|
5870
|
-
getDB = async () => {
|
|
5871
|
-
if (typeof indexedDB === "undefined") {
|
|
5872
|
-
return null;
|
|
5873
|
-
}
|
|
5874
|
-
if (dbInstance) return dbInstance;
|
|
5875
|
-
dbInstance = await (0, import_idb.openDB)("vex-cache", 1, {
|
|
5876
|
-
upgrade(db) {
|
|
5877
|
-
if (!db.objectStoreNames.contains("cache")) {
|
|
5878
|
-
db.createObjectStore("cache");
|
|
5879
|
-
}
|
|
5880
|
-
}
|
|
5881
|
-
});
|
|
5882
|
-
return dbInstance;
|
|
5883
|
-
};
|
|
5884
|
-
cacheData = async (key, data, ttl) => {
|
|
5885
|
-
try {
|
|
5886
|
-
const db = await getDB();
|
|
5887
|
-
if (!db) return;
|
|
5888
|
-
await db.put(
|
|
5889
|
-
"cache",
|
|
5890
|
-
{
|
|
5891
|
-
data,
|
|
5892
|
-
timestamp: Date.now(),
|
|
5893
|
-
ttl
|
|
5894
|
-
},
|
|
5895
|
-
key
|
|
5896
|
-
);
|
|
5897
|
-
} catch (error) {
|
|
5898
|
-
console.error("Failed to cache data:", error);
|
|
5899
|
-
}
|
|
5900
|
-
};
|
|
5901
|
-
getCachedData = async (key) => {
|
|
5902
|
-
try {
|
|
5903
|
-
const db = await getDB();
|
|
5904
|
-
if (!db) return null;
|
|
5905
|
-
const cached = await db.get("cache", key);
|
|
5906
|
-
if (!cached) return null;
|
|
5907
|
-
if (cached.ttl && Date.now() - cached.timestamp > cached.ttl) {
|
|
5908
|
-
await db.delete("cache", key);
|
|
5909
|
-
return null;
|
|
5910
|
-
}
|
|
5911
|
-
return cached.data;
|
|
5912
|
-
} catch (error) {
|
|
5913
|
-
console.error("Failed to get cached data:", error);
|
|
5914
|
-
return null;
|
|
5915
|
-
}
|
|
5916
|
-
};
|
|
5917
|
-
clearCache = async () => {
|
|
5918
|
-
try {
|
|
5919
|
-
const db = await getDB();
|
|
5920
|
-
if (!db) return;
|
|
5921
|
-
await db.clear("cache");
|
|
5922
|
-
} catch (error) {
|
|
5923
|
-
console.error("Failed to clear cache:", error);
|
|
5924
|
-
}
|
|
5925
|
-
};
|
|
5926
|
-
}
|
|
5927
|
-
});
|
|
5928
|
-
|
|
5929
5863
|
// locales/en.json
|
|
5930
5864
|
var en_default;
|
|
5931
5865
|
var init_en = __esm({
|
|
@@ -22981,13 +22915,7 @@ function AuthProvider({
|
|
|
22981
22915
|
...props
|
|
22982
22916
|
}) {
|
|
22983
22917
|
const [wasGifted, setWasGifted] = (0, import_react19.useState)(false);
|
|
22984
|
-
const [session2,
|
|
22985
|
-
props.session
|
|
22986
|
-
);
|
|
22987
|
-
const setSession = (session3, cache = false) => {
|
|
22988
|
-
setSessionInternal(session3);
|
|
22989
|
-
if (cache) cacheData(sessionCacheKey, session3, 1e3 * 60 * 60);
|
|
22990
|
-
};
|
|
22918
|
+
const [session2, setSession] = (0, import_react19.useState)(props.session);
|
|
22991
22919
|
const { searchParams, removeParams, pathname, addParams, ...router } = useNavigation();
|
|
22992
22920
|
(0, import_react19.useEffect)(() => {
|
|
22993
22921
|
if (error) {
|
|
@@ -23061,7 +22989,7 @@ function AuthProvider({
|
|
|
23061
22989
|
};
|
|
23062
22990
|
function processSession(sessionData2) {
|
|
23063
22991
|
if (sessionData2) {
|
|
23064
|
-
setSession(sessionData2
|
|
22992
|
+
setSession(sessionData2);
|
|
23065
22993
|
if (sessionData2.migratedFromGuest) {
|
|
23066
22994
|
migratedFromGuestRef.current = sessionData2.migratedFromGuest;
|
|
23067
22995
|
}
|
|
@@ -23181,12 +23109,7 @@ function AuthProvider({
|
|
|
23181
23109
|
}
|
|
23182
23110
|
return sessionResult;
|
|
23183
23111
|
} catch (error2) {
|
|
23184
|
-
|
|
23185
|
-
if (cached) {
|
|
23186
|
-
console.log("\u{1F4E6} Using cached session (offline mode)");
|
|
23187
|
-
return cached;
|
|
23188
|
-
}
|
|
23189
|
-
throw error2;
|
|
23112
|
+
import_react_hot_toast.default.error("Something went wrong");
|
|
23190
23113
|
}
|
|
23191
23114
|
},
|
|
23192
23115
|
{
|
|
@@ -23464,18 +23387,12 @@ function AuthProvider({
|
|
|
23464
23387
|
token && (loadingApp?.id || app?.id) ? ["allApps", token] : null,
|
|
23465
23388
|
async () => {
|
|
23466
23389
|
if (!token) return null;
|
|
23467
|
-
const key = `allApps-${loadingApp?.id || app?.id}-${user?.id || guest?.id}`;
|
|
23468
23390
|
try {
|
|
23469
23391
|
const apps2 = await getApps({ token, appId: loadingApp?.id || app?.id });
|
|
23470
|
-
await cacheData(key, apps2);
|
|
23471
23392
|
return apps2;
|
|
23472
23393
|
} catch (error2) {
|
|
23473
|
-
|
|
23474
|
-
|
|
23475
|
-
console.log("\u{1F4E6} Using cached apps (offline mode)");
|
|
23476
|
-
return cached;
|
|
23477
|
-
}
|
|
23478
|
-
throw error2;
|
|
23394
|
+
console.log(`\u{1F680} ~ file: AuthProvider.tsx:1002 ~ error:`, error2);
|
|
23395
|
+
import_react_hot_toast.default.error("Something went wrong");
|
|
23479
23396
|
}
|
|
23480
23397
|
}
|
|
23481
23398
|
);
|
|
@@ -23833,7 +23750,6 @@ function AuthProvider({
|
|
|
23833
23750
|
const bloom = allApps.find((app2) => app2.slug === "bloom");
|
|
23834
23751
|
const zarathustra = allApps.find((app2) => app2.slug === "zarathustra");
|
|
23835
23752
|
const signOut = async () => {
|
|
23836
|
-
await clearCache();
|
|
23837
23753
|
setShouldFetchSession(false);
|
|
23838
23754
|
setUser(void 0);
|
|
23839
23755
|
setGuest(void 0);
|
|
@@ -24011,7 +23927,6 @@ var init_AuthProvider = __esm({
|
|
|
24011
23927
|
init_ThemeContext();
|
|
24012
23928
|
import_react_hot_toast = __toESM(require("react-hot-toast"));
|
|
24013
23929
|
init_lib();
|
|
24014
|
-
init_db();
|
|
24015
23930
|
init_i18n();
|
|
24016
23931
|
init_hooks();
|
|
24017
23932
|
init_locales();
|
|
@@ -24080,7 +23995,7 @@ function DataProvider({ children, ...rest }) {
|
|
|
24080
23995
|
const [instructions, setInstructions] = (0, import_react21.useState)([]);
|
|
24081
23996
|
const [affiliateStats, setAffiliateStats] = (0, import_react21.useState)(null);
|
|
24082
23997
|
const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react21.useState)(false);
|
|
24083
|
-
const VERSION4 = "1.5.
|
|
23998
|
+
const VERSION4 = "1.5.6";
|
|
24084
23999
|
const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
|
|
24085
24000
|
const {
|
|
24086
24001
|
API_URL: API_URL2,
|
|
@@ -26114,17 +26029,6 @@ function ChatProvider({
|
|
|
26114
26029
|
const [collaborationStatus, setCollaborationStatusInternal] = (0, import_react31.useState)(
|
|
26115
26030
|
searchParams.get("collaborationStatus") ?? void 0
|
|
26116
26031
|
);
|
|
26117
|
-
(0, import_react31.useEffect)(() => {
|
|
26118
|
-
const loadCachedThreads = async () => {
|
|
26119
|
-
if (!app?.id || !(user?.id || guest?.id)) return;
|
|
26120
|
-
const key = `threads-${app.id}-${user?.id || guest?.id}`;
|
|
26121
|
-
const cached = await getCachedData(key);
|
|
26122
|
-
if (cached) {
|
|
26123
|
-
console.log("\u26A1 Loading cached threads instantly");
|
|
26124
|
-
}
|
|
26125
|
-
};
|
|
26126
|
-
loadCachedThreads();
|
|
26127
|
-
}, [app?.id, user?.id, guest?.id]);
|
|
26128
26032
|
(0, import_react31.useEffect)(() => {
|
|
26129
26033
|
if (user && migratedFromGuestRef.current) {
|
|
26130
26034
|
migratedFromGuestRef.current = false;
|
|
@@ -26140,7 +26044,10 @@ function ChatProvider({
|
|
|
26140
26044
|
} = (0, import_swr3.default)(
|
|
26141
26045
|
shouldFetchThreads ? ["contextThreads", thread2?.id, app?.id, token] : null,
|
|
26142
26046
|
async () => {
|
|
26143
|
-
|
|
26047
|
+
console.log(
|
|
26048
|
+
`\u{1F680} ~ file: ChatProvider.tsx:251 ~ shouldFetchThreads:`,
|
|
26049
|
+
shouldFetchThreads
|
|
26050
|
+
);
|
|
26144
26051
|
try {
|
|
26145
26052
|
const threads2 = await actions.getThreads({
|
|
26146
26053
|
onError: (status2) => {
|
|
@@ -26157,15 +26064,10 @@ function ChatProvider({
|
|
|
26157
26064
|
(c) => user && c.user.id === user?.id
|
|
26158
26065
|
) || guest ? thread2?.id : void 0
|
|
26159
26066
|
});
|
|
26160
|
-
await cacheData(key, threads2, 1e3 * 60 * 30);
|
|
26161
26067
|
return threads2;
|
|
26162
26068
|
} catch (error2) {
|
|
26163
|
-
|
|
26164
|
-
|
|
26165
|
-
console.log("\u{1F4E6} Using cached threads (offline mode)");
|
|
26166
|
-
return cached;
|
|
26167
|
-
}
|
|
26168
|
-
throw error2;
|
|
26069
|
+
console.log(`\u{1F680} ~ file: ChatProvider.tsx:291 ~ error:`, error2);
|
|
26070
|
+
toast_default.error("Something went wrong");
|
|
26169
26071
|
}
|
|
26170
26072
|
},
|
|
26171
26073
|
{
|
|
@@ -26178,6 +26080,7 @@ function ChatProvider({
|
|
|
26178
26080
|
// revalidateOnFocus: true,
|
|
26179
26081
|
}
|
|
26180
26082
|
);
|
|
26083
|
+
console.log(`\u{1F680} ~ file: ChatProvider.tsx:246 ~ threadsData:`, threadsData);
|
|
26181
26084
|
const [isLoadingThreads, setIsLoadingThreads] = (0, import_react31.useState)(true);
|
|
26182
26085
|
(0, import_react31.useEffect)(() => {
|
|
26183
26086
|
if (threadsError || !isLoadingThreadsSwr) {
|
|
@@ -26188,6 +26091,8 @@ function ChatProvider({
|
|
|
26188
26091
|
threads: [],
|
|
26189
26092
|
totalCount: 0
|
|
26190
26093
|
});
|
|
26094
|
+
console.log(`\u{1F680} ~ file: ChatProvider.tsx:307 ~ threads:`, threads);
|
|
26095
|
+
console.log(`\u{1F680} ~ file: ChatProvider.tsx:321 ~ threadsData:`, threadsData);
|
|
26191
26096
|
const [activeCollaborationThreadsCount, setActiveCollaborationThreadsCount] = (0, import_react31.useState)(0);
|
|
26192
26097
|
(0, import_react31.useEffect)(() => {
|
|
26193
26098
|
if (threadsData && Array.isArray(threadsData.threads)) {
|
|
@@ -26841,7 +26746,6 @@ var init_ChatProvider = __esm({
|
|
|
26841
26746
|
init_DataProvider();
|
|
26842
26747
|
init_utils();
|
|
26843
26748
|
init_url();
|
|
26844
|
-
init_db();
|
|
26845
26749
|
init_platform();
|
|
26846
26750
|
init_AppProvider();
|
|
26847
26751
|
init_getHourlyLimit();
|
|
@@ -29656,7 +29560,8 @@ var init_Thread_styles = __esm({
|
|
|
29656
29560
|
headers: {
|
|
29657
29561
|
display: "flex",
|
|
29658
29562
|
flexDirection: "column",
|
|
29659
|
-
gap: 10
|
|
29563
|
+
gap: 10,
|
|
29564
|
+
marginBottom: 5
|
|
29660
29565
|
},
|
|
29661
29566
|
header: {
|
|
29662
29567
|
display: "flex",
|
|
@@ -39295,6 +39200,7 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
39295
39200
|
{
|
|
39296
39201
|
className: "link",
|
|
39297
39202
|
"data-testid": "image-generation-button",
|
|
39203
|
+
"data-enabled": isImageGenerationEnabled,
|
|
39298
39204
|
style: {
|
|
39299
39205
|
...utilities.link.style,
|
|
39300
39206
|
...styles4.imageGenerationButton.style
|
|
@@ -39302,11 +39208,7 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
39302
39208
|
title: isImageGenerationEnabled ? t5("Image Generation Enabled") : t5("Enable Image Generation"),
|
|
39303
39209
|
onClick: () => {
|
|
39304
39210
|
setIsImageGenerationEnabled(!isImageGenerationEnabled);
|
|
39305
|
-
|
|
39306
|
-
setSelectedAgent(void 0);
|
|
39307
|
-
} else {
|
|
39308
|
-
setSelectedAgent(sushiAgent);
|
|
39309
|
-
}
|
|
39211
|
+
setSelectedAgent(sushiAgent);
|
|
39310
39212
|
}
|
|
39311
39213
|
},
|
|
39312
39214
|
/* @__PURE__ */ React.createElement(
|
|
@@ -42285,6 +42187,39 @@ var init_Account = __esm({
|
|
|
42285
42187
|
}
|
|
42286
42188
|
});
|
|
42287
42189
|
|
|
42190
|
+
// lib/db.ts
|
|
42191
|
+
var import_idb, dbInstance, getDB, clearCache;
|
|
42192
|
+
var init_db = __esm({
|
|
42193
|
+
"lib/db.ts"() {
|
|
42194
|
+
"use strict";
|
|
42195
|
+
import_idb = require("idb");
|
|
42196
|
+
dbInstance = null;
|
|
42197
|
+
getDB = async () => {
|
|
42198
|
+
if (typeof indexedDB === "undefined") {
|
|
42199
|
+
return null;
|
|
42200
|
+
}
|
|
42201
|
+
if (dbInstance) return dbInstance;
|
|
42202
|
+
dbInstance = await (0, import_idb.openDB)("vex-cache", 1, {
|
|
42203
|
+
upgrade(db) {
|
|
42204
|
+
if (!db.objectStoreNames.contains("cache")) {
|
|
42205
|
+
db.createObjectStore("cache");
|
|
42206
|
+
}
|
|
42207
|
+
}
|
|
42208
|
+
});
|
|
42209
|
+
return dbInstance;
|
|
42210
|
+
};
|
|
42211
|
+
clearCache = async () => {
|
|
42212
|
+
try {
|
|
42213
|
+
const db = await getDB();
|
|
42214
|
+
if (!db) return;
|
|
42215
|
+
await db.clear("cache");
|
|
42216
|
+
} catch (error) {
|
|
42217
|
+
console.error("Failed to clear cache:", error);
|
|
42218
|
+
}
|
|
42219
|
+
};
|
|
42220
|
+
}
|
|
42221
|
+
});
|
|
42222
|
+
|
|
42288
42223
|
// SignIn.web.tsx
|
|
42289
42224
|
function SignIn({
|
|
42290
42225
|
className,
|
|
@@ -81370,6 +81305,66 @@ var init_Hey = __esm({
|
|
|
81370
81305
|
}
|
|
81371
81306
|
});
|
|
81372
81307
|
|
|
81308
|
+
// lib/swrCacheProvider.ts
|
|
81309
|
+
function createMemoryCacheProvider() {
|
|
81310
|
+
const cache = /* @__PURE__ */ new Map();
|
|
81311
|
+
return () => cache;
|
|
81312
|
+
}
|
|
81313
|
+
async function createIDBCacheProvider() {
|
|
81314
|
+
try {
|
|
81315
|
+
const { default: createCacheProvider, timestampStorageHandler } = await import("@piotr-cz/swr-idb-cache");
|
|
81316
|
+
const gcStorageHandler = {
|
|
81317
|
+
...timestampStorageHandler,
|
|
81318
|
+
revive: (key, storeObject) => {
|
|
81319
|
+
if (storeObject.ts > Date.now() - CACHE_TTL) {
|
|
81320
|
+
return timestampStorageHandler.revive(key, storeObject);
|
|
81321
|
+
}
|
|
81322
|
+
return void 0;
|
|
81323
|
+
}
|
|
81324
|
+
};
|
|
81325
|
+
const provider = await createCacheProvider({
|
|
81326
|
+
dbName: "vex-swr-cache",
|
|
81327
|
+
storeName: "cache",
|
|
81328
|
+
storageHandler: gcStorageHandler
|
|
81329
|
+
});
|
|
81330
|
+
console.log("\u2705 IndexedDB SWR cache initialized");
|
|
81331
|
+
return provider;
|
|
81332
|
+
} catch (error) {
|
|
81333
|
+
console.error("Failed to create IDB cache provider:", error);
|
|
81334
|
+
return (() => /* @__PURE__ */ new Map());
|
|
81335
|
+
}
|
|
81336
|
+
}
|
|
81337
|
+
async function getCacheProvider() {
|
|
81338
|
+
if (typeof indexedDB !== "undefined") {
|
|
81339
|
+
return await createIDBCacheProvider();
|
|
81340
|
+
}
|
|
81341
|
+
console.warn("[SWR Cache] IndexedDB not available, using in-memory cache");
|
|
81342
|
+
return createMemoryCacheProvider();
|
|
81343
|
+
}
|
|
81344
|
+
function useSWRCacheProvider() {
|
|
81345
|
+
const [provider, setProvider] = (0, import_react117.useState)(null);
|
|
81346
|
+
(0, import_react117.useEffect)(() => {
|
|
81347
|
+
let mounted = true;
|
|
81348
|
+
getCacheProvider().then((p) => {
|
|
81349
|
+
if (mounted) {
|
|
81350
|
+
setProvider(() => p);
|
|
81351
|
+
}
|
|
81352
|
+
});
|
|
81353
|
+
return () => {
|
|
81354
|
+
mounted = false;
|
|
81355
|
+
};
|
|
81356
|
+
}, []);
|
|
81357
|
+
return provider;
|
|
81358
|
+
}
|
|
81359
|
+
var import_react117, CACHE_TTL;
|
|
81360
|
+
var init_swrCacheProvider = __esm({
|
|
81361
|
+
"lib/swrCacheProvider.ts"() {
|
|
81362
|
+
"use strict";
|
|
81363
|
+
import_react117 = require("react");
|
|
81364
|
+
CACHE_TTL = 60 * 60 * 1e3;
|
|
81365
|
+
}
|
|
81366
|
+
});
|
|
81367
|
+
|
|
81373
81368
|
// context/providers/index.tsx
|
|
81374
81369
|
function AppProviders({
|
|
81375
81370
|
children,
|
|
@@ -81385,8 +81380,19 @@ function AppProviders({
|
|
|
81385
81380
|
translations,
|
|
81386
81381
|
useExtensionIcon
|
|
81387
81382
|
}) {
|
|
81388
|
-
const [error, setError] = (0,
|
|
81383
|
+
const [error, setError] = (0, import_react118.useState)("");
|
|
81384
|
+
const cacheProvider = useSWRCacheProvider();
|
|
81385
|
+
const [cacheReady, setCacheReady] = (0, import_react118.useState)(false);
|
|
81386
|
+
(0, import_react118.useEffect)(() => {
|
|
81387
|
+
if (cacheProvider && !cacheReady) {
|
|
81388
|
+
setCacheReady(true);
|
|
81389
|
+
}
|
|
81390
|
+
}, [cacheProvider, cacheReady]);
|
|
81389
81391
|
const swrConfig = {
|
|
81392
|
+
// Use persistent cache provider (IndexedDB on web, MMKV on native)
|
|
81393
|
+
...cacheProvider ? { provider: cacheProvider } : {},
|
|
81394
|
+
// Pre-populate cache with SSR session data
|
|
81395
|
+
fallback: session2 ? { session: { data: session2 } } : {},
|
|
81390
81396
|
onError: (error2) => {
|
|
81391
81397
|
if (error2?.status === 429) {
|
|
81392
81398
|
const lastShown = localStorage.getItem("last_rate_limit_toast");
|
|
@@ -81405,14 +81411,14 @@ function AppProviders({
|
|
|
81405
81411
|
setTimeout(() => revalidate({ retryCount }), 5e3);
|
|
81406
81412
|
}
|
|
81407
81413
|
};
|
|
81408
|
-
return /* @__PURE__ */
|
|
81414
|
+
return /* @__PURE__ */ import_react118.default.createElement(import_swr9.SWRConfig, { key: cacheReady ? "persistent" : "memory", value: swrConfig }, /* @__PURE__ */ import_react118.default.createElement(
|
|
81409
81415
|
PlatformProvider,
|
|
81410
81416
|
{
|
|
81411
81417
|
viewPortWidth,
|
|
81412
81418
|
viewPortHeight,
|
|
81413
81419
|
session: session2
|
|
81414
81420
|
},
|
|
81415
|
-
/* @__PURE__ */
|
|
81421
|
+
/* @__PURE__ */ import_react118.default.createElement(ErrorProvider, null, /* @__PURE__ */ import_react118.default.createElement(ThemeProvider, { session: session2 }, /* @__PURE__ */ import_react118.default.createElement(
|
|
81416
81422
|
AuthProvider,
|
|
81417
81423
|
{
|
|
81418
81424
|
translations,
|
|
@@ -81425,11 +81431,11 @@ function AppProviders({
|
|
|
81425
81431
|
signOutContext,
|
|
81426
81432
|
session: session2
|
|
81427
81433
|
},
|
|
81428
|
-
/* @__PURE__ */
|
|
81434
|
+
/* @__PURE__ */ import_react118.default.createElement(DataProvider, null, /* @__PURE__ */ import_react118.default.createElement(AppProvider, null, /* @__PURE__ */ import_react118.default.createElement(ChatProvider, null, /* @__PURE__ */ import_react118.default.createElement(TimerContextProvider, null, /* @__PURE__ */ import_react118.default.createElement(NavigationProvider, null, /* @__PURE__ */ import_react118.default.createElement(AppContextProvider, null, /* @__PURE__ */ import_react118.default.createElement(StylesProvider, null, /* @__PURE__ */ import_react118.default.createElement(Hey, { useExtensionIcon }, children))))))))
|
|
81429
81435
|
)))
|
|
81430
81436
|
));
|
|
81431
81437
|
}
|
|
81432
|
-
var
|
|
81438
|
+
var import_react118, import_swr9;
|
|
81433
81439
|
var init_providers = __esm({
|
|
81434
81440
|
"context/providers/index.tsx"() {
|
|
81435
81441
|
"use strict";
|
|
@@ -81441,7 +81447,7 @@ var init_providers = __esm({
|
|
|
81441
81447
|
init_DataProvider();
|
|
81442
81448
|
init_AppProvider();
|
|
81443
81449
|
init_platform();
|
|
81444
|
-
|
|
81450
|
+
import_react118 = __toESM(require("react"));
|
|
81445
81451
|
init_platform();
|
|
81446
81452
|
init_ThemeContext();
|
|
81447
81453
|
init_StylesContext();
|
|
@@ -81455,6 +81461,7 @@ var init_providers = __esm({
|
|
|
81455
81461
|
import_swr9 = require("swr");
|
|
81456
81462
|
init_TimerContext();
|
|
81457
81463
|
init_Hey();
|
|
81464
|
+
init_swrCacheProvider();
|
|
81458
81465
|
}
|
|
81459
81466
|
});
|
|
81460
81467
|
|
|
@@ -81586,7 +81593,7 @@ init_agentSchema();
|
|
|
81586
81593
|
init_appSchema();
|
|
81587
81594
|
|
|
81588
81595
|
// Sidebar.tsx
|
|
81589
|
-
var
|
|
81596
|
+
var import_react119 = __toESM(require("react"));
|
|
81590
81597
|
|
|
81591
81598
|
// Providers.tsx
|
|
81592
81599
|
init_i18n();
|
|
@@ -81604,24 +81611,24 @@ init_Hey();
|
|
|
81604
81611
|
function Sidebar({
|
|
81605
81612
|
useExtensionIcon
|
|
81606
81613
|
}) {
|
|
81607
|
-
return /* @__PURE__ */
|
|
81614
|
+
return /* @__PURE__ */ import_react119.default.createElement(Providers, null, /* @__PURE__ */ import_react119.default.createElement(Hey, { useExtensionIcon }));
|
|
81608
81615
|
}
|
|
81609
81616
|
|
|
81610
81617
|
// index.ts
|
|
81611
81618
|
init_Store();
|
|
81612
81619
|
|
|
81613
81620
|
// context/providers/HistoryRouterProvider.tsx
|
|
81614
|
-
var
|
|
81621
|
+
var import_react120 = require("react");
|
|
81615
81622
|
init_useWindowHistory();
|
|
81616
|
-
var HistoryRouterContext = (0,
|
|
81623
|
+
var HistoryRouterContext = (0, import_react120.createContext)(
|
|
81617
81624
|
null
|
|
81618
81625
|
);
|
|
81619
81626
|
function HistoryRouterProvider({
|
|
81620
81627
|
children
|
|
81621
81628
|
}) {
|
|
81622
|
-
const [state, setState] = (0,
|
|
81623
|
-
const [updateTrigger, setUpdateTrigger] = (0,
|
|
81624
|
-
(0,
|
|
81629
|
+
const [state, setState] = (0, import_react120.useState)(() => clientRouter.getState());
|
|
81630
|
+
const [updateTrigger, setUpdateTrigger] = (0, import_react120.useState)(0);
|
|
81631
|
+
(0, import_react120.useEffect)(() => {
|
|
81625
81632
|
const unsubscribe = clientRouter.subscribe(() => {
|
|
81626
81633
|
const newState = clientRouter.getState();
|
|
81627
81634
|
setState(newState);
|