in src/explorer.ts [439:461]
async removeSubscriptions(specName: string) {
const pontxConfig = await findAlicloudAPIConfig(this.context);
const newOrigins = pontxConfig?.origins?.filter((item) => item.name !== specName) || [];
pontxConfig.origins = newOrigins;
// 重写磁盘中的config
this.rewriteConfig(pontxConfig);
const newPontManager = await PontManager.constructorFromPontConfigAndPlugins(
pontxConfig,
this.context.globalStorageUri.fsPath,
plugins as any,
new VSCodeLogger(),
);
if (newPontManager) {
const newManager = {
...newPontManager,
localPontSpecs: newPontManager.remotePontSpecs,
};
await this.updatePontManager(newManager);
vscode.window.showInformationMessage(I18N.src.explorer.successToCancelSub);
this.launchExperienceQuestionnaire();
}
}