pub fn current_tty() -> Option<String>Expand description
Detect the current terminal device for session binding.
Returns a unique identifier for the terminal window/tab:
- Unix: TTY device path (e.g. “/dev/pts/1”) via libc::ttyname
- Windows Terminal: WT_SESSION GUID (unique per tab/pane)
- No terminal (CI, cron, etc.): None