@red-hat-developer-hub/backstage-plugin-lightspeed 2.6.8 → 2.7.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/CHANGELOG.md +15 -0
- package/dist/alpha.d.ts +7 -0
- package/dist/components/CollapsedHistoryStrip.esm.js +94 -0
- package/dist/components/CollapsedHistoryStrip.esm.js.map +1 -0
- package/dist/components/LightSpeedChat.esm.js +272 -106
- package/dist/components/LightSpeedChat.esm.js.map +1 -1
- package/dist/components/MessageBarModelSelector.esm.js +92 -0
- package/dist/components/MessageBarModelSelector.esm.js.map +1 -0
- package/dist/images/logo.svg +1 -0
- package/dist/translations/de.esm.js +5 -0
- package/dist/translations/de.esm.js.map +1 -1
- package/dist/translations/es.esm.js +7 -0
- package/dist/translations/es.esm.js.map +1 -1
- package/dist/translations/fr.esm.js +5 -0
- package/dist/translations/fr.esm.js.map +1 -1
- package/dist/translations/it.esm.js +7 -0
- package/dist/translations/it.esm.js.map +1 -1
- package/dist/translations/ja.esm.js +5 -0
- package/dist/translations/ja.esm.js.map +1 -1
- package/dist/translations/ref.esm.js +9 -0
- package/dist/translations/ref.esm.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
## @red-hat-developer-hub/backstage-plugin-lightspeed
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 41c1901: Implemented fullscreen chat UX updates including:
|
|
8
|
+
- Collapsible history panel with new expand/collapse icons
|
|
9
|
+
- Redesigned message bar with inline model selector and attachment menu
|
|
10
|
+
- New collapsed history strip with quick new chat functionality
|
|
11
|
+
- Updated header with Lightspeed logo
|
|
12
|
+
- Improved conversation list with hover-only options menu
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- @red-hat-developer-hub/backstage-plugin-lightspeed-common@2.7.0
|
|
17
|
+
|
|
3
18
|
## 2.6.8
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -155,6 +155,9 @@ declare const lightspeedTranslationRef: _backstage_frontend_plugin_api.Translati
|
|
|
155
155
|
readonly "tooltip.send": string;
|
|
156
156
|
readonly "tooltip.microphone.active": string;
|
|
157
157
|
readonly "tooltip.microphone.inactive": string;
|
|
158
|
+
readonly "tooltip.expandHistoryPanel": string;
|
|
159
|
+
readonly "tooltip.collapseHistoryPanel": string;
|
|
160
|
+
readonly "tooltip.quickNewChat": string;
|
|
158
161
|
readonly "button.newChat": string;
|
|
159
162
|
readonly "tooltip.chatHistoryMenu": string;
|
|
160
163
|
readonly "tooltip.responseRecorded": string;
|
|
@@ -164,6 +167,10 @@ declare const lightspeedTranslationRef: _backstage_frontend_plugin_api.Translati
|
|
|
164
167
|
readonly "tooltip.close": string;
|
|
165
168
|
readonly "tooltip.fab.open": string;
|
|
166
169
|
readonly "tooltip.fab.close": string;
|
|
170
|
+
readonly "attach.menu.title": string;
|
|
171
|
+
readonly "attach.menu.description": string;
|
|
172
|
+
readonly "history.section.pinned": string;
|
|
173
|
+
readonly "history.section.recent": string;
|
|
167
174
|
readonly "modal.title.preview": string;
|
|
168
175
|
readonly "modal.title.edit": string;
|
|
169
176
|
readonly "icon.lightspeed.alt": string;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { makeStyles } from '@material-ui/core';
|
|
3
|
+
import { Tooltip, Button } from '@patternfly/react-core';
|
|
4
|
+
import { useTranslation } from '../hooks/useTranslation.esm.js';
|
|
5
|
+
import { SidebarExpandIcon } from './notebooks/SidebarCollapseIcon.esm.js';
|
|
6
|
+
|
|
7
|
+
const EditSquareIcon = ({ className }) => /* @__PURE__ */ jsx(
|
|
8
|
+
"svg",
|
|
9
|
+
{
|
|
10
|
+
className,
|
|
11
|
+
width: "20",
|
|
12
|
+
height: "20",
|
|
13
|
+
viewBox: "0 0 24 24",
|
|
14
|
+
fill: "none",
|
|
15
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16
|
+
style: { verticalAlign: "middle" },
|
|
17
|
+
children: /* @__PURE__ */ jsx(
|
|
18
|
+
"path",
|
|
19
|
+
{
|
|
20
|
+
d: "M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H14L12 5H5V19H19V12L21 10V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM16.175 5.775L17.6 7.2L12 12.8V14H13.2L18.8 8.4L20.225 9.825L14.275 15.775C14.1083 15.9417 13.9167 16.0667 13.7 16.15C13.4833 16.2333 13.2583 16.275 13.025 16.275H11C10.7167 16.275 10.4792 16.1792 10.2875 15.9875C10.0958 15.7958 10 15.5583 10 15.275V13.25C10 13.0167 10.0417 12.7917 10.125 12.575C10.2083 12.3583 10.3333 12.1667 10.5 12L16.175 5.775ZM20.225 9.825L16.175 5.775L18.175 3.775C18.5583 3.39167 19.0292 3.2 19.5875 3.2C20.1458 3.2 20.6167 3.39167 21 3.775L22.225 5C22.6083 5.38333 22.8 5.85417 22.8 6.4125C22.8 6.97083 22.6083 7.44167 22.225 7.825L20.225 9.825Z",
|
|
21
|
+
fill: "currentColor"
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
const useStyles = makeStyles((theme) => ({
|
|
27
|
+
strip: {
|
|
28
|
+
display: "flex",
|
|
29
|
+
flexDirection: "column",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
paddingTop: theme.spacing(1.5),
|
|
32
|
+
gap: theme.spacing(1.5),
|
|
33
|
+
borderRight: "1px solid var(--pf-t--global--border--color--default)",
|
|
34
|
+
width: 48,
|
|
35
|
+
minWidth: 48,
|
|
36
|
+
flexShrink: 0,
|
|
37
|
+
backgroundColor: "var(--pf-t--global--background--color--primary--default)",
|
|
38
|
+
height: "100%"
|
|
39
|
+
},
|
|
40
|
+
iconButton: {
|
|
41
|
+
padding: 8,
|
|
42
|
+
minWidth: 0,
|
|
43
|
+
lineHeight: 1,
|
|
44
|
+
borderRadius: "50%",
|
|
45
|
+
color: "var(--pf-t--global--icon--color--regular)",
|
|
46
|
+
"&:hover": {
|
|
47
|
+
color: "var(--pf-t--global--icon--color--hover)",
|
|
48
|
+
backgroundColor: "var(--pf-t--global--background--color--action--plain--hover)"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
newChatIconButton: {
|
|
52
|
+
padding: 0,
|
|
53
|
+
minWidth: 0,
|
|
54
|
+
lineHeight: 1,
|
|
55
|
+
color: "var(--pf-t--global--color--brand--default)",
|
|
56
|
+
"&:hover": {
|
|
57
|
+
color: "var(--pf-t--global--color--brand--hover)"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
const CollapsedHistoryStrip = ({
|
|
62
|
+
onExpand,
|
|
63
|
+
onNewChat,
|
|
64
|
+
newChatDisabled = false
|
|
65
|
+
}) => {
|
|
66
|
+
const classes = useStyles();
|
|
67
|
+
const { t } = useTranslation();
|
|
68
|
+
return /* @__PURE__ */ jsxs("div", { className: classes.strip, children: [
|
|
69
|
+
/* @__PURE__ */ jsx(Tooltip, { content: t("tooltip.expandHistoryPanel"), position: "right", children: /* @__PURE__ */ jsx(
|
|
70
|
+
Button,
|
|
71
|
+
{
|
|
72
|
+
variant: "plain",
|
|
73
|
+
className: classes.iconButton,
|
|
74
|
+
onClick: onExpand,
|
|
75
|
+
"aria-label": t("tooltip.expandHistoryPanel"),
|
|
76
|
+
children: /* @__PURE__ */ jsx(SidebarExpandIcon, {})
|
|
77
|
+
}
|
|
78
|
+
) }),
|
|
79
|
+
/* @__PURE__ */ jsx(Tooltip, { content: t("tooltip.quickNewChat"), position: "right", children: /* @__PURE__ */ jsx(
|
|
80
|
+
Button,
|
|
81
|
+
{
|
|
82
|
+
variant: "plain",
|
|
83
|
+
className: classes.newChatIconButton,
|
|
84
|
+
onClick: onNewChat,
|
|
85
|
+
"aria-label": t("tooltip.quickNewChat"),
|
|
86
|
+
isDisabled: newChatDisabled,
|
|
87
|
+
children: /* @__PURE__ */ jsx(EditSquareIcon, {})
|
|
88
|
+
}
|
|
89
|
+
) })
|
|
90
|
+
] });
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export { CollapsedHistoryStrip, EditSquareIcon };
|
|
94
|
+
//# sourceMappingURL=CollapsedHistoryStrip.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollapsedHistoryStrip.esm.js","sources":["../../src/components/CollapsedHistoryStrip.tsx"],"sourcesContent":["/*\n * Copyright Red Hat, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { makeStyles } from '@material-ui/core';\nimport { Button, Tooltip } from '@patternfly/react-core';\n\nimport { useTranslation } from '../hooks/useTranslation';\nimport { SidebarExpandIcon } from './notebooks/SidebarCollapseIcon';\n\ntype IconProps = {\n className?: string;\n};\n\nexport const EditSquareIcon = ({ className }: IconProps) => (\n <svg\n className={className}\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n style={{ verticalAlign: 'middle' }}\n >\n <path\n d=\"M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H14L12 5H5V19H19V12L21 10V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM16.175 5.775L17.6 7.2L12 12.8V14H13.2L18.8 8.4L20.225 9.825L14.275 15.775C14.1083 15.9417 13.9167 16.0667 13.7 16.15C13.4833 16.2333 13.2583 16.275 13.025 16.275H11C10.7167 16.275 10.4792 16.1792 10.2875 15.9875C10.0958 15.7958 10 15.5583 10 15.275V13.25C10 13.0167 10.0417 12.7917 10.125 12.575C10.2083 12.3583 10.3333 12.1667 10.5 12L16.175 5.775ZM20.225 9.825L16.175 5.775L18.175 3.775C18.5583 3.39167 19.0292 3.2 19.5875 3.2C20.1458 3.2 20.6167 3.39167 21 3.775L22.225 5C22.6083 5.38333 22.8 5.85417 22.8 6.4125C22.8 6.97083 22.6083 7.44167 22.225 7.825L20.225 9.825Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n\nconst useStyles = makeStyles(theme => ({\n strip: {\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n paddingTop: theme.spacing(1.5),\n gap: theme.spacing(1.5),\n borderRight: '1px solid var(--pf-t--global--border--color--default)',\n width: 48,\n minWidth: 48,\n flexShrink: 0,\n backgroundColor: 'var(--pf-t--global--background--color--primary--default)',\n height: '100%',\n },\n iconButton: {\n padding: 8,\n minWidth: 0,\n lineHeight: 1,\n borderRadius: '50%',\n color: 'var(--pf-t--global--icon--color--regular)',\n '&:hover': {\n color: 'var(--pf-t--global--icon--color--hover)',\n backgroundColor:\n 'var(--pf-t--global--background--color--action--plain--hover)',\n },\n },\n newChatIconButton: {\n padding: 0,\n minWidth: 0,\n lineHeight: 1,\n color: 'var(--pf-t--global--color--brand--default)',\n '&:hover': {\n color: 'var(--pf-t--global--color--brand--hover)',\n },\n },\n}));\n\ntype CollapsedHistoryStripProps = {\n onExpand: () => void;\n onNewChat: () => void;\n newChatDisabled?: boolean;\n};\n\nexport const CollapsedHistoryStrip = ({\n onExpand,\n onNewChat,\n newChatDisabled = false,\n}: CollapsedHistoryStripProps) => {\n const classes = useStyles();\n const { t } = useTranslation();\n\n return (\n <div className={classes.strip}>\n <Tooltip content={t('tooltip.expandHistoryPanel')} position=\"right\">\n <Button\n variant=\"plain\"\n className={classes.iconButton}\n onClick={onExpand}\n aria-label={t('tooltip.expandHistoryPanel')}\n >\n <SidebarExpandIcon />\n </Button>\n </Tooltip>\n <Tooltip content={t('tooltip.quickNewChat')} position=\"right\">\n <Button\n variant=\"plain\"\n className={classes.newChatIconButton}\n onClick={onNewChat}\n aria-label={t('tooltip.quickNewChat')}\n isDisabled={newChatDisabled}\n >\n <EditSquareIcon />\n </Button>\n </Tooltip>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AA0BO,MAAM,cAAA,GAAiB,CAAC,EAAE,SAAA,EAAU,qBACzC,GAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,SAAA;AAAA,IACA,KAAA,EAAM,IAAA;AAAA,IACN,MAAA,EAAO,IAAA;AAAA,IACP,OAAA,EAAQ,WAAA;AAAA,IACR,IAAA,EAAK,MAAA;AAAA,IACL,KAAA,EAAM,4BAAA;AAAA,IACN,KAAA,EAAO,EAAE,aAAA,EAAe,QAAA,EAAS;AAAA,IAEjC,QAAA,kBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,CAAA,EAAE,gzBAAA;AAAA,QACF,IAAA,EAAK;AAAA;AAAA;AACP;AACF;AAGF,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,KAAA,EAAO;AAAA,IACL,OAAA,EAAS,MAAA;AAAA,IACT,aAAA,EAAe,QAAA;AAAA,IACf,UAAA,EAAY,QAAA;AAAA,IACZ,UAAA,EAAY,KAAA,CAAM,OAAA,CAAQ,GAAG,CAAA;AAAA,IAC7B,GAAA,EAAK,KAAA,CAAM,OAAA,CAAQ,GAAG,CAAA;AAAA,IACtB,WAAA,EAAa,uDAAA;AAAA,IACb,KAAA,EAAO,EAAA;AAAA,IACP,QAAA,EAAU,EAAA;AAAA,IACV,UAAA,EAAY,CAAA;AAAA,IACZ,eAAA,EAAiB,0DAAA;AAAA,IACjB,MAAA,EAAQ;AAAA,GACV;AAAA,EACA,UAAA,EAAY;AAAA,IACV,OAAA,EAAS,CAAA;AAAA,IACT,QAAA,EAAU,CAAA;AAAA,IACV,UAAA,EAAY,CAAA;AAAA,IACZ,YAAA,EAAc,KAAA;AAAA,IACd,KAAA,EAAO,2CAAA;AAAA,IACP,SAAA,EAAW;AAAA,MACT,KAAA,EAAO,yCAAA;AAAA,MACP,eAAA,EACE;AAAA;AACJ,GACF;AAAA,EACA,iBAAA,EAAmB;AAAA,IACjB,OAAA,EAAS,CAAA;AAAA,IACT,QAAA,EAAU,CAAA;AAAA,IACV,UAAA,EAAY,CAAA;AAAA,IACZ,KAAA,EAAO,4CAAA;AAAA,IACP,SAAA,EAAW;AAAA,MACT,KAAA,EAAO;AAAA;AACT;AAEJ,CAAA,CAAE,CAAA;AAQK,MAAM,wBAAwB,CAAC;AAAA,EACpC,QAAA;AAAA,EACA,SAAA;AAAA,EACA,eAAA,GAAkB;AACpB,CAAA,KAAkC;AAChC,EAAA,MAAM,UAAU,SAAA,EAAU;AAC1B,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAE7B,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,KAAA,EACtB,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,WAAQ,OAAA,EAAS,CAAA,CAAE,4BAA4B,CAAA,EAAG,UAAS,OAAA,EAC1D,QAAA,kBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,OAAA;AAAA,QACR,WAAW,OAAA,CAAQ,UAAA;AAAA,QACnB,OAAA,EAAS,QAAA;AAAA,QACT,YAAA,EAAY,EAAE,4BAA4B,CAAA;AAAA,QAE1C,8BAAC,iBAAA,EAAA,EAAkB;AAAA;AAAA,KACrB,EACF,CAAA;AAAA,wBACC,OAAA,EAAA,EAAQ,OAAA,EAAS,EAAE,sBAAsB,CAAA,EAAG,UAAS,OAAA,EACpD,QAAA,kBAAA,GAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,OAAA;AAAA,QACR,WAAW,OAAA,CAAQ,iBAAA;AAAA,QACnB,OAAA,EAAS,SAAA;AAAA,QACT,YAAA,EAAY,EAAE,sBAAsB,CAAA;AAAA,QACpC,UAAA,EAAY,eAAA;AAAA,QAEZ,8BAAC,cAAA,EAAA,EAAe;AAAA;AAAA,KAClB,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -5,7 +5,7 @@ import { Button, makeStyles } from '@material-ui/core';
|
|
|
5
5
|
import { ChatbotDisplayMode, ChatbotContent, ChatbotFooter, MessageBar, ChatbotFootnote, Settings, Chatbot, ChatbotHeader, ChatbotHeaderMain, ChatbotHeaderMenu, ChatbotHeaderTitle, FileDropZone, ChatbotAlert } from '@patternfly/chatbot';
|
|
6
6
|
import ChatbotConversationHistoryNav from '@patternfly/chatbot/dist/dynamic/ChatbotConversationHistoryNav';
|
|
7
7
|
import { DropdownItem, Tooltip, MenuToggle, Select, SelectList, SelectOption, AlertGroup, Alert, AlertVariant, AlertActionCloseButton, Title, Tabs, Tab } from '@patternfly/react-core';
|
|
8
|
-
import { SortAmountDownAltIcon, SortAmountDownIcon,
|
|
8
|
+
import { SortAmountDownAltIcon, SortAmountDownIcon, PlusIcon, SearchIcon } from '@patternfly/react-icons';
|
|
9
9
|
import { useQueryClient } from '@tanstack/react-query';
|
|
10
10
|
import { UNTITLED_NOTEBOOK_NAME, TEMP_CONVERSATION_ID, supportedFileTypes } from '../const.esm.js';
|
|
11
11
|
import '@backstage/core-plugin-api';
|
|
@@ -31,15 +31,18 @@ import { useNotebookDocuments } from '../hooks/notebooks/useNotebookDocuments.es
|
|
|
31
31
|
import { useLightspeedDrawerContext } from '../hooks/useLightspeedDrawerContext.esm.js';
|
|
32
32
|
import { useLightspeedUpdatePermission } from '../hooks/useLightspeedUpdatePermission.esm.js';
|
|
33
33
|
import { useWelcomePrompts } from '../hooks/useWelcomePrompts.esm.js';
|
|
34
|
+
import logo from '../images/logo.svg';
|
|
34
35
|
import { getAttachments } from '../utils/attachment-utils.esm.js';
|
|
35
36
|
import { getCategorizeMessages, getFootnoteProps } from '../utils/lightspeed-chatbox-utils.esm.js';
|
|
36
37
|
import Attachment from './Attachment.esm.js';
|
|
37
38
|
import { useFileAttachmentContext } from './AttachmentContext.esm.js';
|
|
39
|
+
import { EditSquareIcon, CollapsedHistoryStrip } from './CollapsedHistoryStrip.esm.js';
|
|
38
40
|
import { DeleteModal } from './DeleteModal.esm.js';
|
|
39
41
|
import FilePreview from './FilePreview.esm.js';
|
|
40
42
|
import { LightspeedChatBox } from './LightspeedChatBox.esm.js';
|
|
41
43
|
import { LightspeedChatBoxHeader } from './LightspeedChatBoxHeader.esm.js';
|
|
42
44
|
import { McpServersSettings } from './McpServersSettings.esm.js';
|
|
45
|
+
import { MessageBarModelSelector } from './MessageBarModelSelector.esm.js';
|
|
43
46
|
import { DeleteNotebookModal } from './notebooks/DeleteNotebookModal.esm.js';
|
|
44
47
|
import { NotebooksTab } from './notebooks/NotebooksTab.esm.js';
|
|
45
48
|
import { NotebookView } from './notebooks/NotebookView.esm.js';
|
|
@@ -47,6 +50,12 @@ import { RenameNotebookModal } from './notebooks/RenameNotebookModal.esm.js';
|
|
|
47
50
|
import PermissionRequiredState from './PermissionRequiredState.esm.js';
|
|
48
51
|
import { RenameConversationModal } from './RenameConversationModal.esm.js';
|
|
49
52
|
|
|
53
|
+
const COLLAPSE_PANEL_ICON_SVG = `url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 21V3H14V21H16ZM12 17V7L7 12L12 17Z' fill='black'/%3E%3C/svg%3E") no-repeat center`;
|
|
54
|
+
const ConditionalWrapper = ({
|
|
55
|
+
condition,
|
|
56
|
+
wrapper,
|
|
57
|
+
children
|
|
58
|
+
}) => condition ? wrapper(children) : children;
|
|
50
59
|
const useStyles = makeStyles((theme) => ({
|
|
51
60
|
body: {
|
|
52
61
|
// remove default margin and padding from common elements
|
|
@@ -58,7 +67,8 @@ const useStyles = makeStyles((theme) => ({
|
|
|
58
67
|
header: {
|
|
59
68
|
padding: `${theme.spacing(3)}px ${theme.spacing(3)}px 0 ${theme.spacing(
|
|
60
69
|
3
|
|
61
|
-
)}px !important
|
|
70
|
+
)}px !important`,
|
|
71
|
+
backgroundColor: "var(--pf-t--global--background--color--floating--default) !important"
|
|
62
72
|
},
|
|
63
73
|
errorContainer: {
|
|
64
74
|
padding: theme.spacing(3)
|
|
@@ -68,7 +78,9 @@ const useStyles = makeStyles((theme) => ({
|
|
|
68
78
|
rowGap: 0,
|
|
69
79
|
columnGap: 0,
|
|
70
80
|
"--pf-v6-c-multiple-file-upload--Gap": "0",
|
|
71
|
-
"--pf-v5-c-multiple-file-upload--Gap": "0"
|
|
81
|
+
"--pf-v5-c-multiple-file-upload--Gap": "0",
|
|
82
|
+
flex: 1,
|
|
83
|
+
minWidth: 0
|
|
72
84
|
},
|
|
73
85
|
headerMenu: {
|
|
74
86
|
// align hamburger icon with title
|
|
@@ -77,11 +89,23 @@ const useStyles = makeStyles((theme) => ({
|
|
|
77
89
|
alignItems: "center"
|
|
78
90
|
}
|
|
79
91
|
},
|
|
92
|
+
headerLogo: {
|
|
93
|
+
width: 48,
|
|
94
|
+
height: 48,
|
|
95
|
+
marginRight: theme.spacing(1.5),
|
|
96
|
+
flexShrink: 0
|
|
97
|
+
},
|
|
80
98
|
headerTitle: {
|
|
81
|
-
justifyContent: "left !important"
|
|
99
|
+
justifyContent: "left !important",
|
|
100
|
+
"& h1": {
|
|
101
|
+
fontSize: "32px !important",
|
|
102
|
+
fontWeight: "700 !important",
|
|
103
|
+
lineHeight: "36.4px !important",
|
|
104
|
+
fontFamily: '"Red Hat Display", sans-serif !important'
|
|
105
|
+
}
|
|
82
106
|
},
|
|
83
107
|
tabs: {
|
|
84
|
-
padding:
|
|
108
|
+
padding: `0 ${theme.spacing(2)}px`,
|
|
85
109
|
backgroundColor: "var(--pf-t--global--background--color--floating--default)",
|
|
86
110
|
"& .pf-v6-c-tabs__item, & .pf-v5-c-tabs__item": {
|
|
87
111
|
backgroundColor: "transparent"
|
|
@@ -103,6 +127,11 @@ const useStyles = makeStyles((theme) => ({
|
|
|
103
127
|
tabsDivider: {
|
|
104
128
|
borderTop: "1px solid var(--pf-t--global--border--color--default)"
|
|
105
129
|
},
|
|
130
|
+
headerDivider: {
|
|
131
|
+
paddingTop: 8,
|
|
132
|
+
borderBottom: "1px solid var(--pf-t--global--border--color--default)",
|
|
133
|
+
backgroundColor: "var(--pf-t--global--background--color--floating--default)"
|
|
134
|
+
},
|
|
106
135
|
notebooksContainer: {
|
|
107
136
|
padding: theme.spacing(3),
|
|
108
137
|
height: "100%",
|
|
@@ -249,6 +278,23 @@ const useStyles = makeStyles((theme) => ({
|
|
|
249
278
|
backgroundColor: theme.palette.grey[300]
|
|
250
279
|
}
|
|
251
280
|
},
|
|
281
|
+
fullscreenFooter: {
|
|
282
|
+
"&>.pf-chatbot__footer-container": {
|
|
283
|
+
width: "100% !important",
|
|
284
|
+
padding: theme.spacing(1.5),
|
|
285
|
+
maxWidth: "unset !important",
|
|
286
|
+
margin: "0 auto"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
fullscreenMessageBar: {
|
|
290
|
+
backgroundColor: "var(--pf-t--global--background--color--secondary--default)",
|
|
291
|
+
border: "1px solid var(--pf-t--global--border--color--default)",
|
|
292
|
+
borderRadius: 24,
|
|
293
|
+
padding: theme.spacing(0.5),
|
|
294
|
+
"&::after": {
|
|
295
|
+
display: "none"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
252
298
|
sortDropdown: {
|
|
253
299
|
padding: 0,
|
|
254
300
|
margin: 0
|
|
@@ -354,7 +400,10 @@ const useStyles = makeStyles((theme) => ({
|
|
|
354
400
|
flexDirection: "column",
|
|
355
401
|
minHeight: 0,
|
|
356
402
|
width: "100%",
|
|
357
|
-
minWidth: 0
|
|
403
|
+
minWidth: 0,
|
|
404
|
+
whiteSpace: "normal",
|
|
405
|
+
wordBreak: "break-word",
|
|
406
|
+
overflowWrap: "break-word"
|
|
358
407
|
},
|
|
359
408
|
mcpSettingsPane: {
|
|
360
409
|
width: "100%",
|
|
@@ -363,7 +412,8 @@ const useStyles = makeStyles((theme) => ({
|
|
|
363
412
|
backgroundColor: "var(--pf-v6-c-table--BackgroundColor, var(--pf-t--global--background--color--primary--default))",
|
|
364
413
|
display: "flex",
|
|
365
414
|
flexDirection: "column",
|
|
366
|
-
minHeight: 0
|
|
415
|
+
minHeight: 0,
|
|
416
|
+
overflow: "auto"
|
|
367
417
|
},
|
|
368
418
|
mcpCollapsedDrawerOrderFix: {
|
|
369
419
|
"& .pf-v6-c-drawer.pf-m-panel-left > .pf-v6-c-drawer__main > .pf-v6-c-drawer__content, & .pf-v5-c-drawer.pf-m-panel-left > .pf-v5-c-drawer__main > .pf-v5-c-drawer__content": {
|
|
@@ -374,6 +424,68 @@ const useStyles = makeStyles((theme) => ({
|
|
|
374
424
|
opacity: 0,
|
|
375
425
|
transition: "none !important"
|
|
376
426
|
}
|
|
427
|
+
},
|
|
428
|
+
// TODO: These PatternFly drawer overrides are needed because PF Chatbot doesn't
|
|
429
|
+
// provide clean APIs for custom expand/collapse icons and positioning.
|
|
430
|
+
// Remove once PatternFly supports these features.
|
|
431
|
+
// See: https://github.com/patternfly/chatbot/issues/834
|
|
432
|
+
fullscreenChatLayout: {
|
|
433
|
+
display: "flex",
|
|
434
|
+
flexDirection: "row",
|
|
435
|
+
flex: 1,
|
|
436
|
+
minHeight: 0,
|
|
437
|
+
height: "100%",
|
|
438
|
+
width: "100%",
|
|
439
|
+
"& .pf-v6-c-drawer, & .pf-v5-c-drawer": {
|
|
440
|
+
flex: 1,
|
|
441
|
+
minWidth: 0
|
|
442
|
+
},
|
|
443
|
+
"& .pf-v6-c-drawer__content, & .pf-v5-c-drawer__content": {
|
|
444
|
+
flex: 1,
|
|
445
|
+
minWidth: 0
|
|
446
|
+
},
|
|
447
|
+
"& .pf-v6-c-drawer:not(.pf-m-expanded) > .pf-v6-c-drawer__main > .pf-v6-c-drawer__panel, & .pf-v5-c-drawer:not(.pf-m-expanded) > .pf-v5-c-drawer__main > .pf-v5-c-drawer__panel": {
|
|
448
|
+
display: "none"
|
|
449
|
+
},
|
|
450
|
+
"& .pf-v6-c-drawer__close, & .pf-v5-c-drawer__close": {
|
|
451
|
+
marginTop: -48,
|
|
452
|
+
marginRight: -24
|
|
453
|
+
},
|
|
454
|
+
"& .pf-v6-c-drawer__close .pf-v6-c-button svg, & .pf-v5-c-drawer__close .pf-v5-c-button svg": {
|
|
455
|
+
display: "none"
|
|
456
|
+
},
|
|
457
|
+
"& .pf-v6-c-drawer__close .pf-v6-c-button, & .pf-v5-c-drawer__close .pf-v5-c-button": {
|
|
458
|
+
display: "flex",
|
|
459
|
+
alignItems: "center",
|
|
460
|
+
justifyContent: "center",
|
|
461
|
+
"&::before": {
|
|
462
|
+
content: '""',
|
|
463
|
+
display: "block",
|
|
464
|
+
width: 24,
|
|
465
|
+
height: 24,
|
|
466
|
+
mask: COLLAPSE_PANEL_ICON_SVG,
|
|
467
|
+
WebkitMask: COLLAPSE_PANEL_ICON_SVG,
|
|
468
|
+
backgroundColor: "currentColor"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"& .pf-chatbot__menu-item": {
|
|
472
|
+
cursor: "pointer"
|
|
473
|
+
},
|
|
474
|
+
"& .pf-chatbot__menu-item .pf-v6-c-menu-toggle, & .pf-chatbot__menu-item .pf-v5-c-menu-toggle": {
|
|
475
|
+
opacity: 0,
|
|
476
|
+
transition: "opacity 0.15s ease-in-out"
|
|
477
|
+
},
|
|
478
|
+
"& .pf-chatbot__menu-item:hover .pf-v6-c-menu-toggle, & .pf-chatbot__menu-item:hover .pf-v5-c-menu-toggle": {
|
|
479
|
+
opacity: 1
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
fullscreenMainContent: {
|
|
483
|
+
display: "flex",
|
|
484
|
+
flexDirection: "column",
|
|
485
|
+
flex: 1,
|
|
486
|
+
minHeight: 0,
|
|
487
|
+
minWidth: 0,
|
|
488
|
+
overflow: "hidden"
|
|
377
489
|
}
|
|
378
490
|
}));
|
|
379
491
|
const LightspeedChat = ({
|
|
@@ -1275,43 +1387,67 @@ const LightspeedChat = ({
|
|
|
1275
1387
|
)
|
|
1276
1388
|
}
|
|
1277
1389
|
),
|
|
1278
|
-
/* @__PURE__ */ jsxs(
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1390
|
+
/* @__PURE__ */ jsxs(
|
|
1391
|
+
ChatbotFooter,
|
|
1392
|
+
{
|
|
1393
|
+
className: isFullscreenMode ? `${classes.footer} ${classes.fullscreenFooter}` : classes.footer,
|
|
1394
|
+
children: [
|
|
1395
|
+
/* @__PURE__ */ jsx(FilePreview, {}),
|
|
1396
|
+
/* @__PURE__ */ jsx(
|
|
1397
|
+
MessageBar,
|
|
1398
|
+
{
|
|
1399
|
+
className: isFullscreenMode ? classes.fullscreenMessageBar : void 0,
|
|
1400
|
+
onSendMessage: sendMessage,
|
|
1401
|
+
isSendButtonDisabled,
|
|
1402
|
+
hasAttachButton: true,
|
|
1403
|
+
attachButtonPosition: isFullscreenMode ? "start" : void 0,
|
|
1404
|
+
handleAttach,
|
|
1405
|
+
hasMicrophoneButton: true,
|
|
1406
|
+
value: draftMessage,
|
|
1407
|
+
onChange: handleDraftMessage,
|
|
1408
|
+
hasStopButton: streamingUiMatchesView,
|
|
1409
|
+
handleStopButton: streamingUiMatchesView ? handleStopButton : void 0,
|
|
1410
|
+
buttonProps: {
|
|
1411
|
+
attach: {
|
|
1412
|
+
inputTestId: "attachment-input",
|
|
1413
|
+
tooltipContent: t("tooltip.attach"),
|
|
1414
|
+
"aria-label": t("tooltip.attach"),
|
|
1415
|
+
...isFullscreenMode && { icon: /* @__PURE__ */ jsx(PlusIcon, {}) }
|
|
1416
|
+
},
|
|
1417
|
+
microphone: {
|
|
1418
|
+
tooltipContent: {
|
|
1419
|
+
active: t("tooltip.microphone.active"),
|
|
1420
|
+
inactive: t("tooltip.microphone.inactive")
|
|
1421
|
+
}
|
|
1422
|
+
},
|
|
1423
|
+
send: {
|
|
1424
|
+
tooltipContent: t("tooltip.send")
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
additionalActions: isFullscreenMode ? /* @__PURE__ */ jsx(
|
|
1428
|
+
MessageBarModelSelector,
|
|
1429
|
+
{
|
|
1430
|
+
selectedModel,
|
|
1431
|
+
models,
|
|
1432
|
+
onSelect: (item) => {
|
|
1433
|
+
setIsMcpSettingsOpen(false);
|
|
1434
|
+
onNewChat();
|
|
1435
|
+
handleSelectedModel(item);
|
|
1436
|
+
},
|
|
1437
|
+
disabled: isSendButtonDisabled
|
|
1438
|
+
}
|
|
1439
|
+
) : void 0,
|
|
1440
|
+
forceMultilineLayout: isFullscreenMode,
|
|
1441
|
+
allowedFileTypes: supportedFileTypes,
|
|
1442
|
+
onAttachRejected,
|
|
1443
|
+
placeholder: t("chatbox.message.placeholder")
|
|
1302
1444
|
},
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
placeholder: t("chatbox.message.placeholder")
|
|
1310
|
-
},
|
|
1311
|
-
messageBarKey
|
|
1312
|
-
),
|
|
1313
|
-
/* @__PURE__ */ jsx(ChatbotFootnote, { ...getFootnoteProps(t) })
|
|
1314
|
-
] })
|
|
1445
|
+
messageBarKey
|
|
1446
|
+
),
|
|
1447
|
+
/* @__PURE__ */ jsx(ChatbotFootnote, { ...getFootnoteProps(t) })
|
|
1448
|
+
]
|
|
1449
|
+
}
|
|
1450
|
+
)
|
|
1315
1451
|
] });
|
|
1316
1452
|
const mcpSettingsPanel = /* @__PURE__ */ jsx(
|
|
1317
1453
|
McpServersSettings,
|
|
@@ -1349,6 +1485,8 @@ const LightspeedChat = ({
|
|
|
1349
1485
|
drawerPanelStyle = { zIndex: 1300 };
|
|
1350
1486
|
} else if (isMcpSettingsOpen) {
|
|
1351
1487
|
drawerPanelStyle = { width: 320, minWidth: 320, maxWidth: 320 };
|
|
1488
|
+
} else {
|
|
1489
|
+
drawerPanelStyle = { minWidth: 232, maxWidth: 400 };
|
|
1352
1490
|
}
|
|
1353
1491
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1354
1492
|
notebookAlerts.length > 0 && /* @__PURE__ */ jsx(
|
|
@@ -1423,7 +1561,7 @@ const LightspeedChat = ({
|
|
|
1423
1561
|
children: [
|
|
1424
1562
|
/* @__PURE__ */ jsxs(ChatbotHeader, { className: classes.header, children: [
|
|
1425
1563
|
/* @__PURE__ */ jsxs(ChatbotHeaderMain, { children: [
|
|
1426
|
-
showChatPanel && /* @__PURE__ */ jsx(
|
|
1564
|
+
showChatPanel && !isFullscreenMode && /* @__PURE__ */ jsx(
|
|
1427
1565
|
ChatbotHeaderMenu,
|
|
1428
1566
|
{
|
|
1429
1567
|
"aria-expanded": isChatHistoryDrawerOpen,
|
|
@@ -1433,7 +1571,17 @@ const LightspeedChat = ({
|
|
|
1433
1571
|
"aria-label": t("aria.chatHistoryMenu")
|
|
1434
1572
|
}
|
|
1435
1573
|
),
|
|
1436
|
-
isFullscreenMode && /* @__PURE__ */
|
|
1574
|
+
isFullscreenMode && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1575
|
+
/* @__PURE__ */ jsx(
|
|
1576
|
+
"img",
|
|
1577
|
+
{
|
|
1578
|
+
src: logo,
|
|
1579
|
+
alt: t("icon.lightspeed.alt"),
|
|
1580
|
+
className: classes.headerLogo
|
|
1581
|
+
}
|
|
1582
|
+
),
|
|
1583
|
+
/* @__PURE__ */ jsx(ChatbotHeaderTitle, { className: classes.headerTitle, children: /* @__PURE__ */ jsx(Title, { headingLevel: "h1", size: "3xl", children: t("chatbox.header.title") }) })
|
|
1584
|
+
] })
|
|
1437
1585
|
] }),
|
|
1438
1586
|
/* @__PURE__ */ jsx(
|
|
1439
1587
|
LightspeedChatBoxHeader,
|
|
@@ -1447,7 +1595,7 @@ const LightspeedChat = ({
|
|
|
1447
1595
|
models,
|
|
1448
1596
|
isPinningChatsEnabled,
|
|
1449
1597
|
isModelSelectorDisabled: isSendButtonDisabled,
|
|
1450
|
-
hideModelSelector: showNotebooksPanel,
|
|
1598
|
+
hideModelSelector: showNotebooksPanel || isFullscreenMode,
|
|
1451
1599
|
showChatTabOptions: !showNotebooksPanel,
|
|
1452
1600
|
setDisplayMode: setDisplayModeFromHeader,
|
|
1453
1601
|
displayMode,
|
|
@@ -1456,6 +1604,7 @@ const LightspeedChat = ({
|
|
|
1456
1604
|
}
|
|
1457
1605
|
)
|
|
1458
1606
|
] }),
|
|
1607
|
+
isFullscreenMode && /* @__PURE__ */ jsx("div", { className: classes.headerDivider }),
|
|
1459
1608
|
isFullscreenMode && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1460
1609
|
/* @__PURE__ */ jsxs(
|
|
1461
1610
|
Tabs,
|
|
@@ -1473,69 +1622,86 @@ const LightspeedChat = ({
|
|
|
1473
1622
|
/* @__PURE__ */ jsx("div", { className: classes.tabsDivider })
|
|
1474
1623
|
] }),
|
|
1475
1624
|
showChatPanel && /* @__PURE__ */ jsx(
|
|
1476
|
-
|
|
1625
|
+
ConditionalWrapper,
|
|
1477
1626
|
{
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
setIsDrawerOpen: setIsChatHistoryDrawerOpen,
|
|
1493
|
-
activeItemId: viewConversationId,
|
|
1494
|
-
onSelectActiveItem,
|
|
1495
|
-
conversations: filterConversations(filterValue),
|
|
1496
|
-
onNewChat: newChatCreated ? void 0 : onNewChat,
|
|
1497
|
-
newChatButtonText: t("button.newChat"),
|
|
1498
|
-
newChatButtonProps: {
|
|
1499
|
-
icon: /* @__PURE__ */ jsx(PlusIcon, {})
|
|
1500
|
-
},
|
|
1501
|
-
handleTextInputChange: handleFilter,
|
|
1502
|
-
searchInputPlaceholder: t("chatbox.search.placeholder"),
|
|
1503
|
-
searchInputAriaLabel: t("aria.search.placeholder"),
|
|
1504
|
-
searchInputProps: {
|
|
1505
|
-
value: filterValue,
|
|
1506
|
-
onClear: () => {
|
|
1507
|
-
setFilterValue("");
|
|
1508
|
-
}
|
|
1509
|
-
},
|
|
1510
|
-
searchActionEnd: sortDropdown,
|
|
1511
|
-
noResultsState: filterValue && Object.keys(filterConversations(filterValue)).length === 0 ? {
|
|
1512
|
-
bodyText: t("chatbox.emptyState.noResults.body"),
|
|
1513
|
-
titleText: t("chatbox.emptyState.noResults.title"),
|
|
1514
|
-
icon: SearchIcon
|
|
1515
|
-
} : void 0,
|
|
1516
|
-
drawerContent: /* @__PURE__ */ jsxs(
|
|
1517
|
-
FileDropZone,
|
|
1627
|
+
condition: isFullscreenMode,
|
|
1628
|
+
wrapper: (children) => /* @__PURE__ */ jsxs("div", { className: classes.fullscreenChatLayout, children: [
|
|
1629
|
+
!isChatHistoryDrawerOpen && /* @__PURE__ */ jsx(
|
|
1630
|
+
CollapsedHistoryStrip,
|
|
1631
|
+
{
|
|
1632
|
+
onExpand: () => setIsChatHistoryDrawerOpen(true),
|
|
1633
|
+
onNewChat,
|
|
1634
|
+
newChatDisabled: newChatCreated
|
|
1635
|
+
}
|
|
1636
|
+
),
|
|
1637
|
+
children
|
|
1638
|
+
] }),
|
|
1639
|
+
children: /* @__PURE__ */ jsx(
|
|
1640
|
+
ChatbotConversationHistoryNav,
|
|
1518
1641
|
{
|
|
1519
|
-
|
|
1520
|
-
|
|
1642
|
+
drawerPanelContentProps: {
|
|
1643
|
+
isResizable: isFullscreenMode,
|
|
1644
|
+
hasNoBorder: !isFullscreenMode,
|
|
1645
|
+
style: drawerPanelStyle
|
|
1646
|
+
},
|
|
1647
|
+
reverseButtonOrder: true,
|
|
1521
1648
|
displayMode: ChatbotDisplayMode.embedded,
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
) })
|
|
1537
|
-
|
|
1538
|
-
|
|
1649
|
+
onDrawerToggle: onChatHistoryDrawerToggle,
|
|
1650
|
+
title: "",
|
|
1651
|
+
navTitleIcon: null,
|
|
1652
|
+
isDrawerOpen: isChatHistoryDrawerOpen,
|
|
1653
|
+
drawerCloseButtonProps: {
|
|
1654
|
+
"aria-label": t("aria.closeDrawerPanel")
|
|
1655
|
+
},
|
|
1656
|
+
setIsDrawerOpen: setIsChatHistoryDrawerOpen,
|
|
1657
|
+
activeItemId: viewConversationId,
|
|
1658
|
+
onSelectActiveItem,
|
|
1659
|
+
conversations: filterConversations(filterValue),
|
|
1660
|
+
onNewChat: newChatCreated ? void 0 : onNewChat,
|
|
1661
|
+
newChatButtonText: t("button.newChat"),
|
|
1662
|
+
newChatButtonProps: {
|
|
1663
|
+
icon: isFullscreenMode ? /* @__PURE__ */ jsx(EditSquareIcon, {}) : /* @__PURE__ */ jsx(PlusIcon, {})
|
|
1664
|
+
},
|
|
1665
|
+
handleTextInputChange: handleFilter,
|
|
1666
|
+
searchInputPlaceholder: t("chatbox.search.placeholder"),
|
|
1667
|
+
searchInputAriaLabel: t("aria.search.placeholder"),
|
|
1668
|
+
searchInputProps: {
|
|
1669
|
+
value: filterValue,
|
|
1670
|
+
onClear: () => {
|
|
1671
|
+
setFilterValue("");
|
|
1672
|
+
}
|
|
1673
|
+
},
|
|
1674
|
+
searchActionEnd: sortDropdown,
|
|
1675
|
+
noResultsState: filterValue && Object.keys(filterConversations(filterValue)).length === 0 ? {
|
|
1676
|
+
bodyText: t("chatbox.emptyState.noResults.body"),
|
|
1677
|
+
titleText: t("chatbox.emptyState.noResults.title"),
|
|
1678
|
+
icon: SearchIcon
|
|
1679
|
+
} : void 0,
|
|
1680
|
+
drawerContent: /* @__PURE__ */ jsxs(
|
|
1681
|
+
FileDropZone,
|
|
1682
|
+
{
|
|
1683
|
+
className: classes.drawerFileDropZone,
|
|
1684
|
+
onFileDrop: (e, data) => handleAttach(data, e),
|
|
1685
|
+
displayMode: ChatbotDisplayMode.embedded,
|
|
1686
|
+
infoText: t("chatbox.fileUpload.infoText"),
|
|
1687
|
+
allowedFileTypes: supportedFileTypes,
|
|
1688
|
+
onAttachRejected,
|
|
1689
|
+
children: [
|
|
1690
|
+
showAlert && uploadError.message && /* @__PURE__ */ jsx("div", { className: classes.errorContainer, children: /* @__PURE__ */ jsx(
|
|
1691
|
+
ChatbotAlert,
|
|
1692
|
+
{
|
|
1693
|
+
component: "h4",
|
|
1694
|
+
title: t("chatbox.fileUpload.failed"),
|
|
1695
|
+
variant: uploadError.type ?? "danger",
|
|
1696
|
+
isInline: true,
|
|
1697
|
+
onClose: () => setUploadError({ message: null }),
|
|
1698
|
+
children: uploadError.message
|
|
1699
|
+
}
|
|
1700
|
+
) }),
|
|
1701
|
+
mainPanelContent
|
|
1702
|
+
]
|
|
1703
|
+
}
|
|
1704
|
+
)
|
|
1539
1705
|
}
|
|
1540
1706
|
)
|
|
1541
1707
|
}
|