@box/box-ai-content-answers 0.132.3 → 0.133.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 (38) hide show
  1. package/dist/esm/lib/box-ai-content-answers.js +30 -28
  2. package/dist/esm/lib/components/footer/footer.js +113 -94
  3. package/dist/esm/lib/components/footer/messages.js +10 -2
  4. package/dist/esm/lib/components/sidebar/sidebar.js +32 -30
  5. package/dist/i18n/bn-IN.js +2 -0
  6. package/dist/i18n/da-DK.js +2 -0
  7. package/dist/i18n/de-DE.js +2 -0
  8. package/dist/i18n/en-AU.js +2 -0
  9. package/dist/i18n/en-CA.js +2 -0
  10. package/dist/i18n/en-GB.js +2 -0
  11. package/dist/i18n/en-US.js +2 -0
  12. package/dist/i18n/en-US.properties +4 -0
  13. package/dist/i18n/en-x-pseudo.js +2 -0
  14. package/dist/i18n/es-419.js +2 -0
  15. package/dist/i18n/es-ES.js +2 -0
  16. package/dist/i18n/fi-FI.js +2 -0
  17. package/dist/i18n/fr-CA.js +2 -0
  18. package/dist/i18n/fr-FR.js +2 -0
  19. package/dist/i18n/hi-IN.js +2 -0
  20. package/dist/i18n/it-IT.js +2 -0
  21. package/dist/i18n/ja-JP.js +2 -0
  22. package/dist/i18n/json/src/lib/components/footer/messages.json +1 -1
  23. package/dist/i18n/ko-KR.js +2 -0
  24. package/dist/i18n/nb-NO.js +2 -0
  25. package/dist/i18n/nl-NL.js +2 -0
  26. package/dist/i18n/pl-PL.js +2 -0
  27. package/dist/i18n/pt-BR.js +2 -0
  28. package/dist/i18n/ru-RU.js +2 -0
  29. package/dist/i18n/sv-SE.js +2 -0
  30. package/dist/i18n/tr-TR.js +2 -0
  31. package/dist/i18n/zh-CN.js +2 -0
  32. package/dist/i18n/zh-TW.js +2 -0
  33. package/dist/types/lib/box-ai-content-answers.d.ts +2 -0
  34. package/dist/types/lib/components/api-wrapper/types.d.ts +1 -0
  35. package/dist/types/lib/components/footer/footer.d.ts +4 -2
  36. package/dist/types/lib/components/footer/messages.d.ts +10 -0
  37. package/dist/types/lib/components/sidebar/sidebar.d.ts +1 -0
  38. package/package.json +4 -4
@@ -1,14 +1,14 @@
1
1
  import p from "clsx";
2
2
  import * as s from "react";
