The reply lists rendered badly: durations written as [0:00] were parsed as
Markdown link references (brackets stripped), and titles containing Markdown
punctuation broke the surrounding [title](url) link so it showed raw.
Add shared escapeMarkdown()/markdownLink() helpers (Command.hpp) and reformat
search, play, nowplaying and queue replies to:
N. [escaped title](shortUrl) · duration
Titles/nicknames are Markdown-escaped so '[', '*', '_', etc. can't break the
link; the duration follows a middot separator instead of [..]. Also guard a
possible nullopt duration deref in the queue list.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
F1 (reload commands): Core registers itself as Api::ICoreInterface in the
service registry; !reloadconfig and !reload resolve it via ctx.service and
call Core::reloadConfig() (which reloads config.json from disk), replacing
the old placeholder replies.
F2 (SOCKS5 playback): ffmpeg can't use a SOCKS5 proxy, so it connected
directly to the IP-locked googlevideo URL and timed out; the fallback then
buffered the whole (705 MB) body in memory and tripped Void::Net's body
limit. New YouTubeClient::downloadAudioToFile() re-downloads the audio with
yt-dlp (which handles SOCKS5 + writes to disk) by video id and ffmpeg opens
the local file. MusicManager::downloadAudioForPlayback now uses it, and the
play-open path short-circuits straight to the download when the proxy is
SOCKS5 (skipping the doomed ~15 s ffmpeg attempt); HTTP/no-proxy keeps
stream-first-then-download.
F3 (API fallback): YouTubeClient::search() now falls back to yt-dlp when the
Data API path errors (bad/expired key, quota, network), mirroring what
fetchPlaylistItems already did.
Build green; runtime behaviour to be verified on the live bot.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Delete the echoion Logger adapter (Logger.{hpp,cpp}) and the
ILogger/LoggerRegistry indirection. Core::installLogging() builds the
console + split-file Void::Logging::MultiLogger and installs it as the
process-wide Void::Log sink via Void::Log::make_sink (logSink_ owns it for
the process lifetime). The ~450 ECHOION_LOG_* call sites across EchoionCore
are rewritten to Void::Log::<level>("<Subsystem>", "{}", <expr>) with
per-file module tags (warning->warn, critical->fatal); the pre-formatted
message is passed as the single "{}" argument. Build green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The DI registry was write-only — populated in Core::initialize() but never
resolved through. Thread it into command execution so commands resolve
shared services by interface instead of constructing throwaways:
- CommandContext gains a non-owning ServiceRegistry* plus an ergonomic
service<I>() resolver.
- CommandManager carries the registry (Core::setServices(®istry_)) and
stamps it onto every CommandContext it builds (async + sync paths).
- RpcInfoCommand's getPublicIpAddress() now reuses the shared, initialized
INetworkClient from the registry, falling back to a throwaway client only
when none is registered.
Core itself (the composition root) keeps direct member wiring and commands
keep explicit MusicManager injection — converting those to a service locator
would only hide dependencies; the registry earns its keep at the genuine
seam where a command needs a service it isn't handed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>