@box/box-ai-content-answers 0.156.3 → 0.158.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 (68) hide show
  1. package/dist/esm/lib/components/answer/answer.js +113 -101
  2. package/dist/esm/lib/components/answer/messages.js +4 -0
  3. package/dist/esm/lib/components/chat/chat.js +70 -68
  4. package/dist/esm/lib/components/content/content.js +25 -25
  5. package/dist/esm/lib/components/thinkingBubble/boxAILoadingIndicator.js +28 -21
  6. package/dist/esm/lib/components/thinkingBubble/thinkingBubble.js +81 -78
  7. package/dist/esm/lib/components/welcome-message/messages.js +2 -2
  8. package/dist/i18n/bn-IN.js +3 -2
  9. package/dist/i18n/bn-IN.properties +13 -3
  10. package/dist/i18n/da-DK.js +3 -2
  11. package/dist/i18n/da-DK.properties +13 -3
  12. package/dist/i18n/de-DE.js +3 -2
  13. package/dist/i18n/de-DE.properties +13 -3
  14. package/dist/i18n/en-AU.js +2 -1
  15. package/dist/i18n/en-AU.properties +12 -2
  16. package/dist/i18n/en-CA.js +2 -1
  17. package/dist/i18n/en-CA.properties +12 -2
  18. package/dist/i18n/en-GB.js +2 -1
  19. package/dist/i18n/en-GB.properties +12 -2
  20. package/dist/i18n/en-US.js +3 -2
  21. package/dist/i18n/en-US.properties +4 -2
  22. package/dist/i18n/en-x-pseudo.js +86 -85
  23. package/dist/i18n/en-x-pseudo.properties +91 -81
  24. package/dist/i18n/es-419.js +3 -2
  25. package/dist/i18n/es-419.properties +13 -3
  26. package/dist/i18n/es-ES.js +3 -2
  27. package/dist/i18n/es-ES.properties +13 -3
  28. package/dist/i18n/fi-FI.js +3 -2
  29. package/dist/i18n/fi-FI.properties +13 -3
  30. package/dist/i18n/fr-CA.js +3 -2
  31. package/dist/i18n/fr-CA.properties +13 -3
  32. package/dist/i18n/fr-FR.js +3 -2
  33. package/dist/i18n/fr-FR.properties +13 -3
  34. package/dist/i18n/hi-IN.js +3 -2
  35. package/dist/i18n/hi-IN.properties +13 -3
  36. package/dist/i18n/it-IT.js +3 -2
  37. package/dist/i18n/it-IT.properties +13 -3
  38. package/dist/i18n/ja-JP.js +3 -2
  39. package/dist/i18n/ja-JP.properties +13 -3
  40. package/dist/i18n/json/src/lib/components/answer/messages.json +1 -1
  41. package/dist/i18n/json/src/lib/components/welcome-message/messages.json +1 -1
  42. package/dist/i18n/ko-KR.js +3 -2
  43. package/dist/i18n/ko-KR.properties +13 -3
  44. package/dist/i18n/nb-NO.js +3 -2
  45. package/dist/i18n/nb-NO.properties +13 -3
  46. package/dist/i18n/nl-NL.js +3 -2
  47. package/dist/i18n/nl-NL.properties +13 -3
  48. package/dist/i18n/pl-PL.js +3 -2
  49. package/dist/i18n/pl-PL.properties +13 -3
  50. package/dist/i18n/pt-BR.js +3 -2
  51. package/dist/i18n/pt-BR.properties +13 -3
  52. package/dist/i18n/ru-RU.js +3 -2
  53. package/dist/i18n/ru-RU.properties +13 -3
  54. package/dist/i18n/sv-SE.js +3 -2
  55. package/dist/i18n/sv-SE.properties +13 -3
  56. package/dist/i18n/tr-TR.js +3 -2
  57. package/dist/i18n/tr-TR.properties +13 -3
  58. package/dist/i18n/zh-CN.js +3 -2
  59. package/dist/i18n/zh-CN.properties +13 -3
  60. package/dist/i18n/zh-TW.js +3 -2
  61. package/dist/i18n/zh-TW.properties +13 -3
  62. package/dist/styles/answer.css +1 -1
  63. package/dist/styles/thinkingBubble.css +1 -1
  64. package/dist/types/lib/components/answer/messages.d.ts +5 -0
  65. package/dist/types/lib/components/chat/chat.d.ts +1 -1
  66. package/dist/types/lib/components/thinkingBubble/boxAILoadingIndicator.d.ts +5 -1
  67. package/dist/types/lib/components/thinkingBubble/thinkingBubble.d.ts +1 -0
  68. package/package.json +4 -4
