@box/box-ai-content-answers 1.8.1 → 1.8.2
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/chunks/markdown.module.js +12 -15
- package/dist/esm/lib/box-ai-content-answers.js +50 -46
- package/dist/esm/lib/components/answer/answer-content.js +34 -23
- package/dist/esm/lib/components/answer/answer.js +95 -95
- package/dist/esm/lib/components/chat/chat.js +83 -81
- package/dist/esm/lib/components/common/inline-citation.js +27 -38
- package/dist/esm/lib/components/common/markdown-react.js +108 -93
- package/dist/esm/lib/utils/inlineCitationsUtils.js +20 -24
- package/dist/styles/markdown.css +1 -1
- package/dist/types/lib/box-ai-content-answers.d.ts +8 -0
- package/dist/types/lib/components/answer/answer-content.d.ts +13 -1
- package/dist/types/lib/components/answer/answer.d.ts +2 -0
- package/dist/types/lib/components/chat/chat.d.ts +1 -1
- package/dist/types/lib/components/common/inline-citation.d.ts +2 -0
- package/dist/types/lib/components/common/markdown-react.d.ts +2 -1
- package/dist/types/lib/types.d.ts +2 -0
- package/dist/types/lib/utils/inlineCitationsUtils.d.ts +9 -2
- package/package.json +4 -4
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import '../styles/markdown.css';const n = "
|
|
1
|
+
import '../styles/markdown.css';const n = "_markdownContent_13xwk_1", t = "_inlineParagraph_13xwk_5", e = "_tableWrapper_13xwk_11", i = "_hljs_13xwk_38", a = "_hljsLanguage_13xwk_50", s = "_hljsContent_13xwk_63", _ = "_hljsLine_13xwk_68", l = "_hljsLineNumber_13xwk_73", o = "_hljsLineContent_13xwk_85", r = "_inlineCitation_13xwk_90", h = "_inlineCitationWrapper_13xwk_115", j = {
|
|
2
2
|
markdownContent: n,
|
|
3
|
-
inlineParagraph:
|
|
4
|
-
tableWrapper:
|
|
5
|
-
hljs:
|
|
6
|
-
hljsLanguage:
|
|
7
|
-
hljsContent:
|
|
8
|
-
hljsLine:
|
|
9
|
-
hljsLineNumber:
|
|
10
|
-
hljsLineContent:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"inline-citation-file-icon": "_inline-citation-file-icon_hd94b_104",
|
|
14
|
-
"bp-filter-chip-label": "_bp-filter-chip-label_hd94b_109",
|
|
15
|
-
"inline-citation-filename-label": "_inline-citation-filename-label_hd94b_110"
|
|
3
|
+
inlineParagraph: t,
|
|
4
|
+
tableWrapper: e,
|
|
5
|
+
hljs: i,
|
|
6
|
+
hljsLanguage: a,
|
|
7
|
+
hljsContent: s,
|
|
8
|
+
hljsLine: _,
|
|
9
|
+
hljsLineNumber: l,
|
|
10
|
+
hljsLineContent: o,
|
|
11
|
+
inlineCitation: r,
|
|
12
|
+
inlineCitationWrapper: h
|
|
16
13
|
};
|
|
17
14
|
export {
|
|
18
|
-
|
|
15
|
+
j as s
|
|
19
16
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import p from "clsx";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { C as
|
|
4
|
-
import { jsx as u, jsxs as
|
|
5
|
-
import { Content as
|
|
6
|
-
import { Footer as
|
|
7
|
-
import '../../styles/box-ai-content-answers.css';const
|
|
8
|
-
container:
|
|
9
|
-
contentAnswers:
|
|
10
|
-
sidebar:
|
|
11
|
-
},
|
|
3
|
+
import { C as Y } from "../../chunks/types.js";
|
|
4
|
+
import { jsx as u, jsxs as Z } from "react/jsx-runtime";
|
|
5
|
+
import { Content as $ } from "./components/content/content.js";
|
|
6
|
+
import { Footer as v } from "./components/footer/footer.js";
|
|
7
|
+
import '../../styles/box-ai-content-answers.css';const P = "_container_1p5tb_1", T = "_contentAnswers_1p5tb_8", q = "_sidebar_1p5tb_19", a = {
|
|
8
|
+
container: P,
|
|
9
|
+
contentAnswers: T,
|
|
10
|
+
sidebar: q
|
|
11
|
+
}, ne = ({
|
|
12
12
|
className: _,
|
|
13
13
|
contentType: h,
|
|
14
14
|
contentName: Q,
|
|
@@ -19,63 +19,67 @@ import '../../styles/box-ai-content-answers.css';const $ = "_container_1p5tb_1",
|
|
|
19
19
|
isDebugModeEnabled: E,
|
|
20
20
|
isStopResponseEnabled: M,
|
|
21
21
|
isStreamingEnabled: n,
|
|
22
|
-
|
|
22
|
+
items: R,
|
|
23
|
+
promptValue: x,
|
|
23
24
|
questions: i,
|
|
24
25
|
recordAction: l,
|
|
25
|
-
retryQuestion:
|
|
26
|
-
setPromptValue:
|
|
26
|
+
retryQuestion: C,
|
|
27
|
+
setPromptValue: F,
|
|
27
28
|
showLoadingIndicator: g,
|
|
28
|
-
stopQuestion:
|
|
29
|
-
submitQuestion:
|
|
30
|
-
suggestedQuestions:
|
|
31
|
-
useAnimation:
|
|
32
|
-
onAgentEditorToggle:
|
|
29
|
+
stopQuestion: D,
|
|
30
|
+
submitQuestion: N,
|
|
31
|
+
suggestedQuestions: k,
|
|
32
|
+
useAnimation: j,
|
|
33
|
+
onAgentEditorToggle: I,
|
|
33
34
|
onUserIntentToUseAI: e,
|
|
34
|
-
promptButtonClickHandler:
|
|
35
|
+
promptButtonClickHandler: y,
|
|
35
36
|
variant: o = "modal",
|
|
36
|
-
hostAppName:
|
|
37
|
-
isReactMarkdownEnabled:
|
|
38
|
-
|
|
37
|
+
hostAppName: O,
|
|
38
|
+
isReactMarkdownEnabled: z,
|
|
39
|
+
isInlineCitationV2Enabled: B,
|
|
40
|
+
...G
|
|
39
41
|
}) => {
|
|
40
|
-
const [f, m] = s.useState(null), [S,
|
|
42
|
+
const [f, m] = s.useState(null), [S, L] = s.useState(t != null), [c, H] = s.useState(!1), J = t === Y.LARGE_FILE, K = (!S || J) && !g, b = (r) => {
|
|
41
43
|
l && l({
|
|
42
44
|
...r,
|
|
43
45
|
component: o
|
|
44
46
|
});
|
|
45
|
-
},
|
|
47
|
+
}, V = () => {
|
|
46
48
|
e && e(!1);
|
|
47
|
-
},
|
|
49
|
+
}, W = (r) => {
|
|
48
50
|
m(r), e && e(!0);
|
|
49
|
-
},
|
|
51
|
+
}, X = () => {
|
|
50
52
|
e && e(!0);
|
|
51
53
|
};
|
|
52
54
|
return s.useEffect(() => {
|
|
53
|
-
|
|
55
|
+
L(t != null);
|
|
54
56
|
}, [t]), /* @__PURE__ */ u("div", {
|
|
55
57
|
className: p(_, a.container),
|
|
56
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ Z("div", {
|
|
57
59
|
className: p(a.contentAnswers, o === "sidebar" && a.sidebar),
|
|
58
|
-
children: [!c && /* @__PURE__ */ u(
|
|
59
|
-
...
|
|
60
|
+
children: [!c && /* @__PURE__ */ u($, {
|
|
61
|
+
...G,
|
|
60
62
|
askSuggestedQuestion: f,
|
|
61
63
|
contentName: Q,
|
|
62
64
|
contentType: h,
|
|
63
65
|
error: t,
|
|
64
66
|
hasCustomSuggestedQuestions: w,
|
|
65
67
|
hasRequestInProgress: d,
|
|
66
|
-
hostAppName:
|
|
68
|
+
hostAppName: O,
|
|
67
69
|
isErrorMessageShown: S,
|
|
68
|
-
|
|
70
|
+
isInlineCitationV2Enabled: B,
|
|
71
|
+
isReactMarkdownEnabled: z,
|
|
69
72
|
isStreamingEnabled: n,
|
|
70
|
-
|
|
73
|
+
items: R,
|
|
74
|
+
onSuggestedQuestionInteraction: V,
|
|
71
75
|
questions: i,
|
|
72
76
|
recordAction: b,
|
|
73
|
-
setAskSuggestedQuestion:
|
|
77
|
+
setAskSuggestedQuestion: W,
|
|
74
78
|
showLoadingIndicator: g,
|
|
75
|
-
suggestedQuestions:
|
|
76
|
-
useAnimation: n &&
|
|
79
|
+
suggestedQuestions: k,
|
|
80
|
+
useAnimation: n && j,
|
|
77
81
|
variant: o
|
|
78
|
-
}),
|
|
82
|
+
}), K && /* @__PURE__ */ u(v, {
|
|
79
83
|
askSuggestedQuestion: f,
|
|
80
84
|
enableDebugMode: E,
|
|
81
85
|
hasRequestInProgress: d,
|
|
@@ -84,17 +88,17 @@ import '../../styles/box-ai-content-answers.css';const $ = "_container_1p5tb_1",
|
|
|
84
88
|
isStopResponseEnabled: M,
|
|
85
89
|
isStreamingEnabled: n,
|
|
86
90
|
lastQuestion: i[i.length - 1],
|
|
87
|
-
onRetryQuestion:
|
|
88
|
-
onStopQuestion:
|
|
89
|
-
onUserInteraction:
|
|
90
|
-
promptButtonClickHandler:
|
|
91
|
-
promptValue:
|
|
91
|
+
onRetryQuestion: C,
|
|
92
|
+
onStopQuestion: D,
|
|
93
|
+
onUserInteraction: X,
|
|
94
|
+
promptButtonClickHandler: y,
|
|
95
|
+
promptValue: x,
|
|
92
96
|
recordAction: b,
|
|
93
|
-
sendQuestion:
|
|
97
|
+
sendQuestion: N,
|
|
94
98
|
setAskSuggestedQuestion: m,
|
|
95
|
-
setPromptValue:
|
|
99
|
+
setPromptValue: F,
|
|
96
100
|
toggleDebugMode: () => {
|
|
97
|
-
|
|
101
|
+
H(!c);
|
|
98
102
|
},
|
|
99
103
|
variant: o
|
|
100
104
|
})]
|
|
@@ -102,6 +106,6 @@ import '../../styles/box-ai-content-answers.css';const $ = "_container_1p5tb_1",
|
|
|
102
106
|
});
|
|
103
107
|
};
|
|
104
108
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
ne as BoxAiContentAnswers,
|
|
110
|
+
ne as default
|
|
107
111
|
};
|
|
@@ -1,43 +1,54 @@
|
|
|
1
1
|
import i from "clsx";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { injectInlineCitation as u } from "../../utils/inlineCitationsUtils.js";
|
|
3
|
+
import { markdownToHtmlString as k } from "../common/markdown.js";
|
|
4
|
+
import x from "../common/markdown-react.js";
|
|
5
|
+
import { jsxs as M, Fragment as b, jsx as r } from "react/jsx-runtime";
|
|
6
|
+
import '../../../../styles/answer-content.css';const g = "_answerContent_uoab3_1", j = "_answerMarkdown_uoab3_16", n = {
|
|
7
|
+
answerContent: g,
|
|
8
|
+
answerMarkdown: j
|
|
9
|
+
}, I = ({
|
|
10
|
+
answer: t,
|
|
11
|
+
items: m,
|
|
12
|
+
isCompleted: c,
|
|
13
|
+
isInlineCitationV2Enabled: w,
|
|
14
|
+
isInlineCitationsEnabled: l,
|
|
15
|
+
isMarkdownEnabled: e,
|
|
16
|
+
isReactMarkdownEnabled: C = !1,
|
|
12
17
|
className: o,
|
|
13
|
-
variant:
|
|
18
|
+
variant: f = "modal",
|
|
14
19
|
...s
|
|
15
20
|
}) => {
|
|
16
|
-
const a =
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
const a = f === "sidebar", _ = (h) => {
|
|
22
|
+
const d = u(h, {
|
|
23
|
+
items: m,
|
|
24
|
+
isCompleted: c,
|
|
25
|
+
isInlineCitationsEnabled: l
|
|
26
|
+
});
|
|
27
|
+
if (C)
|
|
28
|
+
return /* @__PURE__ */ r(x, {
|
|
29
|
+
isInlineCitationV2Enabled: w,
|
|
19
30
|
children: d
|
|
20
31
|
});
|
|
21
|
-
const
|
|
32
|
+
const p = k(d);
|
|
22
33
|
return /* @__PURE__ */ r("div", {
|
|
23
34
|
dangerouslySetInnerHTML: {
|
|
24
|
-
__html:
|
|
35
|
+
__html: p
|
|
25
36
|
}
|
|
26
37
|
});
|
|
27
38
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
children: [!
|
|
39
|
+
return /* @__PURE__ */ M(b, {
|
|
40
|
+
children: [!e && /* @__PURE__ */ r("div", {
|
|
30
41
|
className: i(n.answerContent, a && n.sidebar, "Answer-text", o),
|
|
31
42
|
...s,
|
|
32
|
-
children:
|
|
33
|
-
}),
|
|
43
|
+
children: t
|
|
44
|
+
}), e && t && /* @__PURE__ */ r("div", {
|
|
34
45
|
className: i(n.answerContent, n.answerMarkdown, a && n.sidebar, "Answer-text", o),
|
|
35
46
|
...s,
|
|
36
|
-
children:
|
|
47
|
+
children: _(t)
|
|
37
48
|
})]
|
|
38
49
|
});
|
|
39
50
|
};
|
|
40
51
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
52
|
+
I as AnswerContent,
|
|
53
|
+
I as default
|
|
43
54
|
};
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { Text as
|
|
1
|
+
import { Text as I } from "@box/blueprint-web";
|
|
2
2
|
import { AlertTriangle as X } from "@box/blueprint-web-assets/icons/Line";
|
|
3
|
-
import { Gray65 as Y, Size4 as
|
|
4
|
-
import
|
|
5
|
-
import { memo as Z, useState as $, useEffect as
|
|
6
|
-
import { useIntl as
|
|
7
|
-
import { A as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { InlineError as ln } from "./inline-error.js";
|
|
3
|
+
import { Gray65 as Y, Size4 as g } from "@box/blueprint-web-assets/tokens/tokens";
|
|
4
|
+
import T from "clsx";
|
|
5
|
+
import { memo as Z, useState as $, useEffect as S } from "react";
|
|
6
|
+
import { useIntl as nn } from "react-intl";
|
|
7
|
+
import { A as s } from "../../../../chunks/types.js";
|
|
8
|
+
import { MediaContainer as R } from "../common/media-container.js";
|
|
9
|
+
import { BoxAILoadingIndicator as en } from "../thinkingBubble/boxAILoadingIndicator.js";
|
|
10
|
+
import { AnswerContent as tn } from "./answer-content.js";
|
|
11
|
+
import { CopyButton as on } from "./copy-button.js";
|
|
12
|
+
import { EmbedTheAnswerButton as sn } from "./embed-the-answer-button.js";
|
|
13
|
+
import { InlineError as rn } from "./inline-error.js";
|
|
15
14
|
import u from "./messages.js";
|
|
16
|
-
import { References as
|
|
17
|
-
import { ThumbButtons as
|
|
15
|
+
import { References as an } from "./references.js";
|
|
16
|
+
import { ThumbButtons as ln } from "./thumb-buttons.js";
|
|
18
17
|
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
19
|
-
import '../../../../styles/answer.css';const
|
|
20
|
-
answer:
|
|
21
|
-
loadingContainer:
|
|
22
|
-
loadingText:
|
|
23
|
-
fadeIn:
|
|
24
|
-
alertIcon:
|
|
25
|
-
error:
|
|
26
|
-
footer:
|
|
27
|
-
copyButtonContainer:
|
|
28
|
-
feedbackButtonsContainer:
|
|
29
|
-
shouldHaveMarginTop:
|
|
30
|
-
shouldUseAnimation:
|
|
31
|
-
shouldAnimateHeight:
|
|
32
|
-
footerButtons:
|
|
33
|
-
iconAvatar:
|
|
34
|
-
embedTheAnswerButtonContainer:
|
|
35
|
-
buttonsVisible:
|
|
36
|
-
},
|
|
18
|
+
import '../../../../styles/answer.css';const cn = "_answer_1efjn_1", dn = "_loadingContainer_1efjn_5", fn = "_loadingText_1efjn_12", _n = "_fadeIn_1efjn_1", un = "_alertIcon_1efjn_21", mn = "_error_1efjn_24", hn = "_footer_1efjn_28", En = "_copyButtonContainer_1efjn_34", Nn = "_feedbackButtonsContainer_1efjn_35", pn = "_shouldHaveMarginTop_1efjn_39", In = "_shouldUseAnimation_1efjn_42", gn = "_shouldAnimateHeight_1efjn_46", Tn = "_footerButtons_1efjn_50", Sn = "_iconAvatar_1efjn_56", Rn = "_embedTheAnswerButtonContainer_1efjn_71", jn = "_buttonsVisible_1efjn_79", n = {
|
|
19
|
+
answer: cn,
|
|
20
|
+
loadingContainer: dn,
|
|
21
|
+
loadingText: fn,
|
|
22
|
+
fadeIn: _n,
|
|
23
|
+
alertIcon: un,
|
|
24
|
+
error: mn,
|
|
25
|
+
footer: hn,
|
|
26
|
+
copyButtonContainer: En,
|
|
27
|
+
feedbackButtonsContainer: Nn,
|
|
28
|
+
shouldHaveMarginTop: pn,
|
|
29
|
+
shouldUseAnimation: In,
|
|
30
|
+
shouldAnimateHeight: gn,
|
|
31
|
+
footerButtons: Tn,
|
|
32
|
+
iconAvatar: Sn,
|
|
33
|
+
embedTheAnswerButtonContainer: Rn,
|
|
34
|
+
buttonsVisible: jn
|
|
35
|
+
}, On = /* @__PURE__ */ new Set([s.RATE_LIMITING, s.NO_CONTENT, s.PRECONDITION_FAILED, s.GENERAL, s.AGENT_NOT_FOUND]), zn = /* @__PURE__ */ Z(({
|
|
37
36
|
answer: t,
|
|
38
|
-
citations:
|
|
37
|
+
citations: j,
|
|
39
38
|
error: o,
|
|
40
|
-
contentType:
|
|
41
|
-
hostAppName:
|
|
39
|
+
contentType: O,
|
|
40
|
+
hostAppName: d,
|
|
42
41
|
feedbackValue: b,
|
|
43
|
-
isCitationsEnabled:
|
|
44
|
-
isCompleted:
|
|
45
|
-
isFeedbackEnabled:
|
|
46
|
-
isFeedbackFormEnabled:
|
|
47
|
-
isFeedbackTooltipOpen:
|
|
48
|
-
isInlineCitationsEnabled:
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
isCitationsEnabled: A = !1,
|
|
43
|
+
isCompleted: r = !1,
|
|
44
|
+
isFeedbackEnabled: B = !1,
|
|
45
|
+
isFeedbackFormEnabled: C,
|
|
46
|
+
isFeedbackTooltipOpen: E,
|
|
47
|
+
isInlineCitationsEnabled: P = !1,
|
|
48
|
+
isInlineCitationV2Enabled: x,
|
|
49
|
+
isLoading: v = !1,
|
|
50
|
+
isMarkdownEnabled: w = !1,
|
|
51
51
|
items: l = [],
|
|
52
52
|
onAnswerCopy: M,
|
|
53
|
-
embedTheAnswerButtonConfig:
|
|
53
|
+
embedTheAnswerButtonConfig: f,
|
|
54
54
|
onCitationClick: y,
|
|
55
55
|
onFeedbackFormSubmit: D,
|
|
56
56
|
onFeedbackTooltipOpenChange: L,
|
|
@@ -63,59 +63,59 @@ import '../../../../styles/answer.css';const dn = "_answer_1efjn_1", _n = "_load
|
|
|
63
63
|
variant: i = "modal",
|
|
64
64
|
isReactMarkdownEnabled: V,
|
|
65
65
|
setAnswerFeedback: z,
|
|
66
|
-
questionId:
|
|
66
|
+
questionId: N
|
|
67
67
|
}) => {
|
|
68
|
-
const m =
|
|
68
|
+
const m = On.has(o), h = v && !t && !o, [W, q] = $(r), {
|
|
69
69
|
formatMessage: _
|
|
70
|
-
} =
|
|
71
|
-
|
|
72
|
-
t && a &&
|
|
70
|
+
} = nn();
|
|
71
|
+
S(() => {
|
|
72
|
+
t && a && r && l.some((Q) => t.includes(Q.name)) && a({
|
|
73
73
|
action: "programmatic",
|
|
74
74
|
component: i,
|
|
75
75
|
feature: "answers",
|
|
76
76
|
target: "links_detected",
|
|
77
77
|
data: {
|
|
78
|
-
hostAppName:
|
|
78
|
+
hostAppName: d,
|
|
79
79
|
linkCount: l.length,
|
|
80
80
|
fileNameCount: l.length
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
-
}, [t, i,
|
|
84
|
-
setTimeout(() => q(
|
|
85
|
-
}, [
|
|
86
|
-
const
|
|
83
|
+
}, [t, i, d, r, a, l]), S(() => {
|
|
84
|
+
setTimeout(() => q(r), 0);
|
|
85
|
+
}, [r]);
|
|
86
|
+
const p = () => /* @__PURE__ */ e(X, {
|
|
87
87
|
className: n.alertIcon,
|
|
88
88
|
color: Y,
|
|
89
89
|
"data-testid": "content-answers-error-alert-icon",
|
|
90
|
-
height:
|
|
90
|
+
height: g,
|
|
91
91
|
role: "presentation",
|
|
92
|
-
width:
|
|
93
|
-
}), J = () => /* @__PURE__ */ c(
|
|
92
|
+
width: g
|
|
93
|
+
}), J = () => /* @__PURE__ */ c(I, {
|
|
94
94
|
as: "p",
|
|
95
95
|
className: n.error,
|
|
96
96
|
color: "textOnLightSecondary",
|
|
97
97
|
"data-testid": "content-answers-error",
|
|
98
98
|
variant: "caption",
|
|
99
|
-
children: [o ===
|
|
100
|
-
}), K = () => o !==
|
|
101
|
-
className:
|
|
102
|
-
[n.buttonsVisible]:
|
|
99
|
+
children: [o === s.RESPONSE_INTERRUPTED && _(u.responseInterruptedError), o === s.RESPONSE_FAILED && _(u.responseFailedError), o === s.RESPONSE_STOPPED && _(u.responseStoppedError), o !== s.RESPONSE_STOPPED && p()]
|
|
100
|
+
}), K = () => o !== s.RESPONSE_STOPPED ? /* @__PURE__ */ c("div", {
|
|
101
|
+
className: T(n.footerButtons, "footer-buttons-container", {
|
|
102
|
+
[n.buttonsVisible]: E
|
|
103
103
|
}),
|
|
104
|
-
children: [
|
|
104
|
+
children: [B ? /* @__PURE__ */ e("div", {
|
|
105
105
|
className: n.feedbackButtonsContainer,
|
|
106
|
-
children: /* @__PURE__ */ e(
|
|
106
|
+
children: /* @__PURE__ */ e(ln, {
|
|
107
107
|
feedbackValue: b,
|
|
108
|
-
hostAppName:
|
|
109
|
-
isFeedbackFormEnabled:
|
|
110
|
-
isFeedbackTooltipOpen:
|
|
108
|
+
hostAppName: d,
|
|
109
|
+
isFeedbackFormEnabled: C,
|
|
110
|
+
isFeedbackTooltipOpen: E,
|
|
111
111
|
items: l,
|
|
112
112
|
onFeedbackFormSubmit: D,
|
|
113
113
|
onFeedbackTooltipOpenChange: L,
|
|
114
114
|
prompt: F,
|
|
115
115
|
promptType: H,
|
|
116
|
-
questionId:
|
|
116
|
+
questionId: N,
|
|
117
117
|
recordAction: a,
|
|
118
|
-
response:
|
|
118
|
+
response: t,
|
|
119
119
|
setAnswerFeedback: z,
|
|
120
120
|
shouldFeedbackFormIncludeFeedbackText: U,
|
|
121
121
|
shouldFeedbackIncludePromptData: k,
|
|
@@ -123,67 +123,67 @@ import '../../../../styles/answer.css';const dn = "_answer_1efjn_1", _n = "_load
|
|
|
123
123
|
})
|
|
124
124
|
}) : null, /* @__PURE__ */ e("div", {
|
|
125
125
|
className: n.copyButtonContainer,
|
|
126
|
-
children: /* @__PURE__ */ e(
|
|
126
|
+
children: /* @__PURE__ */ e(on, {
|
|
127
127
|
answer: t,
|
|
128
128
|
onAnswerCopy: M,
|
|
129
129
|
recordAction: a
|
|
130
130
|
})
|
|
131
131
|
})]
|
|
132
|
-
}) : t ? null :
|
|
133
|
-
items: l,
|
|
134
|
-
isCompleted: s,
|
|
135
|
-
isInlineCitationsEnabled: p
|
|
136
|
-
}), [t, l, s, p]);
|
|
132
|
+
}) : t ? null : p();
|
|
137
133
|
return /* @__PURE__ */ c("div", {
|
|
138
134
|
"aria-live": "polite",
|
|
139
135
|
className: n.answer,
|
|
140
136
|
"data-testid": "content-answers-answer",
|
|
141
137
|
children: [h && /* @__PURE__ */ c("div", {
|
|
142
138
|
className: n.loadingContainer,
|
|
143
|
-
children: [/* @__PURE__ */ e(
|
|
139
|
+
children: [/* @__PURE__ */ e(en, {}), /* @__PURE__ */ e(I, {
|
|
144
140
|
as: "span",
|
|
145
141
|
className: n.loadingText,
|
|
146
142
|
color: "textOnLightDefault",
|
|
147
143
|
variant: "titleMedium",
|
|
148
144
|
children: _(u.analyzingRequest)
|
|
149
145
|
})]
|
|
150
|
-
}), !m && !h && /* @__PURE__ */ e(
|
|
146
|
+
}), !m && !h && /* @__PURE__ */ e(R, {
|
|
151
147
|
className: "answer",
|
|
152
148
|
variant: i,
|
|
153
|
-
children: /* @__PURE__ */ c(
|
|
149
|
+
children: /* @__PURE__ */ c(R.Content, {
|
|
154
150
|
isUsedInsideSidebar: i === "sidebar",
|
|
155
151
|
variant: "answer",
|
|
156
|
-
children: [/* @__PURE__ */ e(
|
|
157
|
-
answer:
|
|
158
|
-
|
|
152
|
+
children: [/* @__PURE__ */ e(tn, {
|
|
153
|
+
answer: t,
|
|
154
|
+
isCompleted: r,
|
|
155
|
+
isInlineCitationsEnabled: P,
|
|
156
|
+
isInlineCitationV2Enabled: x,
|
|
157
|
+
isMarkdownEnabled: w,
|
|
159
158
|
isReactMarkdownEnabled: V,
|
|
159
|
+
items: l,
|
|
160
160
|
variant: i
|
|
161
|
-
}),
|
|
162
|
-
className:
|
|
161
|
+
}), r && /* @__PURE__ */ c("div", {
|
|
162
|
+
className: T(n.footer, {
|
|
163
163
|
[n.shouldHaveMarginTop]: t,
|
|
164
164
|
[n.shouldAnimateHeight]: W,
|
|
165
165
|
[n.shouldUseAnimation]: G
|
|
166
166
|
}),
|
|
167
167
|
"data-testid": "content-answers-answer-footer",
|
|
168
|
-
children: [o && J(),
|
|
169
|
-
citations:
|
|
168
|
+
children: [o && J(), A && !o && /* @__PURE__ */ e(an, {
|
|
169
|
+
citations: j,
|
|
170
170
|
onCitationClick: y,
|
|
171
171
|
recordAction: a
|
|
172
172
|
}), K()]
|
|
173
173
|
})]
|
|
174
174
|
})
|
|
175
|
-
}), !m && !h &&
|
|
175
|
+
}), !m && !h && r && (f == null ? void 0 : f.onAction) && /* @__PURE__ */ e("div", {
|
|
176
176
|
className: n.embedTheAnswerButtonContainer,
|
|
177
|
-
children: /* @__PURE__ */ e(
|
|
178
|
-
answer:
|
|
179
|
-
embedTheAnswerButtonConfig:
|
|
180
|
-
hostAppName:
|
|
181
|
-
questionId:
|
|
177
|
+
children: /* @__PURE__ */ e(sn, {
|
|
178
|
+
answer: t,
|
|
179
|
+
embedTheAnswerButtonConfig: f,
|
|
180
|
+
hostAppName: d,
|
|
181
|
+
questionId: N,
|
|
182
182
|
recordAction: a,
|
|
183
183
|
variant: i
|
|
184
184
|
})
|
|
185
|
-
}), m && /* @__PURE__ */ e(
|
|
186
|
-
contentType:
|
|
185
|
+
}), m && /* @__PURE__ */ e(rn, {
|
|
186
|
+
contentType: O,
|
|
187
187
|
error: o,
|
|
188
188
|
recordAction: a,
|
|
189
189
|
variant: i
|
|
@@ -191,6 +191,6 @@ import '../../../../styles/answer.css';const dn = "_answer_1efjn_1", _n = "_load
|
|
|
191
191
|
});
|
|
192
192
|
});
|
|
193
193
|
export {
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
zn as Answer,
|
|
195
|
+
zn as default
|
|
196
196
|
};
|