MCPcopy Create free account
hub / github.com/diillson/chatcli / pluginUninstall

Method pluginUninstall

cli/command_handler_plugins.go:300–321  ·  view source on GitHub ↗

pluginUninstall remove um plugin local instalado e recarrega o gerenciador.

(args []string)

Source from the content-addressed store, hash-verified

298
299// pluginUninstall remove um plugin local instalado e recarrega o gerenciador.
300func (ch *CommandHandler) pluginUninstall(args []string) {
301 pluginManager := ch.cli.pluginManager
302 if len(args) < 3 {
303 fmt.Println(i18n.T("plugin.uninstall.usage"))
304 return
305 }
306 p, found := pluginManager.GetPlugin(args[2])
307 if !found {
308 fmt.Println(i18n.T("plugin.error.not_found", args[2]))
309 return
310 }
311 if p.Path() == "[builtin]" || p.Path() == "[remote]" {
312 fmt.Println(i18n.T("plugin.uninstall.error.not_local"))
313 return
314 }
315 if err := os.Remove(p.Path()); err != nil {
316 fmt.Println(i18n.T("plugin.uninstall.error", p.Name(), err))
317 return
318 }
319 fmt.Println(i18n.T("plugin.uninstall.success", p.Name()))
320 pluginManager.Reload()
321}
322
323// handleAgentPersonaSubcommand verifica se o comando /agent contém um subcomando de persona
324// Retorna true se foi tratado como subcomando, false se deve entrar no modo agente

Callers 1

handlePluginCommandMethod · 0.95

Calls 6

TFunction · 0.92
GetPluginMethod · 0.80
PathMethod · 0.65
RemoveMethod · 0.65
NameMethod · 0.65
ReloadMethod · 0.45

Tested by

no test coverage detected