3
- import { C as H } from "../../chunks/types.js";
4
- import { jsx as u, jsxs as J } from "react/jsx-runtime";
5
- import { Content as K } from "./components/content/content.js";
6
- import { Footer as V } from "./components/footer/footer.js";
7
- import '../../styles/box-ai-content-answers.css';const W = "_container_1p5tb_1", X = "_contentAnswers_1p5tb_8", Y = "_sidebar_1p5tb_19", a = {
8
- container: W,
9
- contentAnswers: X,
10
- sidebar: Y
11
- }, I = ({
3
+ import { C as J } from "../../chunks/types.js";
4
+ import { jsx as u, jsxs as K } from "react/jsx-runtime";
5
+ import { Content as V } from "./components/content/content.js";
6
+ import { Footer as W } from "./components/footer/footer.js";
7
+ import '../../styles/box-ai-content-answers.css';const X = "_container_1p5tb_1", Y = "_contentAnswers_1p5tb_8", Z = "_sidebar_1p5tb_19", a = {
8
+ container: X,
9
+ contentAnswers: Y,
10
+ sidebar: Z
11
+ }, U = ({
12
12
  className: _,
13
13
  contentType: h,
14
14
  contentName: Q,
@@ -27,50 +27,51 @@ import '../../styles/box-ai-content-answers.css';const W = "_container_1p5tb_1",
27
27
  submitQuestion: C,
28
28
  suggestedQuestions: F,
29
29
  useAnimation: D,
30
- onAgentEditorToggle: Z,
30
+ onAgentEditorToggle: $,
31
31
  onUserIntentToUseAI: e,
32
+ promptButtonClickHandler: N,
32
33
  variant: o = "modal",
33
- hostAppName: N,
34
- ...k
34
+ hostAppName: k,
35
+ ...j
35
36
  }) => {
36
- const [f, m] = s.useState(null), [S, j] = s.useState(t != null), [c, y] = s.useState(!1), O = t === H.LARGE_FILE, z = (!S || O) && !g, b = (r) => {
37
+ const [f, m] = s.useState(null), [S, y] = s.useState(t != null), [c, O] = s.useState(!1), z = t === J.LARGE_FILE, B = (!S || z) && !g, b = (r) => {
37
38
  l && l({
38
39
  ...r,
39
40
  component: o
40
41
  });
41
- }, B = () => {
42
+ }, G = () => {
42
43
  e && e(!1);
43
- }, G = (r) => {
44
+ }, L = (r) => {
44
45
  m(r), e && e(!0);
45
- }, L = () => {
46
+ }, H = () => {
46
47
  e && e(!0);
47
48
  };
48
49
  return s.useEffect(() => {
49
- j(t != null);
50
+ y(t != null);
50
51
  }, [t]), /* @__PURE__ */ u("div", {
51
52
  className: p(_, a.container),
52
- children: /* @__PURE__ */ J("div", {
53
+ children: /* @__PURE__ */ K("div", {
53
54
  className: p(a.contentAnswers, o === "sidebar" && a.sidebar),
54
- children: [!c && /* @__PURE__ */ u(K, {
55
- ...k,
55
+ children: [!c && /* @__PURE__ */ u(V, {
56
+ ...j,
56
57
  askSuggestedQuestion: f,
57
58
  contentName: Q,
58
59
  contentType: h,
59
60
  error: t,
60
61
  hasCustomSuggestedQuestions: w,
61
62
  hasRequestInProgress: d,
62
- hostAppName: N,
63
+ hostAppName: k,
63
64
  isErrorMessageShown: S,
64
65
  isStreamingEnabled: n,
65
- onSuggestedQuestionInteraction: B,
66
+ onSuggestedQuestionInteraction: G,
66
67
  questions: i,
67
68
  recordAction: b,
68
- setAskSuggestedQuestion: G,
69
+ setAskSuggestedQuestion: L,
69
70
  showLoadingIndicator: g,
70
71
  suggestedQuestions: F,
71
72
  useAnimation: n && D,
72
73
  variant: o
73
- }), z && /* @__PURE__ */ u(V, {
74
+ }), B && /* @__PURE__ */ u(W, {
74
75
  askSuggestedQuestion: f,
75
76
  enableDebugMode: E,
76
77
  hasRequestInProgress: d,
@@ -81,12 +82,13 @@ import '../../styles/box-ai-content-answers.css';const W = "_container_1p5tb_1",
81
82
  lastQuestion: i[i.length - 1],
82
83
  onRetryQuestion: R,
83
84
  onStopQuestion: x,
84
- onUserInteraction: L,
85
+ onUserInteraction: H,
86
+ promptButtonClickHandler: N,
85
87
  recordAction: b,
86
88
  sendQuestion: C,
87
89
  setAskSuggestedQuestion: m,
88
90
  toggleDebugMode: () => {
89
- y(!c);
91
+ O(!c);
90
92
  },
91
93
  variant: o
92
94
  })]
@@ -94,6 +96,6 @@ import '../../styles/box-ai-content-answers.css';const W = "_container_1p5tb_1",
94
96
  });
95
97
  };
96
98
  export {
97
- I as BoxAiContentAnswers,
98
- I as default
99
+ U as BoxAiContentAnswers,
100
+ U as default
99
101
  };
@@ -1,127 +1,146 @@
1
- import z from "clsx";
2
- import V from "lodash/noop";
1
+ import Z from "clsx";
2
+ import $ from "lodash/noop";
3
3
  import * as r from "react";
4
- import { useIntl as J } from "react-intl";
5
- import { useBreakpoint as Z, Breakpoint as $, TextArea as q, Tooltip as Q, Button as g } from "@box/blueprint-web";
6
- import { ArrowUp as tt } from "@box/blueprint-web-assets/icons/Fill";
7
- import { useAgents as at } from "@box/box-ai-agent-selector";
8
- import { FooterActions as rt } from "./footer-actions.js";
9
- import { s as _, S as et } from "../../../../chunks/stopResponseButton.js";
10
- import { getAIAgentConfig as R } from "../common/agentUtils.js";
11
- import { isDebugModeTrigger as ot, isEnterTrigger as it } from "../common/keyInputUtils.js";
12
- import { TEXT_AREA as n, INPUT_TARGET_ID as nt } from "./constants.js";
13
- import { U as st } from "../../../../chunks/types.js";
14
- import m from "./messages.js";
15
- import { LOGGER_BASE_CONFIG as A, LOGGER_ACTION_CLICK as lt, LOGGER_ACTION_KEYPRESS as mt } from "../common/constants.js";
16
- import { jsxs as v, jsx as u } from "react/jsx-runtime";
17
- const Nt = ({
4
+ import { useIntl as q } from "react-intl";
5
+ import { useBreakpoint as g, Breakpoint as Q, FilterChip as M, TextArea as tt, Tooltip as at, Button as rt } from "@box/blueprint-web";
6
+ import { ArrowUp as et } from "@box/blueprint-web-assets/icons/Fill";
7
+ import { useAgents as ot } from "@box/box-ai-agent-selector";
8
+ import { FooterActions as nt } from "./footer-actions.js";
9
+ import { s as b, S as it } from "../../../../chunks/stopResponseButton.js";
10
+ import { getAIAgentConfig as A } from "../common/agentUtils.js";
11
+ import { isDebugModeTrigger as lt, isEnterTrigger as st } from "../common/keyInputUtils.js";
12
+ import { TEXT_AREA as m, INPUT_TARGET_ID as mt } from "./constants.js";
13
+ import { U as pt } from "../../../../chunks/types.js";
14
+ import l from "./messages.js";
15
+ import { LOGGER_BASE_CONFIG as y, LOGGER_ACTION_CLICK as ct, LOGGER_ACTION_KEYPRESS as ft } from "../common/constants.js";
16
+ import { jsxs as w, jsx as s } from "react/jsx-runtime";
17
+ const Ot = ({
18
18
  askSuggestedQuestion: c,
19
- enableDebugMode: M = !1,
19
+ enableDebugMode: L = !1,
20
20
  hasRequestInProgress: o,
21
- isAIStudioAgentSelectorEnabled: C,
22
- isDebugModeShown: b,
23
- isStopResponseEnabled: B,
24
- isStreamingEnabled: w,
25
- lastQuestion: E,
26
- onRetryQuestion: k,
27
- onStopQuestion: X,
28
- onUserInteraction: d = V,
29
- recordAction: i,
30
- sendQuestion: L,
31
- setAskSuggestedQuestion: x,
32
- toggleDebugMode: s,
33
- variant: y = "modal"
21
+ isAIStudioAgentSelectorEnabled: d,
22
+ isDebugModeShown: k,
23
+ isStopResponseEnabled: X,
24
+ isStreamingEnabled: H,
25
+ lastQuestion: h,
26
+ onRetryQuestion: G,
27
+ onStopQuestion: I,
28
+ onUserInteraction: E = $,
29
+ recordAction: n,
30
+ sendQuestion: x,
31
+ setAskSuggestedQuestion: N,
32
+ toggleDebugMode: p,
33
+ promptButtonClickHandler: v,
34
+ variant: F = "modal"
34
35
  }) => {
35
- const G = y === "sidebar", l = J(), H = Z(), a = r.useRef(null), I = H <= $.Medium && !G ? n.MAX_ROWS_MOBILE : n.MAX_ROWS, [f, N] = r.useState(!0), [K, O] = r.useState(!1), {
36
- selectedAgent: T
37
- } = at(), {
38
- answer: S,
39
- isCompleted: F
40
- } = E ?? {}, U = w && F === !1 && (B || S), h = r.useCallback(() => {
36
+ const B = F === "sidebar", i = q(), K = g(), a = r.useRef(null), P = K <= Q.Medium && !B ? m.MAX_ROWS_MOBILE : m.MAX_ROWS, [f, O] = r.useState(!0), [S, R] = r.useState(!1), {
37
+ selectedAgent: C
38
+ } = ot(), {
39
+ answer: U,
40
+ isCompleted: j
41
+ } = h ?? {}, D = H && j === !1 && (X || U), T = r.useCallback(() => {
41
42
  a.current && a.current.focus();
42
- }, [a]), j = r.useCallback(() => {
43
+ }, [a]), _ = r.useCallback(() => {
43
44
  var e;
44
- d();
45
+ E();
45
46
  let t = ((e = a.current) == null ? void 0 : e.value) ?? "";
46
- a.current && t.length > n.MAX_LENGTH && (a.current.value = t.slice(0, n.MAX_LENGTH), t = a.current.value), O(t.length >= n.MAX_LENGTH), N(t.trim().length === 0);
47
- }, [a, d]), p = r.useCallback((t = st) => {
48
- if (h(), !o && a.current) {
47
+ a.current && t.length > m.MAX_LENGTH && (a.current.value = t.slice(0, m.MAX_LENGTH), t = a.current.value), R(t.length >= m.MAX_LENGTH), O(t.trim().length === 0);
48
+ }, [a, E]), u = r.useCallback((t = pt) => {
49
+ if (T(), !o && a.current) {
49
50
  const e = {
50
51
  prompt: a.current.value,
51
52
  promptType: t
52
53
  };
53
54
  if (e.prompt && e.prompt.trim()) {
54
- const Y = R(C, T);
55
- L(e, Y), a.current.value = "", N(!0), O(!1);
55
+ const J = A(d, C);
56
+ x(e, J), a.current.value = "", O(!0), R(!1);
56
57
  }
57
- b && s && s();
58
+ k && p && p();
58
59
  }
59
- }, [T, h, o, a, C, b, L, s]), D = r.useCallback((t) => {
60
- t.preventDefault(), !o && !f && i && i({
61
- ...A,
62
- action: lt,
60
+ }, [C, T, o, a, d, k, x, p]), W = r.useCallback((t) => {
61
+ t.preventDefault(), !o && !f && n && n({
62
+ ...y,
63
+ action: ct,
63
64
  target: "ask"
64
- }), p();
65
- }, [o, f, i, p]), P = r.useCallback((t) => {
66
- M && s && ot(t) && s(), it(t) && (t.preventDefault(), !o && !f && i && i({
67
- ...A,
68
- action: mt,
65
+ }), u();
66
+ }, [o, f, n, u]), Y = r.useCallback((t) => {
67
+ L && p && lt(t) && p(), st(t) && (t.preventDefault(), !o && !f && n && n({
68
+ ...y,
69
+ action: ft,
69
70
  target: "ask"
70
- }), p());
71
- }, [M, o, f, i, p, s]), W = r.useCallback((t) => {
72
- const e = R(C, T);
73
- k(t, e);
74
- }, [T, C, k]);
75
- return r.useEffect(() => {
76
- queueMicrotask(h);
71
+ }), u());
72
+ }, [L, o, f, n, u, p]), z = r.useCallback((t) => {
73
+ const e = A(d, C);
74
+ G(t, e);
75
+ }, [C, d, G]);
76
+ r.useEffect(() => {
77
+ queueMicrotask(T);
77
78
  }, []), r.useEffect(() => {
78
- if (c && a.current && !o && x) {
79
+ if (c && a.current && !o && N) {
79
80
  const {
80
81
  prompt: t,
81
82
  type: e
82
83
  } = c;
83
- a.current.value = t, p(e), x(null);
84
+ a.current.value = t, u(e), N(null);
84
85
  }
85
- }, [c == null ? void 0 : c.id]), /* @__PURE__ */ v("div", {
86
- children: [E && /* @__PURE__ */ u(rt, {
87
- lastQuestion: E,
88
- onRetryButtonInteraction: d,
89
- onRetryQuestion: W,
90
- recordAction: i
91
- }), /* @__PURE__ */ v("div", {
92
- className: z(_.questionInput, G && _.sidebar),
93
- children: [/* @__PURE__ */ u(q, {
86
+ }, [c == null ? void 0 : c.id]);
87
+ const V = r.useCallback((t) => {
88
+ a.current && (a.current.value = t, _());
89
+ }, [_]);
90
+ return /* @__PURE__ */ w("div", {
91
+ children: [h && /* @__PURE__ */ s(nt, {
92
+ lastQuestion: h,
93
+ onRetryButtonInteraction: E,
94
+ onRetryQuestion: z,
95
+ recordAction: n
96
+ }), /* @__PURE__ */ w("div", {
97
+ className: Z(b.questionInput, B && b.sidebar),
98
+ children: [v && /* @__PURE__ */ s(M.Group, {
99
+ name: "prompt-library",
100
+ type: "single",
101
+ children: /* @__PURE__ */ s(M.ChipButton, {
102
+ "aria-label": i.formatMessage(l.openPromptLibraryBtn),
103
+ "data-testid": "open-prompt-library-button",
104
+ onClick: () => {
105
+ v(V);
106
+ },
107
+ value: "add-prompt",
108
+ children: /* @__PURE__ */ s(M.Label, {
109
+ children: i.formatMessage(l.promptsBtn)
110
+ })
111
+ })
112
+ }), /* @__PURE__ */ s(tt, {
94
113
  ref: a,
95
- className: _.textArea,
96
- "data-target-id": nt,
114
+ className: b.textArea,
115
+ "data-target-id": mt,
97
116
  "data-testid": "content-answers-question-input",
98
- error: K && l.formatMessage(m.maxCharactersReachedError, {
99
- characterLimit: n.MAX_LENGTH
117
+ error: S && i.formatMessage(l.maxCharactersReachedError, {
118
+ characterLimit: m.MAX_LENGTH
100
119
  }),
101
120
  hideLabel: !0,
102
- label: l.formatMessage(m.askQuestionPlaceholder),
103
- maxLength: n.MAX_LENGTH,
104
- maxRows: I,
105
- onChange: j,
106
- onKeyDown: P,
107
- placeholder: l.formatMessage(m.askQuestionPlaceholder)
108
- }), U ? /* @__PURE__ */ u(et, {
109
- lastQuestion: E,
110
- onStopQuestion: X,
111
- recordAction: i
112
- }) : /* @__PURE__ */ u(Q, {
113
- content: l.formatMessage(m.ask),
121
+ label: i.formatMessage(l.askQuestionPlaceholder),
122
+ maxLength: m.MAX_LENGTH,
123
+ maxRows: P,
124
+ onChange: _,
125
+ onKeyDown: Y,
126
+ placeholder: i.formatMessage(l.askQuestionPlaceholder)
127
+ }), D ? /* @__PURE__ */ s(it, {
128
+ lastQuestion: h,
129
+ onStopQuestion: I,
130
+ recordAction: n
131
+ }) : /* @__PURE__ */ s(at, {
132
+ content: i.formatMessage(l.ask),
114
133
  "data-testid": "ask-tooltip",
115
134
  variant: "standard",
116
- children: /* @__PURE__ */ u(g, {
117
- "aria-label": l.formatMessage(m.ask),
118
- className: _.inputAreaButton,
135
+ children: /* @__PURE__ */ s(rt, {
136
+ "aria-label": i.formatMessage(l.ask),
137
+ className: b.inputAreaButton,
119
138
  "data-testid": "content-answers-submit-button",
120
139
  disabled: f || o,
121
- icon: tt,
140
+ icon: et,
122
141
  loading: !1,
123
- loadingAriaLabel: l.formatMessage(m.askDisabledTooltip),
124
- onClick: D,
142
+ loadingAriaLabel: i.formatMessage(l.askDisabledTooltip),
143
+ onClick: W,
125
144
  size: "large",
126
145
  "data-target-id": "Button-ask"
127
146
  })
@@ -130,5 +149,5 @@ const Nt = ({
130
149
  });
131
150
  };
132
151
  export {
133
- Nt as Footer
152
+ Ot as Footer
134
153
  };
@@ -1,5 +1,13 @@
1
1
  import { defineMessages as e } from "react-intl";
2
- const a = e({
2
+ const t = e({
3
+ openPromptLibraryBtn: {
4
+ id: "boxAI.contentAnswers.openPromptLibraryBtn",
5
+ defaultMessage: "Open Prompt Library"
6
+ },
7
+ promptsBtn: {
8
+ id: "boxAI.contentAnswers.promptsBtn",
9
+ defaultMessage: "Prompts"
10
+ },
3
11
  maxCharactersReachedError: {
4
12
  id: "boxAI.contentAnswers.maxCharactersReachedError",
5
13
  defaultMessage: "Maximum of {characterLimit} characters reached"
@@ -26,5 +34,5 @@ const a = e({
26
34
  }
27
35
  });
28
36
  export {
29
- a as default
37
+ t as default
30
38
  };
@@ -1,13 +1,13 @@
1
- import { AgentsProvider as z } from "@box/box-ai-agent-selector";
1
+ import { AgentsProvider as B } from "@box/box-ai-agent-selector";
2
2
  import * as F from "react";
3
3
  import { useIntl as U } from "react-intl";
4
4
  import { SPREADSHEET_FILE_EXTENSIONS as V, INTELLIGENT_QUERY_COMPATIBLE_SPREADSHEET_EXTENSIONS as X } from "../common/constants.js";
5
5
  import j from "./content.js";
6
- import { IntelligenceSidebarContext as B } from "./context.js";
6
+ import { IntelligenceSidebarContext as G } from "./context.js";
7
7
  import g from "./messages.js";
8
8
  import { jsx as m } from "react/jsx-runtime";
9
- const ee = (L) => {
10
- var C;
9
+ const se = (L) => {
10
+ var A;
11
11
  const {
12
12
  cache: e,
13
13
  contentName: S,
@@ -16,20 +16,21 @@ const ee = (L) => {
16
16
  fileID: M,
17
17
  getSuggestedQuestions: h,
18
18
  isIntelligentQueryMode: T,
19
- isFeedbackEnabled: E,
20
- isFeedbackFormEnabled: Q,
19
+ isFeedbackEnabled: p,
20
+ isFeedbackFormEnabled: E,
21
21
  isStopResponseEnabled: o = !1,
22
22
  items: n,
23
- itemSize: p,
24
- localizedQuestions: _,
23
+ itemSize: Q,
24
+ localizedQuestions: k,
25
25
  onFeedbackFormSubmit: I,
26
26
  onUserInteraction: b,
27
27
  onSelectedAgentCallback: N,
28
- recordAction: P,
28
+ recordAction: C,
29
29
  setCacheValue: i,
30
30
  shouldPreinitSession: r = !0,
31
31
  setHasQuestions: l,
32
- ...k
32
+ promptButtonClickHandler: H,
33
+ ..._
33
34
  } = L, {
34
35
  questions: s,
35
36
  agents: v
@@ -42,58 +43,59 @@ const ee = (L) => {
42
43
  contentName: S,
43
44
  elementId: f,
44
45
  fileExtension: t,
45
- isFeedbackEnabled: E,
46
- isFeedbackFormEnabled: Q,
46
+ isFeedbackEnabled: p,
47
+ isFeedbackFormEnabled: E,
47
48
  isStopResponseEnabled: o,
48
49
  items: n,
49
- itemSize: p,
50
+ itemSize: Q,
50
51
  onFeedbackFormSubmit: I,
51
52
  onUserInteraction: b,
52
53
  onSelectedAgentCallback: N,
53
- recordAction: P,
54
+ recordAction: C,
54
55
  setCacheValue: i,
55
56
  shouldPreinitSession: r
56
- }), [e, S, f, t, E, Q, o, n, p, I, b, N, P, i, r]), w = s.length > 0;
57
+ }), [e, S, f, t, p, E, o, n, Q, I, b, N, C, i, r]), P = s.length > 0;
57
58
  F.useEffect(() => {
58
- l && l(w);
59
- }, [w, l]);
59
+ l && l(P);
60
+ }, [P, l]);
60
61
  let c = s;
61
62
  s.length > 0 && !s[s.length - 1].isCompleted && (c = c.slice(0, -1));
62
- const H = V.includes(t), R = X.includes(t);
63
+ const R = V.includes(t), y = X.includes(t);
63
64
  let d = "";
64
- T && R ? d = u(g.welcomeMessageIntelligentQueryNotice) : H && (d = u(g.welcomeMessageSpreadsheetNotice));
65
- const A = (a == null ? void 0 : a.suggestedQuestions) !== null, y = (q) => {
66
- i("suggestedQuestions", q);
67
- }, D = typeof h == "function" ? [] : _, O = ((C = e.suggestedQuestions) == null ? void 0 : C.length) > 0 && !A ? e.suggestedQuestions : D;
65
+ T && y ? d = u(g.welcomeMessageIntelligentQueryNotice) : R && (d = u(g.welcomeMessageSpreadsheetNotice));
66
+ const w = (a == null ? void 0 : a.suggestedQuestions) !== null, D = (z) => {
67
+ i("suggestedQuestions", z);
68
+ }, O = typeof h == "function" ? [] : k, q = ((A = e.suggestedQuestions) == null ? void 0 : A.length) > 0 && !w ? e.suggestedQuestions : O;
68
69
  return (
69
70
  // IntelligenceSidebarContent is using withApiWrapper that is not passing all provided props,
70
71
  // that's why we need to use provider to pass other props
71
- /* @__PURE__ */ m(z, {
72
+ /* @__PURE__ */ m(B, {
72
73
  value: e.agents,
73
- children: /* @__PURE__ */ m(B.Provider, {
74
+ children: /* @__PURE__ */ m(G.Provider, {
74
75
  value: x,
75
76
  children: /* @__PURE__ */ m(j, {
76
- cachedSuggestedQuestions: A ? [] : e.suggestedQuestions,
77
+ cachedSuggestedQuestions: w ? [] : e.suggestedQuestions,
77
78
  getSuggestedQuestions: h,
78
79
  isOpen: !0,
79
80
  isStopResponseEnabled: o,
80
81
  itemID: M,
81
82
  items: n,
82
- onSuggestedQuestionsFetched: y,
83
+ onSuggestedQuestionsFetched: D,
84
+ promptButtonClickHandler: H,
83
85
  restoredQuestions: c,
84
86
  restoredSession: e.encodedSession,
85
87
  restoredShouldShowLandingPage: e.shouldShowLandingPage,
86
88
  shouldPreinitSession: r,
87
- suggestedQuestions: O,
89
+ suggestedQuestions: q,
88
90
  warningNotice: d,
89
91
  warningNoticeAriaLabel: u(g.welcomeMessageSpreadsheetNoticeAriaLabel),
90
- ...k
92
+ ..._
91
93
  })
92
94
  })
93
95
  })
94
96
  );
95
97
  };
96
98
  export {
97
- ee as IntelligenceSidebar,
98
- ee as default
99
+ se as IntelligenceSidebar,
100
+ se as default
99
101
  };
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "সর্বাধিক {characterLimit} অক্ষরে পৌঁছেছে",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Box AI কোনও অনুমতি নেই",
51
51
  "boxAI.contentAnswers.noReferences": "সাধারণ ডকুমেন্ট বিশ্লেষণের ভিত্তিতে জবাব",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "রেফারেন্স {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "জবাব পাওয়া যায়নি",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "জবাব বাধাগ্রস্ত হয়েছে",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Det maksimale antal på {characterLimit} tegn nået",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Ingen tilladelser til Box AI",
51
51
  "boxAI.contentAnswers.noReferences": "Svar baseret på en generel analyse af dokumentet",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Reference {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Svar mislykkedes",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Svar afbrudt",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Das Maximum an {characterLimit} Zeichen ist erreicht",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Keine Box-AI-Berechtigungen",
51
51
  "boxAI.contentAnswers.noReferences": "Antwort basierend auf allgemeiner Dokumentanalyse",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Referenz {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Antwort fehlgeschlagen",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Antwort unterbrochen",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Maximum of {characterLimit} characters reached",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "No Box AI permissions",
51
51
  "boxAI.contentAnswers.noReferences": "Response based on general document analysis",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Reference {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Response Failed",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Response Interrupted",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Maximum of {characterLimit} characters reached",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "No Box AI permissions",
51
51
  "boxAI.contentAnswers.noReferences": "Response based on general document analysis",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Reference {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Response Failed",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Response Interrupted",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Maximum of {characterLimit} characters reached",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "No Box AI permissions",
51
51
  "boxAI.contentAnswers.noReferences": "Response based on general document analysis",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Reference {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Response Failed",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Response Interrupted",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Maximum of {characterLimit} characters reached",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "No Box AI permissions",
51
51
  "boxAI.contentAnswers.noReferences": "Response based on general document analysis",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Reference {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Response Failed",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Response Interrupted",
@@ -98,6 +98,10 @@ boxAI.contentAnswers.maxCharactersReachedError = Maximum of {characterLimit} cha
98
98
  boxAI.contentAnswers.noPermissionsLabel = No Box AI permissions
99
99
  # Loading message if there are no citations for an answer
100
100
  boxAI.contentAnswers.noReferences = Response based on general document analysis
101
+ # Aria button label to open the prompt library
102
+ boxAI.contentAnswers.openPromptLibraryBtn = Open Prompt Library
103
+ # Button name to open the prompt library
104
+ boxAI.contentAnswers.promptsBtn = Prompts
101
105
  # ARIA label designed for screen readers to enhance clarity during the reading of citations, minimizing confusion.
102
106
  boxAI.contentAnswers.referenceAriaLabel = Reference {number}
103
107
  # Error message to be displayed within an answer during streaming mode if there was another error, such as network errors.
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "⟦萬萬萬萬萬萬萬萬萬萬 Мâхĩmūm őƒ {characterLimit} ¢нàгǻčţёŕś ŕĕăçĥěď 國國國國國國國國國國⟧",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "⟦萬萬萬萬萬萬 Ŋő Бø× ǺĨ Ρėŕmīşśϊōπş 國國國國國國⟧",
51
51
  "boxAI.contentAnswers.noReferences": "⟦萬萬萬萬萬萬萬萬萬萬萬萬 ЯέŝΡóηşέ ьάѕёď ōп ğёήèŕάľ ďоĉűmёήť äńâĺýŝϊŝ 國國國國國國國國國國國國⟧",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "⟦萬萬萬萬 Ŕěƒεřěπčе {number} 國國國國⟧",
53
55
  "boxAI.contentAnswers.responseFailedError": "⟦萬萬萬萬 ŖêşΡοήѕé ₣ąįľέď 國國國國⟧",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "⟦萬萬萬萬萬 ЯéѕΡòлѕĕ ĪŋτèгŕüΡŧêď 國國國國國⟧",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Se ha alcanzado el máximo de {characterLimit} caracteres",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "No hay permisos para Box AI",
51
51
  "boxAI.contentAnswers.noReferences": "Respuesta basada en análisis general del documento",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Referencia {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Respuesta fallida",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Respuesta interrumpida",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Se ha alcanzado el máximo de {characterLimit} caracteres",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "No hay permisos para Box AI",
51
51
  "boxAI.contentAnswers.noReferences": "Respuesta basada en análisis general del documento",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Referencia {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Respuesta fallida",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Respuesta interrumpida",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Merkkien enimmäismäärä {characterLimit} saavutettu",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Ei Box AI -käyttöoikeustasoa",
51
51
  "boxAI.contentAnswers.noReferences": "Yleiseen asiakirja-analyysiin perustuva vastaus",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Viittaus {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Vastaus epäonnistui",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Vastaus keskeytyi",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Limite maximale de {characterLimit} caractères atteinte",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Aucune autorisation de Box AI",
51
51
  "boxAI.contentAnswers.noReferences": "Réponse basée sur l’analyse générale des documents",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Référence {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "La réponse a échoué",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Réponse interrompue",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Limite maximale de {characterLimit} caractères atteinte",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Aucune autorisation de Box AI",
51
51
  "boxAI.contentAnswers.noReferences": "Réponse basée sur l’analyse générale des documents",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Référence {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "La réponse a échoué",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Réponse interrompue",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "{characterLimit} अक्षरों की अधिकतम सीमा तक पहुँच गया",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "कोई Box अनुमतियाँ नहीं हैं",
51
51
  "boxAI.contentAnswers.noReferences": "साधारण दस्तावेज़ विश्लेषण पर आधारित प्रतिक्रिया",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "संदर्भ {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "प्रतिक्रिया विफल हो गई",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "प्रतिक्रिया बाधित हो गई",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Hai raggiunto il numero massimo di {characterLimit} caratteri",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Nessuna autorizzazione Box AI",
51
51
  "boxAI.contentAnswers.noReferences": "Risposta basata sull'analisi generale del documento",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Riferimento {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Impossibile rispondere",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Risposta interrotta",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "最大文字数の{characterLimit}文字に達しました",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Box AIの権限がありません",
51
51
  "boxAI.contentAnswers.noReferences": "一般的なドキュメント分析に基づく応答です",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "リファレンス{number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "応答に失敗しました",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "応答が中断されました",
@@ -1 +1 @@
1
- [{"id":"boxAI.contentAnswers.maxCharactersReachedError","description":"Error tooltip to show inside text area if the user reached the character limit","defaultMessage":"Maximum of {characterLimit} characters reached"},{"id":"boxAI.contentAnswers.askQuestionPlaceholder","description":"Content Answers modal input placeholder","defaultMessage":"Ask Box AI"},{"id":"boxAI.contentAnswers.askDisabledTooltip","description":"Content Answers submit input button disabled tooltip text when answer is generating","defaultMessage":"You can submit another question once Box AI has finished responding"},{"id":"boxAI.contentAnswers.ask","description":"Content Answers submit input button text","defaultMessage":"Ask"},{"id":"boxAI.contentAnswers.retryResponse","description":"Retry button label to send again the question to the service","defaultMessage":"Retry"},{"id":"boxAI.contentAnswers.stopResponse","description":"Button label to stop streaming an answer","defaultMessage":"Stop Response"}]
1
+ [{"id":"boxAI.contentAnswers.openPromptLibraryBtn","description":"Aria button label to open the prompt library","defaultMessage":"Open Prompt Library"},{"id":"boxAI.contentAnswers.promptsBtn","description":"Button name to open the prompt library","defaultMessage":"Prompts"},{"id":"boxAI.contentAnswers.maxCharactersReachedError","description":"Error tooltip to show inside text area if the user reached the character limit","defaultMessage":"Maximum of {characterLimit} characters reached"},{"id":"boxAI.contentAnswers.askQuestionPlaceholder","description":"Content Answers modal input placeholder","defaultMessage":"Ask Box AI"},{"id":"boxAI.contentAnswers.askDisabledTooltip","description":"Content Answers submit input button disabled tooltip text when answer is generating","defaultMessage":"You can submit another question once Box AI has finished responding"},{"id":"boxAI.contentAnswers.ask","description":"Content Answers submit input button text","defaultMessage":"Ask"},{"id":"boxAI.contentAnswers.retryResponse","description":"Retry button label to send again the question to the service","defaultMessage":"Retry"},{"id":"boxAI.contentAnswers.stopResponse","description":"Button label to stop streaming an answer","defaultMessage":"Stop Response"}]
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "최대 한도인 {characterLimit}자에 도달했습니다",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Box AI 권한 없음",
51
51
  "boxAI.contentAnswers.noReferences": "일반 문서 분석을 기반으로 한 응답",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "참조 {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "응답 실패",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "응답 중단됨",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Det maksimale antallet på {characterLimit} tegn er nådd",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Ingen tillatelser for Box AI",
51
51
  "boxAI.contentAnswers.noReferences": "Respons basert på generell dokumentanalyse",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Referanse {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Mislykket respons",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Avbrutt respons",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Maximum van {characterLimit} tekens bereikt",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Geen Box AI-machtigingen",
51
51
  "boxAI.contentAnswers.noReferences": "Antwoord gebaseerd op algemene documentanalyse",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Referentie {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Antwoord is mislukt",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Antwoord is onderbroken",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Osiągnięto maksymalną liczbę znaków: {characterLimit}",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Brak uprawnień Box AI",
51
51
  "boxAI.contentAnswers.noReferences": "Odpowiedź oparta na ogólnej analizie dokumentu",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Odniesienie {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Odpowiedź nieudana",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Odpowiedź przerwana",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Máximo de {characterLimit} caracteres alcançado",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Nenhuma permissão do Box AI",
51
51
  "boxAI.contentAnswers.noReferences": "Resposta com base na análise geral do documento",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Referência {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Falha na resposta",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Resposta interrompida",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Достигнуто макс. количество символов: {characterLimit}",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Права доступа Box AI отсутствуют",
51
51
  "boxAI.contentAnswers.noReferences": "Ответ на основе общего анализа документа",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Ссылка {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Ошибка ответа",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Прерывание ответа",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Gränsen på max {characterLimit} tecken har nåtts",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Ingen åtkomstnivå för Box AI",
51
51
  "boxAI.contentAnswers.noReferences": "Svar baserat på allmän dokumentanalys",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Referens {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Svar misslyckades",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Svar avbröts",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "Maksimum {characterLimit} karaktere ulaşıldı",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "Box AI izni yok",
51
51
  "boxAI.contentAnswers.noReferences": "Genel belge analizine dayalı yanıt",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "Referans {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "Yanıt Başarısız Oldu",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "Yanıt Kesildi",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "已达到 {characterLimit} 最大字符数限制",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "无 Box AI 权限",
51
51
  "boxAI.contentAnswers.noReferences": "基于一般文档分析的响应",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "参考 {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "响应失败",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "响应中断",
@@ -49,6 +49,8 @@ export default {
49
49
  "boxAI.contentAnswers.maxCharactersReachedError": "已達 {characterLimit} 字元上限",
50
50
  "boxAI.contentAnswers.noPermissionsLabel": "沒有 Box AI 權限",
51
51
  "boxAI.contentAnswers.noReferences": "基於一般文件解析的回應",
52
+ "boxAI.contentAnswers.openPromptLibraryBtn": "Open Prompt Library",
53
+ "boxAI.contentAnswers.promptsBtn": "Prompts",
52
54
  "boxAI.contentAnswers.referenceAriaLabel": "參考 {number}",
53
55
  "boxAI.contentAnswers.responseFailedError": "回應失敗",
54
56
  "boxAI.contentAnswers.responseInterruptedError": "回應已中斷",
@@ -19,6 +19,8 @@ export type BoxAiContentAnswersProps = Omit<ContentProps, 'isErrorMessageShown'
19
19
  onCitationClick?: ItemClickHandler;
20
20
  /** Callback function when user takes an action suggesting intent to use AI or actual interaction */
21
21
  onUserIntentToUseAI?: (userHasInteracted?: boolean) => void;
22
+ /** Callback function to handle prompt button clicks */
23
+ promptButtonClickHandler?: (clickHandler: (content: string) => void) => void;
22
24
  variant?: StyleVariant;
23
25
  };
24
26
  export declare const BoxAiContentAnswers: React.FC<BoxAiContentAnswersProps>;
@@ -98,6 +98,7 @@ export type ApiWrapperProps = {
98
98
  suggestedQuestions?: SuggestedQuestionType[];
99
99
  warningNotice?: string;
100
100
  warningNoticeAriaLabel?: string;
101
+ promptButtonClickHandler?: (clickHandler: (content: string) => void) => void;
101
102
  };
102
103
  export type UseContentAnswersProps = ApiWrapperProps & {
103
104
  contentAnswers: ContentAnswersRecordType;
@@ -1,4 +1,4 @@
1
- import { SuggestedQuestionType, QuestionType, RetryQuestion, StopQuestion, StyleVariant, SubmitQuestion } from '../../types';
1
+ import { QuestionType, RetryQuestion, StopQuestion, StyleVariant, SubmitQuestion, SuggestedQuestionType } from '../../types';
2
2
  export interface FooterProps {
3
3
  /** Selected suggested question */
4
4
  askSuggestedQuestion: SuggestedQuestionType | undefined;
@@ -30,6 +30,8 @@ export interface FooterProps {
30
30
  setAskSuggestedQuestion: ((value: SuggestedQuestionType | null) => void) | undefined;
31
31
  /** Callback function to toggle the CTRL+SHIFT+X feature */
32
32
  toggleDebugMode?: () => void;
33
+ /** Callback function to handle prompt button clicks */
34
+ promptButtonClickHandler?: (clickHandler: (content: string) => void) => void;
33
35
  variant?: StyleVariant;
34
36
  }
35
- export declare const Footer: ({ askSuggestedQuestion, enableDebugMode, hasRequestInProgress, isAIStudioAgentSelectorEnabled, isDebugModeShown, isStopResponseEnabled, isStreamingEnabled, lastQuestion, onRetryQuestion, onStopQuestion, onUserInteraction, recordAction, sendQuestion, setAskSuggestedQuestion, toggleDebugMode, variant, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
37
+ export declare const Footer: ({ askSuggestedQuestion, enableDebugMode, hasRequestInProgress, isAIStudioAgentSelectorEnabled, isDebugModeShown, isStopResponseEnabled, isStreamingEnabled, lastQuestion, onRetryQuestion, onStopQuestion, onUserInteraction, recordAction, sendQuestion, setAskSuggestedQuestion, toggleDebugMode, promptButtonClickHandler, variant, }: FooterProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,14 @@
1
1
  declare const messages: {
2
+ openPromptLibraryBtn: {
3
+ defaultMessage: string;
4
+ description: string;
5
+ id: string;
6
+ };
7
+ promptsBtn: {
8
+ defaultMessage: string;
9
+ description: string;
10
+ id: string;
11
+ };
2
12
  maxCharactersReachedError: {
3
13
  defaultMessage: string;
4
14
  description: string;
@@ -37,6 +37,7 @@ export interface IntelligenceSidebarProps {
37
37
  setCacheValue: IntelligenceSidebarCacheSetter;
38
38
  shouldPreinitSession?: boolean;
39
39
  setHasQuestions: (hasQuestions: boolean) => void;
40
+ promptButtonClickHandler?: (clickHandler: (content: string) => void) => void;
40
41
  }
41
42
  export declare const IntelligenceSidebar: (props: IntelligenceSidebarProps) => import("react/jsx-runtime").JSX.Element;
42
43
  export default IntelligenceSidebar;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/box-ai-content-answers",
3
- "version": "0.132.3",
3
+ "version": "0.133.0",
4
4
  "peerDependencies": {
5
5
  "@box/blueprint-web": "^7.8.0",
6
6
  "@box/blueprint-web-assets": "^4.35.0",
@@ -17,10 +17,10 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@box/babel-plugin-target-attributes": "1.3.0",
20
- "@box/blueprint-web": "^12.19.0",
20
+ "@box/blueprint-web": "^12.20.0",
21
21
  "@box/blueprint-web-assets": "^4.55.0",
22
- "@box/box-ai-agent-selector": "^0.44.5",
23
- "@box/item-icon": "^0.9.172",
22
+ "@box/box-ai-agent-selector": "^0.44.6",
23
+ "@box/item-icon": "^0.10.1",
24
24
  "@box/storybook-utils": "^0.13.8",
25
25
  "@testing-library/react": "^15.0.6",
26
26
  "react": "^18.3.0",