modify UI

This commit is contained in:
Clinton Billedeaux 2026-09-11 23:18:18 -05:00
parent e5b6ee1d94
commit cc0090eea8
No known key found for this signature in database
3 changed files with 17 additions and 2 deletions

View file

@ -15,9 +15,20 @@ namespace YoutubeSummarizer.Services;
/// </summary>
public static class ConsoleRenderer
{
/// <summary>
/// Sets the terminal window/tab title. Silently no-ops on terminals that
/// don't support the escape sequence.
/// </summary>
public static void SetTitle(string title)
{
try { Console.Title = title; }
catch { /* unsupported terminal — ignore */ }
}
/// <summary>Prints the application banner on startup.</summary>
public static void PrintBanner()
{
SetTitle("Summarize");
AnsiConsole.WriteLine();
AnsiConsole.Write(new FigletText("YT Summary").Centered().Color(Color.Red));
AnsiConsole.Write(
@ -37,6 +48,9 @@ public static class ConsoleRenderer
/// <summary>Prompts the user for a URL and reads input.</summary>
public static string PromptForUrl()
{
// Revert the title while waiting for the next video.
SetTitle("Summarize");
if (!Interactive)
{
AnsiConsole.Markup("[bold]Enter YouTube URL[/] [grey](or 'q' to quit)[/]: ");

View file

@ -125,6 +125,7 @@ static async Task ProcessVideoAsync(
return;
}
ConsoleRenderer.SetTitle($"Summarize {metadata.Title}");
AnsiConsole.MarkupLine($" [bold]{Markup.Escape(metadata.Title)}[/]");
// ── Step 2: Transcript ────────────────────────────────────────────

View file

@ -4,11 +4,11 @@
"BaseUrl": "http://localhost:11434/v1",
"ApiKey": "ollama",
"Model": "qwen3:30b-a3b",
"MaxTokens": 1500,
"MaxTokens": 5000,
"TimeoutSeconds": 600
},
"Summarizer": {
"ChunkWordLimit": 1500,
"ChunkWordLimit": 5000,
"ShowTranscript": false
}
}