@chrryai/chrry 1.6.61 → 1.6.63
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/globals-DLVPYBPX.css +99 -0
- package/dist/index.d.mts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +70 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -22
- package/dist/index.mjs.map +1 -1
- package/dist/view-transitions-5EN24TUN.css +207 -0
- package/package.json +1 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/* Global utility classes - synced with utils.module.scss */
|
|
2
|
+
|
|
3
|
+
.link {
|
|
4
|
+
text-decoration: none;
|
|
5
|
+
color: var(--accent-6);
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
background-color: transparent;
|
|
8
|
+
box-shadow: none;
|
|
9
|
+
padding: 0;
|
|
10
|
+
margin: 0;
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 0.3125rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.link:hover {
|
|
17
|
+
text-decoration: none;
|
|
18
|
+
color: var(--accent-5);
|
|
19
|
+
background-color: transparent;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.link:active {
|
|
23
|
+
transform: translateY(0.075rem);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
button.small,
|
|
27
|
+
.button.small {
|
|
28
|
+
padding: 0.35rem 0.55rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
button.xSmall,
|
|
32
|
+
.button.xSmall {
|
|
33
|
+
padding: 0.25rem 0.45rem;
|
|
34
|
+
font-size: 0.75rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
a.link:hover {
|
|
38
|
+
color: var(--accent-5) !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
button.large,
|
|
42
|
+
.button.large {
|
|
43
|
+
padding: 0.5rem 1.25rem;
|
|
44
|
+
font-size: 1rem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
button.transparent,
|
|
48
|
+
.button.transparent {
|
|
49
|
+
background-color: var(--background);
|
|
50
|
+
color: var(--foreground);
|
|
51
|
+
border: 0.0625rem solid var(--shade-2);
|
|
52
|
+
box-shadow: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
button.transparent:hover,
|
|
56
|
+
.button.transparent:hover {
|
|
57
|
+
background-color: var(--shade-1);
|
|
58
|
+
color: var(--foreground);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
button.inverted,
|
|
62
|
+
.button.inverted {
|
|
63
|
+
background-color: var(--foreground);
|
|
64
|
+
color: var(--background);
|
|
65
|
+
border: 0.0625rem solid var(--shade-2);
|
|
66
|
+
box-shadow: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
button.inverted:hover,
|
|
70
|
+
.button.inverted:hover {
|
|
71
|
+
background-color: var(--shade-7);
|
|
72
|
+
color: var(--background);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.row {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: row;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: 0.3125rem;
|
|
80
|
+
flex-wrap: wrap;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.column {
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
gap: 0.3125rem;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.left {
|
|
90
|
+
margin-right: auto;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.right {
|
|
94
|
+
margin-left: auto;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.storeApp:hover {
|
|
98
|
+
outline: 2px solid var(--accent-1);
|
|
99
|
+
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1834,6 +1834,39 @@ declare function Sidebar({ useExtensionIcon, }: {
|
|
|
1834
1834
|
useExtensionIcon?: (slug?: string) => void;
|
|
1835
1835
|
}): React$1.ReactElement;
|
|
1836
1836
|
|
|
1837
|
+
declare function Chrry({ children, session, thread, viewPortWidth, viewPortHeight, onSetLanguage, signInContext, apiKey, signOutContext, locale, translations, useExtensionIcon, threads, app, }: {
|
|
1838
|
+
translations?: Record<string, any>;
|
|
1839
|
+
useExtensionIcon?: (slug?: string) => void;
|
|
1840
|
+
locale?: locale;
|
|
1841
|
+
thread?: {
|
|
1842
|
+
thread: thread;
|
|
1843
|
+
messages: paginatedMessages;
|
|
1844
|
+
};
|
|
1845
|
+
apiKey?: string;
|
|
1846
|
+
children?: React$1.ReactNode;
|
|
1847
|
+
session?: session;
|
|
1848
|
+
app?: appWithStore;
|
|
1849
|
+
viewPortWidth?: string;
|
|
1850
|
+
viewPortHeight?: string;
|
|
1851
|
+
threads?: {
|
|
1852
|
+
threads: thread[];
|
|
1853
|
+
totalCount: number;
|
|
1854
|
+
};
|
|
1855
|
+
onSetLanguage?: (pathWithoutLocale: string, language: locale) => void;
|
|
1856
|
+
signInContext?: (provider: "google" | "apple" | "credentials", options: {
|
|
1857
|
+
email?: string;
|
|
1858
|
+
password?: string;
|
|
1859
|
+
redirect?: boolean;
|
|
1860
|
+
callbackUrl: string;
|
|
1861
|
+
errorUrl?: string;
|
|
1862
|
+
blankTarget?: boolean;
|
|
1863
|
+
}) => Promise<any>;
|
|
1864
|
+
signOutContext?: (options: {
|
|
1865
|
+
callbackUrl: string;
|
|
1866
|
+
errorUrl?: string;
|
|
1867
|
+
}) => Promise<any>;
|
|
1868
|
+
}): React$1.JSX.Element;
|
|
1869
|
+
|
|
1837
1870
|
declare function Store({ compact, slug, ...rest }: {
|
|
1838
1871
|
compact?: boolean;
|
|
1839
1872
|
slug?: string;
|
|
@@ -1865,4 +1898,4 @@ interface HistoryRouterProviderProps {
|
|
|
1865
1898
|
*/
|
|
1866
1899
|
declare function HistoryRouterProvider({ children, }: HistoryRouterProviderProps): React.ReactElement;
|
|
1867
1900
|
|
|
1868
|
-
export { ADDITIONAL_CREDITS, API_URL, type AgentCapabilities, type AgentModel, type AiAgent, type AiAgentCapabilities, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, type CreateCustomAiAgent, FREE_DAYS, FRONTEND_URL, type FileValidationResult, GUEST_TASKS_COUNT, HistoryRouterProvider, MAX_FILE_LIMITS, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, MEMBER_TASKS_COUNT, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PLUS_TASKS_COUNT, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_SERVER_URL, WS_URL, addParam, aiAgentCapabilitiesSchema, aiAgentSchema, apiFetch, type appFormData, appSchema, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, createCustomAiAgentSchema, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, formatFileSize, generateAppMetadata, generateStoreMetadata, generateThreadMetadata, getActions, getApp, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getExampleInstructions, getExtensionUrl, getExtensionUrls, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMaxFileSize, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreadId, getThreads, getTranslations, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isProduction, isSameDay, isTestingDevice, isTextFile, isValidUsername, isValidUuidV4, pageSizes, removeParam, removeUser, reorderApps, replaceLinks, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useAppMetadata, useComputedValue, useCookieOrLocalStorage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall, useStoreMetadata, useSyncedState, useThreadMetadata, utcToday, validateFile };
|
|
1901
|
+
export { ADDITIONAL_CREDITS, API_URL, type AgentCapabilities, type AgentModel, type AiAgent, type AiAgentCapabilities, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, Chrry, type CreateCustomAiAgent, FREE_DAYS, FRONTEND_URL, type FileValidationResult, GUEST_TASKS_COUNT, HistoryRouterProvider, MAX_FILE_LIMITS, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, MEMBER_TASKS_COUNT, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PLUS_TASKS_COUNT, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_SERVER_URL, WS_URL, addParam, aiAgentCapabilitiesSchema, aiAgentSchema, apiFetch, type appFormData, appSchema, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, createCustomAiAgentSchema, Chrry as default, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, formatFileSize, generateAppMetadata, generateStoreMetadata, generateThreadMetadata, getActions, getApp, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getExampleInstructions, getExtensionUrl, getExtensionUrls, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMaxFileSize, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreadId, getThreads, getTranslations, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isProduction, isSameDay, isTestingDevice, isTextFile, isValidUsername, isValidUuidV4, pageSizes, removeParam, removeUser, reorderApps, replaceLinks, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useAppMetadata, useComputedValue, useCookieOrLocalStorage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall, useStoreMetadata, useSyncedState, useThreadMetadata, utcToday, validateFile };
|
package/dist/index.d.ts
CHANGED
|
@@ -1834,6 +1834,39 @@ declare function Sidebar({ useExtensionIcon, }: {
|
|
|
1834
1834
|
useExtensionIcon?: (slug?: string) => void;
|
|
1835
1835
|
}): React$1.ReactElement;
|
|
1836
1836
|
|
|
1837
|
+
declare function Chrry({ children, session, thread, viewPortWidth, viewPortHeight, onSetLanguage, signInContext, apiKey, signOutContext, locale, translations, useExtensionIcon, threads, app, }: {
|
|
1838
|
+
translations?: Record<string, any>;
|
|
1839
|
+
useExtensionIcon?: (slug?: string) => void;
|
|
1840
|
+
locale?: locale;
|
|
1841
|
+
thread?: {
|
|
1842
|
+
thread: thread;
|
|
1843
|
+
messages: paginatedMessages;
|
|
1844
|
+
};
|
|
1845
|
+
apiKey?: string;
|
|
1846
|
+
children?: React$1.ReactNode;
|
|
1847
|
+
session?: session;
|
|
1848
|
+
app?: appWithStore;
|
|
1849
|
+
viewPortWidth?: string;
|
|
1850
|
+
viewPortHeight?: string;
|
|
1851
|
+
threads?: {
|
|
1852
|
+
threads: thread[];
|
|
1853
|
+
totalCount: number;
|
|
1854
|
+
};
|
|
1855
|
+
onSetLanguage?: (pathWithoutLocale: string, language: locale) => void;
|
|
1856
|
+
signInContext?: (provider: "google" | "apple" | "credentials", options: {
|
|
1857
|
+
email?: string;
|
|
1858
|
+
password?: string;
|
|
1859
|
+
redirect?: boolean;
|
|
1860
|
+
callbackUrl: string;
|
|
1861
|
+
errorUrl?: string;
|
|
1862
|
+
blankTarget?: boolean;
|
|
1863
|
+
}) => Promise<any>;
|
|
1864
|
+
signOutContext?: (options: {
|
|
1865
|
+
callbackUrl: string;
|
|
1866
|
+
errorUrl?: string;
|
|
1867
|
+
}) => Promise<any>;
|
|
1868
|
+
}): React$1.JSX.Element;
|
|
1869
|
+
|
|
1837
1870
|
declare function Store({ compact, slug, ...rest }: {
|
|
1838
1871
|
compact?: boolean;
|
|
1839
1872
|
slug?: string;
|
|
@@ -1865,4 +1898,4 @@ interface HistoryRouterProviderProps {
|
|
|
1865
1898
|
*/
|
|
1866
1899
|
declare function HistoryRouterProvider({ children, }: HistoryRouterProviderProps): React.ReactElement;
|
|
1867
1900
|
|
|
1868
|
-
export { ADDITIONAL_CREDITS, API_URL, type AgentCapabilities, type AgentModel, type AiAgent, type AiAgentCapabilities, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, type CreateCustomAiAgent, FREE_DAYS, FRONTEND_URL, type FileValidationResult, GUEST_TASKS_COUNT, HistoryRouterProvider, MAX_FILE_LIMITS, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, MEMBER_TASKS_COUNT, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PLUS_TASKS_COUNT, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_SERVER_URL, WS_URL, addParam, aiAgentCapabilitiesSchema, aiAgentSchema, apiFetch, type appFormData, appSchema, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, createCustomAiAgentSchema, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, formatFileSize, generateAppMetadata, generateStoreMetadata, generateThreadMetadata, getActions, getApp, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getExampleInstructions, getExtensionUrl, getExtensionUrls, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMaxFileSize, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreadId, getThreads, getTranslations, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isProduction, isSameDay, isTestingDevice, isTextFile, isValidUsername, isValidUuidV4, pageSizes, removeParam, removeUser, reorderApps, replaceLinks, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useAppMetadata, useComputedValue, useCookieOrLocalStorage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall, useStoreMetadata, useSyncedState, useThreadMetadata, utcToday, validateFile };
|
|
1901
|
+
export { ADDITIONAL_CREDITS, API_URL, type AgentCapabilities, type AgentModel, type AiAgent, type AiAgentCapabilities, type ApiActions, BrowserInstance, CHRRY_URL, CREDITS_PRICE, type CalendarEventFormData, Chrry, type CreateCustomAiAgent, FREE_DAYS, FRONTEND_URL, type FileValidationResult, GUEST_TASKS_COUNT, HistoryRouterProvider, MAX_FILE_LIMITS, MAX_FILE_SIZES, MAX_TOOL_CALLS_PER_MESSAGE, MEMBER_TASKS_COUNT, OWNER_CREDITS, PDF_LIMITS, PLUS_PRICE, PLUS_TASKS_COUNT, PROD_FRONTEND_URL, PROMPT_LIMITS, PRO_PRICE, Sidebar, Store, VERSION, WS_SERVER_URL, WS_URL, addParam, aiAgentCapabilitiesSchema, aiAgentSchema, apiFetch, type appFormData, appSchema, budgetCategory, capitalizeFirstLetter, checkIsExtension, checkThreadSummaryLimit, createApp, createCalendarEvent, createCustomAiAgentSchema, Chrry as default, deleteApp, deleteCalendarEvent, deleteMemories, deleteMessage, deleteSubscription, exampleInstructions, expenseCategory, type expenseCategoryType, exportToGoogleCalendar, extensionSuggestions, formatFileSize, generateAppMetadata, generateStoreMetadata, generateThreadMetadata, getActions, getApp, getApps, getBrowserAPI, getBrowserIdentity, getCalendarEvents, getDailyImageLimit, getExampleInstructions, getExtensionUrl, getExtensionUrls, getFlag, getGuest, getHourlyLimit, getImageSrc, getInstructionConfig, getLastMessage, getMaxFileSize, getMetadata, getRedirectURL, getSession, getSlugFromPathname, getThread, getThreadId, getThreads, getTranslations, getUser, getUsers, getWeatherCacheTime, type instructionBase, isCI, isCollaborator, isDeepEqual, isDevelopment, isE2E, isFirefox, isOwner, isProduction, isSameDay, isTestingDevice, isTextFile, isValidUsername, isValidUuidV4, pageSizes, removeParam, removeUser, reorderApps, replaceLinks, storage, syncGoogleCalendar, updateApp, updateCalendarEvent, updateCollaboration, updateGuest, updateMessage, updateThread, updateUser, uploadUserImage, useAppMetadata, useComputedValue, useCookieOrLocalStorage, useCountdown, useDeviceInfo, useHasHydrated, useLocalStorage, usePWAInstall, useStoreMetadata, useSyncedState, useThreadMetadata, utcToday, validateFile };
|
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.63";
|
|
3134
3133
|
getSlugFromPathname = (path) => {
|
|
3135
3134
|
return getAppAndStoreSlugs(path, {
|
|
3136
3135
|
defaultAppSlug: config.slug,
|
|
@@ -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.63";
|
|
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,
|
|
@@ -43816,7 +43816,12 @@ function Subscribe({
|
|
|
43816
43816
|
try {
|
|
43817
43817
|
setIsAdding(true);
|
|
43818
43818
|
const result = await apiFetch(
|
|
43819
|
-
`${API_URL2}/users?search=${encodeURIComponent(search)}
|
|
43819
|
+
`${API_URL2}/users?search=${encodeURIComponent(search)}`,
|
|
43820
|
+
{
|
|
43821
|
+
headers: {
|
|
43822
|
+
Authorization: `Bearer ${token}`
|
|
43823
|
+
}
|
|
43824
|
+
}
|
|
43820
43825
|
);
|
|
43821
43826
|
if (!result.ok) {
|
|
43822
43827
|
setIsAdding(false);
|
|
@@ -50485,7 +50490,7 @@ var init_Thread = __esm({
|
|
|
50485
50490
|
isIncognito,
|
|
50486
50491
|
goToCalendar
|
|
50487
50492
|
} = useNavigationContext();
|
|
50488
|
-
const { threadId,
|
|
50493
|
+
const { threadId, setShouldGetCredits } = useChat();
|
|
50489
50494
|
const setMessages = setMessagesInternal;
|
|
50490
50495
|
const { appStatus, appFormWatcher, suggestSaveApp } = useApp();
|
|
50491
50496
|
const { addHapticFeedback, isMobileDevice, isSmallDevice } = useTheme2();
|
|
@@ -51017,7 +51022,6 @@ var init_Thread = __esm({
|
|
|
51017
51022
|
const navigationOptions = {
|
|
51018
51023
|
state: { preservedThread: thread2 }
|
|
51019
51024
|
};
|
|
51020
|
-
setIsNewChat(false);
|
|
51021
51025
|
if (typeof window !== "undefined") {
|
|
51022
51026
|
window.history.pushState(
|
|
51023
51027
|
navigationOptions.state,
|
|
@@ -63649,24 +63653,18 @@ function About2() {
|
|
|
63649
63653
|
},
|
|
63650
63654
|
t5("why_vex")
|
|
63651
63655
|
), config2.mode === "vex" && /* @__PURE__ */ import_react94.default.createElement(import_react94.default.Fragment, null, ", ", /* @__PURE__ */ import_react94.default.createElement(
|
|
63652
|
-
|
|
63656
|
+
Anchor,
|
|
63653
63657
|
{
|
|
63658
|
+
openInNewTab: true,
|
|
63659
|
+
href: `${FRONTEND_URL2}/blog`,
|
|
63654
63660
|
onClick: (e) => {
|
|
63655
63661
|
addHapticFeedback();
|
|
63656
63662
|
if (e.metaKey || e.ctrlKey) {
|
|
63657
63663
|
return;
|
|
63658
63664
|
}
|
|
63659
63665
|
e.preventDefault();
|
|
63660
|
-
|
|
63661
|
-
|
|
63662
|
-
action: "openInSameTab",
|
|
63663
|
-
url: `${FRONTEND_URL2}/blog`
|
|
63664
|
-
});
|
|
63665
|
-
return;
|
|
63666
|
-
}
|
|
63667
|
-
router.push("/blog");
|
|
63668
|
-
},
|
|
63669
|
-
href: isStandalone2 ? void 0 : `${FRONTEND_URL2}/blog`
|
|
63666
|
+
window.location.href = `${FRONTEND_URL2}/blog`;
|
|
63667
|
+
}
|
|
63670
63668
|
},
|
|
63671
63669
|
t5("Blog")
|
|
63672
63670
|
)), ", ", /* @__PURE__ */ import_react94.default.createElement(
|
|
@@ -66582,6 +66580,7 @@ __export(index_exports, {
|
|
|
66582
66580
|
BrowserInstance: () => BrowserInstance,
|
|
66583
66581
|
CHRRY_URL: () => CHRRY_URL,
|
|
66584
66582
|
CREDITS_PRICE: () => CREDITS_PRICE,
|
|
66583
|
+
Chrry: () => Chrry,
|
|
66585
66584
|
FREE_DAYS: () => FREE_DAYS,
|
|
66586
66585
|
FRONTEND_URL: () => FRONTEND_URL,
|
|
66587
66586
|
GUEST_TASKS_COUNT: () => GUEST_TASKS_COUNT,
|
|
@@ -66614,6 +66613,7 @@ __export(index_exports, {
|
|
|
66614
66613
|
createApp: () => createApp,
|
|
66615
66614
|
createCalendarEvent: () => createCalendarEvent,
|
|
66616
66615
|
createCustomAiAgentSchema: () => createCustomAiAgentSchema,
|
|
66616
|
+
default: () => Chrry,
|
|
66617
66617
|
deleteApp: () => deleteApp,
|
|
66618
66618
|
deleteCalendarEvent: () => deleteCalendarEvent,
|
|
66619
66619
|
deleteMemories: () => deleteMemories,
|
|
@@ -66728,21 +66728,63 @@ function Sidebar({
|
|
|
66728
66728
|
return /* @__PURE__ */ import_react106.default.createElement(Providers, null, /* @__PURE__ */ import_react106.default.createElement(Hey, { useExtensionIcon }));
|
|
66729
66729
|
}
|
|
66730
66730
|
|
|
66731
|
+
// Chrry.tsx
|
|
66732
|
+
var import_globals = require("./globals-DLVPYBPX.css");
|
|
66733
|
+
var import_view_transitions = require("./view-transitions-5EN24TUN.css");
|
|
66734
|
+
var import_react107 = __toESM(require("react"));
|
|
66735
|
+
init_providers();
|
|
66736
|
+
function Chrry({
|
|
66737
|
+
children,
|
|
66738
|
+
session: session2,
|
|
66739
|
+
thread: thread2,
|
|
66740
|
+
viewPortWidth,
|
|
66741
|
+
viewPortHeight,
|
|
66742
|
+
onSetLanguage,
|
|
66743
|
+
signInContext,
|
|
66744
|
+
apiKey,
|
|
66745
|
+
signOutContext,
|
|
66746
|
+
locale: locale5,
|
|
66747
|
+
translations,
|
|
66748
|
+
useExtensionIcon,
|
|
66749
|
+
threads,
|
|
66750
|
+
app
|
|
66751
|
+
}) {
|
|
66752
|
+
return /* @__PURE__ */ import_react107.default.createElement(
|
|
66753
|
+
AppProviders,
|
|
66754
|
+
{
|
|
66755
|
+
useExtensionIcon,
|
|
66756
|
+
locale: locale5,
|
|
66757
|
+
session: session2,
|
|
66758
|
+
app,
|
|
66759
|
+
viewPortWidth,
|
|
66760
|
+
viewPortHeight,
|
|
66761
|
+
onSetLanguage,
|
|
66762
|
+
signInContext,
|
|
66763
|
+
apiKey,
|
|
66764
|
+
signOutContext,
|
|
66765
|
+
thread: thread2,
|
|
66766
|
+
translations,
|
|
66767
|
+
threads
|
|
66768
|
+
},
|
|
66769
|
+
children
|
|
66770
|
+
);
|
|
66771
|
+
}
|
|
66772
|
+
|
|
66731
66773
|
// index.ts
|
|
66732
66774
|
init_Store();
|
|
66733
66775
|
|
|
66734
66776
|
// context/providers/HistoryRouterProvider.tsx
|
|
66735
|
-
var
|
|
66777
|
+
var import_react108 = require("react");
|
|
66736
66778
|
init_useWindowHistory();
|
|
66737
|
-
var HistoryRouterContext = (0,
|
|
66779
|
+
var HistoryRouterContext = (0, import_react108.createContext)(
|
|
66738
66780
|
null
|
|
66739
66781
|
);
|
|
66740
66782
|
function HistoryRouterProvider({
|
|
66741
66783
|
children
|
|
66742
66784
|
}) {
|
|
66743
|
-
const [state, setState] = (0,
|
|
66744
|
-
const [updateTrigger, setUpdateTrigger] = (0,
|
|
66745
|
-
(0,
|
|
66785
|
+
const [state, setState] = (0, import_react108.useState)(() => clientRouter.getState());
|
|
66786
|
+
const [updateTrigger, setUpdateTrigger] = (0, import_react108.useState)(0);
|
|
66787
|
+
(0, import_react108.useEffect)(() => {
|
|
66746
66788
|
const unsubscribe = clientRouter.subscribe(() => {
|
|
66747
66789
|
const newState = clientRouter.getState();
|
|
66748
66790
|
setState(newState);
|
|
@@ -66775,6 +66817,7 @@ function HistoryRouterProvider({
|
|
|
66775
66817
|
BrowserInstance,
|
|
66776
66818
|
CHRRY_URL,
|
|
66777
66819
|
CREDITS_PRICE,
|
|
66820
|
+
Chrry,
|
|
66778
66821
|
FREE_DAYS,
|
|
66779
66822
|
FRONTEND_URL,
|
|
66780
66823
|
GUEST_TASKS_COUNT,
|