Skip to content

Conversation

@meganrogge
Copy link
Contributor

@meganrogge meganrogge commented Jan 10, 2026

Debugging showed the completions were getting created correctly, but then were filtered out.

This was happening because we were using the local path sep instead of the one from the extension host. The fix is to pass pathSep into TerminalCompletionItem.

fixes #286155

Copy link
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

This PR fixes an issue where terminal completions in remote scenarios (e.g., WSL) were incorrectly filtered out due to using the local platform's path separator instead of the remote extension host's path separator.

Key changes:

  • Detects path separator from completion labels coming from the extension host
  • Passes the detected path separator to TerminalCompletionItem for proper path normalization
  • Removes hardcoded reliance on local platform path separator (isWindows and sep)

Reviewed changes

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

File Description
src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalSuggestAddon.ts Changes _pathSeparator from hardcoded sep to detected value from completion labels; passes path separator to TerminalCompletionItem constructor; adds null checks before using path separator
src/vs/workbench/contrib/terminalContrib/suggest/browser/terminalCompletionItem.ts Adds optional pathSeparator parameter to constructor; replaces isWindows check with explicit path separator comparison; defaults to Unix-style paths when separator is undefined

Copy link
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@meganrogge meganrogge enabled auto-merge January 10, 2026 01:47
Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

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

Possible to write a test for this?

@meganrogge meganrogge merged commit f9112db into main Jan 10, 2026
22 checks passed
@meganrogge meganrogge deleted the merogge/fix-wsl-finally branch January 10, 2026 04:26
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.

File completions aren't working for WSL

3 participants