@burdenoff/website-sdk 2026.922.2 → 2026.922.4
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.d.mts +81 -3
- package/dist/components/explore.d.ts +81 -3
- package/dist/components/explore.js +1022 -143
- package/dist/components/explore.js.map +1 -1
- package/dist/components/explore.mjs +1020 -145
- package/dist/components/explore.mjs.map +1 -1
- package/dist/{explore-types-CLw19R76.d.mts → explore-types-DvQPiL1t.d.mts} +97 -4
- package/dist/{explore-types-CLw19R76.d.ts → explore-types-DvQPiL1t.d.ts} +97 -4
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +129 -11
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +129 -11
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +63 -2
- package/dist/index.d.ts +63 -2
- package/dist/index.js +1019 -143
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1020 -145
- package/dist/index.mjs.map +1 -1
- package/dist/{use-explore-chat-DC47G-C3.d.mts → use-explore-chat-CNEdKBc1.d.ts} +13 -1
- package/dist/{use-explore-chat-DyPMkzXA.d.ts → use-explore-chat-Dgm-jf96.d.mts} +13 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { createContext, useMemo, useState, useRef, useCallback, useEffect, useContext } from 'react';
|
|
3
|
-
import { Sparkles, RotateCcw, Link2, History, Trash2, Paperclip, X, Mic, Square, ArrowUp, BookOpenText, Layers, TriangleAlert, ChevronLeft, ChevronRight, ExternalLink } from 'lucide-react';
|
|
3
|
+
import { Sparkles, RotateCcw, Link2, History, Trash2, Paperclip, X, Mic, Square, ArrowUp, BookOpenText, Layers, TriangleAlert, ChevronLeft, ChevronRight, ExternalLink, Check, Copy, ThumbsUp, ThumbsDown } from 'lucide-react';
|
|
4
4
|
import ReactMarkdown from 'react-markdown';
|
|
5
5
|
import rehypeSanitize from 'rehype-sanitize';
|
|
6
6
|
import remarkGfm from 'remark-gfm';
|
|
@@ -56,10 +56,44 @@ var EN = {
|
|
|
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
57
|
answerDidNotArrive: "That answer didn't come through. Try asking again.",
|
|
58
58
|
askHuman: "ask a human",
|
|
59
|
+
// An offer, not a demand: this row sits under every answer on 38 marketing sites, so the
|
|
60
|
+
// wording has to be shruggable. "Was this helpful?" invites; "Please rate this answer"
|
|
61
|
+
// conscripts.
|
|
62
|
+
feedbackPrompt: "Was this helpful?",
|
|
63
|
+
feedbackHelpful: "Helpful",
|
|
64
|
+
feedbackNotHelpful: "Not helpful",
|
|
65
|
+
feedbackReasonTitle: "What was off?",
|
|
66
|
+
feedbackReasonInaccurate: "Inaccurate",
|
|
67
|
+
feedbackReasonIncomplete: "Incomplete",
|
|
68
|
+
feedbackReasonOffTopic: "Off topic",
|
|
69
|
+
feedbackReasonHardToFollow: "Hard to follow",
|
|
70
|
+
feedbackReasonOther: "Something else",
|
|
71
|
+
feedbackCommentPlaceholder: "Add a detail (optional)",
|
|
72
|
+
feedbackSend: "Send",
|
|
73
|
+
feedbackDismiss: "Dismiss",
|
|
74
|
+
feedbackThanks: "Thanks \u2014 that helps.",
|
|
75
|
+
feedbackNotSent: "That didn't send.",
|
|
59
76
|
prevSuggestion: "Previous suggestion",
|
|
60
77
|
nextSuggestion: "Next suggestion",
|
|
61
78
|
conceptIllustration: "Concept illustration",
|
|
62
79
|
opensInNewTab: "opens in a new tab",
|
|
80
|
+
conceptStripTitle: "Or start from a concept",
|
|
81
|
+
conceptStripLabel: "Concepts you can ask about",
|
|
82
|
+
conceptAsk: "Ask about {title} in {product}",
|
|
83
|
+
conceptAskQuestion: "How does {title} work in {product}?",
|
|
84
|
+
copyAnswer: "Copy answer",
|
|
85
|
+
copyFailed: "Couldn't copy",
|
|
86
|
+
groundedIn: "What this answer is based on",
|
|
87
|
+
sourceCountOne: "1 source",
|
|
88
|
+
sourceCountMany: "{count} sources",
|
|
89
|
+
sourceKindConcept: "Concept",
|
|
90
|
+
sourceKindDocs: "Documentation",
|
|
91
|
+
sourceKindPricing: "Pricing",
|
|
92
|
+
sourceKindUseCase: "Use case",
|
|
93
|
+
sourceKindPage: "Product page",
|
|
94
|
+
seoTitle: "Describe a problem, get an answer",
|
|
95
|
+
seoDescription: "Describe the problem you're facing in your own words and get an answer drawn from our product documentation, with links to the exact pages it came from.",
|
|
96
|
+
seoDescriptionProduct: "Describe the problem you're facing in your own words and get an answer drawn from {product}'s documentation \u2014 and every other product we build \u2014 with links to the exact pages it came from.",
|
|
63
97
|
capabilities: [
|
|
64
98
|
"Grounded in our own docs",
|
|
65
99
|
"Compare across the ecosystem",
|
|
@@ -107,10 +141,41 @@ var ZH = {
|
|
|
107
141
|
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",
|
|
108
142
|
answerDidNotArrive: "\u8FD9\u6761\u56DE\u7B54\u6CA1\u6709\u8FD4\u56DE\u3002\u8BF7\u518D\u95EE\u4E00\u6B21\u3002",
|
|
109
143
|
askHuman: "\u8054\u7CFB\u6211\u4EEC",
|
|
144
|
+
feedbackPrompt: "\u8FD9\u4E2A\u56DE\u7B54\u6709\u5E2E\u52A9\u5417\uFF1F",
|
|
145
|
+
feedbackHelpful: "\u6709\u5E2E\u52A9",
|
|
146
|
+
feedbackNotHelpful: "\u6CA1\u6709\u5E2E\u52A9",
|
|
147
|
+
feedbackReasonTitle: "\u54EA\u91CC\u4E0D\u5BF9\uFF1F",
|
|
148
|
+
feedbackReasonInaccurate: "\u4E0D\u51C6\u786E",
|
|
149
|
+
feedbackReasonIncomplete: "\u4E0D\u5B8C\u6574",
|
|
150
|
+
feedbackReasonOffTopic: "\u7B54\u975E\u6240\u95EE",
|
|
151
|
+
feedbackReasonHardToFollow: "\u770B\u4E0D\u592A\u61C2",
|
|
152
|
+
feedbackReasonOther: "\u5176\u4ED6\u539F\u56E0",
|
|
153
|
+
feedbackCommentPlaceholder: "\u8865\u5145\u8BF4\u660E\uFF08\u53EF\u9009\uFF09",
|
|
154
|
+
feedbackSend: "\u63D0\u4EA4",
|
|
155
|
+
feedbackDismiss: "\u5173\u95ED",
|
|
156
|
+
feedbackThanks: "\u8C22\u8C22\uFF0C\u8FD9\u5BF9\u6211\u4EEC\u5F88\u6709\u5E2E\u52A9\u3002",
|
|
157
|
+
feedbackNotSent: "\u6CA1\u6709\u63D0\u4EA4\u6210\u529F\u3002",
|
|
110
158
|
prevSuggestion: "\u4E0A\u4E00\u4E2A\u5EFA\u8BAE",
|
|
111
159
|
nextSuggestion: "\u4E0B\u4E00\u4E2A\u5EFA\u8BAE",
|
|
112
160
|
conceptIllustration: "\u6982\u5FF5\u793A\u610F\u56FE",
|
|
113
161
|
opensInNewTab: "\u5728\u65B0\u6807\u7B7E\u9875\u4E2D\u6253\u5F00",
|
|
162
|
+
conceptStripTitle: "\u6216\u8005\u4ECE\u4E00\u4E2A\u6982\u5FF5\u5F00\u59CB",
|
|
163
|
+
conceptStripLabel: "\u4F60\u53EF\u4EE5\u8BE2\u95EE\u7684\u6982\u5FF5",
|
|
164
|
+
conceptAsk: "\u8BE2\u95EE {product} \u4E2D\u7684 {title}",
|
|
165
|
+
conceptAskQuestion: "{product} \u7684 {title} \u662F\u600E\u4E48\u8FD0\u4F5C\u7684\uFF1F",
|
|
166
|
+
copyAnswer: "\u590D\u5236\u56DE\u7B54",
|
|
167
|
+
copyFailed: "\u590D\u5236\u5931\u8D25",
|
|
168
|
+
groundedIn: "\u8FD9\u4E2A\u56DE\u7B54\u7684\u4F9D\u636E",
|
|
169
|
+
sourceCountOne: "1 \u4E2A\u6765\u6E90",
|
|
170
|
+
sourceCountMany: "{count} \u4E2A\u6765\u6E90",
|
|
171
|
+
sourceKindConcept: "\u6982\u5FF5",
|
|
172
|
+
sourceKindDocs: "\u6587\u6863",
|
|
173
|
+
sourceKindPricing: "\u4EF7\u683C",
|
|
174
|
+
sourceKindUseCase: "\u5E94\u7528\u573A\u666F",
|
|
175
|
+
sourceKindPage: "\u4EA7\u54C1\u9875\u9762",
|
|
176
|
+
seoTitle: "\u63CF\u8FF0\u95EE\u9898\uFF0C\u83B7\u5F97\u7B54\u6848",
|
|
177
|
+
seoDescription: "\u7528\u4F60\u81EA\u5DF1\u7684\u8BDD\u63CF\u8FF0\u9047\u5230\u7684\u95EE\u9898\uFF0C\u5373\u53EF\u83B7\u5F97\u6765\u81EA\u6211\u4EEC\u4EA7\u54C1\u6587\u6863\u7684\u56DE\u7B54\uFF0C\u5E76\u9644\u4E0A\u7B54\u6848\u51FA\u5904\u7684\u9875\u9762\u94FE\u63A5\u3002",
|
|
178
|
+
seoDescriptionProduct: "\u7528\u4F60\u81EA\u5DF1\u7684\u8BDD\u63CF\u8FF0\u9047\u5230\u7684\u95EE\u9898\uFF0C\u5373\u53EF\u83B7\u5F97\u6765\u81EA {product} \u53CA\u6211\u4EEC\u5176\u4ED6\u4EA7\u54C1\u6587\u6863\u7684\u56DE\u7B54\uFF0C\u5E76\u9644\u4E0A\u7B54\u6848\u51FA\u5904\u7684\u9875\u9762\u94FE\u63A5\u3002",
|
|
114
179
|
capabilities: ["\u57FA\u4E8E\u6211\u4EEC\u81EA\u5DF1\u7684\u6587\u6863", "\u8DE8\u4EA7\u54C1\u5BF9\u6BD4", "\u76F4\u8FBE\u6B63\u786E\u7684\u9875\u9762"],
|
|
115
180
|
prompts: [
|
|
116
181
|
"\u6BCF\u95E8\u8BFE\u7A0B\u90FD\u8BB0\u5728\u4E0D\u540C\u7684\u8868\u683C\u91CC\u3002",
|
|
@@ -154,10 +219,41 @@ var HI = {
|
|
|
154
219
|
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",
|
|
155
220
|
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",
|
|
156
221
|
askHuman: "\u0939\u092E\u0938\u0947 \u0938\u0902\u092A\u0930\u094D\u0915 \u0915\u0930\u0947\u0902",
|
|
222
|
+
feedbackPrompt: "\u0915\u094D\u092F\u093E \u092F\u0939 \u0909\u0924\u094D\u0924\u0930 \u092E\u0926\u0926\u0917\u093E\u0930 \u0925\u093E?",
|
|
223
|
+
feedbackHelpful: "\u092E\u0926\u0926\u0917\u093E\u0930",
|
|
224
|
+
feedbackNotHelpful: "\u092E\u0926\u0926\u0917\u093E\u0930 \u0928\u0939\u0940\u0902",
|
|
225
|
+
feedbackReasonTitle: "\u0915\u094D\u092F\u093E \u0920\u0940\u0915 \u0928\u0939\u0940\u0902 \u0925\u093E?",
|
|
226
|
+
feedbackReasonInaccurate: "\u0917\u093C\u0932\u0924 \u091C\u093E\u0928\u0915\u093E\u0930\u0940",
|
|
227
|
+
feedbackReasonIncomplete: "\u0905\u0927\u0942\u0930\u093E",
|
|
228
|
+
feedbackReasonOffTopic: "\u0935\u093F\u0937\u092F \u0938\u0947 \u0939\u091F\u0915\u0930",
|
|
229
|
+
feedbackReasonHardToFollow: "\u0938\u092E\u091D\u0928\u0947 \u092E\u0947\u0902 \u092E\u0941\u0936\u094D\u0915\u093F\u0932",
|
|
230
|
+
feedbackReasonOther: "\u0915\u0941\u091B \u0914\u0930",
|
|
231
|
+
feedbackCommentPlaceholder: "\u0915\u0941\u091B \u0914\u0930 \u092C\u0924\u093E\u090F\u0902 (\u0935\u0948\u0915\u0932\u094D\u092A\u093F\u0915)",
|
|
232
|
+
feedbackSend: "\u092D\u0947\u091C\u0947\u0902",
|
|
233
|
+
feedbackDismiss: "\u092C\u0902\u0926 \u0915\u0930\u0947\u0902",
|
|
234
|
+
feedbackThanks: "\u0927\u0928\u094D\u092F\u0935\u093E\u0926, \u0907\u0938\u0938\u0947 \u092E\u0926\u0926 \u092E\u093F\u0932\u0924\u0940 \u0939\u0948\u0964",
|
|
235
|
+
feedbackNotSent: "\u092F\u0939 \u092D\u0947\u091C\u093E \u0928\u0939\u0940\u0902 \u091C\u093E \u0938\u0915\u093E\u0964",
|
|
157
236
|
prevSuggestion: "\u092A\u093F\u091B\u0932\u093E \u0938\u0941\u091D\u093E\u0935",
|
|
158
237
|
nextSuggestion: "\u0905\u0917\u0932\u093E \u0938\u0941\u091D\u093E\u0935",
|
|
159
238
|
conceptIllustration: "\u0905\u0935\u0927\u093E\u0930\u0923\u093E \u091A\u093F\u0924\u094D\u0930\u0923",
|
|
160
239
|
opensInNewTab: "\u0928\u090F \u091F\u0948\u092C \u092E\u0947\u0902 \u0916\u0941\u0932\u0924\u093E \u0939\u0948",
|
|
240
|
+
conceptStripTitle: "\u092F\u093E \u0915\u093F\u0938\u0940 \u0905\u0935\u0927\u093E\u0930\u0923\u093E \u0938\u0947 \u0936\u0941\u0930\u0942 \u0915\u0930\u0947\u0902",
|
|
241
|
+
conceptStripLabel: "\u091C\u093F\u0928 \u0905\u0935\u0927\u093E\u0930\u0923\u093E\u0913\u0902 \u0915\u0947 \u092C\u093E\u0930\u0947 \u092E\u0947\u0902 \u0906\u092A \u092A\u0942\u091B \u0938\u0915\u0924\u0947 \u0939\u0948\u0902",
|
|
242
|
+
conceptAsk: "{product} \u092E\u0947\u0902 {title} \u0915\u0947 \u092C\u093E\u0930\u0947 \u092E\u0947\u0902 \u092A\u0942\u091B\u0947\u0902",
|
|
243
|
+
conceptAskQuestion: "{product} \u092E\u0947\u0902 {title} \u0915\u0948\u0938\u0947 \u0915\u093E\u092E \u0915\u0930\u0924\u093E \u0939\u0948?",
|
|
244
|
+
copyAnswer: "\u0909\u0924\u094D\u0924\u0930 \u0915\u0949\u092A\u0940 \u0915\u0930\u0947\u0902",
|
|
245
|
+
copyFailed: "\u0915\u0949\u092A\u0940 \u0928\u0939\u0940\u0902 \u0939\u094B \u0938\u0915\u093E",
|
|
246
|
+
groundedIn: "\u092F\u0939 \u0909\u0924\u094D\u0924\u0930 \u0915\u093F\u0938 \u092A\u0930 \u0906\u0927\u093E\u0930\u093F\u0924 \u0939\u0948",
|
|
247
|
+
sourceCountOne: "1 \u0938\u094D\u0930\u094B\u0924",
|
|
248
|
+
sourceCountMany: "{count} \u0938\u094D\u0930\u094B\u0924",
|
|
249
|
+
sourceKindConcept: "\u0905\u0935\u0927\u093E\u0930\u0923\u093E",
|
|
250
|
+
sourceKindDocs: "\u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C",
|
|
251
|
+
sourceKindPricing: "\u092E\u0942\u0932\u094D\u092F",
|
|
252
|
+
sourceKindUseCase: "\u0909\u092A\u092F\u094B\u0917 \u0915\u093E \u0909\u0926\u093E\u0939\u0930\u0923",
|
|
253
|
+
sourceKindPage: "\u0909\u0924\u094D\u092A\u093E\u0926 \u092A\u0947\u091C",
|
|
254
|
+
seoTitle: "\u0938\u092E\u0938\u094D\u092F\u093E \u092C\u0924\u093E\u090F\u0902, \u091C\u0935\u093E\u092C \u092A\u093E\u090F\u0902",
|
|
255
|
+
seoDescription: "\u0905\u092A\u0928\u0940 \u0938\u092E\u0938\u094D\u092F\u093E \u0905\u092A\u0928\u0947 \u0936\u092C\u094D\u0926\u094B\u0902 \u092E\u0947\u0902 \u092C\u0924\u093E\u090F\u0902 \u0914\u0930 \u0939\u092E\u093E\u0930\u0947 \u0909\u0924\u094D\u092A\u093E\u0926 \u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C\u094B\u0902 \u0938\u0947 \u0932\u093F\u092F\u093E \u0917\u092F\u093E \u091C\u0935\u093E\u092C \u092A\u093E\u090F\u0902, \u0938\u093E\u0925 \u092E\u0947\u0902 \u0909\u0928\u094D\u0939\u0940\u0902 \u092A\u0928\u094D\u0928\u094B\u0902 \u0915\u0947 \u0932\u093F\u0902\u0915 \u091C\u0939\u093E\u0901 \u0938\u0947 \u0935\u0939 \u0906\u092F\u093E \u0939\u0948\u0964",
|
|
256
|
+
seoDescriptionProduct: "\u0905\u092A\u0928\u0940 \u0938\u092E\u0938\u094D\u092F\u093E \u0905\u092A\u0928\u0947 \u0936\u092C\u094D\u0926\u094B\u0902 \u092E\u0947\u0902 \u092C\u0924\u093E\u090F\u0902 \u0914\u0930 {product} \u0924\u0925\u093E \u0939\u092E\u093E\u0930\u0947 \u092C\u093E\u0915\u0940 \u0909\u0924\u094D\u092A\u093E\u0926\u094B\u0902 \u0915\u0947 \u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C\u094B\u0902 \u0938\u0947 \u0932\u093F\u092F\u093E \u0917\u092F\u093E \u091C\u0935\u093E\u092C \u092A\u093E\u090F\u0902, \u0938\u093E\u0925 \u092E\u0947\u0902 \u0909\u0928\u094D\u0939\u0940\u0902 \u092A\u0928\u094D\u0928\u094B\u0902 \u0915\u0947 \u0932\u093F\u0902\u0915 \u091C\u0939\u093E\u0901 \u0938\u0947 \u0935\u0939 \u0906\u092F\u093E \u0939\u0948\u0964",
|
|
161
257
|
capabilities: [
|
|
162
258
|
"\u0939\u092E\u093E\u0930\u0947 \u0905\u092A\u0928\u0947 \u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C\u094B\u0902 \u092A\u0930 \u0906\u0927\u093E\u0930\u093F\u0924",
|
|
163
259
|
"\u0938\u092D\u0940 \u0909\u0924\u094D\u092A\u093E\u0926\u094B\u0902 \u0915\u0940 \u0924\u0941\u0932\u0928\u093E \u0915\u0930\u0947\u0902",
|
|
@@ -205,10 +301,41 @@ var ES = {
|
|
|
205
301
|
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",
|
|
206
302
|
answerDidNotArrive: "Esa respuesta no lleg\xF3. Int\xE9ntalo de nuevo.",
|
|
207
303
|
askHuman: "habla con una persona",
|
|
304
|
+
feedbackPrompt: "\xBFTe ha servido?",
|
|
305
|
+
feedbackHelpful: "Me sirve",
|
|
306
|
+
feedbackNotHelpful: "No me sirve",
|
|
307
|
+
feedbackReasonTitle: "\xBFQu\xE9 ha fallado?",
|
|
308
|
+
feedbackReasonInaccurate: "Es inexacta",
|
|
309
|
+
feedbackReasonIncomplete: "Est\xE1 incompleta",
|
|
310
|
+
feedbackReasonOffTopic: "No viene al caso",
|
|
311
|
+
feedbackReasonHardToFollow: "Cuesta seguirla",
|
|
312
|
+
feedbackReasonOther: "Otra cosa",
|
|
313
|
+
feedbackCommentPlaceholder: "A\xF1ade un detalle (opcional)",
|
|
314
|
+
feedbackSend: "Enviar",
|
|
315
|
+
feedbackDismiss: "Cerrar",
|
|
316
|
+
feedbackThanks: "Gracias, nos sirve.",
|
|
317
|
+
feedbackNotSent: "No se ha podido enviar.",
|
|
208
318
|
prevSuggestion: "Sugerencia anterior",
|
|
209
319
|
nextSuggestion: "Sugerencia siguiente",
|
|
210
320
|
conceptIllustration: "Ilustraci\xF3n del concepto",
|
|
211
321
|
opensInNewTab: "se abre en una pesta\xF1a nueva",
|
|
322
|
+
conceptStripTitle: "O empieza por un concepto",
|
|
323
|
+
conceptStripLabel: "Conceptos sobre los que puedes preguntar",
|
|
324
|
+
conceptAsk: "Preguntar por {title} en {product}",
|
|
325
|
+
conceptAskQuestion: "\xBFC\xF3mo funciona {title} en {product}?",
|
|
326
|
+
copyAnswer: "Copiar respuesta",
|
|
327
|
+
copyFailed: "No se pudo copiar",
|
|
328
|
+
groundedIn: "En qu\xE9 se basa esta respuesta",
|
|
329
|
+
sourceCountOne: "1 fuente",
|
|
330
|
+
sourceCountMany: "{count} fuentes",
|
|
331
|
+
sourceKindConcept: "Concepto",
|
|
332
|
+
sourceKindDocs: "Documentaci\xF3n",
|
|
333
|
+
sourceKindPricing: "Precios",
|
|
334
|
+
sourceKindUseCase: "Caso de uso",
|
|
335
|
+
sourceKindPage: "P\xE1gina de producto",
|
|
336
|
+
seoTitle: "Describe un problema y obt\xE9n una respuesta",
|
|
337
|
+
seoDescription: "Describe con tus palabras el problema que tienes y recibe una respuesta extra\xEDda de la documentaci\xF3n de nuestros productos, con enlaces a las p\xE1ginas exactas de las que procede.",
|
|
338
|
+
seoDescriptionProduct: "Describe con tus palabras el problema que tienes y recibe una respuesta extra\xEDda de la documentaci\xF3n de {product} y del resto de nuestros productos, con enlaces a las p\xE1ginas exactas de las que procede.",
|
|
212
339
|
capabilities: [
|
|
213
340
|
"Basado en nuestra documentaci\xF3n",
|
|
214
341
|
"Compara todo el ecosistema",
|
|
@@ -256,10 +383,41 @@ var AR = {
|
|
|
256
383
|
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",
|
|
257
384
|
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.",
|
|
258
385
|
askHuman: "\u062A\u062D\u062F\u0651\u062B \u0625\u0644\u0649 \u0634\u062E\u0635",
|
|
386
|
+
feedbackPrompt: "\u0647\u0644 \u0643\u0627\u0646\u062A \u0647\u0630\u0647 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0645\u0641\u064A\u062F\u0629\u061F",
|
|
387
|
+
feedbackHelpful: "\u0645\u0641\u064A\u062F\u0629",
|
|
388
|
+
feedbackNotHelpful: "\u063A\u064A\u0631 \u0645\u0641\u064A\u062F\u0629",
|
|
389
|
+
feedbackReasonTitle: "\u0645\u0627 \u0627\u0644\u062E\u0637\u0623 \u0641\u064A\u0647\u0627\u061F",
|
|
390
|
+
feedbackReasonInaccurate: "\u063A\u064A\u0631 \u062F\u0642\u064A\u0642\u0629",
|
|
391
|
+
feedbackReasonIncomplete: "\u0646\u0627\u0642\u0635\u0629",
|
|
392
|
+
feedbackReasonOffTopic: "\u062E\u0627\u0631\u062C \u0627\u0644\u0645\u0648\u0636\u0648\u0639",
|
|
393
|
+
feedbackReasonHardToFollow: "\u0635\u0639\u0628\u0629 \u0627\u0644\u0641\u0647\u0645",
|
|
394
|
+
feedbackReasonOther: "\u0634\u064A\u0621 \u0622\u062E\u0631",
|
|
395
|
+
feedbackCommentPlaceholder: "\u0623\u0636\u0641 \u062A\u0641\u0635\u064A\u0644\u0627\u064B (\u0627\u062E\u062A\u064A\u0627\u0631\u064A)",
|
|
396
|
+
feedbackSend: "\u0625\u0631\u0633\u0627\u0644",
|
|
397
|
+
feedbackDismiss: "\u0625\u063A\u0644\u0627\u0642",
|
|
398
|
+
feedbackThanks: "\u0634\u0643\u0631\u064B\u0627\u060C \u0647\u0630\u0627 \u064A\u0633\u0627\u0639\u062F\u0646\u0627.",
|
|
399
|
+
feedbackNotSent: "\u0644\u0645 \u064A\u062A\u0645 \u0627\u0644\u0625\u0631\u0633\u0627\u0644.",
|
|
259
400
|
prevSuggestion: "\u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u0633\u0627\u0628\u0642",
|
|
260
401
|
nextSuggestion: "\u0627\u0644\u0627\u0642\u062A\u0631\u0627\u062D \u0627\u0644\u062A\u0627\u0644\u064A",
|
|
261
402
|
conceptIllustration: "\u0631\u0633\u0645 \u062A\u0648\u0636\u064A\u062D\u064A \u0644\u0644\u0645\u0641\u0647\u0648\u0645",
|
|
262
403
|
opensInNewTab: "\u064A\u064F\u0641\u062A\u062D \u0641\u064A \u0639\u0644\u0627\u0645\u0629 \u062A\u0628\u0648\u064A\u0628 \u062C\u062F\u064A\u062F\u0629",
|
|
404
|
+
conceptStripTitle: "\u0623\u0648 \u0627\u0628\u062F\u0623 \u0645\u0646 \u0645\u0641\u0647\u0648\u0645",
|
|
405
|
+
conceptStripLabel: "\u0645\u0641\u0627\u0647\u064A\u0645 \u064A\u0645\u0643\u0646\u0643 \u0627\u0644\u0633\u0624\u0627\u0644 \u0639\u0646\u0647\u0627",
|
|
406
|
+
conceptAsk: "\u0627\u0633\u0623\u0644 \u0639\u0646 {title} \u0641\u064A {product}",
|
|
407
|
+
conceptAskQuestion: "\u0643\u064A\u0641 \u064A\u0639\u0645\u0644 {title} \u0641\u064A {product}\u061F",
|
|
408
|
+
copyAnswer: "\u0646\u0633\u062E \u0627\u0644\u0625\u062C\u0627\u0628\u0629",
|
|
409
|
+
copyFailed: "\u062A\u0639\u0630\u0651\u0631 \u0627\u0644\u0646\u0633\u062E",
|
|
410
|
+
groundedIn: "\u0639\u0644\u0649 \u0645\u0627\u0630\u0627 \u062A\u0633\u062A\u0646\u062F \u0647\u0630\u0647 \u0627\u0644\u0625\u062C\u0627\u0628\u0629",
|
|
411
|
+
sourceCountOne: "\u0645\u0635\u062F\u0631 \u0648\u0627\u062D\u062F",
|
|
412
|
+
sourceCountMany: "{count} \u0645\u0635\u0627\u062F\u0631",
|
|
413
|
+
sourceKindConcept: "\u0645\u0641\u0647\u0648\u0645",
|
|
414
|
+
sourceKindDocs: "\u0627\u0644\u062A\u0648\u062B\u064A\u0642",
|
|
415
|
+
sourceKindPricing: "\u0627\u0644\u0623\u0633\u0639\u0627\u0631",
|
|
416
|
+
sourceKindUseCase: "\u062D\u0627\u0644\u0629 \u0627\u0633\u062A\u062E\u062F\u0627\u0645",
|
|
417
|
+
sourceKindPage: "\u0635\u0641\u062D\u0629 \u0627\u0644\u0645\u0646\u062A\u062C",
|
|
418
|
+
seoTitle: "\u0635\u0641 \u0645\u0634\u0643\u0644\u062A\u0643 \u0648\u0627\u062D\u0635\u0644 \u0639\u0644\u0649 \u0625\u062C\u0627\u0628\u0629",
|
|
419
|
+
seoDescription: "\u0635\u0641 \u0627\u0644\u0645\u0634\u0643\u0644\u0629 \u0627\u0644\u062A\u064A \u062A\u0648\u0627\u062C\u0647\u0647\u0627 \u0628\u0643\u0644\u0645\u0627\u062A\u0643 \u0648\u0627\u062D\u0635\u0644 \u0639\u0644\u0649 \u0625\u062C\u0627\u0628\u0629 \u0645\u0633\u062A\u0645\u062F\u0629 \u0645\u0646 \u0648\u062B\u0627\u0626\u0642 \u0645\u0646\u062A\u062C\u0627\u062A\u0646\u0627\u060C \u0645\u0639 \u0631\u0648\u0627\u0628\u0637 \u0625\u0644\u0649 \u0627\u0644\u0635\u0641\u062D\u0627\u062A \u0627\u0644\u062A\u064A \u062C\u0627\u0621\u062A \u0645\u0646\u0647\u0627.",
|
|
420
|
+
seoDescriptionProduct: "\u0635\u0641 \u0627\u0644\u0645\u0634\u0643\u0644\u0629 \u0627\u0644\u062A\u064A \u062A\u0648\u0627\u062C\u0647\u0647\u0627 \u0628\u0643\u0644\u0645\u0627\u062A\u0643 \u0648\u0627\u062D\u0635\u0644 \u0639\u0644\u0649 \u0625\u062C\u0627\u0628\u0629 \u0645\u0633\u062A\u0645\u062F\u0629 \u0645\u0646 \u0648\u062B\u0627\u0626\u0642 {product} \u0648\u0628\u0642\u064A\u0629 \u0645\u0646\u062A\u062C\u0627\u062A\u0646\u0627\u060C \u0645\u0639 \u0631\u0648\u0627\u0628\u0637 \u0625\u0644\u0649 \u0627\u0644\u0635\u0641\u062D\u0627\u062A \u0627\u0644\u062A\u064A \u062C\u0627\u0621\u062A \u0645\u0646\u0647\u0627.",
|
|
263
421
|
capabilities: [
|
|
264
422
|
"\u0645\u0628\u0646\u064A \u0639\u0644\u0649 \u0648\u062B\u0627\u0626\u0642\u0646\u0627",
|
|
265
423
|
"\u0642\u0627\u0631\u0646 \u0639\u0628\u0631 \u0627\u0644\u0645\u0646\u0638\u0648\u0645\u0629",
|
|
@@ -307,10 +465,41 @@ var TA = {
|
|
|
307
465
|
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",
|
|
308
466
|
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.",
|
|
309
467
|
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",
|
|
468
|
+
feedbackPrompt: "\u0B87\u0BA8\u0BCD\u0BA4\u0BAA\u0BCD \u0BAA\u0BA4\u0BBF\u0BB2\u0BCD \u0BAA\u0BAF\u0BA9\u0BC1\u0BB3\u0BCD\u0BB3\u0BA4\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4\u0BA4\u0BBE?",
|
|
469
|
+
feedbackHelpful: "\u0BAA\u0BAF\u0BA9\u0BC1\u0BB3\u0BCD\u0BB3\u0BA4\u0BC1",
|
|
470
|
+
feedbackNotHelpful: "\u0BAA\u0BAF\u0BA9\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8",
|
|
471
|
+
feedbackReasonTitle: "\u0B8E\u0BA9\u0BCD\u0BA9 \u0B9A\u0BB0\u0BBF\u0BAF\u0BBE\u0B95 \u0B87\u0BB2\u0BCD\u0BB2\u0BC8?",
|
|
472
|
+
feedbackReasonInaccurate: "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BA4\u0B95\u0BB5\u0BB2\u0BCD",
|
|
473
|
+
feedbackReasonIncomplete: "\u0BAE\u0BC1\u0BB4\u0BC1\u0BAE\u0BC8\u0BAF\u0BB1\u0BCD\u0BB1\u0BA4\u0BC1",
|
|
474
|
+
feedbackReasonOffTopic: "\u0BA4\u0BB2\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BCD\u0B95\u0BC1 \u0B85\u0BAA\u0BCD\u0BAA\u0BBE\u0BB1\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1",
|
|
475
|
+
feedbackReasonHardToFollow: "\u0BAA\u0BC1\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0B95\u0BCA\u0BB3\u0BCD\u0BB3 \u0B95\u0B9F\u0BBF\u0BA9\u0BAE\u0BCD",
|
|
476
|
+
feedbackReasonOther: "\u0BB5\u0BC7\u0BB1\u0BC1 \u0B8F\u0BA4\u0BCB",
|
|
477
|
+
feedbackCommentPlaceholder: "\u0BAE\u0BC7\u0BB2\u0BC1\u0BAE\u0BCD \u0BB5\u0BBF\u0BB5\u0BB0\u0BAE\u0BCD (\u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD)",
|
|
478
|
+
feedbackSend: "\u0B85\u0BA9\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1",
|
|
479
|
+
feedbackDismiss: "\u0BAE\u0BC2\u0B9F\u0BC1",
|
|
480
|
+
feedbackThanks: "\u0BA8\u0BA9\u0BCD\u0BB1\u0BBF, \u0B87\u0BA4\u0BC1 \u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BC1\u0B95\u0BCD\u0B95\u0BC1 \u0B89\u0BA4\u0BB5\u0BC1\u0B95\u0BBF\u0BB1\u0BA4\u0BC1.",
|
|
481
|
+
feedbackNotSent: "\u0B85\u0BA9\u0BC1\u0BAA\u0BCD\u0BAA \u0BAE\u0BC1\u0B9F\u0BBF\u0BAF\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8.",
|
|
310
482
|
prevSuggestion: "\u0BAE\u0BC1\u0BA8\u0BCD\u0BA4\u0BC8\u0BAF \u0BAA\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0BB0\u0BC8",
|
|
311
483
|
nextSuggestion: "\u0B85\u0B9F\u0BC1\u0BA4\u0BCD\u0BA4 \u0BAA\u0BB0\u0BBF\u0BA8\u0BCD\u0BA4\u0BC1\u0BB0\u0BC8",
|
|
312
484
|
conceptIllustration: "\u0B95\u0BB0\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1 \u0BB5\u0BBF\u0BB3\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BAE\u0BCD",
|
|
313
485
|
opensInNewTab: "\u0BAA\u0BC1\u0BA4\u0BBF\u0BAF \u0BA4\u0BBE\u0BB5\u0BB2\u0BBF\u0BB2\u0BCD \u0BA4\u0BBF\u0BB1\u0B95\u0BCD\u0B95\u0BC1\u0BAE\u0BCD",
|
|
486
|
+
conceptStripTitle: "\u0B85\u0BB2\u0BCD\u0BB2\u0BA4\u0BC1 \u0B92\u0BB0\u0BC1 \u0B95\u0BB0\u0BC1\u0BA4\u0BCD\u0BA4\u0BBF\u0BB2\u0BBF\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4\u0BC1 \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
|
|
487
|
+
conceptStripLabel: "\u0BA8\u0BC0\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B95\u0BC7\u0B9F\u0BCD\u0B95\u0B95\u0BCD\u0B95\u0BC2\u0B9F\u0BBF\u0BAF \u0B95\u0BB0\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BB3\u0BCD",
|
|
488
|
+
conceptAsk: "{product} \u0B87\u0BB2\u0BCD {title} \u0BAA\u0BB1\u0BCD\u0BB1\u0BBF\u0B95\u0BCD \u0B95\u0BC7\u0BB3\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
|
|
489
|
+
conceptAskQuestion: "{product} \u0B87\u0BB2\u0BCD {title} \u0B8E\u0BAA\u0BCD\u0BAA\u0B9F\u0BBF \u0BB5\u0BC7\u0BB2\u0BC8 \u0B9A\u0BC6\u0BAF\u0BCD\u0B95\u0BBF\u0BB1\u0BA4\u0BC1?",
|
|
490
|
+
copyAnswer: "\u0BAA\u0BA4\u0BBF\u0BB2\u0BC8 \u0BA8\u0B95\u0BB2\u0BC6\u0B9F\u0BC1",
|
|
491
|
+
copyFailed: "\u0BA8\u0B95\u0BB2\u0BC6\u0B9F\u0BC1\u0B95\u0BCD\u0B95 \u0BAE\u0BC1\u0B9F\u0BBF\u0BAF\u0BB5\u0BBF\u0BB2\u0BCD\u0BB2\u0BC8",
|
|
492
|
+
groundedIn: "\u0B87\u0BA8\u0BCD\u0BA4\u0BAA\u0BCD \u0BAA\u0BA4\u0BBF\u0BB2\u0BCD \u0B8E\u0BA4\u0BC8 \u0B85\u0B9F\u0BBF\u0BAA\u0BCD\u0BAA\u0B9F\u0BC8\u0BAF\u0BBE\u0B95\u0B95\u0BCD \u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BA4\u0BC1",
|
|
493
|
+
sourceCountOne: "1 \u0BAE\u0BC2\u0BB2\u0BAE\u0BCD",
|
|
494
|
+
sourceCountMany: "{count} \u0BAE\u0BC2\u0BB2\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
|
|
495
|
+
sourceKindConcept: "\u0B95\u0BB0\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1",
|
|
496
|
+
sourceKindDocs: "\u0B86\u0BB5\u0BA3\u0BAE\u0BCD",
|
|
497
|
+
sourceKindPricing: "\u0BB5\u0BBF\u0BB2\u0BC8",
|
|
498
|
+
sourceKindUseCase: "\u0BAA\u0BAF\u0BA9\u0BCD\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1 \u0BA8\u0BBF\u0BB2\u0BC8",
|
|
499
|
+
sourceKindPage: "\u0BA4\u0BAF\u0BBE\u0BB0\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\u0BAA\u0BCD \u0BAA\u0B95\u0BCD\u0B95\u0BAE\u0BCD",
|
|
500
|
+
seoTitle: "\u0B9A\u0BBF\u0B95\u0BCD\u0B95\u0BB2\u0BC8 \u0BB5\u0BBF\u0BB5\u0BB0\u0BBF\u0BAF\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD, \u0BAA\u0BA4\u0BBF\u0BB2\u0BCD \u0BAA\u0BC6\u0BB1\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
|
|
501
|
+
seoDescription: "\u0BA8\u0BC0\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0B95\u0BCA\u0BB3\u0BCD\u0BB3\u0BC1\u0BAE\u0BCD \u0B9A\u0BBF\u0B95\u0BCD\u0B95\u0BB2\u0BC8 \u0B89\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B9A\u0BCA\u0BA8\u0BCD\u0BA4 \u0BB5\u0BBE\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC8\u0B95\u0BB3\u0BBF\u0BB2\u0BCD \u0BB5\u0BBF\u0BB5\u0BB0\u0BBF\u0BAF\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD; \u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0BA4\u0BAF\u0BBE\u0BB0\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1 \u0B86\u0BB5\u0BA3\u0B99\u0BCD\u0B95\u0BB3\u0BBF\u0BB2\u0BBF\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4\u0BC1 \u0BAA\u0BA4\u0BBF\u0BB2\u0BCD \u0B95\u0BBF\u0B9F\u0BC8\u0B95\u0BCD\u0B95\u0BC1\u0BAE\u0BCD, \u0B85\u0BA4\u0BC1 \u0BB5\u0BA8\u0BCD\u0BA4 \u0BAA\u0B95\u0BCD\u0B95\u0B99\u0BCD\u0B95\u0BB3\u0BC1\u0B95\u0BCD\u0B95\u0BBE\u0BA9 \u0B87\u0BA3\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC1\u0B9F\u0BA9\u0BCD.",
|
|
502
|
+
seoDescriptionProduct: "{product} \u0BAE\u0BB1\u0BCD\u0BB1\u0BC1\u0BAE\u0BCD \u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0BAA\u0BBF\u0BB1 \u0BA4\u0BAF\u0BBE\u0BB0\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BBF\u0BA9\u0BCD \u0B86\u0BB5\u0BA3\u0B99\u0BCD\u0B95\u0BB3\u0BBF\u0BB2\u0BBF\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4\u0BC1 \u0BAA\u0BA4\u0BBF\u0BB2\u0BCD \u0BAA\u0BC6\u0BB1, \u0BA8\u0BC0\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0B95\u0BCA\u0BB3\u0BCD\u0BB3\u0BC1\u0BAE\u0BCD \u0B9A\u0BBF\u0B95\u0BCD\u0B95\u0BB2\u0BC8 \u0B89\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B9A\u0BCA\u0BA8\u0BCD\u0BA4 \u0BB5\u0BBE\u0BB0\u0BCD\u0BA4\u0BCD\u0BA4\u0BC8\u0B95\u0BB3\u0BBF\u0BB2\u0BCD \u0BB5\u0BBF\u0BB5\u0BB0\u0BBF\u0BAF\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u2014 \u0B85\u0BA4\u0BC1 \u0BB5\u0BA8\u0BCD\u0BA4 \u0BAA\u0B95\u0BCD\u0B95\u0B99\u0BCD\u0B95\u0BB3\u0BC1\u0B95\u0BCD\u0B95\u0BBE\u0BA9 \u0B87\u0BA3\u0BC8\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC1\u0B9F\u0BA9\u0BCD.",
|
|
314
503
|
capabilities: [
|
|
315
504
|
"\u0B8E\u0B99\u0BCD\u0B95\u0BB3\u0BCD \u0B9A\u0BCA\u0BA8\u0BCD\u0BA4 \u0B86\u0BB5\u0BA3\u0B99\u0BCD\u0B95\u0BB3\u0BBF\u0BA9\u0BCD \u0B85\u0B9F\u0BBF\u0BAA\u0BCD\u0BAA\u0B9F\u0BC8\u0BAF\u0BBF\u0BB2\u0BCD",
|
|
316
505
|
"\u0BA4\u0BAF\u0BBE\u0BB0\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BC8 \u0B92\u0BAA\u0BCD\u0BAA\u0BBF\u0B9F\u0BC1\u0B99\u0BCD\u0B95\u0BB3\u0BCD",
|
|
@@ -351,6 +540,193 @@ function exploreStrings(locale) {
|
|
|
351
540
|
function fill(template, values) {
|
|
352
541
|
return template.replace(/\{(\w+)\}/g, (match, key) => values[key] ?? match);
|
|
353
542
|
}
|
|
543
|
+
|
|
544
|
+
// src/components/explore-types.ts
|
|
545
|
+
var EXPLORE_FEEDBACK_REASONS = [
|
|
546
|
+
"INACCURATE",
|
|
547
|
+
"INCOMPLETE",
|
|
548
|
+
"OFF_TOPIC",
|
|
549
|
+
"HARD_TO_FOLLOW",
|
|
550
|
+
"OTHER"
|
|
551
|
+
];
|
|
552
|
+
var EXPLORE_MESSAGE_FIELDS = (
|
|
553
|
+
/* GraphQL */
|
|
554
|
+
`
|
|
555
|
+
id
|
|
556
|
+
conversationId
|
|
557
|
+
role
|
|
558
|
+
status
|
|
559
|
+
content
|
|
560
|
+
partialContent
|
|
561
|
+
activity
|
|
562
|
+
references {
|
|
563
|
+
url
|
|
564
|
+
title
|
|
565
|
+
description
|
|
566
|
+
product
|
|
567
|
+
imageUrl
|
|
568
|
+
index
|
|
569
|
+
}
|
|
570
|
+
ctas {
|
|
571
|
+
kind
|
|
572
|
+
label
|
|
573
|
+
url
|
|
574
|
+
product
|
|
575
|
+
}
|
|
576
|
+
followUps
|
|
577
|
+
answered
|
|
578
|
+
attachments {
|
|
579
|
+
name
|
|
580
|
+
mimeType
|
|
581
|
+
size
|
|
582
|
+
textExtracted
|
|
583
|
+
}
|
|
584
|
+
errorCode
|
|
585
|
+
createdAt
|
|
586
|
+
completedAt
|
|
587
|
+
`
|
|
588
|
+
);
|
|
589
|
+
var EXPLORE_OWN_MESSAGE_FIELDS = (
|
|
590
|
+
/* GraphQL */
|
|
591
|
+
`
|
|
592
|
+
${EXPLORE_MESSAGE_FIELDS}
|
|
593
|
+
feedback {
|
|
594
|
+
rating
|
|
595
|
+
reason
|
|
596
|
+
comment
|
|
597
|
+
createdAt
|
|
598
|
+
}
|
|
599
|
+
`
|
|
600
|
+
);
|
|
601
|
+
var EXPLORE_CATALOG_ESTABLISHED_FIELDS = (
|
|
602
|
+
/* GraphQL */
|
|
603
|
+
`
|
|
604
|
+
enabled
|
|
605
|
+
products {
|
|
606
|
+
slug
|
|
607
|
+
name
|
|
608
|
+
tagline
|
|
609
|
+
website
|
|
610
|
+
}
|
|
611
|
+
examplePrompts
|
|
612
|
+
welcomeTitle
|
|
613
|
+
welcomeBody
|
|
614
|
+
limits {
|
|
615
|
+
maxMessageLength
|
|
616
|
+
maxTurnsPerConversation
|
|
617
|
+
messagesPerDay
|
|
618
|
+
historyTurns
|
|
619
|
+
}
|
|
620
|
+
captchaRequired
|
|
621
|
+
recaptchaSiteKey`
|
|
622
|
+
);
|
|
623
|
+
var EXPLORE_CATALOG_HIGHLIGHT_FIELD = (
|
|
624
|
+
/* GraphQL */
|
|
625
|
+
`
|
|
626
|
+
conceptHighlights {
|
|
627
|
+
product
|
|
628
|
+
productName
|
|
629
|
+
title
|
|
630
|
+
url
|
|
631
|
+
imageUrl
|
|
632
|
+
alt
|
|
633
|
+
}`
|
|
634
|
+
);
|
|
635
|
+
function exploreCatalogDocument(extraFields) {
|
|
636
|
+
return (
|
|
637
|
+
/* GraphQL */
|
|
638
|
+
`
|
|
639
|
+
query ExploreCatalog($productSlug: String) {
|
|
640
|
+
exploreCatalog(productSlug: $productSlug) {${EXPLORE_CATALOG_ESTABLISHED_FIELDS}${extraFields}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
`
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
var EXPLORE_CATALOG_QUERY = exploreCatalogDocument(
|
|
647
|
+
EXPLORE_CATALOG_HIGHLIGHT_FIELD
|
|
648
|
+
);
|
|
649
|
+
var EXPLORE_CATALOG_QUERY_WITHOUT_HIGHLIGHTS = exploreCatalogDocument("");
|
|
650
|
+
var EXPLORE_MESSAGE_QUERY = (
|
|
651
|
+
/* GraphQL */
|
|
652
|
+
`
|
|
653
|
+
query ExploreMessage($conversationToken: String!, $id: ID!) {
|
|
654
|
+
exploreMessage(conversationToken: $conversationToken, id: $id) {
|
|
655
|
+
${EXPLORE_OWN_MESSAGE_FIELDS}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
`
|
|
659
|
+
);
|
|
660
|
+
var SEND_EXPLORE_MESSAGE_MUTATION = (
|
|
661
|
+
/* GraphQL */
|
|
662
|
+
`
|
|
663
|
+
mutation SendExploreMessage($input: SendExploreMessageInput!) {
|
|
664
|
+
sendExploreMessage(input: $input) {
|
|
665
|
+
conversation {
|
|
666
|
+
id
|
|
667
|
+
token
|
|
668
|
+
productSlug
|
|
669
|
+
turnCount
|
|
670
|
+
createdAt
|
|
671
|
+
}
|
|
672
|
+
userMessage {
|
|
673
|
+
${EXPLORE_OWN_MESSAGE_FIELDS}
|
|
674
|
+
}
|
|
675
|
+
assistantMessage {
|
|
676
|
+
${EXPLORE_OWN_MESSAGE_FIELDS}
|
|
677
|
+
}
|
|
678
|
+
remainingToday
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
`
|
|
682
|
+
);
|
|
683
|
+
var RECORD_EXPLORE_CLICK_MUTATION = (
|
|
684
|
+
/* GraphQL */
|
|
685
|
+
`
|
|
686
|
+
mutation RecordExploreClick($input: RecordExploreClickInput!) {
|
|
687
|
+
recordExploreClick(input: $input) {
|
|
688
|
+
recorded
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
`
|
|
692
|
+
);
|
|
693
|
+
var SUBMIT_EXPLORE_FEEDBACK_MUTATION = (
|
|
694
|
+
/* GraphQL */
|
|
695
|
+
`
|
|
696
|
+
mutation SubmitExploreFeedback($input: SubmitExploreFeedbackInput!) {
|
|
697
|
+
submitExploreFeedback(input: $input) {
|
|
698
|
+
recorded
|
|
699
|
+
feedback {
|
|
700
|
+
rating
|
|
701
|
+
reason
|
|
702
|
+
comment
|
|
703
|
+
createdAt
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
`
|
|
708
|
+
);
|
|
709
|
+
var EXPLORE_FEEDBACK_COMMENT_SOFT_MAX = 500;
|
|
710
|
+
var CREATE_EXPLORE_SHARE_LINK_MUTATION = (
|
|
711
|
+
/* GraphQL */
|
|
712
|
+
`
|
|
713
|
+
mutation CreateExploreShareLink($conversationToken: String!) {
|
|
714
|
+
createExploreShareLink(conversationToken: $conversationToken) {
|
|
715
|
+
shareToken
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
`
|
|
719
|
+
);
|
|
720
|
+
var EXPLORE_SHARED_CONVERSATION_QUERY = (
|
|
721
|
+
/* GraphQL */
|
|
722
|
+
`
|
|
723
|
+
query ExploreSharedConversation($shareToken: String!) {
|
|
724
|
+
exploreSharedConversation(shareToken: $shareToken) {
|
|
725
|
+
${EXPLORE_MESSAGE_FIELDS}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
`
|
|
729
|
+
);
|
|
354
730
|
function MarkdownLink({
|
|
355
731
|
href,
|
|
356
732
|
children,
|
|
@@ -790,135 +1166,6 @@ function useWebSDK() {
|
|
|
790
1166
|
return client;
|
|
791
1167
|
}
|
|
792
1168
|
|
|
793
|
-
// src/components/explore-types.ts
|
|
794
|
-
var EXPLORE_MESSAGE_FIELDS = (
|
|
795
|
-
/* GraphQL */
|
|
796
|
-
`
|
|
797
|
-
id
|
|
798
|
-
conversationId
|
|
799
|
-
role
|
|
800
|
-
status
|
|
801
|
-
content
|
|
802
|
-
partialContent
|
|
803
|
-
activity
|
|
804
|
-
references {
|
|
805
|
-
url
|
|
806
|
-
title
|
|
807
|
-
description
|
|
808
|
-
product
|
|
809
|
-
imageUrl
|
|
810
|
-
index
|
|
811
|
-
}
|
|
812
|
-
ctas {
|
|
813
|
-
kind
|
|
814
|
-
label
|
|
815
|
-
url
|
|
816
|
-
product
|
|
817
|
-
}
|
|
818
|
-
followUps
|
|
819
|
-
answered
|
|
820
|
-
attachments {
|
|
821
|
-
name
|
|
822
|
-
mimeType
|
|
823
|
-
size
|
|
824
|
-
textExtracted
|
|
825
|
-
}
|
|
826
|
-
errorCode
|
|
827
|
-
createdAt
|
|
828
|
-
completedAt
|
|
829
|
-
`
|
|
830
|
-
);
|
|
831
|
-
var EXPLORE_CATALOG_QUERY = (
|
|
832
|
-
/* GraphQL */
|
|
833
|
-
`
|
|
834
|
-
query ExploreCatalog($productSlug: String) {
|
|
835
|
-
exploreCatalog(productSlug: $productSlug) {
|
|
836
|
-
enabled
|
|
837
|
-
products {
|
|
838
|
-
slug
|
|
839
|
-
name
|
|
840
|
-
tagline
|
|
841
|
-
website
|
|
842
|
-
}
|
|
843
|
-
examplePrompts
|
|
844
|
-
welcomeTitle
|
|
845
|
-
welcomeBody
|
|
846
|
-
limits {
|
|
847
|
-
maxMessageLength
|
|
848
|
-
maxTurnsPerConversation
|
|
849
|
-
messagesPerDay
|
|
850
|
-
historyTurns
|
|
851
|
-
}
|
|
852
|
-
captchaRequired
|
|
853
|
-
recaptchaSiteKey
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
`
|
|
857
|
-
);
|
|
858
|
-
var EXPLORE_MESSAGE_QUERY = (
|
|
859
|
-
/* GraphQL */
|
|
860
|
-
`
|
|
861
|
-
query ExploreMessage($conversationToken: String!, $id: ID!) {
|
|
862
|
-
exploreMessage(conversationToken: $conversationToken, id: $id) {
|
|
863
|
-
${EXPLORE_MESSAGE_FIELDS}
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
`
|
|
867
|
-
);
|
|
868
|
-
var SEND_EXPLORE_MESSAGE_MUTATION = (
|
|
869
|
-
/* GraphQL */
|
|
870
|
-
`
|
|
871
|
-
mutation SendExploreMessage($input: SendExploreMessageInput!) {
|
|
872
|
-
sendExploreMessage(input: $input) {
|
|
873
|
-
conversation {
|
|
874
|
-
id
|
|
875
|
-
token
|
|
876
|
-
productSlug
|
|
877
|
-
turnCount
|
|
878
|
-
createdAt
|
|
879
|
-
}
|
|
880
|
-
userMessage {
|
|
881
|
-
${EXPLORE_MESSAGE_FIELDS}
|
|
882
|
-
}
|
|
883
|
-
assistantMessage {
|
|
884
|
-
${EXPLORE_MESSAGE_FIELDS}
|
|
885
|
-
}
|
|
886
|
-
remainingToday
|
|
887
|
-
}
|
|
888
|
-
}
|
|
889
|
-
`
|
|
890
|
-
);
|
|
891
|
-
var RECORD_EXPLORE_CLICK_MUTATION = (
|
|
892
|
-
/* GraphQL */
|
|
893
|
-
`
|
|
894
|
-
mutation RecordExploreClick($input: RecordExploreClickInput!) {
|
|
895
|
-
recordExploreClick(input: $input) {
|
|
896
|
-
recorded
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
`
|
|
900
|
-
);
|
|
901
|
-
var CREATE_EXPLORE_SHARE_LINK_MUTATION = (
|
|
902
|
-
/* GraphQL */
|
|
903
|
-
`
|
|
904
|
-
mutation CreateExploreShareLink($conversationToken: String!) {
|
|
905
|
-
createExploreShareLink(conversationToken: $conversationToken) {
|
|
906
|
-
shareToken
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
`
|
|
910
|
-
);
|
|
911
|
-
var EXPLORE_SHARED_CONVERSATION_QUERY = (
|
|
912
|
-
/* GraphQL */
|
|
913
|
-
`
|
|
914
|
-
query ExploreSharedConversation($shareToken: String!) {
|
|
915
|
-
exploreSharedConversation(shareToken: $shareToken) {
|
|
916
|
-
${EXPLORE_MESSAGE_FIELDS}
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
`
|
|
920
|
-
);
|
|
921
|
-
|
|
922
1169
|
// src/data/products.ts
|
|
923
1170
|
var ECOSYSTEM_PRODUCTS = [
|
|
924
1171
|
{
|
|
@@ -1202,7 +1449,12 @@ function buildFallbackCatalog(examplePrompts, welcome) {
|
|
|
1202
1449
|
welcomeBody: welcome?.body ?? FALLBACK_WELCOME_BODY,
|
|
1203
1450
|
limits: FALLBACK_EXPLORE_LIMITS,
|
|
1204
1451
|
captchaRequired: false,
|
|
1205
|
-
recaptchaSiteKey: null
|
|
1452
|
+
recaptchaSiteKey: null,
|
|
1453
|
+
// Empty, and deliberately not synthesised from `ECOSYSTEM_PRODUCTS`: a concept highlight
|
|
1454
|
+
// needs a real published illustration URL, and this SDK has no registry of them. An
|
|
1455
|
+
// invented path would render 38 broken frames on the one screen every prerender captures.
|
|
1456
|
+
// The strip renders nothing at all when the list is empty, which is the honest fallback.
|
|
1457
|
+
conceptHighlights: []
|
|
1206
1458
|
};
|
|
1207
1459
|
}
|
|
1208
1460
|
function normalizeCatalog(raw, fallback) {
|
|
@@ -1219,9 +1471,27 @@ function normalizeCatalog(raw, fallback) {
|
|
|
1219
1471
|
historyTurns: raw.limits?.historyTurns || fallback.limits.historyTurns
|
|
1220
1472
|
},
|
|
1221
1473
|
captchaRequired: raw.captchaRequired === true,
|
|
1222
|
-
recaptchaSiteKey: raw.recaptchaSiteKey ?? null
|
|
1474
|
+
recaptchaSiteKey: raw.recaptchaSiteKey ?? null,
|
|
1475
|
+
// `[ExploreConceptHighlight!]!` on the wire, so a gateway that KNOWS the field always
|
|
1476
|
+
// sends an array. The one response that arrives without it is the retry against an older
|
|
1477
|
+
// supergraph (`EXPLORE_CATALOG_QUERY_WITHOUT_HIGHLIGHTS`) — that gateway does not answer
|
|
1478
|
+
// the full document at all, it refuses it. Either way
|
|
1479
|
+
// `catalog.conceptHighlights.filter(...)` on `undefined` would throw inside render,
|
|
1480
|
+
// blanking the welcome screen over a decorative strip.
|
|
1481
|
+
conceptHighlights: raw.conceptHighlights?.length ? raw.conceptHighlights : fallback.conceptHighlights
|
|
1223
1482
|
};
|
|
1224
1483
|
}
|
|
1484
|
+
var CATALOG_DOCUMENT_REJECTED_CODES = /* @__PURE__ */ new Set([
|
|
1485
|
+
"GRAPHQL_VALIDATION_FAILED",
|
|
1486
|
+
"HTTP_400"
|
|
1487
|
+
]);
|
|
1488
|
+
function catalogRejectedTheHighlightField(res) {
|
|
1489
|
+
if (res.data?.exploreCatalog) return false;
|
|
1490
|
+
return (res.errors ?? []).some((error) => {
|
|
1491
|
+
const code = error.extensions?.code;
|
|
1492
|
+
return typeof code === "string" && CATALOG_DOCUMENT_REJECTED_CODES.has(code) || error.message.includes("conceptHighlights");
|
|
1493
|
+
});
|
|
1494
|
+
}
|
|
1225
1495
|
var RATE_LIMIT_CODES = /* @__PURE__ */ new Set([
|
|
1226
1496
|
"RATE_LIMITED",
|
|
1227
1497
|
"HTTP_429",
|
|
@@ -1561,11 +1831,19 @@ function useExploreChat(options = {}) {
|
|
|
1561
1831
|
useEffect(() => {
|
|
1562
1832
|
let cancelled = false;
|
|
1563
1833
|
const load = async () => {
|
|
1564
|
-
const
|
|
1834
|
+
const variables = { productSlug: productSlug ?? null };
|
|
1835
|
+
let res = await client.query(
|
|
1565
1836
|
EXPLORE_CATALOG_QUERY,
|
|
1566
|
-
|
|
1837
|
+
variables
|
|
1567
1838
|
);
|
|
1568
1839
|
if (cancelled || !mountedRef.current) return;
|
|
1840
|
+
if (catalogRejectedTheHighlightField(res)) {
|
|
1841
|
+
res = await client.query(
|
|
1842
|
+
EXPLORE_CATALOG_QUERY_WITHOUT_HIGHLIGHTS,
|
|
1843
|
+
variables
|
|
1844
|
+
);
|
|
1845
|
+
if (cancelled || !mountedRef.current) return;
|
|
1846
|
+
}
|
|
1569
1847
|
const raw = res.data?.exploreCatalog;
|
|
1570
1848
|
if (res.errors?.length || !raw) {
|
|
1571
1849
|
console.warn(
|
|
@@ -1946,6 +2224,42 @@ function useExploreChat(options = {}) {
|
|
|
1946
2224
|
},
|
|
1947
2225
|
[client]
|
|
1948
2226
|
);
|
|
2227
|
+
const submitFeedback = useCallback(
|
|
2228
|
+
async (messageId, rating, detail) => {
|
|
2229
|
+
const token = conversationTokenRef.current;
|
|
2230
|
+
if (!token) return false;
|
|
2231
|
+
const comment = detail?.comment?.trim();
|
|
2232
|
+
const input = {
|
|
2233
|
+
conversationToken: token,
|
|
2234
|
+
messageId,
|
|
2235
|
+
rating,
|
|
2236
|
+
// Only meaningful with NOT_HELPFUL. The server stores null for HELPFUL either
|
|
2237
|
+
// way; sending it would just be noise the backend has to defend against.
|
|
2238
|
+
reason: rating === "NOT_HELPFUL" ? detail?.reason ?? null : null,
|
|
2239
|
+
comment: comment ? comment : null
|
|
2240
|
+
};
|
|
2241
|
+
try {
|
|
2242
|
+
const res = await client.mutate(
|
|
2243
|
+
SUBMIT_EXPLORE_FEEDBACK_MUTATION,
|
|
2244
|
+
{ input }
|
|
2245
|
+
);
|
|
2246
|
+
const result = res?.data?.submitExploreFeedback;
|
|
2247
|
+
if (!result?.recorded) return false;
|
|
2248
|
+
const recorded = result.feedback;
|
|
2249
|
+
if (recorded && mountedRef.current) {
|
|
2250
|
+
setMessages(
|
|
2251
|
+
(current) => current.map(
|
|
2252
|
+
(message) => message.id === messageId ? { ...message, feedback: recorded } : message
|
|
2253
|
+
)
|
|
2254
|
+
);
|
|
2255
|
+
}
|
|
2256
|
+
return true;
|
|
2257
|
+
} catch {
|
|
2258
|
+
return false;
|
|
2259
|
+
}
|
|
2260
|
+
},
|
|
2261
|
+
[client]
|
|
2262
|
+
);
|
|
1949
2263
|
return {
|
|
1950
2264
|
phase,
|
|
1951
2265
|
catalog,
|
|
@@ -1965,6 +2279,7 @@ function useExploreChat(options = {}) {
|
|
|
1965
2279
|
deleteConversation,
|
|
1966
2280
|
clearHistory,
|
|
1967
2281
|
recordClick,
|
|
2282
|
+
submitFeedback,
|
|
1968
2283
|
createShareLink,
|
|
1969
2284
|
isSharedView
|
|
1970
2285
|
};
|
|
@@ -2823,6 +3138,122 @@ function isInlineImageAllowed(src, origins) {
|
|
|
2823
3138
|
if (url.protocol !== "https:" || url.username || url.password) return false;
|
|
2824
3139
|
return origins.has(url.origin);
|
|
2825
3140
|
}
|
|
3141
|
+
var REFERENCE_KIND_ORDER = [
|
|
3142
|
+
"CONCEPT",
|
|
3143
|
+
"DOCS",
|
|
3144
|
+
"PRICING",
|
|
3145
|
+
"USE_CASE",
|
|
3146
|
+
"PAGE"
|
|
3147
|
+
];
|
|
3148
|
+
var PRODUCT_SUBDOMAINS = [
|
|
3149
|
+
"alphadocs.",
|
|
3150
|
+
"alphaapp.",
|
|
3151
|
+
"docs.",
|
|
3152
|
+
"alpha.",
|
|
3153
|
+
"app.",
|
|
3154
|
+
"www."
|
|
3155
|
+
];
|
|
3156
|
+
function readCatalogUrl(raw) {
|
|
3157
|
+
let parsed;
|
|
3158
|
+
try {
|
|
3159
|
+
parsed = new URL(raw);
|
|
3160
|
+
} catch {
|
|
3161
|
+
return null;
|
|
3162
|
+
}
|
|
3163
|
+
if (parsed.protocol !== "https:") return null;
|
|
3164
|
+
const host = parsed.hostname.toLowerCase();
|
|
3165
|
+
const prefix = PRODUCT_SUBDOMAINS.find(
|
|
3166
|
+
(candidate) => host.startsWith(candidate)
|
|
3167
|
+
);
|
|
3168
|
+
const apex = prefix === void 0 ? host : host.slice(prefix.length);
|
|
3169
|
+
const port = parsed.port ? `:${parsed.port}` : "";
|
|
3170
|
+
return {
|
|
3171
|
+
origin: `https://${apex}${port}`,
|
|
3172
|
+
prefix,
|
|
3173
|
+
pathname: parsed.pathname
|
|
3174
|
+
};
|
|
3175
|
+
}
|
|
3176
|
+
function referenceKindOf(url, origins) {
|
|
3177
|
+
const parsed = readCatalogUrl(url);
|
|
3178
|
+
if (parsed === null || !origins.has(parsed.origin)) return null;
|
|
3179
|
+
if (parsed.prefix === "docs." || parsed.prefix === "alphadocs.")
|
|
3180
|
+
return "DOCS";
|
|
3181
|
+
const segment = parsed.pathname.toLowerCase().split("/").filter(Boolean)[0] ?? "";
|
|
3182
|
+
if (segment === "concept" || segment === "concepts") return "CONCEPT";
|
|
3183
|
+
if (segment === "docs") return "DOCS";
|
|
3184
|
+
if (segment === "pricing" || segment === "plans") return "PRICING";
|
|
3185
|
+
if (segment === "use-case" || segment === "use-cases" || segment === "solutions") {
|
|
3186
|
+
return "USE_CASE";
|
|
3187
|
+
}
|
|
3188
|
+
return "PAGE";
|
|
3189
|
+
}
|
|
3190
|
+
function productNamesByOrigin(products) {
|
|
3191
|
+
const names = /* @__PURE__ */ new Map();
|
|
3192
|
+
for (const product of products) {
|
|
3193
|
+
let url;
|
|
3194
|
+
try {
|
|
3195
|
+
url = new URL(product.website);
|
|
3196
|
+
} catch {
|
|
3197
|
+
continue;
|
|
3198
|
+
}
|
|
3199
|
+
if (url.protocol !== "https:") continue;
|
|
3200
|
+
const apex = url.hostname.replace(/^www\./, "");
|
|
3201
|
+
const port = url.port ? `:${url.port}` : "";
|
|
3202
|
+
const key = `https://${apex}${port}`;
|
|
3203
|
+
if (!names.has(key)) names.set(key, product.name);
|
|
3204
|
+
}
|
|
3205
|
+
return names;
|
|
3206
|
+
}
|
|
3207
|
+
function summariseReferences(references, origins, productNames) {
|
|
3208
|
+
const counts = /* @__PURE__ */ new Map();
|
|
3209
|
+
const products = [];
|
|
3210
|
+
for (const reference of references) {
|
|
3211
|
+
const kind = referenceKindOf(reference.url, origins);
|
|
3212
|
+
if (kind !== null) counts.set(kind, (counts.get(kind) ?? 0) + 1);
|
|
3213
|
+
const parsed = readCatalogUrl(reference.url);
|
|
3214
|
+
const name = (parsed === null ? void 0 : productNames.get(parsed.origin)) ?? (reference.product || null);
|
|
3215
|
+
if (name != null && !products.includes(name)) products.push(name);
|
|
3216
|
+
}
|
|
3217
|
+
return {
|
|
3218
|
+
total: references.length,
|
|
3219
|
+
kinds: REFERENCE_KIND_ORDER.filter((kind) => counts.has(kind)).map(
|
|
3220
|
+
(kind) => ({ kind, count: counts.get(kind) ?? 0 })
|
|
3221
|
+
),
|
|
3222
|
+
products
|
|
3223
|
+
};
|
|
3224
|
+
}
|
|
3225
|
+
var CODE_FENCE = /^\s*(?:```|~~~)/;
|
|
3226
|
+
function answerPlainText(markdown) {
|
|
3227
|
+
const lines = [];
|
|
3228
|
+
let inFence = false;
|
|
3229
|
+
for (const raw of markdown.split("\n")) {
|
|
3230
|
+
if (CODE_FENCE.test(raw)) {
|
|
3231
|
+
inFence = !inFence;
|
|
3232
|
+
continue;
|
|
3233
|
+
}
|
|
3234
|
+
if (inFence) {
|
|
3235
|
+
lines.push(raw);
|
|
3236
|
+
continue;
|
|
3237
|
+
}
|
|
3238
|
+
let line = raw;
|
|
3239
|
+
line = line.replace(/!\[[^\]]*\]\([^)\s]*(?:\s+"[^"]*")?\)/g, "");
|
|
3240
|
+
line = line.replace(/\[([^\]]+)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g, "$1 ($2)");
|
|
3241
|
+
line = line.replace(/<(https?:\/\/[^>\s]+)>/g, "$1");
|
|
3242
|
+
line = line.replace(/^\s{0,3}#{1,6}\s+/, "");
|
|
3243
|
+
line = line.replace(/^\s{0,3}>\s?/, "");
|
|
3244
|
+
if (/^\s{0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/.test(line)) {
|
|
3245
|
+
lines.push("");
|
|
3246
|
+
continue;
|
|
3247
|
+
}
|
|
3248
|
+
line = line.replace(/`([^`]+)`/g, "$1");
|
|
3249
|
+
line = line.replace(/\*\*([^*]+)\*\*/g, "$1");
|
|
3250
|
+
line = line.replace(/__([^_]+)__/g, "$1");
|
|
3251
|
+
line = line.replace(/(^|[^*\w])\*([^*\n]+)\*(?![*\w])/g, "$1$2");
|
|
3252
|
+
line = line.replace(/(^|[^_\w])_([^_\n]+)_(?![_\w])/g, "$1$2");
|
|
3253
|
+
lines.push(line.replace(/[ \t]+$/, ""));
|
|
3254
|
+
}
|
|
3255
|
+
return lines.join("\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
3256
|
+
}
|
|
2826
3257
|
var InlineImageScopeContext = createContext(null);
|
|
2827
3258
|
var InsideLinkContext = createContext(false);
|
|
2828
3259
|
function AnswerLink(props) {
|
|
@@ -3020,6 +3451,315 @@ function ThinkingIndicator({ activity }) {
|
|
|
3020
3451
|
}
|
|
3021
3452
|
);
|
|
3022
3453
|
}
|
|
3454
|
+
function AnswerFeedback({
|
|
3455
|
+
strings: T,
|
|
3456
|
+
messageId,
|
|
3457
|
+
feedback,
|
|
3458
|
+
onSubmit
|
|
3459
|
+
}) {
|
|
3460
|
+
const [local, setLocal] = useState(null);
|
|
3461
|
+
const [failed, setFailed] = useState(false);
|
|
3462
|
+
const [sending, setSending] = useState(false);
|
|
3463
|
+
const [chooserOpen, setChooserOpen] = useState(false);
|
|
3464
|
+
const [reason, setReason] = useState(null);
|
|
3465
|
+
const [comment, setComment] = useState("");
|
|
3466
|
+
const downRef = useRef(null);
|
|
3467
|
+
const firstReasonRef = useRef(null);
|
|
3468
|
+
const inFlightRef = useRef(false);
|
|
3469
|
+
const panelId = `boff-explore-feedback-${messageId}`;
|
|
3470
|
+
const rating = local ?? feedback?.rating ?? null;
|
|
3471
|
+
const rated = rating !== null;
|
|
3472
|
+
const reasonLabels = {
|
|
3473
|
+
INACCURATE: T.feedbackReasonInaccurate,
|
|
3474
|
+
INCOMPLETE: T.feedbackReasonIncomplete,
|
|
3475
|
+
OFF_TOPIC: T.feedbackReasonOffTopic,
|
|
3476
|
+
HARD_TO_FOLLOW: T.feedbackReasonHardToFollow,
|
|
3477
|
+
OTHER: T.feedbackReasonOther
|
|
3478
|
+
};
|
|
3479
|
+
const closeChooser = useCallback(() => {
|
|
3480
|
+
setChooserOpen(false);
|
|
3481
|
+
downRef.current?.focus();
|
|
3482
|
+
}, []);
|
|
3483
|
+
const submit = useCallback(
|
|
3484
|
+
async (next, detail) => {
|
|
3485
|
+
if (inFlightRef.current) return;
|
|
3486
|
+
inFlightRef.current = true;
|
|
3487
|
+
setSending(true);
|
|
3488
|
+
setFailed(false);
|
|
3489
|
+
setLocal(next);
|
|
3490
|
+
const recorded = await onSubmit(next, detail);
|
|
3491
|
+
inFlightRef.current = false;
|
|
3492
|
+
setSending(false);
|
|
3493
|
+
if (recorded) return;
|
|
3494
|
+
setLocal(null);
|
|
3495
|
+
setFailed(true);
|
|
3496
|
+
},
|
|
3497
|
+
[onSubmit]
|
|
3498
|
+
);
|
|
3499
|
+
const onThumbUp = useCallback(() => {
|
|
3500
|
+
setChooserOpen(false);
|
|
3501
|
+
void submit("HELPFUL");
|
|
3502
|
+
}, [submit]);
|
|
3503
|
+
const onThumbDown = useCallback(() => {
|
|
3504
|
+
setChooserOpen((open) => !open);
|
|
3505
|
+
}, []);
|
|
3506
|
+
const onSendReason = useCallback(() => {
|
|
3507
|
+
setChooserOpen(false);
|
|
3508
|
+
void submit("NOT_HELPFUL", { reason, comment });
|
|
3509
|
+
}, [comment, reason, submit]);
|
|
3510
|
+
useEffect(() => {
|
|
3511
|
+
if (!chooserOpen) return;
|
|
3512
|
+
firstReasonRef.current?.focus();
|
|
3513
|
+
}, [chooserOpen]);
|
|
3514
|
+
const thumbClass = (active) => cn(
|
|
3515
|
+
"inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border transition-colors",
|
|
3516
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
3517
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
3518
|
+
active ? "border-primary/40 bg-accent text-primary" : "border-border bg-card text-muted-foreground hover:border-primary/40 hover:bg-accent hover:text-foreground"
|
|
3519
|
+
);
|
|
3520
|
+
return /* @__PURE__ */ jsxs(
|
|
3521
|
+
"div",
|
|
3522
|
+
{
|
|
3523
|
+
"data-boff-explore": "feedback",
|
|
3524
|
+
"data-rating": rating ?? "none",
|
|
3525
|
+
className: "pt-0.5",
|
|
3526
|
+
children: [
|
|
3527
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
|
|
3528
|
+
/* @__PURE__ */ jsx(
|
|
3529
|
+
"p",
|
|
3530
|
+
{
|
|
3531
|
+
"data-boff-explore": "feedback-status",
|
|
3532
|
+
role: "status",
|
|
3533
|
+
className: "text-xs text-muted-foreground",
|
|
3534
|
+
children: failed ? T.feedbackNotSent : rated ? T.feedbackThanks : T.feedbackPrompt
|
|
3535
|
+
}
|
|
3536
|
+
),
|
|
3537
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
3538
|
+
/* @__PURE__ */ jsx(
|
|
3539
|
+
"button",
|
|
3540
|
+
{
|
|
3541
|
+
"data-boff-explore": "feedback-up",
|
|
3542
|
+
type: "button",
|
|
3543
|
+
disabled: sending,
|
|
3544
|
+
"aria-label": T.feedbackHelpful,
|
|
3545
|
+
title: T.feedbackHelpful,
|
|
3546
|
+
"aria-pressed": rating === "HELPFUL",
|
|
3547
|
+
onClick: onThumbUp,
|
|
3548
|
+
className: thumbClass(rating === "HELPFUL"),
|
|
3549
|
+
children: /* @__PURE__ */ jsx(ThumbsUp, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
|
|
3550
|
+
}
|
|
3551
|
+
),
|
|
3552
|
+
/* @__PURE__ */ jsx(
|
|
3553
|
+
"button",
|
|
3554
|
+
{
|
|
3555
|
+
ref: downRef,
|
|
3556
|
+
"data-boff-explore": "feedback-down",
|
|
3557
|
+
type: "button",
|
|
3558
|
+
disabled: sending,
|
|
3559
|
+
"aria-label": T.feedbackNotHelpful,
|
|
3560
|
+
title: T.feedbackNotHelpful,
|
|
3561
|
+
"aria-pressed": rating === "NOT_HELPFUL",
|
|
3562
|
+
"aria-expanded": chooserOpen,
|
|
3563
|
+
"aria-controls": chooserOpen ? panelId : void 0,
|
|
3564
|
+
onClick: onThumbDown,
|
|
3565
|
+
className: thumbClass(rating === "NOT_HELPFUL" || chooserOpen),
|
|
3566
|
+
children: /* @__PURE__ */ jsx(ThumbsDown, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
|
|
3567
|
+
}
|
|
3568
|
+
)
|
|
3569
|
+
] })
|
|
3570
|
+
] }),
|
|
3571
|
+
chooserOpen ? /* @__PURE__ */ jsxs(
|
|
3572
|
+
"div",
|
|
3573
|
+
{
|
|
3574
|
+
id: panelId,
|
|
3575
|
+
"data-boff-explore": "feedback-reasons",
|
|
3576
|
+
role: "group",
|
|
3577
|
+
"aria-label": T.feedbackReasonTitle,
|
|
3578
|
+
onKeyDown: (event) => {
|
|
3579
|
+
if (event.key !== "Escape") return;
|
|
3580
|
+
event.stopPropagation();
|
|
3581
|
+
closeChooser();
|
|
3582
|
+
},
|
|
3583
|
+
className: "boff-explore-fade mt-2 rounded-xl border border-border bg-card p-3",
|
|
3584
|
+
children: [
|
|
3585
|
+
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-medium text-card-foreground", children: T.feedbackReasonTitle }),
|
|
3586
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: EXPLORE_FEEDBACK_REASONS.map((code, index) => /* @__PURE__ */ jsx(
|
|
3587
|
+
"button",
|
|
3588
|
+
{
|
|
3589
|
+
ref: index === 0 ? firstReasonRef : void 0,
|
|
3590
|
+
"data-boff-explore": "feedback-reason",
|
|
3591
|
+
"data-reason": code,
|
|
3592
|
+
type: "button",
|
|
3593
|
+
"aria-pressed": reason === code,
|
|
3594
|
+
onClick: () => setReason((current) => current === code ? null : code),
|
|
3595
|
+
className: cn(
|
|
3596
|
+
"inline-flex max-w-full items-center rounded-full border px-3 py-1 text-xs transition-colors",
|
|
3597
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
3598
|
+
reason === code ? "border-primary/40 bg-accent text-primary" : "border-border bg-background text-muted-foreground hover:border-primary/40 hover:bg-accent hover:text-foreground"
|
|
3599
|
+
),
|
|
3600
|
+
children: /* @__PURE__ */ jsx("span", { className: "truncate", children: reasonLabels[code] })
|
|
3601
|
+
},
|
|
3602
|
+
code
|
|
3603
|
+
)) }),
|
|
3604
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: [
|
|
3605
|
+
/* @__PURE__ */ jsx(
|
|
3606
|
+
"input",
|
|
3607
|
+
{
|
|
3608
|
+
"data-boff-explore": "feedback-comment",
|
|
3609
|
+
type: "text",
|
|
3610
|
+
value: comment,
|
|
3611
|
+
onChange: (event) => setComment(event.target.value),
|
|
3612
|
+
onKeyDown: (event) => {
|
|
3613
|
+
if (event.key !== "Enter") return;
|
|
3614
|
+
event.preventDefault();
|
|
3615
|
+
onSendReason();
|
|
3616
|
+
},
|
|
3617
|
+
"aria-label": T.feedbackCommentPlaceholder,
|
|
3618
|
+
placeholder: T.feedbackCommentPlaceholder,
|
|
3619
|
+
maxLength: EXPLORE_FEEDBACK_COMMENT_SOFT_MAX,
|
|
3620
|
+
className: "min-w-0 flex-1 rounded-md border border-border bg-background px-2 py-1 text-base text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring sm:text-sm"
|
|
3621
|
+
}
|
|
3622
|
+
),
|
|
3623
|
+
/* @__PURE__ */ jsx(
|
|
3624
|
+
Button,
|
|
3625
|
+
{
|
|
3626
|
+
"data-boff-explore": "feedback-send",
|
|
3627
|
+
type: "button",
|
|
3628
|
+
size: "sm",
|
|
3629
|
+
disabled: sending,
|
|
3630
|
+
onClick: onSendReason,
|
|
3631
|
+
children: T.feedbackSend
|
|
3632
|
+
}
|
|
3633
|
+
),
|
|
3634
|
+
/* @__PURE__ */ jsx(
|
|
3635
|
+
Button,
|
|
3636
|
+
{
|
|
3637
|
+
"data-boff-explore": "feedback-dismiss",
|
|
3638
|
+
type: "button",
|
|
3639
|
+
size: "sm",
|
|
3640
|
+
variant: "ghost",
|
|
3641
|
+
className: "text-muted-foreground",
|
|
3642
|
+
onClick: closeChooser,
|
|
3643
|
+
children: T.feedbackDismiss
|
|
3644
|
+
}
|
|
3645
|
+
)
|
|
3646
|
+
] })
|
|
3647
|
+
]
|
|
3648
|
+
}
|
|
3649
|
+
) : null
|
|
3650
|
+
]
|
|
3651
|
+
}
|
|
3652
|
+
);
|
|
3653
|
+
}
|
|
3654
|
+
var PROVENANCE_CHIP = "inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-muted/60 px-2 py-0.5 text-[11px] leading-5 text-muted-foreground";
|
|
3655
|
+
function ProvenanceChips({
|
|
3656
|
+
strings: T,
|
|
3657
|
+
provenance
|
|
3658
|
+
}) {
|
|
3659
|
+
if (provenance.total === 0) return null;
|
|
3660
|
+
const kindLabels = {
|
|
3661
|
+
CONCEPT: T.sourceKindConcept,
|
|
3662
|
+
DOCS: T.sourceKindDocs,
|
|
3663
|
+
PRICING: T.sourceKindPricing,
|
|
3664
|
+
USE_CASE: T.sourceKindUseCase,
|
|
3665
|
+
PAGE: T.sourceKindPage
|
|
3666
|
+
};
|
|
3667
|
+
return /* @__PURE__ */ jsxs(
|
|
3668
|
+
"ul",
|
|
3669
|
+
{
|
|
3670
|
+
"data-boff-explore": "provenance",
|
|
3671
|
+
"aria-label": T.groundedIn,
|
|
3672
|
+
className: "flex flex-wrap items-center gap-1.5",
|
|
3673
|
+
children: [
|
|
3674
|
+
/* @__PURE__ */ jsxs("li", { "data-boff-explore": "provenance-count", className: PROVENANCE_CHIP, children: [
|
|
3675
|
+
/* @__PURE__ */ jsx(BookOpenText, { className: "h-3 w-3 shrink-0", "aria-hidden": "true" }),
|
|
3676
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: provenance.total === 1 ? T.sourceCountOne : fill(T.sourceCountMany, { count: String(provenance.total) }) })
|
|
3677
|
+
] }),
|
|
3678
|
+
provenance.kinds.map(({ kind, count }) => /* @__PURE__ */ jsx(
|
|
3679
|
+
"li",
|
|
3680
|
+
{
|
|
3681
|
+
"data-boff-explore": "provenance-kind",
|
|
3682
|
+
"data-kind": kind,
|
|
3683
|
+
"data-count": count,
|
|
3684
|
+
className: PROVENANCE_CHIP,
|
|
3685
|
+
children: /* @__PURE__ */ jsx("span", { className: "truncate", children: count > 1 ? `${kindLabels[kind]} \xB7 ${count}` : kindLabels[kind] })
|
|
3686
|
+
},
|
|
3687
|
+
kind
|
|
3688
|
+
)),
|
|
3689
|
+
provenance.products.map((name) => /* @__PURE__ */ jsx(
|
|
3690
|
+
"li",
|
|
3691
|
+
{
|
|
3692
|
+
"data-boff-explore": "provenance-product",
|
|
3693
|
+
className: PROVENANCE_CHIP,
|
|
3694
|
+
children: /* @__PURE__ */ jsx("span", { className: "truncate", children: name })
|
|
3695
|
+
},
|
|
3696
|
+
name
|
|
3697
|
+
))
|
|
3698
|
+
]
|
|
3699
|
+
}
|
|
3700
|
+
);
|
|
3701
|
+
}
|
|
3702
|
+
var COPY_FEEDBACK_MS = 2500;
|
|
3703
|
+
function AnswerActions({
|
|
3704
|
+
strings: T,
|
|
3705
|
+
text
|
|
3706
|
+
}) {
|
|
3707
|
+
const [outcome, setOutcome] = useState("idle");
|
|
3708
|
+
const resetRef = useRef(null);
|
|
3709
|
+
useEffect(
|
|
3710
|
+
() => () => {
|
|
3711
|
+
if (resetRef.current !== null) clearTimeout(resetRef.current);
|
|
3712
|
+
},
|
|
3713
|
+
[]
|
|
3714
|
+
);
|
|
3715
|
+
const copy = useCallback(async () => {
|
|
3716
|
+
let copied = false;
|
|
3717
|
+
try {
|
|
3718
|
+
const clipboard = typeof navigator === "undefined" ? void 0 : navigator.clipboard;
|
|
3719
|
+
if (typeof clipboard?.writeText === "function") {
|
|
3720
|
+
await clipboard.writeText(text);
|
|
3721
|
+
copied = true;
|
|
3722
|
+
}
|
|
3723
|
+
} catch {
|
|
3724
|
+
copied = false;
|
|
3725
|
+
}
|
|
3726
|
+
setOutcome(copied ? "copied" : "failed");
|
|
3727
|
+
if (resetRef.current !== null) clearTimeout(resetRef.current);
|
|
3728
|
+
resetRef.current = setTimeout(() => setOutcome("idle"), COPY_FEEDBACK_MS);
|
|
3729
|
+
}, [text]);
|
|
3730
|
+
const label = outcome === "copied" ? T.copied : outcome === "failed" ? T.copyFailed : T.copyAnswer;
|
|
3731
|
+
return /* @__PURE__ */ jsxs(
|
|
3732
|
+
"div",
|
|
3733
|
+
{
|
|
3734
|
+
"data-boff-explore": "answer-actions",
|
|
3735
|
+
className: "flex flex-wrap items-center gap-2 pt-0.5",
|
|
3736
|
+
children: [
|
|
3737
|
+
/* @__PURE__ */ jsxs(
|
|
3738
|
+
"button",
|
|
3739
|
+
{
|
|
3740
|
+
"data-boff-explore": "copy-answer",
|
|
3741
|
+
"data-outcome": outcome,
|
|
3742
|
+
type: "button",
|
|
3743
|
+
title: label,
|
|
3744
|
+
onClick: () => {
|
|
3745
|
+
void copy();
|
|
3746
|
+
},
|
|
3747
|
+
className: cn(
|
|
3748
|
+
"inline-flex max-w-full items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs transition-colors",
|
|
3749
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
3750
|
+
outcome === "failed" ? "border-destructive/40 bg-card text-destructive" : "border-border bg-card text-muted-foreground hover:border-primary/40 hover:bg-accent hover:text-foreground"
|
|
3751
|
+
),
|
|
3752
|
+
children: [
|
|
3753
|
+
outcome === "copied" ? /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 shrink-0", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Copy, { className: "h-3 w-3 shrink-0", "aria-hidden": "true" }),
|
|
3754
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: label })
|
|
3755
|
+
]
|
|
3756
|
+
}
|
|
3757
|
+
),
|
|
3758
|
+
/* @__PURE__ */ jsx("span", { "data-boff-explore": "copy-status", role: "status", className: "sr-only", children: outcome === "idle" ? "" : label })
|
|
3759
|
+
]
|
|
3760
|
+
}
|
|
3761
|
+
);
|
|
3762
|
+
}
|
|
3023
3763
|
function UserBubble({
|
|
3024
3764
|
strings: T,
|
|
3025
3765
|
message
|
|
@@ -3065,10 +3805,12 @@ function AssistantBubble({
|
|
|
3065
3805
|
message,
|
|
3066
3806
|
activity,
|
|
3067
3807
|
imageOrigins,
|
|
3808
|
+
productNames,
|
|
3068
3809
|
onNavigate,
|
|
3069
3810
|
anchorRef,
|
|
3070
3811
|
onFollow,
|
|
3071
|
-
onFollowUp
|
|
3812
|
+
onFollowUp,
|
|
3813
|
+
onFeedback
|
|
3072
3814
|
}) {
|
|
3073
3815
|
const streaming = message.status === "PENDING" || message.status === "RUNNING";
|
|
3074
3816
|
const body = message.content || message.partialContent || "";
|
|
@@ -3092,6 +3834,15 @@ function AssistantBubble({
|
|
|
3092
3834
|
}),
|
|
3093
3835
|
[T, completed, imageOrigins, failedImages, markImageFailed]
|
|
3094
3836
|
);
|
|
3837
|
+
const provenance = useMemo(
|
|
3838
|
+
() => summariseReferences(message.references, imageOrigins, productNames),
|
|
3839
|
+
[message.references, imageOrigins, productNames]
|
|
3840
|
+
);
|
|
3841
|
+
const copyText = useMemo(
|
|
3842
|
+
() => answerPlainText(message.content),
|
|
3843
|
+
[message.content]
|
|
3844
|
+
);
|
|
3845
|
+
const grounded = completed && message.answered !== false;
|
|
3095
3846
|
return /* @__PURE__ */ jsxs(
|
|
3096
3847
|
"div",
|
|
3097
3848
|
{
|
|
@@ -3141,6 +3892,7 @@ function AssistantBubble({
|
|
|
3141
3892
|
/* @__PURE__ */ jsx("div", { className: "boff-prose boff-prose-sm boff-explore-body min-w-0 text-card-foreground", children: /* @__PURE__ */ jsx(InlineImageScopeContext.Provider, { value: imageScope, children: /* @__PURE__ */ jsx(Markdown, { components: ANSWER_MARKDOWN_COMPONENTS, children: body }) }) }),
|
|
3142
3893
|
streaming ? /* @__PURE__ */ jsx("span", { className: "boff-explore-caret", "aria-hidden": "true" }) : null
|
|
3143
3894
|
] }) : null,
|
|
3895
|
+
grounded && provenance.total > 0 ? /* @__PURE__ */ jsx(ProvenanceChips, { strings: T, provenance }) : null,
|
|
3144
3896
|
streaming ? /* @__PURE__ */ jsx(ThinkingIndicator, { activity }) : null,
|
|
3145
3897
|
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,
|
|
3146
3898
|
message.references.length > 0 ? /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -3179,7 +3931,17 @@ function AssistantBubble({
|
|
|
3179
3931
|
},
|
|
3180
3932
|
question
|
|
3181
3933
|
)) })
|
|
3182
|
-
] }) : null
|
|
3934
|
+
] }) : null,
|
|
3935
|
+
completed && copyText !== "" ? /* @__PURE__ */ jsx(AnswerActions, { strings: T, text: copyText }) : null,
|
|
3936
|
+
completed && onFeedback ? /* @__PURE__ */ jsx(
|
|
3937
|
+
AnswerFeedback,
|
|
3938
|
+
{
|
|
3939
|
+
strings: T,
|
|
3940
|
+
messageId: message.id,
|
|
3941
|
+
feedback: message.feedback,
|
|
3942
|
+
onSubmit: onFeedback
|
|
3943
|
+
}
|
|
3944
|
+
) : null
|
|
3183
3945
|
] })
|
|
3184
3946
|
]
|
|
3185
3947
|
}
|
|
@@ -3383,6 +4145,96 @@ function ProductStrip({
|
|
|
3383
4145
|
}
|
|
3384
4146
|
);
|
|
3385
4147
|
}
|
|
4148
|
+
var MAX_CONCEPT_CARDS = 6;
|
|
4149
|
+
function ConceptStrip({
|
|
4150
|
+
strings: T,
|
|
4151
|
+
highlights,
|
|
4152
|
+
onAsk,
|
|
4153
|
+
disabled
|
|
4154
|
+
}) {
|
|
4155
|
+
const [failed, setFailed] = useState(() => /* @__PURE__ */ new Set());
|
|
4156
|
+
const markFailed = useCallback((src) => {
|
|
4157
|
+
setFailed(
|
|
4158
|
+
(current) => current.has(src) ? current : new Set(current).add(src)
|
|
4159
|
+
);
|
|
4160
|
+
}, []);
|
|
4161
|
+
const visible = highlights.filter(
|
|
4162
|
+
(highlight) => highlight.imageUrl !== "" && !failed.has(highlight.imageUrl)
|
|
4163
|
+
).slice(0, MAX_CONCEPT_CARDS);
|
|
4164
|
+
if (visible.length === 0) return null;
|
|
4165
|
+
return /* @__PURE__ */ jsxs(
|
|
4166
|
+
"div",
|
|
4167
|
+
{
|
|
4168
|
+
"data-boff-explore": "concept-strip-block",
|
|
4169
|
+
className: "boff-explore-rise boff-explore-rise-3 mt-6",
|
|
4170
|
+
children: [
|
|
4171
|
+
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: T.conceptStripTitle }),
|
|
4172
|
+
/* @__PURE__ */ jsx(
|
|
4173
|
+
"ul",
|
|
4174
|
+
{
|
|
4175
|
+
"data-boff-explore": "concept-strip",
|
|
4176
|
+
"aria-label": T.conceptStripLabel,
|
|
4177
|
+
className: "boff-explore-strip flex min-w-0 snap-x gap-3 overflow-x-auto pb-1",
|
|
4178
|
+
children: visible.map((highlight) => /* @__PURE__ */ jsx(
|
|
4179
|
+
"li",
|
|
4180
|
+
{
|
|
4181
|
+
className: "shrink-0 snap-start",
|
|
4182
|
+
children: /* @__PURE__ */ jsxs(
|
|
4183
|
+
"button",
|
|
4184
|
+
{
|
|
4185
|
+
"data-boff-explore": "concept-card",
|
|
4186
|
+
"data-product": highlight.product,
|
|
4187
|
+
type: "button",
|
|
4188
|
+
disabled,
|
|
4189
|
+
"aria-label": fill(T.conceptAsk, {
|
|
4190
|
+
title: highlight.title,
|
|
4191
|
+
product: highlight.productName
|
|
4192
|
+
}),
|
|
4193
|
+
onClick: () => onAsk(
|
|
4194
|
+
fill(T.conceptAskQuestion, {
|
|
4195
|
+
title: highlight.title,
|
|
4196
|
+
product: highlight.productName
|
|
4197
|
+
})
|
|
4198
|
+
),
|
|
4199
|
+
className: "group flex w-40 flex-col overflow-hidden rounded-xl border border-border bg-card text-left shadow-sm transition-colors hover:border-primary/50 hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring sm:w-48",
|
|
4200
|
+
children: [
|
|
4201
|
+
/* @__PURE__ */ jsxs("span", { className: "relative block aspect-[16/9] w-full overflow-hidden bg-muted", children: [
|
|
4202
|
+
/* @__PURE__ */ jsx(
|
|
4203
|
+
"img",
|
|
4204
|
+
{
|
|
4205
|
+
src: highlight.imageUrl,
|
|
4206
|
+
alt: highlight.alt,
|
|
4207
|
+
loading: "lazy",
|
|
4208
|
+
decoding: "async",
|
|
4209
|
+
onError: () => markFailed(highlight.imageUrl),
|
|
4210
|
+
className: "h-full w-full object-cover transition-transform duration-300 group-hover:scale-105"
|
|
4211
|
+
}
|
|
4212
|
+
),
|
|
4213
|
+
/* @__PURE__ */ jsx(
|
|
4214
|
+
"span",
|
|
4215
|
+
{
|
|
4216
|
+
"aria-hidden": "true",
|
|
4217
|
+
className: "pointer-events-none absolute left-1.5 top-1.5 rounded-full border border-border bg-background/90 px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide text-foreground",
|
|
4218
|
+
children: T.conceptIllustration
|
|
4219
|
+
}
|
|
4220
|
+
)
|
|
4221
|
+
] }),
|
|
4222
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col gap-0.5 p-2.5", children: [
|
|
4223
|
+
/* @__PURE__ */ jsx("span", { className: "line-clamp-2 text-xs font-semibold leading-snug text-card-foreground", children: highlight.title }),
|
|
4224
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-[11px] text-muted-foreground", children: highlight.productName })
|
|
4225
|
+
] })
|
|
4226
|
+
]
|
|
4227
|
+
}
|
|
4228
|
+
)
|
|
4229
|
+
},
|
|
4230
|
+
`${highlight.product}:${highlight.url}`
|
|
4231
|
+
))
|
|
4232
|
+
}
|
|
4233
|
+
)
|
|
4234
|
+
]
|
|
4235
|
+
}
|
|
4236
|
+
);
|
|
4237
|
+
}
|
|
3386
4238
|
function DisclaimerDialog({
|
|
3387
4239
|
open,
|
|
3388
4240
|
onClose,
|
|
@@ -3489,6 +4341,7 @@ function WelcomeState({
|
|
|
3489
4341
|
body,
|
|
3490
4342
|
prompts,
|
|
3491
4343
|
products,
|
|
4344
|
+
conceptHighlights,
|
|
3492
4345
|
focusProduct,
|
|
3493
4346
|
onPrompt,
|
|
3494
4347
|
onFocus,
|
|
@@ -3527,6 +4380,15 @@ function WelcomeState({
|
|
|
3527
4380
|
}
|
|
3528
4381
|
)
|
|
3529
4382
|
] }) : null,
|
|
4383
|
+
/* @__PURE__ */ jsx(
|
|
4384
|
+
ConceptStrip,
|
|
4385
|
+
{
|
|
4386
|
+
strings: T,
|
|
4387
|
+
highlights: conceptHighlights,
|
|
4388
|
+
onAsk: onPrompt,
|
|
4389
|
+
disabled
|
|
4390
|
+
}
|
|
4391
|
+
),
|
|
3530
4392
|
products.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "boff-explore-rise boff-explore-rise-3 mt-6", children: [
|
|
3531
4393
|
/* @__PURE__ */ jsx("p", { className: "mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: T.focusProduct }),
|
|
3532
4394
|
/* @__PURE__ */ jsx(
|
|
@@ -3583,6 +4445,7 @@ function ExplorePage({
|
|
|
3583
4445
|
deleteConversation,
|
|
3584
4446
|
clearHistory,
|
|
3585
4447
|
recordClick,
|
|
4448
|
+
submitFeedback,
|
|
3586
4449
|
createShareLink,
|
|
3587
4450
|
isSharedView
|
|
3588
4451
|
} = useExploreChat({
|
|
@@ -3639,10 +4502,18 @@ function ExplorePage({
|
|
|
3639
4502
|
() => catalog.products.find((p) => p.slug === focusProduct)?.name ?? null,
|
|
3640
4503
|
[catalog.products, focusProduct]
|
|
3641
4504
|
);
|
|
4505
|
+
const headProductName = useMemo(
|
|
4506
|
+
() => productSlug ? catalog.products.find((p) => p.slug === productSlug)?.name ?? null : null,
|
|
4507
|
+
[catalog.products, productSlug]
|
|
4508
|
+
);
|
|
3642
4509
|
const imageOrigins = useMemo(
|
|
3643
4510
|
() => inlineImageOrigins(catalog.products),
|
|
3644
4511
|
[catalog.products]
|
|
3645
4512
|
);
|
|
4513
|
+
const productNames = useMemo(
|
|
4514
|
+
() => productNamesByOrigin(catalog.products),
|
|
4515
|
+
[catalog.products]
|
|
4516
|
+
);
|
|
3646
4517
|
useEffect(() => {
|
|
3647
4518
|
const el = textareaRef.current;
|
|
3648
4519
|
if (!el) return;
|
|
@@ -4003,16 +4874,17 @@ function ExplorePage({
|
|
|
4003
4874
|
),
|
|
4004
4875
|
style: rootStyle,
|
|
4005
4876
|
children: [
|
|
4006
|
-
|
|
4877
|
+
/* @__PURE__ */ jsx(
|
|
4007
4878
|
PageHead,
|
|
4008
4879
|
{
|
|
4009
|
-
title: seo
|
|
4010
|
-
description: seo
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4880
|
+
title: seo?.title ?? T.seoTitle,
|
|
4881
|
+
description: seo?.description ?? (headProductName ? fill(T.seoDescriptionProduct, { product: headProductName }) : T.seoDescription),
|
|
4882
|
+
productName: seo?.title ? void 0 : headProductName ?? void 0,
|
|
4883
|
+
keywords: seo?.keywords,
|
|
4884
|
+
image: seo?.image,
|
|
4885
|
+
url: seo?.url
|
|
4014
4886
|
}
|
|
4015
|
-
)
|
|
4887
|
+
),
|
|
4016
4888
|
/* @__PURE__ */ jsx(ProseStyles, {}),
|
|
4017
4889
|
/* @__PURE__ */ jsx(ExploreStyles, {}),
|
|
4018
4890
|
!showWelcome ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 border-b border-border px-4 py-2.5", children: [
|
|
@@ -4173,6 +5045,7 @@ function ExplorePage({
|
|
|
4173
5045
|
body: resolvedBody,
|
|
4174
5046
|
prompts,
|
|
4175
5047
|
products: catalog.products,
|
|
5048
|
+
conceptHighlights: catalog.conceptHighlights,
|
|
4176
5049
|
focusProduct,
|
|
4177
5050
|
onPrompt: sendPrompt,
|
|
4178
5051
|
onFocus: setFocusProduct,
|
|
@@ -4186,10 +5059,12 @@ function ExplorePage({
|
|
|
4186
5059
|
message,
|
|
4187
5060
|
activity,
|
|
4188
5061
|
imageOrigins,
|
|
5062
|
+
productNames,
|
|
4189
5063
|
onNavigate,
|
|
4190
5064
|
anchorRef: message.id === latestAssistantId ? latestAssistantRef : void 0,
|
|
4191
5065
|
onFollow: (kind, url) => recordClick(message.id, kind, url),
|
|
4192
|
-
onFollowUp: sendPrompt
|
|
5066
|
+
onFollowUp: sendPrompt,
|
|
5067
|
+
onFeedback: isSharedView ? void 0 : (rating, detail) => submitFeedback(message.id, rating, detail)
|
|
4193
5068
|
},
|
|
4194
5069
|
message.id
|
|
4195
5070
|
)
|
|
@@ -4487,6 +5362,6 @@ function ExplorePage({
|
|
|
4487
5362
|
);
|
|
4488
5363
|
}
|
|
4489
5364
|
|
|
4490
|
-
export { ExplorePage, inlineImageOrigins, isInlineImageAllowed, logoUrlOf };
|
|
5365
|
+
export { ExplorePage, answerPlainText, inlineImageOrigins, isInlineImageAllowed, logoUrlOf, productNamesByOrigin, referenceKindOf, summariseReferences };
|
|
4491
5366
|
//# sourceMappingURL=explore.mjs.map
|
|
4492
5367
|
//# sourceMappingURL=explore.mjs.map
|