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

Function pluginUninstallHandler

src/cli/handlers/plugins.ts:704–737  ·  view source on GitHub ↗
(
  plugin: string,
  options: { scope?: string; cowork?: boolean; keepData?: boolean },
)

Source from the content-addressed store, hash-verified

702
703// plugin uninstall (lines 5738–5769)
704export async function pluginUninstallHandler(
705 plugin: string,
706 options: { scope?: string; cowork?: boolean; keepData?: boolean },
707): Promise<void> {
708 if (options.cowork) setUseCoworkPlugins(true)
709 const scope = options.scope || 'user'
710 if (options.cowork && scope !== 'user') {
711 cliError('--cowork can only be used with user scope')
712 }
713 if (
714 !VALID_INSTALLABLE_SCOPES.includes(
715 scope as (typeof VALID_INSTALLABLE_SCOPES)[number],
716 )
717 ) {
718 cliError(
719 `Invalid scope: ${scope}. Must be one of: ${VALID_INSTALLABLE_SCOPES.join(', ')}.`,
720 )
721 }
722 const { name, marketplace } = parsePluginIdentifier(plugin)
723 logEvent('tengu_plugin_uninstall_command', {
724 _PROTO_plugin_name: name as AnalyticsMetadata_I_VERIFIED_THIS_IS_PII_TAGGED,
725 ...(marketplace && {
726 _PROTO_marketplace_name:
727 marketplace as AnalyticsMetadata_I_VERIFIED_THIS_IS_PII_TAGGED,
728 }),
729 scope: scope as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
730 })
731
732 await uninstallPlugin(
733 plugin,
734 scope as 'user' | 'project' | 'local',
735 options.keepData,
736 )
737}
738
739// plugin enable (lines 5783–5818)
740export async function pluginEnableHandler(

Callers 1

runFunction · 0.85

Calls 5

setUseCoworkPluginsFunction · 0.85
cliErrorFunction · 0.85
parsePluginIdentifierFunction · 0.85
logEventFunction · 0.85
uninstallPluginFunction · 0.85

Tested by

no test coverage detected