Skip to content

Commit 8cca736

Browse files
author
Jicheng Lu
committed
refine agent update functions
1 parent 2e3fbc9 commit 8cca736

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/Infrastructure/BotSharp.Core/Repository/FileRepository.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -372,13 +372,7 @@ private void UpdateAgentFunctions(string agentId, List<FunctionDef> inputFunctio
372372
var functionFile = Path.Combine(_dbSettings.FileRepository, _agentSettings.DataDir,
373373
agentId, "functions.json");
374374

375-
var functions = new List<string>();
376-
foreach (var function in inputFunctions)
377-
{
378-
functions.Add(JsonSerializer.Serialize(function, _options));
379-
}
380-
381-
var functionText = JsonSerializer.Serialize(functions, _options);
375+
var functionText = JsonSerializer.Serialize(inputFunctions, _options);
382376
File.WriteAllText(functionFile, functionText);
383377
}
384378

0 commit comments

Comments
 (0)