diff --git a/ConsoleRenderer.cs b/ConsoleRenderer.cs index 5a46b6a..fcab2ec 100644 --- a/ConsoleRenderer.cs +++ b/ConsoleRenderer.cs @@ -15,9 +15,20 @@ namespace YoutubeSummarizer.Services; /// public static class ConsoleRenderer { + /// + /// Sets the terminal window/tab title. Silently no-ops on terminals that + /// don't support the escape sequence. + /// + public static void SetTitle(string title) + { + try { Console.Title = title; } + catch { /* unsupported terminal — ignore */ } + } + /// Prints the application banner on startup. 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 /// Prompts the user for a URL and reads input. 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)[/]: "); diff --git a/Program.cs b/Program.cs index fe0c7d3..2aa46c0 100644 --- a/Program.cs +++ b/Program.cs @@ -125,6 +125,7 @@ static async Task ProcessVideoAsync( return; } + ConsoleRenderer.SetTitle($"Summarize {metadata.Title}"); AnsiConsole.MarkupLine($" [bold]{Markup.Escape(metadata.Title)}[/]"); // ── Step 2: Transcript ──────────────────────────────────────────── diff --git a/appsettings.json b/appsettings.json index d6b970f..26680fd 100644 --- a/appsettings.json +++ b/appsettings.json @@ -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 } }