feat: add upscaler & bg remover (#6967)

This commit is contained in:
darkskygit
2024-05-16 11:09:33 +00:00
parent f37bbb0784
commit a3f3d09764
7 changed files with 105 additions and 6 deletions
@@ -77,6 +77,17 @@ export function registerCopilotProvider<
});
}
export function unregisterCopilotProvider(type: CopilotProviderType) {
COPILOT_PROVIDER.delete(type);
ASSERT_CONFIG.delete(type);
for (const providers of PROVIDER_CAPABILITY_MAP.values()) {
const index = providers.indexOf(type);
if (index !== -1) {
providers.splice(index, 1);
}
}
}
/// Asserts that the config is valid for any registered providers
export function assertProvidersConfigs(config: Config) {
return (