+ Request ID: @RequestId
+
+ Swapping to Development environment will display more detailed information about the error that occurred. +
++ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +
+ +@code{ + [CascadingParameter] + private HttpContext? HttpContext { get; set; } + + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + protected override void OnInitialized() => + RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier; +} diff --git a/playground/GitHubModelsEndToEnd/GitHubModelsEndToEnd.WebStory/Components/Pages/Home.razor b/playground/GitHubModelsEndToEnd/GitHubModelsEndToEnd.WebStory/Components/Pages/Home.razor new file mode 100644 index 00000000000..4c34f5d4d2b --- /dev/null +++ b/playground/GitHubModelsEndToEnd/GitHubModelsEndToEnd.WebStory/Components/Pages/Home.razor @@ -0,0 +1,40 @@ +@page "/" +@using Microsoft.Extensions.AI +@inject IChatClient chatClient +@inject ILogger@message.Text
+ } + + + ++ Powered by GitHub Models +
+models: read permission if using a fine-grained PAT or GitHub App minted token.
+ ///