26
27
constructor(
29
>
@IAgentHostGitStateService private readonly _gitStateService: IAgentHostGitStateService,
30
>
@IAgentHostChangesetSubscriptionService private readonly _changesetSubscriptions: IAgentHostChangesetSubscriptionService,
31
>
) {
32
>
super();
33
>
34
>
this._registry = {
35
>
registerChangesetOperationHandler: (operationId, handler) => this._registerChangesetOperationHandler(operationId, handler),
36
>
refreshSessionGitState: sessionKey => this._gitStateService.refreshSessionGitState(sessionKey),
37
>
onDidChangeOperations: sessionKey => this.updateOperations(sessionKey),
38
>
};
39
>
}
40
41
registerContribution(contribution: IChangesetOperationContribution): IDisposable {
43
throw new Error('Changeset operation contribution already registered');
44
}
46
>
return toDisposable(() => {
47
>
this._handlerRegistrations.deleteAndDispose(contribution);
48
>
contribution.dispose();
49
>
});
50
>
}
51
52
getOperations(sessionKey: string, changeset: string, gitState?: ISessionGitState, gitHubState?: ISessionGitHubState): readonly ChangesetOperation[] {