using System;using System.Threading;using System.Threading.Tasks;using Agent.Core.Logging;using Agent.Core.Messaging;using Agent.Core.TextToSpeech;namespace LilithConsole;/// <summary>Console transport for <see cref="IncomingOutgoing"/> (local chat loop).</summary>public sealed class Discord : IncomingOutgoing{ private readonly Logger _logger; private readonly KokoroTts? _tts; public Discord(Logger logger, KokoroTts? tts = null) { _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _tts = tts; } protected override Task BeforeReadAsync(CancellationToken cancellationToken) { _logger.Write("Input", "You: ", LogColors.Green); return Task.CompletedTask; } protected override Task<string?> ReadIncomingAsync(CancellationToken cancellationToken) => Task.FromResult(Console.ReadLine()?.Trim()); protected override Task AfterTurnAsync( IncomingOutgoingTurnResult turn, CancellationToken cancellationToken) => ConsoleTts.SpeakReplyAsync(_tts, _logger, turn.AssistantReply);}
Documentation
LilithConsole (Version 3)
Interactive Lilith chat executable (Lilith.exe) for Version 3 with optional Kokoro TTS after each reply.
Entry point: Program/Program.cs — boots Lilith, attaches TTS when Kokoro loads, and runs the input loop.
Build: python ../Build-v3.py or dotnet publish LilithConsole/LilithConsole.csproj.