Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Support one-click enable/disable of all downloaded plugins https://github.com/siyuan-note/siyuan/issues/8523

Daniel5d4ac052691e
diff --git a/kernel/model/plugin.go b/kernel/model/plugin.go
index f00d5e4c2e..fce4ef1a4b 100644
--- a/kernel/model/plugin.go
+++ b/kernel/model/plugin.go
@@ -44,7 +44,7 @@ type PetalConf struct {
Enabled bool `json:"enabled"`
}
-func (conf *PetalConf) Save() {
+func (pConf *PetalConf) Save() {
if util.ReadOnly {
return
}
@@ -52,11 +52,10 @@ func (conf *PetalConf) Save() {
petalsStoreLock.Lock()
defer petalsStoreLock.Unlock()
- data, _ := gulu.JSON.MarshalIndentJSON(Conf, "", " ")
+ data, _ := gulu.JSON.MarshalIndentJSON(pConf, "", " ")
petalDir := filepath.Join(util.DataDir, "storage", "petal")
if err := os.MkdirAll(petalDir, 0777); nil != err {
logging.LogErrorf("create petal dir [%s] failed: %s", petalDir, err)
- util.ReportFileSysFatalError(err)
return
}