From f57e7cb9cd2fe064d468f1b72bc547cf3ff3a0ac Mon Sep 17 00:00:00 2001 From: "Shawn Yuan (from Dev Box)" Date: Wed, 3 Dec 2025 10:39:56 +0800 Subject: [PATCH] update comments Signed-off-by: Shawn Yuan (from Dev Box) --- .../AdvancedPaste/AdvancedPaste/Services/KernelServiceBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/AdvancedPaste/AdvancedPaste/Services/KernelServiceBase.cs b/src/modules/AdvancedPaste/AdvancedPaste/Services/KernelServiceBase.cs index af1c70af2f..0d753d1ec3 100644 --- a/src/modules/AdvancedPaste/AdvancedPaste/Services/KernelServiceBase.cs +++ b/src/modules/AdvancedPaste/AdvancedPaste/Services/KernelServiceBase.cs @@ -75,7 +75,7 @@ public abstract class KernelServiceBase( // If we have an error, but the AI provided a final text response, we can ignore the error (likely a tool failure that the AI handled). // However, if we have usable data (e.g. from a successful tool call before the error?), we might want to keep it? // In the case of ImageToText failure, outputPackage is empty (new DataPackage), hasUsableData is false. - // So we check if we can fallback to chat history. + // So we check if there is a valid response in the chat history. var lastMessage = chatHistory.LastOrDefault(); bool hasAssistantResponse = lastMessage != null && lastMessage.Role == AuthorRole.Assistant && !string.IsNullOrEmpty(lastMessage.Content);