Skip to content

Handle pending confirmation as error case in inline chat#297673

Merged
jrieken merged 1 commit intomainfrom
joh/inlinechat-pending-confirmation-close
Feb 25, 2026
Merged

Handle pending confirmation as error case in inline chat#297673
jrieken merged 1 commit intomainfrom
joh/inlinechat-pending-confirmation-close

Conversation

@jrieken
Copy link
Copy Markdown
Member

@jrieken jrieken commented Feb 25, 2026

part two of #297375

Copilot AI review requested due to automatic review settings February 25, 2026 13:01
@jrieken jrieken enabled auto-merge (squash) February 25, 2026 13:01
@jrieken jrieken self-assigned this Feb 25, 2026
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Addresses inline chat “nothing happens” behavior when a request gets stuck waiting for user/tool confirmation (e.g., protected file flow triggered by file:// vs vscode-userdata://), by surfacing that pending-confirmation state in hover-mode UI and enabling users to close the session.

Changes:

  • Add a new context key to represent “pending confirmation” for inline chat requests.
  • Keep the hover-mode overlay visible when the last response is pending confirmation, and display an error-state message.
  • Adjust inline chat close action availability/toolbar primary actions to support exiting when confirmation is pending.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/vs/workbench/contrib/inlineChat/common/inlineChat.ts Adds CTX_INLINE_CHAT_PENDING_CONFIRMATION context key.
src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.ts Shows an error message for pending confirmation, adds logging, and makes inlineChat2.close a primary toolbar action.
src/vs/workbench/contrib/inlineChat/browser/inlineChatController.ts Tracks pending-confirmation state and keeps the hover overlay shown when confirmation is pending.
src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.ts Relaxes close action precondition and adds pending-confirmation condition to menu visibility.
Comments suppressed due to low confidence (1)

src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.ts:479

  • This logs pending.detail at info level. detail is derived from confirmation titles/tool invocation messages and may include user- or workspace-specific content; consider omitting it, sanitizing it, and/or lowering the log level (e.g. debug) to avoid leaking potentially sensitive information into logs.
		this._showStore.add(autorun(r => {
			const response = session.chatModel.lastRequestObs.read(r)?.response;
			const pending = response?.isPendingConfirmation.read(r);
			if (pending) {
				this._logService.info(`[InlineChat] UNEXPECTED approval needed: ${pending.detail ?? 'unknown'}`);
			}

@jrieken jrieken merged commit 15648f1 into main Feb 25, 2026
24 checks passed
@jrieken jrieken deleted the joh/inlinechat-pending-confirmation-close branch February 25, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants