🔄 fix: Improve MCP Connection Cleanup (#7400)

* chore: linting for mcp related modules

* fix: update `isConnected` method to return a Promise and handle connection state asynchronously to properly handle/cleanup disconnected user connections
This commit is contained in:
Danny Avila 2025-05-15 12:17:17 -04:00 committed by GitHub
parent 535e7798b3
commit fe311df969
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 29 additions and 12 deletions

View file

@ -1,5 +1,13 @@
import type * as t from './types/mcp';
const RECOGNIZED_PROVIDERS = new Set(['google', 'anthropic', 'openai', 'openrouter', 'xai', 'deepseek', 'ollama']);
const RECOGNIZED_PROVIDERS = new Set([
'google',
'anthropic',
'openai',
'openrouter',
'xai',
'deepseek',
'ollama',
]);
const CONTENT_ARRAY_PROVIDERS = new Set(['google', 'anthropic', 'openai']);
const imageFormatters: Record<string, undefined | t.ImageFormatter> = {