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
commit debb00344a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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,
};
}