From 8b6378805c07a2db0817188e4934663468074e54 Mon Sep 17 00:00:00 2001 From: Catherine Renelle <32781029+catrenelle@users.noreply.github.com> Date: Wed, 11 Feb 2026 19:13:19 -0500 Subject: [PATCH] Include transaction ID in category-update tool summary The LLM summary for update_transaction_category was missing the transaction ID, so when the user asked to undo a change the AI had to guess which record from the page context and often picked the wrong one. Now the summary includes the exact ID and the old category name, giving the AI everything it needs to reverse the change. Co-Authored-By: Claude Opus 4.6 --- src/Purrse.Api/Services/ChatService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Purrse.Api/Services/ChatService.cs b/src/Purrse.Api/Services/ChatService.cs index 154b189..ed58dca 100644 --- a/src/Purrse.Api/Services/ChatService.cs +++ b/src/Purrse.Api/Services/ChatService.cs @@ -650,7 +650,7 @@ public class ChatService : IChatService }; return ("category_update", result, - $"Updated transaction '{updated.PayeeName ?? "Unknown"}' ({updated.Date:yyyy-MM-dd}, {updated.Amount:C}) category from '{existing.CategoryName ?? "Uncategorized"}' to '{category.Name}'."); + $"Updated transaction ID:{updated.Id} '{updated.PayeeName ?? "Unknown"}' ({updated.Date:yyyy-MM-dd}, {updated.Amount:C}) category from '{existing.CategoryName ?? "Uncategorized"}' to '{category.Name}'. To undo, update transaction ID:{updated.Id} back to '{existing.CategoryName ?? "Uncategorized"}'."); } private async Task<(string, object, string)> ExecuteListCategoriesAsync(Guid userId)