(filePath: string, outcome: 'accepted' | 'rejected')
| 186 | // Closes the diff. Instead of waiting for a notification, |
| 187 | // manually resolves the diff resolver as the desired outcome. |
| 188 | async resolveDiffFromCli(filePath: string, outcome: 'accepted' | 'rejected') { |
| 189 | const content = await this.closeDiff(filePath); |
| 190 | const resolver = this.diffResponses.get(filePath); |
| 191 | if (resolver) { |
| 192 | if (outcome === 'accepted') { |
| 193 | resolver({ status: 'accepted', content }); |
| 194 | } else { |
| 195 | resolver({ status: 'rejected', content: undefined }); |
| 196 | } |
| 197 | this.diffResponses.delete(filePath); |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | async disconnect() { |
| 202 | if (this.state.status === IDEConnectionStatus.Disconnected) { |
no test coverage detected