mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 10:34:35 -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.
|
* Discovers tools and prompts from the MCP server.
|
||||||
*/
|
*/
|
||||||
async discover(cliConfig: Config): Promise<void> {
|
async discover(cliConfig: Config): Promise<void> {
|
||||||
if (this.status !== MCPServerStatus.CONNECTED) {
|
this.assertConnected();
|
||||||
throw new Error('Client is not connected.');
|
|
||||||
}
|
|
||||||
|
|
||||||
const prompts = await this.discoverPrompts();
|
const prompts = await this.discoverPrompts();
|
||||||
const tools = await this.discoverTools(cliConfig);
|
const tools = await this.discoverTools(cliConfig);
|
||||||
|
|||||||
Reference in New Issue
Block a user