  We consider two different methods of associating vertex algebraic structures
with the level $1$ principal subspaces for $U_q (\widehat{\mathfrak{sl}}_2)$.
In the first approach, we introduce certain commutative operators and study the
corresponding vertex algebra and its module. We find combinatorial bases for
these objects and show that they coincide with the principal subspace bases
found by B. L. Feigin and A. V. Stoyanovsky. In the second approach, we
introduce the, so-called nonlocal $\underline{\mathsf{q}}$-vertex algebras,
investigate their properties and construct the nonlocal
$\underline{\mathsf{q}}$-vertex algebra and its module, generated by
Frenkel-Jing operator and Koyama's operator respectively. By finding the
combinatorial bases of their suitably defined subspaces, we establish a
connection with the sum sides of the Rogers-Ramanujan identities. Finally, we
discuss further applications to quantum quasi-particle relations.
