mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -1257,6 +1257,7 @@ data-type="navigation-root" data-path="/">
|
||||
box: string,
|
||||
path: string
|
||||
}, setStorage = true, isSetCurrent = true) {
|
||||
filePath = filePath.replace(/\/\/+/g, "/");
|
||||
const treeElement = this.element.querySelector(`[data-url="${notebookId}"]`);
|
||||
if (!treeElement) {
|
||||
// 有文件树和编辑器的布局初始化时,文件树还未挂载
|
||||
|
||||
@@ -126,7 +126,7 @@ func documentCreate(args map[string]interface{}) (CallToolResult, error) {
|
||||
}
|
||||
|
||||
id := ast.NewNodeID()
|
||||
docPath := parentPath + "/" + id + ".sy"
|
||||
docPath := strings.TrimRight(parentPath, "/") + "/" + id + ".sy"
|
||||
tree, err := model.CreateDocByMd(notebook, docPath, title, markdown, nil, nil)
|
||||
if err != nil {
|
||||
return CallToolResult{Content: []ContentItem{{Type: "text", Text: fmt.Sprintf("create doc failed: %s", err)}}, IsError: true}, nil
|
||||
|
||||
Reference in New Issue
Block a user