Disconnect a single server (keeps config; marks it disabled).
(name: string)
| 128 | |
| 129 | /** Disconnect a single server (keeps config; marks it disabled). */ |
| 130 | async disconnectOne(name: string): Promise<void> { |
| 131 | const connection = this.connections.get(name) |
| 132 | if (connection) { |
| 133 | await connection.close() |
| 134 | this.connections.delete(name) |
| 135 | } |
| 136 | const state = this.states.get(name) |
| 137 | if (state) { |
| 138 | state.status = "disabled" |
| 139 | state.toolCount = 0 |
| 140 | state.detail = undefined |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | /** Enable a project server (approving it) and connect. Uses |
| 145 | * skipUnauthOAuth so enabling doesn't open a browser — the user auths |
no outgoing calls
no test coverage detected