diff --git a/frontend/src/components/Agent/WorkerIndividualSettings.tsx b/frontend/src/components/Agent/WorkerIndividualSettings.tsx index fce633a..22bc619 100644 --- a/frontend/src/components/Agent/WorkerIndividualSettings.tsx +++ b/frontend/src/components/Agent/WorkerIndividualSettings.tsx @@ -43,14 +43,17 @@ export function WorkerIndividualSettings() { const sysNodesData = sysRes.data.system_nodes || []; const defaultSysNodes = ['supervisory_node', 'consciousness_node', 'control_node']; + const providersList = Object.values(provRes.data.provider_list || {}) as Provider[]; + const defaultProvider = providersList.length > 0 ? providersList[0].provider_title : ''; + const formattedSysNodes = defaultSysNodes.map(nodeName => { const found = sysNodesData.find((n: any) => n.node_name === nodeName); return { agent_id: nodeName, agent_name: nodeName, agent_type: 'System Node', - provider_title: found ? found.provider_title : 'Not Configured', - model_id: found ? found.model_id : 'Not Configured', + provider_title: found && found.provider_title ? found.provider_title : defaultProvider, + model_id: found && found.model_id ? found.model_id : '', is_system: true }; }); @@ -82,7 +85,7 @@ export function WorkerIndividualSettings() { const handleAddNew = () => { setEditData({ agent_name: '', - agent_type: 'OrdinaryIndividual', + agent_type: 'ordinary_individual', description: '', provider_title: providers.length > 0 ? providers[0].provider_title : '', model_id: '', @@ -246,14 +249,14 @@ export function WorkerIndividualSettings() {