1
0

chore: Introduce Qodana static analysis configuration and apply minor code formatting and C# 12 collection expressions.

This commit is contained in:
2026-03-01 20:07:20 +01:00
parent ec575ab5f9
commit 15f9647f8a
24 changed files with 344 additions and 80 deletions

View File

@@ -37,7 +37,7 @@ public static class OnboardCommand
new TextPrompt<string>("Together AI API Key:")
.DefaultValue(string.IsNullOrWhiteSpace(config.TogetherApiKey) ? "" : config.TogetherApiKey)
.AllowEmpty());
config.LlmModel = AnsiConsole.Prompt(
new SelectionPrompt<string>()
.Title("Select [green]LLM Model[/]:")
@@ -50,7 +50,7 @@ public static class OnboardCommand
.Title("Select [green]LLM Model[/]:")
.AddChoices(new[] { "openai/gpt-oss-20b", "llama-3.1-8b-instant", "llama-3.3-70b-versatile" })
.UseConverter(c => c == "openai/gpt-oss-20b" ? "openai/gpt-oss-20b (Fastest)" : c == "llama-3.1-8b-instant" ? "llama-3.1-8b-instant (Cheapest)" : "llama-3.3-70b-versatile (More Accurate)"));
if (config.LlmModel.Contains(" ")) config.LlmModel = config.LlmModel.Split(' ')[0];
}
@@ -70,12 +70,12 @@ public static class OnboardCommand
new TextPrompt<string>("Microphone Spoken Language (e.g. en, es, zh):")
.DefaultValue(string.IsNullOrWhiteSpace(config.WhisperLanguage) ? "en" : config.WhisperLanguage)
.AllowEmpty()
.Validate(lang =>
.Validate(lang =>
{
if (string.IsNullOrWhiteSpace(lang)) return ValidationResult.Success();
if (lang.Contains(",") || lang.Contains(" "))
return ValidationResult.Error("[red]Please provide only one language code (e.g., 'en' not 'en, es')[/]");
return ValidationResult.Success();
}));
@@ -94,7 +94,7 @@ public static class OnboardCommand
.UseConverter(c => c == "pw-record" ? "pw-record (Default PipeWire)" : "ffmpeg (Universal PulseAudio)"));
var availableSkills = SkillRegistry.AllSkills.Select(s => s.Name).ToList();
if (availableSkills.Any())
{
config.ActiveSkills = AnsiConsole.Prompt(
@@ -106,7 +106,7 @@ public static class OnboardCommand
}
configManager.SaveConfig(config);
AnsiConsole.MarkupLine("\n[bold green]Configuration saved successfully![/]");
try