diff --git a/src/Infrastructure/BotSharp.Core/Repository/FileRepository.cs b/src/Infrastructure/BotSharp.Core/Repository/FileRepository.cs index 8b45a8f0..69d369e7 100644 --- a/src/Infrastructure/BotSharp.Core/Repository/FileRepository.cs +++ b/src/Infrastructure/BotSharp.Core/Repository/FileRepository.cs @@ -439,7 +439,17 @@ public class FileRepository : IBotSharpRepository var (agent, agentFile) = GetAgentFromFile(inputAgent.Id); if (agent == null) return; + agent.Name = inputAgent.Name; + agent.Description = inputAgent.Description; + agent.IsPublic = inputAgent.IsPublic; + agent.UpdatedDateTime = DateTime.UtcNow; + var json = JsonSerializer.Serialize(agent, _options); + File.WriteAllText(agentFile, json); + UpdateAgentInstruction(inputAgent.Id, inputAgent.Instruction); + UpdateAgentResponses(inputAgent.Id, inputAgent.Responses); + UpdateAgentTemplates(inputAgent.Id, inputAgent.Templates); + UpdateAgentFunctions(inputAgent.Id, inputAgent.Functions); } #endregion