@red-hat-developer-hub/backstage-plugin-intelligent-assistant 5.0.0 → 5.0.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/alpha.d.ts +1 -2
  3. package/dist/components/Attachment.esm.js +14 -14
  4. package/dist/components/Attachment.esm.js.map +1 -1
  5. package/dist/components/CollapsedHistoryStrip.esm.js +46 -51
  6. package/dist/components/CollapsedHistoryStrip.esm.js.map +1 -1
  7. package/dist/components/DeleteModal.esm.js +1 -0
  8. package/dist/components/DeleteModal.esm.js.map +1 -1
  9. package/dist/components/FilePreview.esm.js +3 -2
  10. package/dist/components/FilePreview.esm.js.map +1 -1
  11. package/dist/components/LightSpeedChat.esm.js +580 -745
  12. package/dist/components/LightSpeedChat.esm.js.map +1 -1
  13. package/dist/components/LightspeedChatBox.esm.js +44 -72
  14. package/dist/components/LightspeedChatBox.esm.js.map +1 -1
  15. package/dist/components/LightspeedChatBoxHeader.esm.js +38 -34
  16. package/dist/components/LightspeedChatBoxHeader.esm.js.map +1 -1
  17. package/dist/components/LightspeedChatContainer.esm.js +6 -8
  18. package/dist/components/LightspeedChatContainer.esm.js.map +1 -1
  19. package/dist/components/LightspeedChatModelsState.esm.js +67 -73
  20. package/dist/components/LightspeedChatModelsState.esm.js.map +1 -1
  21. package/dist/components/LightspeedDrawerContext.esm.js.map +1 -1
  22. package/dist/components/LightspeedDrawerProvider.esm.js +13 -16
  23. package/dist/components/LightspeedDrawerProvider.esm.js.map +1 -1
  24. package/dist/components/LightspeedFABContent.esm.js +40 -9
  25. package/dist/components/LightspeedFABContent.esm.js.map +1 -1
  26. package/dist/components/LightspeedPage.esm.js +1 -10
  27. package/dist/components/LightspeedPage.esm.js.map +1 -1
  28. package/dist/components/McpConfigureServerModal.esm.js +79 -86
  29. package/dist/components/McpConfigureServerModal.esm.js.map +1 -1
  30. package/dist/components/McpServersSettings.esm.js +246 -212
  31. package/dist/components/McpServersSettings.esm.js.map +1 -1
  32. package/dist/components/MessageBarModelSelector.esm.js +29 -33
  33. package/dist/components/MessageBarModelSelector.esm.js.map +1 -1
  34. package/dist/components/PermissionRequiredState.esm.js +63 -63
  35. package/dist/components/PermissionRequiredState.esm.js.map +1 -1
  36. package/dist/components/RagSourceLabel.esm.js +22 -0
  37. package/dist/components/RagSourceLabel.esm.js.map +1 -0
  38. package/dist/components/RenameConversationModal.esm.js +38 -31
  39. package/dist/components/RenameConversationModal.esm.js.map +1 -1
  40. package/dist/components/Router.esm.js +4 -13
  41. package/dist/components/Router.esm.js.map +1 -1
  42. package/dist/components/SourcesChipModal.esm.js +94 -89
  43. package/dist/components/SourcesChipModal.esm.js.map +1 -1
  44. package/dist/components/ToastAlertGroup.esm.js +24 -40
  45. package/dist/components/ToastAlertGroup.esm.js.map +1 -1
  46. package/dist/components/ToolCallContent.esm.js +8 -11
  47. package/dist/components/ToolCallContent.esm.js.map +1 -1
  48. package/dist/components/notebooks/AddDocumentModal.esm.js +232 -252
  49. package/dist/components/notebooks/AddDocumentModal.esm.js.map +1 -1
  50. package/dist/components/notebooks/DeleteDocumentModal.esm.js +35 -77
  51. package/dist/components/notebooks/DeleteDocumentModal.esm.js.map +1 -1
  52. package/dist/components/notebooks/DeleteNotebookModal.esm.js +46 -81
  53. package/dist/components/notebooks/DeleteNotebookModal.esm.js.map +1 -1
  54. package/dist/components/notebooks/DocumentSidebar.esm.js +172 -196
  55. package/dist/components/notebooks/DocumentSidebar.esm.js.map +1 -1
  56. package/dist/components/notebooks/FileListItem.esm.js +69 -57
  57. package/dist/components/notebooks/FileListItem.esm.js.map +1 -1
  58. package/dist/components/notebooks/FileTypeIcon.esm.js +17 -27
  59. package/dist/components/notebooks/FileTypeIcon.esm.js.map +1 -1
  60. package/dist/components/notebooks/NotebookCard.esm.js +86 -25
  61. package/dist/components/notebooks/NotebookCard.esm.js.map +1 -1
  62. package/dist/components/notebooks/NotebookView.esm.js +367 -380
  63. package/dist/components/notebooks/NotebookView.esm.js.map +1 -1
  64. package/dist/components/notebooks/NotebooksTab.esm.js +93 -30
  65. package/dist/components/notebooks/NotebooksTab.esm.js.map +1 -1
  66. package/dist/components/notebooks/OverwriteConfirmModal.esm.js +142 -184
  67. package/dist/components/notebooks/OverwriteConfirmModal.esm.js.map +1 -1
  68. package/dist/components/notebooks/UploadResourceScreen.esm.js +58 -50
  69. package/dist/components/notebooks/UploadResourceScreen.esm.js.map +1 -1
  70. package/dist/components/notebooks/notebookDialogStyles.esm.js +33 -37
  71. package/dist/components/notebooks/notebookDialogStyles.esm.js.map +1 -1
  72. package/dist/const.esm.js +15 -2
  73. package/dist/const.esm.js.map +1 -1
  74. package/dist/hooks/useAutoScroll.esm.js +11 -11
  75. package/dist/hooks/useAutoScroll.esm.js.map +1 -1
  76. package/dist/hooks/useBufferedMessages.esm.js +5 -5
  77. package/dist/hooks/useBufferedMessages.esm.js.map +1 -1
  78. package/dist/hooks/useFeedbackActions.esm.js.map +1 -1
  79. package/dist/hooks/useIsMobile.esm.js +3 -3
  80. package/dist/hooks/useIsMobile.esm.js.map +1 -1
  81. package/dist/translations/de.esm.js +1 -2
  82. package/dist/translations/de.esm.js.map +1 -1
  83. package/dist/translations/es.esm.js +1 -2
  84. package/dist/translations/es.esm.js.map +1 -1
  85. package/dist/translations/fr.esm.js +1 -2
  86. package/dist/translations/fr.esm.js.map +1 -1
  87. package/dist/translations/it.esm.js +1 -2
  88. package/dist/translations/it.esm.js.map +1 -1
  89. package/dist/translations/ja.esm.js +1 -2
  90. package/dist/translations/ja.esm.js.map +1 -1
  91. package/dist/translations/ref.esm.js +1 -2
  92. package/dist/translations/ref.esm.js.map +1 -1
  93. package/dist/types.esm.js.map +1 -1
  94. package/dist/utils/fab-anchor-utils.esm.js +41 -0
  95. package/dist/utils/fab-anchor-utils.esm.js.map +1 -0
  96. package/dist/utils/lightspeed-chatbox-utils.esm.js +13 -6
  97. package/dist/utils/lightspeed-chatbox-utils.esm.js.map +1 -1
  98. package/dist/utils/scoped-dialog-utils.esm.js +6 -3
  99. package/dist/utils/scoped-dialog-utils.esm.js.map +1 -1
  100. package/package.json +5 -9
  101. package/dist/utils/generateClassName.esm.js +0 -12
  102. package/dist/utils/generateClassName.esm.js.map +0 -1
@@ -2,13 +2,14 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { useState, useEffect, useRef, useLayoutEffect, useCallback, useMemo } from 'react';
3
3
  import { useNavigate, useMatch, useLocation } from 'react-router-dom';
4
4
  import { useApi, configApiRef } from '@backstage/core-plugin-api';
5
- import { makeStyles, Button as Button$1 } from '@material-ui/core';
5
+ import Button$1 from '@mui/material/Button';
6
+ import { styled } from '@mui/material/styles';
6
7
  import Tab from '@mui/material/Tab';
7
8
  import Tabs from '@mui/material/Tabs';
8
- import { ChatbotDisplayMode, ChatbotContent, ChatbotFooter, MessageBar, Settings, Chatbot, ChatbotHeader, ChatbotHeaderMain, ChatbotHeaderTitle, FileDropZone, ChatbotAlert } from '@patternfly/chatbot';
9
+ import { Chatbot, ChatbotHeader, ChatbotHeaderTitle, ChatbotFooter, MessageBar, ChatbotContent, Settings, ChatbotDisplayMode, ChatbotHeaderMain, ChatbotAlert, FileDropZone } from '@patternfly/chatbot';
9
10
  import ChatbotConversationHistoryNav from '@patternfly/chatbot/dist/dynamic/ChatbotConversationHistoryNav';
