feat(ui): 配置面板补 verifyCmd / 项目级 model 输入项
在 #configPanel 新增一行 form-row,包含「校验命令」(cfgVerifyCmd) 和 「项目 Model」(cfgModel) 两个文本输入;打开面板时从 project 读取当前值, 保存时通过 PATCH /api/projects/:id 写入(空白 → null 清空)。 任务 ID:tsk_kmdMuWSn0HUS Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -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; // 保存成功自动收起
|
||||
|
||||
Reference in New Issue
Block a user