An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Clean code https://github.com/siyuan-note/siyuan/pull/6380
Liang Ding0bc997051e54
diff --git a/kernel/api/snippet.go b/kernel/api/snippet.goindex 2b7402fad9..1b1713fdd2 100644--- a/kernel/api/snippet.go+++ b/kernel/api/snippet.go@@ -41,7 +41,7 @@ func serveSnippets(c *gin.Context) {c.Status(404)return}-+for _, s := range confSnippets {if s.Name == name && ("" != ext && s.Type == ext[1:]) {c.Header("Content-Type", mime.TypeByExtension(ext))@@ -49,6 +49,8 @@ func serveSnippets(c *gin.Context) {return}}++ // 没有在配置文件中命中时在文件系统上查找filePath = filepath.Join(util.SnippetsPath, filePath)c.File(filePath)}diff --git a/kernel/util/working.go b/kernel/util/working.goindex 623597dca8..7b06612094 100644--- a/kernel/util/working.go+++ b/kernel/util/working.go@@ -172,7 +172,7 @@ var (AppearancePath string // 配置目录下的外观目录 appearance/ 路径ThemesPath string // 配置目录下的外观目录下的 themes/ 路径IconsPath string // 配置目录下的外观目录下的 icons/ 路径- SnippetsPath string // 数据目录下的 snippets/ 路径+ SnippetsPath string // 数据目录下的 snippets/ 路径AndroidNativeLibDir string // Android 库路径AndroidPrivateDataDir string // Android 私有数据路径