扩展知识库索引任务和 RAG 检索支持增量入库和文档去重,优 化本体检测和规则匹配精度,前端设置页面拆分为 LLM、邮件 和 Hermes 员工同步子面板并重构样式,新增日志详情组件和 知识入库日志模型,补充单元测试覆盖。
691 lines
12 KiB
CSS
691 lines
12 KiB
CSS
.settings-page {
|
|
height: 100%;
|
|
min-height: 0;
|
|
animation: fadeUp 220ms var(--ease) both;
|
|
}
|
|
|
|
.settings-shell {
|
|
height: 100%;
|
|
min-height: 0;
|
|
display: grid;
|
|
grid-template-columns: 240px minmax(0, 1fr);
|
|
overflow: hidden;
|
|
border-radius: 24px;
|
|
background: #ffffff;
|
|
border: 1px solid #e2e8f0;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 16px rgba(0, 0, 0, 0.03);
|
|
}
|
|
|
|
.settings-nav {
|
|
min-width: 0;
|
|
min-height: 0;
|
|
display: grid;
|
|
grid-template-rows: auto minmax(0, 1fr);
|
|
gap: 12px;
|
|
padding: 24px 16px 20px;
|
|
border-right: 1px solid #e2e8f0;
|
|
background: #f8fafc;
|
|
}
|
|
|
|
.settings-nav-head {
|
|
display: grid;
|
|
gap: 6px;
|
|
padding: 0 8px 16px;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
}
|
|
|
|
.nav-kicker {
|
|
color: #10b981;
|
|
font-size: 10px;
|
|
font-weight: 800;
|
|
letter-spacing: 0.08em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.settings-nav-head h2 {
|
|
color: #0f172a;
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.settings-nav-head p {
|
|
color: #64748b;
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.settings-nav-list {
|
|
min-height: 0;
|
|
display: grid;
|
|
align-content: start;
|
|
gap: 6px;
|
|
overflow: auto;
|
|
padding-right: 2px;
|
|
}
|
|
|
|
.settings-nav-item {
|
|
width: 100%;
|
|
min-height: 60px;
|
|
display: block;
|
|
padding: 10px 14px;
|
|
border: 1px solid transparent;
|
|
border-radius: 12px;
|
|
background: transparent;
|
|
color: #334155;
|
|
text-align: left;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.settings-nav-item:hover {
|
|
background: rgba(255, 255, 255, 0.8);
|
|
border-color: #cbd5e1;
|
|
}
|
|
|
|
.settings-nav-item.active {
|
|
background: #ecfdf5;
|
|
color: #059669;
|
|
border-color: rgba(16, 185, 129, 0.12);
|
|
}
|
|
|
|
.nav-item-copy {
|
|
min-width: 0;
|
|
display: grid;
|
|
gap: 2px;
|
|
}
|
|
|
|
.nav-item-copy strong {
|
|
color: inherit;
|
|
font-size: 13.5px;
|
|
font-weight: 700;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.nav-item-copy small {
|
|
color: #64748b;
|
|
font-size: 11.5px;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.settings-nav-item.active .nav-item-copy small {
|
|
color: #059669;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.settings-body {
|
|
min-width: 0;
|
|
min-height: 0;
|
|
display: grid;
|
|
grid-template-rows: auto minmax(0, 1fr);
|
|
background: #f8fafc;
|
|
}
|
|
|
|
.settings-toolbar {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 2;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 18px;
|
|
padding: 16px 24px;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
background: rgba(255, 255, 255, 0.9);
|
|
backdrop-filter: blur(12px);
|
|
}
|
|
|
|
.settings-toolbar-copy {
|
|
min-width: 0;
|
|
}
|
|
|
|
.settings-breadcrumb {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
min-height: 24px;
|
|
padding: 0 10px;
|
|
border-radius: 99px;
|
|
background: #ecfdf5;
|
|
color: #059669;
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.settings-toolbar-copy h3 {
|
|
margin-top: 4px;
|
|
color: #0f172a;
|
|
font-size: 22px;
|
|
font-weight: 700;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.settings-toolbar-copy p {
|
|
margin-top: 3px;
|
|
max-width: 760px;
|
|
color: #64748b;
|
|
font-size: 12.5px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.settings-toolbar-actions {
|
|
display: grid;
|
|
justify-items: end;
|
|
gap: 12px;
|
|
}
|
|
|
|
.save-button {
|
|
min-height: 42px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
padding: 0 20px;
|
|
border: 0;
|
|
border-radius: 12px;
|
|
background: #10b981;
|
|
color: #ffffff;
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.save-button:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 6px 20px rgba(16, 185, 129, 0.25);
|
|
background: #059669;
|
|
}
|
|
|
|
.settings-content {
|
|
min-height: 0;
|
|
overflow: auto;
|
|
display: grid;
|
|
align-content: start;
|
|
gap: 20px;
|
|
padding: 20px 24px;
|
|
}
|
|
|
|
.model-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 20px;
|
|
}
|
|
|
|
.test-button {
|
|
min-height: 36px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
padding: 0 12px;
|
|
border: 1px solid rgba(16, 185, 129, 0.2);
|
|
border-radius: 10px;
|
|
background: #ecfdf5;
|
|
color: #059669;
|
|
font-size: 12.5px;
|
|
font-weight: 700;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.test-button:hover:not(:disabled) {
|
|
transform: translateY(-1px);
|
|
border-color: #10b981;
|
|
background: #10b981;
|
|
color: #ffffff;
|
|
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
|
|
}
|
|
|
|
.test-button:disabled {
|
|
cursor: wait;
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.profile-grid {
|
|
grid-template-columns: 96px repeat(2, minmax(0, 1fr));
|
|
}
|
|
|
|
.session-picker-filter {
|
|
position: relative;
|
|
}
|
|
|
|
.session-picker-trigger {
|
|
width: 100%;
|
|
min-height: 44px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
padding: 0 40px 0 14px;
|
|
border: 1px solid #cbd5e1;
|
|
border-radius: 12px;
|
|
background: #ffffff;
|
|
color: #0f172a;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
text-align: left;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.session-picker-label {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.session-picker-trigger .mdi {
|
|
position: absolute;
|
|
right: 14px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
color: #64748b;
|
|
font-size: 18px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.session-picker-trigger:hover,
|
|
.session-picker-filter.open .session-picker-trigger {
|
|
border-color: #10b981;
|
|
background: #ffffff;
|
|
color: #059669;
|
|
}
|
|
|
|
.session-picker-filter.open .session-picker-trigger {
|
|
box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.08);
|
|
}
|
|
|
|
.session-picker-filter.open .session-picker-trigger .mdi,
|
|
.session-picker-trigger:hover .mdi {
|
|
color: #059669;
|
|
}
|
|
|
|
.session-picker-popover {
|
|
position: absolute;
|
|
top: calc(100% + 8px);
|
|
left: 0;
|
|
width: 100%;
|
|
z-index: 40;
|
|
display: grid;
|
|
gap: 12px;
|
|
padding: 16px;
|
|
border: 1px solid #cbd5e1;
|
|
border-radius: 12px;
|
|
background: #ffffff;
|
|
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.session-picker-popover header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
}
|
|
|
|
.session-picker-popover header strong {
|
|
color: #0f172a;
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.session-picker-popover header button {
|
|
width: 28px;
|
|
height: 28px;
|
|
display: grid;
|
|
place-items: center;
|
|
border: 0;
|
|
border-radius: 8px;
|
|
background: transparent;
|
|
color: #64748b;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.session-picker-popover header button:hover {
|
|
background: #f1f5f9;
|
|
color: #0f172a;
|
|
}
|
|
|
|
.session-picker-option-list {
|
|
display: grid;
|
|
gap: 6px;
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.session-picker-option {
|
|
min-height: 36px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 0 12px;
|
|
border: 1px solid #cbd5e1;
|
|
border-radius: 8px;
|
|
background: #ffffff;
|
|
color: #334155;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
text-align: left;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.session-picker-option:hover,
|
|
.session-picker-option.active {
|
|
border-color: #10b981;
|
|
background: #ecfdf5;
|
|
color: #059669;
|
|
}
|
|
|
|
.secret-bound-state {
|
|
min-height: 24px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
color: #059669;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
line-height: 1.45;
|
|
}
|
|
|
|
.secret-bound-state i {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.test-feedback {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 8px;
|
|
margin-top: 16px;
|
|
padding: 12px 14px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.test-feedback i {
|
|
margin-top: 2px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.test-feedback.is-success {
|
|
background: #ecfdf5;
|
|
color: #059669;
|
|
}
|
|
|
|
.test-feedback.is-error {
|
|
background: #fef2f2;
|
|
color: #b91c1c;
|
|
}
|
|
|
|
.test-feedback.is-testing {
|
|
background: #eff6ff;
|
|
color: #1d4ed8;
|
|
}
|
|
|
|
.logo-field {
|
|
align-self: stretch;
|
|
}
|
|
|
|
.logo-tile {
|
|
width: 96px;
|
|
height: 96px;
|
|
display: grid;
|
|
place-items: center;
|
|
border: 1px dashed #cbd5e1;
|
|
border-radius: 20px;
|
|
background:
|
|
linear-gradient(45deg, #f8fafc 25%, transparent 25%, transparent 75%, #f8fafc 75%, #f8fafc),
|
|
linear-gradient(45deg, #f8fafc 25%, transparent 25%, transparent 75%, #f8fafc 75%, #f8fafc);
|
|
background-position: 0 0, 9px 9px;
|
|
background-size: 18px 18px;
|
|
color: #10b981;
|
|
font-size: 32px;
|
|
}
|
|
|
|
.preview-card {
|
|
display: grid;
|
|
grid-template-columns: 64px minmax(0, 1fr) auto;
|
|
align-items: center;
|
|
gap: 18px;
|
|
padding: 24px;
|
|
border: 1px solid rgba(16, 185, 129, 0.15);
|
|
border-radius: 20px;
|
|
background: linear-gradient(135deg, rgba(16, 185, 129, 0.04) 0%, rgba(59, 130, 246, 0.02) 100%);
|
|
}
|
|
|
|
.preview-icon {
|
|
width: 64px;
|
|
height: 64px;
|
|
display: grid;
|
|
place-items: center;
|
|
border-radius: 16px;
|
|
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
|
|
color: #ffffff;
|
|
font-size: 28px;
|
|
box-shadow: 0 8px 20px rgba(16, 185, 129, 0.15);
|
|
}
|
|
|
|
.preview-copy strong {
|
|
display: block;
|
|
color: #0f172a;
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.preview-copy p {
|
|
margin-top: 4px;
|
|
color: #334155;
|
|
font-size: 13.5px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.preview-copy small {
|
|
display: block;
|
|
margin-top: 6px;
|
|
color: #64748b;
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.preview-badge {
|
|
min-height: 26px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0 10px;
|
|
border-radius: 999px;
|
|
background: #ecfdf5;
|
|
color: #059669;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.chip-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.level-chip {
|
|
min-width: 80px;
|
|
min-height: 34px;
|
|
padding: 0 16px;
|
|
border: 1px solid #cbd5e1;
|
|
border-radius: 999px;
|
|
background: #ffffff;
|
|
color: #64748b;
|
|
font-size: 12px;
|
|
font-weight: 700;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.level-chip:hover {
|
|
border-color: #10b981;
|
|
color: #10b981;
|
|
background: #ecfdf5;
|
|
}
|
|
|
|
.level-chip.active {
|
|
border-color: #10b981;
|
|
background: #10b981;
|
|
color: #ffffff;
|
|
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
|
|
}
|
|
|
|
.range-shell {
|
|
min-height: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 14px;
|
|
padding: 0 14px;
|
|
border: 1px solid #cbd5e1;
|
|
border-radius: 12px;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.range-shell input[type='range'] {
|
|
flex: 1 1 auto;
|
|
accent-color: #10b981;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.range-shell strong {
|
|
min-width: 28px;
|
|
color: #0f172a;
|
|
font-size: 13px;
|
|
font-weight: 700;
|
|
text-align: right;
|
|
}
|
|
|
|
.rendering-settings-card .switch-group {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
/* 大语言模型配置卡片特定图标与标题排版 */
|
|
.card-title-with-icon {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.model-icon-box {
|
|
width: 40px;
|
|
height: 40px;
|
|
display: grid;
|
|
place-items: center;
|
|
border-radius: 10px;
|
|
font-size: 18px;
|
|
flex: 0 0 auto;
|
|
background: #f8fafc;
|
|
color: #475569;
|
|
border: 1px solid #e2e8f0;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
|
|
}
|
|
|
|
.model-icon-box.purple,
|
|
.model-icon-box.orange,
|
|
.model-icon-box.cyan,
|
|
.model-icon-box.teal {
|
|
background: #f8fafc;
|
|
color: #475569;
|
|
border: 1px solid #e2e8f0;
|
|
}
|
|
|
|
@media (max-width: 1260px) {
|
|
.settings-shell {
|
|
grid-template-columns: 200px minmax(0, 1fr);
|
|
}
|
|
|
|
.settings-toolbar {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
gap: 12px;
|
|
}
|
|
|
|
.settings-toolbar-actions {
|
|
justify-items: stretch;
|
|
}
|
|
|
|
.save-button {
|
|
justify-content: center;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 960px) {
|
|
.settings-shell {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.settings-nav {
|
|
grid-template-rows: auto auto auto;
|
|
border-right: 0;
|
|
border-bottom: 1px solid #e2e8f0;
|
|
}
|
|
|
|
.settings-nav-list {
|
|
display: flex;
|
|
gap: 8px;
|
|
overflow-x: auto;
|
|
padding-right: 0;
|
|
padding-bottom: 4px;
|
|
}
|
|
|
|
.settings-nav-item {
|
|
min-width: 170px;
|
|
}
|
|
|
|
.settings-toolbar,
|
|
.settings-content {
|
|
padding: 20px;
|
|
}
|
|
|
|
.model-grid,
|
|
.form-grid,
|
|
.profile-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.field-wide,
|
|
.field-full {
|
|
grid-column: span 1;
|
|
}
|
|
|
|
.logo-field {
|
|
width: fit-content;
|
|
}
|
|
|
|
.preview-card {
|
|
grid-template-columns: 1fr;
|
|
justify-items: start;
|
|
padding: 20px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.settings-toolbar {
|
|
padding: 16px;
|
|
}
|
|
|
|
.settings-toolbar-copy h3 {
|
|
font-size: 20px;
|
|
}
|
|
|
|
.settings-content {
|
|
padding: 16px;
|
|
}
|
|
|
|
.settings-card {
|
|
padding: 20px 16px;
|
|
border-radius: 16px;
|
|
}
|
|
|
|
.settings-nav {
|
|
padding: 16px 12px 12px;
|
|
}
|
|
}
|