  Three-nucleon force and continuum play important roles in reproducing the
properties of atomic nuclei around driplines. Therefore it is valuable to build
up a theoretical framework where both effects can be taken into account to
solve the nuclear Schr\"odinger equation. To this end, in this letter, we have
expressed the chiral three-nucleon force within the continuum Berggren
representation, so that bound, resonant and continuum states can be treated on
an equal footing in the complex-momentum space. To reduce the model dimension
and computational cost, the three-nucleon force is truncated at the
normal-ordered two-body level and limited in the $sd$-shell model space, with
the residual three-body term being neglected. We choose neutron-rich oxygen
isotopes as the test ground because they have been well studied experimentally,
with the neutron dripline determined. The calculations have been carried out
within the Gamow shell model. The quality of our results in reproducing the
properties of oxygen isotopes around the neutron dripline shows the relevance
of the interplay between three-nucleon force and the coupling to continuum
states. We also analyze the role played by the chiral three-nucleon force, by
dissecting the contributions of the $2\pi$ exchange, $1\pi$ exchange and
contact terms.
