Prettier formatting

This commit is contained in:
Allen Zhou 2025-02-19 10:30:17 -08:00
commit 7b68e28f05
2 changed files with 6 additions and 7 deletions

View file

@ -68,7 +68,7 @@ class MCPClient {
}); });
console.log( console.log(
"Connected to server with tools:", "Connected to server with tools:",
this.tools.map(({ name }) => name) this.tools.map(({ name }) => name),
); );
} catch (e) { } catch (e) {
console.log("Failed to connect to MCP server: ", e); console.log("Failed to connect to MCP server: ", e);
@ -90,7 +90,6 @@ class MCPClient {
}, },
]; ];
// Initial Claude API call // Initial Claude API call
const response = await this.anthropic.messages.create({ const response = await this.anthropic.messages.create({
model: "claude-3-5-sonnet-20241022", model: "claude-3-5-sonnet-20241022",
@ -117,7 +116,7 @@ class MCPClient {
}); });
toolResults.push(result); toolResults.push(result);
finalText.push( finalText.push(
`[Calling tool ${toolName} with args ${JSON.stringify(toolArgs)}]` `[Calling tool ${toolName} with args ${JSON.stringify(toolArgs)}]`,
); );
// Continue conversation with tool results // Continue conversation with tool results
@ -134,7 +133,7 @@ class MCPClient {
}); });
finalText.push( finalText.push(
response.content[0].type === "text" ? response.content[0].text : "" response.content[0].type === "text" ? response.content[0].text : "",
); );
} }
} }