1
0

feat: Implement new commands for recording control, configuration management, latency testing, and status display, updating program entry and project references.

This commit is contained in:
2026-02-27 01:12:23 +01:00
parent d910fe1441
commit 482fe84eb1
8 changed files with 494 additions and 368 deletions

View File

@@ -0,0 +1,35 @@
using System.IO;
using System.Threading.Tasks;
using Spectre.Console;
using Toak.Audio;
using Toak.Core;
using Toak.IO;
namespace Toak.Commands;
public static class DiscardCommand
{
public static async Task ExecuteAsync(bool pipeToStdout, bool verbose)
{
Logger.Verbose = verbose;
if (StateTracker.IsRecording())
{
AudioRecorder.StopRecording();
var wavPath = AudioRecorder.GetWavPath();
if (File.Exists(wavPath)) File.Delete(wavPath);
Notifications.Notify("Toak", "Recording discarded");
if (!pipeToStdout)
{
AnsiConsole.MarkupLine("[yellow]Recording discarded.[/]");
}
}
else
{
if (!pipeToStdout)
{
AnsiConsole.MarkupLine("[grey]No active recording to discard.[/]");
}
}
}
}