MCPcopy Create free account
hub / github.com/Roy3838/Observer / updateCustomServerStatus

Method updateCustomServerStatus

app/src/utils/ModelManager.ts:425–439  ·  view source on GitHub ↗
(address: string, status: 'online' | 'offline')

Source from the content-addressed store, hash-verified

423 }
424
425 public updateCustomServerStatus(address: string, status: 'online' | 'offline'): CustomServer[] {
426 const server = this.customServers.find(s => s.address === address);
427 if (server) {
428 server.status = status;
429 this.saveCustomServersToStorage();
430
431 if (status === 'online' && server.enabled) {
432 this.addServer(address);
433 } else {
434 this.removeServer(address);
435 }
436 }
437
438 return [...this.customServers];
439 }
440
441 public async checkCustomServer(address: string): Promise<{ status: 'online' | 'offline'; error?: string }> {
442 const result = await this.checkServer(address);

Callers 2

checkCustomServerMethod · 0.95
updateCustomServerStatusFunction · 0.80

Calls 3

addServerMethod · 0.95
removeServerMethod · 0.95

Tested by

no test coverage detected