feat: 实现会话配置与多轮上下文
All checks were successful
Backend CI / ci (pull_request) Successful in 1m0s
Frontend CI / ci (pull_request) Successful in 1m0s

- 新增 ConfigPanel 组件:TTS 开关、detail level、语言选择
- 新增 storage.ts:配置持久化到 localStorage
- useVisionSession:连接后自动发送 config,维护最近 10 轮对话历史
- App:齿轮按钮展开配置面板,HD 角标,TTS 播放联动 ttsEnabled

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-13 14:19:47 +08:00
parent 8033807f7c
commit 7e3762b589
5 changed files with 267 additions and 18 deletions

View File

@@ -53,6 +53,26 @@ body {
font-weight: 700;
}
.header-right {
display: flex;
align-items: center;
gap: 8px;
}
.btn-icon {
background: none;
border: none;
font-size: 1.2rem;
cursor: pointer;
padding: 4px;
border-radius: 4px;
transition: background 0.2s;
}
.btn-icon:hover {
background: var(--color-surface);
}
.status {
font-size: 0.85rem;
padding: 4px 12px;
@@ -364,3 +384,67 @@ body {
@keyframes spin {
to { transform: rotate(360deg); }
}
/* ---- Config Panel ---- */
.config-panel {
background: var(--color-surface);
border: 1px solid var(--color-border);
border-radius: var(--radius);
padding: 16px;
margin: 8px 0;
}
.config-panel__header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
font-weight: 600;
}
.config-panel__close {
background: none;
border: none;
color: var(--color-text-muted);
cursor: pointer;
font-size: 1rem;
padding: 2px 6px;
}
.config-panel__close:hover {
color: var(--color-text);
}
.config-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
font-size: 0.9rem;
}
.config-row select,
.config-row input[type="checkbox"] {
background: var(--color-bg);
color: var(--color-text);
border: 1px solid var(--color-border);
border-radius: 4px;
padding: 4px 8px;
font-size: 0.85rem;
}
/* ---- Detail Badge ---- */
.detail-badge {
position: absolute;
top: 8px;
right: 8px;
background: rgba(37, 99, 235, 0.8);
color: white;
padding: 2px 8px;
border-radius: 4px;
font-size: 0.7rem;
font-weight: 700;
letter-spacing: 0.5px;
}