An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: https://github.com/siyuan-note/siyuan/issues/8664
Vanessa26788e6985e6
diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.tsindex 868e9adac9..bae0b05f78 100644--- a/app/src/protyle/render/av/openMenuPanel.ts+++ b/app/src/protyle/render/av/openMenuPanel.ts@@ -407,12 +407,13 @@ ${html}};const setFilter = (protyle: IProtyle, data: IAV, target: HTMLElement) => {+ const colType = target.getAttribute("data-coltype") as TAVCol;const menu = new Menu(undefined, () => {const colId = target.parentElement.parentElement.getAttribute("data-id");const oldFilters = JSON.parse(JSON.stringify(data.filters));data.filters.find((filter) => {if (filter.column === colId) {- filter.value = {+ filter.value[colType] = {content: (window.siyuan.menus.menu.element.querySelector(".b3-text-field") as HTMLInputElement).value};filter.operator = (window.siyuan.menus.menu.element.querySelector(".b3-select") as HTMLSelectElement).value as TAVFilterOperator;@@ -434,7 +435,7 @@ const setFilter = (protyle: IProtyle, data: IAV, target: HTMLElement) => {}]);});let selectHTML = "";- switch (target.getAttribute("data-coltype")) {+ switch (colType) {case "text":selectHTML = `<option value="=">=</option><option value="!=">!=</option>@@ -482,13 +483,15 @@ const addFilter = (options: {icon: getColIconByType(column.type),click: () => {const oldFilters = Object.assign([], options.data.filters);- const value: IAVCellValue = {- content: ""- }+options.data.filters.push({column: column.id,operator: "Contains",- value,+ value: {+ [column.type]: {+ content: ""+ }+ },});transaction(options.protyle, [{action: "setAttrView",@@ -522,9 +525,10 @@ const getFiltersHTML = (data: IAV) => {let filterHTML = "";data.columns.find((item) => {if (item.id === filter.column) {- filterHTML += `<span data-type="setFilter" data-coltype="${item.type}" class="b3-chip${filter.value?.content ? " b3-chip--primary" : ""}">+ const filterValue = (filter.value && filter.value[item.type] && filter.value[item.type].content) ? ":" + filter.value[item.type].content : "";+ filterHTML += `<span data-type="setFilter" data-coltype="${item.type}" class="b3-chip${filterValue ? " b3-chip--primary" : ""}"><svg><use xlink:href="#${getColIconByType(item.type)}"></use></svg>- <span class="fn__ellipsis">${item.name}${filter.value?.content ? ":" + filter.value?.content : ""}</span>+ <span class="fn__ellipsis">${item.name}${filterValue}</span></span>`;return true}diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.tsindex 44d36eac90..2878794841 100644--- a/app/src/types/index.d.ts+++ b/app/src/types/index.d.ts@@ -882,8 +882,11 @@ interface IAVCell {valueType: TAVCol,}-interface IAVCellValue {- content: string,- content2?: string,- color?: string,+type IAVCellValue = {+ [key in TAVCol]?: {+ content: string+ content2?: string+ color?: string+ id?: string+ }}