@red-hat-developer-hub/backstage-plugin-intelligent-assistant 5.0.1 → 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 (93) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/alpha.d.ts +1 -2
  3. package/dist/components/Attachment.esm.js +10 -12
  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/FilePreview.esm.js +3 -2
  8. package/dist/components/FilePreview.esm.js.map +1 -1
  9. package/dist/components/LightSpeedChat.esm.js +580 -745
  10. package/dist/components/LightSpeedChat.esm.js.map +1 -1
  11. package/dist/components/LightspeedChatBox.esm.js +2 -3
  12. package/dist/components/LightspeedChatBox.esm.js.map +1 -1
  13. package/dist/components/LightspeedChatBoxHeader.esm.js +38 -34
  14. package/dist/components/LightspeedChatBoxHeader.esm.js.map +1 -1
  15. package/dist/components/LightspeedChatContainer.esm.js +6 -8
  16. package/dist/components/LightspeedChatContainer.esm.js.map +1 -1
  17. package/dist/components/LightspeedChatModelsState.esm.js +67 -73
  18. package/dist/components/LightspeedChatModelsState.esm.js.map +1 -1
  19. package/dist/components/LightspeedDrawerContext.esm.js.map +1 -1
  20. package/dist/components/LightspeedDrawerProvider.esm.js +13 -16
  21. package/dist/components/LightspeedDrawerProvider.esm.js.map +1 -1
  22. package/dist/components/LightspeedFABContent.esm.js +40 -9
  23. package/dist/components/LightspeedFABContent.esm.js.map +1 -1
  24. package/dist/components/LightspeedPage.esm.js +1 -10
  25. package/dist/components/LightspeedPage.esm.js.map +1 -1
  26. package/dist/components/McpConfigureServerModal.esm.js +79 -86
  27. package/dist/components/McpConfigureServerModal.esm.js.map +1 -1
  28. package/dist/components/McpServersSettings.esm.js +246 -212
  29. package/dist/components/McpServersSettings.esm.js.map +1 -1
  30. package/dist/components/MessageBarModelSelector.esm.js +29 -33
  31. package/dist/components/MessageBarModelSelector.esm.js.map +1 -1
  32. package/dist/components/PermissionRequiredState.esm.js +63 -63
  33. package/dist/components/PermissionRequiredState.esm.js.map +1 -1
  34. package/dist/components/RenameConversationModal.esm.js +38 -31
  35. package/dist/components/RenameConversationModal.esm.js.map +1 -1
  36. package/dist/components/Router.esm.js +4 -13
  37. package/dist/components/Router.esm.js.map +1 -1
  38. package/dist/components/ToastAlertGroup.esm.js +24 -40
  39. package/dist/components/ToastAlertGroup.esm.js.map +1 -1
  40. package/dist/components/ToolCallContent.esm.js +8 -11
  41. package/dist/components/ToolCallContent.esm.js.map +1 -1
  42. package/dist/components/notebooks/AddDocumentModal.esm.js +232 -252
  43. package/dist/components/notebooks/AddDocumentModal.esm.js.map +1 -1
  44. package/dist/components/notebooks/DeleteDocumentModal.esm.js +35 -77
  45. package/dist/components/notebooks/DeleteDocumentModal.esm.js.map +1 -1
  46. package/dist/components/notebooks/DeleteNotebookModal.esm.js +46 -81
  47. package/dist/components/notebooks/DeleteNotebookModal.esm.js.map +1 -1
  48. package/dist/components/notebooks/DocumentSidebar.esm.js +172 -196
  49. package/dist/components/notebooks/DocumentSidebar.esm.js.map +1 -1
  50. package/dist/components/notebooks/FileListItem.esm.js +69 -57
  51. package/dist/components/notebooks/FileListItem.esm.js.map +1 -1
  52. package/dist/components/notebooks/FileTypeIcon.esm.js +17 -27
  53. package/dist/components/notebooks/FileTypeIcon.esm.js.map +1 -1
  54. package/dist/components/notebooks/NotebookCard.esm.js +86 -25
  55. package/dist/components/notebooks/NotebookCard.esm.js.map +1 -1
  56. package/dist/components/notebooks/NotebookView.esm.js +367 -380
  57. package/dist/components/notebooks/NotebookView.esm.js.map +1 -1
  58. package/dist/components/notebooks/NotebooksTab.esm.js +93 -30
  59. package/dist/components/notebooks/NotebooksTab.esm.js.map +1 -1
  60. package/dist/components/notebooks/OverwriteConfirmModal.esm.js +142 -184
  61. package/dist/components/notebooks/OverwriteConfirmModal.esm.js.map +1 -1
  62. package/dist/components/notebooks/UploadResourceScreen.esm.js +58 -50
  63. package/dist/components/notebooks/UploadResourceScreen.esm.js.map +1 -1
  64. package/dist/components/notebooks/notebookDialogStyles.esm.js +33 -37
  65. package/dist/components/notebooks/notebookDialogStyles.esm.js.map +1 -1
  66. package/dist/const.esm.js +15 -2
  67. package/dist/const.esm.js.map +1 -1
  68. package/dist/hooks/useAutoScroll.esm.js +11 -11
  69. package/dist/hooks/useAutoScroll.esm.js.map +1 -1
  70. package/dist/hooks/useBufferedMessages.esm.js +5 -5
  71. package/dist/hooks/useBufferedMessages.esm.js.map +1 -1
  72. package/dist/hooks/useIsMobile.esm.js +3 -3
  73. package/dist/hooks/useIsMobile.esm.js.map +1 -1
  74. package/dist/translations/de.esm.js +1 -2
  75. package/dist/translations/de.esm.js.map +1 -1
  76. package/dist/translations/es.esm.js +1 -2
  77. package/dist/translations/es.esm.js.map +1 -1
  78. package/dist/translations/fr.esm.js +1 -2
  79. package/dist/translations/fr.esm.js.map +1 -1
  80. package/dist/translations/it.esm.js +1 -2
  81. package/dist/translations/it.esm.js.map +1 -1
  82. package/dist/translations/ja.esm.js +1 -2
  83. package/dist/translations/ja.esm.js.map +1 -1
  84. package/dist/translations/ref.esm.js +1 -2
  85. package/dist/translations/ref.esm.js.map +1 -1
  86. package/dist/types.esm.js.map +1 -1
  87. package/dist/utils/fab-anchor-utils.esm.js +41 -0
  88. package/dist/utils/fab-anchor-utils.esm.js.map +1 -0
  89. package/dist/utils/scoped-dialog-utils.esm.js +6 -3
  90. package/dist/utils/scoped-dialog-utils.esm.js.map +1 -1
  91. package/package.json +4 -8
  92. package/dist/utils/generateClassName.esm.js +0 -12
  93. package/dist/utils/generateClassName.esm.js.map +0 -1
@@ -1,6 +1,5 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useState, useEffect } from 'react';
3
- import { TextField } from '@material-ui/core';
4
3
  import CancelOutlinedIcon from '@mui/icons-material/CancelOutlined';
5
4
  import CloseIcon from '@mui/icons-material/Close';
6
5
  import Alert from '@mui/material/Alert';
@@ -11,6 +10,7 @@ import DialogActions from '@mui/material/DialogActions';
11
10
  import DialogContent from '@mui/material/DialogContent';
12
11
  import DialogTitle from '@mui/material/DialogTitle';
13
12
  import IconButton from '@mui/material/IconButton';
13
+ import TextField from '@mui/material/TextField';
14
14
  import Typography from '@mui/material/Typography';
15
15
  import { useConversations } from '../hooks/useConversations.esm.js';
16
16
  import { useRenameConversation } from '../hooks/useRenameConversation.esm.js';
@@ -68,35 +68,42 @@ const RenameConversationModal = ({
68
68
  "aria-describedby": "rename-modal-confirmation",
69
69
  fullWidth: true,
70
70
  children: [
71
- /* @__PURE__ */ jsx(DialogTitle, { sx: { p: "16px 20px", fontStyle: "inherit" }, children: /* @__PURE__ */ jsxs(
72
- Box,
71
+ /* @__PURE__ */ jsx(
72
+ DialogTitle,
73
73
  {
74
- sx: {
75
- display: "flex",
76
- alignItems: "center",
77
- gap: 1
78
- },
79
- children: [
80
- /* @__PURE__ */ jsx(Typography, { component: "span", sx: { fontWeight: "bold" }, children: t("conversation.rename.confirm.title") }),
81
- /* @__PURE__ */ jsx(
82
- IconButton,
83
- {
84
- "aria-label": "close",
85
- onClick: onClose,
86
- title: t("common.close"),
87
- size: "large",
88
- sx: {
89
- position: "absolute",
90
- right: 1,
91
- top: 1,
92
- color: "text.primary"
93
- },
94
- children: /* @__PURE__ */ jsx(CloseIcon, {})
95
- }
96
- )
97
- ]
74
+ id: "rename-modal",
75
+ sx: { p: "16px 20px", fontStyle: "inherit" },
76
+ children: /* @__PURE__ */ jsxs(
77
+ Box,
78
+ {
79
+ sx: {
80
+ display: "flex",
81
+ alignItems: "center",
82
+ gap: 1
83
+ },
84
+ children: [
85
+ /* @__PURE__ */ jsx(Typography, { component: "span", sx: { fontWeight: "bold" }, children: t("conversation.rename.confirm.title") }),
86
+ /* @__PURE__ */ jsx(
87
+ IconButton,
88
+ {
89
+ "aria-label": "close",
90
+ onClick: onClose,
91
+ title: t("common.close"),
92
+ size: "large",
93
+ sx: {
94
+ position: "absolute",
95
+ right: 1,
96
+ top: 1,
97
+ color: "text.primary"
98
+ },
99
+ children: /* @__PURE__ */ jsx(CloseIcon, {})
100
+ }
101
+ )
102
+ ]
103
+ }
104
+ )
98
105
  }
99
- ) }),
106
+ ),
100
107
  /* @__PURE__ */ jsx(DialogContent, { id: "rename-modal-body-input", children: /* @__PURE__ */ jsx(
101
108
  TextField,
102
109
  {
@@ -105,7 +112,7 @@ const RenameConversationModal = ({
105
112
  onChange: handleChatNameChange,
106
113
  fullWidth: true,
107
114
  value: chatName,
108
- style: { marginTop: "10px" },
115
+ sx: { mt: "10px" },
109
116
  variant: "outlined",
110
117
  InputProps: {
111
118
  autoFocus: true,
@@ -121,8 +128,8 @@ const RenameConversationModal = ({
121
128
  }
122
129
  }
123
130
  ) }),
124
- isError && /* @__PURE__ */ jsx(Box, { maxWidth: "650px", marginLeft: "20px", marginRight: "20px", children: /* @__PURE__ */ jsx(Alert, { severity: "error", children: String(error) }) }),
125
- /* @__PURE__ */ jsxs(DialogActions, { style: { justifyContent: "left", padding: "20px" }, children: [
131
+ isError && /* @__PURE__ */ jsx(Box, { sx: { maxWidth: "650px", mx: "20px" }, children: /* @__PURE__ */ jsx(Alert, { severity: "error", children: String(error) }) }),
132
+ /* @__PURE__ */ jsxs(DialogActions, { sx: { justifyContent: "left", p: "20px" }, children: [
126
133
  /* @__PURE__ */ jsx(
127
134
  Button,
128
135
  {
@@ -1 +1 @@
1
- {"version":3,"file":"RenameConversationModal.esm.js","sources":["../../src/components/RenameConversationModal.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 { useEffect, useState } from 'react';\n\nimport { TextField } from '@material-ui/core';\nimport CancelOutlinedIcon from '@mui/icons-material/CancelOutlined';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Alert from '@mui/material/Alert';\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport IconButton from '@mui/material/IconButton';\nimport Typography from '@mui/material/Typography';\n\nimport { useConversations } from '../hooks/useConversations';\nimport { useRenameConversation } from '../hooks/useRenameConversation';\nimport { useTranslation } from '../hooks/useTranslation';\n\nexport const RenameConversationModal = ({\n isOpen,\n onClose,\n conversationId,\n}: {\n isOpen: boolean;\n onClose: () => void;\n conversationId: string;\n}) => {\n const { t } = useTranslation();\n const {\n mutateAsync: renameConversation,\n isError,\n error,\n } = useRenameConversation();\n const { data: conversations } = useConversations();\n const [chatName, setChatName] = useState<string>('');\n const [originalChatName, setOriginalChatName] = useState<string>('');\n\n useEffect(() => {\n if (isOpen && conversations) {\n const conversation = conversations.find(\n c => c.conversation_id === conversationId,\n );\n if (conversation) {\n setChatName(conversation.topic_summary ?? '');\n setOriginalChatName(conversation.topic_summary ?? '');\n } else {\n setChatName('');\n setOriginalChatName('');\n }\n }\n }, [isOpen, conversationId, conversations]);\n\n const handleChatNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setChatName(event.target.value);\n };\n\n const handleRename = async () => {\n try {\n await renameConversation({\n conversation_id: conversationId,\n newName: chatName,\n invalidateCache: false,\n });\n onClose();\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(e);\n }\n };\n\n return (\n <Dialog\n open={isOpen}\n onClose={onClose}\n aria-labelledby=\"rename-modal\"\n aria-describedby=\"rename-modal-confirmation\"\n fullWidth\n >\n <DialogTitle sx={{ p: '16px 20px', fontStyle: 'inherit' }}>\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n gap: 1,\n }}\n >\n <Typography component=\"span\" sx={{ fontWeight: 'bold' }}>\n {t('conversation.rename.confirm.title')}\n </Typography>\n\n <IconButton\n aria-label=\"close\"\n onClick={onClose}\n title={t('common.close')}\n size=\"large\"\n sx={{\n position: 'absolute',\n right: 1,\n top: 1,\n color: 'text.primary',\n }}\n >\n <CloseIcon />\n </IconButton>\n </Box>\n </DialogTitle>\n <DialogContent id=\"rename-modal-body-input\">\n <TextField\n id=\"outlined-chat-name-input\"\n label={t('conversation.rename.placeholder')}\n onChange={handleChatNameChange}\n fullWidth\n value={chatName}\n style={{ marginTop: '10px' }}\n variant=\"outlined\"\n InputProps={{\n autoFocus: true,\n endAdornment: (\n <IconButton\n aria-label=\"clear-input\"\n onClick={() => setChatName('')}\n edge=\"end\"\n >\n <CancelOutlinedIcon />\n </IconButton>\n ),\n }}\n />\n </DialogContent>\n {isError && (\n <Box maxWidth=\"650px\" marginLeft=\"20px\" marginRight=\"20px\">\n <Alert severity=\"error\">{String(error)}</Alert>\n </Box>\n )}\n <DialogActions style={{ justifyContent: 'left', padding: '20px' }}>\n <Button\n variant=\"contained\"\n sx={{\n textTransform: 'none',\n }}\n disabled={\n chatName.trim() === '' ||\n chatName.trim() === originalChatName.trim()\n }\n onClick={handleRename}\n >\n {t('conversation.rename.confirm.action')}\n </Button>\n <Button\n key=\"cancel\"\n variant=\"outlined\"\n sx={{\n textTransform: 'none',\n }}\n onClick={onClose}\n >\n {t('common.cancel')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAmCO,MAAM,0BAA0B,CAAC;AAAA,EACtC,MAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAC7B,EAAA,MAAM;AAAA,IACJ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,YAAA;AAAA,cAEC,OAAA,EAAQ,UAAA;AAAA,cACR,EAAA,EAAI;AAAA,gBACF,aAAA,EAAe;AAAA,eACjB;AAAA,cACA,OAAA,EAAS,OAAA;AAAA,cAER,YAAE,eAAe;AAAA,aAAA;AAAA,YAPd;AAAA;AAQN,SAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"RenameConversationModal.esm.js","sources":["../../src/components/RenameConversationModal.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 { useEffect, useState } from 'react';\n\nimport CancelOutlinedIcon from '@mui/icons-material/CancelOutlined';\nimport CloseIcon from '@mui/icons-material/Close';\nimport Alert from '@mui/material/Alert';\nimport Box from '@mui/material/Box';\nimport Button from '@mui/material/Button';\nimport Dialog from '@mui/material/Dialog';\nimport DialogActions from '@mui/material/DialogActions';\nimport DialogContent from '@mui/material/DialogContent';\nimport DialogTitle from '@mui/material/DialogTitle';\nimport IconButton from '@mui/material/IconButton';\nimport TextField from '@mui/material/TextField';\nimport Typography from '@mui/material/Typography';\n\nimport { useConversations } from '../hooks/useConversations';\nimport { useRenameConversation } from '../hooks/useRenameConversation';\nimport { useTranslation } from '../hooks/useTranslation';\n\nexport const RenameConversationModal = ({\n isOpen,\n onClose,\n conversationId,\n}: {\n isOpen: boolean;\n onClose: () => void;\n conversationId: string;\n}) => {\n const { t } = useTranslation();\n const {\n mutateAsync: renameConversation,\n isError,\n error,\n } = useRenameConversation();\n const { data: conversations } = useConversations();\n const [chatName, setChatName] = useState<string>('');\n const [originalChatName, setOriginalChatName] = useState<string>('');\n\n useEffect(() => {\n if (isOpen && conversations) {\n const conversation = conversations.find(\n c => c.conversation_id === conversationId,\n );\n if (conversation) {\n setChatName(conversation.topic_summary ?? '');\n setOriginalChatName(conversation.topic_summary ?? '');\n } else {\n setChatName('');\n setOriginalChatName('');\n }\n }\n }, [isOpen, conversationId, conversations]);\n\n const handleChatNameChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setChatName(event.target.value);\n };\n\n const handleRename = async () => {\n try {\n await renameConversation({\n conversation_id: conversationId,\n newName: chatName,\n invalidateCache: false,\n });\n onClose();\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(e);\n }\n };\n\n return (\n <Dialog\n open={isOpen}\n onClose={onClose}\n aria-labelledby=\"rename-modal\"\n aria-describedby=\"rename-modal-confirmation\"\n fullWidth\n >\n <DialogTitle\n id=\"rename-modal\"\n sx={{ p: '16px 20px', fontStyle: 'inherit' }}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n gap: 1,\n }}\n >\n <Typography component=\"span\" sx={{ fontWeight: 'bold' }}>\n {t('conversation.rename.confirm.title')}\n </Typography>\n\n <IconButton\n aria-label=\"close\"\n onClick={onClose}\n title={t('common.close')}\n size=\"large\"\n sx={{\n position: 'absolute',\n right: 1,\n top: 1,\n color: 'text.primary',\n }}\n >\n <CloseIcon />\n </IconButton>\n </Box>\n </DialogTitle>\n <DialogContent id=\"rename-modal-body-input\">\n <TextField\n id=\"outlined-chat-name-input\"\n label={t('conversation.rename.placeholder')}\n onChange={handleChatNameChange}\n fullWidth\n value={chatName}\n sx={{ mt: '10px' }}\n variant=\"outlined\"\n InputProps={{\n autoFocus: true,\n endAdornment: (\n <IconButton\n aria-label=\"clear-input\"\n onClick={() => setChatName('')}\n edge=\"end\"\n >\n <CancelOutlinedIcon />\n </IconButton>\n ),\n }}\n />\n </DialogContent>\n {isError && (\n <Box sx={{ maxWidth: '650px', mx: '20px' }}>\n <Alert severity=\"error\">{String(error)}</Alert>\n </Box>\n )}\n <DialogActions sx={{ justifyContent: 'left', p: '20px' }}>\n <Button\n variant=\"contained\"\n sx={{\n textTransform: 'none',\n }}\n disabled={\n chatName.trim() === '' ||\n chatName.trim() === originalChatName.trim()\n }\n onClick={handleRename}\n >\n {t('conversation.rename.confirm.action')}\n </Button>\n <Button\n key=\"cancel\"\n variant=\"outlined\"\n sx={{\n textTransform: 'none',\n }}\n onClick={onClose}\n >\n {t('common.cancel')}\n </Button>\n </DialogActions>\n </Dialog>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAmCO,MAAM,0BAA0B,CAAC;AAAA,EACtC,MAAA;AAAA,EACA,OAAA;AAAA,EACA;AACF,CAAA,KAIM;AACJ,EAAA,MAAM,EAAE,CAAA,EAAE,GAAI,cAAA,EAAe;AAC7B,EAAA,MAAM;AAAA,IACJ,WAAA,EAAa,kBAAA;AAAA,IACb,OAAA;AAAA,IACA;AAAA,MACE,qBAAA,EAAsB;AAC1B,EAAA,MAAM,EAAE,IAAA,EAAM,aAAA,EAAc,GAAI,gBAAA,EAAiB;AACjD,EAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAiB,EAAE,CAAA;AACnD,EAAA,MAAM,CAAC,gBAAA,EAAkB,mBAAmB,CAAA,GAAI,SAAiB,EAAE,CAAA;AAEnE,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,UAAU,aAAA,EAAe;AAC3B,MAAA,MAAM,eAAe,aAAA,CAAc,IAAA;AAAA,QACjC,CAAA,CAAA,KAAK,EAAE,eAAA,KAAoB;AAAA,OAC7B;AACA,MAAA,IAAI,YAAA,EAAc;AAChB,QAAA,WAAA,CAAY,YAAA,CAAa,iBAAiB,EAAE,CAAA;AAC5C,QAAA,mBAAA,CAAoB,YAAA,CAAa,iBAAiB,EAAE,CAAA;AAAA,MACtD,CAAA,MAAO;AACL,QAAA,WAAA,CAAY,EAAE,CAAA;AACd,QAAA,mBAAA,CAA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AS,EAAA,EAAI,MAAA,EAAO,EACvC,8BAAC,KAAA,EAAA,EAAM,QAAA,EAAS,SAAS,QAAA,EAAA,MAAA,CAAO,KAAK,GAAE,CAAA,EACzC,CAAA;AAAA,wBAEF,IAAA,CAAC,iBAAc,EAAA,EAAI,EAAE,gBAAgB,MAAA,EAAQ,CAAA,EAAG,QAAO,EACrD,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,OAAA,EAAQ,WAAA;AAAA,cACR,EAAA,EAAI;AAAA,gBACF,aAAA,EAAe;AAAA,eACjB;AAAA,cACA,QAAA,EACE,SAAS,IAAA,EAAK,KAAM,MACpB,QAAA,CAAS,IAAA,EAAK,KAAM,gBAAA,CAAiB,IAAA,EAAK;AAAA,cAE5C,OAAA,EAAS,YAAA;AAAA,cAER,YAAE,oCAAoC;AAAA;AAAA,WACzC;AAAA,0BACA,GAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cAEC,OAAA,EAAQ,UAAA;AAAA,cACR,EAAA,EAAI;AAAA,gBACF,aAAA,EAAe;AAAA,eACjB;AAAA,cACA,OAAA,EAAS,OAAA;AAAA,cAER,YAAE,eAAe;AAAA,aAAA;AAAA,YAPd;AAAA;AAQN,SAAA,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
@@ -1,15 +1,12 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { Routes, Route } from 'react-router-dom';
3
3
  import { useApi, configApiRef } from '@backstage/core-plugin-api';
4
- import { StylesProvider as StylesProvider$1 } from '@material-ui/core/styles';
5
- import { StylesProvider } from '@mui/styles';
6
- import { generateClassName, generateClassNameV4 } from '../utils/generateClassName.esm.js';
7
4
  import { LightspeedPage } from './LightspeedPage.esm.js';
8
5
 
9
6
  const Router = () => {
10
7
  const configApi = useApi(configApiRef);
11
8
  const notebooksEnabled = configApi.getOptionalBoolean("intelligent-assistant.notebooks.enabled") ?? false;
12
- return /* @__PURE__ */ jsx(StylesProvider, { generateClassName, children: /* @__PURE__ */ jsx(StylesProvider$1, { generateClassName: generateClassNameV4, children: /* @__PURE__ */ jsxs(Routes, { children: [
9
+ return /* @__PURE__ */ jsxs(Routes, { children: [
13
10
  /* @__PURE__ */ jsx(Route, { path: "/", element: /* @__PURE__ */ jsx(LightspeedPage, {}) }),
14
11
  /* @__PURE__ */ jsx(
15
12
  Route,
@@ -20,15 +17,9 @@ const Router = () => {
20
17
  ),
21
18
  notebooksEnabled && /* @__PURE__ */ jsxs(Fragment, { children: [
22
19
  /* @__PURE__ */ jsx(Route, { path: "/notebooks", element: /* @__PURE__ */ jsx(LightspeedPage, {}) }),
23
- /* @__PURE__ */ jsx(
24
- Route,
25
- {
26
- path: "/notebooks/:notebookId",
27
- element: /* @__PURE__ */ jsx(LightspeedPage, {})
28
- }
29
- )
20
+ /* @__PURE__ */ jsx(Route, { path: "/notebooks/:notebookId", element: /* @__PURE__ */ jsx(LightspeedPage, {}) })
30
21
  ] })
31
- ] }) }) });
22
+ ] });
32
23
  };
33
24
 
34
25
  export { Router };
@@ -1 +1 @@
1
- {"version":3,"file":"Router.esm.js","sources":["../../src/components/Router.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 { Route, Routes } from 'react-router-dom';\n\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { StylesProvider as StylesProviderV4 } from '@material-ui/core/styles';\nimport { StylesProvider } from '@mui/styles';\n\nimport {\n generateClassName,\n generateClassNameV4,\n} from '../utils/generateClassName';\nimport { LightspeedPage } from './LightspeedPage';\n\n/**\n * @public\n */\nexport const Router = () => {\n const configApi = useApi(configApiRef);\n const notebooksEnabled =\n configApi.getOptionalBoolean('intelligent-assistant.notebooks.enabled') ??\n false;\n\n return (\n <StylesProvider generateClassName={generateClassName}>\n <StylesProviderV4 generateClassName={generateClassNameV4}>\n <Routes>\n <Route path=\"/\" element={<LightspeedPage />} />\n <Route\n path=\"/conversation/:conversationId\"\n element={<LightspeedPage />}\n />\n {notebooksEnabled && (\n <>\n <Route path=\"/notebooks\" element={<LightspeedPage />} />\n <Route\n path=\"/notebooks/:notebookId\"\n element={<LightspeedPage />}\n />\n </>\n )}\n </Routes>\n </StylesProviderV4>\n </StylesProvider>\n );\n};\n"],"names":["StylesProviderV4"],"mappings":";;;;;;;;AAgCO,MAAM,SAAS,MAAM;AAC1B,EAAA,MAAM,SAAA,GAAY,OAAO,YAAY,CAAA;AACrC,EAAA,MAAM,gBAAA,GACJ,SAAA,CAAU,kBAAA,CAAmB,yCAAyC,CAAA,IACtE,KAAA;AAEF,EAAA,uBACE,GAAA,CAAC,kBAAe,iBAAA,EACd,QAAA,kBAAA,GAAA,CAACA,oBAAiB,iBAAA,EAAmB,mBAAA,EACnC,+BAAC,MAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,SAAM,IAAA,EAAK,GAAA,EAAI,OAAA,kBAAS,GAAA,CAAC,kBAAe,CAAA,EAAI,CAAA;AAAA,oBAC7C,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,+BAAA;AAAA,QACL,OAAA,sBAAU,cAAA,EAAA,EAAe;AAAA;AAAA,KAC3B;AAAA,IACC,oCACC,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,SAAM,IAAA,EAAK,YAAA,EAAa,OAAA,kBAAS,GAAA,CAAC,kBAAe,CAAA,EAAI,CAAA;AAAA,sBACtD,GAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAK,wBAAA;AAAA,UACL,OAAA,sBAAU,cAAA,EAAA,EAAe;AAAA;AAAA;AAC3B,KAAA,EACF;AAAA,GAAA,EAEJ,GACF,CAAA,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Router.esm.js","sources":["../../src/components/Router.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 { Route, Routes } from 'react-router-dom';\n\nimport { configApiRef, useApi } from '@backstage/core-plugin-api';\n\nimport { LightspeedPage } from './LightspeedPage';\n\n/**\n * @public\n */\nexport const Router = () => {\n const configApi = useApi(configApiRef);\n const notebooksEnabled =\n configApi.getOptionalBoolean('intelligent-assistant.notebooks.enabled') ??\n false;\n\n return (\n <Routes>\n <Route path=\"/\" element={<LightspeedPage />} />\n <Route\n path=\"/conversation/:conversationId\"\n element={<LightspeedPage />}\n />\n {notebooksEnabled && (\n <>\n <Route path=\"/notebooks\" element={<LightspeedPage />} />\n <Route path=\"/notebooks/:notebookId\" element={<LightspeedPage />} />\n </>\n )}\n </Routes>\n );\n};\n"],"names":[],"mappings":";;;;;AAyBO,MAAM,SAAS,MAAM;AAC1B,EAAA,MAAM,SAAA,GAAY,OAAO,YAAY,CAAA;AACrC,EAAA,MAAM,gBAAA,GACJ,SAAA,CAAU,kBAAA,CAAmB,yCAAyC,CAAA,IACtE,KAAA;AAEF,EAAA,4BACG,MAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,SAAM,IAAA,EAAK,GAAA,EAAI,OAAA,kBAAS,GAAA,CAAC,kBAAe,CAAA,EAAI,CAAA;AAAA,oBAC7C,GAAA;AAAA,MAAC,KAAA;AAAA,MAAA;AAAA,QACC,IAAA,EAAK,+BAAA;AAAA,QACL,OAAA,sBAAU,cAAA,EAAA,EAAe;AAAA;AAAA,KAC3B;AAAA,IACC,oCACC,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,SAAM,IAAA,EAAK,YAAA,EAAa,OAAA,kBAAS,GAAA,CAAC,kBAAe,CAAA,EAAI,CAAA;AAAA,0BACrD,KAAA,EAAA,EAAM,IAAA,EAAK,0BAAyB,OAAA,kBAAS,GAAA,CAAC,kBAAe,CAAA,EAAI;AAAA,KAAA,EACpE;AAAA,GAAA,EAEJ,CAAA;AAEJ;;;;"}
@@ -1,55 +1,39 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { makeStyles } from '@material-ui/core';
2
+ import { styled } from '@mui/material/styles';
3
3
  import { AlertGroup, Alert, AlertVariant, AlertActionCloseButton } from '@patternfly/react-core';
4
4
 
5
- const useStyles = makeStyles((theme) => ({
6
- toastAlertGroup: {
7
- "--pf-v6-c-alert-group--m-toast--InsetInlineEnd": `${theme.spacing(2.5)}px`,
8
- "--pf-v6-c-alert-group--m-toast--InsetBlockStart": `${theme.spacing(2.5)}px`,
9
- "--pf-v6-c-alert-group--m-toast--MaxWidth": "350px",
10
- "--pf-v6-c-alert-group--m-toast--ZIndex": "9999"
11
- },
12
- toastAlert: {
13
- maxWidth: "350px",
14
- "& .pf-v6-c-alert__title": {
15
- margin: 0
16
- }
17
- }
5
+ const ToastAlerts = styled(AlertGroup)(() => ({
6
+ "--pf-v6-c-alert-group--m-toast--MaxWidth": "350px !important"
18
7
  }));
8
+ const ToastAlert = styled(Alert)({
9
+ maxWidth: "350px",
10
+ "& .pf-v6-c-alert__title": {
11
+ margin: 0
12
+ }
13
+ });
19
14
  const ToastAlertGroup = ({
20
15
  alerts,
21
16
  onRemoveAlert
22
17
  }) => {
23
- const classes = useStyles();
24
18
  if (alerts.length === 0) return null;
25
- return /* @__PURE__ */ jsx(
26
- AlertGroup,
19
+ return /* @__PURE__ */ jsx(ToastAlerts, { hasAnimations: true, isToast: true, isLiveRegion: true, children: alerts.map(({ key, title, variant }) => /* @__PURE__ */ jsx(
20
+ ToastAlert,
27
21
  {
28
- hasAnimations: true,
29
- isToast: true,
30
- isLiveRegion: true,
31
- className: classes.toastAlertGroup,
32
- children: alerts.map(({ key, title, variant }) => /* @__PURE__ */ jsx(
33
- Alert,
22
+ variant: AlertVariant[variant ?? "success"],
23
+ title,
24
+ timeout: 2e3,
25
+ onTimeout: () => onRemoveAlert(key),
26
+ actionClose: /* @__PURE__ */ jsx(
27
+ AlertActionCloseButton,
34
28
  {
35
- variant: AlertVariant[variant ?? "success"],
36
29
  title,
37
- className: classes.toastAlert,
38
- timeout: 2e3,
39
- onTimeout: () => onRemoveAlert(key),
40
- actionClose: /* @__PURE__ */ jsx(
41
- AlertActionCloseButton,
42
- {
43
- title,
44
- variantLabel: `${variant ?? "success"} alert`,
45
- onClose: () => onRemoveAlert(key)
46
- }
47
- )
48
- },
49
- key
50
- ))
51
- }
52
- );
30
+ variantLabel: `${variant ?? "success"} alert`,
31
+ onClose: () => onRemoveAlert(key)
32
+ }
33
+ )
34
+ },
35
+ key
36
+ )) });
53
37
  };
54
38
 
55
39
  export { ToastAlertGroup };
@@ -1 +1 @@
1
- {"version":3,"file":"ToastAlertGroup.esm.js","sources":["../../src/components/ToastAlertGroup.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 React from 'react';\n\nimport { makeStyles } from '@material-ui/core';\nimport {\n Alert,\n AlertActionCloseButton,\n AlertGroup,\n AlertVariant,\n type AlertProps,\n} from '@patternfly/react-core';\n\nconst useStyles = makeStyles(theme => ({\n toastAlertGroup: {\n '--pf-v6-c-alert-group--m-toast--InsetInlineEnd': `${theme.spacing(2.5)}px`,\n '--pf-v6-c-alert-group--m-toast--InsetBlockStart': `${theme.spacing(2.5)}px`,\n '--pf-v6-c-alert-group--m-toast--MaxWidth': '350px',\n '--pf-v6-c-alert-group--m-toast--ZIndex': '9999',\n },\n toastAlert: {\n maxWidth: '350px',\n '& .pf-v6-c-alert__title': {\n margin: 0,\n },\n },\n}));\n\ntype ToastAlertGroupProps = {\n alerts: Partial<AlertProps>[];\n onRemoveAlert: (key: React.Key) => void;\n};\n\nexport const ToastAlertGroup = ({\n alerts,\n onRemoveAlert,\n}: ToastAlertGroupProps) => {\n const classes = useStyles();\n\n if (alerts.length === 0) return null;\n\n return (\n <AlertGroup\n hasAnimations\n isToast\n isLiveRegion\n className={classes.toastAlertGroup}\n >\n {alerts.map(({ key, title, variant }) => (\n <Alert\n key={key}\n variant={AlertVariant[variant ?? 'success']}\n title={title}\n className={classes.toastAlert}\n timeout={2000}\n onTimeout={() => onRemoveAlert(key as React.Key)}\n actionClose={\n <AlertActionCloseButton\n title={title as string}\n variantLabel={`${variant ?? 'success'} alert`}\n onClose={() => onRemoveAlert(key as React.Key)}\n />\n }\n />\n ))}\n </AlertGroup>\n );\n};\n"],"names":[],"mappings":";;;;AA2BA,MAAM,SAAA,GAAY,WAAW,CAAA,KAAA,MAAU;AAAA,EACrC,eAAA,EAAiB;AAAA,IACf,gDAAA,EAAkD,CAAA,EAAG,KAAA,CAAM,OAAA,CAAQ,GAAG,CAAC,CAAA,EAAA,CAAA;AAAA,IACvE,iDAAA,EAAmD,CAAA,EAAG,KAAA,CAAM,O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lertGroup.esm.js","sources":["../../src/components/ToastAlertGroup.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 { styled } from '@mui/material/styles';\nimport {\n Alert,\n AlertActionCloseButton,\n AlertGroup,\n AlertVariant,\n type AlertProps,\n} from '@patternfly/react-core';\n\nconst ToastAlerts = styled(AlertGroup)(() => ({\n '--pf-v6-c-alert-group--m-toast--MaxWidth': '350px !important',\n}));\n\nconst ToastAlert = styled(Alert)({\n maxWidth: '350px',\n '& .pf-v6-c-alert__title': {\n margin: 0,\n },\n});\n\ntype ToastAlertGroupProps = {\n alerts: Partial<AlertProps>[];\n onRemoveAlert: (key: React.Key) => void;\n};\n\nexport const ToastAlertGroup = ({\n alerts,\n onRemoveAlert,\n}: ToastAlertGroupProps) => {\n if (alerts.length === 0) return null;\n\n return (\n <ToastAlerts hasAnimations isToast isLiveRegion>\n {alerts.map(({ key, title, variant }) => (\n <ToastAlert\n key={key}\n variant={AlertVariant[variant ?? 'success']}\n title={title}\n timeout={2000}\n onTimeout={() => onRemoveAlert(key as React.Key)}\n actionClose={\n <AlertActionCloseButton\n title={title as string}\n variantLabel={`${variant ?? 'success'} alert`}\n onClose={() => onRemoveAlert(key as React.Key)}\n />\n }\n />\n ))}\n </ToastAlerts>\n );\n};\n"],"names":[],"mappings":";;;;AAyBA,MAAM,WAAA,GAAc,MAAA,CAAO,UAAU,CAAA,CAAE,OAAO;AAAA,EAC5C,0CAAA,EAA4C;AAC9C,CAAA,CAAE,CAAA;AAEF,MAAM,UAAA,GAAa,MAAA,CAAO,KAAK,CAAA,CAAE;AAAA,EAC/B,QAAA,EAAU,OAAA;AAAA,EACV,yBAAA,EAA2B;AAAA,IACzB,MAAA,EAAQ;AAAA;AAEZ,CAAC,CAAA;AAOM,MAAM,kBAAkB,CAAC;AAAA,EAC9B,MAAA;AAAA,EACA;AACF,CAAA,KAA4B;AAC1B,EAAA,IAAI,MAAA,CAAO,MAAA,KAAW,CAAA,EAAG,OAAO,IAAA;AAEhC,EAAA,uBACE,GAAA,CAAC,WAAA,EAAA,EAAY,aAAA,EAAa,IAAA,EAAC,SAAO,IAAA,EAAC,YAAA,EAAY,IAAA,EAC5C,QAAA,EAAA,MAAA,CAAO,IAAI,CAAC,EAAE,GAAA,EAAK,KAAA,EAAO,SAAQ,qBACjC,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MAEC,OAAA,EAAS,YAAA,CAAa,OAAA,IAAW,SAAS,CAAA;AAAA,MAC1C,KAAA;AAAA,MACA,OAAA,EAAS,GAAA;AAAA,MACT,SAAA,EAAW,MAAM,aAAA,CAAc,GAAgB,CAAA;AAAA,MAC/C,WAAA,kBACE,GAAA;AAAA,QAAC,sBAAA;AAAA,QAAA;AAAA,UACC,KAAA;AAAA,UACA,YAAA,EAAc,CAAA,EAAG,OAAA,IAAW,SAAS,CAAA,MAAA,CAAA;AAAA,UACrC,OAAA,EAAS,MAAM,aAAA,CAAc,GAAgB;AAAA;AAAA;AAC/C,KAAA;AAAA,IAVG;AAAA,GAaR,CAAA,EACH,CAAA;AAEJ;;;;"}
@@ -1,24 +1,21 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { makeStyles } from '@material-ui/core';
2
+ import { styled } from '@mui/material/styles';
3
3
  import { Message } from '@patternfly/chatbot';
4
4
  import { Flex, FlexItem, Content, ContentVariants, DescriptionList, DescriptionListGroup, DescriptionListTerm, DescriptionListDescription, Label } from '@patternfly/react-core';
5
5
  import { WrenchIcon } from '@patternfly/react-icons';
6
6
  import { useTranslation } from '../hooks/useTranslation.esm.js';
7
7
  import { formatToolResponseForMarkdown } from '../utils/formatToolResponseForMarkdown.esm.js';
8
8
 
9
- const useStyles = makeStyles(() => ({
10
- codeBlock: {
11
- "& .pf-chatbot__message-code-block": {
12
- border: "1px solid var(--pf-t--global--border--color--default)",
13
- borderRadius: "var(--pf-t--global--border--radius--small)"
14
- }
9
+ const CodeBlock = styled("div")({
10
+ "& .pf-chatbot__message-code-block": {
11
+ border: "1px solid var(--pf-t--global--border--color--default)",
12
+ borderRadius: "var(--pf-t--global--border--radius--small)"
15
13
  }
16
- }));
14
+ });
17
15
  const ToolCallContent = ({
18
16
  toolCall,
19
17
  role = "bot"
20
18
  }) => {
21
- const classes = useStyles();
22
19
  const { t } = useTranslation();
23
20
  const formatExecutionTime = (seconds) => {
24
21
  if (seconds === void 0) return "";
@@ -169,7 +166,7 @@ const ToolCallContent = ({
169
166
  {
170
167
  direction: { default: "column" },
171
168
  spaceItems: { default: "spaceItemsXs" },
172
- children: /* @__PURE__ */ jsx(FlexItem, { className: classes.codeBlock, children: /* @__PURE__ */ jsx(
169
+ children: /* @__PURE__ */ jsx(FlexItem, { children: /* @__PURE__ */ jsx(CodeBlock, { children: /* @__PURE__ */ jsx(
173
170
  Message,
174
171
  {
175
172
  content: formatToolResponseForMarkdown(
@@ -183,7 +180,7 @@ const ToolCallContent = ({
183
180
  }
184
181
  }
185
182
  }
186
- ) })
183
+ ) }) })
187
184
  }
188
185
  )
189
186
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ToolCallContent.esm.js","sources":["../../src/components/ToolCallContent.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 { Message } from '@patternfly/chatbot';\nimport {\n Content,\n ContentVariants,\n DescriptionList,\n DescriptionListDescription,\n DescriptionListGroup,\n DescriptionListTerm,\n Flex,\n FlexItem,\n Label,\n} from '@patternfly/react-core';\nimport { WrenchIcon } from '@patternfly/react-icons';\n\nimport { useTranslation } from '../hooks/useTranslation';\nimport { ToolCall } from '../types';\nimport { formatToolResponseForMarkdown } from '../utils/formatToolResponseForMarkdown';\n\ninterface ToolCallContentProps {\n toolCall: ToolCall;\n role?: 'user' | 'bot';\n}\n\nconst useStyles = makeStyles(() => ({\n codeBlock: {\n '& .pf-chatbot__message-code-block': {\n border: '1px solid var(--pf-t--global--border--color--default)',\n borderRadius: 'var(--pf-t--global--border--radius--small)',\n },\n },\n}));\n\n/**\n * Lightweight component for rendering tool call expandable content.\n * Used inside PatternFly's ToolCall component's expandableContent prop.\n */\nexport const ToolCallContent = ({\n toolCall,\n role = 'bot',\n}: ToolCallContentProps) => {\n const classes = useStyles();\n const { t } = useTranslation();\n\n const formatExecutionTime = (seconds?: number): string => {\n if (seconds === undefined) return '';\n if (seconds < 1) return `${Math.round(seconds * 1000)}ms`;\n return `${seconds.toFixed(2)}s`;\n };\n\n const getParameterKeys = (): string[] => {\n if (!toolCall.arguments) return [];\n return Object.keys(toolCall.arguments).filter(\n key =>\n key !== 'server_label' &&\n toolCall.arguments[key] !== '' &&\n toolCall.arguments[key] !== null,\n );\n };\n\n const getThinkingTime = (): number => {\n if (toolCall.startTime && toolCall.endTime) {\n return Math.round((toolCall.endTime - toolCall.startTime) / 1000);\n }\n return 0;\n };\n\n const thinkingTime = getThinkingTime();\n const parameterKeys = getParameterKeys();\n\n const mcpServerTitle = (() => {\n const label = toolCall.arguments?.server_label;\n if (typeof label === 'string' && label.trim() !== '') {\n return label.trim();\n }\n return t('toolCall.mcpServer');\n })();\n\n return (\n <Flex\n direction={{ default: 'column' }}\n spaceItems={{ default: 'spaceItemsSm' }}\n >\n {/* Thinking Time */}\n {thinkingTime > 0 && (\n <FlexItem>\n <Content component={ContentVariants.small}>\n {t('toolCall.thinking' as any, {\n seconds: String(thinkingTime),\n })}\n </Content>\n </FlexItem>\n )}\n\n {/* Summary */}\n <FlexItem>\n <Content component={ContentVariants.p}>{t('toolCall.summary')}</Content>\n </FlexItem>\n\n {/* Tool Header with MCP Server */}\n <FlexItem>\n <div\n style={{\n border: '1px solid var(--pf-t--global--border--color--default)',\n borderRadius: 'var(--pf-t--global--border--radius--small)',\n padding: 'var(--pf-t--global--spacer--md)',\n }}\n >\n <Flex\n direction={{ default: 'column' }}\n spaceItems={{ default: 'spaceItemsSm' }}\n >\n <FlexItem\n style={{\n borderBottom:\n '1px solid var(--pf-t--global--border--color--default)',\n paddingBottom: 'var(--pf-t--global--spacer--sm)',\n }}\n >\n <Content\n component={ContentVariants.p}\n style={{ marginBlockEnd: 0 }}\n >\n <WrenchIcon\n style={{\n color: 'var(--pf-t--global--icon--color--brand--default)',\n marginRight: '0.5em',\n }}\n />\n <strong>{mcpServerTitle}</strong>\n </Content>\n {toolCall.executionTime !== undefined && (\n <Content component={ContentVariants.small}>\n {t('toolCall.executionTime')}\n {formatExecutionTime(toolCall.executionTime)}\n </Content>\n )}\n </FlexItem>\n\n {/* Description List for Parameters and Response */}\n <FlexItem>\n <DescriptionList\n style={\n {\n '--pf-v6-c-description-list--RowGap':\n 'var(--pf-t--global--spacer--md)',\n } as any\n }\n aria-label=\"Tool response\"\n >\n {/* Parameters Section */}\n {parameterKeys.length > 0 && (\n <DescriptionListGroup\n style={\n {\n '--pf-v6-c-description-list__group--RowGap':\n 'var(--pf-t--global--spacer--xs)',\n } as any\n }\n >\n <DescriptionListTerm>\n {t('toolCall.parameters' as any, {\n defaultValue: 'Parameters',\n }) || 'Parameters'}\n </DescriptionListTerm>\n <DescriptionListDescription\n style={{ marginInlineStart: 0 }}\n >\n <Flex direction={{ default: 'column' }}>\n {toolCall.description && (\n <FlexItem>\n <Content component={ContentVariants.small}>\n {toolCall.description}\n </Content>\n </FlexItem>\n )}\n <FlexItem>\n <Flex\n gap={{ default: 'gapSm' }}\n flexWrap={{ default: 'wrap' }}\n >\n {parameterKeys.map(key => (\n <FlexItem key={key}>\n <Label variant=\"outline\" color=\"blue\">\n {key}\n </Label>\n </FlexItem>\n ))}\n </Flex>\n </FlexItem>\n </Flex>\n </DescriptionListDescription>\n </DescriptionListGroup>\n )}\n\n {/* Response Section */}\n {toolCall.response && (\n <DescriptionListGroup\n style={\n {\n '--pf-v6-c-description-list__group--RowGap':\n 'var(--pf-t--global--spacer--xs)',\n } as any\n }\n >\n {/* <DescriptionListTerm> */}\n <Flex\n alignItems={{ default: 'alignItemsCenter' }}\n justifyContent={{ default: 'justifyContentSpaceBetween' }}\n >\n <FlexItem flex={{ default: 'flex_1' }}>\n <strong> {t('toolCall.response')}</strong>\n </FlexItem>\n </Flex>\n {/* </DescriptionListTerm> */}\n <DescriptionListDescription\n style={{ marginInlineStart: 0 }}\n >\n <Flex\n direction={{ default: 'column' }}\n spaceItems={{ default: 'spaceItemsXs' }}\n >\n <FlexItem className={classes.codeBlock}>\n <Message\n content={formatToolResponseForMarkdown(\n toolCall.response,\n )}\n role={role}\n codeBlockProps={{\n isExpandable: true,\n expandableSectionProps: {\n truncateMaxLines: 12,\n },\n }}\n />\n </FlexItem>\n </Flex>\n </DescriptionListDescription>\n </DescriptionListGroup>\n )}\n </DescriptionList>\n </FlexItem>\n </Flex>\n </div>\n </FlexItem>\n </Flex>\n );\n};\n\nexport default ToolCallContent;\n"],"names":[],"mappings":";;;;;;;;AAwCA,MAAM,SAAA,GAAY,WAAW,OAAO;AAAA,EAClC,SAAA,EAAW;AAAA,IACT,mCAAA,EAAqC;AAAA,MACnC,MAAA,EAAQ,uDAAA;AAAA,MACR,YAAA,EAAc;AAAA;AAChB;AAEJ,CAAA,CAAE,CAAA;AAMK,MAAM,kBAAkB,CAAC;AAAA,EAC9B,QAA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S,4BAAA,EAA6B;AAAA,kCAExD,QAAA,kBAAA,GAAA,CAAC,YAAS,IAAA,EAAM,EAAE,SAAS,QAAA,EAAS,EAClC,+BAAC,QAAA,EAAA,EAAO,QAAA,EAAA;AAAA,oCAAA,GAAA;AAAA,oCAAE,EAAE,mBAAmB;AAAA,mCAAA,EAAE,CAAA,EACnC;AAAA;AAAA,+BACF;AAAA,8CAEA,GAAA;AAAA,gCAAC,0BAAA;AAAA,gCAAA;AAAA,kCACC,KAAA,EAAO,EAAE,iBAAA,EAAmB,CAAA,EAAE;AAAA,kCAE9B,QAAA,kBAAA,GAAA;AAAA,oCAAC,IAAA;AAAA,oCAAA;AAAA,sCACC,SAAA,EAAW,EAAE,OAAA,EAAS,QAAA,EAAS;AAAA,sCAC/B,UAAA,EAAY,EAAE,OAAA,EAAS,cAAA,EAAe;AAAA,sCAEtC,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,SAAA,EAAW,OAAA,CAAQ,SAAA,EAC3B,QAAA,kBAAA,GAAA;AAAA,wCAAC,OAAA;AAAA,wCAAA;AAAA,0CACC,OAAA,EAAS,6BAAA;AAAA,4CACP,QAAA,CAAS;AAAA,2CACX;AAAA,0CACA,IAAA;AAAA,0CACA,cAAA,EAAgB;AAAA,4CACd,YAAA,EAAc,IAAA;AAAA,4CACd,sBAAA,EAAwB;AAAA,8CACtB,gBAAA,EAAkB;AAAA;AACpB;AACF;AAAA,uCACF,EACF;AAAA;AAAA;AACF;AAAA;AACF;AAAA;AAAA;AACF;AAAA;AAAA,mBAEJ,EACF;AAAA;AAAA;AAAA;AACF;AAAA,SACF,EACF;AAAA;AAAA;AAAA,GACF;AAEJ;;;;"}
1
+ {"version":3,"file":"ToolCallContent.esm.js","sources":["../../src/components/ToolCallContent.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 { styled } from '@mui/material/styles';\nimport { Message } from '@patternfly/chatbot';\nimport {\n Content,\n ContentVariants,\n DescriptionList,\n DescriptionListDescription,\n DescriptionListGroup,\n DescriptionListTerm,\n Flex,\n FlexItem,\n Label,\n} from '@patternfly/react-core';\nimport { WrenchIcon } from '@patternfly/react-icons';\n\nimport { useTranslation } from '../hooks/useTranslation';\nimport { ToolCall } from '../types';\nimport { formatToolResponseForMarkdown } from '../utils/formatToolResponseForMarkdown';\n\ninterface ToolCallContentProps {\n toolCall: ToolCall;\n role?: 'user' | 'bot';\n}\n\nconst CodeBlock = styled('div')({\n '& .pf-chatbot__message-code-block': {\n border: '1px solid var(--pf-t--global--border--color--default)',\n borderRadius: 'var(--pf-t--global--border--radius--small)',\n },\n});\n\n/**\n * Lightweight component for rendering tool call expandable content.\n * Used inside PatternFly's ToolCall component's expandableContent prop.\n */\nexport const ToolCallContent = ({\n toolCall,\n role = 'bot',\n}: ToolCallContentProps) => {\n const { t } = useTranslation();\n\n const formatExecutionTime = (seconds?: number): string => {\n if (seconds === undefined) return '';\n if (seconds < 1) return `${Math.round(seconds * 1000)}ms`;\n return `${seconds.toFixed(2)}s`;\n };\n\n const getParameterKeys = (): string[] => {\n if (!toolCall.arguments) return [];\n return Object.keys(toolCall.arguments).filter(\n key =>\n key !== 'server_label' &&\n toolCall.arguments[key] !== '' &&\n toolCall.arguments[key] !== null,\n );\n };\n\n const getThinkingTime = (): number => {\n if (toolCall.startTime && toolCall.endTime) {\n return Math.round((toolCall.endTime - toolCall.startTime) / 1000);\n }\n return 0;\n };\n\n const thinkingTime = getThinkingTime();\n const parameterKeys = getParameterKeys();\n\n const mcpServerTitle = (() => {\n const label = toolCall.arguments?.server_label;\n if (typeof label === 'string' && label.trim() !== '') {\n return label.trim();\n }\n return t('toolCall.mcpServer');\n })();\n\n return (\n <Flex\n direction={{ default: 'column' }}\n spaceItems={{ default: 'spaceItemsSm' }}\n >\n {/* Thinking Time */}\n {thinkingTime > 0 && (\n <FlexItem>\n <Content component={ContentVariants.small}>\n {t('toolCall.thinking' as any, {\n seconds: String(thinkingTime),\n })}\n </Content>\n </FlexItem>\n )}\n\n {/* Summary */}\n <FlexItem>\n <Content component={ContentVariants.p}>{t('toolCall.summary')}</Content>\n </FlexItem>\n\n {/* Tool Header with MCP Server */}\n <FlexItem>\n <div\n style={{\n border: '1px solid var(--pf-t--global--border--color--default)',\n borderRadius: 'var(--pf-t--global--border--radius--small)',\n padding: 'var(--pf-t--global--spacer--md)',\n }}\n >\n <Flex\n direction={{ default: 'column' }}\n spaceItems={{ default: 'spaceItemsSm' }}\n >\n <FlexItem\n style={{\n borderBottom:\n '1px solid var(--pf-t--global--border--color--default)',\n paddingBottom: 'var(--pf-t--global--spacer--sm)',\n }}\n >\n <Content\n component={ContentVariants.p}\n style={{ marginBlockEnd: 0 }}\n >\n <WrenchIcon\n style={{\n color: 'var(--pf-t--global--icon--color--brand--default)',\n marginRight: '0.5em',\n }}\n />\n <strong>{mcpServerTitle}</strong>\n </Content>\n {toolCall.executionTime !== undefined && (\n <Content component={ContentVariants.small}>\n {t('toolCall.executionTime')}\n {formatExecutionTime(toolCall.executionTime)}\n </Content>\n )}\n </FlexItem>\n\n {/* Description List for Parameters and Response */}\n <FlexItem>\n <DescriptionList\n style={\n {\n '--pf-v6-c-description-list--RowGap':\n 'var(--pf-t--global--spacer--md)',\n } as any\n }\n aria-label=\"Tool response\"\n >\n {/* Parameters Section */}\n {parameterKeys.length > 0 && (\n <DescriptionListGroup\n style={\n {\n '--pf-v6-c-description-list__group--RowGap':\n 'var(--pf-t--global--spacer--xs)',\n } as any\n }\n >\n <DescriptionListTerm>\n {t('toolCall.parameters' as any, {\n defaultValue: 'Parameters',\n }) || 'Parameters'}\n </DescriptionListTerm>\n <DescriptionListDescription\n style={{ marginInlineStart: 0 }}\n >\n <Flex direction={{ default: 'column' }}>\n {toolCall.description && (\n <FlexItem>\n <Content component={ContentVariants.small}>\n {toolCall.description}\n </Content>\n </FlexItem>\n )}\n <FlexItem>\n <Flex\n gap={{ default: 'gapSm' }}\n flexWrap={{ default: 'wrap' }}\n >\n {parameterKeys.map(key => (\n <FlexItem key={key}>\n <Label variant=\"outline\" color=\"blue\">\n {key}\n </Label>\n </FlexItem>\n ))}\n </Flex>\n </FlexItem>\n </Flex>\n </DescriptionListDescription>\n </DescriptionListGroup>\n )}\n\n {/* Response Section */}\n {toolCall.response && (\n <DescriptionListGroup\n style={\n {\n '--pf-v6-c-description-list__group--RowGap':\n 'var(--pf-t--global--spacer--xs)',\n } as any\n }\n >\n {/* <DescriptionListTerm> */}\n <Flex\n alignItems={{ default: 'alignItemsCenter' }}\n justifyContent={{ default: 'justifyContentSpaceBetween' }}\n >\n <FlexItem flex={{ default: 'flex_1' }}>\n <strong> {t('toolCall.response')}</strong>\n </FlexItem>\n </Flex>\n {/* </DescriptionListTerm> */}\n <DescriptionListDescription\n style={{ marginInlineStart: 0 }}\n >\n <Flex\n direction={{ default: 'column' }}\n spaceItems={{ default: 'spaceItemsXs' }}\n >\n <FlexItem>\n <CodeBlock>\n <Message\n content={formatToolResponseForMarkdown(\n toolCall.response,\n )}\n role={role}\n codeBlockProps={{\n isExpandable: true,\n expandableSectionProps: {\n truncateMaxLines: 12,\n },\n }}\n />\n </CodeBlock>\n </FlexItem>\n </Flex>\n </DescriptionListDescription>\n </DescriptionListGroup>\n )}\n </DescriptionList>\n </FlexItem>\n </Flex>\n </div>\n </FlexItem>\n </Flex>\n );\n};\n\nexport default ToolCallContent;\n"],"names":[],"mappings":";;;;;;;;AAwCA,MAAM,SAAA,GAAY,MAAA,CAAO,KAAK,CAAA,CAAE;AAAA,EAC9B,mCAAA,EAAqC;AAAA,IACnC,MAAA,EAAQ,u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