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: Update attr panel for av
Daniel1590913db73d
diff --git a/app/src/protyle/render/av/blockAttr.ts b/app/src/protyle/render/av/blockAttr.tsindex a469f2d5bb..0ddb0ed896 100644--- a/app/src/protyle/render/av/blockAttr.ts+++ b/app/src/protyle/render/av/blockAttr.ts@@ -8,6 +8,9 @@ import {popTextCell} from "./cell";export const genAVValueHTML = (value: IAVCellValue) => {let html = "";switch (value.type) {+ case "block":+ html = `<div class="fn__flex-1">${value.block.content}</div>`;+ break;case "text":html = `<textarea rows="${value.text.content.split("\n").length}" class="b3-text-field b3-text-field--text fn__flex-1">${value.text.content}</textarea>`;break;diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.goindex 67e2bbe6a2..246e4aed87 100644--- a/kernel/model/attribute_view.go+++ b/kernel/model/attribute_view.go@@ -123,10 +123,6 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {var keyValues []*av.KeyValuesfor _, kv := range attrView.KeyValues {- if av.KeyTypeBlock == kv.Key.Type {- continue- }-kValues := &av.KeyValues{Key: kv.Key}for _, v := range kv.Values {if v.BlockID == blockID {@@ -180,7 +176,11 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {switch kv.Key.Type {case av.KeyTypeTemplate:if 0 < len(kv.Values) {- ial := GetBlockAttrs(blockID)+ ial := map[string]string{}+ block := getRowBlockValue(keyValues)+ if !block.IsDetached {+ ial = GetBlockAttrs(blockID)+ }kv.Values[0].Template.Content = renderTemplateCol(ial, kv.Key.Template, keyValues)}}