Implement and adopt edit session identifier API proposal (#157733)

* Add canonical workspace identifier proposed API

* Use canonical id to store and resume edit sessions

* Add git extension workspace identity provider

* Fix warning incorrectly showing up

* Make auto resume behavior opt in

* * Create a separate service
* Accept WorkspaceFolder instead of URI
* Return string instead of object

* Make edit session restores resilient to provider registration races

* Introduce an activation event
* Activate contributing extension before using provider

* `CanonicalWorkspaceIdentity` -> `EditSessionIdentity`

* Show progress while resuming edit session

* Store edit session even if extension will take care of opening target workspace

* Address most of PR feedback

* `IEditSessionsWorkbenchService` -> `IEditSessionsStorageService`

* Unregister provider in renderer

* Split out proposal into new `editSessionIdentityProvider.d.ts`

* Fix bad merge

* Always show progress in window

* Convert URI schemes
This commit is contained in:
Joyce Er
2022-08-19 08:01:43 -07:00
committed by GitHub
parent 4291d2b9d9
commit fa4ff1519d
23 changed files with 412 additions and 84 deletions

View File

@@ -1043,6 +1043,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
},
onDidGrantWorkspaceTrust: (listener, thisArgs?, disposables?) => {
return extHostWorkspace.onDidGrantWorkspaceTrust(listener, thisArgs, disposables);
},
registerEditSessionIdentityProvider: (scheme: string, provider: vscode.EditSessionIdentityProvider) => {
checkProposedApiEnabled(extension, 'editSessionIdentityProvider');
return extHostWorkspace.registerEditSessionIdentityProvider(scheme, provider);
}
};