From 2545a1ebb59856fa5e975a41f8dd7f93b3e93307 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Fri, 20 Jun 2025 21:30:41 -0300 Subject: [PATCH] Remove all loggers from the default host --- src/Console/Interactive.cs | 5 +++-- src/Console/Program.cs | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Console/Interactive.cs b/src/Console/Interactive.cs index 5d57a92..1c37f84 100644 --- a/src/Console/Interactive.cs +++ b/src/Console/Interactive.cs @@ -187,8 +187,9 @@ async Task RenderAsync(string json) AnsiConsole.Write(new Panel(Markup.FromInterpolated($":robot: {text}")) { Border = BoxBorder.None, - Width = Math.Min(100, AnsiConsole.Profile.Width), - Padding = new(0, 0, 0, 0) + Expand = false, + Padding = new(0, 0, 0, 0), + Width = Math.Min(80, AnsiConsole.Profile.Width), }); if (message is Client.InteractiveMessage interactive && interactive.Interactive.Action is { } node) { diff --git a/src/Console/Program.cs b/src/Console/Program.cs index edc153b..b9f4e1b 100644 --- a/src/Console/Program.cs +++ b/src/Console/Program.cs @@ -4,6 +4,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; // Some users reported not getting emoji on Windows, so we force UTF-8 encoding. // This not great, but I couldn't find a better way to do it. @@ -21,6 +22,7 @@ } var host = Host.CreateApplicationBuilder(args); +host.Logging.ClearProviders(); host.Configuration.AddInMemoryCollection(new Dictionary() {