MCPcopy Create free account
hub / github.com/Noumena-Network/code / isPluginInstalled

Function isPluginInstalled

src/utils/plugins/installedPluginsManager.ts:828–841  ·  view source on GitHub ↗
(pluginId: string)

Source from the content-addressed store, hash-verified

826 * project. Returns false for plugins only installed in other projects.
827 */
828export function isPluginInstalled(pluginId: string): boolean {
829 const v2Data = loadInstalledPluginsV2()
830 const installations = v2Data.plugins[pluginId]
831 if (!installations || installations.length === 0) {
832 return false
833 }
834 if (!installations.some(isInstallationRelevantToCurrentProject)) {
835 return false
836 }
837 // Plugins are loaded from settings.enabledPlugins
838 // If settings.enabledPlugins and installed_plugins.json diverge
839 // (via settings.json clobber), return false
840 return getSettings_DEPRECATED().enabledPlugins?.[pluginId] !== undefined
841}
842
843/**
844 * True only if the plugin has a USER or MANAGED scope installation.

Callers 6

maybeRecordPluginHintFunction · 0.85
getMatchingLspPluginsFunction · 0.85
loadMarketplaceDataFunction · 0.85
checkAndInstallFunction · 0.85
pluginListHandlerFunction · 0.85

Calls 1

loadInstalledPluginsV2Function · 0.85

Tested by

no test coverage detected