refactor(core): use assertConnected in McpClient discover method (#10989)

This commit is contained in:
Alexander
2025-10-14 01:57:10 +09:00
committed by GitHub
parent 19c1d73405
commit 7beaa368a9

View File

@@ -132,9 +132,7 @@ export class McpClient {
* Discovers tools and prompts from the MCP server.
*/
async discover(cliConfig: Config): Promise<void> {
if (this.status !== MCPServerStatus.CONNECTED) {
throw new Error('Client is not connected.');
}
this.assertConnected();
const prompts = await this.discoverPrompts();
const tools = await this.discoverTools(cliConfig);