HF / console /src /plugins /pluginRuntimeCleanup.ts
mysticaldragon's picture
Deploy QwenPaw - Personal AI Assistant Platform
4e7644b
Raw History Blame Contribute Delete
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);
}