mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 08:37:22 +00:00
Fix linter issues
This commit is contained in:
1 file changed
+6
-6
@@ -14,20 +14,20 @@ export function useMCPServerStatus(server: MCPServer): 'connected' | 'offline' |
|
|||||||
|
|
||||||
async function checkConnection() {
|
async function checkConnection() {
|
||||||
setStatus('checking');
|
setStatus('checking');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const client = new MCPClient(server);
|
const client = new MCPClient(server);
|
||||||
await client.connect();
|
await client.connect();
|
||||||
|
|
||||||
// Try to list tools to verify the connection is working
|
// Try to list tools to verify the connection is working
|
||||||
await client.listTools();
|
await client.listTools();
|
||||||
|
|
||||||
await client.close();
|
await client.close();
|
||||||
|
|
||||||
if (!cancelled) {
|
if (!cancelled) {
|
||||||
setStatus('connected');
|
setStatus('connected');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch {
|
||||||
if (!cancelled) {
|
if (!cancelled) {
|
||||||
setStatus('offline');
|
setStatus('offline');
|
||||||
}
|
}
|
||||||
@@ -39,7 +39,7 @@ export function useMCPServerStatus(server: MCPServer): 'connected' | 'offline' |
|
|||||||
return () => {
|
return () => {
|
||||||
cancelled = true;
|
cancelled = true;
|
||||||
};
|
};
|
||||||
}, [server.url]); // Re-check when URL changes
|
}, [server]); // Re-check when server config changes
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user