MCPcopy Index your code
hub / github.com/codeaashu/claude-code / disableAllPluginsOp

Function disableAllPluginsOp

src/services/plugins/pluginOperations.ts:782–812  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

780 * @returns Result indicating success/failure with count of disabled plugins
781 */
782export async function disableAllPluginsOp(): Promise<PluginOperationResult> {
783 const enabledPlugins = getPluginEditableScopes()
784
785 if (enabledPlugins.size === 0) {
786 return { success: true, message: 'No enabled plugins to disable' }
787 }
788
789 const disabled: string[] = []
790 const errors: string[] = []
791
792 for (const [pluginId] of enabledPlugins) {
793 const result = await setPluginEnabledOp(pluginId, false)
794 if (result.success) {
795 disabled.push(pluginId)
796 } else {
797 errors.push(`${pluginId}: ${result.message}`)
798 }
799 }
800
801 if (errors.length > 0) {
802 return {
803 success: false,
804 message: `Disabled ${disabled.length} ${plural(disabled.length, 'plugin')}, ${errors.length} failed:\n${errors.join('\n')}`,
805 }
806 }
807
808 return {
809 success: true,
810 message: `Disabled ${disabled.length} ${plural(disabled.length, 'plugin')}`,
811 }
812}
813
814/**
815 * Update a plugin to the latest version.

Callers 1

disableAllPluginsFunction · 0.85

Calls 4

getPluginEditableScopesFunction · 0.85
setPluginEnabledOpFunction · 0.85
pluralFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected