Skip to content

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

:art: 改进没有模板时 `/模板` 的交互 https://github.com/siyuan-note/siyuan/issues/5636

Liang Dingae8b83c53e9b
diff --git a/kernel/model/template.go b/kernel/model/template.go
index 7b796412b0..1dddfe9552 100644
--- a/kernel/model/template.go
+++ b/kernel/model/template.go
@@ -59,6 +59,8 @@ func RenderCreateDocNameTemplate(nameTemplate string) (ret string, err error) {
}
func SearchTemplate(keyword string) (ret []*Block) {
+ ret = []*Block{}
+
templates := filepath.Join(util.DataDir, "templates")
k := strings.ToLower(keyword)
filepath.Walk(templates, func(path string, info fs.FileInfo, err error) error {