Improve async handling in Ask.razor and update markdown URL

- Added `await Task.Yield();` to enhance responsiveness in `Ask.razor`.
- Updated the markdown content source from README to `docs.md` in `Home.razor` for more relevant information.
This commit is contained in:
Marco Minerva
2025-02-19 17:37:47 +01:00
parent 5382795529
commit fd025ce45e
2 changed files with 3 additions and 2 deletions
@@ -127,7 +127,7 @@
messages.Add(assistantMessage);
question = null;
StateHasChanged();
await Task.Yield();
await using var scope = ServiceProvider.CreateAsyncScope();
var vectorSearchService = scope.ServiceProvider.GetRequiredService<VectorSearchService>();
@@ -144,6 +144,7 @@
assistantMessage.IsCompleted = true;
}
await Task.Yield();
StateHasChanged();
}
}
@@ -31,7 +31,7 @@ else
return;
}
markdown = await HttpClientFactory.CreateClient().GetStringAsync("https://raw.githubusercontent.com/marcominerva/SqlDatabaseVectorSearch/refs/heads/master/README.md");
markdown = await HttpClientFactory.CreateClient().GetStringAsync("https://raw.githubusercontent.com/marcominerva/SqlDatabaseVectorSearch/refs/heads/master/docs.md");
StateHasChanged();
}