Handle pending confirmation as error case in inline chat#297673
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.detailat info level.detailis 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'}`);
}
dbaeumer
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
part two of #297375