@backstage-community/plugin-mcp-chat 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +361 -0
- package/config.d.ts +47 -0
- package/dist/api/McpChatApi.esm.js +55 -0
- package/dist/api/McpChatApi.esm.js.map +1 -0
- package/dist/api/index.esm.js +8 -0
- package/dist/api/index.esm.js.map +1 -0
- package/dist/components/BotIcon/BotIcon.esm.js +57 -0
- package/dist/components/BotIcon/BotIcon.esm.js.map +1 -0
- package/dist/components/ChatContainer/ChatContainer.esm.js +246 -0
- package/dist/components/ChatContainer/ChatContainer.esm.js.map +1 -0
- package/dist/components/ChatContainer/ChatMessage.esm.js +466 -0
- package/dist/components/ChatContainer/ChatMessage.esm.js.map +1 -0
- package/dist/components/ChatContainer/QuickStart.esm.js +271 -0
- package/dist/components/ChatContainer/QuickStart.esm.js.map +1 -0
- package/dist/components/ChatContainer/TypingIndicator.esm.js +154 -0
- package/dist/components/ChatContainer/TypingIndicator.esm.js.map +1 -0
- package/dist/components/ChatPage/ChatPage.esm.js +142 -0
- package/dist/components/ChatPage/ChatPage.esm.js.map +1 -0
- package/dist/components/ChatPage/index.esm.js +2 -0
- package/dist/components/ChatPage/index.esm.js.map +1 -0
- package/dist/components/RightPane/ActiveMcpServers.esm.js +159 -0
- package/dist/components/RightPane/ActiveMcpServers.esm.js.map +1 -0
- package/dist/components/RightPane/ActiveTools.esm.js +308 -0
- package/dist/components/RightPane/ActiveTools.esm.js.map +1 -0
- package/dist/components/RightPane/ProviderStatus.esm.js +225 -0
- package/dist/components/RightPane/ProviderStatus.esm.js.map +1 -0
- package/dist/components/RightPane/RightPane.esm.js +242 -0
- package/dist/components/RightPane/RightPane.esm.js.map +1 -0
- package/dist/hooks/useAvailableTools.esm.js +33 -0
- package/dist/hooks/useAvailableTools.esm.js.map +1 -0
- package/dist/hooks/useMcpServers.esm.js +40 -0
- package/dist/hooks/useMcpServers.esm.js.map +1 -0
- package/dist/hooks/useProviderStatus.esm.js +22 -0
- package/dist/hooks/useProviderStatus.esm.js.map +1 -0
- package/dist/index.d.ts +150 -0
- package/dist/index.esm.js +3 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/plugin.esm.js +33 -0
- package/dist/plugin.esm.js.map +1 -0
- package/dist/routes.esm.js +8 -0
- package/dist/routes.esm.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useTheme } from '@mui/material/styles';
|
|
3
|
+
import Box from '@mui/material/Box';
|
|
4
|
+
import Chip from '@mui/material/Chip';
|
|
5
|
+
import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord';
|
|
6
|
+
import MemoryIcon from '@mui/icons-material/Memory';
|
|
7
|
+
import Tooltip from '@mui/material/Tooltip';
|
|
8
|
+
import Typography from '@mui/material/Typography';
|
|
9
|
+
|
|
10
|
+
const getChipBackgroundColor = (server, theme) => {
|
|
11
|
+
if (!server.status?.connected) {
|
|
12
|
+
return "transparent";
|
|
13
|
+
}
|
|
14
|
+
if (server.enabled) {
|
|
15
|
+
return theme.palette.mode === "dark" ? theme.palette.background.paper : "transparent";
|
|
16
|
+
}
|
|
17
|
+
return "transparent";
|
|
18
|
+
};
|
|
19
|
+
const getChipColor = (server, theme) => {
|
|
20
|
+
if (!server.status?.connected) {
|
|
21
|
+
return theme.palette.error.main;
|
|
22
|
+
}
|
|
23
|
+
if (server.enabled) {
|
|
24
|
+
return theme.palette.mode === "dark" ? theme.palette.success.light : theme.palette.success.dark;
|
|
25
|
+
}
|
|
26
|
+
return theme.palette.text.secondary;
|
|
27
|
+
};
|
|
28
|
+
const getChipBorder = (server, theme) => {
|
|
29
|
+
if (!server.status?.connected) {
|
|
30
|
+
return `2px solid ${theme.palette.error.main}`;
|
|
31
|
+
}
|
|
32
|
+
return server.enabled ? `2px solid ${theme.palette.success.main}` : `2px solid ${theme.palette.divider}`;
|
|
33
|
+
};
|
|
34
|
+
const getDotColor = (server, theme) => {
|
|
35
|
+
if (!server.status?.connected) {
|
|
36
|
+
return theme.palette.error.main;
|
|
37
|
+
}
|
|
38
|
+
return server.enabled ? theme.palette.success.main : theme.palette.grey[500];
|
|
39
|
+
};
|
|
40
|
+
const ActiveMcpServers = ({
|
|
41
|
+
mcpServers,
|
|
42
|
+
onServerToggle
|
|
43
|
+
}) => {
|
|
44
|
+
const theme = useTheme();
|
|
45
|
+
return /* @__PURE__ */ jsxs(
|
|
46
|
+
Box,
|
|
47
|
+
{
|
|
48
|
+
sx: {
|
|
49
|
+
padding: theme.spacing(2),
|
|
50
|
+
borderTop: `1px solid ${theme.palette.divider}`,
|
|
51
|
+
backgroundColor: theme.palette.background.default
|
|
52
|
+
},
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ jsxs(
|
|
55
|
+
Box,
|
|
56
|
+
{
|
|
57
|
+
sx: {
|
|
58
|
+
display: "flex",
|
|
59
|
+
alignItems: "center",
|
|
60
|
+
marginBottom: 1.5
|
|
61
|
+
},
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsx(
|
|
64
|
+
MemoryIcon,
|
|
65
|
+
{
|
|
66
|
+
sx: {
|
|
67
|
+
marginRight: 0.5,
|
|
68
|
+
marginBottom: "2.5px",
|
|
69
|
+
color: theme.palette.text.primary,
|
|
70
|
+
fontSize: "1.1rem"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
Typography,
|
|
76
|
+
{
|
|
77
|
+
variant: "caption",
|
|
78
|
+
sx: {
|
|
79
|
+
color: theme.palette.text.primary,
|
|
80
|
+
fontWeight: 600,
|
|
81
|
+
fontSize: "0.85rem"
|
|
82
|
+
},
|
|
83
|
+
children: "Active MCP Servers"
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ jsx(Box, { sx: { display: "flex", flexWrap: "wrap" }, children: mcpServers.map((server) => /* @__PURE__ */ jsx(
|
|
90
|
+
Tooltip,
|
|
91
|
+
{
|
|
92
|
+
title: server.status?.connected ? `Click to ${server.enabled ? "disable" : "enable"} ${server.name} server` : `Not connected: ${server.status?.error || "Unknown error"}`,
|
|
93
|
+
arrow: true,
|
|
94
|
+
children: /* @__PURE__ */ jsx(
|
|
95
|
+
Chip,
|
|
96
|
+
{
|
|
97
|
+
label: server.name,
|
|
98
|
+
clickable: server.status?.connected,
|
|
99
|
+
onClick: server.status?.connected ? () => onServerToggle(server.id) : void 0,
|
|
100
|
+
icon: /* @__PURE__ */ jsx(
|
|
101
|
+
FiberManualRecordIcon,
|
|
102
|
+
{
|
|
103
|
+
sx: {
|
|
104
|
+
fill: getDotColor(server, theme),
|
|
105
|
+
fontSize: "10px !important",
|
|
106
|
+
marginLeft: "8px"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
sx: {
|
|
111
|
+
transition: "all 0.2s ease",
|
|
112
|
+
cursor: server.status?.connected ? "pointer" : "help",
|
|
113
|
+
backgroundColor: getChipBackgroundColor(server, theme),
|
|
114
|
+
color: getChipColor(server, theme),
|
|
115
|
+
border: getChipBorder(server, theme),
|
|
116
|
+
fontSize: "0.75rem",
|
|
117
|
+
fontWeight: server.enabled ? 600 : 400,
|
|
118
|
+
"& .MuiChip-icon": {
|
|
119
|
+
marginLeft: "8px",
|
|
120
|
+
marginRight: "4px"
|
|
121
|
+
},
|
|
122
|
+
...server.status?.connected && {
|
|
123
|
+
"&:hover": {
|
|
124
|
+
transform: "translateY(-1px)",
|
|
125
|
+
boxShadow: theme.shadows[2]
|
|
126
|
+
},
|
|
127
|
+
"&:active": {
|
|
128
|
+
transform: "translateY(0)",
|
|
129
|
+
boxShadow: theme.shadows[1]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
size: "small"
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
},
|
|
137
|
+
server.id
|
|
138
|
+
)) }),
|
|
139
|
+
mcpServers.length === 0 && /* @__PURE__ */ jsx(
|
|
140
|
+
Typography,
|
|
141
|
+
{
|
|
142
|
+
variant: "caption",
|
|
143
|
+
style: {
|
|
144
|
+
color: theme.palette.text.secondary,
|
|
145
|
+
fontStyle: "italic",
|
|
146
|
+
textAlign: "center",
|
|
147
|
+
display: "block",
|
|
148
|
+
padding: "12px 0"
|
|
149
|
+
},
|
|
150
|
+
children: "No MCP servers configured"
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export { ActiveMcpServers };
|
|
159
|
+
//# sourceMappingURL=ActiveMcpServers.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActiveMcpServers.esm.js","sources":["../../../src/components/RightPane/ActiveMcpServers.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\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 */\nimport { useTheme } from '@mui/material/styles';\nimport Box from '@mui/material/Box';\nimport Chip from '@mui/material/Chip';\nimport FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord';\nimport MemoryIcon from '@mui/icons-material/Memory';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\nimport { MCPServer } from '../../types';\n\ninterface ActiveMcpServersProps {\n mcpServers: MCPServer[];\n onServerToggle: (serverId: string) => void;\n}\n\nconst getChipBackgroundColor = (server: MCPServer, theme: any) => {\n if (!server.status?.connected) {\n return 'transparent';\n }\n if (server.enabled) {\n return theme.palette.mode === 'dark'\n ? theme.palette.background.paper\n : 'transparent';\n }\n return 'transparent';\n};\n\nconst getChipColor = (server: MCPServer, theme: any) => {\n if (!server.status?.connected) {\n return theme.palette.error.main;\n }\n if (server.enabled) {\n return theme.palette.mode === 'dark'\n ? theme.palette.success.light\n : theme.palette.success.dark;\n }\n return theme.palette.text.secondary;\n};\n\nconst getChipBorder = (server: MCPServer, theme: any) => {\n if (!server.status?.connected) {\n return `2px solid ${theme.palette.error.main}`;\n }\n return server.enabled\n ? `2px solid ${theme.palette.success.main}`\n : `2px solid ${theme.palette.divider}`;\n};\n\nconst getDotColor = (server: MCPServer, theme: any) => {\n if (!server.status?.connected) {\n return theme.palette.error.main;\n }\n return server.enabled ? theme.palette.success.main : theme.palette.grey[500];\n};\n\nexport const ActiveMcpServers = ({\n mcpServers,\n onServerToggle,\n}: ActiveMcpServersProps) => {\n const theme = useTheme();\n\n return (\n <Box\n sx={{\n padding: theme.spacing(2),\n borderTop: `1px solid ${theme.palette.divider}`,\n backgroundColor: theme.palette.background.default,\n }}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n marginBottom: 1.5,\n }}\n >\n <MemoryIcon\n sx={{\n marginRight: 0.5,\n marginBottom: '2.5px',\n color: theme.palette.text.primary,\n fontSize: '1.1rem',\n }}\n />\n <Typography\n variant=\"caption\"\n sx={{\n color: theme.palette.text.primary,\n fontWeight: 600,\n fontSize: '0.85rem',\n }}\n >\n Active MCP Servers\n </Typography>\n </Box>\n <Box sx={{ display: 'flex', flexWrap: 'wrap' }}>\n {mcpServers.map(server => (\n <Tooltip\n key={server.id}\n title={\n server.status?.connected\n ? `Click to ${server.enabled ? 'disable' : 'enable'} ${\n server.name\n } server`\n : `Not connected: ${server.status?.error || 'Unknown error'}`\n }\n arrow\n >\n <Chip\n label={server.name}\n clickable={server.status?.connected}\n onClick={\n server.status?.connected\n ? () => onServerToggle(server.id)\n : undefined\n }\n icon={\n <FiberManualRecordIcon\n sx={{\n fill: getDotColor(server, theme),\n fontSize: '10px !important',\n marginLeft: '8px',\n }}\n />\n }\n sx={{\n transition: 'all 0.2s ease',\n cursor: server.status?.connected ? 'pointer' : 'help',\n backgroundColor: getChipBackgroundColor(server, theme),\n color: getChipColor(server, theme),\n border: getChipBorder(server, theme),\n fontSize: '0.75rem',\n fontWeight: server.enabled ? 600 : 400,\n '& .MuiChip-icon': {\n marginLeft: '8px',\n marginRight: '4px',\n },\n ...(server.status?.connected && {\n '&:hover': {\n transform: 'translateY(-1px)',\n boxShadow: theme.shadows[2],\n },\n '&:active': {\n transform: 'translateY(0)',\n boxShadow: theme.shadows[1],\n },\n }),\n }}\n size=\"small\"\n />\n </Tooltip>\n ))}\n </Box>\n {mcpServers.length === 0 && (\n <Typography\n variant=\"caption\"\n style={{\n color: theme.palette.text.secondary,\n fontStyle: 'italic',\n textAlign: 'center',\n display: 'block',\n padding: '12px 0',\n }}\n >\n No MCP servers configured\n </Typography>\n )}\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AA6BA,MAAM,sBAAA,GAAyB,CAAC,MAAA,EAAmB,KAAA,KAAe;AAChE,EAAA,IAAI,CAAC,MAAA,CAAO,MAAA,EAAQ,SAAA,EAAW;AAC7B,IAAA,OAAO,aAAA;AAAA;AAET,EAAA,IAAI,OAAO,OAAA,EAAS;AAClB,IAAA,OAAO,MAAM,OAAA,CAAQ,IAAA,KAAS,SAC1B,KAAA,CAAM,OAAA,CAAQ,WAAW,KAAA,GACzB,aAAA;AAAA;AAEN,EAAA,OAAO,aAAA;AACT,CAAA;AAEA,MAAM,YAAA,GAAe,CAAC,MAAA,EAAmB,KAAA,KAAe;AACtD,EAAA,IAAI,CAAC,MAAA,CAAO,MAAA,EAAQ,SAAA,EAAW;AAC7B,IAAA,OAAO,KAAA,CAAM,QAAQ,KAAA,CAAM,IAAA;AAAA;AAE7B,EAAA,IAAI,OAAO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,oBAC9B,SAAA,EAAW;AAAA,sBACT,SAAA,EAAW,kBAAA;AAAA,sBACX,SAAA,EAAW,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA,qBAC5B;AAAA,oBACA,UAAA,EAAY;AAAA,sBACV,SAAA,EAAW,eAAA;AAAA,sBACX,SAAA,EAAW,KAAA,CAAM,OAAA,CAAQ,CAAC;AAAA;AAC5B;AACF,iBACF;AAAA,gBACA,IAAA,EAAK;AAAA;AAAA;AACP,WAAA;AAAA,UAnDK,MAAA,CAAO;AAAA,SAqDf,CAAA,EACH,CAAA;AAAA,QACC,UAAA,CAAW,WAAW,CAAA,oBACrB,GAAA;AAAA,UAAC,UAAA;AAAA,UAAA;AAAA,YACC,OAAA,EAAQ,SAAA;AAAA,YACR,KAAA,EAAO;AAAA,cACL,KAAA,EAAO,KAAA,CAAM,OAAA,CAAQ,IAAA,CAAK,SAAA;AAAA,cAC1B,SAAA,EAAW,QAAA;AAAA,cACX,SAAA,EAAW,QAAA;AAAA,cACX,OAAA,EAAS,OAAA;AAAA,cACT,OAAA,EAAS;AAAA,aACX;AAAA,YACD,QAAA,EAAA;AAAA;AAAA;AAED;AAAA;AAAA,GAEJ;AAEJ;;;;"}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { useTheme } from '@mui/material/styles';
|
|
3
|
+
import BuildIcon from '@mui/icons-material/Build';
|
|
4
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
5
|
+
import Accordion from '@mui/material/Accordion';
|
|
6
|
+
import AccordionDetails from '@mui/material/AccordionDetails';
|
|
7
|
+
import AccordionSummary from '@mui/material/AccordionSummary';
|
|
8
|
+
import Box from '@mui/material/Box';
|
|
9
|
+
import Typography from '@mui/material/Typography';
|
|
10
|
+
import CircularProgress from '@mui/material/CircularProgress';
|
|
11
|
+
|
|
12
|
+
const ActiveTools = ({
|
|
13
|
+
mcpServers,
|
|
14
|
+
availableTools,
|
|
15
|
+
toolsLoading
|
|
16
|
+
}) => {
|
|
17
|
+
const theme = useTheme();
|
|
18
|
+
return /* @__PURE__ */ jsxs(
|
|
19
|
+
Box,
|
|
20
|
+
{
|
|
21
|
+
sx: {
|
|
22
|
+
padding: theme.spacing(1, 2),
|
|
23
|
+
flex: 1,
|
|
24
|
+
overflow: "hidden",
|
|
25
|
+
display: "flex",
|
|
26
|
+
flexDirection: "column"
|
|
27
|
+
},
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ jsxs(
|
|
30
|
+
Box,
|
|
31
|
+
{
|
|
32
|
+
sx: {
|
|
33
|
+
display: "flex",
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
marginBottom: 1.5,
|
|
36
|
+
paddingBottom: 1,
|
|
37
|
+
borderBottom: `1px solid ${theme.palette.divider}`
|
|
38
|
+
},
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
BuildIcon,
|
|
42
|
+
{
|
|
43
|
+
sx: {
|
|
44
|
+
marginRight: 1,
|
|
45
|
+
color: theme.palette.text.primary,
|
|
46
|
+
fontSize: "1.1rem"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ jsx(
|
|
51
|
+
Typography,
|
|
52
|
+
{
|
|
53
|
+
variant: "subtitle2",
|
|
54
|
+
sx: {
|
|
55
|
+
fontWeight: 600,
|
|
56
|
+
color: theme.palette.text.primary,
|
|
57
|
+
fontSize: "1rem"
|
|
58
|
+
},
|
|
59
|
+
children: "MCP Servers List"
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ jsxs(
|
|
66
|
+
Box,
|
|
67
|
+
{
|
|
68
|
+
sx: {
|
|
69
|
+
flex: 1,
|
|
70
|
+
overflowY: "scroll",
|
|
71
|
+
paddingRight: 0.5
|
|
72
|
+
},
|
|
73
|
+
children: [
|
|
74
|
+
mcpServers.filter((server) => server.enabled).map((server) => {
|
|
75
|
+
const serverTools = availableTools.filter(
|
|
76
|
+
(tool) => tool.serverId === server.id
|
|
77
|
+
);
|
|
78
|
+
return /* @__PURE__ */ jsxs(
|
|
79
|
+
Accordion,
|
|
80
|
+
{
|
|
81
|
+
sx: {
|
|
82
|
+
marginBottom: 0.75,
|
|
83
|
+
boxShadow: "none",
|
|
84
|
+
borderRadius: 1.5,
|
|
85
|
+
overflow: "hidden",
|
|
86
|
+
"&.Mui-expanded:before": {
|
|
87
|
+
opacity: 1
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ jsx(
|
|
92
|
+
AccordionSummary,
|
|
93
|
+
{
|
|
94
|
+
expandIcon: /* @__PURE__ */ jsx(
|
|
95
|
+
ExpandMoreIcon,
|
|
96
|
+
{
|
|
97
|
+
sx: {
|
|
98
|
+
fontSize: "1rem",
|
|
99
|
+
color: theme.palette.text.primary
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
sx: {
|
|
104
|
+
minHeight: 44,
|
|
105
|
+
backgroundColor: theme.palette.background.paper,
|
|
106
|
+
padding: "0 12px",
|
|
107
|
+
"& .MuiAccordionSummary-content": {
|
|
108
|
+
margin: "12px 0"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
children: /* @__PURE__ */ jsxs(
|
|
112
|
+
Box,
|
|
113
|
+
{
|
|
114
|
+
sx: {
|
|
115
|
+
display: "flex",
|
|
116
|
+
alignItems: "center",
|
|
117
|
+
justifyContent: "space-between",
|
|
118
|
+
width: "100%",
|
|
119
|
+
paddingRight: 1
|
|
120
|
+
},
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ jsx(
|
|
123
|
+
Typography,
|
|
124
|
+
{
|
|
125
|
+
variant: "body2",
|
|
126
|
+
sx: {
|
|
127
|
+
fontWeight: 500,
|
|
128
|
+
color: theme.palette.text.primary,
|
|
129
|
+
fontSize: "0.875rem"
|
|
130
|
+
},
|
|
131
|
+
children: server.name
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ jsx(
|
|
135
|
+
Typography,
|
|
136
|
+
{
|
|
137
|
+
variant: "caption",
|
|
138
|
+
sx: {
|
|
139
|
+
color: theme.palette.text.secondary,
|
|
140
|
+
fontSize: "0.75rem",
|
|
141
|
+
fontWeight: 500,
|
|
142
|
+
backgroundColor: theme.palette.action.hover,
|
|
143
|
+
padding: "2px 6px",
|
|
144
|
+
borderRadius: 2.5
|
|
145
|
+
},
|
|
146
|
+
children: toolsLoading ? "..." : `${serverTools.length} tool${serverTools.length !== 1 ? "s" : ""}`
|
|
147
|
+
}
|
|
148
|
+
)
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
/* @__PURE__ */ jsx(
|
|
155
|
+
AccordionDetails,
|
|
156
|
+
{
|
|
157
|
+
sx: {
|
|
158
|
+
flexDirection: "column",
|
|
159
|
+
padding: "8px 12px 12px",
|
|
160
|
+
backgroundColor: theme.palette.background.default,
|
|
161
|
+
borderTop: `1px solid ${theme.palette.divider}`
|
|
162
|
+
},
|
|
163
|
+
children: toolsLoading ? /* @__PURE__ */ jsxs(
|
|
164
|
+
Box,
|
|
165
|
+
{
|
|
166
|
+
sx: {
|
|
167
|
+
display: "flex",
|
|
168
|
+
alignItems: "center",
|
|
169
|
+
justifyContent: "center",
|
|
170
|
+
padding: "20px"
|
|
171
|
+
},
|
|
172
|
+
children: [
|
|
173
|
+
/* @__PURE__ */ jsx(
|
|
174
|
+
CircularProgress,
|
|
175
|
+
{
|
|
176
|
+
size: 20,
|
|
177
|
+
role: "progressbar",
|
|
178
|
+
"aria-label": "Loading tools",
|
|
179
|
+
sx: { marginRight: 1 }
|
|
180
|
+
}
|
|
181
|
+
),
|
|
182
|
+
/* @__PURE__ */ jsx(
|
|
183
|
+
Typography,
|
|
184
|
+
{
|
|
185
|
+
variant: "caption",
|
|
186
|
+
sx: { color: theme.palette.text.secondary },
|
|
187
|
+
children: "Loading tools..."
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
) : /* @__PURE__ */ jsx(Fragment, { children: (() => {
|
|
193
|
+
if (serverTools.length > 0) {
|
|
194
|
+
return /* @__PURE__ */ jsx(
|
|
195
|
+
Box,
|
|
196
|
+
{
|
|
197
|
+
sx: {
|
|
198
|
+
display: "flex",
|
|
199
|
+
flexDirection: "column",
|
|
200
|
+
gap: 0.75
|
|
201
|
+
},
|
|
202
|
+
children: serverTools.map((tool) => /* @__PURE__ */ jsxs(
|
|
203
|
+
Box,
|
|
204
|
+
{
|
|
205
|
+
sx: {
|
|
206
|
+
padding: "6px 8px",
|
|
207
|
+
backgroundColor: theme.palette.background.paper,
|
|
208
|
+
borderRadius: 1,
|
|
209
|
+
border: `1px solid ${theme.palette.divider}`
|
|
210
|
+
},
|
|
211
|
+
children: [
|
|
212
|
+
/* @__PURE__ */ jsx(
|
|
213
|
+
Typography,
|
|
214
|
+
{
|
|
215
|
+
variant: "caption",
|
|
216
|
+
sx: {
|
|
217
|
+
fontWeight: 600,
|
|
218
|
+
color: theme.palette.text.primary,
|
|
219
|
+
fontSize: "0.75rem",
|
|
220
|
+
display: "block",
|
|
221
|
+
marginBottom: 0.25
|
|
222
|
+
},
|
|
223
|
+
children: tool.function.name
|
|
224
|
+
}
|
|
225
|
+
),
|
|
226
|
+
/* @__PURE__ */ jsx(
|
|
227
|
+
Typography,
|
|
228
|
+
{
|
|
229
|
+
variant: "caption",
|
|
230
|
+
sx: {
|
|
231
|
+
color: theme.palette.text.secondary,
|
|
232
|
+
fontSize: "0.7rem",
|
|
233
|
+
lineHeight: 1.3,
|
|
234
|
+
display: "block"
|
|
235
|
+
},
|
|
236
|
+
children: tool.function.description || "No description available"
|
|
237
|
+
}
|
|
238
|
+
)
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
tool.function.name
|
|
242
|
+
))
|
|
243
|
+
}
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
if (!server.status.connected && server.status.error) {
|
|
247
|
+
return /* @__PURE__ */ jsxs(
|
|
248
|
+
Typography,
|
|
249
|
+
{
|
|
250
|
+
variant: "caption",
|
|
251
|
+
sx: {
|
|
252
|
+
color: theme.palette.error.main,
|
|
253
|
+
fontWeight: 500,
|
|
254
|
+
textAlign: "center"
|
|
255
|
+
},
|
|
256
|
+
children: [
|
|
257
|
+
"Problem connecting to MCP server ",
|
|
258
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
259
|
+
"Error: ",
|
|
260
|
+
server.status.error
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
);
|
|
264
|
+
}
|
|
265
|
+
return /* @__PURE__ */ jsx(
|
|
266
|
+
Typography,
|
|
267
|
+
{
|
|
268
|
+
variant: "caption",
|
|
269
|
+
sx: {
|
|
270
|
+
color: theme.palette.text.secondary,
|
|
271
|
+
textAlign: "center",
|
|
272
|
+
display: "block"
|
|
273
|
+
},
|
|
274
|
+
children: "No tools available for this server"
|
|
275
|
+
}
|
|
276
|
+
);
|
|
277
|
+
})() })
|
|
278
|
+
}
|
|
279
|
+
)
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
server.name
|
|
283
|
+
);
|
|
284
|
+
}),
|
|
285
|
+
mcpServers.filter((server) => server.enabled).length === 0 && /* @__PURE__ */ jsx(
|
|
286
|
+
Typography,
|
|
287
|
+
{
|
|
288
|
+
variant: "caption",
|
|
289
|
+
sx: {
|
|
290
|
+
color: theme.palette.text.secondary,
|
|
291
|
+
fontStyle: "italic",
|
|
292
|
+
textAlign: "center",
|
|
293
|
+
display: "block",
|
|
294
|
+
padding: "12px 0"
|
|
295
|
+
},
|
|
296
|
+
children: "No servers enabled"
|
|
297
|
+
}
|
|
298
|
+
)
|
|
299
|
+
]
|
|
300
|
+
}
|
|
301
|
+
)
|
|
302
|
+
]
|
|
303
|
+
}
|
|
304
|
+
);
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
export { ActiveTools };
|
|
308
|
+
//# sourceMappingURL=ActiveTools.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActiveTools.esm.js","sources":["../../../src/components/RightPane/ActiveTools.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\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 */\nimport { useTheme } from '@mui/material/styles';\nimport BuildIcon from '@mui/icons-material/Build';\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore';\nimport Accordion from '@mui/material/Accordion';\nimport AccordionDetails from '@mui/material/AccordionDetails';\nimport AccordionSummary from '@mui/material/AccordionSummary';\nimport Box from '@mui/material/Box';\nimport Typography from '@mui/material/Typography';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { MCPServer, Tool } from '../../types';\n\ninterface ActiveToolsProps {\n mcpServers: MCPServer[];\n availableTools: Tool[];\n toolsLoading: boolean;\n}\n\nexport const ActiveTools: React.FC<ActiveToolsProps> = ({\n mcpServers,\n availableTools,\n toolsLoading,\n}) => {\n const theme = useTheme();\n\n return (\n <Box\n sx={{\n padding: theme.spacing(1, 2),\n flex: 1,\n overflow: 'hidden',\n display: 'flex',\n flexDirection: 'column',\n }}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n marginBottom: 1.5,\n paddingBottom: 1,\n borderBottom: `1px solid ${theme.palette.divider}`,\n }}\n >\n <BuildIcon\n sx={{\n marginRight: 1,\n color: theme.palette.text.primary,\n fontSize: '1.1rem',\n }}\n />\n <Typography\n variant=\"subtitle2\"\n sx={{\n fontWeight: 600,\n color: theme.palette.text.primary,\n fontSize: '1rem',\n }}\n >\n MCP Servers List\n </Typography>\n </Box>\n <Box\n sx={{\n flex: 1,\n overflowY: 'scroll',\n paddingRight: 0.5,\n }}\n >\n {mcpServers\n .filter(server => server.enabled)\n .map(server => {\n const serverTools = availableTools.filter(\n tool => tool.serverId === server.id,\n );\n\n return (\n <Accordion\n key={server.name}\n sx={{\n marginBottom: 0.75,\n boxShadow: 'none',\n borderRadius: 1.5,\n overflow: 'hidden',\n '&.Mui-expanded:before': {\n opacity: 1,\n },\n }}\n >\n <AccordionSummary\n expandIcon={\n <ExpandMoreIcon\n sx={{\n fontSize: '1rem',\n color: theme.palette.text.primary,\n }}\n />\n }\n sx={{\n minHeight: 44,\n backgroundColor: theme.palette.background.paper,\n padding: '0 12px',\n '& .MuiAccordionSummary-content': {\n margin: '12px 0',\n },\n }}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n paddingRight: 1,\n }}\n >\n <Typography\n variant=\"body2\"\n sx={{\n fontWeight: 500,\n color: theme.palette.text.primary,\n fontSize: '0.875rem',\n }}\n >\n {server.name}\n </Typography>\n <Typography\n variant=\"caption\"\n sx={{\n color: theme.palette.text.secondary,\n fontSize: '0.75rem',\n fontWeight: 500,\n backgroundColor: theme.palette.action.hover,\n padding: '2px 6px',\n borderRadius: 2.5,\n }}\n >\n {toolsLoading\n ? '...'\n : `${serverTools.length} tool${\n serverTools.length !== 1 ? 's' : ''\n }`}\n </Typography>\n </Box>\n </AccordionSummary>\n <AccordionDetails\n sx={{\n flexDirection: 'column',\n padding: '8px 12px 12px',\n backgroundColor: theme.palette.background.default,\n borderTop: `1px solid ${theme.palette.divider}`,\n }}\n >\n {toolsLoading ? (\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n padding: '20px',\n }}\n >\n <CircularProgress\n size={20}\n role=\"progressbar\"\n aria-label=\"Loading tools\"\n sx={{ marginRight: 1 }}\n />\n <Typography\n variant=\"caption\"\n sx={{ color: theme.palette.text.secondary }}\n >\n Loading tools...\n </Typography>\n </Box>\n ) : (\n <>\n {(() => {\n if (serverTools.length > 0) {\n return (\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n gap: 0.75,\n }}\n >\n {serverTools.map(tool => (\n <Box\n key={tool.function.name}\n sx={{\n padding: '6px 8px',\n backgroundColor:\n theme.palette.background.paper,\n borderRadius: 1,\n border: `1px solid ${theme.palette.divider}`,\n }}\n >\n <Typography\n variant=\"caption\"\n sx={{\n fontWeight: 600,\n color: theme.palette.text.primary,\n fontSize: '0.75rem',\n display: 'block',\n marginBottom: 0.25,\n }}\n >\n {tool.function.name}\n </Typography>\n <Typography\n variant=\"caption\"\n sx={{\n color: theme.palette.text.secondary,\n fontSize: '0.7rem',\n lineHeight: 1.3,\n display: 'block',\n }}\n >\n {tool.function.description ||\n 'No description available'}\n </Typography>\n </Box>\n ))}\n </Box>\n );\n }\n\n if (!server.status.connected && server.status.error) {\n return (\n <Typography\n variant=\"caption\"\n sx={{\n color: theme.palette.error.main,\n fontWeight: 500,\n textAlign: 'center',\n }}\n >\n Problem connecting to MCP server <br />\n Error: {server.status.error}\n </Typography>\n );\n }\n\n return (\n <Typography\n variant=\"caption\"\n sx={{\n color: theme.palette.text.secondary,\n textAlign: 'center',\n display: 'block',\n }}\n >\n No tools available for this server\n </Typography>\n );\n })()}\n </>\n )}\n </AccordionDetails>\n </Accordion>\n );\n })}\n\n {mcpServers.filter(server => server.enabled).length === 0 && (\n <Typography\n variant=\"caption\"\n sx={{\n color: theme.palette.text.secondary,\n fontStyle: 'italic',\n textAlign: 'center',\n display: 'block',\n padding: '12px 0',\n }}\n >\n No servers enabled\n </Typography>\n )}\n </Box>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAgCO,MAAM,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