Skip to content

Commit

Permalink
only render change decorations while in modified state (#230778)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken authored Oct 8, 2024
1 parent ad9d886 commit 14ce43e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vs/workbench/contrib/chat/browser/chatEditorController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { IEditorContribution } from '../../../../editor/common/editorCommon.js';
import { IModelDeltaDecoration, ITextModel } from '../../../../editor/common/model.js';
import { IEditorWorkerService } from '../../../../editor/common/services/editorWorker.js';
import { InlineDecoration, InlineDecorationType } from '../../../../editor/common/viewModel.js';
import { IChatEditingService, IChatEditingSession, IModifiedFileEntry } from '../common/chatEditingService.js';
import { IChatEditingService, IChatEditingSession, IModifiedFileEntry, WorkingSetEntryState } from '../common/chatEditingService.js';

export class ChatEditorController extends Disposable implements IEditorContribution {

Expand Down Expand Up @@ -59,7 +59,8 @@ export class ChatEditorController extends Disposable implements IEditorContribut
const model = this._editor.getModel();
const editingSession = this._chatEditingService.getEditingSession(model.uri);
const entry = this._getEntry(editingSession, model);
if (!entry) {

if (!entry || entry.state.get() !== WorkingSetEntryState.Modified) {
this._clearRendering();
return;
}
Expand Down

0 comments on commit 14ce43e

Please sign in to comment.