@chrryai/chrry 1.5.52 → 1.5.55
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 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +82 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +122 -47
- 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
|
@@ -773,7 +773,7 @@ var init_siteConfig = __esm({
|
|
|
773
773
|
favicon: "focus",
|
|
774
774
|
mode: "focus",
|
|
775
775
|
slug: "focus",
|
|
776
|
-
version: "26.10.
|
|
776
|
+
version: "26.10.51",
|
|
777
777
|
storeSlug: "blossom",
|
|
778
778
|
name: "Focus",
|
|
779
779
|
domain: "focus.chrry.ai",
|
|
@@ -2093,7 +2093,7 @@ var init_utils = __esm({
|
|
|
2093
2093
|
};
|
|
2094
2094
|
isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes("Firefox");
|
|
2095
2095
|
config = getSiteConfig(getClientHostname());
|
|
2096
|
-
VERSION = config.version || "1.5.
|
|
2096
|
+
VERSION = config.version || "1.5.55";
|
|
2097
2097
|
getSlugFromPathname = (path) => {
|
|
2098
2098
|
return getAppAndStoreSlugs(path, {
|
|
2099
2099
|
defaultAppSlug: config.slug,
|
|
@@ -23583,7 +23583,7 @@ function AuthProvider({
|
|
|
23583
23583
|
if (targetApp) {
|
|
23584
23584
|
if (targetApp.id === baseApp?.id) {
|
|
23585
23585
|
computedSlug = defaultSlug;
|
|
23586
|
-
} else if (targetApp.
|
|
23586
|
+
} else if (targetApp.store?.slug === baseApp?.store?.slug || baseApp?.store?.apps.some((app2) => app2.id === targetApp.id)) {
|
|
23587
23587
|
computedSlug = `/${targetApp.slug}`;
|
|
23588
23588
|
} else {
|
|
23589
23589
|
computedSlug = `/${targetApp.store?.slug}/${targetApp.slug}`;
|
|
@@ -24383,7 +24383,7 @@ function DataProvider({ children, ...rest }) {
|
|
|
24383
24383
|
const [instructions, setInstructions] = (0, import_react21.useState)([]);
|
|
24384
24384
|
const [affiliateStats, setAffiliateStats] = (0, import_react21.useState)(null);
|
|
24385
24385
|
const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react21.useState)(false);
|
|
24386
|
-
const VERSION4 = "1.5.
|
|
24386
|
+
const VERSION4 = "1.5.55";
|
|
24387
24387
|
const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
|
|
24388
24388
|
const {
|
|
24389
24389
|
API_URL: API_URL2,
|
|
@@ -35392,7 +35392,6 @@ function App({
|
|
|
35392
35392
|
setAppStatus,
|
|
35393
35393
|
baseApp,
|
|
35394
35394
|
isAppOwner,
|
|
35395
|
-
storeApp,
|
|
35396
35395
|
hasCustomInstructions,
|
|
35397
35396
|
showingCustom,
|
|
35398
35397
|
toggleInstructions
|
|
@@ -35421,6 +35420,8 @@ function App({
|
|
|
35421
35420
|
const grape = apps.find((app2) => app2.slug === "grape");
|
|
35422
35421
|
const zarathustra2 = apps.find((app2) => app2.slug === "zarathustra");
|
|
35423
35422
|
const isBlossom = app?.store?.id === chrry?.store?.id;
|
|
35423
|
+
const storeApp = apps.find((item) => item.store?.id === app?.store?.id);
|
|
35424
|
+
console.log(`\u{1F680} ~ file: App.tsx:154 ~ apps:`, apps);
|
|
35424
35425
|
const getApps2 = () => {
|
|
35425
35426
|
return apps.filter(
|
|
35426
35427
|
(item) => item.id !== store?.appId && item.id !== chrry?.id && item.id !== grape?.id && (isBlossom ? item.id !== atlas2?.id && item.id !== zarathustra2?.id && item.id !== popcorn2?.id : true)
|
|
@@ -46000,6 +46001,38 @@ function Message({
|
|
|
46000
46001
|
const [disliked, setDisliked] = (0, import_react76.useState)(void 0);
|
|
46001
46002
|
const [isSpeechActive, setIsSpeechActive] = (0, import_react76.useState)(false);
|
|
46002
46003
|
const [isSpeechLoading, setIsSpeechLoading] = (0, import_react76.useState)(false);
|
|
46004
|
+
const [isReasoningExpanded, setIsReasoningExpanded] = (0, import_react76.useState)(false);
|
|
46005
|
+
const [isReasoningStreaming, setIsReasoningStreaming] = (0, import_react76.useState)(false);
|
|
46006
|
+
const reasoningScrollRef = (0, import_react76.useRef)(null);
|
|
46007
|
+
const { content: cleanContent, reasoning } = (0, import_react76.useMemo)(() => {
|
|
46008
|
+
const messageContent = message2.message.content;
|
|
46009
|
+
const reasoningMatches = messageContent.match(
|
|
46010
|
+
/__REASONING__(.*?)__\/REASONING__/gs
|
|
46011
|
+
);
|
|
46012
|
+
if (reasoningMatches) {
|
|
46013
|
+
const extractedReasoning = reasoningMatches.map((match11) => match11.replace(/__REASONING__|__\/REASONING__/g, "")).join("");
|
|
46014
|
+
const cleanedContent = messageContent.replace(
|
|
46015
|
+
/__REASONING__.*?__\/REASONING__/gs,
|
|
46016
|
+
""
|
|
46017
|
+
);
|
|
46018
|
+
const isStreaming = message2.message.isStreaming && messageContent.includes("__REASONING__");
|
|
46019
|
+
setIsReasoningStreaming(!!isStreaming);
|
|
46020
|
+
return { content: cleanedContent, reasoning: extractedReasoning };
|
|
46021
|
+
}
|
|
46022
|
+
return {
|
|
46023
|
+
content: messageContent,
|
|
46024
|
+
reasoning: message2.message.reasoning || null
|
|
46025
|
+
};
|
|
46026
|
+
}, [
|
|
46027
|
+
message2.message.content,
|
|
46028
|
+
message2.message.reasoning,
|
|
46029
|
+
message2.message.isStreaming
|
|
46030
|
+
]);
|
|
46031
|
+
(0, import_react76.useEffect)(() => {
|
|
46032
|
+
if (isReasoningStreaming && reasoningScrollRef.current) {
|
|
46033
|
+
reasoningScrollRef.current.scrollTop = reasoningScrollRef.current.scrollHeight;
|
|
46034
|
+
}
|
|
46035
|
+
}, [reasoning, isReasoningStreaming]);
|
|
46003
46036
|
const limitCheck = (0, import_react76.useMemo)(() => {
|
|
46004
46037
|
return user || guest ? user ? checkSpeechLimits({
|
|
46005
46038
|
user,
|
|
@@ -46688,7 +46721,49 @@ function Message({
|
|
|
46688
46721
|
title: t5("Download image")
|
|
46689
46722
|
},
|
|
46690
46723
|
/* @__PURE__ */ React.createElement(icons_exports.Download, { size: 16 })
|
|
46691
|
-
)))) : null,
|
|
46724
|
+
)))) : null, reasoning && /* @__PURE__ */ React.createElement(
|
|
46725
|
+
Div,
|
|
46726
|
+
{
|
|
46727
|
+
style: {
|
|
46728
|
+
marginBottom: "0.3rem",
|
|
46729
|
+
borderLeft: "3px solid var(--accent-1)",
|
|
46730
|
+
paddingLeft: "0.5rem"
|
|
46731
|
+
}
|
|
46732
|
+
},
|
|
46733
|
+
/* @__PURE__ */ React.createElement(
|
|
46734
|
+
Button,
|
|
46735
|
+
{
|
|
46736
|
+
className: "link",
|
|
46737
|
+
onClick: () => setIsReasoningExpanded(!isReasoningExpanded),
|
|
46738
|
+
style: {
|
|
46739
|
+
...utilities.link.style,
|
|
46740
|
+
display: "flex",
|
|
46741
|
+
alignItems: "center",
|
|
46742
|
+
gap: "0.5rem",
|
|
46743
|
+
fontSize: "0.9rem",
|
|
46744
|
+
color: "var(--accent-1)",
|
|
46745
|
+
marginBottom: "0.5rem"
|
|
46746
|
+
}
|
|
46747
|
+
},
|
|
46748
|
+
t5("Reasoning"),
|
|
46749
|
+
isReasoningExpanded ? "." : "..."
|
|
46750
|
+
),
|
|
46751
|
+
(isReasoningExpanded || isReasoningStreaming) && /* @__PURE__ */ React.createElement(
|
|
46752
|
+
Div,
|
|
46753
|
+
{
|
|
46754
|
+
ref: reasoningScrollRef,
|
|
46755
|
+
style: {
|
|
46756
|
+
height: !isReasoningStreaming ? "200px" : "100px",
|
|
46757
|
+
overflowY: "auto",
|
|
46758
|
+
fontSize: "0.85rem",
|
|
46759
|
+
color: "var(--shade-6)",
|
|
46760
|
+
whiteSpace: "pre-wrap",
|
|
46761
|
+
background: "var(--background-2)"
|
|
46762
|
+
}
|
|
46763
|
+
},
|
|
46764
|
+
reasoning
|
|
46765
|
+
)
|
|
46766
|
+
), message2.message.content === "\u{1F439} Done!" ? /* @__PURE__ */ React.createElement(
|
|
46692
46767
|
Div,
|
|
46693
46768
|
{
|
|
46694
46769
|
style: { display: "flex", alignItems: "center", gap: "2rem" }
|
|
@@ -46697,7 +46772,7 @@ function Message({
|
|
|
46697
46772
|
) : /* @__PURE__ */ React.createElement(
|
|
46698
46773
|
MarkdownContent_web_default,
|
|
46699
46774
|
{
|
|
46700
|
-
content:
|
|
46775
|
+
content: cleanContent,
|
|
46701
46776
|
webSearchResults: message2.message.webSearchResult || void 0
|
|
46702
46777
|
}
|
|
46703
46778
|
)), isSearchStart || message2.message.isStreaming && message2.message.isWebSearchEnabled ? /* @__PURE__ */ React.createElement(Div, { style: styles4.agentWebStreaming.style }, /* @__PURE__ */ React.createElement(Loading, { width: 16, height: 16 }), " ", /* @__PURE__ */ React.createElement(icons_exports.Globe, { color: "var(--accent-1)", size: 16 }), " ", t5("Analyzing...")) : webSearchResult.length > 0 && /* @__PURE__ */ React.createElement(
|