添加测试、添加总结、全量、rag(todo)3种历史记录保存方式,流式实现

This commit is contained in:
2026-05-05 03:01:20 +08:00
parent 2050a30a52
commit adb59da06d
46 changed files with 4484 additions and 882 deletions

View File

@@ -52,6 +52,13 @@
color: white;
}
/* ✅ 激活状态的按钮 */
.action-btn.active {
background: var(--color-accent);
border-color: var(--color-accent);
color: white;
}
/* Tag 筛选器 */
.tag-filter {
display: flex;
@@ -131,6 +138,7 @@
grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); /* 减小最小宽度让窄屏也能显示2列 */
gap: 8px; /* 增加间距,让卡片更有呼吸感 */
padding: 2px;
align-content: start; /* ✅ 从上到下排列,不留空白 */
}
.character-item {
@@ -138,7 +146,7 @@
display: flex;
flex-direction: column;
width: 100%; /* 改为自适应宽度 */
height: 170px; /* 减小高度从200px降到170px */
height: 170px; /* ✅ 固定高度,不随空间浮动 */
background: var(--color-bg-secondary);
border: 2px solid var(--color-border);
border-radius: 6px;
@@ -153,6 +161,19 @@
-ms-user-select: none;
}
/* ✅ 无图模式 - 缩小卡片 */
.character-item.no-image {
height: 80px; /* 减小高度 */
}
.character-item.no-image .character-avatar-wrapper {
display: none; /* 隐藏图片区域 */
}
.character-item.no-image .character-info {
padding: 8px; /* 增加内边距 */
}
.character-item:hover {
border-color: var(--color-accent);
transform: translateY(-2px);
@@ -304,7 +325,7 @@
.floating-toolbar {
position: sticky;
top: 0;
z-index: 100;
z-index: var(--z-top-bar); /* ✅ 组件层 - TopBar 同级 */
margin-bottom: 8px;
}
@@ -357,7 +378,7 @@
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
margin-top: -18px; /* 使用负 margin 代替 transform确保点击区域和视觉位置一致 */
width: 36px;
height: 36px;
background: var(--color-accent);
@@ -368,23 +389,24 @@
cursor: pointer;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
animation: pulse 2s infinite;
z-index: 10;
}
@keyframes pulse {
0%, 100% {
transform: translateY(-50%) scale(1);
transform: scale(1);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
50% {
transform: translateY(-50%) scale(1.1);
transform: scale(1.1);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
}
.floating-toolbar:hover .toolbar-indicator {
opacity: 0;
transform: translateY(-50%) scale(0);
transform: scale(0);
pointer-events: none; /* ✅ 消失时不阻挡点击 */
}
.indicator-icon {
@@ -461,6 +483,18 @@
border-color: #059669;
}
/* ✅ 复制按钮样式 */
.toolbar-btn.duplicate {
background: #8b5cf6;
border-color: #8b5cf6;
color: white;
}
.toolbar-btn.duplicate:hover {
background: #7c3aed;
border-color: #7c3aed;
}
.toolbar-btn.delete {
background: #ef4444;
border-color: #ef4444;
@@ -533,6 +567,59 @@
margin-top: 2px;
}
/* ✅ 总结配置网格布局 */
.summary-config-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
padding: 8px;
background: var(--color-bg-primary);
border: 1px solid var(--color-border);
border-radius: 4px;
}
.summary-config-item {
display: flex;
flex-direction: column;
gap: 4px;
}
.summary-config-item.full-width {
grid-column: 1 / -1;
}
.summary-config-item label {
font-size: 10px;
color: var(--color-text-secondary);
font-weight: 500;
}
.summary-config-item input[type="number"] {
padding: 4px 6px;
background: var(--color-bg-secondary);
border: 1px solid var(--color-border);
border-radius: 4px;
color: var(--color-text-primary);
font-size: 11px;
}
.summary-config-item input[type="checkbox"] {
margin-right: 6px;
cursor: pointer;
}
.summary-config-item textarea {
padding: 6px 8px;
background: var(--color-bg-secondary);
border: 1px solid var(--color-border);
border-radius: 4px;
color: var(--color-text-primary);
font-size: 11px;
font-family: inherit;
resize: vertical;
min-height: 60px;
}
/* 聊天选择器弹窗 */
.chat-selector-overlay {
position: fixed;
@@ -544,7 +631,7 @@
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
z-index: var(--z-modal-overlay); /* ✅ 弹窗层 - 遮罩 */
}
.chat-selector-modal {