From 9c490fa06640b8ae826581420449e6ab1e90d61d Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Sat, 23 May 2026 18:12:18 +0200 Subject: [PATCH] feat(services): add TellRouterService stub MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Skeleton for the upcoming auto-open routing. Subscribes to ChatGui.ChatMessageUnhandled and Dispose unsubscribes — when the routing logic lands, it drops into OnChatMessage without touching the DI graph or Plugin.cs registration. --- HellionChat/PluginHostFactory.cs | 4 +++ HellionChat/Services/TellRouterService.cs | 32 +++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 HellionChat/Services/TellRouterService.cs diff --git a/HellionChat/PluginHostFactory.cs b/HellionChat/PluginHostFactory.cs index fd57739..ebaf6e7 100644 --- a/HellionChat/PluginHostFactory.cs +++ b/HellionChat/PluginHostFactory.cs @@ -112,6 +112,10 @@ internal static class PluginHostFactory sp.GetRequiredService>(), sp.GetRequiredService() )); + services.AddSingleton(sp => new Services.TellRouterService( + sp.GetRequiredService(), + sp.GetRequiredService>() + )); services.AddSingleton(sp => new Integrations.FailedTellNotifier( sp.GetRequiredService>() )); diff --git a/HellionChat/Services/TellRouterService.cs b/HellionChat/Services/TellRouterService.cs new file mode 100644 index 0000000..38d71e0 --- /dev/null +++ b/HellionChat/Services/TellRouterService.cs @@ -0,0 +1,32 @@ +using Dalamud.Game.Chat; +using Dalamud.Plugin.Services; +using Microsoft.Extensions.Logging; + +namespace HellionChat.Services; + +// Skeleton for the upcoming auto-open routing layer. Subscribes to IChatGui +// up front so the DI graph and Plugin.cs registration stay frozen — when +// the routing logic lands, it drops into OnChatMessage without touching +// anything else. +internal sealed class TellRouterService : IDisposable +{ + private readonly IChatGui _chatGui; + private readonly ILogger _logger; + + public TellRouterService(IChatGui chatGui, ILogger logger) + { + _chatGui = chatGui; + _logger = logger; + _chatGui.ChatMessageUnhandled += OnChatMessage; + } + + public void Dispose() + { + _chatGui.ChatMessageUnhandled -= OnChatMessage; + } + + private void OnChatMessage(IChatMessage message) + { + // Intentional no-op until the routing implementation lands. + } +}