Spaces:
Paused
Paused
Download console/src/plugins/pluginRuntimeCleanup.ts from mysticaldragon/HF: direct link, hf CLI and curl.
- Browser
- Download file 529 Bytes
-
https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/plugins/pluginRuntimeCleanup.ts
- Command line
-
hf download hf://spaces/mysticaldragon/HF/console/src/plugins/pluginRuntimeCleanup.ts
-
curl -L -o pluginRuntimeCleanup.ts https://huggingface.co/spaces/mysticaldragon/HF/resolve/main/console/src/plugins/pluginRuntimeCleanup.ts
529 Bytes
| import { pluginSystem } from "./hostExternals"; | |
| import { chatExtensions } from "./registry/chatExtensions"; | |
| import { menuRegistry, routeRegistry, slotRegistry } from "./registry/store"; | |
| /** Remove every host-managed registration owned by one frontend plugin. */ | |
| export function removePluginRuntime(pluginId: string): void { | |
| menuRegistry.removeBySource(pluginId); | |
| routeRegistry.removeBySource(pluginId); | |
| slotRegistry.removeBySource(pluginId); | |
| pluginSystem.removePlugin(pluginId); | |
| chatExtensions.disposeAll(pluginId); | |
| } | |