Change:
this._openers.set(TerminalBuiltinLinkType.LocalFile, localFileOpener); this._openers.set(TerminalBuiltinLinkType.LocalFolderInWorkspace, localFolderInWorkspaceOpener); this._openers.set(TerminalBuiltinLinkType.LocalFolderOutsideWorkspace, this._instantiationService.createInstance(TerminalLocalFolderOutsideWorkspaceLinkOpener)); <del> this._openers.set(TerminalBuiltinLinkType.Search, this._instantiationService.createInstance(TerminalSearchLinkOpener, capabilities, localFileOpener, localFolderInWorkspaceOpener, this._processManager.os || OS)); </del> <ins> this._openers.set(TerminalBuiltinLinkType.Search, this._instantiationService.createInstance(TerminalSearchLinkOpener, capabilities, this._processManager.getInitialCwd(), localFileOpener, localFolderInWorkspaceOpener, this._processManager.os || OS)); </ins> this._openers.set(TerminalBuiltinLinkType.Url, this._instantiationService.createInstance(TerminalUrlLinkOpener, !!this._processManager.remoteAuthority)); this._registerStandardLinkProviders();

Discussion:
<!-- Do Not Delete This! featurerequesttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Describe the feature you'd like. --Under remote development, if you click a file from terminal(eg, after ls command)Vscode will try to open a file named the one you just clicked. Actually, the absolute path of the file is already known, So why not open it directly in the editor? I think that would be very useful. Please consider it.
Are you talking about this new behavior? ! I CMD + Clicked on the underlined path and it used to open the file directly since its obvious which file it is. But since a few days or weeks (idk exactly) it opens this menu for me to select the file from a list of files with similar paths. Its pretty annoying and id really like the old behavior back. If you are talking about something different let me know so i can open a separate issue.
Yes, it is. I prefer old behavior too.
what is the working directory of the terminal you're in? The current expected behavior is to open the file directly if you cwd is the folder containing , otherwise a workspace search will happen.
I, obviously, don't know for him but in my example the working directory of the terminal is the folder containing .
hmm ok, I'll try investigate this next month.
For me, mostly, it's project home folder(src's parent folder).
Can reproduce on Windows: ! Shell integration must be disabled, there's also some caching here so try after restarting the window if disabling shell integration.
I can still reproduce this in the latest insiders. I ctrl+clicked on "". Shell integration is off. I closed all VS Code insiders windows before trying to repro. !
I can repro but only in a Windows remote (Windows -Window), not a WSL remote (Windows -Linux).
With file structure: Clicking a link: ! The expectation here is to open immediately without the search because while matches a search it does not match the folder prefix.
Moving to July as it's only for Windows remotes.

Also spotted this one:
I can still repro the issue from Windows -Windows remote Version: 1.70.0-insider (system setup) Commit: Using my cloned version of the tree-view extension sample as the open folder and running in the terminal. Tried with shell integration on and off. (and closed all insiders windows inbetween)
I can't reproduce this: ! I saw this related minor issue , but I think this issue is fixed.
I'm still seeing it with the insiders from today.
Actually, I can't get shell integration to turn on even after a restart. I set the setting, but the circle never shows.
that would be the reason then, there could be a few reasons for that. There may be a warning in your console, or are you using powershell 5?
My powershell version is 7.2.5. I have this error in the pty log:
Verified. Here's the Powershell profile I have: Powershell 7 for me is at . Windows Powershell is at . I wonder whether your profile is picking up Windows Powershell by accident?