@box/box-ai-content-answers 0.89.0 → 0.89.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,93 +1,98 @@
1
1
  import _ from "clsx";
2
- import * as t from "react";
3
- import { AgentEditor as B } from "./components/agents/agent-editor.js";
4
- import { Content as R } from "./components/content/content.js";
5
- import { Footer as v } from "./components/footer/footer.js";
6
- import { jsx as o, jsxs as G } from "react/jsx-runtime";
7
- import '../../styles/box-ai-content-answers.css';const H = "_container_xgwyz_1", I = "_contentAnswers_xgwyz_8", J = "_sidebar_xgwyz_19", a = {
8
- container: H,
9
- contentAnswers: I,
10
- sidebar: J
11
- }, X = ({
12
- className: x,
13
- contentType: c,
14
- contentName: S,
2
+ import * as s from "react";
3
+ import { AgentEditor as G } from "./components/agents/agent-editor.js";
4
+ import { Content as H } from "./components/content/content.js";
5
+ import { Footer as I } from "./components/footer/footer.js";
6
+ import { jsx as n, jsxs as J } from "react/jsx-runtime";
7
+ import '../../styles/box-ai-content-answers.css';const K = "_container_xgwyz_1", O = "_contentAnswers_xgwyz_8", U = "_sidebar_xgwyz_19", d = {
8
+ container: K,
9
+ contentAnswers: O,
10
+ sidebar: U
11
+ }, $ = ({
12
+ className: p,
13
+ contentType: l,
14
+ contentName: x,
15
15
  error: e,
16
- hasCustomSuggestedQuestions: p,
17
- hasRequestInProgress: l,
18
- isAgentSelectorEnabled: A,
16
+ hasCustomSuggestedQuestions: S,
17
+ hasRequestInProgress: u,
18
+ isAgentSelectorEnabled: h,
19
19
  isAIStudioAgentSelectorEnabled: M,
20
20
  isDebugModeEnabled: Q,
21
- isStopResponseEnabled: h,
22
- isStreamingEnabled: n,
21
+ isStopResponseEnabled: y,
22
+ isStreamingEnabled: c,
23
23
  questions: r,
24
- recordAction: i,
25
- retryQuestion: y,
26
- showLoadingIndicator: d,
27
- stopQuestion: D,
28
- submitQuestion: z,
29
- suggestedQuestions: E,
30
- useAnimation: j,
31
- onAgentEditorToggle: k,
32
- variant: u = "modal",
33
- hostAppName: C,
34
- ...F
24
+ recordAction: a,
25
+ retryQuestion: D,
26
+ showLoadingIndicator: m,
27
+ stopQuestion: z,
28
+ submitQuestion: E,
29
+ suggestedQuestions: j,
30
+ useAnimation: k,
31
+ onAgentEditorToggle: C,
32
+ variant: o = "modal",
33
+ hostAppName: F,
34
+ ...N
35
35
  }) => {
36
- const [m, g] = t.useState(null), [w, f] = t.useState(e != null), [s, b] = t.useState(!1), N = !w && !d;
37
- return t.useEffect(() => {
38
- f(e != null);
39
- }, [e]), /* @__PURE__ */ o("div", {
40
- className: _(x, a.container),
41
- children: /* @__PURE__ */ G("div", {
42
- className: _(a.contentAnswers, u === "sidebar" && a.sidebar),
43
- children: [!s && /* @__PURE__ */ o(R, {
44
- ...F,
45
- askSuggestedQuestion: m,
46
- contentName: S,
47
- contentType: c,
36
+ const [g, A] = s.useState(null), [f, w] = s.useState(e != null), [t, b] = s.useState(!1), R = !f && !m, i = (B) => {
37
+ a && a({
38
+ ...B,
39
+ component: o
40
+ });
41
+ };
42
+ return s.useEffect(() => {
43
+ w(e != null);
44
+ }, [e]), /* @__PURE__ */ n("div", {
45
+ className: _(p, d.container),
46
+ children: /* @__PURE__ */ J("div", {
47
+ className: _(d.contentAnswers, o === "sidebar" && d.sidebar),
48
+ children: [!t && /* @__PURE__ */ n(H, {
49
+ ...N,
50
+ askSuggestedQuestion: g,
51
+ contentName: x,
52
+ contentType: l,
48
53
  error: e,
49
- hasCustomSuggestedQuestions: p,
50
- hasRequestInProgress: l,
51
- hostAppName: C,
52
- isErrorMessageShown: w,
53
- isStreamingEnabled: n,
54
+ hasCustomSuggestedQuestions: S,
55
+ hasRequestInProgress: u,
56
+ hostAppName: F,
57
+ isErrorMessageShown: f,
58
+ isStreamingEnabled: c,
54
59
  questions: r,
55
60
  recordAction: i,
56
- setAskSuggestedQuestion: g,
57
- setIsErrorMessageShown: f,
58
- showLoadingIndicator: d,
59
- suggestedQuestions: E,
60
- useAnimation: n && j,
61
- variant: u
62
- }), s && /* @__PURE__ */ o(B, {
63
- onAgentEditorToggle: k,
61
+ setAskSuggestedQuestion: A,
62
+ setIsErrorMessageShown: w,
63
+ showLoadingIndicator: m,
64
+ suggestedQuestions: j,
65
+ useAnimation: c && k,
66
+ variant: o
67
+ }), t && /* @__PURE__ */ n(G, {
68
+ onAgentEditorToggle: C,
64
69
  recordAction: i,
65
70
  setIsDebugModeShown: b
66
- }), N && /* @__PURE__ */ o(v, {
67
- askSuggestedQuestion: m,
68
- contentType: c,
71
+ }), R && /* @__PURE__ */ n(I, {
72
+ askSuggestedQuestion: g,
73
+ contentType: l,
69
74
  enableDebugMode: Q,
70
- hasRequestInProgress: l,
71
- isAgentSelectorEnabled: A,
75
+ hasRequestInProgress: u,
76
+ isAgentSelectorEnabled: h,
72
77
  isAIStudioAgentSelectorEnabled: M,
73
- isDebugModeShown: s,
74
- isStopResponseEnabled: h,
75
- isStreamingEnabled: n,
78
+ isDebugModeShown: t,
79
+ isStopResponseEnabled: y,
80
+ isStreamingEnabled: c,
76
81
  lastQuestion: r[r.length - 1],
77
- onRetryQuestion: y,
78
- onStopQuestion: D,
82
+ onRetryQuestion: D,
83
+ onStopQuestion: z,
79
84
  recordAction: i,
80
- sendQuestion: z,
81
- setAskSuggestedQuestion: g,
85
+ sendQuestion: E,
86
+ setAskSuggestedQuestion: A,
82
87
  toggleDebugMode: () => {
83
- b(!s);
88
+ b(!t);
84
89
  },
85
- variant: u
90
+ variant: o
86
91
  })]
87
92
  })
88
93
  });
89
94
  };
90
95
  export {
91
- X as BoxAiContentAnswers,
92
- X as default
96
+ $ as BoxAiContentAnswers,
97
+ $ as default
93
98
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/box-ai-content-answers",
3
- "version": "0.89.0",
3
+ "version": "0.89.2",
4
4
  "peerDependencies": {
5
5
  "@box/blueprint-web": "^7.8.0",
6
6
  "@box/blueprint-web-assets": "^4.16.0",
@@ -17,7 +17,7 @@
17
17
  "devDependencies": {
18
18
  "@box/blueprint-web": "^9.16.5",
19
19
  "@box/blueprint-web-assets": "^4.33.0",
20
- "@box/box-ai-agent-selector": "^0.24.1",
20
+ "@box/box-ai-agent-selector": "^0.24.2",
21
21
  "@box/item-icon": "^0.9.77",
22
22
  "@box/storybook-utils": "^0.8.2",
23
23
  "@testing-library/react": "^15.0.6",
@@ -56,5 +56,5 @@
56
56
  "**/*.css"
57
57
  ],
58
58
  "license": "SEE LICENSE IN LICENSE",
59
- "gitHead": "4596f287d347aa54f3bac2f45e0406e305fce13f"
59
+ "gitHead": "154e71e00c3b5e82fe37a6266102aae1a1e943a5"
60
60
  }