diff --git a/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts b/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts index 8f88f752baac4..233942a24d817 100644 --- a/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts +++ b/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts @@ -758,7 +758,7 @@ export class InlineChatController implements IEditorContribution { let newPosition: Position | undefined; if (response.result?.errorDetails) { - // + // error -> no message, errors are shown with the request } else if (response.response.value.length === 0) { // empty -> show message @@ -766,21 +766,21 @@ export class InlineChatController implements IEditorContribution { this._ui.value.zone.widget.updateStatus(status, { classes: ['warn'] }); } else { - // real response -> complex... + // real response -> no message this._ui.value.zone.widget.updateStatus(''); + } - const position = await this._strategy.renderChanges(); - if (position) { - // if the selection doesn't start far off we keep the widget at its current position - // because it makes reading this nicer - const selection = this._editor.getSelection(); - if (selection?.containsPosition(position)) { - if (position.lineNumber - selection.startLineNumber > 8) { - newPosition = position; - } - } else { + const position = await this._strategy.renderChanges(); + if (position) { + // if the selection doesn't start far off we keep the widget at its current position + // because it makes reading this nicer + const selection = this._editor.getSelection(); + if (selection?.containsPosition(position)) { + if (position.lineNumber - selection.startLineNumber > 8) { newPosition = position; } + } else { + newPosition = position; } } this._showWidget(this._session.headless, false, newPosition);