pull/234518/head
Don Jayamanne 2024-11-25 09:38:26 +11:00
parent b485915e5f
commit 58bc2dcc41
No known key found for this signature in database
GPG Key ID: 6E3F5E00E1354B5F
3 changed files with 3 additions and 4 deletions

View File

@ -187,7 +187,7 @@ export class ChatEditingModifiedFileEntry extends Disposable implements IModifie
createSnapshot(requestId: string | undefined): ITextSnapshotEntry {
this._isFirstEditAfterStartOrSnapshot = true;
return TextSnapshotEntry.create(this, this._telemetryInfo.sessionId, requestId, this._edit, this.instantiationService);
return TextSnapshotEntry.create(this, requestId, this._edit, this.instantiationService);
}
restoreFromSnapshot(snapshot: ITextSnapshotEntry) {
@ -513,7 +513,7 @@ export class TextSnapshotEntry implements ITextSnapshotEntry {
}
}
function getStorageLocation(chatSessionId: string, workspaceContextService: IWorkspaceContextService, environmentService: IEnvironmentService): URI {
export function getStorageLocation(chatSessionId: string, workspaceContextService: IWorkspaceContextService, environmentService: IEnvironmentService): URI {
const workspaceId = workspaceContextService.getWorkspace().id;
return joinPath(environmentService.workspaceStorageHome, workspaceId, 'chatEditingSessions', chatSessionId);
}

View File

@ -12,7 +12,6 @@ import { Disposable, DisposableMap, DisposableStore, MutableDisposable } from '.
import { ResourceSet } from '../../../../base/common/map.js';
import { autorunWithStore } from '../../../../base/common/observable.js';
import { isEqual } from '../../../../base/common/resources.js';
import { assertType } from '../../../../base/common/types.js';
import { URI } from '../../../../base/common/uri.js';
import { ServicesAccessor } from '../../../../editor/browser/editorExtensions.js';
import { localize } from '../../../../nls.js';
@ -32,7 +31,6 @@ import { ChatContextKeys } from '../common/chatContextKeys.js';
import { applyingChatEditsFailedContextKey, CHAT_EDITING_MULTI_DIFF_SOURCE_RESOLVER_SCHEME, hasAppliedChatEditsContextKey, hasUndecidedChatEditingResourceContextKey, IChatEditingService, IChatEditingSession, IModifiedFileEntry, WorkingSetEntryState } from '../common/chatEditingService.js';
import { IChatModel } from '../common/chatModel.js';
import { IChatService } from '../common/chatService.js';
import { ChatEditingModifiedFileEntry } from './chatEditing/chatEditingModifiedFileEntry.js';
export class ChatEditorSaving extends Disposable implements IWorkbenchContribution {

View File

@ -201,6 +201,7 @@ export interface IModifiedTextFileEntry extends IModifiedAnyFileEntry {
readonly kind: 'text';
readonly originalModel: ITextModel;
readonly modifiedModel: ITextModel;
readonly initialContent: string;
createSnapshot(requestId: string | undefined): ITextSnapshotEntry;
restoreFromSnapshot(snapshot: ITextSnapshotEntry): void;
}