You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix agent deletion to handle URL parameters and improve logging
- Add defensive programming to extract agent name from URL when passed to confirmDeleteAgent
- Prevent default event behavior during agent deletion confirmation
- Add comprehensive console logging throughout deletion process for debugging
- Fix code formatting issues (concatenated lines properly separated)
- Improve error handling with clearer error messages
- Add explicit checks for URL detection and agent name extraction
// Step 1: Initiate agent deletion and wait for completionconst deletionResult = await configService.default.deleteAgentComplete(selectedAgentForDeletion, true);// Step 2: Wait a moment for infrastructure cleanup to propagateawait new Promise(resolve => setTimeout(resolve, 2000)); // 2 second delay
385
+
console.log('[AgentMapping] Calling deleteAgentComplete API with agent name:',agentNameToDelete);
386
+
// Step 1: Initiate agent deletion and wait for completion
system_prompt: agentData.agent_basic_system_prompt||agentData.system_prompt||`You are ${selectedAgentForConfig}, ${agentData.agent_basic_agent_description||agentData.agent_description||'a helpful AI assistant'}`,
1093
1094
1094
-
// Extract model configuration dynamically from form fields (same as other components)
1095
+
// Initialize ALL required component fields with defaults - CRITICAL FIX for 422 error
1096
+
memory: 'False',
1097
+
memory_provider: 'default',
1098
+
knowledge_base: 'False',
1099
+
knowledge_base_provider: 'default',
1100
+
knowledge_base_provider_type: 'custom',
1101
+
observability: 'False',
1102
+
observability_provider: 'default',
1103
+
guardrail: 'False',
1104
+
guardrail_provider: 'default',
1105
+
1106
+
// Model configuration - extract dynamically from form fields
0 commit comments