File tree Expand file tree Collapse file tree 4 files changed +22
-4
lines changed Expand file tree Collapse file tree 4 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -467,6 +467,10 @@ const App = () => {
467
467
setLogLevel ( level ) ;
468
468
} ;
469
469
470
+ const clearStdErrNotifications = ( ) => {
471
+ setStdErrNotifications ( [ ] ) ;
472
+ } ;
473
+
470
474
if ( window . location . pathname === "/oauth/callback" ) {
471
475
const OAuthCallback = React . lazy (
472
476
( ) => import ( "./components/OAuthCallback" ) ,
@@ -502,6 +506,7 @@ const App = () => {
502
506
logLevel = { logLevel }
503
507
sendLogLevelRequest = { sendLogLevelRequest }
504
508
loggingSupported = { ! ! serverCapabilities ?. logging || false }
509
+ clearStdErrNotifications = { clearStdErrNotifications }
505
510
/>
506
511
< div className = "flex-1 flex flex-col overflow-hidden" >
507
512
< div className = "flex-1 overflow-auto" >
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ const JsonNode = memo(
227
227
) }
228
228
< pre
229
229
className = { clsx (
230
- typeStyleMap . string ,
230
+ isError ? typeStyleMap . error : typeStyleMap . string ,
231
231
"break-all whitespace-pre-wrap" ,
232
232
) }
233
233
>
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ interface SidebarProps {
54
54
onConnect : ( ) => void ;
55
55
onDisconnect : ( ) => void ;
56
56
stdErrNotifications : StdErrNotification [ ] ;
57
+ clearStdErrNotifications : ( ) => void ;
57
58
logLevel : LoggingLevel ;
58
59
sendLogLevelRequest : ( level : LoggingLevel ) => void ;
59
60
loggingSupported : boolean ;
@@ -78,6 +79,7 @@ const Sidebar = ({
78
79
onConnect,
79
80
onDisconnect,
80
81
stdErrNotifications,
82
+ clearStdErrNotifications,
81
83
logLevel,
82
84
sendLogLevelRequest,
83
85
loggingSupported,
@@ -514,9 +516,19 @@ const Sidebar = ({
514
516
{ stdErrNotifications . length > 0 && (
515
517
< >
516
518
< div className = "mt-4 border-t border-gray-200 pt-4" >
517
- < h3 className = "text-sm font-medium" >
518
- Error output from MCP server
519
- </ h3 >
519
+ < div className = "flex justify-between items-center" >
520
+ < h3 className = "text-sm font-medium" >
521
+ Error output from MCP server
522
+ </ h3 >
523
+ < Button
524
+ variant = "outline"
525
+ size = "sm"
526
+ onClick = { clearStdErrNotifications }
527
+ className = "h-8 px-2"
528
+ >
529
+ Clear
530
+ </ Button >
531
+ </ div >
520
532
< div className = "mt-2 max-h-80 overflow-y-auto" >
521
533
{ stdErrNotifications . map ( ( notification , index ) => (
522
534
< div
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ describe("Sidebar Environment Variables", () => {
29
29
onConnect : jest . fn ( ) ,
30
30
onDisconnect : jest . fn ( ) ,
31
31
stdErrNotifications : [ ] ,
32
+ clearStdErrNotifications : jest . fn ( ) ,
32
33
logLevel : "info" as const ,
33
34
sendLogLevelRequest : jest . fn ( ) ,
34
35
loggingSupported : true ,
You can’t perform that action at this time.
0 commit comments