File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/Infrastructure/BotSharp.Core/Repository Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -439,7 +439,17 @@ private void UpdateAgentAllFields(Agent inputAgent)
439439 var ( agent , agentFile ) = GetAgentFromFile ( inputAgent . Id ) ;
440440 if ( agent == null ) return ;
441441
442+ agent . Name = inputAgent . Name ;
443+ agent . Description = inputAgent . Description ;
444+ agent . IsPublic = inputAgent . IsPublic ;
445+ agent . UpdatedDateTime = DateTime . UtcNow ;
446+ var json = JsonSerializer . Serialize ( agent , _options ) ;
447+ File . WriteAllText ( agentFile , json ) ;
442448
449+ UpdateAgentInstruction ( inputAgent . Id , inputAgent . Instruction ) ;
450+ UpdateAgentResponses ( inputAgent . Id , inputAgent . Responses ) ;
451+ UpdateAgentTemplates ( inputAgent . Id , inputAgent . Templates ) ;
452+ UpdateAgentFunctions ( inputAgent . Id , inputAgent . Functions ) ;
443453 }
444454 #endregion
445455
You can’t perform that action at this time.
0 commit comments