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: Improve database item location highlighting https://github.com/siyuan-note/siyuan/issues/18846
Daniel07d36b9e8e99
diff --git a/app/src/assets/scss/business/_av.scss b/app/src/assets/scss/business/_av.scssindex ec7c571f64..28ac48316e 100644--- a/app/src/assets/scss/business/_av.scss+++ b/app/src/assets/scss/business/_av.scss@@ -319,8 +319,7 @@}&--select,- &--hl,- &--locate {+ &--hl {&:not(.av__row--header) .av__cell,&:not(.av__row--header) .av__firstcol {background-color: var(--b3-theme-primary-lightest);@@ -331,16 +330,6 @@}}- &--locate::before {- border: 2px solid var(--b3-theme-primary-lighter);- border-radius: var(--b3-border-radius-s);- content: '';- inset: 1px;- pointer-events: none;- position: absolute;- z-index: 4;- }-&--header {z-index: 3;@@ -466,7 +455,7 @@}&:hover {- &:not(.av__gallery-item--select):not(.av__gallery-item--locate)::before {+ &:not(.av__gallery-item--select)::before {background-color: var(--b3-theme-surface-light);}@@ -475,8 +464,7 @@}}- &--select::before,- &--locate::before {+ &--select::before {background-color: var(--b3-theme-primary-lightest) !important;opacity: 1 !important;}@@ -1881,7 +1869,7 @@opacity: 0.26;}- &:hover:not(.av__gallery-item--select):not(.av__gallery-item--locate)::before {+ &:hover:not(.av__gallery-item--select)::before {background-color: var(--b3-av-kanban-background);opacity: 0.38;}diff --git a/app/src/protyle/render/av/locate.ts b/app/src/protyle/render/av/locate.tsindex 8d54960975..3b27489ca3 100644--- a/app/src/protyle/render/av/locate.ts+++ b/app/src/protyle/render/av/locate.ts@@ -48,7 +48,7 @@ const highlightLocatedItem = (blockElement: HTMLElement, protyle: IProtyle, viewclearLocatedHighlight(blockElement);const token = Symbol();highlightTokens.set(blockElement, token);- const className = viewType === "table" ? "av__row--locate" : "av__gallery-item--locate";+ const className = "protyle-wysiwyg--hl";const targetQuery = viewType === "table" ? `.av__row[data-id="${itemID}"]` : `.av__gallery-item[data-id="${itemID}"]`;requestAnimationFrame(() => {if (!blockElement.isConnected || highlightTokens.get(blockElement) !== token) {@@ -136,7 +136,11 @@ export const queueAVLocateRequest = (blockID: string, request: IAVLocateRequest)if (previous) {window.clearTimeout(previous.timer);}- const locateRequest = {...request, select: true, highlight: true};+ const locateRequest = {+ ...request,+ select: request.select ?? false,+ highlight: request.highlight ?? true,+ };const timer = window.setTimeout(() => {if (queuedLocateRequests.get(blockID)?.request === locateRequest) {queuedLocateRequests.delete(blockID);