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: https://github.com/siyuan-note/siyuan/issues/9888
Vanessae1c0adc633a3
diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.jsonindex acd8f65329..80f07713ad 100644--- a/app/appearance/langs/en_US.json+++ b/app/appearance/langs/en_US.json@@ -1,4 +1,6 @@{+ "relation": "Relation",+ "rollup": "Rollup","replaceTypes": {"text": "Normal text","imgText": "Image alt text",diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.jsonindex 937ebe913d..23fd9d27ef 100644--- a/app/appearance/langs/es_ES.json+++ b/app/appearance/langs/es_ES.json@@ -1,4 +1,6 @@{+ "relation": "Relación",+ "rollup": "Acumular","replaceTypes": {"text": "Texto normal","imgText": "Texto alternativo de la imagen",diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.jsonindex 7be3c0d878..325ae6abd5 100644--- a/app/appearance/langs/fr_FR.json+++ b/app/appearance/langs/fr_FR.json@@ -1,4 +1,6 @@{+ "relation": "Relation",+ "rollup": "Rollup","replaceTypes": {"text": "Texte normal","imgText": "Texte alternatif de l'image",diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.jsonindex 86807576d4..64e84af662 100644--- a/app/appearance/langs/zh_CHT.json+++ b/app/appearance/langs/zh_CHT.json@@ -1,4 +1,6 @@{+ "relation": "關聯",+ "rollup": "查詢引用","replaceTypes": {"text": "普通文字","imgText": "圖片提示文字",diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.jsonindex 460b95232d..e541297493 100644--- a/app/appearance/langs/zh_CN.json+++ b/app/appearance/langs/zh_CN.json@@ -1,4 +1,6 @@{+ "relation": "关联",+ "rollup": "查询引用","replaceTypes": {"text": "普通文本","imgText": "图片提示文本",diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.tsindex f352fe75cb..11a532b7de 100644--- a/app/src/protyle/render/av/col.ts+++ b/app/src/protyle/render/av/col.ts@@ -24,7 +24,7 @@ export const duplicateCol = (options: {} else {options.newValue = `${options.newValue} (1)`;}- if (["select", "mSelect"].includes(options.type)) {+ if (["select", "mSelect", "rollup"].includes(options.type)) {fetchPost("/api/av/renderAttributeView", {id: options.avID}, (response) => {const data = response.data as IAV;let colOptions;@@ -183,6 +183,8 @@ export const getEditHTML = (options: {${genUpdateColItem("email", colData.type, colData.name)}${genUpdateColItem("phone", colData.type, colData.name)}${genUpdateColItem("template", colData.type, colData.name)}+ ${genUpdateColItem("relation", colData.type, colData.name)}+ ${genUpdateColItem("rollup", colData.type, colData.name)}${genUpdateColItem("created", colData.type, colData.name)}${genUpdateColItem("updated", colData.type, colData.name)}</div>`;@@ -321,6 +323,10 @@ export const getColNameByType = (type: TAVCol) => {return window.siyuan.languages[type];case "mSelect":return window.siyuan.languages.multiSelect;+ case "relation":+ return window.siyuan.languages.relation;+ case "rollup":+ return window.siyuan.languages.rollup;case "updated":return window.siyuan.languages.updatedTime;case "created":@@ -346,6 +352,10 @@ export const getColIconByType = (type: TAVCol) => {return "iconListItem";case "mSelect":return "iconList";+ case "relation":+ return "iconOpen";+ case "rollup":+ return "iconSearch";case "date":return "iconCalendar";case "updated":@@ -964,6 +974,56 @@ export const addCol = (protyle: IProtyle, blockElement: Element) => {});}});+ menu.addItem({+ icon: "iconOpen",+ label: window.siyuan.languages.relation,+ click() {+ const id = Lute.NewNodeID();+ transaction(protyle, [{+ action: "addAttrViewCol",+ name: window.siyuan.languages.relation,+ avID,+ type: "relation",+ id+ }], [{+ action: "removeAttrViewCol",+ id,+ avID,+ }]);+ addAttrViewColAnimation({+ blockElement: blockElement,+ protyle: protyle,+ type: "relation",+ name: window.siyuan.languages.relation,+ id+ });+ }+ });+ menu.addItem({+ icon: "iconSearch",+ label: window.siyuan.languages.rollup,+ click() {+ const id = Lute.NewNodeID();+ transaction(protyle, [{+ action: "addAttrViewCol",+ name: window.siyuan.languages.rollup,+ avID,+ type: "rollup",+ id+ }], [{+ action: "removeAttrViewCol",+ id,+ avID,+ }]);+ addAttrViewColAnimation({+ blockElement: blockElement,+ protyle: protyle,+ type: "rollup",+ name: window.siyuan.languages.rollup,+ id+ });+ }+ });menu.addItem({icon: "iconClock",label: window.siyuan.languages.createdTime,