@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
|
@@ -80,6 +80,7 @@ var EN = {
|
|
|
80
80
|
attachmentTooLarge: "{{name}} is larger than {{size}} MB and was not attached.",
|
|
81
81
|
attachmentTooMany: "Only {{max}} files can be attached, so {{name}} was skipped.",
|
|
82
82
|
noAnswer: "I couldn't find this in our documentation, so the answer below is not grounded in a source. Try rephrasing, or",
|
|
83
|
+
answerDidNotArrive: "That answer didn't come through. Try asking again.",
|
|
83
84
|
askHuman: "ask a human",
|
|
84
85
|
prevSuggestion: "Previous suggestion",
|
|
85
86
|
nextSuggestion: "Next suggestion",
|
|
@@ -128,6 +129,7 @@ var ZH = {
|
|
|
128
129
|
attachmentTooLarge: "{{name}} \u8D85\u8FC7 {{size}} MB\uFF0C\u672A\u80FD\u6DFB\u52A0\u3002",
|
|
129
130
|
attachmentTooMany: "\u6700\u591A\u53EA\u80FD\u6DFB\u52A0 {{max}} \u4E2A\u6587\u4EF6\uFF0C\u5DF2\u8DF3\u8FC7 {{name}}\u3002",
|
|
130
131
|
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",
|
|
132
|
+
answerDidNotArrive: "\u8FD9\u6761\u56DE\u7B54\u6CA1\u6709\u8FD4\u56DE\u3002\u8BF7\u518D\u95EE\u4E00\u6B21\u3002",
|
|
131
133
|
askHuman: "\u8054\u7CFB\u6211\u4EEC",
|
|
132
134
|
prevSuggestion: "\u4E0A\u4E00\u4E2A\u5EFA\u8BAE",
|
|
133
135
|
nextSuggestion: "\u4E0B\u4E00\u4E2A\u5EFA\u8BAE",
|
|
@@ -172,6 +174,7 @@ var HI = {
|
|
|
172
174
|
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",
|
|
173
175
|
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",
|
|
174
176
|
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",
|
|
177
|
+
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",
|
|
175
178
|
askHuman: "\u0939\u092E\u0938\u0947 \u0938\u0902\u092A\u0930\u094D\u0915 \u0915\u0930\u0947\u0902",
|
|
176
179
|
prevSuggestion: "\u092A\u093F\u091B\u0932\u093E \u0938\u0941\u091D\u093E\u0935",
|
|
177
180
|
nextSuggestion: "\u0905\u0917\u0932\u093E \u0938\u0941\u091D\u093E\u0935",
|
|
@@ -220,6 +223,7 @@ var ES = {
|
|
|
220
223
|
attachmentTooLarge: "{{name}} supera los {{size}} MB y no se adjunt\xF3.",
|
|
221
224
|
attachmentTooMany: "Solo se pueden adjuntar {{max}} archivos, as\xED que se omiti\xF3 {{name}}.",
|
|
222
225
|
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",
|
|
226
|
+
answerDidNotArrive: "Esa respuesta no lleg\xF3. Int\xE9ntalo de nuevo.",
|
|
223
227
|
askHuman: "habla con una persona",
|
|
224
228
|
prevSuggestion: "Sugerencia anterior",
|
|
225
229
|
nextSuggestion: "Sugerencia siguiente",
|
|
@@ -268,6 +272,7 @@ var AR = {
|
|
|
268
272
|
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.",
|
|
269
273
|
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}}.",
|
|
270
274
|
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",
|
|
275
|
+
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.",
|
|
271
276
|
askHuman: "\u062A\u062D\u062F\u0651\u062B \u0625\u0644\u0649 \u0634\u062E\u0635",
|
|
272
277
|
prevSuggestion: "\u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u0633\u0627\u0628\u0642",
|
|
273
278
|
nextSuggestion: "\u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u062A\u0627\u0644\u064A",
|
|
@@ -316,6 +321,7 @@ var TA = {
|
|
|
316
321
|
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.",
|
|
317
322
|
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.",
|
|
318
323
|
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",
|
|
324
|
+
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.",
|
|
319
325
|
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",
|
|
320
326
|
prevSuggestion: "\u0BAE\u0BC1\u0BA8\u0BCD\u0BA4\u0BC8\u0BAF \u0BAA\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0BB0\u0BC8",
|
|
321
327
|
nextSuggestion: "\u0B85\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4 \u0BAA\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0BB0\u0BC8",
|
|
@@ -1186,7 +1192,7 @@ var DEFAULT_EXPLORE_EXAMPLE_PROMPTS = [
|
|
|
1186
1192
|
];
|
|
1187
1193
|
var FALLBACK_WELCOME_TITLE = "Ask anything about our products";
|
|
1188
1194
|
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.";
|
|
1189
|
-
function buildFallbackCatalog(examplePrompts) {
|
|
1195
|
+
function buildFallbackCatalog(examplePrompts, welcome) {
|
|
1190
1196
|
return {
|
|
1191
1197
|
enabled: true,
|
|
1192
1198
|
products: ECOSYSTEM_PRODUCTS.map((p) => ({
|
|
@@ -1196,8 +1202,8 @@ function buildFallbackCatalog(examplePrompts) {
|
|
|
1196
1202
|
website: p.websiteUrl
|
|
1197
1203
|
})),
|
|
1198
1204
|
examplePrompts: examplePrompts?.length ? examplePrompts : DEFAULT_EXPLORE_EXAMPLE_PROMPTS,
|
|
1199
|
-
welcomeTitle: FALLBACK_WELCOME_TITLE,
|
|
1200
|
-
welcomeBody: FALLBACK_WELCOME_BODY,
|
|
1205
|
+
welcomeTitle: welcome?.title ?? FALLBACK_WELCOME_TITLE,
|
|
1206
|
+
welcomeBody: welcome?.body ?? FALLBACK_WELCOME_BODY,
|
|
1201
1207
|
limits: FALLBACK_EXPLORE_LIMITS,
|
|
1202
1208
|
captchaRequired: false,
|
|
1203
1209
|
recaptchaSiteKey: null
|
|
@@ -1257,7 +1263,15 @@ function classifyExploreError(code, serverMessage) {
|
|
|
1257
1263
|
retryable: true
|
|
1258
1264
|
};
|
|
1259
1265
|
}
|
|
1260
|
-
if (c === "
|
|
1266
|
+
if (c === "TOOL_BUDGET") {
|
|
1267
|
+
return {
|
|
1268
|
+
kind: "scope",
|
|
1269
|
+
code: c,
|
|
1270
|
+
message: "That question spans more of our products than I can look through in one go. Try asking about two or three specific products.",
|
|
1271
|
+
retryable: false
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
if (c === "TIMEOUT") {
|
|
1261
1275
|
return {
|
|
1262
1276
|
kind: "timeout",
|
|
1263
1277
|
code: c,
|
|
@@ -1389,6 +1403,7 @@ function useExploreChat(options = {}) {
|
|
|
1389
1403
|
pageUrl,
|
|
1390
1404
|
locale,
|
|
1391
1405
|
examplePrompts,
|
|
1406
|
+
fallbackWelcome,
|
|
1392
1407
|
pollIntervalMs = DEFAULT_POLL_INTERVAL_MS,
|
|
1393
1408
|
pollTimeoutMs = DEFAULT_POLL_TIMEOUT_MS,
|
|
1394
1409
|
storageKey = DEFAULT_STORAGE_KEY,
|
|
@@ -1397,9 +1412,13 @@ function useExploreChat(options = {}) {
|
|
|
1397
1412
|
} = options;
|
|
1398
1413
|
const client = useWebSDK();
|
|
1399
1414
|
const promptKey = JSON.stringify(examplePrompts ?? []);
|
|
1415
|
+
const welcomeKey = JSON.stringify(fallbackWelcome ?? null);
|
|
1400
1416
|
const fallbackCatalog = React.useMemo(
|
|
1401
|
-
() => buildFallbackCatalog(
|
|
1402
|
-
|
|
1417
|
+
() => buildFallbackCatalog(
|
|
1418
|
+
JSON.parse(promptKey),
|
|
1419
|
+
JSON.parse(welcomeKey) ?? void 0
|
|
1420
|
+
),
|
|
1421
|
+
[promptKey, welcomeKey]
|
|
1403
1422
|
);
|
|
1404
1423
|
const [catalog, setCatalog] = React.useState(fallbackCatalog);
|
|
1405
1424
|
const [messages, setMessages] = React.useState([]);
|
|
@@ -2899,7 +2918,7 @@ function AssistantBubble({
|
|
|
2899
2918
|
children: [
|
|
2900
2919
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.TriangleAlert, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-400" }),
|
|
2901
2920
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
2902
|
-
|
|
2921
|
+
T.noAnswer,
|
|
2903
2922
|
" ",
|
|
2904
2923
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2905
2924
|
"a",
|
|
@@ -2924,7 +2943,7 @@ function AssistantBubble({
|
|
|
2924
2943
|
streaming ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "boff-explore-caret", "aria-hidden": "true" }) : null
|
|
2925
2944
|
] }) : null,
|
|
2926
2945
|
streaming ? /* @__PURE__ */ jsxRuntime.jsx(ThinkingIndicator, { activity }) : null,
|
|
2927
|
-
failed && !body ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-2xl rounded-tl-md border border-border bg-muted px-4 py-3 text-sm text-muted-foreground", children:
|
|
2946
|
+
failed && !body ? /* @__PURE__ */ jsxRuntime.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,
|
|
2928
2947
|
message.references.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2929
2948
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: T.sources }),
|
|
2930
2949
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: message.references.map((reference) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3340,6 +3359,12 @@ function ExplorePage({
|
|
|
3340
3359
|
() => typeof window === "undefined" ? void 0 : window.location.href,
|
|
3341
3360
|
[]
|
|
3342
3361
|
);
|
|
3362
|
+
const activeLocale = React.useMemo(
|
|
3363
|
+
() => resolveExploreLocale(locale),
|
|
3364
|
+
[locale]
|
|
3365
|
+
);
|
|
3366
|
+
const T = React.useMemo(() => exploreStrings(activeLocale), [activeLocale]);
|
|
3367
|
+
const rtl = isRtlLocale(activeLocale);
|
|
3343
3368
|
const {
|
|
3344
3369
|
phase,
|
|
3345
3370
|
catalog,
|
|
@@ -3361,7 +3386,15 @@ function ExplorePage({
|
|
|
3361
3386
|
recordClick,
|
|
3362
3387
|
createShareLink,
|
|
3363
3388
|
isSharedView
|
|
3364
|
-
} = useExploreChat({
|
|
3389
|
+
} = useExploreChat({
|
|
3390
|
+
productSlug,
|
|
3391
|
+
pageUrl,
|
|
3392
|
+
onSend,
|
|
3393
|
+
// Locale-aware, so a catalog outage degrades to a translated welcome rather than an
|
|
3394
|
+
// English one. `T.prompts` seeds the chips the same way.
|
|
3395
|
+
examplePrompts: examplePrompts ?? T.prompts,
|
|
3396
|
+
fallbackWelcome: { title: T.welcomeTitle, body: T.welcomeBody }
|
|
3397
|
+
});
|
|
3365
3398
|
const [draft, setDraft] = React.useState("");
|
|
3366
3399
|
const textareaRef = React.useRef(null);
|
|
3367
3400
|
const [historyOpen, setHistoryOpen] = React.useState(false);
|
|
@@ -3379,12 +3412,6 @@ function ExplorePage({
|
|
|
3379
3412
|
}
|
|
3380
3413
|
});
|
|
3381
3414
|
speechStopRef.current = speech.stop;
|
|
3382
|
-
const activeLocale = React.useMemo(
|
|
3383
|
-
() => resolveExploreLocale(locale),
|
|
3384
|
-
[locale]
|
|
3385
|
-
);
|
|
3386
|
-
const T = React.useMemo(() => exploreStrings(activeLocale), [activeLocale]);
|
|
3387
|
-
const rtl = isRtlLocale(activeLocale);
|
|
3388
3415
|
const [disclaimerOpen, setDisclaimerOpen] = React.useState(false);
|
|
3389
3416
|
const [staged, setStaged] = React.useState([]);
|
|
3390
3417
|
const [attachmentNotice, setAttachmentNotice] = React.useState(null);
|
|
@@ -3392,7 +3419,7 @@ function ExplorePage({
|
|
|
3392
3419
|
const stagedRef = React.useRef([]);
|
|
3393
3420
|
stagedRef.current = staged;
|
|
3394
3421
|
const pickQueueRef = React.useRef(Promise.resolve());
|
|
3395
|
-
const [shareLabel, setShareLabel] = React.useState(
|
|
3422
|
+
const [shareLabel, setShareLabel] = React.useState(T.share);
|
|
3396
3423
|
const [shareUrl, setShareUrl] = React.useState(null);
|
|
3397
3424
|
const scrollRef = React.useRef(null);
|
|
3398
3425
|
const latestAssistantRef = React.useRef(null);
|
|
@@ -3449,12 +3476,12 @@ function ExplorePage({
|
|
|
3449
3476
|
el.scrollTop = el.scrollHeight;
|
|
3450
3477
|
}, [activity, latestAssistantId, messages]);
|
|
3451
3478
|
const handleShare = React.useCallback(async () => {
|
|
3452
|
-
setShareLabel(
|
|
3479
|
+
setShareLabel(T.copying);
|
|
3453
3480
|
setShareUrl(null);
|
|
3454
3481
|
const token = await createShareLink();
|
|
3455
3482
|
if (!token) {
|
|
3456
|
-
setShareLabel(
|
|
3457
|
-
setTimeout(() => setShareLabel(
|
|
3483
|
+
setShareLabel(T.shareUnavailable);
|
|
3484
|
+
setTimeout(() => setShareLabel(T.share), 2500);
|
|
3458
3485
|
return;
|
|
3459
3486
|
}
|
|
3460
3487
|
const url = new URL(pageUrl ?? window.location.href);
|
|
@@ -3464,13 +3491,20 @@ function ExplorePage({
|
|
|
3464
3491
|
const shareable = url.toString();
|
|
3465
3492
|
try {
|
|
3466
3493
|
await navigator.clipboard.writeText(shareable);
|
|
3467
|
-
setShareLabel(
|
|
3468
|
-
setTimeout(() => setShareLabel(
|
|
3494
|
+
setShareLabel(T.copied);
|
|
3495
|
+
setTimeout(() => setShareLabel(T.share), 2500);
|
|
3469
3496
|
} catch {
|
|
3470
3497
|
setShareUrl(shareable);
|
|
3471
|
-
setShareLabel(
|
|
3498
|
+
setShareLabel(T.share);
|
|
3472
3499
|
}
|
|
3473
|
-
}, [
|
|
3500
|
+
}, [
|
|
3501
|
+
createShareLink,
|
|
3502
|
+
pageUrl,
|
|
3503
|
+
T.copied,
|
|
3504
|
+
T.copying,
|
|
3505
|
+
T.share,
|
|
3506
|
+
T.shareUnavailable
|
|
3507
|
+
]);
|
|
3474
3508
|
const handleFilesPicked = React.useCallback(
|
|
3475
3509
|
(picked) => {
|
|
3476
3510
|
if (!picked || picked.length === 0) return pickQueueRef.current;
|
|
@@ -3586,7 +3620,7 @@ function ExplorePage({
|
|
|
3586
3620
|
onClick: reset,
|
|
3587
3621
|
children: [
|
|
3588
3622
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.RotateCcw, { className: "h-3.5 w-3.5" }),
|
|
3589
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children:
|
|
3623
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: T.newChat })
|
|
3590
3624
|
]
|
|
3591
3625
|
}
|
|
3592
3626
|
),
|
|
@@ -3623,7 +3657,8 @@ function ExplorePage({
|
|
|
3623
3657
|
children: [
|
|
3624
3658
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "h-3.5 w-3.5" }),
|
|
3625
3659
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "hidden sm:inline", children: [
|
|
3626
|
-
|
|
3660
|
+
T.history,
|
|
3661
|
+
" (",
|
|
3627
3662
|
history.length,
|
|
3628
3663
|
")"
|
|
3629
3664
|
] })
|
|
@@ -3653,7 +3688,7 @@ function ExplorePage({
|
|
|
3653
3688
|
},
|
|
3654
3689
|
children: [
|
|
3655
3690
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "h-3.5 w-3.5" }),
|
|
3656
|
-
|
|
3691
|
+
T.clearHistory
|
|
3657
3692
|
]
|
|
3658
3693
|
}
|
|
3659
3694
|
)
|
|
@@ -3919,7 +3954,7 @@ function ExplorePage({
|
|
|
3919
3954
|
type: "button",
|
|
3920
3955
|
size: "icon",
|
|
3921
3956
|
variant: "secondary",
|
|
3922
|
-
"aria-label":
|
|
3957
|
+
"aria-label": T.stop,
|
|
3923
3958
|
onClick: stop,
|
|
3924
3959
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Square, { className: "h-4 w-4" })
|
|
3925
3960
|
}
|
|
@@ -3930,7 +3965,7 @@ function ExplorePage({
|
|
|
3930
3965
|
type: "submit",
|
|
3931
3966
|
size: "icon",
|
|
3932
3967
|
disabled: !canSubmit,
|
|
3933
|
-
"aria-label":
|
|
3968
|
+
"aria-label": T.send,
|
|
3934
3969
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "h-4 w-4" })
|
|
3935
3970
|
}
|
|
3936
3971
|
)
|