@chrryai/chrry 1.4.87 → 1.4.89

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.
@@ -104,12 +104,13 @@
104
104
  gap: toRem.toRem(10);
105
105
 
106
106
  margin: toRem.toRem(10) 0 toRem.toRem(5) 0;
107
- video {
108
- max-width: 100%;
109
- // height: fit-content;
110
- width: toRem.toRem(250);
111
- border-radius: toRem.toRem(20);
112
- }
107
+ }
108
+
109
+ .userMessageVideoVideo {
110
+ max-width: 100%;
111
+ // height: fit-content;
112
+ width: toRem.toRem(250);
113
+ border-radius: toRem.toRem(20);
113
114
  }
114
115
 
115
116
  .userMessageAudio {
package/dist/index.js CHANGED
@@ -1902,7 +1902,7 @@ var init_utils = __esm({
1902
1902
  };
1903
1903
  isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes("Firefox");
1904
1904
  config = getSiteConfig(getClientHostname());
1905
- VERSION = config.version || "1.4.87";
1905
+ VERSION = config.version || "1.4.89";
1906
1906
  getSlugFromPathname = (path) => {
1907
1907
  return getAppAndStoreSlugs(path, {
1908
1908
  defaultAppSlug: config.slug,
@@ -24068,7 +24068,7 @@ function DataProvider({ children, ...rest }) {
24068
24068
  const [instructions, setInstructions] = (0, import_react21.useState)([]);
24069
24069
  const [affiliateStats, setAffiliateStats] = (0, import_react21.useState)(null);
24070
24070
  const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react21.useState)(false);
24071
- const VERSION4 = "1.4.87";
24071
+ const VERSION4 = "1.4.89";
24072
24072
  const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
24073
24073
  const {
24074
24074
  API_URL: API_URL2,
@@ -26580,7 +26580,7 @@ function ChatProvider({
26580
26580
  aiAgents.find((a) => app?.defaultModel && a.name === app?.defaultModel) || favouriteAgent
26581
26581
  );
26582
26582
  const setIsWebSearchEnabled = (value) => {
26583
- value ? setSelectedAgent(perplexityAgent) : setSelectedAgent(sushiAgent);
26583
+ value ? setSelectedAgent(perplexityAgent) : void 0;
26584
26584
  setIsWebSearchEnabledInternal(value);
26585
26585
  };
26586
26586
  const setDebateAgent = (agent) => {
@@ -26622,7 +26622,7 @@ function ChatProvider({
26622
26622
  };
26623
26623
  (0, import_react31.useEffect)(() => {
26624
26624
  const a = aiAgents.find(
26625
- (agent) => app?.defaultModel && agent.name.toLowerCase() === app?.defaultModel?.toLowerCase()
26625
+ (agent) => app?.defaultModel && app.onlyAgent && agent.name.toLowerCase() === app?.defaultModel?.toLowerCase()
26626
26626
  );
26627
26627
  if (!a) return;
26628
26628
  setSelectedAgent(a);
@@ -36907,7 +36907,8 @@ function Chat({
36907
36907
  isImageGenerationEnabled,
36908
36908
  setIsImageGenerationEnabled,
36909
36909
  setShouldFocus,
36910
- shouldFocus
36910
+ shouldFocus,
36911
+ isChatFloating: isChatFloatingInternal
36911
36912
  } = useChat();
36912
36913
  const {
36913
36914
  router,
@@ -36929,7 +36930,13 @@ function Chat({
36929
36930
  const { captureException } = useError();
36930
36931
  const { device, os, isStandalone: isStandalone2, isExtension: isExtension2, viewPortWidth, isWeb: isWeb2 } = usePlatform();
36931
36932
  const inputRef = (0, import_react57.useRef)(text2 || "");
36932
- const { addHapticFeedback, playNotification, isDrawerOpen, isSmallDevice } = useTheme2();
36933
+ const {
36934
+ addHapticFeedback,
36935
+ playNotification,
36936
+ isDrawerOpen,
36937
+ isSmallDevice,
36938
+ isMobileDevice
36939
+ } = useTheme2();
36933
36940
  const setSelectedAgent = (agent) => {
36934
36941
  setSelectedAgentInternal(agent);
36935
36942
  setShouldFocus(true);
@@ -37009,7 +37016,7 @@ function Chat({
37009
37016
  }, [isNewChat]);
37010
37017
  const [hasBottomOffset, setHasBottomOffset] = (0, import_react57.useState)(false);
37011
37018
  const shouldUseCompactMode = compactMode || hasBottomOffset;
37012
- const isChatFloating = shouldUseCompactMode || !empty && !showChatInput;
37019
+ const isChatFloating = isChatFloatingInternal || shouldUseCompactMode || !empty && !showChatInput;
37013
37020
  (0, import_react57.useEffect)(() => {
37014
37021
  if (process.env.NODE_ENV !== "production") {
37015
37022
  console.log(" Chat floating state", {
@@ -39125,7 +39132,7 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
39125
39132
  t6("Speak")
39126
39133
  )))
39127
39134
  ),
39128
- /* @__PURE__ */ React.createElement(
39135
+ isHydrated && /* @__PURE__ */ React.createElement(
39129
39136
  Div,
39130
39137
  {
39131
39138
  ref: chatContainerRef,
@@ -39370,7 +39377,9 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
39370
39377
  used: quotaInfo.daily.used,
39371
39378
  limit: quotaInfo.daily.limit
39372
39379
  })), /* @__PURE__ */ React.createElement(Span, { style: styles4.quotaReset.style }, t6("Resets in {{time}}", {
39373
- time: formatTimeUntilReset(quotaInfo.daily.resetTime)
39380
+ time: formatTimeUntilReset(
39381
+ quotaInfo.daily.resetTime
39382
+ )
39374
39383
  }))), /* @__PURE__ */ React.createElement(Div, { style: styles4.quotaItem.style }, /* @__PURE__ */ React.createElement(icons_exports.HardDrive, { size: 14, color: "var(--shade-6)" }), /* @__PURE__ */ React.createElement(Span, null, t6("Size: {{used}}/{{limit}} MB", {
39375
39384
  used: quotaInfo.dailySize.used,
39376
39385
  limit: quotaInfo.dailySize.limit
@@ -39446,7 +39455,9 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
39446
39455
  "data-agent-name": debateAgent.name,
39447
39456
  onClick: () => {
39448
39457
  if (appStatus?.part) {
39449
- import_react_hot_toast9.default.error(t6("Agent locked during app creation"));
39458
+ import_react_hot_toast9.default.error(
39459
+ t6("Agent locked during app creation")
39460
+ );
39450
39461
  return;
39451
39462
  }
39452
39463
  addHapticFeedback();
@@ -39459,7 +39470,13 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
39459
39470
  ...isChrry || !!app?.onlyAgent ? styles4.debateAgentButtonDisabled : {}
39460
39471
  }
39461
39472
  },
39462
- /* @__PURE__ */ React.createElement(Span, { style: { position: "relative", left: "-2px" } }, "|"),
39473
+ /* @__PURE__ */ React.createElement(
39474
+ Span,
39475
+ {
39476
+ style: { position: "relative", left: "-2px" }
39477
+ },
39478
+ "|"
39479
+ ),
39463
39480
  debateAgent.name === "deepSeek" ? /* @__PURE__ */ React.createElement(icons_exports.DeepSeek, { color: "var(--accent-6)", size: 24 }) : debateAgent.name === "chatGPT" ? /* @__PURE__ */ React.createElement(icons_exports.OpenAI, { color: "var(--accent-6)", size: 22 }) : debateAgent.name === "claude" ? /* @__PURE__ */ React.createElement(icons_exports.Claude, { color: "var(--accent-6)", size: 22 }) : debateAgent.name === "gemini" ? /* @__PURE__ */ React.createElement(icons_exports.Gemini, { color: "var(--accent-6)", size: 22 }) : debateAgent.name === "flux" ? /* @__PURE__ */ React.createElement(icons_exports.Flux, { color: "var(--accent-6)", size: 22 }) : debateAgent.name === "perplexity" ? /* @__PURE__ */ React.createElement(icons_exports.Perplexity, { color: "var(--accent-6)", size: 22 }) : null
39464
39481
  ) : /* @__PURE__ */ React.createElement(
39465
39482
  Button,
@@ -39469,7 +39486,9 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
39469
39486
  "data-testid": "agent-select-button",
39470
39487
  onClick: () => {
39471
39488
  if (appStatus?.part) {
39472
- import_react_hot_toast9.default.error(t6("Agent locked during app creation"));
39489
+ import_react_hot_toast9.default.error(
39490
+ t6("Agent locked during app creation")
39491
+ );
39473
39492
  return;
39474
39493
  }
39475
39494
  addHapticFeedback();
@@ -39483,7 +39502,16 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
39483
39502
  },
39484
39503
  type: "submit"
39485
39504
  },
39486
- /* @__PURE__ */ React.createElement(Span, { style: styles4.agentName.style }, selectedAgent?.displayName),
39505
+ /* @__PURE__ */ React.createElement(
39506
+ Span,
39507
+ {
39508
+ style: {
39509
+ ...styles4.agentName.style,
39510
+ maxWidth: isMobileDevice ? 75 : 150
39511
+ }
39512
+ },
39513
+ selectedAgent?.displayName
39514
+ ),
39487
39515
  !app?.onlyAgent && /* @__PURE__ */ React.createElement(icons_exports.ChevronDown, { color: "var(--accent-6)", size: 20 })
39488
39516
  )
39489
39517
  ),
@@ -39631,7 +39659,13 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
39631
39659
  },
39632
39660
  className: "link"
39633
39661
  },
39634
- /* @__PURE__ */ React.createElement(icons_exports.VideoIcon, { size: 22, color: getButtonColor("video") })
39662
+ /* @__PURE__ */ React.createElement(
39663
+ icons_exports.VideoIcon,
39664
+ {
39665
+ size: 22,
39666
+ color: getButtonColor("video")
39667
+ }
39668
+ )
39635
39669
  ), /* @__PURE__ */ React.createElement(
39636
39670
  Button,
39637
39671
  {
@@ -39679,7 +39713,13 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
39679
39713
  },
39680
39714
  className: "link"
39681
39715
  },
39682
- /* @__PURE__ */ React.createElement(icons_exports.AudioLines, { size: 22, color: getButtonColor("audio") })
39716
+ /* @__PURE__ */ React.createElement(
39717
+ icons_exports.AudioLines,
39718
+ {
39719
+ size: 22,
39720
+ color: getButtonColor("audio")
39721
+ }
39722
+ )
39683
39723
  ), /* @__PURE__ */ React.createElement(
39684
39724
  Button,
39685
39725
  {
@@ -39703,7 +39743,13 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
39703
39743
  },
39704
39744
  className: "link"
39705
39745
  },
39706
- /* @__PURE__ */ React.createElement(icons_exports.ImageIcon, { size: 22, color: getButtonColor("image") })
39746
+ /* @__PURE__ */ React.createElement(
39747
+ icons_exports.ImageIcon,
39748
+ {
39749
+ size: 22,
39750
+ color: getButtonColor("image")
39751
+ }
39752
+ )
39707
39753
  )) : needsReview ? /* @__PURE__ */ React.createElement(
39708
39754
  Anchor,
39709
39755
  {
@@ -45240,7 +45286,9 @@ var init_Message_styles = __esm({
45240
45286
  flexDirection: "row",
45241
45287
  flexWrap: "wrap",
45242
45288
  gap: 10,
45243
- margin: "10px 0 5px 0",
45289
+ margin: "10px 0 5px 0"
45290
+ },
45291
+ userMessageVideoVideo: {
45244
45292
  maxWidth: "100%",
45245
45293
  width: 250,
45246
45294
  borderRadius: 20
@@ -46043,7 +46091,14 @@ function Message({
46043
46091
  "data-testid": "user-message-videos",
46044
46092
  style: styles4.userMessageVideo.style
46045
46093
  },
46046
- video.map((video2) => /* @__PURE__ */ React.createElement(Div, { "data-testid": "user-message-video", key: video2.id }, /* @__PURE__ */ React.createElement("video", { controls: true, src: video2.url })))
46094
+ video.map((video2) => /* @__PURE__ */ React.createElement(Div, { "data-testid": "user-message-video", key: video2.id }, /* @__PURE__ */ React.createElement(
46095
+ Video_web_default,
46096
+ {
46097
+ style: styles4.userMessageVideoVideo.style,
46098
+ controls: true,
46099
+ src: video2.url
46100
+ }
46101
+ )))
46047
46102
  ) : null, files?.length ? /* @__PURE__ */ React.createElement(
46048
46103
  Div,
46049
46104
  {