@@ -499,10 +499,12 @@ export class McpHub {
499499 if ( isInfoOrStartupMessage ) {
500500 // Log normal informational messages
501501 console . log ( `Server "${ name } " info:` , output )
502- // Add to connection history with stdout level so they appear in white
502+ // Tag the message with stdout_info so we can identify it in the UI
503+ // but map it to "info" level for type compatibility
503504 const connection = this . findConnection ( name , source )
504505 if ( connection ) {
505- this . appendErrorMessage ( connection , output , "stdout" )
506+ // Add a prefix to identify this as a stdout message that's been mapped to info
507+ this . appendErrorMessage ( connection , `[STDOUT] ${ output } ` , "info" )
506508 await this . notifyWebviewOfServerChanges ( )
507509 }
508510 } else {
@@ -530,7 +532,8 @@ export class McpHub {
530532 console . log ( `Server "${ name } " stdout:` , output )
531533 const connection = this . findConnection ( name , source )
532534 if ( connection ) {
533- this . appendErrorMessage ( connection , output , "stdout" )
535+ // Add a prefix to identify this as a stdout message that's been mapped to info
536+ this . appendErrorMessage ( connection , `[STDOUT] ${ output } ` , "info" )
534537 await this . notifyWebviewOfServerChanges ( )
535538 }
536539 } )
@@ -619,14 +622,14 @@ export class McpHub {
619622 connection . server . errorHistory = [ ]
620623 }
621624
622- // Map "stdout" to "info" to avoid TypeScript errors
623- // while still allowing them to be displayed differently in the UI
624- const mappedLevel = level === "stdout" ? "info" : level
625+ // Note: We no longer need to map "stdout" to "info" here
626+ // as we're now adding the [STDOUT] prefix to the message itself
627+ // and directly using "info" level in the calling code
625628
626629 connection . server . errorHistory . push ( {
627630 message : truncatedError ,
628631 timestamp : Date . now ( ) ,
629- level : mappedLevel ,
632+ level : level ,
630633 } )
631634
632635 // Keep only the last 100 errors
0 commit comments