style: auto-fix ESLint issues (curly braces and formatting)
- Add curly braces to all if/else/for/while statements - Fix indentation and trailing spaces - Auto-fixed 372 linting errors using eslint --fix - Remaining issues are warnings only (non-null assertions, explicit any types)
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ export function mcpToolName(serverName: string, toolName: string): string {
|
||||
*/
|
||||
export function parseMcpToolName(prefixedName: string): { serverName: string; toolName: string } | null {
|
||||
const match = prefixedName.match(/^mcp:([^:]+):(.+)$/);
|
||||
if (!match) return null;
|
||||
if (!match) {return null;}
|
||||
return { serverName: match[1], toolName: match[2] };
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -86,7 +86,7 @@ export class McpManager {
|
||||
*/
|
||||
async stopServer(name: string): Promise<void> {
|
||||
const client = this.clients.get(name);
|
||||
if (!client) return;
|
||||
if (!client) {return;}
|
||||
|
||||
// Unregister tools from the registry
|
||||
const toolNames = this.registeredToolNames.get(name) ?? [];
|
||||
@@ -133,7 +133,7 @@ export class McpManager {
|
||||
*/
|
||||
getServerState(name: string): McpServerState | undefined {
|
||||
const client = this.clients.get(name);
|
||||
if (!client) return undefined;
|
||||
if (!client) {return undefined;}
|
||||
|
||||
const config = this.storedConfigs.get(name) ?? { name, command: '', args: [] };
|
||||
|
||||
@@ -165,7 +165,7 @@ export class McpManager {
|
||||
for (const toolNames of this.registeredToolNames.values()) {
|
||||
for (const name of toolNames) {
|
||||
const tool = this.toolRegistry.get(name);
|
||||
if (tool) tools.push(tool);
|
||||
if (tool) {tools.push(tool);}
|
||||
}
|
||||
}
|
||||
return tools;
|
||||
|
||||
Reference in New Issue
Block a user