From c6e4f9bbfdaa83efc7b6931fb9cc8c39efe44fd3 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 8 Mar 2026 21:09:02 +0000 Subject: feat(web): remove Agent and Model selection from UI As the system now automatically classifies and assigns the best agent and model per task, manual selection is no longer required and has been removed from New Task, Edit Task, and Template forms. --- web/app.js | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) (limited to 'web/app.js') diff --git a/web/app.js b/web/app.js index 6da2f0e..f96f70e 100644 --- a/web/app.js +++ b/web/app.js @@ -519,21 +519,6 @@ function createEditForm(task) { form.appendChild(makeField('Description', 'textarea', { name: 'description', rows: '2', value: task.description || '' })); form.appendChild(makeField('Instructions', 'textarea', { name: 'instructions', rows: '4', value: a.instructions || '' })); - const typeLabel = document.createElement('label'); - typeLabel.textContent = 'Agent Type'; - const typeSel = document.createElement('select'); - typeSel.name = 'type'; - for (const val of ['claude', 'gemini']) { - const opt = document.createElement('option'); - opt.value = val; - opt.textContent = val.charAt(0).toUpperCase() + val.slice(1); - if (val === (a.type || 'claude')) opt.selected = true; - typeSel.appendChild(opt); - } - typeLabel.appendChild(typeSel); - form.appendChild(typeLabel); - - form.appendChild(makeField('Model', 'input', { type: 'text', name: 'model', value: a.model || 'sonnet' })); form.appendChild(makeField('Project Directory', 'input', { type: 'text', name: 'project_dir', value: a.project_dir || a.working_dir || '', placeholder: '/path/to/repo' })); form.appendChild(makeField('Max Budget (USD)', 'input', { type: 'number', name: 'max_budget_usd', step: '0.01', value: a.max_budget_usd != null ? String(a.max_budget_usd) : '1.00' })); form.appendChild(makeField('Timeout', 'input', { type: 'text', name: 'timeout', value: formatDurationForInput(task.timeout) || '15m', placeholder: '15m' })); @@ -584,8 +569,6 @@ async function handleEditSave(taskId, form, saveBtn) { name: get('name'), description: get('description'), agent: { - type: get('type'), - model: get('model'), instructions: get('instructions'), project_dir: get('project_dir'), max_budget_usd: parseFloat(get('max_budget_usd')), @@ -1066,14 +1049,12 @@ function buildValidatePayload() { const f = document.getElementById('task-form'); const name = f.querySelector('[name="name"]').value; const instructions = f.querySelector('[name="instructions"]').value; - const project_dir = f.querySelector('[name="project_dir"]').value; - const model = f.querySelector('[name="model"]').value; - const type = f.querySelector('[name="type"]').value; + const project_dir = f.querySelector('#project-select').value; const allowedToolsEl = f.querySelector('[name="allowed_tools"]'); const allowed_tools = allowedToolsEl ? allowedToolsEl.value.split(',').map(s => s.trim()).filter(Boolean) : []; - return { name, agent: { type, instructions, project_dir, model, allowed_tools } }; + return { name, agent: { instructions, project_dir, allowed_tools } }; } function renderValidationResult(result) { @@ -1195,8 +1176,6 @@ async function createTask(formData) { name: formData.get('name'), description: '', agent: { - type: formData.get('type'), - model: formData.get('model'), instructions: formData.get('instructions'), project_dir: workingDir, max_budget_usd: parseFloat(formData.get('max_budget_usd')), @@ -1240,8 +1219,6 @@ async function saveTemplate(formData) { name: formData.get('name'), description: formData.get('description'), agent: { - type: formData.get('type'), - model: formData.get('model'), instructions: formData.get('instructions'), project_dir: formData.get('project_dir'), max_budget_usd: parseFloat(formData.get('max_budget_usd')), @@ -2106,10 +2083,6 @@ if (typeof document !== 'undefined') document.addEventListener('DOMContentLoaded document.getElementById('new-project-input').value = pDir; } } - if (result.agent && result.agent.model) - f.querySelector('[name="model"]').value = result.agent.model; - if (result.agent && result.agent.type) - f.querySelector('[name="type"]').value = result.agent.type; if (result.agent && result.agent.max_budget_usd != null) f.querySelector('[name="max_budget_usd"]').value = result.agent.max_budget_usd; if (result.timeout) -- cgit v1.2.3