@burdenoff/website-sdk 2026.829.7 → 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 +70 -32
- package/dist/components/explore.js.map +1 -1
- package/dist/components/explore.mjs +70 -32
- 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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +70 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +70 -32
- 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
|
@@ -54,6 +54,7 @@ var EN = {
|
|
|
54
54
|
attachmentTooLarge: "{{name}} is larger than {{size}} MB and was not attached.",
|
|
55
55
|
attachmentTooMany: "Only {{max}} files can be attached, so {{name}} was skipped.",
|
|
56
56
|
noAnswer: "I couldn't find this in our documentation, so the answer below is not grounded in a source. Try rephrasing, or",
|
|
57
|
+
answerDidNotArrive: "That answer didn't come through. Try asking again.",
|
|
57
58
|
askHuman: "ask a human",
|
|
58
59
|
prevSuggestion: "Previous suggestion",
|
|
59
60
|
nextSuggestion: "Next suggestion",
|
|
@@ -102,6 +103,7 @@ var ZH = {
|
|
|
102
103
|
attachmentTooLarge: "{{name}} \u8D85\u8FC7 {{size}} MB\uFF0C\u672A\u80FD\u6DFB\u52A0\u3002",
|
|
103
104
|
attachmentTooMany: "\u6700\u591A\u53EA\u80FD\u6DFB\u52A0 {{max}} \u4E2A\u6587\u4EF6\uFF0C\u5DF2\u8DF3\u8FC7 {{name}}\u3002",
|
|
104
105
|
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",
|
|
106
|
+
answerDidNotArrive: "\u8FD9\u6761\u56DE\u7B54\u6CA1\u6709\u8FD4\u56DE\u3002\u8BF7\u518D\u95EE\u4E00\u6B21\u3002",
|
|
105
107
|
askHuman: "\u8054\u7CFB\u6211\u4EEC",
|
|
106
108
|
prevSuggestion: "\u4E0A\u4E00\u4E2A\u5EFA\u8BAE",
|
|
107
109
|
nextSuggestion: "\u4E0B\u4E00\u4E2A\u5EFA\u8BAE",
|
|
@@ -146,6 +148,7 @@ var HI = {
|
|
|
146
148
|
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",
|
|
147
149
|
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",
|
|
148
150
|
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",
|
|
151
|
+
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",
|
|
149
152
|
askHuman: "\u0939\u092E\u0938\u0947 \u0938\u0902\u092A\u0930\u094D\u0915 \u0915\u0930\u0947\u0902",
|
|
150
153
|
prevSuggestion: "\u092A\u093F\u091B\u0932\u093E \u0938\u0941\u091D\u093E\u0935",
|
|
151
154
|
nextSuggestion: "\u0905\u0917\u0932\u093E \u0938\u0941\u091D\u093E\u0935",
|
|
@@ -194,6 +197,7 @@ var ES = {
|
|
|
194
197
|
attachmentTooLarge: "{{name}} supera los {{size}} MB y no se adjunt\xF3.",
|
|
195
198
|
attachmentTooMany: "Solo se pueden adjuntar {{max}} archivos, as\xED que se omiti\xF3 {{name}}.",
|
|
196
199
|
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",
|
|
200
|
+
answerDidNotArrive: "Esa respuesta no lleg\xF3. Int\xE9ntalo de nuevo.",
|
|
197
201
|
askHuman: "habla con una persona",
|
|
198
202
|
prevSuggestion: "Sugerencia anterior",
|
|
199
203
|
nextSuggestion: "Sugerencia siguiente",
|
|
@@ -242,6 +246,7 @@ var AR = {
|
|
|
242
246
|
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.",
|
|
243
247
|
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}}.",
|
|
244
248
|
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",
|
|
249
|
+
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.",
|
|
245
250
|
askHuman: "\u062A\u062D\u062F\u0651\u062B \u0625\u0644\u0649 \u0634\u062E\u0635",
|
|
246
251
|
prevSuggestion: "\u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u0633\u0627\u0628\u0642",
|
|
247
252
|
nextSuggestion: "\u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u062A\u0627\u0644\u064A",
|
|
@@ -290,6 +295,7 @@ var TA = {
|
|
|
290
295
|
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.",
|
|
291
296
|
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.",
|
|
292
297
|
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",
|
|
298
|
+
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.",
|
|
293
299
|
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",
|
|
294
300
|
prevSuggestion: "\u0BAE\u0BC1\u0BA8\u0BCD\u0BA4\u0BC8\u0BAF \u0BAA\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0BB0\u0BC8",
|
|
295
301
|
nextSuggestion: "\u0B85\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4 \u0BAA\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0BB0\u0BC8",
|
|
@@ -1160,7 +1166,7 @@ var DEFAULT_EXPLORE_EXAMPLE_PROMPTS = [
|
|
|
1160
1166
|
];
|
|
1161
1167
|
var FALLBACK_WELCOME_TITLE = "Ask anything about our products";
|
|
1162
1168
|
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.";
|
|
1163
|
-
function buildFallbackCatalog(examplePrompts) {
|
|
1169
|
+
function buildFallbackCatalog(examplePrompts, welcome) {
|
|
1164
1170
|
return {
|
|
1165
1171
|
enabled: true,
|
|
1166
1172
|
products: ECOSYSTEM_PRODUCTS.map((p) => ({
|
|
@@ -1170,8 +1176,8 @@ function buildFallbackCatalog(examplePrompts) {
|
|
|
1170
1176
|
website: p.websiteUrl
|
|
1171
1177
|
})),
|
|
1172
1178
|
examplePrompts: examplePrompts?.length ? examplePrompts : DEFAULT_EXPLORE_EXAMPLE_PROMPTS,
|
|
1173
|
-
welcomeTitle: FALLBACK_WELCOME_TITLE,
|
|
1174
|
-
welcomeBody: FALLBACK_WELCOME_BODY,
|
|
1179
|
+
welcomeTitle: welcome?.title ?? FALLBACK_WELCOME_TITLE,
|
|
1180
|
+
welcomeBody: welcome?.body ?? FALLBACK_WELCOME_BODY,
|
|
1175
1181
|
limits: FALLBACK_EXPLORE_LIMITS,
|
|
1176
1182
|
captchaRequired: false,
|
|
1177
1183
|
recaptchaSiteKey: null
|
|
@@ -1231,7 +1237,15 @@ function classifyExploreError(code, serverMessage) {
|
|
|
1231
1237
|
retryable: true
|
|
1232
1238
|
};
|
|
1233
1239
|
}
|
|
1234
|
-
if (c === "
|
|
1240
|
+
if (c === "TOOL_BUDGET") {
|
|
1241
|
+
return {
|
|
1242
|
+
kind: "scope",
|
|
1243
|
+
code: c,
|
|
1244
|
+
message: "That question spans more of our products than I can look through in one go. Try asking about two or three specific products.",
|
|
1245
|
+
retryable: false
|
|
1246
|
+
};
|
|
1247
|
+
}
|
|
1248
|
+
if (c === "TIMEOUT") {
|
|
1235
1249
|
return {
|
|
1236
1250
|
kind: "timeout",
|
|
1237
1251
|
code: c,
|
|
@@ -1363,6 +1377,7 @@ function useExploreChat(options = {}) {
|
|
|
1363
1377
|
pageUrl,
|
|
1364
1378
|
locale,
|
|
1365
1379
|
examplePrompts,
|
|
1380
|
+
fallbackWelcome,
|
|
1366
1381
|
pollIntervalMs = DEFAULT_POLL_INTERVAL_MS,
|
|
1367
1382
|
pollTimeoutMs = DEFAULT_POLL_TIMEOUT_MS,
|
|
1368
1383
|
storageKey = DEFAULT_STORAGE_KEY,
|
|
@@ -1371,9 +1386,13 @@ function useExploreChat(options = {}) {
|
|
|
1371
1386
|
} = options;
|
|
1372
1387
|
const client = useWebSDK();
|
|
1373
1388
|
const promptKey = JSON.stringify(examplePrompts ?? []);
|
|
1389
|
+
const welcomeKey = JSON.stringify(fallbackWelcome ?? null);
|
|
1374
1390
|
const fallbackCatalog = useMemo(
|
|
1375
|
-
() => buildFallbackCatalog(
|
|
1376
|
-
|
|
1391
|
+
() => buildFallbackCatalog(
|
|
1392
|
+
JSON.parse(promptKey),
|
|
1393
|
+
JSON.parse(welcomeKey) ?? void 0
|
|
1394
|
+
),
|
|
1395
|
+
[promptKey, welcomeKey]
|
|
1377
1396
|
);
|
|
1378
1397
|
const [catalog, setCatalog] = useState(fallbackCatalog);
|
|
1379
1398
|
const [messages, setMessages] = useState([]);
|
|
@@ -2873,7 +2892,7 @@ function AssistantBubble({
|
|
|
2873
2892
|
children: [
|
|
2874
2893
|
/* @__PURE__ */ jsx(TriangleAlert, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-400" }),
|
|
2875
2894
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
2876
|
-
|
|
2895
|
+
T.noAnswer,
|
|
2877
2896
|
" ",
|
|
2878
2897
|
/* @__PURE__ */ jsx(
|
|
2879
2898
|
"a",
|
|
@@ -2898,7 +2917,7 @@ function AssistantBubble({
|
|
|
2898
2917
|
streaming ? /* @__PURE__ */ jsx("span", { className: "boff-explore-caret", "aria-hidden": "true" }) : null
|
|
2899
2918
|
] }) : null,
|
|
2900
2919
|
streaming ? /* @__PURE__ */ jsx(ThinkingIndicator, { activity }) : null,
|
|
2901
|
-
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:
|
|
2920
|
+
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,
|
|
2902
2921
|
message.references.length > 0 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
2903
2922
|
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: T.sources }),
|
|
2904
2923
|
/* @__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(
|
|
@@ -3314,6 +3333,12 @@ function ExplorePage({
|
|
|
3314
3333
|
() => typeof window === "undefined" ? void 0 : window.location.href,
|
|
3315
3334
|
[]
|
|
3316
3335
|
);
|
|
3336
|
+
const activeLocale = useMemo(
|
|
3337
|
+
() => resolveExploreLocale(locale),
|
|
3338
|
+
[locale]
|
|
3339
|
+
);
|
|
3340
|
+
const T = useMemo(() => exploreStrings(activeLocale), [activeLocale]);
|
|
3341
|
+
const rtl = isRtlLocale(activeLocale);
|
|
3317
3342
|
const {
|
|
3318
3343
|
phase,
|
|
3319
3344
|
catalog,
|
|
@@ -3335,7 +3360,15 @@ function ExplorePage({
|
|
|
3335
3360
|
recordClick,
|
|
3336
3361
|
createShareLink,
|
|
3337
3362
|
isSharedView
|
|
3338
|
-
} = useExploreChat({
|
|
3363
|
+
} = useExploreChat({
|
|
3364
|
+
productSlug,
|
|
3365
|
+
pageUrl,
|
|
3366
|
+
onSend,
|
|
3367
|
+
// Locale-aware, so a catalog outage degrades to a translated welcome rather than an
|
|
3368
|
+
// English one. `T.prompts` seeds the chips the same way.
|
|
3369
|
+
examplePrompts: examplePrompts ?? T.prompts,
|
|
3370
|
+
fallbackWelcome: { title: T.welcomeTitle, body: T.welcomeBody }
|
|
3371
|
+
});
|
|
3339
3372
|
const [draft, setDraft] = useState("");
|
|
3340
3373
|
const textareaRef = useRef(null);
|
|
3341
3374
|
const [historyOpen, setHistoryOpen] = useState(false);
|
|
@@ -3353,12 +3386,6 @@ function ExplorePage({
|
|
|
3353
3386
|
}
|
|
3354
3387
|
});
|
|
3355
3388
|
speechStopRef.current = speech.stop;
|
|
3356
|
-
const activeLocale = useMemo(
|
|
3357
|
-
() => resolveExploreLocale(locale),
|
|
3358
|
-
[locale]
|
|
3359
|
-
);
|
|
3360
|
-
const T = useMemo(() => exploreStrings(activeLocale), [activeLocale]);
|
|
3361
|
-
const rtl = isRtlLocale(activeLocale);
|
|
3362
3389
|
const [disclaimerOpen, setDisclaimerOpen] = useState(false);
|
|
3363
3390
|
const [staged, setStaged] = useState([]);
|
|
3364
3391
|
const [attachmentNotice, setAttachmentNotice] = useState(null);
|
|
@@ -3366,7 +3393,7 @@ function ExplorePage({
|
|
|
3366
3393
|
const stagedRef = useRef([]);
|
|
3367
3394
|
stagedRef.current = staged;
|
|
3368
3395
|
const pickQueueRef = useRef(Promise.resolve());
|
|
3369
|
-
const [shareLabel, setShareLabel] = useState(
|
|
3396
|
+
const [shareLabel, setShareLabel] = useState(T.share);
|
|
3370
3397
|
const [shareUrl, setShareUrl] = useState(null);
|
|
3371
3398
|
const scrollRef = useRef(null);
|
|
3372
3399
|
const latestAssistantRef = useRef(null);
|
|
@@ -3423,25 +3450,35 @@ function ExplorePage({
|
|
|
3423
3450
|
el.scrollTop = el.scrollHeight;
|
|
3424
3451
|
}, [activity, latestAssistantId, messages]);
|
|
3425
3452
|
const handleShare = useCallback(async () => {
|
|
3426
|
-
setShareLabel(
|
|
3453
|
+
setShareLabel(T.copying);
|
|
3427
3454
|
setShareUrl(null);
|
|
3428
3455
|
const token = await createShareLink();
|
|
3429
3456
|
if (!token) {
|
|
3430
|
-
setShareLabel(
|
|
3431
|
-
setTimeout(() => setShareLabel(
|
|
3457
|
+
setShareLabel(T.shareUnavailable);
|
|
3458
|
+
setTimeout(() => setShareLabel(T.share), 2500);
|
|
3432
3459
|
return;
|
|
3433
3460
|
}
|
|
3434
|
-
const
|
|
3435
|
-
|
|
3461
|
+
const url = new URL(pageUrl ?? window.location.href);
|
|
3462
|
+
url.search = "";
|
|
3463
|
+
url.hash = "";
|
|
3464
|
+
url.searchParams.set("c", token);
|
|
3465
|
+
const shareable = url.toString();
|
|
3436
3466
|
try {
|
|
3437
|
-
await navigator.clipboard.writeText(
|
|
3438
|
-
setShareLabel(
|
|
3439
|
-
setTimeout(() => setShareLabel(
|
|
3467
|
+
await navigator.clipboard.writeText(shareable);
|
|
3468
|
+
setShareLabel(T.copied);
|
|
3469
|
+
setTimeout(() => setShareLabel(T.share), 2500);
|
|
3440
3470
|
} catch {
|
|
3441
|
-
setShareUrl(
|
|
3442
|
-
setShareLabel(
|
|
3471
|
+
setShareUrl(shareable);
|
|
3472
|
+
setShareLabel(T.share);
|
|
3443
3473
|
}
|
|
3444
|
-
}, [
|
|
3474
|
+
}, [
|
|
3475
|
+
createShareLink,
|
|
3476
|
+
pageUrl,
|
|
3477
|
+
T.copied,
|
|
3478
|
+
T.copying,
|
|
3479
|
+
T.share,
|
|
3480
|
+
T.shareUnavailable
|
|
3481
|
+
]);
|
|
3445
3482
|
const handleFilesPicked = useCallback(
|
|
3446
3483
|
(picked) => {
|
|
3447
3484
|
if (!picked || picked.length === 0) return pickQueueRef.current;
|
|
@@ -3557,7 +3594,7 @@ function ExplorePage({
|
|
|
3557
3594
|
onClick: reset,
|
|
3558
3595
|
children: [
|
|
3559
3596
|
/* @__PURE__ */ jsx(RotateCcw, { className: "h-3.5 w-3.5" }),
|
|
3560
|
-
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children:
|
|
3597
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: T.newChat })
|
|
3561
3598
|
]
|
|
3562
3599
|
}
|
|
3563
3600
|
),
|
|
@@ -3594,7 +3631,8 @@ function ExplorePage({
|
|
|
3594
3631
|
children: [
|
|
3595
3632
|
/* @__PURE__ */ jsx(History, { className: "h-3.5 w-3.5" }),
|
|
3596
3633
|
/* @__PURE__ */ jsxs("span", { className: "hidden sm:inline", children: [
|
|
3597
|
-
|
|
3634
|
+
T.history,
|
|
3635
|
+
" (",
|
|
3598
3636
|
history.length,
|
|
3599
3637
|
")"
|
|
3600
3638
|
] })
|
|
@@ -3624,7 +3662,7 @@ function ExplorePage({
|
|
|
3624
3662
|
},
|
|
3625
3663
|
children: [
|
|
3626
3664
|
/* @__PURE__ */ jsx(Trash2, { className: "h-3.5 w-3.5" }),
|
|
3627
|
-
|
|
3665
|
+
T.clearHistory
|
|
3628
3666
|
]
|
|
3629
3667
|
}
|
|
3630
3668
|
)
|
|
@@ -3890,7 +3928,7 @@ function ExplorePage({
|
|
|
3890
3928
|
type: "button",
|
|
3891
3929
|
size: "icon",
|
|
3892
3930
|
variant: "secondary",
|
|
3893
|
-
"aria-label":
|
|
3931
|
+
"aria-label": T.stop,
|
|
3894
3932
|
onClick: stop,
|
|
3895
3933
|
children: /* @__PURE__ */ jsx(Square, { className: "h-4 w-4" })
|
|
3896
3934
|
}
|
|
@@ -3901,7 +3939,7 @@ function ExplorePage({
|
|
|
3901
3939
|
type: "submit",
|
|
3902
3940
|
size: "icon",
|
|
3903
3941
|
disabled: !canSubmit,
|
|
3904
|
-
"aria-label":
|
|
3942
|
+
"aria-label": T.send,
|
|
3905
3943
|
children: /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4" })
|
|
3906
3944
|
}
|
|
3907
3945
|
)
|