  In this paper, we investigate Keller's deformed Calabi--Yau completion of the
derived category of coherent sheaves on a smooth variety. In particular, for an
$n$-dimensional smooth variety $Y$, we describe the derived category of the
total space of an $\omega_Y$-torsor as a certain deformed $(n+1)$-Calabi--Yau
completion of the derived category of $Y$.
  As an application, we investigate the geometry of the derived moduli stack of
compactly supported coherent sheaves on a local curve, i.e., a Calabi--Yau
threefold of the form $\mathrm{Tot}_C(N)$, where $C$ is a smooth projective
curve and $N$ is a rank two vector bundle on $C$. We show that the derived
moduli stack is equivalent to the derived critical locus of a function on a
certain smooth moduli space. This result will be used by the first author and
Naoki Koseki in their joint work on Higgs bundles and Gopakumar--Vafa
invariants.
