@box/box-ai-content-answers 1.19.4 → 1.21.0

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.
Files changed (48) hide show
  1. package/dist/chunks/clear-conversation-button.js +15 -16
  2. package/dist/chunks/stopResponseButton.js +19 -23
  3. package/dist/chunks/types.js +8 -8
  4. package/dist/chunks/warning-message.js +15 -16
  5. package/dist/esm/lib/components/answer/answer-content.js +15 -15
  6. package/dist/esm/lib/components/answer/answer.js +107 -109
  7. package/dist/esm/lib/components/answer/citation.js +23 -24
  8. package/dist/esm/lib/components/answer/copy-button.js +3 -3
  9. package/dist/esm/lib/components/answer/embed-the-answer-button.js +44 -44
  10. package/dist/esm/lib/components/answer/feedback-tooltip.js +63 -56
  11. package/dist/esm/lib/components/answer/inline-error.js +1 -1
  12. package/dist/esm/lib/components/answer/loading-indicator.js +15 -18
  13. package/dist/esm/lib/components/answer/references.js +30 -30
  14. package/dist/esm/lib/components/answer/thumb-buttons.js +95 -96
  15. package/dist/esm/lib/components/api-wrapper/hooks/useContentAnswers.js +166 -167
  16. package/dist/esm/lib/components/api-wrapper/reducer.js +1 -1
  17. package/dist/esm/lib/components/api-wrapper/utils/request.js +8 -8
  18. package/dist/esm/lib/components/api-wrapper/utils/stream.js +24 -25
  19. package/dist/esm/lib/components/chat/chat.js +78 -79
  20. package/dist/esm/lib/components/common/focusInputUtils.js +3 -4
  21. package/dist/esm/lib/components/common/markdown-react.js +91 -93
  22. package/dist/esm/lib/components/common/markdown.js +2666 -2696
  23. package/dist/esm/lib/components/content/content.js +38 -39
  24. package/dist/esm/lib/components/footer/footer-actions.js +3 -3
  25. package/dist/esm/lib/components/footer/footer.js +97 -98
  26. package/dist/esm/lib/components/modal/modal.js +121 -122
  27. package/dist/esm/lib/components/sidebar/content.js +95 -101
  28. package/dist/esm/lib/components/sidebar/sidebar.js +82 -83
  29. package/dist/esm/lib/components/suggested-questions/suggested-questions.js +1 -1
  30. package/dist/esm/lib/components/suggested-questions/suggestions.js +30 -30
  31. package/dist/esm/lib/components/welcome-message/contextual-items-message.js +36 -38
  32. package/dist/esm/lib/components/welcome-message/items-dropdown.js +27 -27
  33. package/dist/esm/lib/hooks/usePromptFocus.js +13 -14
  34. package/dist/i18n/en-x-pseudo.js +89 -89
  35. package/dist/i18n/en-x-pseudo.properties +89 -89
  36. package/dist/styles/answer-content.css +1 -1
  37. package/dist/styles/answer.css +1 -1
  38. package/dist/styles/box-ai-content-answers.css +1 -1
  39. package/dist/styles/chat.css +1 -1
  40. package/dist/styles/clear-conversation-button.css +1 -1
  41. package/dist/styles/content.css +1 -1
  42. package/dist/styles/content2.css +1 -1
  43. package/dist/styles/markdown2.css +1 -1
  44. package/dist/styles/question.css +1 -1
  45. package/dist/styles/stopResponseButton.css +1 -1
  46. package/dist/styles/warning-message.css +1 -1
  47. package/dist/types/lib/components/api-wrapper/hooks/useContentAnswers.d.ts +1 -1
  48. package/package.json +11 -11
@@ -1,36 +1,35 @@
1
- import { useBlueprintModernization as c, Tooltip as i, IconButton as d } from "@box/blueprint-web";
2
- import { Trash as _ } from "@box/blueprint-web-assets/icons/Line";
3
- import { Trash as m } from "@box/blueprint-web-assets/icons/Medium";
1
+ import { useBlueprintModernization as i, Tooltip as c, IconButton as d } from "@box/blueprint-web";
2
+ import { Trash as m } from "@box/blueprint-web-assets/icons/Line";
3
+ import { Trash as _ } from "@box/blueprint-web-assets/icons/Medium";
4
4
  import b from "clsx";
