@chrryai/chrry 1.3.3 → 1.3.5
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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
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.3.
|
|
21285
|
+
const VERSION3 = "1.3.5";
|
|
21286
21286
|
const [weather, setWeather] = useLocalStorage("weather", user?.weather || guest?.weather || void 0);
|
|
21287
21287
|
const {
|
|
21288
21288
|
API_URL: API_URL2,
|
|
@@ -21489,7 +21489,7 @@ function DataProvider({
|
|
|
21489
21489
|
});
|
|
21490
21490
|
}
|
|
21491
21491
|
}, [weatherData]);
|
|
21492
|
-
const
|
|
21492
|
+
const isE2E3 = process.env.NEXT_PUBLIC_TESTING_ENV === "e2e";
|
|
21493
21493
|
const [aiAgents, setAiAgents] = (0, import_react14.useState)(session2?.aiAgents || []);
|
|
21494
21494
|
const { data: aiAgentsData } = (0, import_swr2.default)(
|
|
21495
21495
|
token && siteConfig.mode !== "chrryDev" && aiAgents?.length > 0 ? null : ["aiAgents", token, app?.id],
|
|
@@ -21561,7 +21561,7 @@ function DataProvider({
|
|
|
21561
21561
|
PROD_FRONTEND_URL: PROD_FRONTEND_URL2,
|
|
21562
21562
|
MONTHLY_GUEST_CREDITS,
|
|
21563
21563
|
actions,
|
|
21564
|
-
isE2E:
|
|
21564
|
+
isE2E: isE2E3,
|
|
21565
21565
|
pageSizes: pageSizes3,
|
|
21566
21566
|
setNeedsUpdateModalOpen,
|
|
21567
21567
|
needsUpdateModalOpen,
|
|
@@ -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.3.
|
|
22370
|
+
VERSION = "1.3.5";
|
|
22371
22371
|
getSlugFromPathname = (path) => {
|
|
22372
22372
|
const siteConfig = getSiteConfig();
|
|
22373
22373
|
return getAppAndStoreSlugs(path, {
|
|
@@ -24302,8 +24302,8 @@ function ChatProvider({
|
|
|
24302
24302
|
setSelectedAgent(a);
|
|
24303
24303
|
}
|
|
24304
24304
|
}, [guest, user, app, aiAgents]);
|
|
24305
|
-
const { isDevelopment: isDevelopment3, isE2E:
|
|
24306
|
-
const hourlyLimit = isDevelopment3 && !
|
|
24305
|
+
const { isDevelopment: isDevelopment3, isE2E: isE2E3, actions } = useData();
|
|
24306
|
+
const hourlyLimit = isDevelopment3 && !isE2E3 ? 5e4 : getHourlyLimit({
|
|
24307
24307
|
member: user,
|
|
24308
24308
|
guest
|
|
24309
24309
|
});
|
|
@@ -25352,12 +25352,12 @@ var init_AppContext = __esm({
|
|
|
25352
25352
|
}) => {
|
|
25353
25353
|
const { t: i18nT } = (0, import_react_i18next4.useTranslation)();
|
|
25354
25354
|
const { user } = useAuth();
|
|
25355
|
-
const
|
|
25355
|
+
const isE2E3 = process.env.NEXT_PUBLIC_TESTING_ENV === "e2e";
|
|
25356
25356
|
const isCI2 = process.env.NEXT_PUBLIC_CI === "true";
|
|
25357
25357
|
const config = getSiteConfig();
|
|
25358
25358
|
const t6 = (key, values, autoAdd = true) => {
|
|
25359
25359
|
const result = i18nT(key, values);
|
|
25360
|
-
if (autoAdd && !isCI2 &&
|
|
25360
|
+
if (autoAdd && !isCI2 && isE2E3 && user?.role === "admin" && typeof window !== "undefined" && !checkedKeys.has(key)) {
|
|
25361
25361
|
checkedKeys.add(key);
|
|
25362
25362
|
if (result === key && !reportedMissingKeys.has(key)) {
|
|
25363
25363
|
reportedMissingKeys.add(key);
|
|
@@ -29961,7 +29961,7 @@ ${t6(`The more specific you are, the better AI can assist you!`)}`)
|
|
|
29961
29961
|
), !thread2 && showInstructions && /* @__PURE__ */ import_react45.default.createElement(
|
|
29962
29962
|
"div",
|
|
29963
29963
|
{
|
|
29964
|
-
"data-testid": `${dataTestId}-
|
|
29964
|
+
"data-testid": `${dataTestId}-list`,
|
|
29965
29965
|
ref: instructionsListRef,
|
|
29966
29966
|
className: (0, import_clsx11.default)(import_Instructions_module.default.instructions, "instructionsList")
|
|
29967
29967
|
},
|
|
@@ -29973,6 +29973,7 @@ ${t6(`The more specific you are, the better AI can assist you!`)}`)
|
|
|
29973
29973
|
"button",
|
|
29974
29974
|
{
|
|
29975
29975
|
key: instruction.id,
|
|
29976
|
+
"data-testid": `${dataTestId}-item`,
|
|
29976
29977
|
className: (0, import_clsx11.default)(
|
|
29977
29978
|
"link",
|
|
29978
29979
|
"instructionItem",
|
|
@@ -29995,7 +29996,7 @@ ${t6(`The more specific you are, the better AI can assist you!`)}`)
|
|
|
29995
29996
|
isManaging && /* @__PURE__ */ import_react45.default.createElement(import_react45.default.Fragment, null, getCurrentSuggestionStep(instruction) === "not_started" ? /* @__PURE__ */ import_react45.default.createElement(icons_exports.ArrowRight, { size: 14, color: "var(--accent-1)" }) : getCurrentSuggestionStep(instruction) === "in_progress" ? /* @__PURE__ */ import_react45.default.createElement(icons_exports.Circle, { size: 14, color: "var(--accent-1)" }) : getCurrentSuggestionStep(instruction) === "success" ? /* @__PURE__ */ import_react45.default.createElement(icons_exports.CircleCheck, { size: 14, color: "var(--accent-4)" }) : null)
|
|
29996
29997
|
);
|
|
29997
29998
|
})
|
|
29998
|
-
), !thread2 && !icon && showInstructions && /* @__PURE__ */ import_react45.default.createElement("div", { "data-testid": `${dataTestId}-
|
|
29999
|
+
), !thread2 && !icon && showInstructions && /* @__PURE__ */ import_react45.default.createElement("div", { "data-testid": `${dataTestId}-about`, className: import_Instructions_module.default.bottom }, /* @__PURE__ */ import_react45.default.createElement(
|
|
29999
30000
|
"a",
|
|
30000
30001
|
{
|
|
30001
30002
|
onClick: (e) => {
|
|
@@ -31261,7 +31262,7 @@ function App({
|
|
|
31261
31262
|
Instructions,
|
|
31262
31263
|
{
|
|
31263
31264
|
showButton: true,
|
|
31264
|
-
dataTestId: "instruction",
|
|
31265
|
+
dataTestId: "instruction-builder",
|
|
31265
31266
|
opacity: 0,
|
|
31266
31267
|
onSave: ({ content, artifacts }) => {
|
|
31267
31268
|
onSave?.({
|
|
@@ -31694,6 +31695,7 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
31694
31695
|
}
|
|
31695
31696
|
});
|
|
31696
31697
|
}
|
|
31698
|
+
inputRef.current = value;
|
|
31697
31699
|
setInputInternal(value);
|
|
31698
31700
|
};
|
|
31699
31701
|
(0, import_react51.useEffect)(() => {
|
|
@@ -32022,11 +32024,9 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
32022
32024
|
});
|
|
32023
32025
|
if (hasPlayed) {
|
|
32024
32026
|
setIsSpeechActive(true);
|
|
32025
|
-
return;
|
|
32026
32027
|
}
|
|
32027
32028
|
inConversationRef.current = true;
|
|
32028
32029
|
setIsLoading(true);
|
|
32029
|
-
const greeting = "Hello! How can I help you today? What's on your mind?";
|
|
32030
32030
|
try {
|
|
32031
32031
|
if (synthesis) synthesis.dispatchEvent(new Event("pause"));
|
|
32032
32032
|
if (audio) audio?.pause();
|
|
@@ -33227,7 +33227,7 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
33227
33227
|
disabled: getIsSendDisabled(),
|
|
33228
33228
|
onClick: () => handleSubmit(needsReviewRef.current)
|
|
33229
33229
|
},
|
|
33230
|
-
needsReviewRef.current ? /* @__PURE__ */ React.createElement(icons_exports.CircleCheck, { size: 30, color: "var(--accent-6)" }) : /* @__PURE__ */ React.createElement(
|
|
33230
|
+
needsReviewRef.current ? /* @__PURE__ */ React.createElement("span", { "data-testid": "chat-accept-button" }, /* @__PURE__ */ React.createElement(icons_exports.CircleCheck, { size: 30, color: "var(--accent-6)" })) : /* @__PURE__ */ React.createElement(
|
|
33231
33231
|
icons_exports.CircleArrowUp,
|
|
33232
33232
|
{
|
|
33233
33233
|
color: creditsLeft === 0 ? "var(--accent-0)" : getIsSendDisabled() ? "var(--shade-3)" : "var(--accent-6)",
|
|
@@ -33267,13 +33267,13 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
33267
33267
|
type: "button",
|
|
33268
33268
|
title: isListening ? t6("Stop listening") : t6("Start voice input")
|
|
33269
33269
|
},
|
|
33270
|
-
needsReview ? /* @__PURE__ */ React.createElement(icons_exports.CircleCheck, { size: 30, color: "var(--accent-6)" }) : /* @__PURE__ */ React.createElement(
|
|
33270
|
+
needsReview ? /* @__PURE__ */ React.createElement("span", { "data-testid": "chat-accept-button" }, /* @__PURE__ */ React.createElement(icons_exports.CircleCheck, { size: 30, color: "var(--accent-6)" })) : /* @__PURE__ */ React.createElement(
|
|
33271
33271
|
"div",
|
|
33272
33272
|
{
|
|
33273
33273
|
className: (0, import_clsx13.default)(import_Chat_module.default.videoContainer),
|
|
33274
33274
|
title: t6("Sound")
|
|
33275
33275
|
},
|
|
33276
|
-
needsReview ? /* @__PURE__ */ React.createElement(icons_exports.CircleCheck, { size: 30, color: "var(--accent-6)" }) : /* @__PURE__ */ React.createElement(
|
|
33276
|
+
needsReview ? /* @__PURE__ */ React.createElement("span", { "data-testid": "chat-accept-button" }, /* @__PURE__ */ React.createElement(icons_exports.CircleCheck, { size: 30, color: "var(--accent-6)" })) : /* @__PURE__ */ React.createElement(
|
|
33277
33277
|
"video",
|
|
33278
33278
|
{
|
|
33279
33279
|
onLoadedData: () => setIsVideoLoading(false),
|
|
@@ -36242,7 +36242,7 @@ function SignIn({
|
|
|
36242
36242
|
const { t: t6 } = useAppContext();
|
|
36243
36243
|
const {
|
|
36244
36244
|
FRONTEND_URL: FRONTEND_URL4,
|
|
36245
|
-
isE2E:
|
|
36245
|
+
isE2E: isE2E3,
|
|
36246
36246
|
isCI: isCI2,
|
|
36247
36247
|
API_URL: API_URL2,
|
|
36248
36248
|
TEST_GUEST_FINGERPRINTS,
|
|
@@ -36274,7 +36274,7 @@ function SignIn({
|
|
|
36274
36274
|
window.removeEventListener("keydown", handleKeyDown);
|
|
36275
36275
|
};
|
|
36276
36276
|
}, [part]);
|
|
36277
|
-
const E2E =
|
|
36277
|
+
const E2E = isE2E3 || fingerprint && (TEST_GUEST_FINGERPRINTS.includes(fingerprint) || TEST_MEMBER_FINGERPRINTS.includes(fingerprint));
|
|
36278
36278
|
const handleSignIn = async (part2) => {
|
|
36279
36279
|
if (E2E) {
|
|
36280
36280
|
part2 = "credentials";
|
|
@@ -36338,7 +36338,7 @@ function SignIn({
|
|
|
36338
36338
|
return;
|
|
36339
36339
|
} else {
|
|
36340
36340
|
const redirectUrl2 = signInResult?.url || successUrl.toString();
|
|
36341
|
-
if (
|
|
36341
|
+
if (isE2E3) {
|
|
36342
36342
|
setRedirectUrl(redirectUrl2);
|
|
36343
36343
|
!isCI2 && setTimeout(() => {
|
|
36344
36344
|
window.location.href = redirectUrl2;
|
|
@@ -39265,17 +39265,7 @@ function Message({
|
|
|
39265
39265
|
},
|
|
39266
39266
|
className: (0, import_clsx29.default)("link", import_Message_module.default.agentIcon, import_Message_module.default.tablet)
|
|
39267
39267
|
},
|
|
39268
|
-
agent && message.message.debateAgentId ? /* @__PURE__ */ React.createElement(React.Fragment, null, agent.name === "deepSeek" ? /* @__PURE__ */ React.createElement(import_icons33.DeepSeek, { size: 35 }) : agent.name === "chatGPT" ? /* @__PURE__ */ React.createElement(import_icons33.OpenAI, { size: 35 }) : agent.name === "claude" ? /* @__PURE__ */ React.createElement(import_icons33.Claude, { size: 35 }) : agent.name === "gemini" ? /* @__PURE__ */ React.createElement(import_icons33.Gemini, { size: 35 }) : agent.name === "flux" ? /* @__PURE__ */ React.createElement(import_icons33.Flux, { size: 35 }) : agent.name === "perplexity" ? /* @__PURE__ */ React.createElement(import_icons33.Perplexity, { size: 35 }) : null) :
|
|
39269
|
-
"video",
|
|
39270
|
-
{
|
|
39271
|
-
className: import_Message_module.default.video,
|
|
39272
|
-
src: `${FRONTEND_URL4}/video/blob.mp4`,
|
|
39273
|
-
autoPlay: true,
|
|
39274
|
-
loop: true,
|
|
39275
|
-
muted: true,
|
|
39276
|
-
playsInline: true
|
|
39277
|
-
}
|
|
39278
|
-
) : /* @__PURE__ */ React.createElement("span", { className: import_Message_module.default.appIcon }, /* @__PURE__ */ React.createElement(ImageComponent, { app, showLoading: false, size: 35 }), /* @__PURE__ */ React.createElement("span", null, app?.name || "Vex"))
|
|
39268
|
+
agent && message.message.debateAgentId ? /* @__PURE__ */ React.createElement(React.Fragment, null, agent.name === "deepSeek" ? /* @__PURE__ */ React.createElement(import_icons33.DeepSeek, { size: 35 }) : agent.name === "chatGPT" ? /* @__PURE__ */ React.createElement(import_icons33.OpenAI, { size: 35 }) : agent.name === "claude" ? /* @__PURE__ */ React.createElement(import_icons33.Claude, { size: 35 }) : agent.name === "gemini" ? /* @__PURE__ */ React.createElement(import_icons33.Gemini, { size: 35 }) : agent.name === "flux" ? /* @__PURE__ */ React.createElement(import_icons33.Flux, { size: 35 }) : agent.name === "perplexity" ? /* @__PURE__ */ React.createElement(import_icons33.Perplexity, { size: 35 }) : null) : /* @__PURE__ */ React.createElement("span", { className: import_Message_module.default.appIcon }, /* @__PURE__ */ React.createElement(ImageComponent, { app, showLoading: false, size: 35 }), /* @__PURE__ */ React.createElement("span", null, app?.name || "Vex"))
|
|
39279
39269
|
),
|
|
39280
39270
|
message.message.isStreaming && message.message.content.trim() === "" ? /* @__PURE__ */ React.createElement("div", { className: import_Message_module.default.thinking }, /* @__PURE__ */ React.createElement(
|
|
39281
39271
|
ImageComponent,
|