@@ -1,171 +1,183 @@
1
- import { Text as K } from "@box/blueprint-web";
1
+ import { Text as N } from "@box/blueprint-web";
2
2
  import { AlertTriangle as Q } from "@box/blueprint-web-assets/icons/Line";
3
3
  import { Gray65 as X, Size4 as I } from "@box/blueprint-web-assets/tokens/tokens";
4
- import S from "clsx";
5
- import { memo as Y, useState as Z, useEffect as g, useMemo as $ } from "react";
4
+ import w from "clsx";
5
+ import { memo as Y, useState as Z, useEffect as T, useMemo as $ } from "react";
6
6
  import { useIntl as tt } from "react-intl";
7
7
  import { A as r } from "../../../../chunks/types.js";
8
8
  import { injectInlineCitation as ot } from "../../utils/inlineCitationsUtils.js";
9
- import { MediaContainer as R } from "../common/media-container.js";
9
+ import { MediaContainer as S } from "../common/media-container.js";
10
+ import { BoxAILoadingIndicator as nt } from "../thinkingBubble/boxAILoadingIndicator.js";
10
11
  import { AnswerContent as et } from "./answer-content.js";
11
- import { CopyButton as nt } from "./copy-button.js";
12
- import { InlineError as rt } from "./inline-error.js";
13
- import { LoadingIndicator as st } from "./loading-indicator.js";
14
- import f from "./messages.js";
12
+ import { CopyButton as rt } from "./copy-button.js";
13
+ import { InlineError as st } from "./inline-error.js";
14
+ import u from "./messages.js";
15
15
  import { References as at } from "./references.js";
16
16
  import { ThumbButtons as it } from "./thumb-buttons.js";
