@box/box-ai-content-answers 1.19.4 → 1.20.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.
- package/dist/chunks/clear-conversation-button.js +15 -16
- package/dist/chunks/stopResponseButton.js +19 -23
- package/dist/chunks/types.js +8 -8
- package/dist/chunks/warning-message.js +15 -16
- package/dist/esm/lib/components/answer/answer-content.js +15 -15
- package/dist/esm/lib/components/answer/answer.js +107 -109
- package/dist/esm/lib/components/answer/citation.js +23 -24
- package/dist/esm/lib/components/answer/copy-button.js +3 -3
- package/dist/esm/lib/components/answer/embed-the-answer-button.js +44 -44
- package/dist/esm/lib/components/answer/feedback-tooltip.js +63 -56
- package/dist/esm/lib/components/answer/inline-error.js +1 -1
- package/dist/esm/lib/components/answer/loading-indicator.js +15 -18
- package/dist/esm/lib/components/answer/references.js +30 -30
- package/dist/esm/lib/components/answer/thumb-buttons.js +95 -96
- package/dist/esm/lib/components/api-wrapper/hooks/useContentAnswers.js +166 -167
- package/dist/esm/lib/components/api-wrapper/reducer.js +1 -1
- package/dist/esm/lib/components/api-wrapper/utils/request.js +8 -8
- package/dist/esm/lib/components/api-wrapper/utils/stream.js +24 -25
- package/dist/esm/lib/components/chat/chat.js +78 -79
- package/dist/esm/lib/components/common/focusInputUtils.js +3 -4
- package/dist/esm/lib/components/common/markdown-react.js +91 -93
- package/dist/esm/lib/components/common/markdown.js +2666 -2696
- package/dist/esm/lib/components/content/content.js +38 -39
- package/dist/esm/lib/components/footer/footer-actions.js +3 -3
- package/dist/esm/lib/components/footer/footer.js +97 -98
- package/dist/esm/lib/components/modal/modal.js +121 -122
- package/dist/esm/lib/components/sidebar/content.js +95 -101
- package/dist/esm/lib/components/sidebar/sidebar.js +82 -83
- package/dist/esm/lib/components/suggested-questions/suggested-questions.js +1 -1
- package/dist/esm/lib/components/suggested-questions/suggestions.js +30 -30
- package/dist/esm/lib/components/welcome-message/contextual-items-message.js +36 -38
- package/dist/esm/lib/components/welcome-message/items-dropdown.js +27 -27
- package/dist/esm/lib/hooks/usePromptFocus.js +13 -14
- package/dist/i18n/en-x-pseudo.js +89 -89
- package/dist/i18n/en-x-pseudo.properties +89 -89
- package/dist/styles/answer-content.css +1 -1
- package/dist/styles/answer.css +1 -1
- package/dist/styles/box-ai-content-answers.css +1 -1
- package/dist/styles/chat.css +1 -1
- package/dist/styles/clear-conversation-button.css +1 -1
- package/dist/styles/content.css +1 -1
- package/dist/styles/content2.css +1 -1
- package/dist/styles/markdown2.css +1 -1
- package/dist/styles/question.css +1 -1
- package/dist/styles/stopResponseButton.css +1 -1
- package/dist/styles/warning-message.css +1 -1
- package/dist/types/lib/components/api-wrapper/hooks/useContentAnswers.d.ts +1 -1
- package/package.json +11 -11
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { LoadingIndicator as M } from "@box/blueprint-web";
|
|
2
2
|
import S from "clsx";
|
|
3
|
-
import * as
|
|
3
|
+
import * as e from "react";
|
|
4
4
|
import { useIntl as j } from "react-intl";
|
|
5
5
|
import k from "../../messages.js";
|
|
6
6
|
import { C as y } from "../../../../chunks/types.js";
|
|
7
|
-
import { jsx as
|
|
7
|
+
import { jsx as n, 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 = "
|
|
10
|
+
import '../../../../styles/content2.css';const D = "_loadingIndicatorWrapper_18o12_2", G = "_content_18o12_6", J = "_sidebar_18o12_13", K = "_isLoading_18o12_20", Q = "_messagesEnd_18o12_24", U = "_innerContent_18o12_28", r = {
|
|
11
11
|
loadingIndicatorWrapper: D,
|
|
12
12
|
content: G,
|
|
13
13
|
sidebar: J,
|
|
@@ -17,7 +17,7 @@ import '../../../../styles/content2.css';const D = "_loadingIndicatorWrapper_1p6
|
|
|
17
17
|
}, ne = ({
|
|
18
18
|
error: u,
|
|
19
19
|
hasCustomSuggestedQuestions: C,
|
|
20
|
-
hasRequestInProgress:
|
|
20
|
+
hasRequestInProgress: c = !1,
|
|
21
21
|
isErrorMessageShown: h = !1,
|
|
22
22
|
isStreamingEnabled: i = !1,
|
|
23
23
|
questions: R,
|
|
@@ -31,58 +31,57 @@ import '../../../../styles/content2.css';const D = "_loadingIndicatorWrapper_1p6
|
|
|
31
31
|
hostAppName: N = "",
|
|
32
32
|
...O
|
|
33
33
|
}) => {
|
|
34
|
-
const f =
|
|
34
|
+
const f = e.useRef(null), l = e.useRef(null), d = e.useRef(null), t = e.useRef(!0), [g, w] = e.useState(!1), {
|
|
35
35
|
formatMessage: x
|
|
36
|
-
} = j(), E = u === y.LARGE_FILE,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
behavior: c,
|
|
36
|
+
} = j(), E = u === y.LARGE_FILE, o = e.useCallback((s) => {
|
|
37
|
+
d.current?.scrollIntoView && l.current && (!i || t.current) && d.current.scrollIntoView({
|
|
38
|
+
behavior: s,
|
|
40
39
|
block: "nearest"
|
|
41
40
|
});
|
|
42
41
|
}, [i]), z = () => {
|
|
43
42
|
if (l.current) {
|
|
44
43
|
const {
|
|
45
|
-
scrollTop:
|
|
46
|
-
clientHeight:
|
|
44
|
+
scrollTop: s,
|
|
45
|
+
clientHeight: a,
|
|
47
46
|
scrollHeight: W
|
|
48
|
-
} = l.current, F = W - (
|
|
49
|
-
if (
|
|
50
|
-
|
|
47
|
+
} = l.current, F = W - (s + a);
|
|
48
|
+
if (c && F > 100) {
|
|
49
|
+
t.current = !1;
|
|
51
50
|
return;
|
|
52
51
|
}
|
|
53
|
-
|
|
52
|
+
t.current = !0;
|
|
54
53
|
}
|
|
55
54
|
};
|
|
56
|
-
|
|
57
|
-
g ?
|
|
58
|
-
}, [g,
|
|
59
|
-
|
|
60
|
-
}, [
|
|
55
|
+
e.useEffect(() => {
|
|
56
|
+
g ? t.current = !1 : c && (t.current = !0, o("instant"));
|
|
57
|
+
}, [g, o, c]), e.useEffect(() => {
|
|
58
|
+
t.current = !0, o("instant");
|
|
59
|
+
}, [o]), e.useLayoutEffect(() => {
|
|
61
60
|
if (!f.current)
|
|
62
61
|
return;
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
}),
|
|
66
|
-
return
|
|
67
|
-
|
|
62
|
+
const s = new ResizeObserver(() => {
|
|
63
|
+
t.current && o(i ? "instant" : "smooth");
|
|
64
|
+
}), a = f.current;
|
|
65
|
+
return a && s.observe(a), () => {
|
|
66
|
+
a && s.unobserve(a);
|
|
68
67
|
};
|
|
69
|
-
}, [
|
|
70
|
-
const T = () => h && !E ? /* @__PURE__ */
|
|
68
|
+
}, [o, i]);
|
|
69
|
+
const T = () => h && !E ? /* @__PURE__ */ n(A, {
|
|
71
70
|
error: u,
|
|
72
71
|
recordAction: m
|
|
73
|
-
}) : p ? /* @__PURE__ */
|
|
74
|
-
className:
|
|
75
|
-
children: /* @__PURE__ */
|
|
72
|
+
}) : p ? /* @__PURE__ */ n("div", {
|
|
73
|
+
className: r.loadingIndicatorWrapper,
|
|
74
|
+
children: /* @__PURE__ */ n(M, {
|
|
76
75
|
"aria-label": x(k.loading),
|
|
77
|
-
className:
|
|
76
|
+
className: r.loadingIndicator,
|
|
78
77
|
"data-testid": "content-answers-modal-loading-indicator",
|
|
79
78
|
size: "large"
|
|
80
79
|
})
|
|
81
80
|
}) : /* @__PURE__ */ H(V, {
|
|
82
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ n(B, {
|
|
83
82
|
askSuggestedQuestion: v,
|
|
84
83
|
hasCustomSuggestedQuestions: C,
|
|
85
|
-
hasRequestInProgress:
|
|
84
|
+
hasRequestInProgress: c,
|
|
86
85
|
hostAppName: N,
|
|
87
86
|
isFileSizeError: E,
|
|
88
87
|
onDropdownOpenChange: w,
|
|
@@ -93,19 +92,19 @@ import '../../../../styles/content2.css';const D = "_loadingIndicatorWrapper_1p6
|
|
|
93
92
|
useAnimation: L,
|
|
94
93
|
variant: _,
|
|
95
94
|
...O
|
|
96
|
-
}), /* @__PURE__ */
|
|
95
|
+
}), /* @__PURE__ */ n("div", {
|
|
97
96
|
ref: d,
|
|
98
|
-
className:
|
|
97
|
+
className: r.messagesEnd
|
|
99
98
|
})]
|
|
100
99
|
});
|
|
101
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ n("div", {
|
|
102
101
|
ref: l,
|
|
103
|
-
className: S(
|
|
102
|
+
className: S(r.content, _ === "sidebar" && r.sidebar, p && r.isLoading),
|
|
104
103
|
"data-testid": "content-answers-content",
|
|
105
104
|
onScroll: z,
|
|
106
|
-
children: /* @__PURE__ */
|
|
105
|
+
children: /* @__PURE__ */ n("div", {
|
|
107
106
|
ref: f,
|
|
108
|
-
className:
|
|
107
|
+
className: r.innerContent,
|
|
109
108
|
children: T()
|
|
110
109
|
})
|
|
111
110
|
});
|
|
@@ -3,7 +3,7 @@ import { useRef as E, useCallback as R, useEffect as _ } from "react";
|
|
|
3
3
|
import { useIntl as A } from "react-intl";
|
|
4
4
|
import d from "lodash/noop";
|
|
5
5
|
import { A as i } from "../../../../chunks/types.js";
|
|
6
|
-
import {
|
|
6
|
+
import { LOGGER_ACTION_CLICK as B, LOGGER_BASE_CONFIG as S } from "../common/constants.js";
|
|
7
7
|
import N from "./messages.js";
|
|
8
8
|
import { jsx as a } from "react/jsx-runtime";
|
|
9
9
|
import '../../../../styles/footer-actions.css';const O = "_footerActions_1l4g8_1", g = "_footerActionButton_1l4g8_11", f = {
|
|
@@ -21,8 +21,8 @@ import '../../../../styles/footer-actions.css';const O = "_footerActions_1l4g8_1
|
|
|
21
21
|
formatMessage: l
|
|
22
22
|
} = A(), u = R(() => {
|
|
23
23
|
e && e({
|
|
24
|
-
...
|
|
25
|
-
action:
|
|
24
|
+
...S,
|
|
25
|
+
action: B,
|
|
26
26
|
target: "retryResponse"
|
|
27
27
|
}), r(o);
|
|
28
28
|
}, [o, r, e]);
|
|
@@ -2,165 +2,164 @@ import tt from "clsx";
|
|
|
2
2
|
import at from "lodash/noop";
|
|
3
3
|
import * as r from "react";
|
|
4
4
|
import { useIntl as rt } from "react-intl";
|
|
5
|
-
import { useBreakpoint as
|
|
5
|
+
import { useBreakpoint as et, Breakpoint as nt, TextArea as it, Tooltip as ot, Button as st, FilterChip as _ } from "@box/blueprint-web";
|
|
6
6
|
import { ArrowUp as lt } from "@box/blueprint-web-assets/icons/Fill";
|
|
7
7
|
import { BubbleStar as ct } from "@box/blueprint-web-assets/icons/Medium";
|
|
8
8
|
import { useAgents as mt } from "@box/box-ai-agent-selector";
|
|
9
|
-
import { getAIAgentConfig as
|
|
10
|
-
import { isDebugModeTrigger as ft, isEnterTrigger as
|
|
11
|
-
import { TEXT_AREA as
|
|
9
|
+
import { getAIAgentConfig as I } from "../common/agentUtils.js";
|
|
10
|
+
import { isDebugModeTrigger as ft, isEnterTrigger as ut } from "../common/keyInputUtils.js";
|
|
11
|
+
import { TEXT_AREA as s, INPUT_TARGET_ID as pt } from "./constants.js";
|
|
12
12
|
import { FooterActions as dt } from "./footer-actions.js";
|
|
13
13
|
import { s as f, S as bt } from "../../../../chunks/stopResponseButton.js";
|
|
14
14
|
import { U as ht } from "../../../../chunks/types.js";
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import { jsxs as
|
|
18
|
-
const
|
|
19
|
-
askSuggestedQuestion:
|
|
15
|
+
import l from "./messages.js";
|
|
16
|
+
import { LOGGER_ACTION_CLICK as Ct, LOGGER_BASE_CONFIG as H, LOGGER_ACTION_KEYPRESS as Et } from "../common/constants.js";
|
|
17
|
+
import { jsxs as k, jsx as c } from "react/jsx-runtime";
|
|
18
|
+
const It = ({
|
|
19
|
+
askSuggestedQuestion: L,
|
|
20
20
|
enableDebugMode: x = !1,
|
|
21
21
|
hasRequestInProgress: e,
|
|
22
|
-
isAIStudioAgentSelectorEnabled:
|
|
22
|
+
isAIStudioAgentSelectorEnabled: C,
|
|
23
23
|
isDebugModeShown: y,
|
|
24
|
-
isStopResponseEnabled:
|
|
25
|
-
isStreamingEnabled:
|
|
26
|
-
lastQuestion:
|
|
24
|
+
isStopResponseEnabled: g,
|
|
25
|
+
isStreamingEnabled: F,
|
|
26
|
+
lastQuestion: E,
|
|
27
27
|
onRetryQuestion: A,
|
|
28
|
-
onStopQuestion:
|
|
29
|
-
onUserInteraction:
|
|
30
|
-
promptValue:
|
|
31
|
-
recordAction:
|
|
28
|
+
onStopQuestion: K,
|
|
29
|
+
onUserInteraction: M = at,
|
|
30
|
+
promptValue: u,
|
|
31
|
+
recordAction: n,
|
|
32
32
|
sendQuestion: O,
|
|
33
33
|
setAskSuggestedQuestion: R,
|
|
34
|
-
setPromptValue:
|
|
35
|
-
toggleDebugMode:
|
|
36
|
-
promptButtonClickHandler:
|
|
37
|
-
variant:
|
|
34
|
+
setPromptValue: i,
|
|
35
|
+
toggleDebugMode: p,
|
|
36
|
+
promptButtonClickHandler: S,
|
|
37
|
+
variant: U = "modal"
|
|
38
38
|
}) => {
|
|
39
|
-
const
|
|
40
|
-
selectedAgent:
|
|
39
|
+
const X = U === "sidebar", o = rt(), W = et(), a = r.useRef(null), j = W <= nt.Medium && !X ? s.MAX_ROWS_MOBILE : s.MAX_ROWS, [d, v] = r.useState(!0), [D, B] = r.useState(!1), {
|
|
40
|
+
selectedAgent: T
|
|
41
41
|
} = mt(), {
|
|
42
|
-
answer:
|
|
43
|
-
isCompleted:
|
|
44
|
-
} =
|
|
42
|
+
answer: Y,
|
|
43
|
+
isCompleted: J
|
|
44
|
+
} = E ?? {}, P = F && J === !1 && (g || Y), b = r.useCallback(() => {
|
|
45
45
|
a.current && a.current.focus();
|
|
46
46
|
}, [a]), N = r.useCallback(() => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const n = {
|
|
47
|
+
M();
|
|
48
|
+
let t = a.current?.value ?? "";
|
|
49
|
+
a.current && t.length > s.MAX_LENGTH && (a.current.value = t.slice(0, s.MAX_LENGTH), t = a.current.value), i && i(t), B(t.length >= s.MAX_LENGTH), v(t.trim().length === 0);
|
|
50
|
+
}, [M, i]), h = r.useCallback((t = ht) => {
|
|
51
|
+
if (b(), !e && a.current) {
|
|
52
|
+
const m = {
|
|
54
53
|
prompt: a.current.value,
|
|
55
54
|
promptType: t
|
|
56
55
|
};
|
|
57
|
-
if (
|
|
58
|
-
const V =
|
|
59
|
-
O(
|
|
56
|
+
if (m.prompt && m.prompt.trim()) {
|
|
57
|
+
const V = I(C, T);
|
|
58
|
+
O(m, V), a.current.value = "", i && i(""), v(!0), B(!1);
|
|
60
59
|
}
|
|
61
|
-
y &&
|
|
60
|
+
y && p && p();
|
|
62
61
|
}
|
|
63
|
-
}, [
|
|
64
|
-
t.preventDefault(), !e && !
|
|
65
|
-
...
|
|
62
|
+
}, [T, b, e, C, y, O, i, p]), Z = r.useCallback((t) => {
|
|
63
|
+
t.preventDefault(), !e && !d && n && n({
|
|
64
|
+
...H,
|
|
66
65
|
action: Ct,
|
|
67
66
|
target: "ask"
|
|
68
|
-
}),
|
|
69
|
-
}, [e,
|
|
70
|
-
x &&
|
|
71
|
-
...
|
|
67
|
+
}), h();
|
|
68
|
+
}, [e, d, n, h]), $ = r.useCallback((t) => {
|
|
69
|
+
x && p && ft(t) && p(), ut(t) && (t.preventDefault(), !e && !d && n && n({
|
|
70
|
+
...H,
|
|
72
71
|
action: Et,
|
|
73
72
|
target: "ask"
|
|
74
|
-
}),
|
|
75
|
-
}, [x, e,
|
|
76
|
-
const
|
|
77
|
-
A(t,
|
|
78
|
-
}, [
|
|
73
|
+
}), h());
|
|
74
|
+
}, [x, e, d, n, h, p]), z = r.useCallback((t) => {
|
|
75
|
+
const m = I(C, T);
|
|
76
|
+
A(t, m);
|
|
77
|
+
}, [T, C, A]);
|
|
79
78
|
r.useEffect(() => {
|
|
80
|
-
queueMicrotask(
|
|
79
|
+
queueMicrotask(b);
|
|
81
80
|
}, []), r.useEffect(() => {
|
|
82
|
-
a.current &&
|
|
83
|
-
}, [
|
|
84
|
-
if (
|
|
81
|
+
a.current && u !== void 0 && a.current.value !== u && (a.current.value = u, v(u.trim().length === 0), B(u.length >= s.MAX_LENGTH));
|
|
82
|
+
}, [u]), r.useEffect(() => {
|
|
83
|
+
if (L && a.current && !e && R) {
|
|
85
84
|
const {
|
|
86
85
|
prompt: t,
|
|
87
|
-
type:
|
|
88
|
-
} =
|
|
89
|
-
a.current.value = t,
|
|
86
|
+
type: m
|
|
87
|
+
} = L;
|
|
88
|
+
a.current.value = t, i && i(t), h(m), R(null);
|
|
90
89
|
}
|
|
91
|
-
}, [
|
|
92
|
-
const
|
|
93
|
-
a.current && (a.current.value = t, N(),
|
|
94
|
-
}, [N,
|
|
90
|
+
}, [L?.id]);
|
|
91
|
+
const q = r.useCallback((t) => {
|
|
92
|
+
a.current && (a.current.value = t, N(), b());
|
|
93
|
+
}, [N, b]), G = !!S, Q = () => /* @__PURE__ */ c(_.Group, {
|
|
95
94
|
name: "prompt-library",
|
|
96
95
|
type: "single",
|
|
97
|
-
children: /* @__PURE__ */
|
|
98
|
-
"aria-label":
|
|
96
|
+
children: /* @__PURE__ */ k(_.ChipButton, {
|
|
97
|
+
"aria-label": o.formatMessage(l.openPromptLibraryBtn),
|
|
99
98
|
className: f.promptButton,
|
|
100
99
|
"data-target-id": "open-prompt-library-button",
|
|
101
100
|
"data-testid": "open-prompt-library-button",
|
|
102
101
|
onClick: () => {
|
|
103
|
-
|
|
102
|
+
S(q);
|
|
104
103
|
},
|
|
105
104
|
value: "add-prompt",
|
|
106
|
-
children: [/* @__PURE__ */
|
|
105
|
+
children: [/* @__PURE__ */ c(_.Icon, {
|
|
107
106
|
icon: ct
|
|
108
|
-
}), /* @__PURE__ */
|
|
109
|
-
children:
|
|
107
|
+
}), /* @__PURE__ */ c(_.Label, {
|
|
108
|
+
children: o.formatMessage(l.promptsBtn)
|
|
110
109
|
})]
|
|
111
110
|
})
|
|
112
|
-
}),
|
|
113
|
-
lastQuestion:
|
|
114
|
-
onStopQuestion:
|
|
115
|
-
recordAction:
|
|
111
|
+
}), w = (t) => P ? /* @__PURE__ */ c(bt, {
|
|
112
|
+
lastQuestion: E,
|
|
113
|
+
onStopQuestion: K,
|
|
114
|
+
recordAction: n,
|
|
116
115
|
size: t
|
|
117
|
-
}) : /* @__PURE__ */
|
|
118
|
-
content:
|
|
116
|
+
}) : /* @__PURE__ */ c(ot, {
|
|
117
|
+
content: o.formatMessage(l.ask),
|
|
119
118
|
"data-testid": "ask-tooltip",
|
|
120
119
|
variant: "standard",
|
|
121
|
-
children: /* @__PURE__ */
|
|
122
|
-
"aria-label":
|
|
120
|
+
children: /* @__PURE__ */ c(st, {
|
|
121
|
+
"aria-label": o.formatMessage(l.ask),
|
|
123
122
|
className: f.inputAreaButton,
|
|
124
123
|
"data-testid": "content-answers-submit-button",
|
|
125
|
-
disabled:
|
|
124
|
+
disabled: d || e,
|
|
126
125
|
icon: lt,
|
|
127
126
|
loading: !1,
|
|
128
|
-
loadingAriaLabel:
|
|
129
|
-
onClick:
|
|
127
|
+
loadingAriaLabel: o.formatMessage(l.askDisabledTooltip),
|
|
128
|
+
onClick: Z,
|
|
130
129
|
size: t,
|
|
131
130
|
"data-target-id": "Button-ask"
|
|
132
131
|
})
|
|
133
132
|
});
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
-
children: [
|
|
136
|
-
lastQuestion:
|
|
137
|
-
onRetryButtonInteraction:
|
|
138
|
-
onRetryQuestion:
|
|
139
|
-
recordAction:
|
|
140
|
-
}), /* @__PURE__ */
|
|
141
|
-
className: tt(f.questionInput,
|
|
142
|
-
children: [/* @__PURE__ */
|
|
133
|
+
return /* @__PURE__ */ k("div", {
|
|
134
|
+
children: [E && /* @__PURE__ */ c(dt, {
|
|
135
|
+
lastQuestion: E,
|
|
136
|
+
onRetryButtonInteraction: M,
|
|
137
|
+
onRetryQuestion: z,
|
|
138
|
+
recordAction: n
|
|
139
|
+
}), /* @__PURE__ */ k("div", {
|
|
140
|
+
className: tt(f.questionInput, X && f.sidebar, !G && f.questionInputWithOutPromptLibrary),
|
|
141
|
+
children: [/* @__PURE__ */ c(it, {
|
|
143
142
|
ref: a,
|
|
144
143
|
className: f.textArea,
|
|
145
|
-
"data-target-id":
|
|
144
|
+
"data-target-id": pt,
|
|
146
145
|
"data-testid": "content-answers-question-input",
|
|
147
|
-
error:
|
|
148
|
-
characterLimit:
|
|
146
|
+
error: D && o.formatMessage(l.maxCharactersReachedError, {
|
|
147
|
+
characterLimit: s.MAX_LENGTH
|
|
149
148
|
}),
|
|
150
149
|
hideLabel: !0,
|
|
151
|
-
label:
|
|
152
|
-
maxLength:
|
|
153
|
-
maxRows:
|
|
150
|
+
label: o.formatMessage(l.askQuestionPlaceholder),
|
|
151
|
+
maxLength: s.MAX_LENGTH,
|
|
152
|
+
maxRows: j,
|
|
154
153
|
onChange: N,
|
|
155
|
-
onKeyDown:
|
|
156
|
-
placeholder:
|
|
157
|
-
}), G && /* @__PURE__ */
|
|
154
|
+
onKeyDown: $,
|
|
155
|
+
placeholder: o.formatMessage(l.askQuestionPlaceholder)
|
|
156
|
+
}), G && /* @__PURE__ */ k("div", {
|
|
158
157
|
className: f.actionContainer,
|
|
159
|
-
children: [Q(),
|
|
160
|
-
}), !G &&
|
|
158
|
+
children: [Q(), w("small")]
|
|
159
|
+
}), !G && w("large")]
|
|
161
160
|
})]
|
|
162
161
|
});
|
|
163
162
|
};
|
|
164
163
|
export {
|
|
165
|
-
|
|
164
|
+
It as Footer
|
|
166
165
|
};
|