mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 14:10:37 -07:00
refactor(core): use assertConnected in McpClient discover method (#10989)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user