add attempt to InteractiveEditorRequest (#183447)

https://github.com/microsoft/vscode-internalbacklog/issues/3694
This commit is contained in:
Johannes Rieken 2023-05-25 18:38:36 +02:00 committed by GitHub
parent 52e56ad19a
commit 898311b454
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 1 deletions

View file

@ -139,6 +139,7 @@ export class ExtHostInteractiveEditor implements ExtHostInteractiveEditorShape {
prompt: request.prompt,
selection: typeConvert.Selection.to(request.selection),
wholeRange: typeConvert.Range.to(request.wholeRange),
attempt: request.attempt,
}, token);
if (res) {

View file

@ -433,7 +433,8 @@ export class InteractiveEditorController implements IEditorContribution {
const request: IInteractiveEditorRequest = {
prompt: this._activeSession.lastInput,
selection: this._editor.getSelection(),
wholeRange: this._activeSession.wholeRange
wholeRange: this._activeSession.wholeRange,
attempt: 0,
};
const task = this._activeSession.provider.provideResponse(this._activeSession.session, request, requestCts.token);
this._logService.trace('[IE] request started', this._activeSession.provider.debugName, this._activeSession.session, request);

View file

@ -37,6 +37,7 @@ export interface IInteractiveEditorRequest {
prompt: string;
selection: ISelection;
wholeRange: IRange;
attempt: number;
}
export type IInteractiveEditorResponse = IInteractiveEditorEditResponse | IInteractiveEditorBulkEditResponse | IInteractiveEditorMessageResponse;

View file

@ -26,6 +26,7 @@ declare module 'vscode' {
selection: Selection;
wholeRange: Range;
attempt: number;
}
// todo@API make classes