This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
// ANSI color codes for terminal output
constcolors={
reset:"\x1b[0m",
bright:"\x1b[1m",
dim:"\x1b[2m",
green:"\x1b[32m",
yellow:"\x1b[33m",
red:"\x1b[31m",
blue:"\x1b[34m",
};
exportclassMCPClientLogger{
privatereadonlyprefix: string;
privatereadonlydebugMode: boolean;
constructor(
prefix: string="NextChat MCP Client",
debugMode: boolean=false,
){
this.prefix=prefix;
this.debugMode=debugMode;
}
info(message: any){
this.print(colors.blue,message);
}
success(message: any){
this.print(colors.green,message);
}
error(message: any){
this.print(colors.red,message);
}
warn(message: any){
this.print(colors.yellow,message);
}
debug(message: any){
if(this.debugMode){
this.print(colors.dim,message);
}
}
/**
* Format message to string, if message is object, convert to JSON string