Improve LightRAG knowledge search locator alignment
This commit is contained in:
@@ -759,9 +759,14 @@ mod tests {
|
||||
assert!(SIDEBAR_PAGE_AI_RUNTIME_JS.contains("pageAiNormalizeAcpRuntimes(acpRuntimes)"));
|
||||
assert!(SIDEBAR_PAGE_AI_RUNTIME_JS.contains("pageAiAcpRuntimeSelect.value || 'reasonix'"));
|
||||
assert!(SIDEBAR_PAGE_AI_RUNTIME_JS.contains("function handlePageAiClick"));
|
||||
assert!(SIDEBAR_PAGE_AI_RUNTIME_JS.contains("function handlePageAiPointerDown"));
|
||||
assert!(SIDEBAR_PAGE_AI_RUNTIME_JS.contains("mnote.page_ai.drawer_width"));
|
||||
assert!(SIDEBAR_PAGE_AI_RENDER_RUNTIME_JS.contains("data-page-ai-resize-handle"));
|
||||
assert!(SIDEBAR_PAGE_AI_RUNTIME_JS.contains("function pageAiOpenCitationUrl"));
|
||||
assert!(SIDEBAR_PAGE_AI_RUNTIME_JS.contains("a[data-page-ai-citation-link=\"true\"]"));
|
||||
assert!(SIDEBAR_PAGE_AI_MARKDOWN_RUNTIME_JS.contains("data-page-ai-citation-link=\"true\""));
|
||||
assert!(SIDEBAR_PAGE_AI_MARKDOWN_RUNTIME_JS.contains("renderPageAiMarkdownTable"));
|
||||
assert!(SIDEBAR_PAGE_AI_MARKDOWN_RUNTIME_JS.contains("wolai-page-ai-markdown-table-wrap"));
|
||||
assert!(SIDEBAR_PAGE_AI_MARKDOWN_RUNTIME_JS.contains("target=\"_blank\""));
|
||||
assert!(SIDEBAR_PAGE_AI_RUNTIME_JS.contains("function handlePageAiChange"));
|
||||
assert!(SIDEBAR_PAGE_AI_RUNTIME_JS.contains("function installPageAiDelegates"));
|
||||
|
||||
@@ -1243,6 +1243,14 @@ html[data-mnote-sidebar-resizing="true"] .mnote-sidebar-resizer::before {
|
||||
.wolai-search-results{overflow:auto;padding:6px}
|
||||
.wolai-search-result-row{width:100%;min-height:54px;display:flex;align-items:flex-start;gap:10px;padding:9px 10px;border:0;border-radius:4px;background:transparent;color:#37352F;cursor:pointer;text-align:left;font:inherit}
|
||||
.wolai-search-result-row:hover{background:rgba(55,53,47,.08)}
|
||||
.wolai-search-source-group{border-radius:4px}
|
||||
.wolai-search-source-group + .wolai-search-source-group{margin-top:4px}
|
||||
.wolai-search-source-header{width:100%;min-height:46px;display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border:0;border-radius:4px;background:transparent;color:#37352F;cursor:pointer;text-align:left;font:inherit}
|
||||
.wolai-search-source-header:hover{background:rgba(55,53,47,.08)}
|
||||
.wolai-search-source-main{min-width:0;display:flex;flex:1 1 auto;flex-direction:column;gap:3px}
|
||||
.wolai-search-source-results{padding-left:18px}
|
||||
.wolai-search-source-results[hidden]{display:none!important}
|
||||
.wolai-search-source-chevron{flex:0 0 auto;margin-top:2px;color:#8B8780;font-size:11px;line-height:1.35}
|
||||
.wolai-search-result-icon{width:18px;height:18px;margin-top:2px;color:#8B8780}
|
||||
.wolai-search-result-main{min-width:0;display:flex;flex-direction:column;gap:3px}
|
||||
.wolai-search-result-title{color:#2F2D29;font-size:14px;line-height:1.35;word-break:break-word}
|
||||
@@ -4008,6 +4016,34 @@ body {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mnote-knowledge-rag-source-progress {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.mnote-knowledge-rag-source-progress div {
|
||||
height: 5px;
|
||||
overflow: hidden;
|
||||
border-radius: 999px;
|
||||
background: #ECE9E3;
|
||||
}
|
||||
|
||||
.mnote-knowledge-rag-source-progress i {
|
||||
display: block;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: #2F7D4A;
|
||||
}
|
||||
|
||||
.mnote-knowledge-rag-source-progress span {
|
||||
color: #5F5A54;
|
||||
font: 10px/14px "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mnote-knowledge-rag-source-actions {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
@@ -4559,6 +4595,7 @@ body {
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
z-index: 89;
|
||||
--mnote-page-ai-width: 440px;
|
||||
}
|
||||
|
||||
.wolai-page-ai-drawer[hidden] {
|
||||
@@ -4566,7 +4603,7 @@ body {
|
||||
}
|
||||
|
||||
.wolai-page-ai-panel {
|
||||
width: min(440px, calc(100vw - 24px));
|
||||
width: min(var(--mnote-page-ai-width), calc(100vw - 24px));
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -4578,6 +4615,37 @@ body {
|
||||
box-shadow: -18px 0 42px rgba(27, 28, 28, 0.14);
|
||||
}
|
||||
|
||||
.wolai-page-ai-resize-handle {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
bottom: 10px;
|
||||
left: -6px;
|
||||
width: 12px;
|
||||
cursor: col-resize;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.wolai-page-ai-resize-handle::before {
|
||||
position: absolute;
|
||||
top: 14px;
|
||||
bottom: 14px;
|
||||
left: 5px;
|
||||
width: 2px;
|
||||
border-radius: 999px;
|
||||
background: transparent;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.wolai-page-ai-resize-handle:hover::before,
|
||||
.wolai-page-ai-drawer[data-page-ai-resizing="true"] .wolai-page-ai-resize-handle::before {
|
||||
background: rgba(27, 28, 28, 0.18);
|
||||
}
|
||||
|
||||
html[data-mnote-page-ai-resizing="true"] {
|
||||
cursor: col-resize;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.wolai-page-ai-header-copy {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -5191,6 +5259,96 @@ body {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.wolai-page-ai-message-text > * {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.wolai-page-ai-message-text p,
|
||||
.wolai-page-ai-message-text ul,
|
||||
.wolai-page-ai-message-text ol,
|
||||
.wolai-page-ai-message-text pre,
|
||||
.wolai-page-ai-message-text table {
|
||||
margin: 6px 0;
|
||||
}
|
||||
|
||||
.wolai-page-ai-message-text h1,
|
||||
.wolai-page-ai-message-text h2,
|
||||
.wolai-page-ai-message-text h3,
|
||||
.wolai-page-ai-message-text h4,
|
||||
.wolai-page-ai-message-text h5,
|
||||
.wolai-page-ai-message-text h6 {
|
||||
margin: 8px 0 4px;
|
||||
color: #1B1C1C;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.wolai-page-ai-message-text ul,
|
||||
.wolai-page-ai-message-text ol {
|
||||
padding-left: 18px;
|
||||
}
|
||||
|
||||
.wolai-page-ai-message-text a {
|
||||
color: #2563EB;
|
||||
overflow-wrap: anywhere;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 2px;
|
||||
}
|
||||
|
||||
.wolai-page-ai-message-text pre {
|
||||
overflow: auto;
|
||||
padding: 8px 10px;
|
||||
border-radius: 6px;
|
||||
background: #F7F6F4;
|
||||
font: 12px/18px "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
|
||||
}
|
||||
|
||||
.wolai-page-ai-message-text code {
|
||||
border-radius: 4px;
|
||||
padding: 1px 3px;
|
||||
background: #F1F0EE;
|
||||
font: 12px/18px "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
|
||||
}
|
||||
|
||||
.wolai-page-ai-message-text pre code {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.wolai-page-ai-message-text hr {
|
||||
height: 1px;
|
||||
margin: 8px 0;
|
||||
border: 0;
|
||||
background: rgba(27, 28, 28, 0.12);
|
||||
}
|
||||
|
||||
.wolai-page-ai-markdown-table-wrap {
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.wolai-page-ai-markdown-table-wrap table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: auto;
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.wolai-page-ai-markdown-table-wrap th,
|
||||
.wolai-page-ai-markdown-table-wrap td {
|
||||
min-width: 72px;
|
||||
border: 1px solid rgba(27, 28, 28, 0.12);
|
||||
padding: 5px 7px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.wolai-page-ai-markdown-table-wrap th {
|
||||
background: #F7F6F4;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
button.wolai-page-ai-message-text {
|
||||
width: 100%;
|
||||
border: 0;
|
||||
@@ -5636,6 +5794,10 @@ button.wolai-page-ai-message-text {
|
||||
width: min(100vw - 24px, 420px);
|
||||
}
|
||||
|
||||
.wolai-page-ai-resize-handle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wolai-page-ai-settings-grid,
|
||||
.wolai-page-ai-settings-head {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
@@ -5710,6 +5872,10 @@ button.wolai-page-ai-message-text {
|
||||
.wolai-page-ai-panel {
|
||||
width: calc(100vw - 24px);
|
||||
}
|
||||
|
||||
.wolai-page-ai-resize-handle {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
"##;
|
||||
|
||||
Reference in New Issue
Block a user