Merge branch 'main' into add_proxy_config

This commit is contained in:
Pulkit Sharma
2025-04-02 13:43:42 +05:30
committed by GitHub
10 changed files with 83 additions and 39 deletions

View File

@@ -342,6 +342,14 @@ export function useConnection({
}
};
const disconnect = async () => {
await mcpClient?.close();
setMcpClient(null);
setConnectionStatus("disconnected");
setCompletionsSupported(false);
setServerCapabilities(null);
};
return {
connectionStatus,
serverCapabilities,
@@ -352,5 +360,6 @@ export function useConnection({
handleCompletion,
completionsSupported,
connect,
disconnect,
};
}