feat(chat): prefill the input bar for context-menu and direct-chat tells
This commit is contained in:
@@ -232,9 +232,14 @@ internal sealed unsafe class Chat : IDisposable
|
||||
if (c != '\0' && !char.IsControl(c))
|
||||
input = c.ToString();
|
||||
|
||||
// Chat-window Activated integration is offline until the
|
||||
// new chat layer surfaces an Activated entry point.
|
||||
_ = input;
|
||||
// Seed the just-typed character into our input field and focus it,
|
||||
// the same prefill path the inventory item-link below uses. Prefill-
|
||||
// only — no tab switch (Flo decision 2026-06-15).
|
||||
if (input != null)
|
||||
{
|
||||
Plugin.InputBar.AppendPending(input);
|
||||
Plugin.InputBar.Activate = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -325,13 +330,18 @@ internal sealed unsafe class Chat : IDisposable
|
||||
{
|
||||
if (playerName != null)
|
||||
{
|
||||
// Chat-window Activated integration is offline; tell-target
|
||||
// routing returns when the new chat layer is wired up.
|
||||
_ = playerName;
|
||||
_ = worldId;
|
||||
_ = contentId;
|
||||
_ = reason;
|
||||
_ = setChatType;
|
||||
// Right-click -> Send Tell: prefill our input the same way our own
|
||||
// "Send Tell" payload menu does (PayloadHandler), then focus. Prefill-
|
||||
// only — no tab switch, no ChatActivatedArgs revival (Flo decision
|
||||
// 2026-06-15). The game supplies worldName here, so no sheet lookup.
|
||||
var tellName = playerName->ToString();
|
||||
var tellWorld = worldName != null ? worldName->ToString() : string.Empty;
|
||||
var tellCommand = $"/tell {tellName}";
|
||||
if (!string.IsNullOrEmpty(tellWorld))
|
||||
tellCommand += $"@{tellWorld}";
|
||||
tellCommand += " ";
|
||||
Plugin.InputBar.SetPendingMessage(tellCommand);
|
||||
Plugin.InputBar.Activate = true;
|
||||
}
|
||||
|
||||
return SetChatLogTellTargetHook!.Original(
|
||||
@@ -361,12 +371,17 @@ internal sealed unsafe class Chat : IDisposable
|
||||
|
||||
if (playerName != null)
|
||||
{
|
||||
// Chat-window Activated integration is offline; tell-target
|
||||
// routing returns when the new chat layer is wired up.
|
||||
_ = playerName;
|
||||
_ = worldId;
|
||||
_ = contentId;
|
||||
_ = reason;
|
||||
// In-foray right-click -> Send Tell: same prefill path as the non-foray
|
||||
// tell. The foray-specific TellSpecial channel routing stays deferred
|
||||
// (v1.8.1, SetEurekaTellChannel) — prefill-only here (Flo decision 2026-06-15).
|
||||
var forayName = playerName->ToString();
|
||||
var forayWorld = worldName != null ? worldName->ToString() : string.Empty;
|
||||
var forayCommand = $"/tell {forayName}";
|
||||
if (!string.IsNullOrEmpty(forayWorld))
|
||||
forayCommand += $"@{forayWorld}";
|
||||
forayCommand += " ";
|
||||
Plugin.InputBar.SetPendingMessage(forayCommand);
|
||||
Plugin.InputBar.Activate = true;
|
||||
}
|
||||
|
||||
ContextMenuTellInForayHook!.Original(
|
||||
|
||||
Reference in New Issue
Block a user