Skip to content

Reapply https://github.com/dotnet/extensions/pull/6205#6706

Merged
jozkee merged 1 commit intodotnet:mainfrom
jozkee:reapply_6205
Aug 12, 2025
Merged

Reapply https://github.com/dotnet/extensions/pull/6205#6706
jozkee merged 1 commit intodotnet:mainfrom
jozkee:reapply_6205

Conversation

@jozkee
Copy link
Copy Markdown
Member

@jozkee jozkee commented Aug 11, 2025

It was lost into oblivion because git thought it was renamed to one of the snapshot files.
https://github.com/dotnet/extensions/commit/34cd461d4f4a53341d791dd1105e1eb1ef33ba6c.patch

diff --git a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web-CSharp/Components/Pages/Chat/Chat.razor b/test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Snapshots/aichatweb.BasicAspire--aspire.verified/aichatweb/aichatweb.Web/Components/Pages/Chat/Chat.razor
similarity index 96%
rename from src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web-CSharp/Components/Pages/Chat/Chat.razor
rename to test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Snapshots/aichatweb.BasicAspire--aspire.verified/aichatweb/aichatweb.Web/Components/Pages/Chat/Chat.razor
index 77626e2d565..5e4f8042add 100644
--- a/src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData.Web-CSharp/Components/Pages/Chat/Chat.razor
+++ b/test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Snapshots/aichatweb.BasicAspire--aspire.verified/aichatweb/aichatweb.Web/Components/Pages/Chat/Chat.razor
@@ -103,7 +103,7 @@
     [Description("Searches for information using a phrase or keyword")]
     private async Task<IEnumerable<string>> SearchAsync(
         [Description("The phrase to search for.")] string searchPhrase,
-        [Description("Whenever possible, specify the filename to search that file only. If not provided, the search includes all files.")] string? filenameFilter = null)
+        [Description("If possible, specify the filename to search that file only. If not provided or empty, the search includes all files.")] string? filenameFilter = null)
     {
         await InvokeAsync(StateHasChanged);
         var results = await Search.SearchAsync(searchPhrase, filenameFilter, maxResults: 5);

I've updated the snapshot code to ensure it doesn't get lost again.

Microsoft Reviewers: Open in CodeFlow

@jozkee jozkee requested a review from MackinnonBuck August 11, 2025 20:42
@jozkee jozkee self-assigned this Aug 11, 2025
Copilot AI review requested due to automatic review settings August 11, 2025 20:42
@jozkee jozkee requested a review from a team as a code owner August 11, 2025 20:42
@github-actions github-actions bot added the area-ai-templates Microsoft.Extensions.AI.Templates label Aug 11, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reapplies a previously lost change from PR #6205 that improves text clarity in a function description. The change corrects the wording in a Description attribute for better clarity and user understanding.

  • Updated the Description attribute text for the filenameFilter parameter in the SearchAsync function to be more clear and concise
  • Removed conditional compilation comments that were no longer needed in the template code
  • Applied streaming chat response implementation consistently across template snapshots

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
test/ProjectTemplates/Microsoft.Extensions.AI.Templates.IntegrationTests/Snapshots/aichatweb.Ollama_Qdrant.verified/aichatweb/aichatweb.Web/Components/Pages/Chat/Chat.razor Updated to use streaming chat responses instead of single response calls
src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/ChatWithCustomData/ChatWithCustomData-CSharp.Web/Components/Pages/Chat/Chat.razor Removed conditional compilation comments and cleaned up the streaming implementation

@jozkee jozkee merged commit a691e73 into dotnet:main Aug 12, 2025
7 checks passed
@jozkee jozkee deleted the reapply_6205 branch August 12, 2025 14:08
@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-ai-templates Microsoft.Extensions.AI.Templates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants