@chrryai/chrry 1.2.22 → 1.2.23
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/README.md +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
|
|
9
|
-
> Extracted from [Vex](https://
|
|
9
|
+
> Extracted from [Vex](https://vex.chrry.ai) - A production AI platform with 6,813+ commits in 2025
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1371,7 +1371,7 @@ declare const isFirefox: boolean;
|
|
|
1371
1371
|
declare function getFlag({ code }: {
|
|
1372
1372
|
code?: string;
|
|
1373
1373
|
}): string;
|
|
1374
|
-
declare const VERSION = "1.2.
|
|
1374
|
+
declare const VERSION = "1.2.23";
|
|
1375
1375
|
type instructionBase = {
|
|
1376
1376
|
id: string;
|
|
1377
1377
|
title: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1371,7 +1371,7 @@ declare const isFirefox: boolean;
|
|
|
1371
1371
|
declare function getFlag({ code }: {
|
|
1372
1372
|
code?: string;
|
|
1373
1373
|
}): string;
|
|
1374
|
-
declare const VERSION = "1.2.
|
|
1374
|
+
declare const VERSION = "1.2.23";
|
|
1375
1375
|
type instructionBase = {
|
|
1376
1376
|
id: string;
|
|
1377
1377
|
title: string;
|
package/dist/index.js
CHANGED
|
@@ -16920,8 +16920,8 @@ function AuthProvider({
|
|
|
16920
16920
|
);
|
|
16921
16921
|
const chrry = allApps?.find((app2) => !app2.store?.parentStoreId);
|
|
16922
16922
|
const getAlterNativeDomains = (store2) => {
|
|
16923
|
-
if (store2?.domain === "https://
|
|
16924
|
-
return ["https://vex.chrry.ai", "https://
|
|
16923
|
+
if (store2?.domain === "https://vex.chrry.ai" || store2?.domain === "https://vex.chrry.ai") {
|
|
16924
|
+
return ["https://vex.chrry.ai", "https://vex.chrry.ai"];
|
|
16925
16925
|
}
|
|
16926
16926
|
return store2.domain ? [store2.domain] : [];
|
|
16927
16927
|
};
|
|
@@ -17328,7 +17328,7 @@ function DataProvider({
|
|
|
17328
17328
|
const [instructions, setInstructions] = (0, import_react14.useState)([]);
|
|
17329
17329
|
const [affiliateStats, setAffiliateStats] = (0, import_react14.useState)(null);
|
|
17330
17330
|
const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react14.useState)(false);
|
|
17331
|
-
const VERSION3 = "1.2.
|
|
17331
|
+
const VERSION3 = "1.2.23";
|
|
17332
17332
|
const [weather, setWeather] = useLocalStorage("weather", user?.weather || guest?.weather || void 0);
|
|
17333
17333
|
const {
|
|
17334
17334
|
API_URL: API_URL2,
|
|
@@ -18303,7 +18303,7 @@ var init_utils = __esm({
|
|
|
18303
18303
|
window.history.replaceState({}, "", newUrl);
|
|
18304
18304
|
};
|
|
18305
18305
|
isFirefox = typeof navigator !== "undefined" && navigator?.userAgent.includes("Firefox");
|
|
18306
|
-
VERSION = "1.2.
|
|
18306
|
+
VERSION = "1.2.23";
|
|
18307
18307
|
getSlugFromPathname = (path) => {
|
|
18308
18308
|
const siteConfig = getSiteConfig();
|
|
18309
18309
|
console.log(
|
|
@@ -19269,6 +19269,13 @@ function ChatProvider({
|
|
|
19269
19269
|
const [isEmpty, setIsEmpty] = (0, import_react22.useState)(true);
|
|
19270
19270
|
const [thread2, setThread] = (0, import_react22.useState)(void 0);
|
|
19271
19271
|
const [messages, setMessages] = (0, import_react22.useState)([]);
|
|
19272
|
+
(0, import_react22.useEffect)(() => {
|
|
19273
|
+
if (messages.length > 0) {
|
|
19274
|
+
setIsEmpty(false);
|
|
19275
|
+
} else {
|
|
19276
|
+
setIsEmpty(true);
|
|
19277
|
+
}
|
|
19278
|
+
}, [messages]);
|
|
19272
19279
|
const { pathname, addParams } = useNavigation();
|
|
19273
19280
|
const [threadId, setThreadId] = (0, import_react22.useState)(getThreadId(pathname));
|
|
19274
19281
|
(0, import_react22.useEffect)(() => {
|
|
@@ -26716,6 +26723,7 @@ function Chat({
|
|
|
26716
26723
|
threadIdRef.current = threadId;
|
|
26717
26724
|
}, [threadId]);
|
|
26718
26725
|
const setThreadId = (id) => {
|
|
26726
|
+
setThreadIdContext(id);
|
|
26719
26727
|
threadIdRef.current = id;
|
|
26720
26728
|
};
|
|
26721
26729
|
const { captureException } = useError();
|
|
@@ -26792,6 +26800,14 @@ function Chat({
|
|
|
26792
26800
|
const shouldUseCompactMode = compactMode || hasBottomOffset;
|
|
26793
26801
|
const isChatFloating = !empty && (!showChatInput || shouldUseCompactMode);
|
|
26794
26802
|
(0, import_react50.useEffect)(() => {
|
|
26803
|
+
if (process.env.NODE_ENV !== "production") {
|
|
26804
|
+
console.log(" Chat floating state", {
|
|
26805
|
+
isChatFloating,
|
|
26806
|
+
empty,
|
|
26807
|
+
showChatInput,
|
|
26808
|
+
shouldUseCompactMode
|
|
26809
|
+
});
|
|
26810
|
+
}
|
|
26795
26811
|
setIsChatFloating(isChatFloating);
|
|
26796
26812
|
}, [isChatFloating]);
|
|
26797
26813
|
const fluxAgent = aiAgents?.find((agent) => agent.name === "flux");
|
|
@@ -28404,6 +28420,7 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
28404
28420
|
const isImageGenerationEnabled = selectedAgent?.name == "flux";
|
|
28405
28421
|
const needSearch = needsWebSearch(inputRef.current);
|
|
28406
28422
|
(0, import_react50.useEffect)(() => {
|
|
28423
|
+
console.log(`\u{1F680} ~ file: Chat.tsx:2697 ~ empty:`, empty);
|
|
28407
28424
|
if (empty) return;
|
|
28408
28425
|
const checkBottomOffset = () => {
|
|
28409
28426
|
const scrollPosition = window.scrollY;
|
|
@@ -28411,9 +28428,14 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
28411
28428
|
const viewportHeight = window.innerHeight;
|
|
28412
28429
|
const distanceFromBottom = documentHeight - (scrollPosition + viewportHeight);
|
|
28413
28430
|
setHasBottomOffset(distanceFromBottom > 100);
|
|
28431
|
+
console.log(
|
|
28432
|
+
`\u{1F680} ~ file: Chat.tsx:2707 ~ distanceFromBottom:`,
|
|
28433
|
+
distanceFromBottom
|
|
28434
|
+
);
|
|
28414
28435
|
};
|
|
28415
28436
|
const handleScroll = () => {
|
|
28416
28437
|
const scrollPosition = window.scrollY;
|
|
28438
|
+
console.log(`\u{1F680} ~ file: Chat.tsx:2711 ~ scrollPosition:`, scrollPosition);
|
|
28417
28439
|
const documentHeight = document.documentElement.scrollHeight;
|
|
28418
28440
|
const currentWindowHeight = window.innerHeight;
|
|
28419
28441
|
const distanceFromBottom = documentHeight - (scrollPosition + currentWindowHeight);
|