```
feat(config): 添加任务配置中的模型模式支持 - 在config.json中为任务添加mode和useBrowser字段 - 默认使用glm-5模型模式 feat(ui): 更新前端界面显示模型信息并添加模型选择功能 - 在任务表格中添加模型列显示 - 在新增/编辑任务表单中添加模型选择下拉框 - 支持多种模型选项包括qwen3.5-plus、qwen3-max等 - 更新表格列数以适应新增的模型列 feat(core): 实现任务模型模式的功能支持 - 在agentService.js中添加normalizeMode函数处理模型模式 - 修改createTask和runAgentTask函数支持mode参数 - 在scheduler.js中实现任务的模型模式配置 - 在server.js中添加模型模式的标准化和API支持 - 为任务运行时添加模型模式的日志输出 ```
This commit is contained in:
@@ -397,13 +397,14 @@
|
||||
<tr>
|
||||
<th>城市</th>
|
||||
<th>提示词</th>
|
||||
<th>模型</th>
|
||||
<th>状态</th>
|
||||
<th>浏览器</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tasksTbody">
|
||||
<tr><td colspan="5" class="empty-state">加载中...</td></tr>
|
||||
<tr><td colspan="6" class="empty-state">加载中...</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -529,6 +530,19 @@
|
||||
<label>提示词 (在提示词中包含目标网址和抓取要求)</label>
|
||||
<textarea id="taskPrompt" rows="6" placeholder="请访问 https://xxx.com 获取今天的所有招标公告和中标公告信息..." required></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>模型 (mode)</label>
|
||||
<select id="taskMode">
|
||||
<option value="qwen3.5-plus">qwen3.5-plus</option>
|
||||
<option value="qwen3-max-2026-01-23">qwen3-max-2026-01-23</option>
|
||||
<option value="qwen3-coder-next">qwen3-coder-next</option>
|
||||
<option value="qwen3-coder-plus">qwen3-coder-plus</option>
|
||||
<option value="glm-5">glm-5</option>
|
||||
<option value="glm-4.7">glm-4.7</option>
|
||||
<option value="kimi-k2.5">kimi-k2.5</option>
|
||||
<option value="MiniMax-M2.5">MiniMax-M2.5</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<input type="checkbox" id="taskEnabled" checked> 启用
|
||||
@@ -581,7 +595,7 @@
|
||||
document.getElementById('taskSummary').textContent = `共 ${tasksList.length} 个任务,${enabled} 个启用`;
|
||||
|
||||
if (tasksList.length === 0) {
|
||||
tbody.innerHTML = '<tr><td colspan="5" class="empty-state">暂无任务,点击「新增任务」添加</td></tr>';
|
||||
tbody.innerHTML = '<tr><td colspan="6" class="empty-state">暂无任务,点击「新增任务」添加</td></tr>';
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -589,6 +603,7 @@
|
||||
<tr>
|
||||
<td><strong>${t.city || '-'}</strong></td>
|
||||
<td class="prompt-cell" title="${(t.prompt || '').replace(/"/g, '"')}">${t.prompt || '-'}</td>
|
||||
<td><code style="font-family:'Fira Code','Cascadia Code',monospace;font-size:12px;">${t.mode || 'qwen3.5-plus'}</code></td>
|
||||
<td><span class="tag ${t.enabled ? 'tag-on' : 'tag-off'}">${t.enabled ? '启用' : '禁用'}</span></td>
|
||||
<td><span class="tag ${t.useBrowser === true ? 'tag-on' : (t.useBrowser === false ? 'tag-off' : '')}">${t.useBrowser === true ? '打开' : (t.useBrowser === false ? '关闭' : '继承全局')}</span></td>
|
||||
<td>
|
||||
@@ -608,6 +623,15 @@
|
||||
document.getElementById('taskEditId').value = item ? item.id : '';
|
||||
document.getElementById('taskCity').value = item ? item.city : '';
|
||||
document.getElementById('taskPrompt').value = item ? item.prompt : '';
|
||||
const modeSelect = document.getElementById('taskMode');
|
||||
const modeValue = item?.mode || 'qwen3.5-plus';
|
||||
if (![...modeSelect.options].some(opt => opt.value === modeValue)) {
|
||||
const option = document.createElement('option');
|
||||
option.value = modeValue;
|
||||
option.textContent = modeValue;
|
||||
modeSelect.appendChild(option);
|
||||
}
|
||||
modeSelect.value = modeValue;
|
||||
document.getElementById('taskEnabled').checked = item ? item.enabled : true;
|
||||
document.getElementById('taskUseBrowser').checked = item
|
||||
? (typeof item.useBrowser === 'boolean' ? item.useBrowser : globalUseBrowser)
|
||||
@@ -625,6 +649,7 @@
|
||||
const data = {
|
||||
city: document.getElementById('taskCity').value.trim(),
|
||||
prompt: document.getElementById('taskPrompt').value.trim(),
|
||||
mode: document.getElementById('taskMode').value.trim() || 'qwen3.5-plus',
|
||||
enabled: document.getElementById('taskEnabled').checked,
|
||||
useBrowser: document.getElementById('taskUseBrowser').checked,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user