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/8695
Vanessa2ee0155ee008
diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scssindex ebba58a41f..160b949b92 100644--- a/app/src/assets/scss/business/_av.scss+++ b/app/src/assets/scss/business/_av.scss@@ -114,6 +114,10 @@&__celltext {flex: 1;overflow: hidden;++ .b3-chip {+ margin: 2px;+ }}&__firstcol {diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.tsindex c4f0704645..7a24a246af 100644--- a/app/src/protyle/render/av/cell.ts+++ b/app/src/protyle/render/av/cell.ts@@ -12,7 +12,7 @@ export const popTextCell = (protyle: IProtyle, cellElement: HTMLElement) => {html = `<textarea ${style} class="b3-text-field">${cellElement.textContent}</textarea>`;} else if (type === "number") {html = `<input type="number" value="${cellElement.textContent}" ${style} class="b3-text-field">`;- } else if (type === "select" && blockElement) {+ } else if (["select", "mSelect"].includes(type) && blockElement) {openMenuPanel(protyle, blockElement, "select", {cellElement});return;}diff --git a/app/src/protyle/render/av/filter.ts b/app/src/protyle/render/av/filter.tsindex 091c4ec0be..f2251c5c16 100644--- a/app/src/protyle/render/av/filter.ts+++ b/app/src/protyle/render/av/filter.ts@@ -187,7 +187,7 @@ export const setFilter = (options: {label: `<select style="margin: 4px 0" class="b3-select fn__size200">${selectHTML}</select>`});if (options.filter.value.type === "select" || options.filter.value.type === "mSelect") {- colData.options.forEach((option) => {+ colData.options?.forEach((option) => {let icon = "iconUncheck"options.filter.value.mSelect.find((optionItem) => {if (optionItem.content === option.name) {diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.tsindex b89d71fa9e..0d612a38b3 100644--- a/app/src/protyle/render/av/render.ts+++ b/app/src/protyle/render/av/render.ts@@ -63,10 +63,12 @@ ${column.wrap ? "" : "white-space: nowrap;"}">text = `<span class="av__celltext">${cell.value?.number.content || ""}</span>`;} else if (cell.valueType === "mSelect" || cell.valueType === "select") {cell.value?.mSelect?.forEach((item: { content: string, color: string }) => {- text += `<span class="av__celltext"><span class="b3-chip b3-chip--middle" style="background-color:var(--b3-font-background${item.color});color:var(--b3-font-color${item.color})">${item.content}</span></span>`;+ text += `<span class="b3-chip b3-chip--middle" style="background-color:var(--b3-font-background${item.color});color:var(--b3-font-color${item.color})">${item.content}</span>`;});if (!text) {text = '<span class="av__celltext"></span>';+ } else {+ text = `<span class="av__celltext">${text}</span>`;}} else if (cell.valueType === "date") {text = `<span class="av__celltext">${cell.value?.date.content || ""}</span>`;diff --git a/app/src/protyle/render/av/select.ts b/app/src/protyle/render/av/select.tsindex 8e2ebab63e..1d68958ad7 100644--- a/app/src/protyle/render/av/select.ts+++ b/app/src/protyle/render/av/select.ts@@ -118,7 +118,7 @@ export const setSelectCol = (protyle: IProtyle, data: IAV, options: {transaction(protyle, [{action: "updateAttrViewColOption",id: colId,- parentID: data.id,+ avID: data.id,data: {newColor: color,oldName: name,@@ -127,7 +127,7 @@ export const setSelectCol = (protyle: IProtyle, data: IAV, options: {}], [{action: "updateAttrViewColOption",id: colId,- parentID: data.id,+ avID: data.id,data: {newColor: color,oldName: inputElement.value,@@ -238,7 +238,7 @@ export const setSelectCol = (protyle: IProtyle, data: IAV, options: {transaction(protyle, [{action: "updateAttrViewColOption",id: colId,- parentID: data.id,+ avID: data.id,data: {oldName: name,newName: inputElement.value,@@ -248,7 +248,7 @@ export const setSelectCol = (protyle: IProtyle, data: IAV, options: {}], [{action: "updateAttrViewColOption",id: colId,- parentID: data.id,+ avID: data.id,data: {oldName: inputElement.value,newName: name,@@ -389,6 +389,18 @@ export const addSelectColAndCell = (protyle: IProtyle, data: IAV, options: {value: genCellValue(colData.type, ""),valueType: colData.type}+ } else {+ let hasSelected = false+ cellData.value.mSelect.find((item) => {+ if (item.content === currentElement.dataset.name) {+ hasSelected = true+ return true;+ }+ })+ if (hasSelected) {+ menuElement.querySelector("input").focus();+ return;+ }}const oldValue = Object.assign([], cellData.value.mSelect);@@ -448,6 +460,10 @@ export const addSelectColAndCell = (protyle: IProtyle, data: IAV, options: {}if (colData.type === "select") {menuElement.parentElement.remove();+ } else {+ menuElement.innerHTML = getSelectHTML(data.view, options);+ bindSelectEvent(protyle, data, menuElement, options);+ menuElement.querySelector("input").focus();}};