feat: restore Wolai workspace navigation and assets

This commit is contained in:
Agent Board
2026-07-15 23:12:15 +08:00
parent 31a160fcc5
commit 6f9c7d3b58
48 changed files with 6734 additions and 517 deletions
+16 -3
View File
@@ -288,6 +288,14 @@ mod tests {
assert!(SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("/api/ui/preferences"));
assert!(!SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("localStorage.setItem"));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("restoreSidebarTreeTab"));
assert!(SIDEBAR_TREE_RUNTIME_JS
.contains("applySearchSwitchState(overlay, { knowledge: false"));
assert!(!SIDEBAR_TREE_RUNTIME_JS
.contains("applySearchSwitchState(overlay, { knowledge: true"));
assert!(SIDEBAR_TREE_RUNTIME_JS
.contains("data-search-switch=\"knowledge\" role=\"switch\" aria-checked=\"false\""));
assert!(!SIDEBAR_TREE_RUNTIME_JS
.contains("data-search-switch=\"knowledge\" role=\"switch\" aria-checked=\"true\""));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("treeView"));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("tree:local-command"));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("applyCreatedDocumentLocally"));
@@ -566,7 +574,7 @@ mod tests {
assert!(SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("data-knowledge-rag-action=\"prune\""));
assert!(SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("mnote-knowledge-rag-source-filters"));
assert!(SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("filter-sources"));
assert!(SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("Provider 未映射"));
assert!(SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("未关联资料"));
assert!(SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("Rerank"));
assert!(SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("scheduleKnowledgeRagStatusBridge"));
assert!(SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("knowledgeRagStatusHasInFlight"));
@@ -593,7 +601,12 @@ mod tests {
assert!(SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("data-knowledge-rag-input-status-label"));
assert!(!SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("localOcrAutoEnabled"));
assert!(SIDEBAR_PAGE_SETTINGS_RUNTIME_JS.contains("data-mnote-local-ocr-auto-retired"));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("window.location.href = '/knowledge'"));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("function knowledgeHostUrl"));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("knowledgeUrl.searchParams.set('workspaceId'"));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("knowledgeUrl.searchParams.set('sourceKind'"));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("knowledgeUrl.searchParams.set('rootUri'"));
assert!(!SIDEBAR_TREE_RUNTIME_JS.contains("window.location.href = '/knowledge'"));
assert!(!SIDEBAR_FILETREE_COMMAND_RUNTIME_JS.contains("var knowledgeUrl = '/knowledge'"));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("open-knowledge-rag-debug-settings"));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("/debug/knowledge-rag"));
assert!(SIDEBAR_TREE_RUNTIME_JS.contains("[data-knowledge-rag-action]"));
@@ -607,7 +620,7 @@ mod tests {
SIDEBAR_TREE_RUNTIME_JS.contains(r#"<option value="exact" selected>关键词</option>"#)
);
assert!(SIDEBAR_TREE_RUNTIME_JS
.contains(r#"data-search-switch="knowledge" role="switch" aria-checked="true""#));
.contains(r#"data-search-switch="knowledge" role="switch" aria-checked="false""#));
assert!(SIDEBAR_FILETREE_COMMAND_RUNTIME_JS.contains("knowledgeRagSourceRelativePath"));
assert!(SIDEBAR_FILETREE_COMMAND_RUNTIME_JS.contains("supportsKnowledgeRagSource"));
assert!(!SIDEBAR_FILETREE_COMMAND_RUNTIME_JS.contains("runLocalOcr"));
+10 -2
View File
@@ -154,7 +154,11 @@ a:hover {
.material-symbols-outlined[data-icon="star"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 3 2.7 5.4 6 .9-4.4 4.3 1 6-5.3-2.8-5.3 2.8 1-6-4.4-4.3 6-.9z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="history"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 12a8 8 0 1 0 2.3-5.7L4 8.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M4 4v4.5h4.5M12 8v5l3.5 2' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="auto_awesome"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 3 1.6 5.2L19 10l-5.4 1.8L12 17l-1.6-5.2L5 10l5.4-1.8zM5.5 15.5l.8 2.2 2.2.8-2.2.8-.8 2.2-.8-2.2-2.2-.8 2.2-.8zM18.5 2.5l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7z' fill='black'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="refresh"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6v5h-5M4 18v-5h5M7.5 8.5A6.5 6.5 0 0 1 18.5 6M16.5 15.5A6.5 6.5 0 0 1 5.5 18' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="folder"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 7.5h6l2 2H20.5v8.5a2 2 0 0 1-2 2H5.5a2 2 0 0 1-2-2z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="folder_open"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 7.5h6l2 2H21v8.5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-9a1.5 1.5 0 0 1 1.5-1.5Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M4 18 7 11h14l-3 7' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="folder_add"],
.material-symbols-outlined[data-icon="create_new_folder"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 7.5h6l2 2H20.5v8.5a2 2 0 0 1-2 2H5.5a2 2 0 0 1-2-2z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M14.5 12.5v5M12 15h5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="drive_file_move"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6h6l2 2h8v10H4z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='m13 12 3 3-3 3M8 15h8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="delete"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 6h14M9 6V4h6v2M8 6l1 14h6l1-14M10.5 10v6M13.5 10v6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="right_panel_open"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 5h16v14H4zM14 5v14M8 12h6M11 9l3 3-3 3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@@ -168,6 +172,12 @@ a:hover {
.material-symbols-outlined[data-icon="arrow_outward"],
.material-symbols-outlined[data-icon="open_in_new"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 6H5v13h13v-3M12 5h7v7M10 14 19 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="share"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='18' cy='5' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='6' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='18' cy='19' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m8.7 10.7 6.6-4.4M8.7 13.3l6.6 4.4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="view_list"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 6h12M8 12h12M8 18h12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='4.5' cy='6' r='1.5' fill='black'/%3E%3Ccircle cx='4.5' cy='12' r='1.5' fill='black'/%3E%3Ccircle cx='4.5' cy='18' r='1.5' fill='black'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="grid_view"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="upload_file"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 20h12a2 2 0 0 0 2-2V9l-5-5H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M14 4v6h6M12 16V9M9 12l3-3 3 3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="note_add"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 4h12v16H6zM9 9h6M9 13h3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16 13v5M13.5 15.5h5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="check_circle"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m8 12 2.6 2.6L16.5 9' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="hub"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='6' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='18' cy='6' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Ccircle cx='18' cy='18' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8.7 10.7 15.3 7.3M8.7 13.3l6.6 3.4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="comment"] { --mnote-icon-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 5h14v10H9l-4 4V5Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.material-symbols-outlined[data-icon="chat"],
@@ -219,7 +229,6 @@ a:hover {
.material-symbols-outlined[data-icon="text_fields"]::before,
.material-symbols-outlined[data-icon="toc"]::before,
.material-symbols-outlined[data-icon="translate"]::before,
.material-symbols-outlined[data-icon="upload_file"]::before,
.material-symbols-outlined[data-icon="view_column"]::before {
width: auto;
height: auto;
@@ -255,7 +264,6 @@ a:hover {
.material-symbols-outlined[data-icon="text_fields"]::before { content: "T"; }
.material-symbols-outlined[data-icon="toc"]::before { content: "☰"; }
.material-symbols-outlined[data-icon="translate"]::before { content: "文"; }
.material-symbols-outlined[data-icon="upload_file"]::before { content: "⇧"; }
.material-symbols-outlined[data-icon="view_column"]::before { content: "▥"; }
.material-symbols-outlined[data-icon="radio_button_unchecked"]::before {
width: .78em;
@@ -1232,6 +1232,36 @@
background: var(--wolai-bg-sidebar);
}
.mnote-navigation-page__item.mnote-page-block-link {
display: inline-flex;
width: fit-content;
max-width: 100%;
gap: 7px;
min-height: 28px;
padding: 1px 3px;
border-radius: 4px;
color: #37352f;
font-weight: 600;
text-decoration: underline;
text-decoration-color: rgba(55, 53, 47, 0.42);
text-decoration-thickness: 1px;
text-underline-offset: 3px;
}
.mnote-navigation-page__item.mnote-page-block-link::before {
content: "";
width: 16px;
height: 16px;
flex: 0 0 auto;
background: center / 16px 16px no-repeat url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.25 2.25h5.25L12.75 5.5v8.25h-8.5V2.25Z' stroke='%2337352f' stroke-width='1.25' stroke-linejoin='round'/%3E%3Cpath d='M9.5 2.25V5.5h3.25' stroke='%2337352f' stroke-width='1.25' stroke-linejoin='round'/%3E%3Cpath d='M6.25 8h4M6.25 10.25h3' stroke='%2337352f' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
opacity: 0.86;
}
.mnote-navigation-page__item.mnote-page-block-link:hover {
background: rgba(55, 53, 47, 0.08);
text-decoration-color: rgba(55, 53, 47, 0.68);
}
.document-main-editor-group {
min-width: 0;
min-height: 0;
@@ -2541,8 +2571,8 @@
}
.mnote-knowledge-rag-settings-panel {
width: min(1120px, calc(100vw - 24px));
max-height: calc(100vh - 72px);
width: min(1180px, calc(100vw - 24px));
max-height: calc(100vh - 32px);
overflow: hidden;
}
@@ -2558,7 +2588,7 @@
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 16px 18px;
padding: 10px 16px;
border-bottom: 1px solid #E5E7EB;
background: #FFFFFF;
}
@@ -2566,11 +2596,13 @@
.mnote-weknora-kb-page-title {
display: flex;
min-width: 0;
flex-direction: column;
gap: 2px;
flex-direction: row;
gap: 10px;
align-items: baseline;
}
.mnote-weknora-kb-page-eyebrow {
display: none;
color: #2F7D4A;
font: 11px/16px "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
letter-spacing: 0;
@@ -2579,8 +2611,8 @@
.mnote-weknora-kb-page-title strong {
color: #111827;
font-size: 20px;
line-height: 28px;
font-size: 17px;
line-height: 22px;
}
.mnote-weknora-kb-page-title span:last-child {
@@ -2614,19 +2646,23 @@
}
.mnote-weknora-kb-page-status {
padding: 10px 18px;
padding: 6px 16px;
border-bottom: 1px solid #E5E7EB;
background: #F9FAFB;
color: #4B5563;
background: #F7FBF8;
color: #166534;
font-size: 12px;
line-height: 18px;
}
.mnote-weknora-kb-page-body {
display: grid;
grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
min-height: min(620px, calc(100vh - 190px));
max-height: calc(100vh - 150px);
grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
min-height: min(710px, calc(100vh - 122px));
max-height: calc(100vh - 96px);
}
.mnote-weknora-kb-page-body[data-kb-list-hidden="true"] {
grid-template-columns: minmax(0, 1fr);
}
.mnote-weknora-kb-list-pane,
@@ -2644,6 +2680,10 @@
background: #FFFFFF;
}
.mnote-weknora-kb-list-pane[hidden] {
display: none;
}
.mnote-weknora-kb-list-head {
display: flex;
align-items: center;
@@ -2675,6 +2715,7 @@
}
.mnote-weknora-kb-list-head button,
.mnote-knowledge-rag-kb-manager button,
.mnote-weknora-doc-toolbar button,
.mnote-weknora-doc-actions button {
display: inline-flex;
@@ -2698,12 +2739,33 @@
}
.mnote-weknora-kb-list-head button:hover,
.mnote-knowledge-rag-kb-manager button:hover:not(:disabled),
.mnote-weknora-doc-toolbar button:hover,
.mnote-weknora-doc-actions button:hover {
background: #F3F4F6;
color: #111827;
}
.mnote-knowledge-rag-kb-manager button:disabled,
.mnote-weknora-doc-toolbar button:disabled,
.mnote-weknora-doc-actions button:disabled {
opacity: .48;
cursor: not-allowed;
}
.mnote-weknora-doc-toolbar button.mnote-knowledge-rag-primary-action,
.mnote-weknora-doc-actions button.mnote-knowledge-rag-primary-action {
border-color: #2F7D4A;
background: #2F7D4A;
color: #FFFFFF;
}
.mnote-weknora-doc-toolbar button.mnote-knowledge-rag-primary-action:hover,
.mnote-weknora-doc-actions button.mnote-knowledge-rag-primary-action:hover {
background: #24683C;
color: #FFFFFF;
}
.mnote-weknora-kb-card-wrap {
display: flex;
flex-direction: column;
@@ -2713,7 +2775,7 @@
.mnote-weknora-kb-card {
display: grid;
grid-template-columns: 28px minmax(0, 1fr) auto;
gap: 10px;
gap: 8px;
align-items: start;
width: 100%;
padding: 12px;
@@ -2820,6 +2882,10 @@
background: #F9FAFB;
}
.mnote-weknora-kb-create-card[hidden] {
display: none;
}
.mnote-weknora-kb-create-title {
display: flex;
align-items: center;
@@ -2832,30 +2898,40 @@
.mnote-weknora-kb-detail-pane {
display: flex;
flex-direction: column;
gap: 12px;
padding: 16px;
gap: 10px;
overflow: hidden;
padding: 10px 14px 14px;
}
.mnote-weknora-kb-detail-hero {
order: 1;
display: grid;
grid-template-columns: minmax(0, 1fr) minmax(210px, 280px);
gap: 16px;
align-items: start;
padding: 16px;
grid-template-columns: minmax(0, 1fr);
gap: 12px;
align-items: center;
padding: 8px 10px;
border: 1px solid #E5E7EB;
border-radius: 8px;
background: #FFFFFF;
}
.mnote-weknora-kb-detail-hero[hidden] {
display: none;
}
.mnote-weknora-kb-detail-hero select[hidden] {
display: none;
}
.mnote-weknora-kb-detail-hero h2 {
margin: 8px 0 4px;
margin: 0 0 2px;
color: #111827;
font-size: 22px;
line-height: 30px;
font-size: 16px;
line-height: 22px;
}
.mnote-weknora-kb-breadcrumb {
display: flex;
display: none;
align-items: center;
gap: 7px;
min-width: 0;
@@ -2880,7 +2956,59 @@
line-height: 18px;
}
.mnote-weknora-kb-type-pill {
display: none;
}
.mnote-knowledge-rag-kb-manager {
order: 1;
display: flex;
flex-direction: column;
gap: 8px;
padding: 10px;
border: 1px solid #E5E7EB;
border-radius: 8px;
background: #FFFFFF;
}
.mnote-knowledge-rag-kb-manager-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: end;
}
.mnote-knowledge-rag-kb-select-field {
display: flex;
flex: 1 1 300px;
min-width: 220px;
flex-direction: column;
gap: 4px;
color: #6B7280;
font-size: 11px;
line-height: 16px;
}
.mnote-knowledge-rag-kb-select-field select {
width: 100%;
height: 32px;
border: 1px solid #E5E7EB;
border-radius: 8px;
background: #FFFFFF;
color: #111827;
font-size: 12px;
line-height: 18px;
padding: 0 10px;
}
.mnote-knowledge-rag-kb-manager-note {
color: #6B7280;
font-size: 11px;
line-height: 16px;
}
.mnote-knowledge-rag-detail-tabs {
order: 2;
display: inline-flex;
width: fit-content;
max-width: 100%;
@@ -2909,10 +3037,169 @@
font-weight: 600;
}
.mnote-knowledge-rag-detail-tab[hidden] {
display: none;
}
.mnote-knowledge-rag-detail-panel[hidden] {
display: none;
}
.mnote-knowledge-rag-detail-panel:not([hidden]) {
order: 3;
display: flex;
min-height: 0;
flex: 1 1 auto;
flex-direction: column;
}
.mnote-kb-search-form {
display: flex;
gap: 8px;
align-items: center;
padding: 10px;
border: 1px solid #E5E7EB;
border-radius: 8px;
background: #FFFFFF;
}
.mnote-kb-search-box {
display: flex;
min-width: 0;
flex: 1 1 auto;
align-items: center;
gap: 8px;
height: 34px;
padding: 0 10px;
border: 1px solid #E5E7EB;
border-radius: 8px;
background: #F9FAFB;
}
.mnote-kb-search-box .material-symbols-outlined {
flex: 0 0 auto;
color: #6B7280;
}
.mnote-kb-search-input {
min-width: 0;
width: 100%;
border: 0;
outline: 0;
background: transparent;
color: #111827;
font-size: 12px;
line-height: 18px;
}
.mnote-kb-search-results {
display: flex;
min-height: 0;
flex: 1 1 auto;
flex-direction: column;
gap: 8px;
margin-top: 10px;
overflow: auto;
}
.mnote-kb-search-empty {
display: grid;
min-height: 160px;
place-items: center;
border: 1px dashed #D1D5DB;
border-radius: 8px;
background: #F9FAFB;
color: #6B7280;
font-size: 12px;
line-height: 18px;
}
.mnote-kb-search-empty.is-error {
border-color: #FCA5A5;
background: #FEF2F2;
color: #B91C1C;
}
.mnote-kb-search-result-item {
display: flex;
flex-direction: column;
gap: 7px;
padding: 10px 12px;
border: 1px solid #E5E7EB;
border-radius: 8px;
background: #FFFFFF;
}
.mnote-kb-search-result-header,
.mnote-kb-search-result-actions {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.mnote-kb-search-result-index,
.mnote-kb-search-result-score {
display: inline-flex;
align-items: center;
min-height: 20px;
border-radius: 999px;
font-size: 11px;
line-height: 16px;
padding: 0 7px;
}
.mnote-kb-search-result-index {
background: #EEF2FF;
color: #3730A3;
font-weight: 600;
}
.mnote-kb-search-result-score {
background: #ECFDF5;
color: #166534;
}
.mnote-kb-search-result-source {
overflow: hidden;
color: #374151;
font: 11px/16px "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
text-overflow: ellipsis;
white-space: nowrap;
}
.mnote-kb-search-result-preview,
.mnote-kb-search-result-citation {
color: #4B5563;
font-size: 12px;
line-height: 18px;
}
.mnote-kb-search-result-citation {
padding-top: 6px;
border-top: 1px solid #F3F4F6;
color: #6B7280;
}
.mnote-kb-search-result-actions {
justify-content: flex-end;
}
.mnote-kb-search-result-actions button {
min-height: 26px;
border: 1px solid #E5E7EB;
border-radius: 6px;
background: #FFFFFF;
color: #374151;
font-size: 11px;
line-height: 18px;
padding: 2px 8px;
}
.mnote-kb-search-result-actions button:hover:not(:disabled) {
background: #F3F4F6;
}
.mnote-weknora-doc-toolbar,
.mnote-weknora-doc-actions {
display: flex;
@@ -2922,10 +3209,11 @@
}
.mnote-weknora-doc-layout {
display: grid;
grid-template-columns: 184px minmax(0, 1fr);
gap: 12px;
align-items: start;
display: flex;
min-height: 0;
flex: 1 1 auto;
flex-direction: column;
gap: 10px;
}
.mnote-weknora-doc-sidebar {
@@ -2939,6 +3227,10 @@
background: #FFFFFF;
}
.mnote-weknora-doc-sidebar[hidden] {
display: none;
}
.mnote-weknora-doc-sidebar-head {
display: flex;
align-items: baseline;
@@ -2997,11 +3289,21 @@
.mnote-weknora-doc-main {
display: flex;
flex: 1 1 auto;
min-height: 0;
min-width: 0;
flex-direction: column;
gap: 10px;
}
.mnote-weknora-doc-toolbar {
position: sticky;
top: 0;
z-index: 1;
padding-bottom: 0;
background: #F6F7F9;
}
.mnote-weknora-view-switch {
display: inline-flex;
align-items: center;
@@ -3050,7 +3352,9 @@
}
.mnote-weknora-doc-table {
overflow: hidden;
flex: 1 1 auto;
min-height: 440px;
overflow: auto;
border: 1px solid #E5E7EB;
border-radius: 8px;
background: #FFFFFF;
@@ -3065,13 +3369,13 @@
.mnote-weknora-doc-table::before {
display: grid;
grid-template-columns: minmax(0, 1fr) 104px 104px 124px;
grid-template-columns: minmax(0, 1fr) 132px;
gap: 8px;
padding: 9px 12px;
border-bottom: 1px solid #E5E7EB;
background: #F9FAFB;
color: #6B7280;
content: "文档 状态 Chunk 操作";
content: "资料 操作";
font-size: 11px;
line-height: 16px;
white-space: pre;
@@ -3112,6 +3416,44 @@
gap: 8px;
}
.mnote-knowledge-rag-diagnostics {
order: 4;
border: 1px solid #E5E7EB;
border-radius: 8px;
background: #FFFFFF;
}
.mnote-knowledge-rag-diagnostics summary {
cursor: pointer;
color: #4B5563;
font-size: 12px;
line-height: 18px;
list-style: none;
padding: 8px 10px;
}
.mnote-knowledge-rag-diagnostics summary::-webkit-details-marker {
display: none;
}
.mnote-knowledge-rag-diagnostics summary::after {
content: "展开";
float: right;
color: #9CA3AF;
}
.mnote-knowledge-rag-diagnostics[open] summary {
border-bottom: 1px solid #E5E7EB;
}
.mnote-knowledge-rag-diagnostics[open] summary::after {
content: "收起";
}
.mnote-knowledge-rag-diagnostics .mnote-knowledge-rag-meta {
padding: 10px;
}
.mnote-knowledge-rag-meta div {
display: flex;
min-width: 0;
@@ -3169,6 +3511,20 @@
gap: 6px;
}
.mnote-knowledge-rag-source-composer {
display: flex;
flex-direction: column;
gap: 8px;
padding: 10px;
border: 1px solid #E5E7EB;
border-radius: 8px;
background: #FFFFFF;
}
.mnote-knowledge-rag-source-composer[hidden] {
display: none;
}
.mnote-knowledge-rag-source-tools {
display: flex;
flex-wrap: wrap;
@@ -3182,17 +3538,17 @@
.mnote-knowledge-rag-source-filters {
display: flex;
flex-wrap: wrap;
gap: 6px;
gap: 7px;
}
.mnote-knowledge-rag-source-filters button {
border: 1px solid #E3E1DE;
border-radius: 6px;
border: 1px solid #E5E7EB;
border-radius: 999px;
background: #FFFFFF;
color: #5F5A54;
color: #4B5563;
font-size: 11px;
line-height: 18px;
padding: 2px 7px;
padding: 3px 9px;
white-space: nowrap;
}
@@ -3225,7 +3581,7 @@
}
.mnote-knowledge-rag-source-input-row {
grid-template-columns: minmax(0, 1fr) 56px 28px;
grid-template-columns: minmax(0, 1fr) 56px 30px;
}
.mnote-knowledge-rag-input-status {
@@ -3275,7 +3631,7 @@
}
.mnote-knowledge-rag-source-main .mnote-weknora-source-aux {
display: flex;
display: none;
flex-wrap: wrap;
gap: 6px;
font-family: inherit;