feat: 设置面板新增温度(Temperature)滑块控制

- 设置面板新增温度滑块 (0~2, 步长0.1)
- 实时显示当前值,保存到 IndexedDB 持久化
- 切换预设时自动同步温度滑块 UI
- 应用启动时从 DB 恢复温度设置
This commit is contained in:
thzxx
2026-04-05 20:07:38 +08:00
parent 4b72a1fc5d
commit 8a8c5da968
4 changed files with 29 additions and 1 deletions
+6
View File
@@ -227,6 +227,12 @@ function syncPresetToUI(preset) {
const inputCtx = document.querySelector('#inputNumCtx');
if (inputCtx) inputCtx.value = preset.numCtx || 24576;
// Temperature
const tempSlider = document.querySelector('#inputTemperature');
const tempDisplay = document.querySelector('#tempValue');
if (tempSlider) tempSlider.value = preset.temperature ?? 0.7;
if (tempDisplay) tempDisplay.textContent = (preset.temperature ?? 0.7).toFixed(1);
// Think toggle
const thinkCheckbox = document.querySelector('#toggleThink');
if (thinkCheckbox) {