2026-08-08 07:09:54 +08:00
|
|
|
|
/* ═══════════════════════════════════════════════
|
|
|
|
|
|
光湖知识库 · 主样式
|
|
|
|
|
|
设计基线:简洁、深色主题、阅读友好
|
|
|
|
|
|
═══════════════════════════════════════════════ */
|
|
|
|
|
|
|
|
|
|
|
|
:root {
|
|
|
|
|
|
--kb-bg: #0d1117;
|
|
|
|
|
|
--kb-bg-secondary: #161b22;
|
|
|
|
|
|
--kb-bg-tertiary: #21262d;
|
|
|
|
|
|
--kb-border: #30363d;
|
|
|
|
|
|
--kb-text: #e6edf3;
|
|
|
|
|
|
--kb-text-muted: #8b949e;
|
|
|
|
|
|
--kb-accent: #58a6ff;
|
|
|
|
|
|
--kb-accent-hover: #79c0ff;
|
|
|
|
|
|
--kb-danger: #f85149;
|
|
|
|
|
|
--kb-success: #3fb950;
|
|
|
|
|
|
--kb-warning: #d29922;
|
|
|
|
|
|
--kb-font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
|
|
|
|
|
|
--kb-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
|
|
|
|
|
|
--kb-sidebar-width: 280px;
|
|
|
|
|
|
--kb-header-height: 52px;
|
|
|
|
|
|
--kb-radius: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
* {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
body {
|
|
|
|
|
|
font-family: var(--kb-font-sans);
|
|
|
|
|
|
background: var(--kb-bg);
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 布局 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.kb-app {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
height: 100vh;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-header {
|
|
|
|
|
|
height: var(--kb-header-height);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 0 16px;
|
|
|
|
|
|
border-bottom: 1px solid var(--kb-border);
|
|
|
|
|
|
background: var(--kb-bg-secondary);
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-header-left {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-header-center {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-header-right {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-title {
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-body {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 侧栏 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.kb-sidebar {
|
|
|
|
|
|
width: var(--kb-sidebar-width);
|
|
|
|
|
|
border-right: 1px solid var(--kb-border);
|
|
|
|
|
|
background: var(--kb-bg-secondary);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-sidebar-actions {
|
|
|
|
|
|
padding: 12px;
|
|
|
|
|
|
border-bottom: 1px solid var(--kb-border);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 文档树 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.kb-tree {
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
padding: 8px 0;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-tree-item {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 6px 12px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
transition: background 0.15s;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-tree-item:hover {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-tree-item.active {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
color: var(--kb-accent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-tree-icon {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-tree-name {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-tree-add {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
width: 20px;
|
|
|
|
|
|
height: 20px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-tree-folder-header:hover .kb-tree-add {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-tree-add:hover {
|
|
|
|
|
|
color: var(--kb-accent);
|
|
|
|
|
|
border-color: var(--kb-accent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 内容区 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.kb-content {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 编辑器 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.kb-editor {
|
|
|
|
|
|
max-width: 900px;
|
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
padding: 24px 32px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-editor-meta {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
|
padding-bottom: 12px;
|
|
|
|
|
|
border-bottom: 1px solid var(--kb-border);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-editor-title {
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
line-height: 1.3;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-editor-title:hover {
|
|
|
|
|
|
color: var(--kb-accent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-editor-title-input {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-editor-toolbar {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-editor-edit-pane {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: 1fr 1fr;
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
min-height: 500px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-editor-textarea {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
min-height: 500px;
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
font-family: var(--kb-font-mono);
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
line-height: 1.7;
|
|
|
|
|
|
resize: vertical;
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-editor-textarea:focus {
|
|
|
|
|
|
border-color: var(--kb-accent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-editor-preview-pane,
|
|
|
|
|
|
.kb-editor-read-pane {
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-editor-read-pane {
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── Markdown 渲染 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.kb-markdown-render {
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
line-height: 1.8;
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-markdown-render h1 { font-size: 2em; margin: 1em 0 0.5em; border-bottom: 1px solid var(--kb-border); padding-bottom: 0.3em; }
|
|
|
|
|
|
.kb-markdown-render h2 { font-size: 1.5em; margin: 1em 0 0.5em; border-bottom: 1px solid var(--kb-border); padding-bottom: 0.3em; }
|
|
|
|
|
|
.kb-markdown-render h3 { font-size: 1.25em; margin: 1em 0 0.5em; }
|
|
|
|
|
|
.kb-markdown-render p { margin: 0.8em 0; }
|
|
|
|
|
|
.kb-markdown-render ul, .kb-markdown-render ol { margin: 0.8em 0; padding-left: 2em; }
|
|
|
|
|
|
.kb-markdown-render li { margin: 0.3em 0; }
|
|
|
|
|
|
.kb-markdown-render blockquote {
|
|
|
|
|
|
border-left: 3px solid var(--kb-accent);
|
|
|
|
|
|
padding: 0.5em 1em;
|
|
|
|
|
|
margin: 1em 0;
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
}
|
|
|
|
|
|
.kb-markdown-render code {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
font-family: var(--kb-font-mono);
|
|
|
|
|
|
font-size: 0.9em;
|
|
|
|
|
|
}
|
|
|
|
|
|
.kb-markdown-render pre {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
|
margin: 1em 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.kb-markdown-render pre code {
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.kb-markdown-render table {
|
|
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
margin: 1em 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.kb-markdown-render th, .kb-markdown-render td {
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
}
|
|
|
|
|
|
.kb-markdown-render th {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
.kb-markdown-render a {
|
|
|
|
|
|
color: var(--kb-accent);
|
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
.kb-markdown-render a:hover {
|
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
|
}
|
|
|
|
|
|
.kb-markdown-render img {
|
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
}
|
|
|
|
|
|
.kb-markdown-render hr {
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
border-top: 1px solid var(--kb-border);
|
|
|
|
|
|
margin: 2em 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 搜索 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
max-width: 480px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-input-wrap {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-input-wrap:focus-within {
|
|
|
|
|
|
border-color: var(--kb-accent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-icon {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-input {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
padding: 8px 0;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-input::placeholder {
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-clear {
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
padding: 2px 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-loading {
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-dropdown {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
top: 100%;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
right: 0;
|
|
|
|
|
|
background: var(--kb-bg-secondary);
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
|
max-height: 360px;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
z-index: 100;
|
|
|
|
|
|
box-shadow: 0 8px 24px rgba(0,0,0,0.4);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-result {
|
|
|
|
|
|
padding: 10px 14px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
border-bottom: 1px solid var(--kb-border);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-result:last-child {
|
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-result:hover {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-result-title {
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
margin-bottom: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-result-path {
|
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
margin-bottom: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-result-snippet {
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-search-empty {
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 版本历史 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history {
|
|
|
|
|
|
max-width: 900px;
|
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
padding: 24px 32px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-title {
|
|
|
|
|
|
font-size: 22px;
|
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-hint {
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-list {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-entry {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 10px 14px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
background: var(--kb-bg-secondary);
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-entry.selected {
|
|
|
|
|
|
border-color: var(--kb-accent);
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-entry-main {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-hash {
|
|
|
|
|
|
font-family: var(--kb-font-mono);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: var(--kb-accent);
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-message {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-date {
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-author {
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-preview,
|
|
|
|
|
|
.kb-history-diff {
|
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-preview-header,
|
|
|
|
|
|
.kb-history-diff-header {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
padding: 10px 14px;
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
border-bottom: 1px solid var(--kb-border);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-preview-header button,
|
|
|
|
|
|
.kb-history-diff-header button {
|
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-preview-content {
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
font-family: var(--kb-font-mono);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
|
white-space: pre-wrap;
|
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
|
max-height: 400px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-diff-stats {
|
|
|
|
|
|
font-family: var(--kb-font-mono);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
color: var(--kb-success);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-diff-hunk {
|
|
|
|
|
|
border-bottom: 1px solid var(--kb-border);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-diff-line {
|
|
|
|
|
|
padding: 2px 14px;
|
|
|
|
|
|
font-family: var(--kb-font-mono);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
|
white-space: pre;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-diff-line.add {
|
|
|
|
|
|
background: rgba(63, 185, 80, 0.15);
|
|
|
|
|
|
color: var(--kb-success);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-diff-line.del {
|
|
|
|
|
|
background: rgba(248, 81, 73, 0.15);
|
|
|
|
|
|
color: var(--kb-danger);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-diff-line.ctx {
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 通用按钮 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-icon {
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-icon:hover {
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-danger:hover {
|
|
|
|
|
|
color: var(--kb-danger) !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-primary {
|
|
|
|
|
|
background: var(--kb-accent);
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
padding: 6px 16px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-primary:hover {
|
|
|
|
|
|
background: var(--kb-accent-hover);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-secondary {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
padding: 6px 16px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-secondary:hover {
|
|
|
|
|
|
border-color: var(--kb-text-muted);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-small {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
padding: 4px 10px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-small:hover {
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
border-color: var(--kb-text-muted);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-tab {
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
padding: 6px 12px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-tab:hover {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-tab.active {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
color: var(--kb-accent);
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 空状态 / 错误 / 加载 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.kb-empty {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-empty-icon {
|
|
|
|
|
|
font-size: 48px;
|
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-empty-hint {
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-error {
|
|
|
|
|
|
background: rgba(248, 81, 73, 0.1);
|
|
|
|
|
|
border: 1px solid var(--kb-danger);
|
|
|
|
|
|
color: var(--kb-danger);
|
|
|
|
|
|
padding: 10px 16px;
|
|
|
|
|
|
margin: 16px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-error button {
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
color: var(--kb-danger);
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-loading {
|
|
|
|
|
|
padding: 24px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-history-loading {
|
|
|
|
|
|
padding: 24px;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 滚动条 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
|
|
width: 8px;
|
|
|
|
|
|
height: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar-track {
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
|
|
|
|
background: var(--kb-border);
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
|
|
|
|
background: var(--kb-text-muted);
|
|
|
|
|
|
}
|
2026-08-08 07:38:09 +08:00
|
|
|
|
|
|
|
|
|
|
/* ═══════════════════════════════════════════════
|
|
|
|
|
|
Agent 面板
|
|
|
|
|
|
═══════════════════════════════════════════════ */
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-agent {
|
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
|
background: linear-gradient(135deg, #1a5f7a 0%, #0d3b66 100%);
|
|
|
|
|
|
border: 1px solid rgba(88, 166, 255, 0.3);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-btn-agent.active {
|
|
|
|
|
|
background: linear-gradient(135deg, #2980b9 0%, #1a5f7a 100%);
|
|
|
|
|
|
border-color: var(--kb-accent);
|
|
|
|
|
|
box-shadow: 0 0 12px rgba(88, 166, 255, 0.2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-agent-panel {
|
|
|
|
|
|
width: 380px;
|
|
|
|
|
|
min-width: 320px;
|
|
|
|
|
|
max-width: 480px;
|
|
|
|
|
|
border-left: 1px solid var(--kb-border);
|
|
|
|
|
|
background: var(--kb-bg);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── AgentChat 内部布局 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.agent-chat {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-header {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
padding: 12px 16px;
|
|
|
|
|
|
border-bottom: 1px solid var(--kb-border);
|
|
|
|
|
|
background: var(--kb-bg-secondary);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-info {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-avatar {
|
|
|
|
|
|
width: 36px;
|
|
|
|
|
|
height: 36px;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
background: linear-gradient(135deg, #1a5f7a 0%, #0d3b66 100%);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-meta h3 {
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
line-height: 1.3;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-role {
|
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
max-width: 180px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-model {
|
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
padding: 2px 8px;
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
font-family: var(--kb-font-mono);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-clear {
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
transition: all 0.15s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-clear:hover {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
color: var(--kb-danger);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 对话区域 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.agent-messages {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-welcome {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
padding: 40px 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.welcome-icon {
|
|
|
|
|
|
font-size: 48px;
|
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-welcome h2 {
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-welcome p {
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.welcome-hint {
|
|
|
|
|
|
margin-top: 16px !important;
|
|
|
|
|
|
font-size: 12px !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.welcome-suggestions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
margin-top: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.welcome-suggestions button {
|
|
|
|
|
|
background: var(--kb-bg-secondary);
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
padding: 10px 14px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
transition: all 0.15s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.welcome-suggestions button:hover {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
border-color: var(--kb-accent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 消息气泡 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.msg-user-bubble {
|
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
|
max-width: 85%;
|
|
|
|
|
|
background: linear-gradient(135deg, #1a5f7a 0%, #0d4a6b 100%);
|
|
|
|
|
|
border-radius: 16px 16px 4px 16px;
|
|
|
|
|
|
padding: 10px 14px;
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-user-bubble p {
|
|
|
|
|
|
white-space: pre-wrap;
|
|
|
|
|
|
word-break: break-word;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-assistant-bubble {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
max-width: 90%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-avatar {
|
|
|
|
|
|
width: 28px;
|
|
|
|
|
|
height: 28px;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
margin-top: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-content {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-markdown {
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-markdown p {
|
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-markdown p:last-child {
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-markdown code {
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
padding: 1px 5px;
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-family: var(--kb-font-mono);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-markdown pre {
|
|
|
|
|
|
background: var(--kb-bg-secondary);
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
padding: 10px 12px;
|
|
|
|
|
|
border-radius: var(--kb-radius);
|
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
|
margin: 8px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-markdown pre code {
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-markdown ul,
|
|
|
|
|
|
.msg-markdown ol {
|
|
|
|
|
|
padding-left: 20px;
|
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-markdown li {
|
|
|
|
|
|
margin-bottom: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-markdown a {
|
|
|
|
|
|
color: var(--kb-accent);
|
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.msg-markdown a:hover {
|
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 工具调用展示 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.tool-calls,
|
|
|
|
|
|
.tool-results {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 4px;
|
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-call,
|
|
|
|
|
|
.tool-result {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
padding: 4px 8px;
|
|
|
|
|
|
background: var(--kb-bg-tertiary);
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-icon {
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-name {
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: var(--kb-accent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-args {
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
|
word-break: break-all;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-result pre {
|
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
white-space: pre-wrap;
|
|
|
|
|
|
word-break: break-word;
|
|
|
|
|
|
max-height: 120px;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
font-family: var(--kb-font-mono);
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-result.tool-error pre {
|
|
|
|
|
|
color: var(--kb-danger);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 输入区 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.agent-input-area {
|
|
|
|
|
|
padding: 12px 16px 16px;
|
|
|
|
|
|
border-top: 1px solid var(--kb-border);
|
|
|
|
|
|
background: var(--kb-bg-secondary);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-input-wrapper {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: flex-end;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
background: var(--kb-bg);
|
|
|
|
|
|
border: 1px solid var(--kb-border);
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
|
transition: border-color 0.15s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-input-wrapper:focus-within {
|
|
|
|
|
|
border-color: var(--kb-accent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-input {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
background: none;
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
color: var(--kb-text);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
font-family: var(--kb-font-sans);
|
|
|
|
|
|
resize: none;
|
|
|
|
|
|
outline: none;
|
|
|
|
|
|
min-height: 20px;
|
|
|
|
|
|
max-height: 120px;
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-input::placeholder {
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-send {
|
|
|
|
|
|
width: 32px;
|
|
|
|
|
|
height: 32px;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
background: var(--kb-accent);
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
transition: all 0.15s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-send:hover:not(:disabled) {
|
|
|
|
|
|
background: var(--kb-accent-hover);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-send:disabled {
|
|
|
|
|
|
opacity: 0.4;
|
|
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.agent-hint {
|
|
|
|
|
|
margin-top: 6px;
|
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
|
color: var(--kb-text-muted);
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 加载动画 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
.typing {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 4px;
|
|
|
|
|
|
padding: 8px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.typing .dot {
|
|
|
|
|
|
width: 6px;
|
|
|
|
|
|
height: 6px;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
background: var(--kb-text-muted);
|
|
|
|
|
|
animation: typing 1.2s infinite;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.typing .dot:nth-child(2) {
|
|
|
|
|
|
animation-delay: 0.2s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.typing .dot:nth-child(3) {
|
|
|
|
|
|
animation-delay: 0.4s;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes typing {
|
|
|
|
|
|
0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
|
|
|
|
|
|
30% { opacity: 1; transform: translateY(-4px); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* ─── 响应式 ─── */
|
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 900px) {
|
|
|
|
|
|
.kb-agent-panel {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
max-width: none;
|
|
|
|
|
|
border-left: none;
|
|
|
|
|
|
border-top: 1px solid var(--kb-border);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.kb-body {
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|