From f2c2d9aebdb9bb205c5eed8283e83e93dcbcfee7 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Sat, 13 Jun 2026 03:32:23 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E9=85=8D=E7=BD=AE=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E8=A1=A5=20verifyCmd=20/=20=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=BA=A7=20model=20=E8=BE=93=E5=85=A5=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 #configPanel 新增一行 form-row,包含「校验命令」(cfgVerifyCmd) 和 「项目 Model」(cfgModel) 两个文本输入;打开面板时从 project 读取当前值, 保存时通过 PATCH /api/projects/:id 写入(空白 → null 清空)。 任务 ID:tsk_kmdMuWSn0HUS Co-Authored-By: Claude Sonnet 4.6 --- web/app.js | 6 +++++- web/index.html | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/web/app.js b/web/app.js index 733f9d5..4b9c634 100644 --- a/web/app.js +++ b/web/app.js @@ -1216,6 +1216,8 @@ document.addEventListener('click', (ev) => { if (p) { $('#cfgConcurrency').value = p.concurrency ?? 1; $('#cfgAutonomy').value = AUTONOMY_LABEL[p.autonomy] ? p.autonomy : 'manual'; + $('#cfgVerifyCmd').value = p.verifyCmd ?? ''; + $('#cfgModel').value = p.model ?? ''; } } break; @@ -1225,9 +1227,11 @@ document.addEventListener('click', (ev) => { const cc = Number($('#cfgConcurrency').value); if (!Number.isInteger(cc) || cc < 1) { toast('最大并发必须是 ≥1 的整数'); break; } const autonomy = $('#cfgAutonomy').value; + const verifyCmd = $('#cfgVerifyCmd').value.trim() || null; + const model = $('#cfgModel').value.trim() || null; act(async () => { await api(`/api/projects/${S.currentProjectId}`, { - method: 'PATCH', body: JSON.stringify({ concurrency: cc, autonomy }), + method: 'PATCH', body: JSON.stringify({ concurrency: cc, autonomy, verifyCmd, model }), }); await loadProjects(); // 刷新当前值显示 $('#configPanel').hidden = true; // 保存成功自动收起 diff --git a/web/index.html b/web/index.html index d38ddb0..6a1ddc6 100644 --- a/web/index.html +++ b/web/index.html @@ -77,6 +77,14 @@ +
+ + +