I need the actual code changes (diff) to generate an accurate and informative commit message.
This commit is contained in:
10
Program.cs
10
Program.cs
@@ -158,6 +158,16 @@ if (File.Exists(sessionPath))
|
|||||||
{
|
{
|
||||||
await session.LoadAsync(sessionPath, default);
|
await session.LoadAsync(sessionPath, default);
|
||||||
AnsiConsole.MarkupLine($"[dim grey]Auto-loaded previous session.[/]");
|
AnsiConsole.MarkupLine($"[dim grey]Auto-loaded previous session.[/]");
|
||||||
|
|
||||||
|
// Print the last message if there is one
|
||||||
|
if (session.History.Count > 1)
|
||||||
|
{
|
||||||
|
var lastMessage = session.History[^1];
|
||||||
|
var preview = lastMessage.Text.Length > 280
|
||||||
|
? lastMessage.Text[..277] + "..."
|
||||||
|
: lastMessage.Text;
|
||||||
|
AnsiConsole.MarkupLine($"[dim grey] Last message: {Markup.Escape(preview)}[/]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch { /* Ignore load errors on startup */ }
|
catch { /* Ignore load errors on startup */ }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user