This commit is contained in:
Matt Rubens
2025-01-02 21:36:05 -08:00
parent 8cb44aa695
commit d32c5f805e
2 changed files with 6 additions and 5 deletions

View File

@@ -780,7 +780,10 @@ export class Cline {
async *attemptApiRequest(previousApiReqIndex: number): ApiStream {
let mcpHub: McpHub | undefined
if (this.providerRef.deref()?.mcpEnabled ?? true) {
const { mcpEnabled } = await this.providerRef.deref()?.getState() ?? {}
if (mcpEnabled ?? true) {
mcpHub = this.providerRef.deref()?.mcpHub
if (!mcpHub) {
throw new Error("MCP hub not available")