10
- import { DropdownItem, Tooltip, MenuToggle, Select, SelectList, SelectOption, Button, Title, Label } from '@patternfly/react-core';
11
- import { PenIcon, ThumbtackIcon, TrashIcon, SortAmountDownAltIcon, SortAmountDownIcon, PlusIcon, SearchIcon } from '@patternfly/react-icons';
11
+ import { SelectList, DropdownItem, Tooltip, MenuToggle, Select, SelectOption, Button, Title, Label } from '@patternfly/react-core';
12
+ import { PenIcon, ThumbtackIcon, TrashIcon, SearchIcon, SortAmountDownAltIcon, SortAmountDownIcon, PlusIcon } from '@patternfly/react-icons';
12
13
  import { RhUiAiExperienceIcon } from '@patternfly/react-icons/dist/esm/icons/rh-ui-ai-experience-icon';
13
14
  import { useQueryClient } from '@tanstack/react-query';
14
15
  import { LIGHTSPEED_PATH, UNTITLED_NOTEBOOK_NAME, TEMP_CONVERSATION_ID, supportedFileTypes } from '../const.esm.js';
@@ -65,37 +66,70 @@ const ConditionalWrapper = ({
65
66
  wrapper,
66
67
  children
67
68
  }) => condition ? wrapper(children) : children;
