@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
|
|
3
|
-
import { AgentEditor as
|
|
4
|
-
import { Content as
|
|
5
|
-
import { Footer as
|
|
6
|
-
import { jsx as
|
|
7
|
-
import '../../styles/box-ai-content-answers.css';const
|
|
8
|
-
container:
|
|
9
|
-
contentAnswers:
|
|
10
|
-
sidebar:
|
|
11
|
-
},
|
|
12
|
-
className:
|
|
13
|
-
contentType:
|
|
14
|
-
contentName:
|
|
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:
|
|
17
|
-
hasRequestInProgress:
|
|
18
|
-
isAgentSelectorEnabled:
|
|
16
|
+
hasCustomSuggestedQuestions: S,
|
|
17
|
+
hasRequestInProgress: u,
|
|
18
|
+
isAgentSelectorEnabled: h,
|
|
19
19
|
isAIStudioAgentSelectorEnabled: M,
|
|
20
20
|
isDebugModeEnabled: Q,
|
|
21
|
-
isStopResponseEnabled:
|
|
22
|
-
isStreamingEnabled:
|
|
21
|
+
isStopResponseEnabled: y,
|
|
22
|
+
isStreamingEnabled: c,
|
|
23
23
|
questions: r,
|
|
24
|
-
recordAction:
|
|
25
|
-
retryQuestion:
|
|
26
|
-
showLoadingIndicator:
|
|
27
|
-
stopQuestion:
|
|
28
|
-
submitQuestion:
|
|
29
|
-
suggestedQuestions:
|
|
30
|
-
useAnimation:
|
|
31
|
-
onAgentEditorToggle:
|
|
32
|
-
variant:
|
|
33
|
-
hostAppName:
|
|
34
|
-
...
|
|
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 [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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:
|
|
50
|
-
hasRequestInProgress:
|
|
51
|
-
hostAppName:
|
|
52
|
-
isErrorMessageShown:
|
|
53
|
-
isStreamingEnabled:
|
|
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:
|
|
57
|
-
setIsErrorMessageShown:
|
|
58
|
-
showLoadingIndicator:
|
|
59
|
-
suggestedQuestions:
|
|
60
|
-
useAnimation:
|
|
61
|
-
variant:
|
|
62
|
-
}),
|
|
63
|
-
onAgentEditorToggle:
|
|
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
|
-
}),
|
|
67
|
-
askSuggestedQuestion:
|
|
68
|
-
contentType:
|
|
71
|
+
}), R && /* @__PURE__ */ n(I, {
|
|
72
|
+
askSuggestedQuestion: g,
|
|
73
|
+
contentType: l,
|
|
69
74
|
enableDebugMode: Q,
|
|
70
|
-
hasRequestInProgress:
|
|
71
|
-
isAgentSelectorEnabled:
|
|
75
|
+
hasRequestInProgress: u,
|
|
76
|
+
isAgentSelectorEnabled: h,
|
|
72
77
|
isAIStudioAgentSelectorEnabled: M,
|
|
73
|
-
isDebugModeShown:
|
|
74
|
-
isStopResponseEnabled:
|
|
75
|
-
isStreamingEnabled:
|
|
78
|
+
isDebugModeShown: t,
|
|
79
|
+
isStopResponseEnabled: y,
|
|
80
|
+
isStreamingEnabled: c,
|
|
76
81
|
lastQuestion: r[r.length - 1],
|
|
77
|
-
onRetryQuestion:
|
|
78
|
-
onStopQuestion:
|
|
82
|
+
onRetryQuestion: D,
|
|
83
|
+
onStopQuestion: z,
|
|
79
84
|
recordAction: i,
|
|
80
|
-
sendQuestion:
|
|
81
|
-
setAskSuggestedQuestion:
|
|
85
|
+
sendQuestion: E,
|
|
86
|
+
setAskSuggestedQuestion: A,
|
|
82
87
|
toggleDebugMode: () => {
|
|
83
|
-
b(!
|
|
88
|
+
b(!t);
|
|
84
89
|
},
|
|
85
|
-
variant:
|
|
90
|
+
variant: o
|
|
86
91
|
})]
|
|
87
92
|
})
|
|
88
93
|
});
|
|
89
94
|
};
|
|
90
95
|
export {
|
|
91
|
-
|
|
92
|
-
|
|
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.
|
|
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.
|
|
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": "
|
|
59
|
+
"gitHead": "154e71e00c3b5e82fe37a6266102aae1a1e943a5"
|
|
60
60
|
}
|