feat: enhance session sync and add voice input feature

- 增强会话同步:确保所有会话完全同步到新账号
  - 强制更新 model_provider 字段
  - 添加 session_index.jsonl 重建功能
  - 确保数据库 UPSERT 逻辑正确处理所有情况
- 新增语音输入功能(voice_cdp.js, voice_inject.js)
- 测试脚本和增强模块

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
mac
2026-07-16 19:16:45 +08:00
parent a6207fdefd
commit 02fb553c9e
19 changed files with 1884 additions and 95 deletions
+14
View File
@@ -651,3 +651,17 @@ body.cv-noscroll { overflow: hidden; }
#tab-canvas.cv-fullscreen { position: fixed; inset: 0; z-index: 9999; margin: 0;
height: auto; padding: 14px 16px; background: var(--bg); }
#tab-canvas.cv-fullscreen .cv-stage { min-height: 0; border-radius: 12px; }
/* —— 语音输入面板 —— */
.voice-body { display: grid; gap: 14px; max-width: 760px; }
.voice-card { border: 1px solid var(--border, rgba(255,255,255,.1)); border-radius: 12px; padding: 14px 16px; background: var(--card, rgba(255,255,255,.02)); }
.voice-card-title { font-weight: 600; margin-bottom: 8px; }
.voice-row { display: flex; gap: 8px; align-items: center; }
.voice-row .search { flex: 1; }
.voice-ol { margin: 6px 0 0 18px; line-height: 1.9; color: var(--muted, #9ca3af); font-size: 13px; }
.voice-dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; background: #6b7280; flex: none; }
.voice-dot[data-state="connected"] { background: #34d399; box-shadow: 0 0 8px rgba(52,211,153,.7); }
.voice-dot[data-state="transcribing"], .voice-dot[data-state="recording"] { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,.7); }
.voice-dot[data-state="restarting"], .voice-dot[data-state="connecting"], .voice-dot[data-state="injecting"], .voice-dot[data-state="checking"] { background: #60a5fa; }
.voice-dot[data-state="error"] { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,.7); }
.voice-dot[data-state="running_no_port"] { background: #f59e0b; }