5
5
  import { useIntl as C } from "react-intl";
6
6
  import t from "../esm/lib/components/modal/messages.js";
7
7
  import { jsx as e } from "react/jsx-runtime";
8
- import '../styles/clear-conversation-button.css';const g = "_BoxAIIconColor_ild3b_1", A = "_modalHeader_ild3b_5", u = "_contentAnswersModal_ild3b_10", p = "_boxAiContentAnswers_ild3b_18", B = "_clearButton_ild3b_26", I = "_contentAnswerModal_ild3b_1", M = "_modalHeaderContainer_ild3b_55", f = "_agentSelectorTrigger_ild3b_63", w = "_agentSelectorContent_ild3b_74", x = {
8
+ import '../styles/clear-conversation-button.css';const g = "_BoxAIIconColor_ild3b_1", u = "_modalHeader_ild3b_5", p = "_contentAnswersModal_ild3b_10", A = "_boxAiContentAnswers_ild3b_18", B = "_clearButton_ild3b_26", I = "_modalHeaderContainer_ild3b_55", f = "_agentSelectorTrigger_ild3b_63", x = "_agentSelectorContent_ild3b_74", T = {
9
9
  BoxAIIconColor: g,
10
- modalHeader: A,
11
- contentAnswersModal: u,
12
- boxAiContentAnswers: p,
10
+ modalHeader: u,
11
+ contentAnswersModal: p,
12
+ boxAiContentAnswers: A,
13
13
  clearButton: B,
14
14
  "modal-close-button": "_modal-close-button_ild3b_30",
15
- contentAnswerModal: I,
16
- modalHeaderContainer: M,
15
+ modalHeaderContainer: I,
17
16
  agentSelectorTrigger: f,
18
- agentSelectorContent: w
19
- }, j = ({
17
+ agentSelectorContent: x
18
+ }, L = ({
20
19
  onClick: n,
21
20
  hasRequestInProgress: a,
22
21
  className: r
23
22
  }) => {
24
23
  const o = C(), {
25
24
  enableModernizedComponents: s
26
- } = c(), l = s ? m : _;
27
- return /* @__PURE__ */ e(i, {
25
+ } = i(), l = s ? _ : m;
26
+ return /* @__PURE__ */ e(c, {
28
27
  content: o.formatMessage(t.clearConversationLabel),
29
28
  "data-testid": "clear-conversation-tooltip",
30
29
  variant: "standard",
31
30
  children: /* @__PURE__ */ e(d, {
32
31
  "aria-label": o.formatMessage(t.clearConversationLabel),
33
- className: b(x.clearButton, r),
32
+ className: b(T.clearButton, r),
34
33
  "data-testid": "clear-conversation-button",
35
34
  disabled: a,
36
35
  icon: l,
@@ -41,6 +40,6 @@ import '../styles/clear-conversation-button.css';const g = "_BoxAIIconColor_ild3
41
40
  });
42
41
  };
43
42
  export {
44
- j as C,
45
- x as s
43
+ L as C,
44
+ T as s
46
45
  };
@@ -2,52 +2,48 @@ import * as p from "react";
2
2
  import { useIntl as u } from "react-intl";
3
3
  import { Tooltip as _, Button as m } from "@box/blueprint-web";
4
4
  import { Stop as c } from "@box/blueprint-web-assets/icons/Fill";
5
- import { LOGGER_BASE_CONFIG as l, LOGGER_ACTION_CLICK as x } from "../esm/lib/components/common/constants.js";
5
+ import { LOGGER_ACTION_CLICK as l, LOGGER_BASE_CONFIG as x } from "../esm/lib/components/common/constants.js";
6
6
  import e from "../esm/lib/components/footer/messages.js";
7
- import { jsx as r } from "react/jsx-runtime";
8
- import '../styles/stopResponseButton.css';const B = "_questionInput_w27x6_2", b = "_questionInputWithOutPromptLibrary_w27x6_16", w = "_avatar_w27x6_31", d = "_inputAreaButton_w27x6_34", f = "_square_w27x6_56", C = "_textArea_w27x6_63", I = "_error_w27x6_86", q = "_sidebar_w27x6_89", R = "_submitButtonTooltip_w27x6_97", A = "_actionContainer_w27x6_106", O = "_promptButton_w27x6_112", g = {
9
- questionInput: B,
10
- questionInputWithOutPromptLibrary: b,
11
- avatar: w,
12
- inputAreaButton: d,
13
- square: f,
7
+ import { jsx as a } from "react/jsx-runtime";
8
+ import '../styles/stopResponseButton.css';const d = "_questionInput_w27x6_2", f = "_questionInputWithOutPromptLibrary_w27x6_16", B = "_inputAreaButton_w27x6_34", C = "_textArea_w27x6_63", I = "_sidebar_w27x6_89", b = "_actionContainer_w27x6_106", R = "_promptButton_w27x6_112", w = {
9
+ questionInput: d,
10
+ questionInputWithOutPromptLibrary: f,
11
+ inputAreaButton: B,
14
12
  textArea: C,
15
- error: I,
16
- sidebar: q,
17
- submitButtonTooltip: R,
18
- actionContainer: A,
19
- promptButton: O
13
+ sidebar: I,
14
+ actionContainer: b,
15
+ promptButton: R
20
16
  };
21
- function S({
17
+ function G({
22
18
  recordAction: t,
23
19
  lastQuestion: o,
24
20
  onStopQuestion: n,
25
- size: a = "large"
21
+ size: r = "large"
26
22
  }) {
27
23
  const s = u(), i = p.useCallback(() => {
28
24
  t && t({
29
- ...l,
30
- action: x,
25
+ ...x,
26
+ action: l,
31
27
  target: "stopResponse"
32
28
  }), n(o);
33
29
  }, [o, n, t]);
34
- return /* @__PURE__ */ r(_, {
30
+ return /* @__PURE__ */ a(_, {
35
31
  content: s.formatMessage(e.stopResponse),
36
32
  "data-testid": "stop-response-tooltip",
37
33
  variant: "standard",
38
- children: /* @__PURE__ */ r(m, {
34
+ children: /* @__PURE__ */ a(m, {
39
35
  "aria-label": s.formatMessage(e.stopResponse),
40
36
  "aria-live": "polite",
41
- className: g.inputAreaButton,
37
+ className: w.inputAreaButton,
42
38
  "data-testid": "content-answers-stop-response-button",
43
39
  icon: c,
44
40
  onClick: i,
45
- size: a,
41
+ size: r,
46
42
  "data-target-id": "Button-stopResponse"
47
43
  })
48
44
  });
49
45
  }
50
46
  export {
51
- S,
52
- g as s
47
+ G as S,
48
+ w as s
53
49
  };
@@ -1,18 +1,18 @@
1
- let e = /* @__PURE__ */ function(t) {
1
+ let e = /* @__PURE__ */ (function(t) {
2
2
  return t.GENERAL = "general", t.RATE_LIMITING = "rate_limiting", t.NO_CONTENT = "no_content", t.PRECONDITION_FAILED = "precondition_failed", t.AGENT_NOT_FOUND = "agent_not_found", t.RESPONSE_FAILED = "response_failed", t.RESPONSE_INTERRUPTED = "response_interrupted", t.RESPONSE_STOPPED = "response_stopped", t;
3
- }({}), n = /* @__PURE__ */ function(t) {
3
+ })({}), n = /* @__PURE__ */ (function(t) {
4
4
  return t.LARGE_FILE = "large_file", t.GENERAL = "general", t;
5
- }({}), r = /* @__PURE__ */ function(t) {
5
+ })({}), r = /* @__PURE__ */ (function(t) {
6
6
  return t.NOT_STARTED = "not_started", t.IN_PROGRESS = "in_progress", t.SUCCESS = "success", t.ERROR = "error", t.CANCELLED = "cancelled", t;
7
- }({}), s = /* @__PURE__ */ function(t) {
7
+ })({}), s = /* @__PURE__ */ (function(t) {
8
8
  return t.CUSTOM = "suggested_question_custom", t.INTELLIGENT = "suggested_question_intelligent", t.STATIC = "suggested_question_static", t;
9
- }({});
9
+ })({});
10
10
  const o = "user_input";
11
- let i = /* @__PURE__ */ function(t) {
11
+ let i = /* @__PURE__ */ (function(t) {
12
12
  return t.DID_NOT_FOLLOW_REQUEST = "did_not_follow_request", t.INACCURATE_ANSWER = "inaccurate_answer", t.OTHER = "other", t;
13
- }({}), u = /* @__PURE__ */ function(t) {
13
+ })({}), u = /* @__PURE__ */ (function(t) {
14
14
  return t.HUBS_METADATA = "hubs_metadata", t;
15
- }({});
15
+ })({});
16
16
  export {
17
17
  e as A,
18
18
  n as C,
@@ -1,29 +1,28 @@
1
- import { InlineNotice as r, Text as n } from "@box/blueprint-web";
2
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
3
- import '../styles/warning-message.css';const o = "_welcomeMessage_q7ymc_2", t = "_warnings_q7ymc_5", g = "_warningNotice_q7ymc_10", l = "_iconAvatar_q7ymc_13", m = {
4
- welcomeMessage: o,
5
- warnings: t,
6
- warningNotice: g,
7
- iconAvatar: l
8
- }, v = ({
1
+ import { InlineNotice as r, Text as a } from "@box/blueprint-web";
2
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
3
+ import '../styles/warning-message.css';const t = "_welcomeMessage_q7ymc_2", c = "_warnings_q7ymc_5", g = "_warningNotice_q7ymc_10", l = {
4
+ welcomeMessage: t,
5
+ warnings: c,
6
+ warningNotice: g
7
+ }, _ = ({
9
8
  ariaLabel: s,
10
9
  title: i,
11
- description: a
12
- }) => /* @__PURE__ */ c(r, {
13
- className: m.warningNotice,
10
+ description: n
11
+ }) => /* @__PURE__ */ o(r, {
12
+ className: l.warningNotice,
14
13
  variant: "warning",
15
14
  variantIconAriaLabel: s,
16
- children: [/* @__PURE__ */ e(n, {
15
+ children: [/* @__PURE__ */ e(a, {
17
16
  as: "p",
18
17
  variant: "bodyDefaultBold",
19
18
  children: i
20
- }), a && /* @__PURE__ */ e(n, {
19
+ }), n && /* @__PURE__ */ e(a, {
21
20
  as: "p",
22
21
  variant: "bodyDefault",
23
- children: a
22
+ children: n
24
23
  })]
25
24
  });
26
25
  export {
27
- v as W,
28
- m as s
26
+ _ as W,
27
+ l as s
29
28
  };
@@ -1,11 +1,11 @@
1
1
  import i from "clsx";
2
- import { injectInlineCitation as v } 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 u, jsx as r } from "react/jsx-runtime";
6
- import '../../../../styles/answer-content.css';const b = "_answerContent_1va9v_2", g = "_answerMarkdown_1va9v_17", n = {
7
- answerContent: b,
8
- answerMarkdown: g
2
+ import { injectInlineCitation as k } from "../../utils/inlineCitationsUtils.js";
3
+ import { markdownToHtmlString as x } from "../common/markdown.js";
4
+ import M from "../common/markdown-react.js";
5
+ import { jsxs as u, Fragment as b, jsx as r } from "react/jsx-runtime";
6
+ import '../../../../styles/answer-content.css';const g = "_answerContent_9f3o6_2", j = "_answerMarkdown_9f3o6_16", n = {
7
+ answerContent: g,
8
+ answerMarkdown: j
9
9
  }, I = ({
10
10
  answer: t,
11
11
  items: m,
@@ -13,30 +13,30 @@ import '../../../../styles/answer-content.css';const b = "_answerContent_1va9v_2
13
13
  isInlineCitationV2Enabled: w,
14
14
  isInlineCitationsEnabled: l,
15
15
  isMarkdownEnabled: e,
16
- isReactMarkdownEnabled: C = !1,
16
+ isReactMarkdownEnabled: f = !1,
17
17
  className: o,
18
- variant: f = "modal",
18
+ variant: C = "modal",
19
19
  ...s
20
20
  }) => {
21
- const a = f === "sidebar", _ = (h) => {
22
- const d = v(h, {
21
+ const a = C === "sidebar", _ = (h) => {
22
+ const d = k(h, {
23
23
  items: m,
24
24
  isCompleted: c,
25
25
  isInlineCitationsEnabled: l
26
26
  });
27
- if (C)
28
- return /* @__PURE__ */ r(x, {
27
+ if (f)
28
+ return /* @__PURE__ */ r(M, {
29
29
  isInlineCitationV2Enabled: w,
30
30
  children: d
31
31
  });
32
- const p = k(d);
32
+ const p = x(d);
33
33
  return /* @__PURE__ */ r("div", {
34
34
  dangerouslySetInnerHTML: {
35
35
  __html: p
36
36
  }
37
37
  });
38
38
  };
39
- return /* @__PURE__ */ M(u, {
39
+ return /* @__PURE__ */ u(b, {
40
40
  children: [!e && /* @__PURE__ */ r("div", {
41
41
  className: i(n.answerContent, a && n.sidebar, "Answer-text", o),
42
42
  ...s,
@@ -1,196 +1,194 @@
1
- import { Text as w } from "@box/blueprint-web";
1
+ import { Text as N } from "@box/blueprint-web";
2
2
  import { AlertTriangle as X } from "@box/blueprint-web-assets/icons/Line";
3
- import { Gray65 as Y, Size4 as I } from "@box/blueprint-web-assets/tokens/tokens";
4
- import g from "clsx";
5
- import { memo as Z, useState as $, useEffect as T } from "react";
3
+ import { Size4 as T, Gray65 as Y } from "@box/blueprint-web-assets/tokens/tokens";
4
+ import p from "clsx";
5
+ import { memo as Z, useState as $, useEffect as I } from "react";
6
6
  import { useIntl as tt } from "react-intl";
7
7
  import { A as s } from "../../../../chunks/types.js";
8
8
  import { MediaContainer as S } from "../common/media-container.js";
9
- import { BoxAILoadingIndicator as nt } from "../thinkingBubble/boxAILoadingIndicator.js";
10
- import { AnswerContent as ot } from "./answer-content.js";
11
- import { CopyButton as et } from "./copy-button.js";
9
+ import { BoxAILoadingIndicator as et } from "../thinkingBubble/boxAILoadingIndicator.js";
10
+ import { AnswerContent as nt } from "./answer-content.js";
11
+ import { CopyButton as ot } from "./copy-button.js";
12
12
  import { EmbedTheAnswerButton as st } from "./embed-the-answer-button.js";
13
13
  import { InlineError as rt } from "./inline-error.js";
14
- import _ from "./messages.js";
15
- import { References as at } from "./references.js";
16
- import { ThumbButtons as it } from "./thumb-buttons.js";
17
- import { jsxs as c, jsx as n } from "react/jsx-runtime";
18
- import '../../../../styles/answer.css';const lt = "_answer_1miuw_2", ct = "_loadingContainer_1miuw_6", ut = "_loadingText_1miuw_13", mt = "_fadeIn_1miuw_1", dt = "_alertIcon_1miuw_22", _t = "_error_1miuw_25", ft = "_footer_1miuw_29", ht = "_copyButtonContainer_1miuw_35", Et = "_feedbackButtonsContainer_1miuw_36", Nt = "_shouldHaveMarginTop_1miuw_40", pt = "_shouldUseAnimation_1miuw_43", wt = "_shouldAnimateHeight_1miuw_47", It = "_footerButtons_1miuw_51", gt = "_iconAvatar_1miuw_57", Tt = "_embedTheAnswerButtonContainer_1miuw_72", St = "_buttonsVisible_1miuw_80", t = {
14
+ import d from "./messages.js";
15
+ import { References as it } from "./references.js";
16
+ import { ThumbButtons as at } from "./thumb-buttons.js";
17
+ import { jsxs as u, jsx as e } from "react/jsx-runtime";
18
+ import '../../../../styles/answer.css';const lt = "_answer_1miuw_2", ut = "_loadingContainer_1miuw_6", mt = "_loadingText_1miuw_13", ct = "_alertIcon_1miuw_22", dt = "_error_1miuw_25", _t = "_footer_1miuw_29", ft = "_copyButtonContainer_1miuw_35", ht = "_feedbackButtonsContainer_1miuw_36", Et = "_shouldHaveMarginTop_1miuw_40", gt = "_shouldUseAnimation_1miuw_43", wt = "_shouldAnimateHeight_1miuw_47", Nt = "_footerButtons_1miuw_51", Tt = "_embedTheAnswerButtonContainer_1miuw_72", pt = "_buttonsVisible_1miuw_80", t = {
19
19
  answer: lt,
20
- loadingContainer: ct,
21
- loadingText: ut,
22
- fadeIn: mt,
23
- alertIcon: dt,
24
- error: _t,
25
- footer: ft,
26
- copyButtonContainer: ht,
27
- feedbackButtonsContainer: Et,
28
- shouldHaveMarginTop: Nt,
29
- shouldUseAnimation: pt,
20
+ loadingContainer: ut,
21
+ loadingText: mt,
22
+ alertIcon: ct,
23
+ error: dt,
24
+ footer: _t,
25
+ copyButtonContainer: ft,
26
+ feedbackButtonsContainer: ht,
27
+ shouldHaveMarginTop: Et,
28
+ shouldUseAnimation: gt,
30
29
  shouldAnimateHeight: wt,
31
- footerButtons: It,
32
- iconAvatar: gt,
30
+ footerButtons: Nt,
33
31
  embedTheAnswerButtonContainer: Tt,
34
- buttonsVisible: St
35
- }, Rt = /* @__PURE__ */ new Set([s.RATE_LIMITING, s.NO_CONTENT, s.PRECONDITION_FAILED, s.GENERAL, s.AGENT_NOT_FOUND]), jt = /* @__PURE__ */ Z(({
36
- answer: o,
32
+ buttonsVisible: pt
33
+ }, It = /* @__PURE__ */ new Set([s.RATE_LIMITING, s.NO_CONTENT, s.PRECONDITION_FAILED, s.GENERAL, s.AGENT_NOT_FOUND]), Gt = /* @__PURE__ */ Z(({
34
+ answer: n,
37
35
  citations: R,
38
- error: e,
39
- contentType: O,
40
- hostAppName: u,
41
- feedbackValue: b,
42
- isCitationsEnabled: A = !1,
36
+ error: o,
37
+ contentType: b,
38
+ hostAppName: m,
39
+ feedbackValue: B,
40
+ isCitationsEnabled: C = !1,
43
41
  isCompleted: r = !1,
44
- isFeedbackEnabled: B = !1,
45
- isFeedbackFormEnabled: C,
46
- isFeedbackTooltipOpen: E,
42
+ isFeedbackEnabled: O = !1,
43
+ isFeedbackFormEnabled: A,
44
+ isFeedbackTooltipOpen: h,
47
45
  isInlineCitationsEnabled: P = !1,
48
46
  isInlineCitationV2Enabled: x,
49
- isLoading: v = !1,
50
- isMarkdownEnabled: M = !1,
47
+ isLoading: M = !1,
48
+ isMarkdownEnabled: y = !1,
51
49
  items: l = [],
52
- onAnswerCopy: y,
53
- embedTheAnswerButtonConfig: m,
54
- onCitationClick: D,
55
- onFeedbackFormSubmit: L,
50
+ onAnswerCopy: D,
51
+ embedTheAnswerButtonConfig: E,
52
+ onCitationClick: L,
53
+ onFeedbackFormSubmit: v,
56
54
  onFeedbackTooltipOpenChange: F,
57
55
  prompt: H,
58
56
  promptType: U,
59
- recordAction: a,
57
+ recordAction: i,
60
58
  shouldFeedbackFormIncludeFeedbackText: k,
61
59
  shouldFeedbackIncludePromptData: G,
62
60
  useAnimation: V = !0,
63
- variant: i = "modal",
61
+ variant: a = "modal",
64
62
  isReactMarkdownEnabled: j,
65
63
  setAnswerFeedback: z,
66
- questionId: N
64
+ questionId: g
67
65
  }) => {
68
- const f = Rt.has(e), h = v && !o && !e, [W, q] = $(r), {
69
- formatMessage: d
66
+ const _ = It.has(o), f = M && !n && !o, [W, q] = $(r), {
67
+ formatMessage: c
70
68
  } = tt();
71
- T(() => {
72
- o && a && r && l.some((Q) => o.includes(Q.name)) && a({
69
+ I(() => {
70
+ n && i && r && l.some((Q) => n.includes(Q.name)) && i({
73
71
  action: "programmatic",
74
- component: i,
72
+ component: a,
75
73
  feature: "answers",
76
74
  target: "links_detected",
77
75
  data: {
78
- hostAppName: u,
76
+ hostAppName: m,
79
77
  linkCount: l.length,
80
78
  fileNameCount: l.length
81
79
  }
82
80
  });
83
- }, [o, i, u, r, a, l]), T(() => {
81
+ }, [n, a, m, r, i, l]), I(() => {
84
82
  setTimeout(() => q(r), 0);
85
83
  }, [r]);
86
- const p = () => /* @__PURE__ */ n(X, {
84
+ const w = () => /* @__PURE__ */ e(X, {
87
85
  className: t.alertIcon,
88
86
  color: Y,
89
87
  "data-testid": "content-answers-error-alert-icon",
90
- height: I,
88
+ height: T,
91
89
  role: "presentation",
92
- width: I
93
- }), J = () => /* @__PURE__ */ c(w, {
90
+ width: T
91
+ }), J = () => /* @__PURE__ */ u(N, {
94
92
  as: "p",
95
93
  className: t.error,
96
94
  color: "textOnLightSecondary",
97
95
  "data-testid": "content-answers-error",
98
96
  variant: "caption",
99
- children: [e === s.RESPONSE_INTERRUPTED && d(_.responseInterruptedError), e === s.RESPONSE_FAILED && d(_.responseFailedError), e === s.RESPONSE_STOPPED && d(_.responseStoppedError), e !== s.RESPONSE_STOPPED && p()]
100
- }), K = () => e !== s.RESPONSE_STOPPED ? /* @__PURE__ */ c("div", {
101
- className: g(t.footerButtons, "footer-buttons-container", {
102
- [t.buttonsVisible]: E
97
+ children: [o === s.RESPONSE_INTERRUPTED && c(d.responseInterruptedError), o === s.RESPONSE_FAILED && c(d.responseFailedError), o === s.RESPONSE_STOPPED && c(d.responseStoppedError), o !== s.RESPONSE_STOPPED && w()]
98
+ }), K = () => o !== s.RESPONSE_STOPPED ? /* @__PURE__ */ u("div", {
99
+ className: p(t.footerButtons, "footer-buttons-container", {
100
+ [t.buttonsVisible]: h
103
101
  }),
104
- children: [B ? /* @__PURE__ */ n("div", {
102
+ children: [O ? /* @__PURE__ */ e("div", {
105
103
  className: t.feedbackButtonsContainer,
106
- children: /* @__PURE__ */ n(it, {
107
- feedbackValue: b,
108
- hostAppName: u,
109
- isFeedbackFormEnabled: C,
110
- isFeedbackTooltipOpen: E,
104
+ children: /* @__PURE__ */ e(at, {
105
+ feedbackValue: B,
106
+ hostAppName: m,
107
+ isFeedbackFormEnabled: A,
108
+ isFeedbackTooltipOpen: h,
111
109
  items: l,
112
- onFeedbackFormSubmit: L,
110
+ onFeedbackFormSubmit: v,
113
111
  onFeedbackTooltipOpenChange: F,
114
112
  prompt: H,
115
113
  promptType: U,
116
- questionId: N,
117
- recordAction: a,
118
- response: o,
114
+ questionId: g,
115
+ recordAction: i,
116
+ response: n,
119
117
  setAnswerFeedback: z,
120
118
  shouldFeedbackFormIncludeFeedbackText: k,
121
119
  shouldFeedbackIncludePromptData: G,
122
- variant: i
120
+ variant: a
123
121
  })
124
- }) : null, /* @__PURE__ */ n("div", {
122
+ }) : null, /* @__PURE__ */ e("div", {
125
123
  className: t.copyButtonContainer,
126
- children: /* @__PURE__ */ n(et, {
127
- answer: o,
128
- onAnswerCopy: y,
129
- recordAction: a
124
+ children: /* @__PURE__ */ e(ot, {
125
+ answer: n,
126
+ onAnswerCopy: D,
127
+ recordAction: i
130
128
  })
131
129
  })]
132
- }) : o ? null : p();
133
- return /* @__PURE__ */ c("div", {
130
+ }) : n ? null : w();
131
+ return /* @__PURE__ */ u("div", {
134
132
  "aria-live": "polite",
135
133
  className: t.answer,
136
134
  "data-testid": "content-answers-answer",
137
- children: [h && /* @__PURE__ */ c("div", {
135
+ children: [f && /* @__PURE__ */ u("div", {
138
136
  className: t.loadingContainer,
139
- children: [/* @__PURE__ */ n(nt, {}), /* @__PURE__ */ n(w, {
137
+ children: [/* @__PURE__ */ e(et, {}), /* @__PURE__ */ e(N, {
140
138
  as: "span",
141
139
  className: t.loadingText,
142
140
  color: "textOnLightDefault",
143
141
  variant: "titleMedium",
144
- children: d(_.analyzingRequest)
142
+ children: c(d.analyzingRequest)
145
143
  })]
146
- }), !f && !h && /* @__PURE__ */ n(S, {
144
+ }), !_ && !f && /* @__PURE__ */ e(S, {
147
145
  className: "answer",
148
- variant: i,
149
- children: /* @__PURE__ */ c(S.Content, {
150
- isUsedInsideSidebar: i === "sidebar",
146
+ variant: a,
147
+ children: /* @__PURE__ */ u(S.Content, {
148
+ isUsedInsideSidebar: a === "sidebar",
151
149
  variant: "answer",
152
- children: [/* @__PURE__ */ n(ot, {
153
- answer: o,
150
+ children: [/* @__PURE__ */ e(nt, {
151
+ answer: n,
154
152
  isCompleted: r,
155
153
  isInlineCitationsEnabled: P,
156
154
  isInlineCitationV2Enabled: x,
157
- isMarkdownEnabled: M,
155
+ isMarkdownEnabled: y,
158
156
  isReactMarkdownEnabled: j,
159
157
  items: l,
160
- variant: i
161
- }), r && /* @__PURE__ */ c("div", {
162
- className: g(t.footer, {
163
- [t.shouldHaveMarginTop]: o,
158
+ variant: a
159
+ }), r && /* @__PURE__ */ u("div", {
160
+ className: p(t.footer, {
161
+ [t.shouldHaveMarginTop]: n,
164
162
  [t.shouldAnimateHeight]: W,
165
163
  [t.shouldUseAnimation]: V
166
164
  }),
167
165
  "data-testid": "content-answers-answer-footer",
168
- children: [e && J(), A && !e && /* @__PURE__ */ n(at, {
166
+ children: [o && J(), C && !o && /* @__PURE__ */ e(it, {
169
167
  citations: R,
170
- onCitationClick: D,
171
- recordAction: a
168
+ onCitationClick: L,
169
+ recordAction: i
172
170
  }), K()]
173
171
  })]
174
172
  })
175
- }), !f && !h && r && (m == null ? void 0 : m.onAction) && /* @__PURE__ */ n("div", {
173
+ }), !_ && !f && r && E?.onAction && /* @__PURE__ */ e("div", {
176
174
  className: t.embedTheAnswerButtonContainer,
177
- children: /* @__PURE__ */ n(st, {
178
- answer: o,
179
- embedTheAnswerButtonConfig: m,
180
- hostAppName: u,
181
- questionId: N,
182
- recordAction: a,
183
- variant: i
175
+ children: /* @__PURE__ */ e(st, {
176
+ answer: n,
177
+ embedTheAnswerButtonConfig: E,
178
+ hostAppName: m,
179
+ questionId: g,
180
+ recordAction: i,
181
+ variant: a
184
182
  })
185
- }), f && /* @__PURE__ */ n(rt, {
186
- contentType: O,
187
- error: e,
188
- recordAction: a,
189
- variant: i
183
+ }), _ && /* @__PURE__ */ e(rt, {
184
+ contentType: b,
185
+ error: o,
186
+ recordAction: i,
187
+ variant: a
190
188
  })]
191
189
  });
192
190
  });
193
191
  export {
194
- jt as Answer,
195
- jt as default
192
+ Gt as Answer,
193
+ Gt as default
196
194
  };