From f69012e7a3a2373cb546409ce374f557382f43bc Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 2 Mar 2026 09:22:29 +0100 Subject: [PATCH] fix: include error handling in inline chat session overlay logic (#298651) re https://github.com/microsoft/vscode/issues/298647 --- .../contrib/inlineChat/browser/inlineChatController.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts b/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts index ad180ba141c..76aa39da942 100644 --- a/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts +++ b/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts @@ -362,12 +362,13 @@ export class InlineChatController implements IEditorContribution { const lastRequest = session.chatModel.lastRequestObs.read(r); const isInProgress = lastRequest?.response?.isInProgress.read(r); const isPendingConfirmation = !!lastRequest?.response?.isPendingConfirmation.read(r); + const isError = !!lastRequest?.response?.result?.errorDetails; ctxPendingConfirmation.set(isPendingConfirmation); const entry = session.editingSession.readEntry(session.uri, r); // When there's no entry (no changes made) and the response is complete, the widget should be hidden. // When there's an entry in Modified state, it needs to be settled (accepted/rejected). const isNotSettled = entry ? entry.state.read(r) === ModifiedFileEntryState.Modified : false; - if (isInProgress || isNotSettled || isPendingConfirmation) { + if (isInProgress || isNotSettled || isPendingConfirmation || isError) { sessionOverlayWidget.show(session); } else { sessionOverlayWidget.hide();