An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:recycle: Refactor av data structure
Daniel870c238ed6be
diff --git a/kernel/av/av.go b/kernel/av/av.goindex 71f0bf5429..932be25785 100644--- a/kernel/av/av.go+++ b/kernel/av/av.go@@ -82,9 +82,10 @@ type KeySelectOption struct {}type Value struct {- ID string `json:"id"`- KeyID string `json:"keyID"`- BlockID string `json:"blockID"`+ ID string `json:"id"`+ KeyID string `json:"keyID"`+ BlockID string `json:"blockID"`+ Type KeyType `json:"type"`Block *ValueBlock `json:"block,omitempty"`Text *ValueText `json:"text,omitempty"`diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.goindex 64ddac1a43..3a03b5c617 100644--- a/kernel/model/attribute_view.go+++ b/kernel/model/attribute_view.go@@ -694,12 +694,13 @@ func updateAttributeViewCell(operation *Operation, tx *Transaction) (err error)for _, value := range keyValues.Values {if operation.ID == value.ID {val = value+ val.Type = keyValues.Key.Typebreak}}if nil == val {- val = &av.Value{ID: operation.ID, KeyID: keyValues.Key.ID, BlockID: operation.RowID}+ val = &av.Value{ID: operation.ID, KeyID: keyValues.Key.ID, BlockID: operation.RowID, Type: keyValues.Key.Type}keyValues.Values = append(keyValues.Values, val)}break