@box/box-ai-content-answers 0.80.9 → 0.81.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.
|
@@ -9,26 +9,26 @@ import { BoxAiContentAnswers as Y } from "../../box-ai-content-answers.js";
|
|
|
9
9
|
import { AgentsProvider as Z } from "../../contexts/AgentsContext.js";
|
|
10
10
|
import { A as y, R as ee } from "../../../../chunks/types.js";
|
|
11
11
|
import { AgentSelector as te } from "../agents/agent-selector.js";
|
|
12
|
-
import { LOGGER_BASE_CONFIG as
|
|
13
|
-
import { s as t, C as
|
|
14
|
-
import
|
|
12
|
+
import { LOGGER_BASE_CONFIG as b, LOGGER_ACTION_CLICK as oe } from "../common/constants.js";
|
|
13
|
+
import { s as t, C as se } from "../../../../chunks/clear-conversation-button.js";
|
|
14
|
+
import re from "./hooks/useStopPropagationOnEsc.js";
|
|
15
15
|
import f from "./messages.js";
|
|
16
16
|
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
17
|
-
const
|
|
18
|
-
children:
|
|
17
|
+
const ve = ({
|
|
18
|
+
children: L,
|
|
19
19
|
getAIStudioAgents: p,
|
|
20
|
-
hasCustomSuggestedQuestions:
|
|
20
|
+
hasCustomSuggestedQuestions: _,
|
|
21
21
|
hostAppName: m,
|
|
22
|
-
isAgentSelectorEnabled:
|
|
22
|
+
isAgentSelectorEnabled: u,
|
|
23
23
|
isAIStudioAgentSelectorEnabled: i,
|
|
24
24
|
isDebugModeEnabled: x,
|
|
25
25
|
isResetChatEnabled: k,
|
|
26
26
|
isStopResponseEnabled: w = !1,
|
|
27
|
-
itemSize:
|
|
27
|
+
itemSize: C,
|
|
28
28
|
extension: h,
|
|
29
29
|
onClearAction: A,
|
|
30
30
|
onSelectAgent: B,
|
|
31
|
-
recordAction:
|
|
31
|
+
recordAction: s,
|
|
32
32
|
shouldRenderProviders: S = !0,
|
|
33
33
|
stopPropagationOnEsc: G,
|
|
34
34
|
variant: N = "closable",
|
|
@@ -38,39 +38,39 @@ const Re = ({
|
|
|
38
38
|
const {
|
|
39
39
|
open: O,
|
|
40
40
|
defaultOpen: P,
|
|
41
|
-
onOpenChange:
|
|
42
|
-
modal:
|
|
43
|
-
...
|
|
41
|
+
onOpenChange: q,
|
|
42
|
+
modal: H,
|
|
43
|
+
...o
|
|
44
44
|
} = I, c = X(), z = U() <= W.Medium;
|
|
45
|
-
|
|
46
|
-
const d = (M = (E =
|
|
47
|
-
|
|
48
|
-
}, [m,
|
|
45
|
+
re(G, O);
|
|
46
|
+
const d = (M = (E = o == null ? void 0 : o.questions) == null ? void 0 : E[o.questions.length - 1]) == null ? void 0 : M.error, [F, R] = l.useState(!1), r = l.useCallback((a) => {
|
|
47
|
+
s && (a.data ?? (a.data = {}), a.data.hostAppName = m, s(a));
|
|
48
|
+
}, [m, s]);
|
|
49
49
|
l.useEffect(() => {
|
|
50
|
-
|
|
51
|
-
...
|
|
50
|
+
r({
|
|
51
|
+
...b,
|
|
52
52
|
target: "loaded",
|
|
53
53
|
data: {
|
|
54
|
-
fileSize:
|
|
54
|
+
fileSize: C,
|
|
55
55
|
fileType: h
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
-
}, [
|
|
59
|
-
d && d === y.AGENT_NOT_FOUND &&
|
|
58
|
+
}, [r, h, C, s]), l.useEffect(() => {
|
|
59
|
+
d && d === y.AGENT_NOT_FOUND && R(!0);
|
|
60
60
|
}, [d]);
|
|
61
61
|
const j = () => {
|
|
62
|
-
A && (A(),
|
|
63
|
-
...
|
|
62
|
+
A && (A(), r({
|
|
63
|
+
...b,
|
|
64
64
|
action: oe,
|
|
65
65
|
target: "clearChat"
|
|
66
66
|
}));
|
|
67
|
-
}, Q = l.useCallback(async () => (
|
|
67
|
+
}, Q = l.useCallback(async () => (R(!1), p()), [p]), v = /* @__PURE__ */ g(n, {
|
|
68
68
|
defaultOpen: P,
|
|
69
|
-
modal:
|
|
70
|
-
onOpenChange:
|
|
69
|
+
modal: H,
|
|
70
|
+
onOpenChange: q,
|
|
71
71
|
open: O,
|
|
72
72
|
children: [/* @__PURE__ */ e(n.Trigger, {
|
|
73
|
-
children:
|
|
73
|
+
children: L
|
|
74
74
|
}), /* @__PURE__ */ g(n.Content, {
|
|
75
75
|
className: t.contentAnswersModal,
|
|
76
76
|
"data-testid": "content-answers-modal",
|
|
@@ -88,20 +88,21 @@ const Re = ({
|
|
|
88
88
|
as: "span",
|
|
89
89
|
variant: "titleMedium",
|
|
90
90
|
children: c.formatMessage(f.contentAnswersTitle)
|
|
91
|
-
}), !i &&
|
|
91
|
+
}), !i && u && /* @__PURE__ */ e(te, {
|
|
92
92
|
onSelectAgent: B,
|
|
93
|
-
recordAction:
|
|
93
|
+
recordAction: r
|
|
94
94
|
}), i && /* @__PURE__ */ e(J, {
|
|
95
95
|
contentClassName: t.agentSelectorContent,
|
|
96
|
+
disabled: o.hasRequestInProgress,
|
|
96
97
|
fetcher: Q,
|
|
97
98
|
hostAppName: m,
|
|
98
|
-
recordAction:
|
|
99
|
+
recordAction: s,
|
|
99
100
|
requestState: F ? ee.ERROR : void 0,
|
|
100
101
|
shouldHideAgentSelectorOnLoad: !0,
|
|
101
102
|
triggerChipClassName: t.agentSelectorTrigger
|
|
102
103
|
})]
|
|
103
104
|
})
|
|
104
|
-
}), k && /* @__PURE__ */ e(
|
|
105
|
+
}), k && /* @__PURE__ */ e(se, {
|
|
105
106
|
onClick: j
|
|
106
107
|
}), /* @__PURE__ */ e(n.Close, {
|
|
107
108
|
"aria-label": N === "collapsible" ? c.formatMessage(f.collapseModalAriaLabel) : c.formatMessage(f.closeModalAriaLabel),
|
|
@@ -110,23 +111,23 @@ const Re = ({
|
|
|
110
111
|
size: "small"
|
|
111
112
|
}), /* @__PURE__ */ e(Y, {
|
|
112
113
|
className: t.boxAiContentAnswers,
|
|
113
|
-
hasCustomSuggestedQuestions:
|
|
114
|
-
isAgentSelectorEnabled: !i &&
|
|
114
|
+
hasCustomSuggestedQuestions: _,
|
|
115
|
+
isAgentSelectorEnabled: !i && u,
|
|
115
116
|
isAIStudioAgentSelectorEnabled: i,
|
|
116
117
|
isDebugModeEnabled: x,
|
|
117
118
|
isStopResponseEnabled: w,
|
|
118
|
-
recordAction:
|
|
119
|
-
...
|
|
119
|
+
recordAction: r,
|
|
120
|
+
...o
|
|
120
121
|
})]
|
|
121
122
|
})]
|
|
122
123
|
});
|
|
123
124
|
return S ? /* @__PURE__ */ e(V, {
|
|
124
125
|
children: /* @__PURE__ */ e(Z, {
|
|
125
|
-
children:
|
|
126
|
+
children: v
|
|
126
127
|
})
|
|
127
|
-
}) :
|
|
128
|
+
}) : v;
|
|
128
129
|
};
|
|
129
130
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
ve as IntelligenceModal,
|
|
132
|
+
ve as default
|
|
132
133
|
};
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/box-ai-content-answers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.81.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@box/blueprint-web": "^7.8.0",
|
|
6
6
|
"@box/blueprint-web-assets": "^4.16.0",
|
|
7
|
-
"@box/box-ai-agent-selector": "^0.
|
|
7
|
+
"@box/box-ai-agent-selector": "^0.20.0",
|
|
8
8
|
"@box/item-icon": "^0.9.44",
|
|
9
9
|
"highlight.js": "^11.9.0",
|
|
10
10
|
"immutable": "^4.0.0",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"**/*.css"
|
|
57
57
|
],
|
|
58
58
|
"license": "SEE LICENSE IN LICENSE",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "51e1c20f42df2619c51a5643f8bac80baa6c6081"
|
|
60
60
|
}
|