fix: prevent agent deletion from disabling built-ins

Stop delete from creating disable overrides
Delete only the selected agent scope
Keep web and VS Code behavior aligned
This commit is contained in:
Bohdan Triapitsyn
2026-06-16 13:38:24 +03:00
parent e402cd75f5
commit e982bd9388
6 changed files with 113 additions and 58 deletions
@@ -159,7 +159,8 @@ export const registerConfigEntityRoutes = (app, dependencies) => {
return res.status(400).json({ error });
}
deleteAgent(agentName, directory);
const scope = req.body?.scope;
deleteAgent(agentName, directory, scope);
await refreshOpenCodeAfterConfigChange('agent deletion');
res.json({