MCPcopy Create free account
hub / github.com/anus-dev/ANUS / resolveDiffFromCli

Method resolveDiffFromCli

packages/core/src/ide/ide-client.ts:188–199  ·  view source on GitHub ↗
(filePath: string, outcome: 'accepted' | 'rejected')

Source from the content-addressed store, hash-verified

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) {

Callers 1

handleConfirmFunction · 0.80

Calls 2

closeDiffMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected