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:
@@ -181,7 +181,7 @@ export const AgentsSidebar: React.FC<AgentsSidebarProps> = ({ onItemSelect }) =>
|
||||
}
|
||||
|
||||
setIsConfirmActionPending(true);
|
||||
const success = await deleteAgent(confirmActionAgent.name);
|
||||
const success = await deleteAgent(confirmActionAgent.name, (confirmActionAgent as Agent & { scope?: AgentScope }).scope);
|
||||
|
||||
if (success) {
|
||||
if (confirmActionType === 'delete') {
|
||||
@@ -276,7 +276,7 @@ export const AgentsSidebar: React.FC<AgentsSidebarProps> = ({ onItemSelect }) =>
|
||||
|
||||
if (success) {
|
||||
// Delete old agent
|
||||
const deleteSuccess = await deleteAgent(renameDialogAgent.name);
|
||||
const deleteSuccess = await deleteAgent(renameDialogAgent.name, renameExt.scope);
|
||||
if (deleteSuccess) {
|
||||
toast.success(`Agent renamed to "${sanitizedName}"`);
|
||||
setSelectedAgent(sanitizedName);
|
||||
|
||||
Reference in New Issue
Block a user