From 9c7eee54a1d970f665d0542a1172575140af8d2a Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Thu, 9 Oct 2025 16:56:47 -0500 Subject: [PATCH] fix typo --- .../Services/Instruct/FileInstructService.SelectFile.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Infrastructure/BotSharp.Core/Files/Services/Instruct/FileInstructService.SelectFile.cs b/src/Infrastructure/BotSharp.Core/Files/Services/Instruct/FileInstructService.SelectFile.cs index 3b0b724a..a08bdca5 100644 --- a/src/Infrastructure/BotSharp.Core/Files/Services/Instruct/FileInstructService.SelectFile.cs +++ b/src/Infrastructure/BotSharp.Core/Files/Services/Instruct/FileInstructService.SelectFile.cs @@ -80,6 +80,10 @@ public partial class FileInstructService { return res; } + else if (files.Count() == 1) + { + return files; + } var agentService = _services.GetRequiredService(); var llmProviderService = _services.GetRequiredService(); @@ -115,7 +119,7 @@ public partial class FileInstructService }).ToList(); var agentId = !string.IsNullOrWhiteSpace(options.AgentId) ? options.AgentId : BuiltInAgentId.FileAssistant; - var template = !string.IsNullOrWhiteSpace(options.Template) ? options.Template : "select_chat_file_instruction"; + var template = !string.IsNullOrWhiteSpace(options.Template) ? options.Template : "select-chat-file_instruction"; var prompt = db.GetAgentTemplate(agentId, template); var data = new Dictionary