@chrryai/chrry 1.3.4 → 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 +19 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -17
- 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)(() => {
|
|
@@ -33225,7 +33227,7 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
33225
33227
|
disabled: getIsSendDisabled(),
|
|
33226
33228
|
onClick: () => handleSubmit(needsReviewRef.current)
|
|
33227
33229
|
},
|
|
33228
|
-
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(
|
|
33229
33231
|
icons_exports.CircleArrowUp,
|
|
33230
33232
|
{
|
|
33231
33233
|
color: creditsLeft === 0 ? "var(--accent-0)" : getIsSendDisabled() ? "var(--shade-3)" : "var(--accent-6)",
|
|
@@ -33265,13 +33267,13 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
33265
33267
|
type: "button",
|
|
33266
33268
|
title: isListening ? t6("Stop listening") : t6("Start voice input")
|
|
33267
33269
|
},
|
|
33268
|
-
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(
|
|
33269
33271
|
"div",
|
|
33270
33272
|
{
|
|
33271
33273
|
className: (0, import_clsx13.default)(import_Chat_module.default.videoContainer),
|
|
33272
33274
|
title: t6("Sound")
|
|
33273
33275
|
},
|
|
33274
|
-
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(
|
|
33275
33277
|
"video",
|
|
33276
33278
|
{
|
|
33277
33279
|
onLoadedData: () => setIsVideoLoading(false),
|
|
@@ -36240,7 +36242,7 @@ function SignIn({
|
|
|
36240
36242
|
const { t: t6 } = useAppContext();
|
|
36241
36243
|
const {
|
|
36242
36244
|
FRONTEND_URL: FRONTEND_URL4,
|
|
36243
|
-
isE2E:
|
|
36245
|
+
isE2E: isE2E3,
|
|
36244
36246
|
isCI: isCI2,
|
|
36245
36247
|
API_URL: API_URL2,
|
|
36246
36248
|
TEST_GUEST_FINGERPRINTS,
|
|
@@ -36272,7 +36274,7 @@ function SignIn({
|
|
|
36272
36274
|
window.removeEventListener("keydown", handleKeyDown);
|
|
36273
36275
|
};
|
|
36274
36276
|
}, [part]);
|
|
36275
|
-
const E2E =
|
|
36277
|
+
const E2E = isE2E3 || fingerprint && (TEST_GUEST_FINGERPRINTS.includes(fingerprint) || TEST_MEMBER_FINGERPRINTS.includes(fingerprint));
|
|
36276
36278
|
const handleSignIn = async (part2) => {
|
|
36277
36279
|
if (E2E) {
|
|
36278
36280
|
part2 = "credentials";
|
|
@@ -36336,7 +36338,7 @@ function SignIn({
|
|
|
36336
36338
|
return;
|
|
36337
36339
|
} else {
|
|
36338
36340
|
const redirectUrl2 = signInResult?.url || successUrl.toString();
|
|
36339
|
-
if (
|
|
36341
|
+
if (isE2E3) {
|
|
36340
36342
|
setRedirectUrl(redirectUrl2);
|
|
36341
36343
|
!isCI2 && setTimeout(() => {
|
|
36342
36344
|
window.location.href = redirectUrl2;
|