@@ -22,7 +22,7 @@ import { EditorExtensionsRegistry } from 'vs/editor/browser/editorExtensions';
22
22
import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2' ;
23
23
import { IModelService } from 'vs/editor/common/services/model' ;
24
24
import { URI } from 'vs/base/common/uri' ;
25
- import { EmbeddedCodeEditorWidget , EmbeddedDiffEditorWidget } from 'vs/editor/browser/widget/embeddedCodeEditorWidget' ;
25
+ import { EmbeddedCodeEditorWidget , EmbeddedDiffEditorWidget2 } from 'vs/editor/browser/widget/embeddedCodeEditorWidget' ;
26
26
import { HiddenItemStrategy , MenuWorkbenchToolBar } from 'vs/platform/actions/browser/toolbar' ;
27
27
import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar' ;
28
28
import { SuggestController } from 'vs/editor/contrib/suggest/browser/suggestController' ;
@@ -164,7 +164,7 @@ export class InlineChatWidget {
164
164
165
165
private readonly _progressBar : ProgressBar ;
166
166
167
- private readonly _previewDiffEditor : IdleValue < EmbeddedDiffEditorWidget > ;
167
+ private readonly _previewDiffEditor : IdleValue < EmbeddedDiffEditorWidget2 > ;
168
168
private readonly _previewDiffModel = this . _store . add ( new MutableDisposable ( ) ) ;
169
169
170
170
private readonly _previewCreateTitle : ResourceLabel ;
@@ -329,7 +329,7 @@ export class InlineChatWidget {
329
329
this . _store . add ( feedbackToolbar ) ;
330
330
331
331
// preview editors
332
- this . _previewDiffEditor = new IdleValue ( ( ) => this . _store . add ( _instantiationService . createInstance ( EmbeddedDiffEditorWidget , this . _elements . previewDiff , _previewEditorEditorOptions , { modifiedEditor : codeEditorWidgetOptions , originalEditor : codeEditorWidgetOptions } , parentEditor ) ) ) ;
332
+ this . _previewDiffEditor = new IdleValue ( ( ) => this . _store . add ( _instantiationService . createInstance ( EmbeddedDiffEditorWidget2 , this . _elements . previewDiff , _previewEditorEditorOptions , { modifiedEditor : codeEditorWidgetOptions , originalEditor : codeEditorWidgetOptions } , parentEditor ) ) ) ;
333
333
334
334
this . _previewCreateTitle = this . _store . add ( _instantiationService . createInstance ( ResourceLabel , this . _elements . previewCreateTitle , { supportIcons : true } ) ) ;
335
335
this . _previewCreateEditor = new IdleValue ( ( ) => this . _store . add ( _instantiationService . createInstance ( EmbeddedCodeEditorWidget , this . _elements . previewCreate , _previewEditorEditorOptions , codeEditorWidgetOptions , parentEditor ) ) ) ;
@@ -408,7 +408,7 @@ export class InlineChatWidget {
408
408
const base = getTotalHeight ( this . _elements . progress ) + getTotalHeight ( this . _elements . status ) ;
409
409
const editorHeight = this . _inputEditor . getContentHeight ( ) + 12 /* padding and border */ ;
410
410
const markdownMessageHeight = getTotalHeight ( this . _elements . markdownMessage ) ;
411
- const previewDiffHeight = this . _previewDiffEditor . value . getModel ( ) . modified ? 12 + Math . min ( 300 , Math . max ( 0 , this . _previewDiffEditor . value . getContentHeight ( ) ) ) : 0 ;
411
+ const previewDiffHeight = this . _previewDiffEditor . value . getModel ( ) ? 12 + Math . min ( 300 , Math . max ( 0 , this . _previewDiffEditor . value . getContentHeight ( ) ) ) : 0 ;
412
412
const previewCreateTitleHeight = getTotalHeight ( this . _elements . previewCreateTitle ) ;
413
413
const previewCreateHeight = this . _previewCreateEditor . value . getModel ( ) ? 18 + Math . min ( 300 , Math . max ( 0 , this . _previewCreateEditor . value . getContentHeight ( ) ) ) : 0 ;
414
414
return base + editorHeight + markdownMessageHeight + previewDiffHeight + previewCreateTitleHeight + previewCreateHeight + 18 /* padding */ + 8 /*shadow*/ ;
0 commit comments