Skip to content

VSCE: Add ability to open local copy of remote file

Administrator requested to merge bee/vsce-local-files into main

Created by: abeatrix

Continues https://github.com/sourcegraph/sourcegraph/pull/33805 This PR adds the ability to open the local copy of the remote file from search results, as discussed in https://github.com/sourcegraph/sourcegraph/issues/32633

Currently, clicking on the search result will open a read-only file.

After the update in this PR, the user can set a base path for where all the repositories are located in their machine using the VSCE configuration setting.

Changes captured in this PR: If basePath is not configured in user's setting, we will try to find the file in the current workspace. If the file is found within the current workspace and the basePath is not set, we will set that as the basePath: Then a local copy of the search result will be opened: findWorkSpace

If file cannot be found within the current workspace AND using the basePath provided (if any), a remote copy of the search result will be opened instead: readonly

Test plan

N/A

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Loading