File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/vs/workbench/contrib/inlineChat/browser Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -196,23 +196,23 @@ export class InlineChatController implements IEditorContribution {
196
196
197
197
private _showWidget ( initialRender : boolean = false ) {
198
198
assertType ( this . _editor . hasModel ( ) ) ;
199
- assertType ( this . _activeSession ) ;
200
199
201
200
let widgetPosition : Position ;
202
201
if ( initialRender ) {
203
202
widgetPosition = this . _editor . getSelection ( ) . getEndPosition ( ) ;
204
203
this . _zone . value . setContainerMargins ( ) ;
205
204
this . _zone . value . setWidgetMargins ( widgetPosition ) ;
206
205
} else {
206
+ assertType ( this . _activeSession ) ;
207
207
assertType ( this . _strategy ) ;
208
208
widgetPosition = this . _strategy . getWidgetPosition ( ) ?? this . _zone . value . position ?? this . _activeSession . wholeRange . value . getEndPosition ( ) ;
209
209
const needsMargin = this . _strategy . needsMargin ( ) ;
210
210
if ( ! needsMargin ) {
211
211
this . _zone . value . setWidgetMargins ( widgetPosition , 0 ) ;
212
212
}
213
+ this . _zone . value . updateBackgroundColor ( widgetPosition , this . _activeSession . wholeRange . value ) ;
213
214
}
214
215
this . _zone . value . show ( widgetPosition ) ;
215
- this . _zone . value . updateBackgroundColor ( widgetPosition , this . _activeSession . wholeRange . value ) ;
216
216
}
217
217
218
218
protected async _nextState ( state : State , options : InlineChatRunOptions ) : Promise < void > {
You can’t perform that action at this time.
0 commit comments