An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: Shorthands on mobile https://github.com/siyuan-note/siyuan/issues/14414#issuecomment-4470321595
Daniele60093379c3b
diff --git a/kernel/api/filetree.go b/kernel/api/filetree.goindex ea0ec6bd82..7132597edb 100644--- a/kernel/api/filetree.go+++ b/kernel/api/filetree.go@@ -971,21 +971,9 @@ func getShorthandSavePath(c *gin.Context) {}notebook := arg["notebook"].(string)- box := model.Conf.Box(notebook)- var shorthandSaveBox string+ shorthandSaveBox := model.Conf.FileTree.ShorthandSaveBoxshorthandSavePathTpl := model.Conf.FileTree.ShorthandSavePath- if nil != box {- boxConf := box.GetConf()- shorthandSaveBox = boxConf.ShorthandSaveBox- shorthandSavePathTpl = boxConf.ShorthandSavePath- }- if "" == shorthandSaveBox {- shorthandSaveBox = model.Conf.FileTree.ShorthandSaveBox- }- if "" == shorthandSavePathTpl {- shorthandSavePathTpl = model.Conf.FileTree.ShorthandSavePath- }if "" == shorthandSaveBox {shorthandSaveBox = notebookdiff --git a/kernel/api/notebook.go b/kernel/api/notebook.goindex c5099de219..71ddc8334e 100644--- a/kernel/api/notebook.go+++ b/kernel/api/notebook.go@@ -411,13 +411,6 @@ func setNotebookConf(c *gin.Context) {boxConf.DocCreateSavePath = util.TrimSpaceInPath(boxConf.DocCreateSavePath)- boxConf.ShorthandSavePath = util.TrimSpaceInPath(boxConf.ShorthandSavePath)- if "" != boxConf.ShorthandSavePath {- if !strings.HasPrefix(boxConf.ShorthandSavePath, "/") {- boxConf.ShorthandSavePath = "/" + boxConf.ShorthandSavePath- }- }-box.SaveConf(boxConf)ret.Data = boxConf}diff --git a/kernel/conf/box.go b/kernel/conf/box.goindex eeb8647e30..c79257af20 100644--- a/kernel/conf/box.go+++ b/kernel/conf/box.go@@ -30,8 +30,6 @@ type BoxConf struct {DocCreateSavePath string `json:"docCreateSavePath"` // 新建文档存储路径DailyNoteSavePath string `json:"dailyNoteSavePath"` // 新建日记存储路径DailyNoteTemplatePath string `json:"dailyNoteTemplatePath"` // 新建日记使用的模板路径- ShorthandSaveBox string `json:"shorthandSaveBox"` // 闪念速记存储笔记本- ShorthandSavePath string `json:"shorthandSavePath"` // 闪念速记存储路径SortMode int `json:"sortMode"` // 排序方式}diff --git a/kernel/model/shortcuts.go b/kernel/model/shortcuts.goindex eda96be11d..8b0d73390c 100644--- a/kernel/model/shortcuts.go+++ b/kernel/model/shortcuts.go@@ -68,15 +68,7 @@ func MoveLocalShorthands(boxID string) (retIDs []string, err error) {}}- var hPath string- box := Conf.Box(boxID)- if nil != box {- boxConf := box.GetConf()- hPath = boxConf.ShorthandSavePath- }- if "" == hPath {- hPath = Conf.FileTree.ShorthandSavePath- }+ hPath := Conf.FileTree.ShorthandSavePathif "" != hPath {var renderErr errorhPath, renderErr = RenderGoTemplate(hPath)@@ -202,6 +194,7 @@ func MoveLocalShorthands(boxID string) (retIDs []string, err error) {}FlushTxQueue()+ box := Conf.Box(boxID)for _, id := range retIDs {b, _ := GetBlock(id, nil)PushCreate(box, b.Path, nil)