()
| 199 | } |
| 200 | |
| 201 | async disconnect() { |
| 202 | if (this.state.status === IDEConnectionStatus.Disconnected) { |
| 203 | return; |
| 204 | } |
| 205 | for (const filePath of this.diffResponses.keys()) { |
| 206 | await this.closeDiff(filePath); |
| 207 | } |
| 208 | this.diffResponses.clear(); |
| 209 | this.setState( |
| 210 | IDEConnectionStatus.Disconnected, |
| 211 | 'IDE integration disabled. To enable it again, run /ide enable.', |
| 212 | ); |
| 213 | this.client?.close(); |
| 214 | } |
| 215 | |
| 216 | getCurrentIde(): DetectedIde | undefined { |
| 217 | return this.currentIde; |