diff --git a/client/src/App.tsx b/client/src/App.tsx index 4f99ffd..04be204 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -467,6 +467,10 @@ const App = () => { setLogLevel(level); }; + const clearStdErrNotifications = () => { + setStdErrNotifications([]); + }; + if (window.location.pathname === "/oauth/callback") { const OAuthCallback = React.lazy( () => import("./components/OAuthCallback"), @@ -502,6 +506,7 @@ const App = () => { logLevel={logLevel} sendLogLevelRequest={sendLogLevelRequest} loggingSupported={!!serverCapabilities?.logging || false} + clearStdErrNotifications={clearStdErrNotifications} />
diff --git a/client/src/components/Sidebar.tsx b/client/src/components/Sidebar.tsx
index 2ddb18d..efc054a 100644
--- a/client/src/components/Sidebar.tsx
+++ b/client/src/components/Sidebar.tsx
@@ -54,6 +54,7 @@ interface SidebarProps {
onConnect: () => void;
onDisconnect: () => void;
stdErrNotifications: StdErrNotification[];
+ clearStdErrNotifications: () => void;
logLevel: LoggingLevel;
sendLogLevelRequest: (level: LoggingLevel) => void;
loggingSupported: boolean;
@@ -78,6 +79,7 @@ const Sidebar = ({
onConnect,
onDisconnect,
stdErrNotifications,
+ clearStdErrNotifications,
logLevel,
sendLogLevelRequest,
loggingSupported,
@@ -514,9 +516,19 @@ const Sidebar = ({
{stdErrNotifications.length > 0 && (
<>
-
- Error output from MCP server
-
+
+
+ Error output from MCP server
+
+
+
{stdErrNotifications.map((notification, index) => (
{
onConnect: jest.fn(),
onDisconnect: jest.fn(),
stdErrNotifications: [],
+ clearStdErrNotifications: jest.fn(),
logLevel: "info" as const,
sendLogLevelRequest: jest.fn(),
loggingSupported: true,