@burdenoff/website-sdk 2026.829.8 → 2026.830.1
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/components/explore.js +63 -28
- package/dist/components/explore.js.map +1 -1
- package/dist/components/explore.mjs +63 -28
- package/dist/components/explore.mjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +19 -6
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +19 -6
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +63 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +63 -28
- package/dist/index.mjs.map +1 -1
- package/dist/{use-explore-chat-BzXCz2UM.d.mts → use-explore-chat-B8xKGid5.d.mts} +13 -1
- package/dist/{use-explore-chat-BzXCz2UM.d.ts → use-explore-chat-B8xKGid5.d.ts} +13 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4775,6 +4775,7 @@ var EN = {
|
|
|
4775
4775
|
attachmentTooLarge: "{{name}} is larger than {{size}} MB and was not attached.",
|
|
4776
4776
|
attachmentTooMany: "Only {{max}} files can be attached, so {{name}} was skipped.",
|
|
4777
4777
|
noAnswer: "I couldn't find this in our documentation, so the answer below is not grounded in a source. Try rephrasing, or",
|
|
4778
|
+
answerDidNotArrive: "That answer didn't come through. Try asking again.",
|
|
4778
4779
|
askHuman: "ask a human",
|
|
4779
4780
|
prevSuggestion: "Previous suggestion",
|
|
4780
4781
|
nextSuggestion: "Next suggestion",
|
|
@@ -4823,6 +4824,7 @@ var ZH = {
|
|
|
4823
4824
|
attachmentTooLarge: "{{name}} \u8D85\u8FC7 {{size}} MB\uFF0C\u672A\u80FD\u6DFB\u52A0\u3002",
|
|
4824
4825
|
attachmentTooMany: "\u6700\u591A\u53EA\u80FD\u6DFB\u52A0 {{max}} \u4E2A\u6587\u4EF6\uFF0C\u5DF2\u8DF3\u8FC7 {{name}}\u3002",
|
|
4825
4826
|
noAnswer: "\u6211\u5728\u6587\u6863\u4E2D\u6CA1\u6709\u627E\u5230\u76F8\u5173\u5185\u5BB9\uFF0C\u4E0B\u9762\u7684\u56DE\u7B54\u6CA1\u6709\u6765\u6E90\u652F\u6301\u3002\u8BF7\u6362\u4E2A\u8BF4\u6CD5\uFF0C\u6216",
|
|
4827
|
+
answerDidNotArrive: "\u8FD9\u6761\u56DE\u7B54\u6CA1\u6709\u8FD4\u56DE\u3002\u8BF7\u518D\u95EE\u4E00\u6B21\u3002",
|
|
4826
4828
|
askHuman: "\u8054\u7CFB\u6211\u4EEC",
|
|
4827
4829
|
prevSuggestion: "\u4E0A\u4E00\u4E2A\u5EFA\u8BAE",
|
|
4828
4830
|
nextSuggestion: "\u4E0B\u4E00\u4E2A\u5EFA\u8BAE",
|
|
@@ -4867,6 +4869,7 @@ var HI = {
|
|
|
4867
4869
|
attachmentTooLarge: "{{name}} {{size}} MB \u0938\u0947 \u092C\u0921\u093C\u0940 \u0939\u0948, \u0907\u0938\u0932\u093F\u090F \u091C\u094B\u0921\u093C\u0940 \u0928\u0939\u0940\u0902 \u0917\u0908\u0964",
|
|
4868
4870
|
attachmentTooMany: "\u0915\u0947\u0935\u0932 {{max}} \u092B\u093C\u093E\u0907\u0932\u0947\u0902 \u091C\u094B\u0921\u093C\u0940 \u091C\u093E \u0938\u0915\u0924\u0940 \u0939\u0948\u0902, \u0907\u0938\u0932\u093F\u090F {{name}} \u091B\u094B\u0921\u093C \u0926\u0940 \u0917\u0908\u0964",
|
|
4869
4871
|
noAnswer: "\u092F\u0939 \u092E\u0941\u091D\u0947 \u0939\u092E\u093E\u0930\u0947 \u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C\u094B\u0902 \u092E\u0947\u0902 \u0928\u0939\u0940\u0902 \u092E\u093F\u0932\u093E, \u0907\u0938\u0932\u093F\u090F \u0928\u0940\u091A\u0947 \u0926\u093F\u092F\u093E \u0909\u0924\u094D\u0924\u0930 \u0915\u093F\u0938\u0940 \u0938\u094D\u0930\u094B\u0924 \u092A\u0930 \u0906\u0927\u093E\u0930\u093F\u0924 \u0928\u0939\u0940\u0902 \u0939\u0948\u0964 \u0926\u0942\u0938\u0930\u0947 \u0936\u092C\u094D\u0926\u094B\u0902 \u092E\u0947\u0902 \u092A\u0942\u091B\u0947\u0902, \u092F\u093E",
|
|
4872
|
+
answerDidNotArrive: "\u0935\u0939 \u0909\u0924\u094D\u0924\u0930 \u0928\u0939\u0940\u0902 \u0906 \u0938\u0915\u093E\u0964 \u0915\u0943\u092A\u092F\u093E \u0926\u094B\u092C\u093E\u0930\u093E \u092A\u0942\u091B\u0947\u0902\u0964",
|
|
4870
4873
|
askHuman: "\u0939\u092E\u0938\u0947 \u0938\u0902\u092A\u0930\u094D\u0915 \u0915\u0930\u0947\u0902",
|
|
4871
4874
|
prevSuggestion: "\u092A\u093F\u091B\u0932\u093E \u0938\u0941\u091D\u093E\u0935",
|
|
4872
4875
|
nextSuggestion: "\u0905\u0917\u0932\u093E \u0938\u0941\u091D\u093E\u0935",
|
|
@@ -4915,6 +4918,7 @@ var ES = {
|
|
|
4915
4918
|
attachmentTooLarge: "{{name}} supera los {{size}} MB y no se adjunt\xF3.",
|
|
4916
4919
|
attachmentTooMany: "Solo se pueden adjuntar {{max}} archivos, as\xED que se omiti\xF3 {{name}}.",
|
|
4917
4920
|
noAnswer: "No he encontrado esto en nuestra documentaci\xF3n, as\xED que la respuesta de abajo no se apoya en ninguna fuente. Prueba a reformularla, o",
|
|
4921
|
+
answerDidNotArrive: "Esa respuesta no lleg\xF3. Int\xE9ntalo de nuevo.",
|
|
4918
4922
|
askHuman: "habla con una persona",
|
|
4919
4923
|
prevSuggestion: "Sugerencia anterior",
|
|
4920
4924
|
nextSuggestion: "Sugerencia siguiente",
|
|
@@ -4963,6 +4967,7 @@ var AR = {
|
|
|
4963
4967
|
attachmentTooLarge: "{{name}} \u0623\u0643\u0628\u0631 \u0645\u0646 {{size}} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A \u0648\u0644\u0645 \u064A\u062A\u0645 \u0625\u0631\u0641\u0627\u0642\u0647.",
|
|
4964
4968
|
attachmentTooMany: "\u064A\u0645\u0643\u0646 \u0625\u0631\u0641\u0627\u0642 {{max}} \u0645\u0644\u0641\u0627\u062A \u0641\u0642\u0637\u060C \u0644\u0630\u0627 \u062A\u0645 \u062A\u062E\u0637\u064A {{name}}.",
|
|
4965
4969
|
noAnswer: "\u0644\u0645 \u0623\u062C\u062F \u0647\u0630\u0627 \u0641\u064A \u0648\u062B\u0627\u0626\u0642\u0646\u0627\u060C \u0644\u0630\u0627 \u0641\u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0623\u062F\u0646\u0627\u0647 \u063A\u064A\u0631 \u0645\u0633\u062A\u0646\u062F\u0629 \u0625\u0644\u0649 \u0645\u0635\u062F\u0631. \u062D\u0627\u0648\u0644 \u0625\u0639\u0627\u062F\u0629 \u0627\u0644\u0635\u064A\u0627\u063A\u0629\u060C \u0623\u0648",
|
|
4970
|
+
answerDidNotArrive: "\u0644\u0645 \u062A\u0635\u0644 \u0647\u0630\u0647 \u0627\u0644\u0625\u062C\u0627\u0628\u0629. \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649.",
|
|
4966
4971
|
askHuman: "\u062A\u062D\u062F\u0651\u062B \u0625\u0644\u0649 \u0634\u062E\u0635",
|
|
4967
4972
|
prevSuggestion: "\u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u0633\u0627\u0628\u0642",
|
|
4968
4973
|
nextSuggestion: "\u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u062A\u0627\u0644\u064A",
|
|
@@ -5011,6 +5016,7 @@ var TA = {
|
|
|
5011
5016
|
attachmentTooLarge: "{{name}} {{size}} MB-\u0B90 \u0BB5\u0BBF\u0B9F \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1, \u0B8E\u0BA9\u0BB5\u0BC7 \u0B87\u0BA3\u0BC8\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8.",
|
|
5012
5017
|
attachmentTooMany: "{{max}} \u0B95\u0BCB\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD \u0BAE\u0B9F\u0BCD\u0B9F\u0BC1\u0BAE\u0BC7 \u0B87\u0BA3\u0BC8\u0B95\u0BCD\u0B95 \u0BAE\u0BC1\u0B9F\u0BBF\u0BAF\u0BC1\u0BAE\u0BCD, \u0B8E\u0BA9\u0BB5\u0BC7 {{name}} \u0BA4\u0BB5\u0BBF\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1.",
|
|
5013
5018
|
noAnswer: "\u0B87\u0BA4\u0BC1 \u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B86\u0BB5\u0BA3\u0B99\u0BCD\u0B95\u0BB3\u0BBF\u0BB2\u0BCD \u0B95\u0BBF\u0B9F\u0BC8\u0B95\u0BCD\u0B95\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8, \u0B8E\u0BA9\u0BB5\u0BC7 \u0B95\u0BC0\u0BB4\u0BC7 \u0B89\u0BB3\u0BCD\u0BB3 \u0BAA\u0BA4\u0BBF\u0BB2\u0BC1\u0B95\u0BCD\u0B95\u0BC1 \u0BAE\u0BC2\u0BB2\u0BAE\u0BCD \u0B87\u0BB2\u0BCD\u0BB2\u0BC8. \u0BB5\u0BC7\u0BB1\u0BC1 \u0BB5\u0B95\u0BC8\u0BAF\u0BBF\u0BB2\u0BCD \u0B95\u0BC7\u0BB3\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD, \u0B85\u0BB2\u0BCD\u0BB2\u0BA4\u0BC1",
|
|
5019
|
+
answerDidNotArrive: "\u0B85\u0BA8\u0BCD\u0BA4\u0BAA\u0BCD \u0BAA\u0BA4\u0BBF\u0BB2\u0BCD \u0BB5\u0BB0\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8. \u0BAE\u0BC0\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD \u0B95\u0BC7\u0B9F\u0BCD\u0B9F\u0BC1\u0BAA\u0BCD \u0BAA\u0BBE\u0BB0\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD.",
|
|
5014
5020
|
askHuman: "\u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BC8\u0BA4\u0BCD \u0BA4\u0BCA\u0B9F\u0BB0\u0BCD\u0BAA\u0BC1 \u0B95\u0BCA\u0BB3\u0BCD\u0BB3\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
|
|
5015
5021
|
prevSuggestion: "\u0BAE\u0BC1\u0BA8\u0BCD\u0BA4\u0BC8\u0BAF \u0BAA\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0BB0\u0BC8",
|
|
5016
5022
|
nextSuggestion: "\u0B85\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4 \u0BAA\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0BB0\u0BC8",
|
|
@@ -5626,7 +5632,7 @@ var DEFAULT_EXPLORE_EXAMPLE_PROMPTS = [
|
|
|
5626
5632
|
];
|
|
5627
5633
|
var FALLBACK_WELCOME_TITLE = "Ask anything about our products";
|
|
5628
5634
|
var FALLBACK_WELCOME_BODY = "Get straight answers drawn from our product documentation and public pages \u2014 with links back to the exact page each answer came from.";
|
|
5629
|
-
function buildFallbackCatalog(examplePrompts) {
|
|
5635
|
+
function buildFallbackCatalog(examplePrompts, welcome) {
|
|
5630
5636
|
return {
|
|
5631
5637
|
enabled: true,
|
|
5632
5638
|
products: ECOSYSTEM_PRODUCTS.map((p) => ({
|
|
@@ -5636,8 +5642,8 @@ function buildFallbackCatalog(examplePrompts) {
|
|
|
5636
5642
|
website: p.websiteUrl
|
|
5637
5643
|
})),
|
|
5638
5644
|
examplePrompts: examplePrompts?.length ? examplePrompts : DEFAULT_EXPLORE_EXAMPLE_PROMPTS,
|
|
5639
|
-
welcomeTitle: FALLBACK_WELCOME_TITLE,
|
|
5640
|
-
welcomeBody: FALLBACK_WELCOME_BODY,
|
|
5645
|
+
welcomeTitle: welcome?.title ?? FALLBACK_WELCOME_TITLE,
|
|
5646
|
+
welcomeBody: welcome?.body ?? FALLBACK_WELCOME_BODY,
|
|
5641
5647
|
limits: FALLBACK_EXPLORE_LIMITS,
|
|
5642
5648
|
captchaRequired: false,
|
|
5643
5649
|
recaptchaSiteKey: null
|
|
@@ -5697,7 +5703,15 @@ function classifyExploreError(code, serverMessage) {
|
|
|
5697
5703
|
retryable: true
|
|
5698
5704
|
};
|
|
5699
5705
|
}
|
|
5700
|
-
if (c === "
|
|
5706
|
+
if (c === "TOOL_BUDGET") {
|
|
5707
|
+
return {
|
|
5708
|
+
kind: "scope",
|
|
5709
|
+
code: c,
|
|
5710
|
+
message: "That question spans more of our products than I can look through in one go. Try asking about two or three specific products.",
|
|
5711
|
+
retryable: false
|
|
5712
|
+
};
|
|
5713
|
+
}
|
|
5714
|
+
if (c === "TIMEOUT") {
|
|
5701
5715
|
return {
|
|
5702
5716
|
kind: "timeout",
|
|
5703
5717
|
code: c,
|
|
@@ -5829,6 +5843,7 @@ function useExploreChat(options = {}) {
|
|
|
5829
5843
|
pageUrl,
|
|
5830
5844
|
locale,
|
|
5831
5845
|
examplePrompts,
|
|
5846
|
+
fallbackWelcome,
|
|
5832
5847
|
pollIntervalMs = DEFAULT_POLL_INTERVAL_MS,
|
|
5833
5848
|
pollTimeoutMs = DEFAULT_POLL_TIMEOUT_MS,
|
|
5834
5849
|
storageKey = DEFAULT_STORAGE_KEY,
|
|
@@ -5837,9 +5852,13 @@ function useExploreChat(options = {}) {
|
|
|
5837
5852
|
} = options;
|
|
5838
5853
|
const client = useWebSDK();
|
|
5839
5854
|
const promptKey = JSON.stringify(examplePrompts ?? []);
|
|
5855
|
+
const welcomeKey = JSON.stringify(fallbackWelcome ?? null);
|
|
5840
5856
|
const fallbackCatalog = useMemo(
|
|
5841
|
-
() => buildFallbackCatalog(
|
|
5842
|
-
|
|
5857
|
+
() => buildFallbackCatalog(
|
|
5858
|
+
JSON.parse(promptKey),
|
|
5859
|
+
JSON.parse(welcomeKey) ?? void 0
|
|
5860
|
+
),
|
|
5861
|
+
[promptKey, welcomeKey]
|
|
5843
5862
|
);
|
|
5844
5863
|
const [catalog, setCatalog] = useState(fallbackCatalog);
|
|
5845
5864
|
const [messages, setMessages] = useState([]);
|
|
@@ -7214,7 +7233,7 @@ function AssistantBubble({
|
|
|
7214
7233
|
children: [
|
|
7215
7234
|
/* @__PURE__ */ jsx(TriangleAlert, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-400" }),
|
|
7216
7235
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
7217
|
-
|
|
7236
|
+
T.noAnswer,
|
|
7218
7237
|
" ",
|
|
7219
7238
|
/* @__PURE__ */ jsx(
|
|
7220
7239
|
"a",
|
|
@@ -7239,7 +7258,7 @@ function AssistantBubble({
|
|
|
7239
7258
|
streaming ? /* @__PURE__ */ jsx("span", { className: "boff-explore-caret", "aria-hidden": "true" }) : null
|
|
7240
7259
|
] }) : null,
|
|
7241
7260
|
streaming ? /* @__PURE__ */ jsx(ThinkingIndicator, { activity }) : null,
|
|
7242
|
-
failed && !body ? /* @__PURE__ */ jsx("div", { className: "rounded-2xl rounded-tl-md border border-border bg-muted px-4 py-3 text-sm text-muted-foreground", children:
|
|
7261
|
+
failed && !body ? /* @__PURE__ */ jsx("div", { className: "rounded-2xl rounded-tl-md border border-border bg-muted px-4 py-3 text-sm text-muted-foreground", children: T.answerDidNotArrive }) : null,
|
|
7243
7262
|
message.references.length > 0 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
7244
7263
|
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: T.sources }),
|
|
7245
7264
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: message.references.map((reference) => /* @__PURE__ */ jsx(
|
|
@@ -7655,6 +7674,12 @@ function ExplorePage({
|
|
|
7655
7674
|
() => typeof window === "undefined" ? void 0 : window.location.href,
|
|
7656
7675
|
[]
|
|
7657
7676
|
);
|
|
7677
|
+
const activeLocale = useMemo(
|
|
7678
|
+
() => resolveExploreLocale(locale),
|
|
7679
|
+
[locale]
|
|
7680
|
+
);
|
|
7681
|
+
const T = useMemo(() => exploreStrings(activeLocale), [activeLocale]);
|
|
7682
|
+
const rtl = isRtlLocale(activeLocale);
|
|
7658
7683
|
const {
|
|
7659
7684
|
phase,
|
|
7660
7685
|
catalog,
|
|
@@ -7676,7 +7701,15 @@ function ExplorePage({
|
|
|
7676
7701
|
recordClick,
|
|
7677
7702
|
createShareLink,
|
|
7678
7703
|
isSharedView
|
|
7679
|
-
} = useExploreChat({
|
|
7704
|
+
} = useExploreChat({
|
|
7705
|
+
productSlug,
|
|
7706
|
+
pageUrl,
|
|
7707
|
+
onSend,
|
|
7708
|
+
// Locale-aware, so a catalog outage degrades to a translated welcome rather than an
|
|
7709
|
+
// English one. `T.prompts` seeds the chips the same way.
|
|
7710
|
+
examplePrompts: examplePrompts ?? T.prompts,
|
|
7711
|
+
fallbackWelcome: { title: T.welcomeTitle, body: T.welcomeBody }
|
|
7712
|
+
});
|
|
7680
7713
|
const [draft, setDraft] = useState("");
|
|
7681
7714
|
const textareaRef = useRef(null);
|
|
7682
7715
|
const [historyOpen, setHistoryOpen] = useState(false);
|
|
@@ -7694,12 +7727,6 @@ function ExplorePage({
|
|
|
7694
7727
|
}
|
|
7695
7728
|
});
|
|
7696
7729
|
speechStopRef.current = speech.stop;
|
|
7697
|
-
const activeLocale = useMemo(
|
|
7698
|
-
() => resolveExploreLocale(locale),
|
|
7699
|
-
[locale]
|
|
7700
|
-
);
|
|
7701
|
-
const T = useMemo(() => exploreStrings(activeLocale), [activeLocale]);
|
|
7702
|
-
const rtl = isRtlLocale(activeLocale);
|
|
7703
7730
|
const [disclaimerOpen, setDisclaimerOpen] = useState(false);
|
|
7704
7731
|
const [staged, setStaged] = useState([]);
|
|
7705
7732
|
const [attachmentNotice, setAttachmentNotice] = useState(null);
|
|
@@ -7707,7 +7734,7 @@ function ExplorePage({
|
|
|
7707
7734
|
const stagedRef = useRef([]);
|
|
7708
7735
|
stagedRef.current = staged;
|
|
7709
7736
|
const pickQueueRef = useRef(Promise.resolve());
|
|
7710
|
-
const [shareLabel, setShareLabel] = useState(
|
|
7737
|
+
const [shareLabel, setShareLabel] = useState(T.share);
|
|
7711
7738
|
const [shareUrl, setShareUrl] = useState(null);
|
|
7712
7739
|
const scrollRef = useRef(null);
|
|
7713
7740
|
const latestAssistantRef = useRef(null);
|
|
@@ -7764,12 +7791,12 @@ function ExplorePage({
|
|
|
7764
7791
|
el.scrollTop = el.scrollHeight;
|
|
7765
7792
|
}, [activity, latestAssistantId, messages]);
|
|
7766
7793
|
const handleShare = useCallback(async () => {
|
|
7767
|
-
setShareLabel(
|
|
7794
|
+
setShareLabel(T.copying);
|
|
7768
7795
|
setShareUrl(null);
|
|
7769
7796
|
const token = await createShareLink();
|
|
7770
7797
|
if (!token) {
|
|
7771
|
-
setShareLabel(
|
|
7772
|
-
setTimeout(() => setShareLabel(
|
|
7798
|
+
setShareLabel(T.shareUnavailable);
|
|
7799
|
+
setTimeout(() => setShareLabel(T.share), 2500);
|
|
7773
7800
|
return;
|
|
7774
7801
|
}
|
|
7775
7802
|
const url = new URL(pageUrl ?? window.location.href);
|
|
@@ -7779,13 +7806,20 @@ function ExplorePage({
|
|
|
7779
7806
|
const shareable = url.toString();
|
|
7780
7807
|
try {
|
|
7781
7808
|
await navigator.clipboard.writeText(shareable);
|
|
7782
|
-
setShareLabel(
|
|
7783
|
-
setTimeout(() => setShareLabel(
|
|
7809
|
+
setShareLabel(T.copied);
|
|
7810
|
+
setTimeout(() => setShareLabel(T.share), 2500);
|
|
7784
7811
|
} catch {
|
|
7785
7812
|
setShareUrl(shareable);
|
|
7786
|
-
setShareLabel(
|
|
7813
|
+
setShareLabel(T.share);
|
|
7787
7814
|
}
|
|
7788
|
-
}, [
|
|
7815
|
+
}, [
|
|
7816
|
+
createShareLink,
|
|
7817
|
+
pageUrl,
|
|
7818
|
+
T.copied,
|
|
7819
|
+
T.copying,
|
|
7820
|
+
T.share,
|
|
7821
|
+
T.shareUnavailable
|
|
7822
|
+
]);
|
|
7789
7823
|
const handleFilesPicked = useCallback(
|
|
7790
7824
|
(picked) => {
|
|
7791
7825
|
if (!picked || picked.length === 0) return pickQueueRef.current;
|
|
@@ -7901,7 +7935,7 @@ function ExplorePage({
|
|
|
7901
7935
|
onClick: reset,
|
|
7902
7936
|
children: [
|
|
7903
7937
|
/* @__PURE__ */ jsx(RotateCcw, { className: "h-3.5 w-3.5" }),
|
|
7904
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children:
|
|
7938
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: T.newChat })
|
|
7905
7939
|
]
|
|
7906
7940
|
}
|
|
7907
7941
|
),
|
|
@@ -7938,7 +7972,8 @@ function ExplorePage({
|
|
|
7938
7972
|
children: [
|
|
7939
7973
|
/* @__PURE__ */ jsx(History, { className: "h-3.5 w-3.5" }),
|
|
7940
7974
|
/* @__PURE__ */ jsxs("span", { className: "hidden sm:inline", children: [
|
|
7941
|
-
|
|
7975
|
+
T.history,
|
|
7976
|
+
" (",
|
|
7942
7977
|
history.length,
|
|
7943
7978
|
")"
|
|
7944
7979
|
] })
|
|
@@ -7968,7 +8003,7 @@ function ExplorePage({
|
|
|
7968
8003
|
},
|
|
7969
8004
|
children: [
|
|
7970
8005
|
/* @__PURE__ */ jsx(Trash2, { className: "h-3.5 w-3.5" }),
|
|
7971
|
-
|
|
8006
|
+
T.clearHistory
|
|
7972
8007
|
]
|
|
7973
8008
|
}
|
|
7974
8009
|
)
|
|
@@ -8234,7 +8269,7 @@ function ExplorePage({
|
|
|
8234
8269
|
type: "button",
|
|
8235
8270
|
size: "icon",
|
|
8236
8271
|
variant: "secondary",
|
|
8237
|
-
"aria-label":
|
|
8272
|
+
"aria-label": T.stop,
|
|
8238
8273
|
onClick: stop,
|
|
8239
8274
|
children: /* @__PURE__ */ jsx(Square, { className: "h-4 w-4" })
|
|
8240
8275
|
}
|
|
@@ -8245,7 +8280,7 @@ function ExplorePage({
|
|
|
8245
8280
|
type: "submit",
|
|
8246
8281
|
size: "icon",
|
|
8247
8282
|
disabled: !canSubmit,
|
|
8248
|
-
"aria-label":
|
|
8283
|
+
"aria-label": T.send,
|
|
8249
8284
|
children: /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4" })
|
|
8250
8285
|
}
|
|
8251
8286
|
)
|