fix(console): restore pump error logging; drop unused Stop; stop invalidating help cache on lookup

- ConsoleInputPump gains an optional ILogger so the reader-fault and
  command-dispatch catch blocks log warnings/errors again, matching the
  behavior the old ConsoleInputHandler had before the pump refactor.
- Remove ConsoleInputPump.Stop() — dead code, nothing calls it; the reader
  thread already terminates on EOF/Core.Closing/finally cleanup.
- GetInputCommand no longer clears the help-description cache on every
  lookup; RegisterCommand/UnregisterInputCommand still invalidate it
  correctly on the paths that actually change the command set.
This commit is contained in:
Kamron Batman 2026-07-15 22:18:15 -07:00
parent 45ea449419
commit 9cced198f9
2 changed files with 8 additions and 11 deletions

View file

@ -69,7 +69,6 @@ public static class ConsoleInputHandler
lock (_inputCommands)
{
var action = _inputCommands.GetValueOrDefault(command)?.Function;
_commandDescriptions = null;
return action;
}
}
@ -88,7 +87,7 @@ public static class ConsoleInputHandler
return;
}
_pump = new ConsoleInputPump(Console.In, GetInputCommand);
_pump = new ConsoleInputPump(Console.In, GetInputCommand, logger);
new Thread(_pump.Run)
{