Skip to content

ITerminalInfo

Exposes terminal capabilities for custom IReplInteractionHandler implementations. Register or resolve via DI to adapt prompts to the current terminal environment.

public interface ITerminalInfo

Gets a value indicating whether the process can read individual key presses (i.e. stdin is not redirected and no hosted session is active).

bool CanReadKeys { get; }

bool

Gets a value indicating whether the terminal supports ANSI escape sequences.

bool IsAnsiSupported { get; }

bool

Gets the active ANSI color palette, or null when ANSI is disabled.

AnsiPalette? Palette { get; }

AnsiPalette

Gets the current terminal window size, or null when unavailable.

(int Width, int Height)? WindowSize { get; }

(int Width, int Height)?