diff --git a/services/actions/search.go b/services/actions/search.go index ed09ac1..ed5c4dc 100644 --- a/services/actions/search.go +++ b/services/actions/search.go @@ -100,7 +100,7 @@ func SearchConfigMeta() []config.Field { Type: config.FieldTypeNumber, DefaultValue: 1, Min: 1, - Max: 10, + Max: 100, Step: 1, HelpText: "Number of search results to return", }, diff --git a/webui/react-ui/src/components/ActionForm.jsx b/webui/react-ui/src/components/ActionForm.jsx index 1976bb0..bb3b389 100644 --- a/webui/react-ui/src/components/ActionForm.jsx +++ b/webui/react-ui/src/components/ActionForm.jsx @@ -6,12 +6,7 @@ import ConfigForm from './ConfigForm'; * Renders action configuration forms based on field group metadata */ const ActionForm = ({ actions = [], onChange, onRemove, onAdd, fieldGroups = [] }) => { - // Debug logging - console.log('ActionForm:', { actions, fieldGroups }); - - // Handle action change const handleActionChange = (index, updatedAction) => { - console.log('Action change:', { index, updatedAction }); onChange(index, updatedAction); }; diff --git a/webui/react-ui/src/components/AgentForm.jsx b/webui/react-ui/src/components/AgentForm.jsx index 1c601b5..ac9afcf 100644 --- a/webui/react-ui/src/components/AgentForm.jsx +++ b/webui/react-ui/src/components/AgentForm.jsx @@ -1,5 +1,5 @@ import React, { useState } from 'react'; -import { useNavigate, useOutletContext } from 'react-router-dom'; +import { useNavigate } from 'react-router-dom'; // Import form sections import BasicInfoSection from './agent-form-sections/BasicInfoSection'; @@ -10,6 +10,7 @@ import MemorySettingsSection from './agent-form-sections/MemorySettingsSection'; import ModelSettingsSection from './agent-form-sections/ModelSettingsSection'; import PromptsGoalsSection from './agent-form-sections/PromptsGoalsSection'; import AdvancedSettingsSection from './agent-form-sections/AdvancedSettingsSection'; +import ExportSection from './agent-form-sections/ExportSection'; const AgentForm = ({ isEdit = false, @@ -20,10 +21,9 @@ const AgentForm = ({ submitButtonText, isGroupForm = false, noFormWrapper = false, - metadata = null + metadata = null, }) => { const navigate = useNavigate(); - const { showToast } = useOutletContext(); const [activeSection, setActiveSection] = useState(isGroupForm ? 'model-section' : 'basic-section'); // Handle input changes @@ -57,16 +57,27 @@ const AgentForm = ({ // Handle navigation between sections const handleSectionChange = (section) => { + console.log('Changing section to:', section); setActiveSection(section); }; + // Handle connector change (simplified) + const handleConnectorChange = (index, updatedConnector) => { + const updatedConnectors = [...formData.connectors]; + updatedConnectors[index] = updatedConnector; + setFormData({ + ...formData, + connectors: updatedConnectors + }); + }; + // Handle adding a connector const handleAddConnector = () => { setFormData({ ...formData, connectors: [ ...(formData.connectors || []), - { name: '', config: '{}' } + { type: '', config: '{}' } ] }); }; @@ -81,55 +92,6 @@ const AgentForm = ({ }); }; - // Handle connector name change - const handleConnectorNameChange = (index, value) => { - const updatedConnectors = [...formData.connectors]; - updatedConnectors[index] = { - ...updatedConnectors[index], - type: value - }; - setFormData({ - ...formData, - connectors: updatedConnectors - }); - }; - - // Handle connector config change - const handleConnectorConfigChange = (index, key, value) => { - const updatedConnectors = [...formData.connectors]; - const currentConnector = updatedConnectors[index]; - - // Parse the current config if it's a string - let currentConfig = {}; - if (typeof currentConnector.config === 'string') { - try { - currentConfig = JSON.parse(currentConnector.config); - } catch (err) { - console.error('Error parsing config:', err); - currentConfig = {}; - } - } else if (currentConnector.config) { - currentConfig = currentConnector.config; - } - - // Update the config with the new key-value pair - currentConfig = { - ...currentConfig, - [key]: value - }; - - // Update the connector with the stringified config - updatedConnectors[index] = { - ...currentConnector, - config: JSON.stringify(currentConfig) - }; - - setFormData({ - ...formData, - connectors: updatedConnectors - }); - }; - // Handle adding an MCP server const handleAddMCPServer = () => { setFormData({ @@ -231,6 +193,17 @@ const AgentForm = ({ Advanced Settings + {isEdit && ( + <> +