Fix terminal approval UI missing backslashes on Windows paths#309797
Draft
Fix terminal approval UI missing backslashes on Windows paths#309797
Conversation
… backslashes The BaseChatConfirmationWidget was embedding plain string titles directly as raw markdown via `new MarkdownString(rawValue)`. This caused backslashes in Windows paths to be interpreted as markdown escape characters (e.g., `\:` becomes `:`), stripping path separators from the display. Fix: use `appendText()` for string titles (which escapes markdown syntax characters) and `appendMarkdown()` for IMarkdownString titles (preserving existing markdown). The icon is always added via `appendMarkdown()`. Fixes #252657 Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/fcbf82c6-2113-4f78-832d-830ce949d7c0 Co-authored-by: hediet <2931520+hediet@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix terminal approval UI missing slashes on Windows
Fix terminal approval UI missing backslashes on Windows paths
Apr 14, 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.
Terminal confirmation dialog renders Windows paths without separators (e.g.
D:devmicrosoftvscode-packagesvscode-settings-historyinstead ofD:\dev\microsoft\vscode-packages\vscode-settings-history).BaseChatConfirmationWidgetwas embedding plain string titles directly intonew MarkdownString(rawValue), causing backslashes to be interpreted as markdown escape characters. In particular,\:is a valid markdown escape that strips the preceding backslash.Fix: Compose the
MarkdownStringproperly based on the title type:appendText()(escapes markdown syntax including backslashes)appendMarkdown()(preserves existing markdown)appendMarkdown()(theme icon syntax)Note:
BaseSimpleChatConfirmationWidgetalready passestitledirectly toChatQueryTitlePart, which handles string vs IMarkdownString correctly viatoMdString(). OnlyBaseChatConfirmationWidgethad the problematic raw embedding.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
redirector.gvt1.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --crashpad-handler-pid=8131 --enable-crash-reporter=6010be29-e499-4311-bbe3-c34ba17fa46a,no_channel --user-data-dir=/tmp/vscode-tests-1776163004380 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,11577962897854271121,13545931210410912147,262144 --enable-features=PdfUseShowSaveFilePicker --disable-features=LocalNetworkAccessChecks,ScreenAIOCREnabled,SpareRendererForSitePerProcess,TraceSiteInstanceGetProcessCreation --variations-seed-version --trace-process-track-uuid=3190708989122997041 tnet/tools/git(dns block).build/electron/code-oss .build/electron/code-oss test/unit/electron/index.js --crash-reporter-directory=/home/REDACTED/work/vscode/vscode/.build/crashes --run src/vs/base/test/common/htmlContent.test.ts --timeout 30000(dns block)If you need me to access, download, or install something from one of these locations, you can either: