@@ -16,7 +16,7 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
16
16
import { EditOperation } from 'vs/editor/common/core/editOperation' ;
17
17
import { Position } from 'vs/editor/common/core/position' ;
18
18
import { IRange , Range } from 'vs/editor/common/core/range' ;
19
- import { IEditorContribution } from 'vs/editor/common/editorCommon' ;
19
+ import { IEditorContribution , ScrollType } from 'vs/editor/common/editorCommon' ;
20
20
import { ModelDecorationOptions , createTextBufferFactoryFromSnapshot } from 'vs/editor/common/model/textModel' ;
21
21
import { IEditorWorkerService } from 'vs/editor/common/services/editorWorker' ;
22
22
import { IModelService } from 'vs/editor/common/services/model' ;
@@ -309,9 +309,16 @@ export class InlineChatController implements IEditorContribution {
309
309
310
310
this . _zone . value . widget . updateSlashCommands ( this . _activeSession . session . slashCommands ?? [ ] ) ;
311
311
this . _zone . value . widget . placeholder = this . _getPlaceholderText ( ) ;
312
- this . _zone . value . widget . value = this . _activeSession . lastInput ?. value ?? this . _zone . value . widget . value ;
313
312
this . _zone . value . widget . updateInfo ( this . _activeSession . session . message ?? localize ( 'welcome.1' , "AI-generated code may be incorrect" ) ) ;
314
313
this . _zone . value . widget . preferredExpansionState = this . _activeSession . lastExpansionState ;
314
+ this . _zone . value . widget . value = this . _activeSession . lastInput ?. value ?? this . _zone . value . widget . value ;
315
+ this . _zone . value . widget . onDidChangeInput ( _ => {
316
+ const pos = this . _zone . value . position ;
317
+ if ( pos && this . _zone . value . widget . hasFocus ( ) && this . _zone . value . widget . value ) {
318
+ this . _editor . revealPosition ( pos , ScrollType . Smooth ) ;
319
+ }
320
+ } ) ;
321
+
315
322
this . _showWidget ( false ) ;
316
323
317
324
this . _sessionStore . add ( this . _editor . onDidChangeModel ( ( e ) => {
0 commit comments