Do not search for matches in the workspace when creating links in the terminal, as this impacts performance in large workspaces. Instead, search for a match only when the user wants to open a link. If the match can't be found, open the quick input service and let the user select from a list of possible matches.
Additionally, the LocalFileLinkProvider no longer matches single words, to avoid polluting the terminal with links.
Fixes #13712
Fixes #13576
Contributed on behalf of STMicroelectronics
How to test
Open a workspace and echo some partial paths in the terminal. All paths that can be resolved to a workspace file should have valid links that can be used to open the files from the terminal, e.g.:
What it does
Do not search for matches in the workspace when creating links in the terminal, as this impacts performance in large workspaces. Instead, search for a match only when the user wants to open a link. If the match can't be found, open the quick input service and let the user select from a list of possible matches.
Additionally, the LocalFileLinkProvider no longer matches single words, to avoid polluting the terminal with links.
Fixes #13712 Fixes #13576
Contributed on behalf of STMicroelectronics
How to test
Open a workspace and echo some partial paths in the terminal. All paths that can be resolved to a workspace file should have valid links that can be used to open the files from the terminal, e.g.:
../../packages/terminal/src/browser/terminal-file-link-provider.ts:17:20 src/browser/terminal-file-link-provider.ts
For links that can't be matched in the workspace, the quick input widget is opened.
In large workspaces, this should not affect performance and
rg
should be running only when a terminal link is clicked.Follow-ups
Review checklist
Reminder for reviewers