68
- const useStyles = makeStyles((theme) => ({
69
- body: {
70
- "& h1, & h2, & h3, & h4, & h5, & h6, & p, & li": {
71
- margin: 0,
72
- padding: 0
73
- },
74
- "& .pf-chatbot__content": {
75
- backgroundColor: "var(--pf-t--global--background--color--floating--default) !important"
76
- },
77
- "& .pf-v6-svg > .pf-v6-icon-rh-ui": {
78
- display: "none !important",
79
- width: 0,
80
- height: 0,
81
- overflow: "hidden"
82
- }
69
+ const floatingBg = "var(--pf-t--global--background--color--floating--default)";
70
+ const StyledChatbot = styled(Chatbot, {
71
+ shouldForwardProp: (prop) => prop !== "isCompact" && prop !== "mcpDrawerFix" && prop !== "compactDrawerOpen"
72
+ })(({ isCompact, mcpDrawerFix, compactDrawerOpen }) => ({
73
+ "& h1, & h2, & h3, & h4, & h5, & h6, & p, & li": {
74
+ margin: 0,
75
+ padding: 0
83
76
  },
84
- bodyCompact: {
85
- height: "100% !important",
86
- minHeight: "0 !important",
77
+ "& .pf-chatbot__content": {
78
+ backgroundColor: `${floatingBg} !important`
79
+ },
80
+ "& .pf-v6-svg > .pf-v6-icon-rh-ui": {
81
+ display: "none !important",
82
+ width: 0,
83
+ height: 0,
87
84
  overflow: "hidden"
88
85
  },
89
- header: {
90
- padding: `${theme.spacing(3)}px ${theme.spacing(3)}px 0 ${theme.spacing(
91
- 3
92
- )}px !important`,
93
- backgroundColor: "var(--pf-t--global--background--color--floating--default) !important"
86
+ "& .pf-chatbot-container": {
87
+ minHeight: 0
94
88
  },
95
- errorContainer: {
96
- padding: theme.spacing(3)
89
+ "& .pf-chatbot__header-container": {
90
+ flexShrink: 0
97
91
  },
98
- drawerFileDropZone: {
92
+ ...isCompact ? {
93
+ height: "100% !important",
94
+ minHeight: "0 !important",
95
+ overflow: "hidden"
96
+ } : {},
97
+ // Match the previous compactDrawerPanel class: only expand the history
98
+ // panel when it is actually open. Applying 100% width while collapsed
99
+ // lets the z-index: 1300 panel cover the Chat/Notebooks tab bar.
100
+ ...isCompact && compactDrawerOpen ? {
101
+ "& .pf-v6-c-drawer__panel": {
102
+ width: "100%",
103
+ minWidth: "100%",
104
+ maxWidth: "100%",
105
+ flexBasis: "100%"
106
+ }
107
+ } : {},
108
+ ...mcpDrawerFix ? {
109
+ "& .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": {
110
+ order: "unset"
111
+ },
112
+ "& .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": {
113
+ visibility: "hidden",
114
+ opacity: 0,
115
+ transition: "none !important"
116
+ }
117
+ } : {}
118
+ }));
119
+ const StyledChatbotHeader = styled(ChatbotHeader)(({ theme }) => ({
120
+ padding: `${theme.spacing(3)} ${theme.spacing(3)} 0 ${theme.spacing(3)} !important`,
121
+ backgroundColor: `${floatingBg} !important`
122
+ }));
123
+ const ErrorContainer = styled("div")(({ theme }) => ({
124
+ padding: theme.spacing(3)
125
+ }));
126
+ const FileDropZoneShell = styled("div")({
127
+ flex: 1,
128
+ minWidth: 0,
129
+ minHeight: 0,
130
+ display: "flex",
131
+ flexDirection: "column",
132
+ "& > .pf-chatbot__dropzone": {
99
133
  gap: 0,
100
134
  rowGap: 0,
101
135
  columnGap: 0,
@@ -103,443 +137,262 @@ const useStyles = makeStyles((theme) => ({
103
137
  "--pf-v5-c-multiple-file-upload--Gap": "0",
104
138
  flex: 1,
105
139
  minWidth: 0,
106
- backgroundColor: "var(--pf-t--global--background--color--floating--default) !important"
107
- },
108
- chatHeaderActions: {
109
- display: "flex",
110
- alignItems: "center",
111
- gap: theme.spacing(0.5)
112
- },
113
- compactDrawerPanel: {
114
- "&.pf-v6-c-drawer__panel": {
115
- width: "100%",
116
- minWidth: "100%",
117
- maxWidth: "100%",
118
- flexBasis: "100%"
119
- }
120
- },
121
- notebookHeaderActions: {
122
- display: "flex",
123
- alignItems: "center",
124
- gap: theme.spacing(0.5)
125
- },
126
- headerLogo: {
127
- width: 48,
128
- height: 48,
129
- marginRight: theme.spacing(1.5),
130
- flexShrink: 0
131
- },
132
- headerTitle: {
133
- justifyContent: "left !important"
134
- },
135
- headerDivider: {
136
- paddingTop: 8,
137
- borderBottom: "1px solid var(--pf-t--global--border--color--default)",
138
- backgroundColor: "var(--pf-t--global--background--color--floating--default)"
139
- },
140
- notebooksContainer: {
141
- padding: theme.spacing(3),
142
- height: "100%",
143
- display: "flex",
144
- flexDirection: "column",
140
+ backgroundColor: `${floatingBg} !important`
141
+ }
142
+ });
143
+ const ChatFileDropZone = (props) => /* @__PURE__ */ jsx(FileDropZoneShell, { children: /* @__PURE__ */ jsx(
144
+ FileDropZone,
145
+ {
146
+ ...{ ...props, noClick: true }
147
+ }
148
+ ) });
149
+ const HeaderActions = styled("div")(({ theme }) => ({
150
+ display: "flex",
151
+ alignItems: "center",
152
+ gap: theme.spacing(0.5)
153
+ }));
154
+ const HeaderLogo = styled(RhUiAiExperienceIcon)(({ theme }) => ({
155
+ width: 48,
156
+ height: 48,
157
+ marginRight: theme.spacing(1.5),
158
+ flexShrink: 0
159
+ }));
160
+ const StyledChatbotHeaderTitle = styled(ChatbotHeaderTitle)({
161
+ justifyContent: "left !important"
162
+ });
163
+ const HeaderDivider = styled("div")({
164
+ flexShrink: 0,
165
+ paddingTop: 8,
166
+ borderBottom: "1px solid var(--pf-t--global--border--color--default)",
167
+ backgroundColor: floatingBg
168
+ });
169
+ const ChatMain = styled("div")({
170
+ flex: 1,
171
+ minHeight: 0,
172
+ minWidth: 0,
173
+ display: "flex",
174
+ flexDirection: "column",
175
+ overflow: "hidden",
176
+ "& .pf-chatbot__history": {
145
177
  flex: 1,
146
178
  minHeight: 0,
147
- overflowY: "auto",
148
- backgroundColor: "var(--pf-t--global--background--color--floating--default)"
179
+ height: "100%"
180
+ }
181
+ });
182
+ const NotebooksTabLabel = styled("span", {
183
+ shouldForwardProp: (prop) => prop !== "isCompact"
184
+ })(({ theme, isCompact }) => ({
185
+ display: "inline-flex",
186
+ alignItems: "center",
187
+ gap: isCompact ? theme.spacing(0.5) : theme.spacing(1),
188
+ minWidth: 0,
189
+ maxWidth: "100%"
190
+ }));
191
+ const StyledChatbotFooter = styled(ChatbotFooter)(({ theme }) => ({
192
+ "&.pf-chatbot__footer": {
193
+ backgroundColor: `${floatingBg} !important`
149
194
  },
150
- notebooksHeader: {
151
- display: "flex",
152
- alignItems: "center",
153
- justifyContent: "space-between",
154
- flexWrap: "wrap",
155
- gap: theme.spacing(1),
156
- marginBottom: theme.spacing(4)
195
+ "&>.pf-chatbot__footer-container": {
196
+ width: "100% !important",
197
+ padding: `${theme.spacing(1.5)} !important`,
198
+ maxWidth: "unset !important",
199
+ margin: "0 auto"
157
200
  },
158
- notebooksHeading: {
159
- marginBottom: 0,
160
- whiteSpace: "nowrap",
161
- fontSize: "1.25rem"
201
+ "& .pf-chatbot__message-bar": {
202
+ backgroundColor: theme.palette.mode === "light" ? theme.palette.grey[100] : "var(--pf-t--global--background--color--secondary--default)"
162
203
  },
163
- notebooksHeadingEmpty: {
164
- "&&": {
165
- marginBottom: theme.spacing(1),
166
- paddingBottom: theme.spacing(1)
167
- }
204
+ "& .pf-chatbot__button--stop, & .pf-chatbot__button--attach, & .pf-chatbot__button--send, & .pf-chatbot__button--microphone": {
205
+ borderRadius: "var(--pf-t--global--border--radius--pill) !important"
206
+ }
207
+ }));
208
+ const StyledMessageBar = styled(MessageBar)(({ theme }) => ({
209
+ border: "1px solid var(--pf-t--global--border--color--default)",
210
+ borderRadius: 24,
211
+ padding: theme.spacing(0.5),
212
+ "&::after": {
213
+ display: "none"
214
+ }
215
+ }));
216
+ const StyledSelectList = styled(SelectList)({
217
+ padding: 0,
218
+ margin: 0
219
+ });
220
+ const StyledChatbotContent = styled(ChatbotContent, {
221
+ shouldForwardProp: (prop) => prop !== "hasOverflow"
222
+ })(({ hasOverflow }) => ({
223
+ minHeight: 0,
224
+ display: "flex",
225
+ flexDirection: "column",
226
+ flex: 1,
227
+ "& .pf-chatbot__jump": {
228
+ left: "50% !important",
229
+ right: "auto !important",
230
+ transform: "translateX(-50%)",
231
+ visibility: hasOverflow ? "visible" : "hidden",
232
+ pointerEvents: hasOverflow ? "auto" : "none"
168
233
  },
169
- notebooksEmptyState: {
234
+ "& .pf-chatbot__message-contents": {
235
+ overflowX: "hidden",
236
+ overflowWrap: "break-word",
237
+ wordBreak: "break-word"
238
+ }
239
+ }));
240
+ const ContentScroll = styled("div", {
241
+ shouldForwardProp: (prop) => prop !== "isNewChat"
242
+ })(({ isNewChat }) => ({
243
+ minHeight: 0,
244
+ flex: 1,
245
+ display: "flex",
246
+ flexDirection: "column",
247
+ overflowY: "auto",
248
+ WebkitOverflowScrolling: "touch",
249
+ ...isNewChat ? { backgroundColor: `${floatingBg} !important` } : {}
250
+ }));
251
+ const ContentSpacer = styled("div")({
252
+ flex: 1,
253
+ minHeight: 0
254
+ });
255
+ const FlatSettings = styled(Settings)({
256
+ height: "100%",
257
+ width: "100%",
258
+ flex: 1,
259
+ minHeight: 0,
260
+ "&.pf-chatbot__settings-form-container": {
261
+ background: floatingBg,
262
+ padding: 0,
263
+ margin: 0,
264
+ minHeight: 0,
170
265
  flex: 1,
171
266
  display: "flex",
172
267
  flexDirection: "column",
173
- alignItems: "center",
174
- justifyContent: "center",
175
- textAlign: "center"
176
- },
177
- notebooksIcon: {
178
- fontSize: 48,
179
- color: "var(--pf-t--global--icon--color--subtle)",
180
- marginBottom: theme.spacing(1.5),
181
- "& > .pf-v6-icon-rh-ui": {
182
- display: "none !important"
183
- }
184
- },
185
- notebooksDescription: {
186
- marginTop: theme.spacing(1),
187
- marginBottom: theme.spacing(3),
188
- maxWidth: 420
189
- },
190
- notebooksAction: {
191
- textTransform: "none",
192
- borderRadius: 999,
193
- paddingLeft: theme.spacing(3),
194
- paddingRight: theme.spacing(3)
195
- },
196
- notebooksActionEmpty: {
197
- textTransform: "none",
198
- borderRadius: 999,
199
- paddingLeft: theme.spacing(3),
200
- paddingRight: theme.spacing(3),
201
- marginTop: theme.spacing(3)
202
- },
203
- notebooksGrid: {
204
- display: "grid",
205
- gridTemplateColumns: "repeat(3, minmax(0, 1fr))",
206
- gap: theme.spacing(2),
207
- width: "100%",
208
- maxWidth: "100%",
209
- paddingBottom: theme.spacing(3),
210
- [theme.breakpoints.down("md")]: {
211
- gridTemplateColumns: "repeat(2, minmax(0, 1fr))"
212
- },
213
- [theme.breakpoints.down("sm")]: {
214
- gridTemplateColumns: "repeat(1, minmax(0, 1fr))"
215
- }
216
- },
217
- notebooksGridCompact: {
218
- display: "grid",
219
- gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))",
220
- gap: theme.spacing(2),
268
+ justifyContent: "flex-start",
221
269
  width: "100%",
222
- maxWidth: "100%",
223
- paddingBottom: theme.spacing(6)
224
- },
225
- notebookCard: {
226
- borderRadius: theme.spacing(1.5),
227
- display: "flex",
228
- flexDirection: "column",
229
- "&:hover": {
230
- borderColor: "var(--pf-t--global--border--color--hover)",
231
- borderWidth: "1px",
232
- borderStyle: "solid",
233
- cursor: "pointer"
234
- }
235
- },
236
- notebookCardHeader: {
237
- padding: theme.spacing(3),
238
- paddingBottom: 0,
239
- alignItems: "center"
240
- },
241
- notebookCardDivider: {
242
- borderTop: "1px solid var(--pf-t--global--border--color--default)",
243
- marginTop: theme.spacing(1)
244
- },
245
- notebookCardBody: {
246
- padding: theme.spacing(3),
247
- paddingTop: theme.spacing(2)
248
- },
249
- notebookDocuments: {
250
- paddingTop: theme.spacing(1)
251
- },
252
- notebookUpdated: {
253
- paddingBottom: theme.spacing(3),
254
- paddingTop: theme.spacing(2),
255
- fontStyle: "italic"
256
- },
257
- notebookTitle: {
258
- display: "flex",
259
- alignItems: "center",
260
- gap: theme.spacing(1),
261
- minWidth: 0,
262
- flex: 1
263
- },
264
- notebookCardHeaderActions: {
265
- marginLeft: theme.spacing(1)
266
- },
267
- notebookTitleText: {
270
+ maxWidth: "none",
268
271
  overflow: "hidden",
269
- textOverflow: "ellipsis",
270
- whiteSpace: "nowrap",
271
- cursor: "pointer",
272
- borderRadius: 4,
273
- padding: "2px 6px",
274
- "&:hover": {
275
- backgroundColor: "var(--pf-t--global--background--color--action--plain--hover)"
276
- }
277
- },
278
- notebookMenuButton: {
279
- color: theme.palette.text.secondary
272
+ border: "none"
280
273
  },
281
- notebookDropdownList: {
282
- paddingTop: 0,
283
- paddingBottom: 0,
284
- paddingInlineStart: 0
285
- },
286
- notebookDropdownMenu: {
287
- "--pf-v6-c-menu--PaddingBlockStart": "0",
288
- "--pf-v6-c-menu--PaddingBlockEnd": "0"
289
- },
290
- notebookDropdownItem: {
291
- justifyContent: "flex-start",
292
- textAlign: "left",
293
- paddingLeft: theme.spacing(0.5),
294
- paddingRight: theme.spacing(0.5)
295
- },
296
- footer: {
297
- "&.pf-chatbot__footer": {
298
- backgroundColor: "var(--pf-t--global--background--color--floating--default) !important"
299
- },
300
- "&>.pf-chatbot__footer-container": {
301
- width: "95% !important",
302
- maxWidth: "unset !important"
303
- },
304
- "& .pf-chatbot__message-bar": {
305
- backgroundColor: theme.palette.type === "light" ? theme.palette.grey[100] : "var(--pf-t--global--background--color--secondary--default)"
306
- },
307
- "& .pf-chatbot__button--stop, & .pf-chatbot__button--attach, & .pf-chatbot__button--send, & .pf-chatbot__button--microphone": {
308
- borderRadius: "var(--pf-t--global--border--radius--pill) !important"
309
- }
310
- },
311
- fullscreenFooter: {
312
- "&>.pf-chatbot__footer-container": {
313
- width: "100% !important",
314
- padding: `${theme.spacing(1.5)}px !important`,
315
- maxWidth: "unset !important",
316
- margin: "0 auto"
317
- }
318
- },
319
- messageBar: {
320
- border: "1px solid var(--pf-t--global--border--color--default)",
321
- borderRadius: 24,
322
- padding: theme.spacing(0.5),
323
- "&::after": {
324
- display: "none"
325
- }
326
- },
327
- sortDropdown: {
274
+ "& .pf-chatbot__settings-form": {
275
+ margin: 0,
328
276
  padding: 0,
329
- margin: 0
330
- },
331
- // Outer content wrapper (library may override overflow; we rely on inner scroll wrapper).
332
- chatbotContent: {
277
+ background: floatingBg,
333
278
  minHeight: 0,
279
+ flex: 1,
334
280
  display: "flex",
335
281
  flexDirection: "column",
336
- flex: 1,
337
- "& .pf-chatbot__jump": {
338
- left: "50% !important",
339
- right: "auto !important",
340
- transform: "translateX(-50%)",
341
- visibility: "hidden",
342
- pointerEvents: "none"
343
- },
344
- "& .pf-chatbot__message-contents": {
345
- overflowX: "hidden",
346
- overflowWrap: "break-word",
347
- wordBreak: "break-word"
348
- }
349
- },
350
- chatbotContentHasOverflow: {
351
- "& .pf-chatbot__jump": {
352
- visibility: "visible",
353
- pointerEvents: "auto"
354
- }
282
+ width: "100%",
283
+ maxWidth: "none",
284
+ border: "none"
355
285
  },
356
- // Inner scroll container we control: always scrollable so zoomed-in users see full content.
357
- chatbotContentScroll: {
286
+ "& .pf-chatbot__settings-form-row": {
287
+ background: floatingBg,
288
+ border: "none",
289
+ margin: 0,
290
+ padding: 0,
358
291
  minHeight: 0,
359
292
  flex: 1,
360
293
  display: "flex",
361
294
  flexDirection: "column",
362
- overflowY: "auto",
363
- WebkitOverflowScrolling: "touch"
364
- },
365
- chatbotContentScrollNewChat: {
366
- backgroundColor: "var(--pf-t--global--background--color--floating--default) !important"
295
+ width: "100%",
296
+ maxWidth: "none"
367
297
  },
368
- // When present, pushes welcome content to bottom (zoom out). Scroll up to see important box (zoom in).
369
- chatbotContentSpacer: {
298
+ "& .pf-chatbot__settings-label": {
299
+ display: "none"
300
+ }
301
+ });
302
+ const McpFullscreenLayout = styled("div")({
303
+ display: "grid",
304
+ gridTemplateColumns: "minmax(0, 1fr) minmax(0, 1fr)",
305
+ minHeight: 0,
306
+ height: "100%",
307
+ flex: 1,
308
+ width: "100%",
309
+ minWidth: 0,
310
+ overflow: "hidden"
311
+ });
312
+ const McpChatPane = styled("div")({
313
+ display: "flex",
314
+ flexDirection: "column",
315
+ minHeight: 0,
316
+ width: "100%",
317
+ minWidth: 0,
318
+ whiteSpace: "normal",
319
+ wordBreak: "break-word",
320
+ overflowWrap: "break-word"
321
+ });
322
+ const McpSettingsPane = styled("div")(({ theme }) => ({
323
+ width: "100%",
324
+ minWidth: 0,
325
+ borderLeft: `1px solid ${theme.palette.divider}`,
326
+ backgroundColor: floatingBg,
327
+ display: "flex",
328
+ flexDirection: "column",
329
+ minHeight: 0,
330
+ overflow: "auto"
331
+ }));
332
+ const FullscreenChatLayout = styled("div")({
333
+ display: "flex",
334
+ flexDirection: "row",
335
+ flex: 1,
336
+ minHeight: 0,
337
+ height: "100%",
338
+ width: "100%",
339
+ "& .pf-v6-c-drawer, & .pf-v5-c-drawer": {
370
340
  flex: 1,
371
- minHeight: 0
341
+ minWidth: 0
372
342
  },
373
- settingsFlat: {
374
- height: "100%",
375
- width: "100%",
343
+ "& .pf-v6-c-drawer__content, & .pf-v5-c-drawer__content": {
376
344
  flex: 1,
377
- minHeight: 0,
378
- "&.pf-chatbot__settings-form-container": {
379
- background: "var(--pf-t--global--background--color--floating--default)",
380
- padding: 0,
381
- margin: 0,
382
- minHeight: 0,
383
- flex: 1,
384
- display: "flex",
385
- flexDirection: "column",
386
- justifyContent: "flex-start",
387
- width: "100%",
388
- maxWidth: "none",
389
- overflow: "hidden",
390
- border: "none"
391
- },
392
- "& .pf-chatbot__settings-form": {
393
- margin: 0,
394
- padding: 0,
395
- background: "var(--pf-t--global--background--color--floating--default)",
396
- minHeight: 0,
397
- flex: 1,
398
- display: "flex",
399
- flexDirection: "column",
400
- width: "100%",
401
- maxWidth: "none",
402
- border: "none"
403
- },
404
- "& .pf-chatbot__settings-form-row": {
405
- background: "var(--pf-t--global--background--color--floating--default)",
406
- border: "none",
407
- margin: 0,
408
- padding: 0,
409
- minHeight: 0,
410
- flex: 1,
411
- display: "flex",
412
- flexDirection: "column",
413
- width: "100%",
414
- maxWidth: "none"
415
- },
416
- "& .pf-chatbot__settings-label": {
417
- display: "none"
418
- }
345
+ minWidth: 0
419
346
  },
420
- mcpFullscreenLayout: {
421
- display: "grid",
422
- gridTemplateColumns: "minmax(0, 1fr) minmax(0, 1fr)",
423
- minHeight: 0,
424
- height: "100%",
425
- flex: 1,
426
- width: "100%",
427
- minWidth: 0,
428
- overflow: "hidden"
347
+ "& .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": {
348
+ display: "none"
429
349
  },
430
- mcpChatPane: {
431
- display: "flex",
432
- flexDirection: "column",
433
- minHeight: 0,
434
- width: "100%",
435
- minWidth: 0,
436
- whiteSpace: "normal",
437
- wordBreak: "break-word",
438
- overflowWrap: "break-word"
350
+ "& .pf-v6-c-drawer__close, & .pf-v5-c-drawer__close": {
351
+ marginTop: 0,
352
+ marginRight: 0
439
353
  },
440
- mcpSettingsPane: {
441
- width: "100%",
442
- minWidth: 0,
443
- borderLeft: `1px solid ${theme.palette.divider}`,
444
- backgroundColor: "var(--pf-t--global--background--color--floating--default)",
445
- display: "flex",
446
- flexDirection: "column",
447
- minHeight: 0,
448
- overflow: "auto"
354
+ "& .pf-v6-c-drawer__head, & .pf-v5-c-drawer__head": {
355
+ paddingInlineStart: "var(--pf-t--global--spacer--lg)",
356
+ paddingInlineEnd: "var(--pf-t--global--spacer--lg)"
449
357
  },
450
- mcpCollapsedDrawerOrderFix: {
451
- "& .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": {
452
- order: "unset"
453
- },
454
- "& .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": {
455
- visibility: "hidden",
456
- opacity: 0,
457
- transition: "none !important"
458
- }
358
+ "& .pf-v6-c-drawer__close .pf-v6-c-button svg, & .pf-v5-c-drawer__close .pf-v5-c-button svg": {
359
+ display: "none"
459
360
  },
460
- // TODO: These PF Chatbot overrides are fragile (version-specific class names).
461
- // Remove once the upstream issues are addressed:
462
- // - https://github.com/patternfly/chatbot/issues/834 (custom close/collapse icon & positioning)
463
- // - https://github.com/patternfly/chatbot/issues/848 (sidebar padding & spacing customization)
464
- fullscreenChatLayout: {
361
+ "& .pf-v6-c-drawer__close .pf-v6-c-button, & .pf-v5-c-drawer__close .pf-v5-c-button": {
465
362
  display: "flex",
466
- flexDirection: "row",
467
- flex: 1,
468
- minHeight: 0,
469
- height: "100%",
470
- width: "100%",
471
- "& .pf-v6-c-drawer, & .pf-v5-c-drawer": {
472
- flex: 1,
473
- minWidth: 0
474
- },
475
- "& .pf-v6-c-drawer__content, & .pf-v5-c-drawer__content": {
476
- flex: 1,
477
- minWidth: 0
478
- },
479
- "& .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": {
480
- display: "none"
481
- },
482
- // TODO(#834): Remove close button overrides once PF supports custom icon/positioning
483
- "& .pf-v6-c-drawer__close, & .pf-v5-c-drawer__close": {
484
- marginTop: 0,
485
- marginRight: 0
486
- },
487
- // TODO(#848): Remove drawer head padding overrides once PF exposes drawerHeadProps
488
- "& .pf-v6-c-drawer__head, & .pf-v5-c-drawer__head": {
489
- paddingInlineStart: "var(--pf-t--global--spacer--lg)",
490
- paddingInlineEnd: "var(--pf-t--global--spacer--lg)"
491
- },
492
- // TODO(#834): Remove icon replacement hack once PF supports drawerCloseButtonProps.icon
493
- "& .pf-v6-c-drawer__close .pf-v6-c-button svg, & .pf-v5-c-drawer__close .pf-v5-c-button svg": {
494
- display: "none"
495
- },
496
- "& .pf-v6-c-drawer__close .pf-v6-c-button, & .pf-v5-c-drawer__close .pf-v5-c-button": {
497
- display: "flex",
498
- alignItems: "center",
499
- justifyContent: "center",
500
- "&::before": {
501
- content: '""',
502
- display: "block",
503
- width: 24,
504
- height: 24,
505
- mask: COLLAPSE_PANEL_ICON_SVG,
506
- WebkitMask: COLLAPSE_PANEL_ICON_SVG,
507
- backgroundColor: "currentColor"
508
- }
509
- },
510
- // TODO(#848): Remove heading padding overrides once PF exposes drawerHeadProps
511
- "& .pf-chatbot__heading-container": {
512
- paddingInlineStart: "var(--pf-t--global--spacer--lg)",
513
- paddingInlineEnd: "var(--pf-t--global--spacer--lg)"
514
- },
515
- // TODO(#848): Remove menu item padding overrides once PF exposes menuItemPaddingInline
516
- "& .pf-chatbot__menu-item-header > .pf-v6-c-menu__group-title": {
517
- "--pf-v6-c-menu__group-title--PaddingInlineStart": "var(--pf-t--global--spacer--md)",
518
- "--pf-v6-c-menu__group-title--PaddingInlineEnd": "var(--pf-t--global--spacer--md)"
519
- },
520
- "& .pf-chatbot__menu-item": {
521
- cursor: "pointer",
522
- "--pf-v6-c-menu__item--PaddingInlineStart": "var(--pf-t--global--spacer--md)",
523
- "--pf-v6-c-menu__item--PaddingInlineEnd": "var(--pf-t--global--spacer--md)"
524
- },
525
- // TODO(#848): Remove menu toggle hover hack once PF supports menuToggleVisibility
526
- "& .pf-chatbot__menu-item .pf-v6-c-menu-toggle, & .pf-chatbot__menu-item .pf-v5-c-menu-toggle": {
527
- opacity: 0,
528
- transition: "opacity 0.15s ease-in-out"
529
- },
530
- "& .pf-chatbot__menu-item:hover .pf-v6-c-menu-toggle, & .pf-chatbot__menu-item:hover .pf-v5-c-menu-toggle": {
531
- opacity: 1
363
+ alignItems: "center",
364
+ justifyContent: "center",
365
+ "&::before": {
366
+ content: '""',
367
+ display: "block",
368
+ width: 24,
369
+ height: 24,
370
+ mask: COLLAPSE_PANEL_ICON_SVG,
371
+ WebkitMask: COLLAPSE_PANEL_ICON_SVG,
372
+ backgroundColor: "currentColor"
532
373
  }
533
374
  },
534
- fullscreenMainContent: {
535
- display: "flex",
536
- flexDirection: "column",
537
- flex: 1,
538
- minHeight: 0,
539
- minWidth: 0,
540
- overflow: "hidden"
375
+ "& .pf-chatbot__heading-container": {
376
+ paddingInlineStart: "var(--pf-t--global--spacer--lg)",
377
+ paddingInlineEnd: "var(--pf-t--global--spacer--lg)"
378
+ },
379
+ "& .pf-chatbot__menu-item-header > .pf-v6-c-menu__group-title": {
380
+ "--pf-v6-c-menu__group-title--PaddingInlineStart": "var(--pf-t--global--spacer--md)",
381
+ "--pf-v6-c-menu__group-title--PaddingInlineEnd": "var(--pf-t--global--spacer--md)"
382
+ },
383
+ "& .pf-chatbot__menu-item": {
384
+ cursor: "pointer",
385
+ "--pf-v6-c-menu__item--PaddingInlineStart": "var(--pf-t--global--spacer--md)",
386
+ "--pf-v6-c-menu__item--PaddingInlineEnd": "var(--pf-t--global--spacer--md)"
387
+ },
388
+ "& .pf-chatbot__menu-item .pf-v6-c-menu-toggle, & .pf-chatbot__menu-item .pf-v5-c-menu-toggle": {
389
+ opacity: 0,
390
+ transition: "opacity 0.15s ease-in-out"
391
+ },
392
+ "& .pf-chatbot__menu-item:hover .pf-v6-c-menu-toggle, & .pf-chatbot__menu-item:hover .pf-v5-c-menu-toggle": {
393
+ opacity: 1
541
394
  }
542
- }));
395
+ });
543
396
  const LightspeedChat = ({
544
397
  selectedModel,
545
398
  topicRestrictionEnabled,
@@ -551,7 +404,6 @@ const LightspeedChat = ({
551
404
  models
552
405
  }) => {
553
406
  const isMobile = useIsMobile();
554
- const classes = useStyles();
555
407
  const { t } = useTranslation();
556
408
  const navigate = useNavigate();
557
409
  const configApi = useApi(configApiRef);
@@ -1165,7 +1017,7 @@ const LightspeedChat = ({
1165
1017
  const pinnedChatsKey = t("conversation.category.pinnedChats") || "Pinned chats";
1166
1018
  let isNoPinnedChatsSearchResults = false;
1167
1019
  let isNoRecentChatsSearchResults = false;
1168
- const filteredConversations = Object.entries(categorizedMessages).reduce(
1020
+ const filteredConversations2 = Object.entries(categorizedMessages).reduce(
1169
1021
  (acc, [key, items]) => {
1170
1022
  const filteredItems = items.filter(
1171
1023
  (item) => (item.text ?? "").toLocaleLowerCase("en-US").includes(targetValue.toLocaleLowerCase("en-US"))
@@ -1219,7 +1071,7 @@ const LightspeedChat = ({
1219
1071
  if (isNoPinnedChatsSearchResults && isNoRecentChatsSearchResults) {
1220
1072
  return {};
1221
1073
  }
1222
- return filteredConversations;
1074
+ return filteredConversations2;
1223
1075
  },
1224
1076
  [categorizedMessages, isPinningChatsEnabled, t]
1225
1077
  );
@@ -1410,6 +1262,30 @@ const LightspeedChat = ({
1410
1262
  const handleFilter = useCallback((value) => {
1411
1263
  setFilterValue(value);
1412
1264
  }, []);
1265
+ const onClearFilter = useCallback(() => {
1266
+ setFilterValue("");
1267
+ }, []);
1268
+ const searchInputProps = useMemo(
1269
+ () => ({
1270
+ value: filterValue,
1271
+ onClear: onClearFilter
1272
+ }),
1273
+ [filterValue, onClearFilter]
1274
+ );
1275
+ const filteredConversations = useMemo(
1276
+ () => filterConversations(filterValue),
1277
+ [filterConversations, filterValue]
1278
+ );
1279
+ const noResultsState = useMemo(() => {
1280
+ if (!filterValue || Object.keys(filteredConversations).length > 0) {
1281
+ return void 0;
1282
+ }
1283
+ return {
1284
+ bodyText: t("chatbox.emptyState.noResults.body"),
1285
+ titleText: t("chatbox.emptyState.noResults.title"),
1286
+ icon: SearchIcon
1287
+ };
1288
+ }, [filterValue, filteredConversations, t]);
1413
1289
  const onChatHistoryDrawerToggle = useCallback(() => {
1414
1290
  setIsChatHistoryDrawerOpen((isOpen) => !isOpen);
1415
1291
  }, []);
@@ -1461,7 +1337,7 @@ const LightspeedChat = ({
1461
1337
  popperProps: { position: "end" },
1462
1338
  toggle: sortToggle,
1463
1339
  shouldFocusToggleOnSelect: true,
1464
- children: /* @__PURE__ */ jsxs(SelectList, { className: classes.sortDropdown, children: [
1340
+ children: /* @__PURE__ */ jsxs(StyledSelectList, { children: [
1465
1341
  /* @__PURE__ */ jsx(SelectOption, { value: "newest", children: t("sort.newest") }),
1466
1342
  /* @__PURE__ */ jsx(SelectOption, { value: "oldest", children: t("sort.oldest") }),
1467
1343
  /* @__PURE__ */ jsx(SelectOption, { value: "alphabeticalAsc", children: t("sort.alphabeticalAsc") }),
@@ -1469,14 +1345,7 @@ const LightspeedChat = ({
1469
1345
  ] })
1470
1346
  }
1471
1347
  ),
1472
- [
1473
- isSortSelectOpen,
1474
- selectedSort,
1475
- onSortSelect,
1476
- sortToggle,
1477
- t,
1478
- classes.sortDropdown
1479
- ]
1348
+ [isSortSelectOpen, selectedSort, onSortSelect, sortToggle, t]
1480
1349
  );
1481
1350
  const handleAttach = (data, event) => {
1482
1351
  if ("preventDefault" in event && typeof event.preventDefault === "function") {
@@ -1515,103 +1384,90 @@ const LightspeedChat = ({
1515
1384
  });
1516
1385
  };
1517
1386
  const chatMainContent = /* @__PURE__ */ jsxs(Fragment, { children: [
1518
- /* @__PURE__ */ jsx(
1519
- ChatbotContent,
1387
+ /* @__PURE__ */ jsx(StyledChatbotContent, { hasOverflow: hasChatContentOverflow, children: /* @__PURE__ */ jsxs(
1388
+ ContentScroll,
1520
1389
  {
1521
- className: `${classes.chatbotContent} ${hasChatContentOverflow ? classes.chatbotContentHasOverflow : ""}`,
1522
- children: /* @__PURE__ */ jsxs(
1523
- "div",
1524
- {
1525
- ref: contentScrollRef,
1526
- className: `${classes.chatbotContentScroll}${welcomePrompts.length > 0 ? ` ${classes.chatbotContentScrollNewChat}` : ""}`,
1527
- children: [
1528
- welcomePrompts.length > 0 && /* @__PURE__ */ jsx("div", { className: classes.chatbotContentSpacer, "aria-hidden": true }),
1529
- /* @__PURE__ */ jsx(
1530
- LightspeedChatBox,
1531
- {
1532
- userName,
1533
- messages,
1534
- profileLoading,
1535
- announcement,
1536
- ref: scrollToBottomRef,
1537
- welcomePrompts,
1538
- conversationId,
1539
- isStreaming: streamingUiMatchesView,
1540
- topicRestrictionEnabled,
1541
- displayMode
1542
- }
1543
- ),
1544
- welcomePrompts.length > 0 && /* @__PURE__ */ jsx(
1545
- "div",
1546
- {
1547
- ref: bottomSentinelRef,
1548
- "aria-hidden": true,
1549
- style: { height: 0, flexShrink: 0 }
1550
- }
1551
- )
1552
- ]
1553
- }
1554
- )
1555
- }
1556
- ),
1557
- /* @__PURE__ */ jsxs(
1558
- ChatbotFooter,
1559
- {
1560
- className: `${classes.footer} ${classes.fullscreenFooter}`,
1390
+ ref: contentScrollRef,
1391
+ isNewChat: welcomePrompts.length > 0,
1561
1392
  children: [
1562
- /* @__PURE__ */ jsx(FilePreview, {}),
1393
+ welcomePrompts.length > 0 && /* @__PURE__ */ jsx(ContentSpacer, { "aria-hidden": true }),
1563
1394
  /* @__PURE__ */ jsx(
1564
- MessageBar,
1395
+ LightspeedChatBox,
1565
1396
  {
1566
- className: classes.messageBar,
1567
- onSendMessage: sendMessage,
1568
- isSendButtonDisabled,
1569
- hasAttachButton: true,
1570
- attachButtonPosition: "start",
1571
- handleAttach,
1572
- hasMicrophoneButton: true,
1573
- value: draftMessage,
1574
- onChange: handleDraftMessage,
1575
- hasStopButton: streamingUiMatchesView,
1576
- handleStopButton: streamingUiMatchesView ? handleStopButton : void 0,
1577
- buttonProps: {
1578
- attach: {
1579
- inputTestId: "attachment-input",
1580
- tooltipContent: t("tooltip.attach"),
1581
- "aria-label": t("tooltip.attach"),
1582
- icon: /* @__PURE__ */ jsx(PlusIcon, {})
1583
- },
1584
- microphone: {
1585
- tooltipContent: {
1586
- active: t("tooltip.microphone.active"),
1587
- inactive: t("tooltip.microphone.inactive")
1588
- }
1589
- },
1590
- send: {
1591
- tooltipContent: t("tooltip.send")
1592
- }
1593
- },
1594
- additionalActions: /* @__PURE__ */ jsx(
1595
- MessageBarModelSelector,
1596
- {
1597
- selectedModel,
1598
- models,
1599
- onSelect: handleSelectedModel,
1600
- disabled: isSendButtonDisabled || messages.length > 0,
1601
- disabledTooltip: t("modelSelector.disabledTooltip")
1602
- }
1603
- ),
1604
- forceMultilineLayout: true,
1605
- allowedFileTypes: supportedFileTypes,
1606
- onAttachRejected,
1607
- placeholder: t("chatbox.message.placeholder")
1608
- },
1609
- messageBarKey
1397
+ userName,
1398
+ messages,
1399
+ profileLoading,
1400
+ announcement,
1401
+ ref: scrollToBottomRef,
1402
+ welcomePrompts,
1403
+ conversationId,
1404
+ isStreaming: streamingUiMatchesView,
1405
+ topicRestrictionEnabled,
1406
+ displayMode
1407
+ }
1610
1408
  ),
1611
- /* @__PURE__ */ jsx(ChatbotFootnoteWithIcon, { ...getFootnoteProps(t) })
1409
+ welcomePrompts.length > 0 && /* @__PURE__ */ jsx(
1410
+ "div",
1411
+ {
1412
+ ref: bottomSentinelRef,
1413
+ "aria-hidden": true,
1414
+ style: { height: 0, flexShrink: 0 }
1415
+ }
1416
+ )
1612
1417
  ]
1613
1418
  }
1614
- )
1419
+ ) }),
1420
+ /* @__PURE__ */ jsxs(StyledChatbotFooter, { children: [
1421
+ /* @__PURE__ */ jsx(FilePreview, {}),
1422
+ /* @__PURE__ */ jsx(
1423
+ StyledMessageBar,
1424
+ {
1425
+ onSendMessage: sendMessage,
1426
+ isSendButtonDisabled,
1427
+ hasAttachButton: true,
1428
+ attachButtonPosition: "start",
1429
+ handleAttach,
1430
+ hasMicrophoneButton: true,
1431
+ value: draftMessage,
1432
+ onChange: handleDraftMessage,
1433
+ hasStopButton: streamingUiMatchesView,
1434
+ handleStopButton: streamingUiMatchesView ? handleStopButton : void 0,
1435
+ buttonProps: {
1436
+ attach: {
1437
+ inputTestId: "attachment-input",
1438
+ tooltipContent: t("tooltip.attach"),
1439
+ "aria-label": t("tooltip.attach"),
1440
+ icon: /* @__PURE__ */ jsx(PlusIcon, {})
1441
+ },
1442
+ microphone: {
1443
+ tooltipContent: {
1444
+ active: t("tooltip.microphone.active"),
1445
+ inactive: t("tooltip.microphone.inactive")
1446
+ }
1447
+ },
1448
+ send: {
1449
+ tooltipContent: t("tooltip.send")
1450
+ }
1451
+ },
1452
+ additionalActions: /* @__PURE__ */ jsx(
1453
+ MessageBarModelSelector,
1454
+ {
1455
+ selectedModel,
1456
+ models,
1457
+ onSelect: handleSelectedModel,
1458
+ disabled: isSendButtonDisabled || messages.length > 0,
1459
+ disabledTooltip: t("modelSelector.disabledTooltip")
1460
+ }
1461
+ ),
1462
+ forceMultilineLayout: true,
1463
+ allowedFileTypes: supportedFileTypes,
1464
+ onAttachRejected,
1465
+ placeholder: t("chatbox.message.placeholder")
1466
+ },
1467
+ messageBarKey
1468
+ ),
1469
+ /* @__PURE__ */ jsx(ChatbotFootnoteWithIcon, { ...getFootnoteProps(t) })
1470
+ ] })
1615
1471
  ] });
1616
1472
  const mcpSettingsPanel = /* @__PURE__ */ jsx(
1617
1473
  McpServersSettings,
@@ -1625,15 +1481,14 @@ const LightspeedChat = ({
1625
1481
  return /* @__PURE__ */ jsx(Fragment, { children: chatMainContent });
1626
1482
  }
1627
1483
  if (isFullscreenMode) {
1628
- return /* @__PURE__ */ jsxs("div", { className: classes.mcpFullscreenLayout, children: [
1629
- /* @__PURE__ */ jsx("div", { className: classes.mcpChatPane, children: chatMainContent }),
1630
- /* @__PURE__ */ jsx("div", { className: classes.mcpSettingsPane, children: mcpSettingsPanel })
1484
+ return /* @__PURE__ */ jsxs(McpFullscreenLayout, { children: [
1485
+ /* @__PURE__ */ jsx(McpChatPane, { children: chatMainContent }),
1486
+ /* @__PURE__ */ jsx(McpSettingsPane, { children: mcpSettingsPanel })
1631
1487
  ] });
1632
1488
  }
1633
1489
  return /* @__PURE__ */ jsx(
1634
- Settings,
1490
+ FlatSettings,
1635
1491
  {
1636
- className: classes.settingsFlat,
1637
1492
  fields: [
1638
1493
  {
1639
1494
  id: "mcp-servers-settings",
@@ -1690,14 +1545,16 @@ const LightspeedChat = ({
1690
1545
  }
1691
1546
  ),
1692
1547
  /* @__PURE__ */ jsxs(
1693
- Chatbot,
1548
+ StyledChatbot,
1694
1549
  {
1695
1550
  displayMode: ChatbotDisplayMode.embedded,
1696
- className: `${classes.body} ${!isFullscreenMode ? classes.bodyCompact : ""} ${isMcpSettingsOpen && !isChatHistoryDrawerOpen ? classes.mcpCollapsedDrawerOrderFix : ""}`,
1551
+ isCompact: !isFullscreenMode,
1552
+ compactDrawerOpen: !isFullscreenMode && isChatHistoryDrawerOpen,
1553
+ mcpDrawerFix: isMcpSettingsOpen && !isChatHistoryDrawerOpen,
1697
1554
  children: [
1698
- /* @__PURE__ */ jsxs(ChatbotHeader, { className: classes.header, children: [
1555
+ /* @__PURE__ */ jsxs(StyledChatbotHeader, { children: [
1699
1556
  /* @__PURE__ */ jsxs(ChatbotHeaderMain, { children: [
1700
- showChatPanel && !isFullscreenMode && /* @__PURE__ */ jsxs("div", { className: classes.chatHeaderActions, children: [
1557
+ showChatPanel && !isFullscreenMode && /* @__PURE__ */ jsxs(HeaderActions, { children: [
1701
1558
  /* @__PURE__ */ jsx(
1702
1559
  Tooltip,
1703
1560
  {
@@ -1744,10 +1601,9 @@ const LightspeedChat = ({
1744
1601
  }
1745
1602
  )
1746
1603
  ] }),
1747
- !isFullscreenMode && showNotebooksPanel && activeNotebook && /* @__PURE__ */ jsx(
1604
+ !isFullscreenMode && showNotebooksPanel && activeNotebook && /* @__PURE__ */ jsx(HeaderActions, { children: /* @__PURE__ */ jsx(
1748
1605
  NotebookHeaderActions,
1749
1606
  {
1750
- className: classes.notebookHeaderActions,
1751
1607
  onClose: handleCloseNotebook,
1752
1608
  onOpenUploadModal: () => setNotebookUploadModalOpen(true),
1753
1609
  uploadsInProgress: notebookUploadsInProgress,
@@ -1755,17 +1611,16 @@ const LightspeedChat = ({
1755
1611
  sidebarCollapsed: notebookSidebarCollapsed,
1756
1612
  onSidebarCollapsedChange: setNotebookSidebarCollapsed
1757
1613
  }
1758
- ),
1614
+ ) }),
1759
1615
  isFullscreenMode && /* @__PURE__ */ jsxs(Fragment, { children: [
1760
1616
  /* @__PURE__ */ jsx(
1761
- RhUiAiExperienceIcon,
1617
+ HeaderLogo,
1762
1618
  {
1763
1619
  style: { width: "24px", height: "24px" },
1764
- "aria-label": t("icon.lightspeed.alt"),
1765
- className: classes.headerLogo
1620
+ "aria-label": t("icon.lightspeed.alt")
1766
1621
  }
1767
1622
  ),
1768
- /* @__PURE__ */ jsx(ChatbotHeaderTitle, { className: classes.headerTitle, children: /* @__PURE__ */ jsx(
1623
+ /* @__PURE__ */ jsx(StyledChatbotHeaderTitle, { children: /* @__PURE__ */ jsx(
1769
1624
  Title,
1770
1625
  {
1771
1626
  headingLevel: "h1",
@@ -1792,7 +1647,7 @@ const LightspeedChat = ({
1792
1647
  }
1793
1648
  )
1794
1649
  ] }),
1795
- (isFullscreenMode || shouldShowTabs) && /* @__PURE__ */ jsx("div", { className: classes.headerDivider }),
1650
+ (isFullscreenMode || shouldShowTabs) && /* @__PURE__ */ jsx(HeaderDivider, {}),
1796
1651
  shouldShowTabs && /* @__PURE__ */ jsxs(
1797
1652
  Tabs,
1798
1653
  {
@@ -1802,6 +1657,7 @@ const LightspeedChat = ({
1802
1657
  variant: "standard",
1803
1658
  textColor: "primary",
1804
1659
  sx: (theme) => ({
1660
+ flexShrink: 0,
1805
1661
  backgroundColor: "var(--pf-t--global--background--color--floating--default)",
1806
1662
  borderBottom: "1px solid var(--pf-t--global--border--color--default)",
1807
1663
  minHeight: theme.spacing(6),
@@ -1811,6 +1667,7 @@ const LightspeedChat = ({
1811
1667
  gap: theme.spacing(2)
1812
1668
  },
1813
1669
  '& [role="tab"]': {
1670
+ minWidth: "auto",
1814
1671
  fontWeight: 700,
1815
1672
  textTransform: "none",
1816
1673
  opacity: 1,
@@ -1848,209 +1705,187 @@ const LightspeedChat = ({
1848
1705
  Tab,
1849
1706
  {
1850
1707
  disableRipple: true,
1851
- label: /* @__PURE__ */ jsxs(
1852
- "span",
1708
+ label: /* @__PURE__ */ jsxs(NotebooksTabLabel, { isCompact: !isFullscreenMode, children: [
1709
+ t("tabs.notebooks"),
1710
+ /* @__PURE__ */ jsx(
1711
+ Label,
1712
+ {
1713
+ color: "purple",
1714
+ isCompact: !isFullscreenMode,
1715
+ style: {
1716
+ alignSelf: "center",
1717
+ margin: 0,
1718
+ lineHeight: 1,
1719
+ flexShrink: 0
1720
+ },
1721
+ children: t("tabs.notebooks.devPreview")
1722
+ }
1723
+ )
1724
+ ] }),
1725
+ "aria-label": t("tabs.notebooks")
1726
+ }
1727
+ )
1728
+ ]
1729
+ }
1730
+ ),
1731
+ /* @__PURE__ */ jsxs(ChatMain, { children: [
1732
+ showChatPanel && /* @__PURE__ */ jsx(
1733
+ ConditionalWrapper,
1734
+ {
1735
+ condition: isFullscreenMode,
1736
+ wrapper: (children) => /* @__PURE__ */ jsxs(FullscreenChatLayout, { children: [
1737
+ !isChatHistoryDrawerOpen && /* @__PURE__ */ jsx(
1738
+ CollapsedHistoryStrip,
1739
+ {
1740
+ onExpand: () => setIsChatHistoryDrawerOpen(true),
1741
+ onNewChat,
1742
+ newChatDisabled: newChatCreated
1743
+ }
1744
+ ),
1745
+ children
1746
+ ] }),
1747
+ children: /* @__PURE__ */ jsx(
1748
+ ChatbotConversationHistoryNav,
1749
+ {
1750
+ drawerPanelContentProps: {
1751
+ isResizable: isFullscreenMode,
1752
+ hasNoBorder: !isFullscreenMode,
1753
+ style: drawerPanelStyle
1754
+ },
1755
+ reverseButtonOrder: true,
1756
+ displayMode: ChatbotDisplayMode.embedded,
1757
+ onDrawerToggle: onChatHistoryDrawerToggle,
1758
+ title: "",
1759
+ navTitleIcon: null,
1760
+ isDrawerOpen: isChatHistoryDrawerOpen,
1761
+ drawerCloseButtonProps: {
1762
+ "aria-label": t("aria.closeDrawerPanel")
1763
+ },
1764
+ setIsDrawerOpen: setIsChatHistoryDrawerOpen,
1765
+ activeItemId: viewConversationId,
1766
+ onSelectActiveItem,
1767
+ conversations: filteredConversations,
1768
+ onNewChat,
1769
+ newChatButtonText: t("button.newChat"),
1770
+ newChatButtonProps: {
1771
+ icon: /* @__PURE__ */ jsx(PenIcon, {}),
1772
+ isDisabled: newChatCreated
1773
+ },
1774
+ handleTextInputChange: handleFilter,
1775
+ searchInputPlaceholder: t("chatbox.search.placeholder"),
1776
+ searchInputAriaLabel: t("aria.search.placeholder"),
1777
+ searchInputProps,
1778
+ searchActionEnd: sortDropdown,
1779
+ noResultsState,
1780
+ drawerContent: /* @__PURE__ */ jsxs(
1781
+ ChatFileDropZone,
1853
1782
  {
1854
- style: {
1855
- display: "inline-flex",
1856
- alignItems: "center",
1857
- gap: 8
1858
- },
1783
+ onFileDrop: (e, data) => handleAttach(data, e),
1784
+ displayMode: ChatbotDisplayMode.embedded,
1785
+ infoText: t("chatbox.fileUpload.infoText"),
1786
+ allowedFileTypes: supportedFileTypes,
1787
+ onAttachRejected,
1859
1788
  children: [
1860
- t("tabs.notebooks"),
1861
- /* @__PURE__ */ jsx(
1862
- Label,
1789
+ showAlert && uploadError.message && /* @__PURE__ */ jsx(ErrorContainer, { children: /* @__PURE__ */ jsx(
1790
+ ChatbotAlert,
1863
1791
  {
1864
- color: "purple",
1865
- style: {
1866
- alignSelf: "center",
1867
- margin: 0,
1868
- lineHeight: 1
1869
- },
1870
- children: t("tabs.notebooks.devPreview")
1792
+ component: "h4",
1793
+ title: t("chatbox.fileUpload.failed"),
1794
+ variant: uploadError.type ?? "danger",
1795
+ isInline: true,
1796
+ onClose: () => setUploadError({ message: null }),
1797
+ children: uploadError.message
1871
1798
  }
1872
- )
1799
+ ) }),
1800
+ mainPanelContent
1873
1801
  ]
1874
1802
  }
1875
- ),
1876
- "aria-label": t("tabs.notebooks")
1803
+ )
1877
1804
  }
1878
1805
  )
1879
- ]
1880
- }
1881
- ),
1882
- showChatPanel && /* @__PURE__ */ jsx(
1883
- ConditionalWrapper,
1884
- {
1885
- condition: isFullscreenMode,
1886
- wrapper: (children) => /* @__PURE__ */ jsxs("div", { className: classes.fullscreenChatLayout, children: [
1887
- !isChatHistoryDrawerOpen && /* @__PURE__ */ jsx(
1888
- CollapsedHistoryStrip,
1806
+ }
1807
+ ),
1808
+ showNotebooksPanel && !notebooksPermissionLoading && hasNotebooksAccess && activeNotebook && /* @__PURE__ */ jsx(
1809
+ NotebookView,
1810
+ {
1811
+ sessionId: activeNotebook.session_id,
1812
+ notebookName: activeNotebook.name,
1813
+ documents: notebookDocuments,
1814
+ isDocumentsFetching,
1815
+ metadata: activeNotebook.metadata,
1816
+ topicSummary: conversations.find(
1817
+ (c) => c.conversation_id === activeNotebook.metadata?.conversation_id
1818
+ )?.topic_summary ?? void 0,
1819
+ userName,
1820
+ avatar,
1821
+ profileLoading,
1822
+ topicRestrictionEnabled,
1823
+ onClose: handleCloseNotebook,
1824
+ isCompact: !isFullscreenMode,
1825
+ sidebarCollapsed: notebookSidebarCollapsed,
1826
+ onSidebarCollapsedChange: setNotebookSidebarCollapsed,
1827
+ isUploadModalOpen: notebookUploadModalOpen,
1828
+ onUploadModalOpenChange: setNotebookUploadModalOpen,
1829
+ onUploadsInProgressChange: setNotebookUploadsInProgress
1830
+ }
1831
+ ),
1832
+ showNotebooksPanel && !notebooksPermissionLoading && hasNotebooksAccess && !activeNotebook && /* @__PURE__ */ jsx(
1833
+ "div",
1834
+ {
1835
+ style: {
1836
+ position: "relative",
1837
+ display: "flex",
1838
+ flexDirection: "column",
1839
+ flex: 1,
1840
+ minHeight: 0,
1841
+ overflow: "hidden"
1842
+ },
1843
+ children: /* @__PURE__ */ jsx(
1844
+ NotebooksTab,
1889
1845
  {
1890
- onExpand: () => setIsChatHistoryDrawerOpen(true),
1891
- onNewChat,
1892
- newChatDisabled: newChatCreated
1846
+ notebooks,
1847
+ hasNotebooks,
1848
+ isCompact: !isFullscreenMode,
1849
+ openNotebookMenuId,
1850
+ setOpenNotebookMenuId,
1851
+ onSelectNotebook: (notebook) => {
1852
+ maybeAutoDeleteScratchNotebook();
1853
+ setActiveNotebookId(notebook.session_id);
1854
+ if (isFullscreenMode) {
1855
+ navigate(
1856
+ `${LIGHTSPEED_PATH}/notebooks/${notebook.session_id}`
1857
+ );
1858
+ }
1859
+ },
1860
+ onRename: handleRenameNotebook,
1861
+ onDelete: setDeleteNotebookId,
1862
+ onCreateNotebook: handleCreateNotebook,
1863
+ t
1893
1864
  }
1894
- ),
1895
- children
1896
- ] }),
1897
- children: /* @__PURE__ */ jsx(
1898
- ChatbotConversationHistoryNav,
1899
- {
1900
- drawerPanelContentProps: {
1901
- isResizable: isFullscreenMode,
1902
- hasNoBorder: !isFullscreenMode,
1903
- style: drawerPanelStyle,
1904
- ...!isFullscreenMode && isChatHistoryDrawerOpen && {
1905
- className: classes.compactDrawerPanel
1906
- }
1907
- },
1908
- reverseButtonOrder: true,
1909
- displayMode: ChatbotDisplayMode.embedded,
1910
- onDrawerToggle: onChatHistoryDrawerToggle,
1911
- title: "",
1912
- navTitleIcon: null,
1913
- isDrawerOpen: isChatHistoryDrawerOpen,
1914
- drawerCloseButtonProps: {
1915
- "aria-label": t("aria.closeDrawerPanel")
1916
- },
1917
- setIsDrawerOpen: setIsChatHistoryDrawerOpen,
1918
- activeItemId: viewConversationId,
1919
- onSelectActiveItem,
1920
- conversations: filterConversations(filterValue),
1921
- onNewChat,
1922
- newChatButtonText: t("button.newChat"),
1923
- newChatButtonProps: {
1924
- icon: /* @__PURE__ */ jsx(PenIcon, {}),
1925
- isDisabled: newChatCreated
1926
- },
1927
- handleTextInputChange: handleFilter,
1928
- searchInputPlaceholder: t("chatbox.search.placeholder"),
1929
- searchInputAriaLabel: t("aria.search.placeholder"),
1930
- searchInputProps: {
1931
- value: filterValue,
1932
- onClear: () => {
1933
- setFilterValue("");
1934
- }
1935
- },
1936
- searchActionEnd: sortDropdown,
1937
- noResultsState: filterValue && Object.keys(filterConversations(filterValue)).length === 0 ? {
1938
- bodyText: t("chatbox.emptyState.noResults.body"),
1939
- titleText: t("chatbox.emptyState.noResults.title"),
1940
- icon: SearchIcon
1941
- } : void 0,
1942
- drawerContent: /* @__PURE__ */ jsxs(
1943
- FileDropZone,
1944
- {
1945
- className: classes.drawerFileDropZone,
1946
- onFileDrop: (e, data) => handleAttach(data, e),
1947
- displayMode: ChatbotDisplayMode.embedded,
1948
- infoText: t("chatbox.fileUpload.infoText"),
1949
- allowedFileTypes: supportedFileTypes,
1950
- onAttachRejected,
1951
- children: [
1952
- showAlert && uploadError.message && /* @__PURE__ */ jsx("div", { className: classes.errorContainer, children: /* @__PURE__ */ jsx(
1953
- ChatbotAlert,
1954
- {
1955
- component: "h4",
1956
- title: t("chatbox.fileUpload.failed"),
1957
- variant: uploadError.type ?? "danger",
1958
- isInline: true,
1959
- onClose: () => setUploadError({ message: null }),
1960
- children: uploadError.message
1961
- }
1962
- ) }),
1963
- mainPanelContent
1964
- ]
1965
- }
1966
- )
1967
- }
1968
- )
1969
- }
1970
- ),
1971
- showNotebooksPanel && !notebooksPermissionLoading && hasNotebooksAccess && activeNotebook && /* @__PURE__ */ jsx(
1972
- NotebookView,
1973
- {
1974
- sessionId: activeNotebook.session_id,
1975
- notebookName: activeNotebook.name,
1976
- documents: notebookDocuments,
1977
- isDocumentsFetching,
1978
- metadata: activeNotebook.metadata,
1979
- topicSummary: conversations.find(
1980
- (c) => c.conversation_id === activeNotebook.metadata?.conversation_id
1981
- )?.topic_summary ?? void 0,
1982
- userName,
1983
- avatar,
1984
- profileLoading,
1985
- topicRestrictionEnabled,
1986
- onClose: handleCloseNotebook,
1987
- isCompact: !isFullscreenMode,
1988
- sidebarCollapsed: notebookSidebarCollapsed,
1989
- onSidebarCollapsedChange: setNotebookSidebarCollapsed,
1990
- isUploadModalOpen: notebookUploadModalOpen,
1991
- onUploadModalOpenChange: setNotebookUploadModalOpen,
1992
- onUploadsInProgressChange: setNotebookUploadsInProgress
1993
- }
1994
- ),
1995
- showNotebooksPanel && !notebooksPermissionLoading && hasNotebooksAccess && !activeNotebook && /* @__PURE__ */ jsx(
1996
- "div",
1997
- {
1998
- style: {
1999
- position: "relative",
2000
- display: "flex",
2001
- flexDirection: "column",
2002
- flex: 1,
2003
- minHeight: 0,
2004
- overflow: "hidden"
2005
- },
2006
- children: /* @__PURE__ */ jsx(
2007
- NotebooksTab,
2008
- {
2009
- notebooks,
2010
- hasNotebooks,
2011
- classes: isFullscreenMode ? classes : {
2012
- ...classes,
2013
- notebooksGrid: classes.notebooksGridCompact
2014
- },
2015
- openNotebookMenuId,
2016
- setOpenNotebookMenuId,
2017
- onSelectNotebook: (notebook) => {
2018
- maybeAutoDeleteScratchNotebook();
2019
- setActiveNotebookId(notebook.session_id);
2020
- if (isFullscreenMode) {
2021
- navigate(
2022
- `${LIGHTSPEED_PATH}/notebooks/${notebook.session_id}`
2023
- );
2024
- }
2025
- },
2026
- onRename: handleRenameNotebook,
2027
- onDelete: setDeleteNotebookId,
2028
- onCreateNotebook: handleCreateNotebook,
2029
- t
2030
- }
2031
- )
2032
- }
2033
- ),
2034
- showNotebooksPanel && !notebooksPermissionLoading && !hasNotebooksAccess && /* @__PURE__ */ jsx(
2035
- PermissionRequiredState,
2036
- {
2037
- subject: t("permission.subject.notebooks"),
2038
- permissions: [iaNotebooksPermissionName],
2039
- action: /* @__PURE__ */ jsx(
2040
- Button$1,
2041
- {
2042
- variant: "outlined",
2043
- color: "primary",
2044
- style: { borderRadius: "20px" },
2045
- onClick: () => {
2046
- setActiveTab(0);
2047
- setShellViewTab(0);
2048
- },
2049
- children: t("permission.notebooks.goBack")
2050
- }
2051
- )
2052
- }
2053
- )
1865
+ )
1866
+ }
1867
+ ),
1868
+ showNotebooksPanel && !notebooksPermissionLoading && !hasNotebooksAccess && /* @__PURE__ */ jsx(
1869
+ PermissionRequiredState,
1870
+ {
1871
+ subject: t("permission.subject.notebooks"),
1872
+ permissions: [iaNotebooksPermissionName],
1873
+ action: /* @__PURE__ */ jsx(
1874
+ Button$1,
1875
+ {
1876
+ variant: "outlined",
1877
+ color: "primary",
1878
+ style: { borderRadius: "20px" },
1879
+ onClick: () => {
1880
+ setActiveTab(0);
1881
+ setShellViewTab(0);
1882
+ },
1883
+ children: t("permission.notebooks.goBack")
1884
+ }
1885
+ )
1886
+ }
1887
+ )
1888
+ ] })
2054
1889
  ]
2055
1890
  }
2056
1891
  ),