mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
don't double apply workspace edits when getting from the chat ext (#193995)
This commit is contained in:
parent
fb50e794eb
commit
888d8d5cab
|
@ -593,7 +593,7 @@ export class InlineChatController implements IEditorContribution {
|
|||
}
|
||||
}
|
||||
|
||||
private async [State.APPLY_RESPONSE](): Promise<State.SHOW_RESPONSE | State.ACCEPT> {
|
||||
private async [State.APPLY_RESPONSE](): Promise<State.SHOW_RESPONSE | State.CANCEL> {
|
||||
assertType(this._activeSession);
|
||||
assertType(this._strategy);
|
||||
|
||||
|
@ -604,7 +604,7 @@ export class InlineChatController implements IEditorContribution {
|
|||
|
||||
const canContinue = this._strategy.checkChanges(response);
|
||||
if (!canContinue) {
|
||||
return State.ACCEPT;
|
||||
return State.CANCEL;
|
||||
}
|
||||
}
|
||||
return State.SHOW_RESPONSE;
|
||||
|
@ -643,7 +643,7 @@ export class InlineChatController implements IEditorContribution {
|
|||
}
|
||||
}
|
||||
|
||||
private async [State.SHOW_RESPONSE](): Promise<State.WAIT_FOR_INPUT | State.ACCEPT> {
|
||||
private async [State.SHOW_RESPONSE](): Promise<State.WAIT_FOR_INPUT | State.CANCEL> {
|
||||
assertType(this._activeSession);
|
||||
assertType(this._strategy);
|
||||
|
||||
|
@ -705,7 +705,7 @@ export class InlineChatController implements IEditorContribution {
|
|||
|
||||
const canContinue = this._strategy.checkChanges(response);
|
||||
if (!canContinue) {
|
||||
return State.ACCEPT;
|
||||
return State.CANCEL;
|
||||
}
|
||||
status = this._configurationService.getValue('accessibility.verbosity.inlineChat') === true ? localize('editResponseMessage', "Use tab to navigate to the diff editor and review proposed changes.") : '';
|
||||
await this._strategy.renderChanges(response);
|
||||
|
|
Loading…
Reference in a new issue