17
- import { jsxs as l, jsx as n } from "react/jsx-runtime";
18
- import '../../../../styles/answer.css';const ct = "_answer_140hd_1", lt = "_alertIcon_140hd_5", dt = "_error_140hd_8", ut = "_footer_140hd_12", ft = "_copyButtonContainer_140hd_18", mt = "_feedbackButtonsContainer_140hd_19", _t = "_shouldHaveMarginTop_140hd_23", ht = "_shouldUseAnimation_140hd_26", Et = "_shouldAnimateHeight_140hd_30", pt = "_footerButtons_140hd_34", Nt = "_iconAvatar_140hd_40", It = "_buttonsVisible_140hd_56", o = {
19
- answer: ct,
20
- alertIcon: lt,
21
- error: dt,
22
- footer: ut,
23
- copyButtonContainer: ft,
24
- feedbackButtonsContainer: mt,
25
- shouldHaveMarginTop: _t,
26
- shouldUseAnimation: ht,
27
- shouldAnimateHeight: Et,
28
- footerButtons: pt,
29
- iconAvatar: Nt,
30
- buttonsVisible: It
31
- }, St = /* @__PURE__ */ new Set([r.RATE_LIMITING, r.NO_CONTENT, r.PRECONDITION_FAILED, r.GENERAL, r.AGENT_NOT_FOUND]), xt = /* @__PURE__ */ Y(({
32
- answer: t,
33
- citations: T,
17
+ import { jsxs as c, jsx as n } from "react/jsx-runtime";
18
+ import '../../../../styles/answer.css';const lt = "_answer_rp7w7_1", ct = "_loadingContainer_rp7w7_5", dt = "_loadingText_rp7w7_12", ut = "_fadeIn_rp7w7_1", _t = "_alertIcon_rp7w7_21", ft = "_error_rp7w7_24", mt = "_footer_rp7w7_28", pt = "_copyButtonContainer_rp7w7_34", ht = "_feedbackButtonsContainer_rp7w7_35", Et = "_shouldHaveMarginTop_rp7w7_39", gt = "_shouldUseAnimation_rp7w7_42", Nt = "_shouldAnimateHeight_rp7w7_46", It = "_footerButtons_rp7w7_50", wt = "_iconAvatar_rp7w7_56", Tt = "_buttonsVisible_rp7w7_72", t = {
19
+ answer: lt,
20
+ loadingContainer: ct,
21
+ loadingText: dt,
22
+ fadeIn: ut,
23
+ alertIcon: _t,
24
+ error: ft,
25
+ footer: mt,
26
+ copyButtonContainer: pt,
27
+ feedbackButtonsContainer: ht,
28
+ shouldHaveMarginTop: Et,
29
+ shouldUseAnimation: gt,
30
+ shouldAnimateHeight: Nt,
31
+ footerButtons: It,
32
+ iconAvatar: wt,
33
+ buttonsVisible: Tt
34
+ }, St = /* @__PURE__ */ new Set([r.RATE_LIMITING, r.NO_CONTENT, r.PRECONDITION_FAILED, r.GENERAL, r.AGENT_NOT_FOUND]), Vt = /* @__PURE__ */ Y(({
35
+ answer: o,
36
+ citations: R,
34
37
  error: e,
35
38
  contentType: A,
36
- hostAppName: d,
39
+ hostAppName: _,
37
40
  feedbackValue: O,
38
- isCitationsEnabled: b = !1,
41
+ isCitationsEnabled: B = !1,
39
42
  isCompleted: s = !1,
40
- isFeedbackEnabled: B = !1,
41
- isFeedbackFormEnabled: P,
42
- isFeedbackTooltipOpen: m,
43
- isInlineCitationsEnabled: _ = !1,
44
- isLoading: w = !1,
45
- isMarkdownEnabled: C = !1,
43
+ isFeedbackEnabled: b = !1,
44
+ isFeedbackFormEnabled: C,
45
+ isFeedbackTooltipOpen: f,
46
+ isInlineCitationsEnabled: m = !1,
47
+ isLoading: P = !1,
48
+ isMarkdownEnabled: x = !1,
46
49
  items: a = [],
47
- onAnswerCopy: M,
48
- onCitationClick: v,
50
+ onAnswerCopy: v,
51
+ onCitationClick: M,
49
52
  onFeedbackFormSubmit: y,
50
53
  onFeedbackTooltipOpenChange: D,
51
- prompt: F,
52
- promptType: H,
54
+ prompt: L,
55
+ promptType: F,
53
56
  recordAction: i,
54
- shouldFeedbackFormIncludeFeedbackText: L,
57
+ shouldFeedbackFormIncludeFeedbackText: H,
55
58
  shouldFeedbackIncludePromptData: U,
56
- useAnimation: x = !0,
57
- variant: c = "modal",
58
- isReactMarkdownEnabled: k,
59
- setAnswerFeedback: G,
60
- questionId: V
59
+ useAnimation: k = !0,
60
+ variant: l = "modal",
61
+ isReactMarkdownEnabled: G,
62
+ setAnswerFeedback: V,
63
+ questionId: j
61
64
  }) => {
62
- const h = St.has(e), E = w && !t && !e, [j, z] = Z(s), {
63
- formatMessage: u
65
+ const p = St.has(e), h = P && !o && !e, [z, q] = Z(s), {
66
+ formatMessage: d
64
67
  } = tt();
65
- g(() => {
66
- t && i && s && a.some((J) => t.includes(J.name)) && i({
68
+ T(() => {
69
+ o && i && s && a.some((K) => o.includes(K.name)) && i({
67
70
  action: "programmatic",
68
- component: c,
71
+ component: l,
69
72
  feature: "answers",
70
73
  target: "links_detected",
71
74
  data: {
72
- hostAppName: d,
75
+ hostAppName: _,
73
76
  linkCount: a.length,
74
77
  fileNameCount: a.length
75
78
  }
76
79
  });
77
- }, [t, c, d, s, i, a]), g(() => {
78
- setTimeout(() => z(s), 0);
80
+ }, [o, l, _, s, i, a]), T(() => {
81
+ setTimeout(() => q(s), 0);
79
82
  }, [s]);
80
- const p = () => /* @__PURE__ */ n(Q, {
81
- className: o.alertIcon,
83
+ const E = () => /* @__PURE__ */ n(Q, {
84
+ className: t.alertIcon,
82
85
  color: X,
83
86
  "data-testid": "content-answers-error-alert-icon",
84
87
  height: I,
85
88
  role: "presentation",
86
89
  width: I
87
- }), W = () => /* @__PURE__ */ l(K, {
90
+ }), W = () => /* @__PURE__ */ c(N, {
88
91
  as: "p",
89
- className: o.error,
92
+ className: t.error,
90
93
  color: "textOnLightSecondary",
91
94
  "data-testid": "content-answers-error",
92
95
  variant: "caption",
93
- children: [e === r.RESPONSE_INTERRUPTED && u(f.responseInterruptedError), e === r.RESPONSE_FAILED && u(f.responseFailedError), e === r.RESPONSE_STOPPED && u(f.responseStoppedError), e !== r.RESPONSE_STOPPED && p()]
94
- }), q = () => e !== r.RESPONSE_STOPPED ? /* @__PURE__ */ l("div", {
95
- className: S(o.footerButtons, "footer-buttons-container", {
96
- [o.buttonsVisible]: m
96
+ children: [e === r.RESPONSE_INTERRUPTED && d(u.responseInterruptedError), e === r.RESPONSE_FAILED && d(u.responseFailedError), e === r.RESPONSE_STOPPED && d(u.responseStoppedError), e !== r.RESPONSE_STOPPED && E()]
97
+ }), J = () => e !== r.RESPONSE_STOPPED ? /* @__PURE__ */ c("div", {
98
+ className: w(t.footerButtons, "footer-buttons-container", {
99
+ [t.buttonsVisible]: f
97
100
  }),
98
- children: [B ? /* @__PURE__ */ n("div", {
99
- className: o.feedbackButtonsContainer,
101
+ children: [b ? /* @__PURE__ */ n("div", {
102
+ className: t.feedbackButtonsContainer,
100
103
  children: /* @__PURE__ */ n(it, {
101
104
  feedbackValue: O,
102
- hostAppName: d,
103
- isFeedbackFormEnabled: P,
104
- isFeedbackTooltipOpen: m,
105
+ hostAppName: _,
106
+ isFeedbackFormEnabled: C,
107
+ isFeedbackTooltipOpen: f,
105
108
  items: a,
106
109
  onFeedbackFormSubmit: y,
107
110
  onFeedbackTooltipOpenChange: D,
108
- prompt: F,
109
- promptType: H,
110
- questionId: V,
111
+ prompt: L,
112
+ promptType: F,
113
+ questionId: j,
111
114
  recordAction: i,
112
- response: N,
113
- setAnswerFeedback: G,
114
- shouldFeedbackFormIncludeFeedbackText: L,
115
+ response: g,
116
+ setAnswerFeedback: V,
117
+ shouldFeedbackFormIncludeFeedbackText: H,
115
118
  shouldFeedbackIncludePromptData: U,
116
- variant: c
119
+ variant: l
117
120
  })
118
121
  }) : null, /* @__PURE__ */ n("div", {
119
- className: o.copyButtonContainer,
120
- children: /* @__PURE__ */ n(nt, {
121
- answer: t,
122
- onAnswerCopy: M,
122
+ className: t.copyButtonContainer,
123
+ children: /* @__PURE__ */ n(rt, {
124
+ answer: o,
125
+ onAnswerCopy: v,
123
126
  recordAction: i
124
127
  })
125
128
  })]
126
- }) : t ? null : p(), N = $(() => t && ot(t, {
129
+ }) : o ? null : E(), g = $(() => o && ot(o, {
127
130
  items: a,
128
131
  isCompleted: s,
129
- isInlineCitationsEnabled: _
130
- }), [t, a, s, _]);
131
- return /* @__PURE__ */ l("div", {
132
+ isInlineCitationsEnabled: m
133
+ }), [o, a, s, m]);
134
+ return /* @__PURE__ */ c("div", {
132
135
  "aria-live": "polite",
133
- className: o.answer,
136
+ className: t.answer,
134
137
  "data-testid": "content-answers-answer",
135
- children: [E && /* @__PURE__ */ n(st, {}), !h && !E && /* @__PURE__ */ n(R, {
138
+ children: [h && /* @__PURE__ */ c("div", {
139
+ className: t.loadingContainer,
140
+ children: [/* @__PURE__ */ n(nt, {}), /* @__PURE__ */ n(N, {
141
+ as: "span",
142
+ className: t.loadingText,
143
+ color: "textOnLightDefault",
144
+ variant: "titleMedium",
145
+ children: d(u.analyzingRequest)
146
+ })]
147
+ }), !p && !h && /* @__PURE__ */ n(S, {
136
148
  className: "answer",
137
- variant: c,
138
- children: /* @__PURE__ */ l(R.Content, {
139
- isUsedInsideSidebar: c === "sidebar",
149
+ variant: l,
150
+ children: /* @__PURE__ */ c(S.Content, {
151
+ isUsedInsideSidebar: l === "sidebar",
140
152
  variant: "answer",
141
153
  children: [/* @__PURE__ */ n(et, {
142
- answer: N,
143
- isMarkdownEnabled: C,
144
- isReactMarkdownEnabled: k,
145
- variant: c
146
- }), s && /* @__PURE__ */ l("div", {
147
- className: S(o.footer, {
148
- [o.shouldHaveMarginTop]: t,
149
- [o.shouldAnimateHeight]: j,
150
- [o.shouldUseAnimation]: x
154
+ answer: g,
155
+ isMarkdownEnabled: x,
156
+ isReactMarkdownEnabled: G,
157
+ variant: l
158
+ }), s && /* @__PURE__ */ c("div", {
159
+ className: w(t.footer, {
160
+ [t.shouldHaveMarginTop]: o,
161
+ [t.shouldAnimateHeight]: z,
162
+ [t.shouldUseAnimation]: k
151
163
  }),
152
164
  "data-testid": "content-answers-answer-footer",
153
- children: [e && W(), b && !e && /* @__PURE__ */ n(at, {
154
- citations: T,
155
- onCitationClick: v,
165
+ children: [e && W(), B && !e && /* @__PURE__ */ n(at, {
166
+ citations: R,
167
+ onCitationClick: M,
156
168
  recordAction: i
157
- }), q()]
169
+ }), J()]
158
170
  })]
159
171
  })
160
- }), h && /* @__PURE__ */ n(rt, {
172
+ }), p && /* @__PURE__ */ n(st, {
161
173
  contentType: A,
162
174
  error: e,
163
175
  recordAction: i,
164
- variant: c
176
+ variant: l
165
177
  })]
166
178
  });
167
179
  });
168
180
  export {
169
- xt as Answer,
170
- xt as default
181
+ Vt as Answer,
182
+ Vt as default
171
183
  };
@@ -100,6 +100,10 @@ const t = e({
100
100
  id: "boxAI.contentAnswers.loadingAnswer",
101
101
  defaultMessage: "Loading Answer..."
102
102
  },
103
+ analyzingRequest: {
104
+ id: "boxAI.contentAnswers.analyzingRequest",
105
+ defaultMessage: "Analyzing your request"
106
+ },
103
107
  noReferences: {
104
108
  id: "boxAI.contentAnswers.noReferences",
105
109
  defaultMessage: "Response based on general document analysis"
@@ -1,25 +1,25 @@
1
- import { Text as Y } from "@box/blueprint-web";
2
- import { BoxAiLogo as Z } from "@box/blueprint-web-assets/icons/Logo";
1
+ import { Text as Z } from "@box/blueprint-web";
2
+ import { BoxAiLogo as $ } from "@box/blueprint-web-assets/icons/Logo";
3
3
  import { Size10 as f } from "@box/blueprint-web-assets/tokens/tokens";
4
- import $ from "clsx";
5
- import * as w from "react";
6
- import { useIntl as L } from "react-intl";
7
- import { Answer as P } from "../answer/answer.js";
8
- import { MediaContainer as S } from "../common/media-container.js";
9
- import { Question as ee } from "../question/question.js";
10
- import { SuggestedQuestions as te } from "../suggested-questions/suggested-questions.js";
11
- import { ThinkingBubble as oe } from "../thinkingBubble/thinkingBubble.js";
12
- import ae from "../welcome-message/messages.js";
13
- import { WelcomeMessage as ie } from "../welcome-message/welcome-message.js";
4
+ import w from "clsx";
5
+ import * as L from "react";
6
+ import { useIntl as P } from "react-intl";
7
+ import { Answer as S } from "../answer/answer.js";
8
+ import { MediaContainer as ee } from "../common/media-container.js";
9
+ import { Question as te } from "../question/question.js";
10
+ import { SuggestedQuestions as oe } from "../suggested-questions/suggested-questions.js";
11
+ import { ThinkingBubble as ae } from "../thinkingBubble/thinkingBubble.js";
12
+ import ie from "../welcome-message/messages.js";
13
+ import { WelcomeMessage as re } from "../welcome-message/welcome-message.js";
14
14
  import { jsx as e, jsxs as _ } from "react/jsx-runtime";
15
- import '../../../../styles/chat.css';const re = "_chat_77vqr_1", se = "_clearChatText_77vqr_1", ne = "_landingPage_77vqr_7", ce = "_askQuestionText_77vqr_15", le = "_iconAvatar_77vqr_23", me = "_sidebar_77vqr_39", a = {
16
- chat: re,
17
- clearChatText: se,
18
- landingPage: ne,
19
- askQuestionText: ce,
20
- iconAvatar: le,
21
- sidebar: me
22
- }, qe = ({
15
+ import '../../../../styles/chat.css';const se = "_chat_77vqr_1", ne = "_clearChatText_77vqr_1", ce = "_landingPage_77vqr_7", le = "_askQuestionText_77vqr_15", me = "_iconAvatar_77vqr_23", pe = "_sidebar_77vqr_39", a = {
16
+ chat: se,
17
+ clearChatText: ne,
18
+ landingPage: ce,
19
+ askQuestionText: le,
20
+ iconAvatar: me,
21
+ sidebar: pe
22
+ }, Fe = ({
23
23
  askSuggestedQuestion: h,
24
24
  contentType: n,
25
25
  hasCustomSuggestedQuestions: T,
@@ -33,116 +33,118 @@ import '../../../../styles/chat.css';const re = "_chat_77vqr_1", se = "_clearCha
33
33
  onCitationClick: q,
34
34
  onAnswerCopy: F,
35
35
  onFeedbackFormSubmit: A,
36
- onSuggestedQuestionInteraction: I,
37
- questions: N,
36
+ onDropdownOpenChange: I,
37
+ onSuggestedQuestionInteraction: N,
38
+ questions: O,
38
39
  recordAction: c,
39
- setAnswerFeedback: O,
40
+ setAnswerFeedback: Q,
40
41
  setAskSuggestedQuestion: l,
41
42
  suggestedQuestions: m,
42
- suggestedQuestionsRequestState: Q,
43
- shouldFeedbackFormIncludeFeedbackText: j,
44
- shouldFeedbackIncludePromptData: y,
43
+ suggestedQuestionsRequestState: j,
44
+ shouldFeedbackFormIncludeFeedbackText: y,
45
+ shouldFeedbackIncludePromptData: B,
45
46
  shouldShowLandingPage: o,
46
- useAnimation: B,
47
+ useAnimation: M,
47
48
  variant: t = "modal",
48
- hostAppName: M = "",
49
- isReactMarkdownEnabled: z,
50
- welcomeMessageClearText: R,
49
+ hostAppName: z = "",
50
+ isReactMarkdownEnabled: R,
51
+ welcomeMessageClearText: W,
51
52
  ...p
52
53
  }) => {
53
54
  const {
54
- formatMessage: W
55
- } = L(), [D, E] = w.useState(null), G = (i, r) => {
56
- E(i ? r : null);
55
+ formatMessage: D
56
+ } = P(), [E, G] = L.useState(null), H = (i, r) => {
57
+ G(i ? r : null);
57
58
  };
58
59
  return /* @__PURE__ */ e("div", {
59
60
  className: a.chat,
60
61
  "data-testid": "content-answers-chat",
61
62
  children: /* @__PURE__ */ _("div", {
62
- className: $({
63
+ className: w({
63
64
  [a.landingPage]: o,
64
65
  [a.sidebar]: t === "sidebar"
65
66
  }),
66
- children: [o && /* @__PURE__ */ e(S.Figure, {
67
+ children: [o && /* @__PURE__ */ e(ee.Figure, {
67
68
  variant: t,
68
69
  children: /* @__PURE__ */ e("div", {
69
70
  className: a.iconAvatar,
70
- children: /* @__PURE__ */ e(Z, {
71
+ children: /* @__PURE__ */ e($, {
71
72
  height: f,
72
73
  role: "presentation",
73
74
  width: f
74
75
  })
75
76
  })
76
- }), /* @__PURE__ */ e(ie, {
77
+ }), /* @__PURE__ */ e(re, {
77
78
  contentType: "",
78
79
  shouldShowLandingPage: o,
79
80
  ...p,
80
81
  variant: t
81
- }), o && m !== void 0 && l !== void 0 && /* @__PURE__ */ e(te, {
82
+ }), o && m !== void 0 && l !== void 0 && /* @__PURE__ */ e(oe, {
82
83
  askSuggestedQuestion: h,
83
84
  hasCustomSuggestedQuestions: T,
84
85
  isLoading: x,
85
- onSuggestedQuestionInteraction: I,
86
+ onSuggestedQuestionInteraction: N,
86
87
  recordAction: c,
87
88
  setAskSuggestedQuestion: l,
88
89
  suggestedQuestions: m,
89
- suggestedQuestionsRequestState: Q,
90
+ suggestedQuestionsRequestState: j,
90
91
  variant: t
91
- }), /* @__PURE__ */ e(Y, {
92
+ }), /* @__PURE__ */ e(Z, {
92
93
  as: "p",
93
94
  className: a.clearChatText,
94
- children: R || W(ae.welcomeClearChatText, {
95
+ children: W || D(ie.welcomeClearChatText, {
95
96
  type: n
96
97
  })
97
98
  }), !o && /* @__PURE__ */ e("ul", {
98
- children: N.map(({
99
+ children: O.map(({
99
100
  answer: i,
100
101
  thinkingAnswer: r,
101
- citations: H,
102
+ citations: J,
102
103
  id: s,
103
- isCompleted: J,
104
- isLoading: K,
105
- error: U,
104
+ isCompleted: K,
105
+ isLoading: U,
106
+ error: V,
106
107
  prompt: d,
107
- promptType: V,
108
- feedbackValue: X
108
+ promptType: X,
109
+ feedbackValue: Y
109
110
  }) => /* @__PURE__ */ _("li", {
110
- children: [/* @__PURE__ */ e(ee, {
111
+ children: [/* @__PURE__ */ e(te, {
111
112
  prompt: d,
112
113
  variant: t
113
- }), r && /* @__PURE__ */ e(oe, {
114
+ }), r && /* @__PURE__ */ e(ae, {
114
115
  content: r,
115
116
  isThinkingComplete: !!i,
117
+ onDropdownOpenChange: I,
116
118
  variant: t
117
- }), /* @__PURE__ */ e(P, {
119
+ }), /* @__PURE__ */ e(S, {
118
120
  answer: i,
119
- citations: H,
121
+ citations: J,
120
122
  contentType: n,
121
- error: U,
122
- feedbackValue: X,
123
- hostAppName: M,
123
+ error: V,
124
+ feedbackValue: Y,
125
+ hostAppName: z,
124
126
  isCitationsEnabled: b,
125
- isCompleted: J,
127
+ isCompleted: K,
126
128
  isFeedbackEnabled: C,
127
129
  isFeedbackFormEnabled: v,
128
- isFeedbackTooltipOpen: D === s,
130
+ isFeedbackTooltipOpen: E === s,
129
131
  isInlineCitationsEnabled: g,
130
- isLoading: K || u,
132
+ isLoading: U || u,
131
133
  isMarkdownEnabled: k,
132
- isReactMarkdownEnabled: z,
134
+ isReactMarkdownEnabled: R,
133
135
  items: p.items,
134
136
  onAnswerCopy: F,
135
137
  onCitationClick: q,
136
138
  onFeedbackFormSubmit: A,
137
- onFeedbackTooltipOpenChange: G,
139
+ onFeedbackTooltipOpenChange: H,
138
140
  prompt: d,
139
- promptType: V,
141
+ promptType: X,
140
142
  questionId: s,
141
143
  recordAction: c,
142
- setAnswerFeedback: O,
143
- shouldFeedbackFormIncludeFeedbackText: j,
144
- shouldFeedbackIncludePromptData: y,
145
- useAnimation: B,
144
+ setAnswerFeedback: Q,
145
+ shouldFeedbackFormIncludeFeedbackText: y,
146
+ shouldFeedbackIncludePromptData: B,
147
+ useAnimation: M,
146
148
  variant: t
147
149
  })]
148
150
  }, s))
@@ -151,6 +153,6 @@ import '../../../../styles/chat.css';const re = "_chat_77vqr_1", se = "_clearCha
151
153
  });
152
154
  };
153
155
  export {
154
- qe as Chat,
155
- qe as default
156
+ Fe as Chat,
157
+ Fe as default
156
158
  };
@@ -4,10 +4,10 @@ import * as t from "react";
4
4
  import { useIntl as S } from "react-intl";
5
5
  import k from "../../messages.js";
6
6
  import { C as y } from "../../../../chunks/types.js";
7
- import { jsx as n, jsxs as H, Fragment as V } from "react/jsx-runtime";
7
+ import { jsx as r, jsxs as H, Fragment as V } from "react/jsx-runtime";
8
8
  import { ModalError as A } from "../modal-error/modal-error.js";
9
9
  import { Chat as B } from "../chat/chat.js";
10
- import '../../../../styles/content2.css';const D = "_loadingIndicatorWrapper_1juw3_1", G = "_content_1juw3_5", J = "_sidebar_1juw3_14", K = "_isLoading_1juw3_17", Q = "_messagesEnd_1juw3_21", U = "_innerContent_1juw3_25", r = {
10
+ import '../../../../styles/content2.css';const D = "_loadingIndicatorWrapper_1juw3_1", G = "_content_1juw3_5", J = "_sidebar_1juw3_14", K = "_isLoading_1juw3_17", Q = "_messagesEnd_1juw3_21", U = "_innerContent_1juw3_25", o = {
11
11
  loadingIndicatorWrapper: D,
12
12
  content: G,
13
13
  sidebar: J,
@@ -31,11 +31,11 @@ import '../../../../styles/content2.css';const D = "_loadingIndicatorWrapper_1ju
31
31
  hostAppName: I = "",
32
32
  ...L
33
33
  }) => {
34
- const d = t.useRef(null), l = t.useRef(null), f = t.useRef(null), o = t.useRef(!0), [g, N] = t.useState(!1), {
34
+ const f = t.useRef(null), l = t.useRef(null), d = t.useRef(null), n = t.useRef(!0), [g, N] = t.useState(!1), {
35
35
  formatMessage: O
36
36
  } = S(), E = u === y.LARGE_FILE, s = t.useCallback((a) => {
37
37
  var e;
38
- (e = f.current) != null && e.scrollIntoView && l.current && (!i || o.current) && f.current.scrollIntoView({
38
+ (e = d.current) != null && e.scrollIntoView && l.current && (!i || n.current) && d.current.scrollIntoView({
39
39
  behavior: a,
40
40
  block: "nearest"
41
41
  });
@@ -47,39 +47,39 @@ import '../../../../styles/content2.css';const D = "_loadingIndicatorWrapper_1ju
47
47
  scrollHeight: T
48
48
  } = l.current, W = T - (a + e);
49
49
  if (c && W > 100) {
50
- o.current = !1;
50
+ n.current = !1;
51
51
  return;
52
52
  }
53
- o.current = !0;
53
+ n.current = !0;
54
54
  }
55
55
  };
56
56
  t.useEffect(() => {
57
- g ? o.current = !1 : c && (o.current = !0, s("instant"));
57
+ g ? n.current = !1 : c && (n.current = !0, s("instant"));
58
58
  }, [g, s, c]), t.useEffect(() => {
59
- o.current = !0, s("instant");
59
+ n.current = !0, s("instant");
60
60
  }, [s]), t.useLayoutEffect(() => {
61
- if (!d.current)
61
+ if (!f.current)
62
62
  return;
63
63
  const a = new ResizeObserver(() => {
64
- s(i ? "instant" : "smooth");
65
- }), e = d.current;
64
+ n.current && s(i ? "instant" : "smooth");
65
+ }), e = f.current;
66
66
  return e && a.observe(e), () => {
67
67
  e && a.unobserve(e);
68
68
  };
69
69
  }, [s, i]);
70
- const z = () => h && !E ? /* @__PURE__ */ n(A, {
70
+ const z = () => h && !E ? /* @__PURE__ */ r(A, {
71
71
  error: u,
72
72
  recordAction: m
73
- }) : p ? /* @__PURE__ */ n("div", {
74
- className: r.loadingIndicatorWrapper,
75
- children: /* @__PURE__ */ n(F, {
73
+ }) : p ? /* @__PURE__ */ r("div", {
74
+ className: o.loadingIndicatorWrapper,
75
+ children: /* @__PURE__ */ r(F, {
76
76
  "aria-label": O(k.loading),
77
- className: r.loadingIndicator,
77
+ className: o.loadingIndicator,
78
78
  "data-testid": "content-answers-modal-loading-indicator",
79
79
  size: "large"
80
80
  })
81
81
  }) : /* @__PURE__ */ H(V, {
82
- children: [/* @__PURE__ */ n(B, {
82
+ children: [/* @__PURE__ */ r(B, {
83
83
  askSuggestedQuestion: b,
84
84
  hasCustomSuggestedQuestions: C,
85
85
  hasRequestInProgress: c,
@@ -93,19 +93,19 @@ import '../../../../styles/content2.css';const D = "_loadingIndicatorWrapper_1ju
93
93
  useAnimation: j,
94
94
  variant: _,
95
95
  ...L
96
- }), /* @__PURE__ */ n("div", {
97
- ref: f,
98
- className: r.messagesEnd
96
+ }), /* @__PURE__ */ r("div", {
97
+ ref: d,
98
+ className: o.messagesEnd
99
99
  })]
100
100
  });
101
- return /* @__PURE__ */ n("div", {
101
+ return /* @__PURE__ */ r("div", {
102
102
  ref: l,
103
- className: M(r.content, _ === "sidebar" && r.sidebar, p && r.isLoading),
103
+ className: M(o.content, _ === "sidebar" && o.sidebar, p && o.isLoading),
104
104
  "data-testid": "content-answers-content",
105
105
  onScroll: x,
106
- children: /* @__PURE__ */ n("div", {
107
- ref: d,
108
- className: r.innerContent,
106
+ children: /* @__PURE__ */ r("div", {
107
+ ref: f,
108
+ className: o.innerContent,
109
109
  children: z()
110
110
  })
111
111
  });