diff --git a/webui/react-ui/src/components/AgentForm.jsx b/webui/react-ui/src/components/AgentForm.jsx
index ddc224f..5f79334 100644
--- a/webui/react-ui/src/components/AgentForm.jsx
+++ b/webui/react-ui/src/components/AgentForm.jsx
@@ -94,9 +94,10 @@ const AgentForm = ({
};
const handleAddDynamicPrompt = () => {
+ console.log('Adding dynamic prompt');
setFormData({
...formData,
- connectors: [
+ dynamicPrompts: [
...(formData.dynamicPrompts || []),
{ type: '', config: '{}' }
]
@@ -108,7 +109,7 @@ const AgentForm = ({
updatedDynamicPrompts.splice(index, 1);
setFormData({
...formData,
- DynamicPrompts: updatedDynamicPrompts,
+ dynamicPrompts: updatedDynamicPrompts,
});
};
@@ -266,7 +267,15 @@ const AgentForm = ({
@@ -309,7 +318,15 @@ const AgentForm = ({
diff --git a/webui/react-ui/src/components/agent-form-sections/PromptsGoalsSection.jsx b/webui/react-ui/src/components/agent-form-sections/PromptsGoalsSection.jsx
index 0ef6d8e..d10ea23 100644
--- a/webui/react-ui/src/components/agent-form-sections/PromptsGoalsSection.jsx
+++ b/webui/react-ui/src/components/agent-form-sections/PromptsGoalsSection.jsx
@@ -1,6 +1,7 @@
import React from 'react';
import FormFieldDefinition from '../common/FormFieldDefinition';
import DynamicPromptForm from '../DynamicPromptForm';
+import DynamicPromptForm from '../DynamicPromptForm';
/**
* Prompts & Goals section of the agent form
@@ -17,7 +18,8 @@ const PromptsGoalsSection = ({
isGroupForm,
metadata,
onAddPrompt,
- onRemovePrompt
+ onRemovePrompt,
+ handleDynamicPromptChange
}) => {
// Get fields based on metadata and form context
const getFields = () => {
@@ -66,10 +68,10 @@ const PromptsGoalsSection = ({
/>