Merge branch 'main' into add_proxy_config
This commit is contained in:
commit
debb00344a
1 changed files with 83 additions and 39 deletions
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue