From 0219e0bdd1db80557780280d397dca5860b15071 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 16:09:00 +0000 Subject: [PATCH 1/2] Initial plan From 7958d73383412da8421dced24fda35c85aacff90 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 16:12:01 +0000 Subject: [PATCH 2/2] Add cts disposal to CleanUp method for proper resource cleanup Co-authored-by: weiyuanyue <176483933+weiyuanyue@users.noreply.github.com> --- AIDevGallery/Samples/WCRAPIs/KnowledgeRetrieval.xaml.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AIDevGallery/Samples/WCRAPIs/KnowledgeRetrieval.xaml.cs b/AIDevGallery/Samples/WCRAPIs/KnowledgeRetrieval.xaml.cs index 5d9bf3f3..79928dbb 100644 --- a/AIDevGallery/Samples/WCRAPIs/KnowledgeRetrieval.xaml.cs +++ b/AIDevGallery/Samples/WCRAPIs/KnowledgeRetrieval.xaml.cs @@ -152,6 +152,8 @@ private void CleanUp() _indexer?.RemoveAll(); _indexer?.Dispose(); _indexer = null; + cts?.Dispose(); + cts = null; } public void Dispose()