// Copyright (c) Microsoft. All rights reserved. using AgentWebChat.Web; using AgentWebChat.Web.Components; using Microsoft.Extensions.AI.Agents.Runtime; var builder = WebApplication.CreateBuilder(args); // Add service defaults & Aspire client integrations. builder.AddServiceDefaults(); // Add services to the container. builder.Services.AddRazorComponents() .AddInteractiveServerComponents(); builder.Services.AddOutputCache(); builder.Services.AddHttpClient(client => client.BaseAddress = new("https+http://agenthost")); builder.Services.AddHttpClient(client => client.BaseAddress = new("https+http://agenthost")); var app = builder.Build(); if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error", createScopeForErrors: true); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseAntiforgery(); app.UseOutputCache(); app.MapStaticAssets(); app.MapRazorComponents() .AddInteractiveServerRenderMode(); app.MapDefaultEndpoints(); app.Run();