code: func (ns *NodeSession) isTerminalAttached() bool {
  	return ns.stdin == os.Stdin && term.IsTerminal(os.Stdin.Fd())
  }
docs: // isTerminalAttached returns true when this session is be controlled by
  // a real terminal.
  // It will return False for sessions initiated by the Web client or
  // for non-interactive sessions (commands)