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 <noreply@anthropic.com>
This commit is contained in:
@@ -650,7 +650,7 @@ public class ChatService : IChatService
|
|||||||
};
|
};
|
||||||
|
|
||||||
return ("category_update", result,
|
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)
|
private async Task<(string, object, string)> ExecuteListCategoriesAsync(Guid userId)
|
||||||
|
|||||||
Reference in New Issue
Block a user