1
0
Files
Toak/Commands/ShowCommand.cs

31 lines
1.1 KiB
C#

using System.Threading.Tasks;
using Spectre.Console;
using Toak.Configuration;
namespace Toak.Commands;
public static class ShowCommand
{
public static async Task ExecuteAsync(bool verbose)
{
Toak.Core.Logger.Verbose = verbose;
var config = new ConfigManager().LoadConfig();
var table = new Table();
table.AddColumn("Setting");
table.AddColumn("Value");
table.AddRow("Groq API Key", string.IsNullOrEmpty(config.GroqApiKey) ? "[red]Not Set[/]" : "[green]Set[/]");
table.AddRow("LLM Model", $"[blue]{config.LlmModel}[/]");
table.AddRow("Whisper Model", $"[blue]{config.WhisperModel}[/]");
table.AddRow("Spoken Language", $"[yellow]{(string.IsNullOrEmpty(config.WhisperLanguage) ? "Auto" : config.WhisperLanguage)}[/]");
table.AddRow("Typing Backend", config.TypingBackend);
table.AddRow("Active Skills", string.Join(", ", config.ActiveSkills));
table.AddRow("Punctuation Module", config.ModulePunctuation.ToString());
table.AddRow("Technical Sanitization", config.ModuleTechnicalSanitization.ToString());
AnsiConsole.Write(table);
}
}