mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-22 01:48:11 +00:00
plugin disable system: kernel→SDK PluginManager + WebUI/CLI
- New disabled_plugins table (name, disabled_at, disabled_by) - SDK.PluginManager interface: DisablePlugin/EnablePlugin/ListDisabledPlugins - Registry implements PluginManager, wired into PluginSDK - WebUI: POST /api/v1/plugins/<name>/disable|enable + plugins page with toggle - Disabling webui shows confirmation dialog - CLI: /plugin disable <name> / /plugin enable <name> - pluginmgr removePlugin sync-cleanup from disabled_plugins table
This commit is contained in:
@ -455,6 +455,11 @@ func (p *Plugin) removePlugin(name string) (interface{}, error) {
|
||||
return map[string]interface{}{"error": err.Error()}, nil
|
||||
}
|
||||
|
||||
// 同步清理禁用表
|
||||
if Reg != nil {
|
||||
Reg.EnablePlugin(name)
|
||||
}
|
||||
|
||||
return map[string]interface{}{
|
||||
"status": "removed",
|
||||
"name": name,
|
||||
|
||||
Reference in New Issue
Block a user