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: Improve database asset field exporting https://github.com/siyuan-note/siyuan/issues/11903
Danielf6bcb165b8f2
diff --git a/kernel/model/export.go b/kernel/model/export.goindex 52a4ce8add..c70087b142 100644--- a/kernel/model/export.go+++ b/kernel/model/export.go@@ -2243,26 +2243,29 @@ func exportTree(tree *parse.Tree, wysiwyg, keepFold bool,}} else if av.KeyTypeMAsset == cell.Value.Type {if nil != cell.Value.MAsset {- buf := &bytes.Buffer{}for _, a := range cell.Value.MAsset {if av.AssetTypeImage == a.Type {- buf.WriteString("- buf.WriteString(a.Content)- buf.WriteString(") ")+ img := &ast.Node{Type: ast.NodeImage}+ img.AppendChild(&ast.Node{Type: ast.NodeBang})+ img.AppendChild(&ast.Node{Type: ast.NodeOpenBracket})+ img.AppendChild(&ast.Node{Type: ast.NodeLinkText, Tokens: []byte(a.Name)})+ img.AppendChild(&ast.Node{Type: ast.NodeCloseBracket})+ img.AppendChild(&ast.Node{Type: ast.NodeOpenParen})+ img.AppendChild(&ast.Node{Type: ast.NodeLinkDest, Tokens: []byte(a.Content)})+ img.AppendChild(&ast.Node{Type: ast.NodeCloseParen})+ mdTableCell.AppendChild(img)} else if av.AssetTypeFile == a.Type {- buf.WriteString("[")- buf.WriteString(a.Name)- buf.WriteString("](")- buf.WriteString(a.Content)- buf.WriteString(") ")- } else {- buf.WriteString(a.Content)- buf.WriteString(" ")+ file := &ast.Node{Type: ast.NodeLink}+ file.AppendChild(&ast.Node{Type: ast.NodeOpenBracket})+ file.AppendChild(&ast.Node{Type: ast.NodeLinkText, Tokens: []byte(a.Name)})+ file.AppendChild(&ast.Node{Type: ast.NodeCloseBracket})+ file.AppendChild(&ast.Node{Type: ast.NodeOpenParen})+ file.AppendChild(&ast.Node{Type: ast.NodeLinkDest, Tokens: []byte(a.Content)})+ file.AppendChild(&ast.Node{Type: ast.NodeCloseParen})+ mdTableCell.AppendChild(file)}}- val = strings.TrimSpace(buf.String())+ continue}} else if av.KeyTypeLineNumber == cell.Value.Type {val = strconv.Itoa(rowNum)