@chrryai/chrry 1.6.62 → 1.6.64
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 +21 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2446,7 +2446,6 @@ function generateAppMetadata({
|
|
|
2446
2446
|
translations,
|
|
2447
2447
|
...rest
|
|
2448
2448
|
}) {
|
|
2449
|
-
console.log(`\u{1F680} ~ appssss:`, app.name);
|
|
2450
2449
|
const title = app.name || app.title || "Chrry";
|
|
2451
2450
|
const description = app.description || `${title} - Blossom`;
|
|
2452
2451
|
const whiteLabel = rest.whiteLabel || app.store?.apps.find((app2) => app2.id === app2.store?.app?.id);
|
|
@@ -3130,7 +3129,7 @@ var init_utils = __esm({
|
|
|
3130
3129
|
};
|
|
3131
3130
|
isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes("Firefox");
|
|
3132
3131
|
config = getSiteConfig(getClientHostname());
|
|
3133
|
-
VERSION = config.version || "1.6.
|
|
3132
|
+
VERSION = config.version || "1.6.64";
|
|
3134
3133
|
getSlugFromPathname = (path) => {
|
|
3135
3134
|
return getAppAndStoreSlugs(path, {
|
|
3136
3135
|
defaultAppSlug: config.slug,
|
|
@@ -6307,7 +6306,7 @@ function ThemeProvider({
|
|
|
6307
6306
|
getInitialTheme()
|
|
6308
6307
|
);
|
|
6309
6308
|
const [isSmallDevice, setIsSmallDeviceInternal] = (0, import_react18.useState)(
|
|
6310
|
-
viewPortWidth ? viewPortWidth < 960 : device !== "desktop"
|
|
6309
|
+
viewPortWidth != void 0 ? viewPortWidth < 960 : device !== "desktop"
|
|
6311
6310
|
);
|
|
6312
6311
|
const setIsSmallDevice = (isSmallDevice2) => {
|
|
6313
6312
|
setIsSmallDeviceInternal(isSmallDevice2);
|
|
@@ -23893,8 +23892,6 @@ function AuthProvider({
|
|
|
23893
23892
|
const id = getThreadId(pathname);
|
|
23894
23893
|
if (id) {
|
|
23895
23894
|
setThreadId(id);
|
|
23896
|
-
} else {
|
|
23897
|
-
setThreadId(void 0);
|
|
23898
23895
|
}
|
|
23899
23896
|
}, [pathname]);
|
|
23900
23897
|
const [app, setAppInternal] = (0, import_react20.useState)(props.app || session2?.app || baseApp);
|
|
@@ -24661,7 +24658,7 @@ function DataProvider({ children, ...rest }) {
|
|
|
24661
24658
|
const [instructions, setInstructions] = (0, import_react21.useState)([]);
|
|
24662
24659
|
const [affiliateStats, setAffiliateStats] = (0, import_react21.useState)(null);
|
|
24663
24660
|
const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react21.useState)(false);
|
|
24664
|
-
const VERSION4 = "1.6.
|
|
24661
|
+
const VERSION4 = "1.6.64";
|
|
24665
24662
|
const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
|
|
24666
24663
|
const {
|
|
24667
24664
|
API_URL: API_URL2,
|
|
@@ -37378,6 +37375,7 @@ function Chat({
|
|
|
37378
37375
|
setShouldFocus,
|
|
37379
37376
|
shouldFocus,
|
|
37380
37377
|
isChatFloating: isChatFloatingContext,
|
|
37378
|
+
setThreadId: setThreadIdInternal,
|
|
37381
37379
|
messages
|
|
37382
37380
|
} = useChat();
|
|
37383
37381
|
const {
|
|
@@ -37392,7 +37390,7 @@ function Chat({
|
|
|
37392
37390
|
const { slug, suggestSaveApp, saveApp, apps, appStatus, appFormWatcher } = useApp();
|
|
37393
37391
|
const threadIdRef = (0, import_react55.useRef)(threadId);
|
|
37394
37392
|
(0, import_react55.useEffect)(() => {
|
|
37395
|
-
threadIdRef.current = threadId;
|
|
37393
|
+
threadId && (threadIdRef.current = threadId);
|
|
37396
37394
|
}, [threadId]);
|
|
37397
37395
|
const setThreadId = (id) => {
|
|
37398
37396
|
threadIdRef.current = id;
|
|
@@ -37598,6 +37596,7 @@ function Chat({
|
|
|
37598
37596
|
const setMessage = (message3) => {
|
|
37599
37597
|
setMessageInternal(message3);
|
|
37600
37598
|
setClientId(message3?.message?.clientId);
|
|
37599
|
+
message3?.message?.threadId && setThreadId(message3?.message?.threadId);
|
|
37601
37600
|
};
|
|
37602
37601
|
const isHydrated = useHasHydrated();
|
|
37603
37602
|
const [isAttaching, setIsAttachingInternal] = (0, import_react55.useState)(false);
|
|
@@ -38344,6 +38343,7 @@ function Chat({
|
|
|
38344
38343
|
}
|
|
38345
38344
|
});
|
|
38346
38345
|
setIsLoading(true);
|
|
38346
|
+
const sanitizedThreadId = threadIdRef.current && (0, import_uuid3.validate)(threadIdRef.current) ? threadIdRef.current : null;
|
|
38347
38347
|
try {
|
|
38348
38348
|
let postRequestBody;
|
|
38349
38349
|
let postRequestHeaders = {
|
|
@@ -38358,7 +38358,7 @@ function Chat({
|
|
|
38358
38358
|
formData.append("isIncognito", JSON.stringify(isIncognito));
|
|
38359
38359
|
selectedAgent && formData.append("agentId", selectedAgent?.id);
|
|
38360
38360
|
debateAgent && formData.append("debateAgentId", debateAgent?.id);
|
|
38361
|
-
|
|
38361
|
+
sanitizedThreadId && formData.append("threadId", sanitizedThreadId);
|
|
38362
38362
|
formData.append("attachmentType", "file");
|
|
38363
38363
|
formData.append("webSearchEnabled", JSON.stringify(isWebSearchEnabled));
|
|
38364
38364
|
formData.append(
|
|
@@ -38382,7 +38382,7 @@ function Chat({
|
|
|
38382
38382
|
isIncognito,
|
|
38383
38383
|
agentId: selectedAgent?.id,
|
|
38384
38384
|
debateAgentId: debateAgent?.id,
|
|
38385
|
-
threadId:
|
|
38385
|
+
threadId: sanitizedThreadId,
|
|
38386
38386
|
webSearchEnabled: isWebSearchEnabled && !isExtension2,
|
|
38387
38387
|
imageGenerationEnabled: isImageGenerationEnabled,
|
|
38388
38388
|
actionEnabled: isExtension2,
|
|
@@ -41413,10 +41413,11 @@ function Menu({
|
|
|
41413
41413
|
/* @__PURE__ */ import_react60.default.createElement(
|
|
41414
41414
|
Div,
|
|
41415
41415
|
{
|
|
41416
|
+
suppressHydrationWarning: true,
|
|
41416
41417
|
style: {
|
|
41417
41418
|
...styles4.menuItems.style,
|
|
41418
|
-
display: "flex"
|
|
41419
|
-
marginTop: viewPortHeight > 700 ? "1rem" :
|
|
41419
|
+
display: "flex"
|
|
41420
|
+
// marginTop: viewPortHeight > 700 ? "1rem" : undefined,
|
|
41420
41421
|
}
|
|
41421
41422
|
},
|
|
41422
41423
|
/* @__PURE__ */ import_react60.default.createElement(
|
|
@@ -43816,7 +43817,12 @@ function Subscribe({
|
|
|
43816
43817
|
try {
|
|
43817
43818
|
setIsAdding(true);
|
|
43818
43819
|
const result = await apiFetch(
|
|
43819
|
-
`${API_URL2}/users?search=${encodeURIComponent(search)}
|
|
43820
|
+
`${API_URL2}/users?search=${encodeURIComponent(search)}`,
|
|
43821
|
+
{
|
|
43822
|
+
headers: {
|
|
43823
|
+
Authorization: `Bearer ${token}`
|
|
43824
|
+
}
|
|
43825
|
+
}
|
|
43820
43826
|
);
|
|
43821
43827
|
if (!result.ok) {
|
|
43822
43828
|
setIsAdding(false);
|
|
@@ -44915,6 +44921,7 @@ function Skeleton({
|
|
|
44915
44921
|
const { isEmpty } = useChat();
|
|
44916
44922
|
const { pathname, setIsNewChat, hasNotification } = useNavigationContext();
|
|
44917
44923
|
const { isDrawerOpen, setIsDrawerOpen, isSmallDevice, isMobileDevice } = useTheme2();
|
|
44924
|
+
console.log(`\u{1F680} ~ isSmallDevice:`, isSmallDevice);
|
|
44918
44925
|
const { isStandalone: isStandalone2 } = usePlatform();
|
|
44919
44926
|
const { FRONTEND_URL: FRONTEND_URL2 } = useData();
|
|
44920
44927
|
const { app, isRemovingApp, isSavingApp } = useApp();
|
|
@@ -45061,7 +45068,6 @@ var init_Skeleton = __esm({
|
|
|
45061
45068
|
init_SignIn();
|
|
45062
45069
|
init_Subscribe();
|
|
45063
45070
|
init_icons();
|
|
45064
|
-
init_hooks();
|
|
45065
45071
|
init_LanguageSwitcher();
|
|
45066
45072
|
import_react70 = require("react");
|
|
45067
45073
|
init_Image();
|
|
@@ -45073,6 +45079,7 @@ var init_Skeleton = __esm({
|
|
|
45073
45079
|
init_A();
|
|
45074
45080
|
init_Version();
|
|
45075
45081
|
init_addToHomeScreen();
|
|
45082
|
+
init_hooks();
|
|
45076
45083
|
}
|
|
45077
45084
|
});
|
|
45078
45085
|
|
|
@@ -50485,7 +50492,7 @@ var init_Thread = __esm({
|
|
|
50485
50492
|
isIncognito,
|
|
50486
50493
|
goToCalendar
|
|
50487
50494
|
} = useNavigationContext();
|
|
50488
|
-
const { threadId,
|
|
50495
|
+
const { threadId, setShouldGetCredits } = useChat();
|
|
50489
50496
|
const setMessages = setMessagesInternal;
|
|
50490
50497
|
const { appStatus, appFormWatcher, suggestSaveApp } = useApp();
|
|
50491
50498
|
const { addHapticFeedback, isMobileDevice, isSmallDevice } = useTheme2();
|
|
@@ -51017,7 +51024,6 @@ var init_Thread = __esm({
|
|
|
51017
51024
|
const navigationOptions = {
|
|
51018
51025
|
state: { preservedThread: thread2 }
|
|
51019
51026
|
};
|
|
51020
|
-
setIsNewChat(false);
|
|
51021
51027
|
if (typeof window !== "undefined") {
|
|
51022
51028
|
window.history.pushState(
|
|
51023
51029
|
navigationOptions.state,
|