The notion of compact object in an ordinary category is motivated by the example of Top. But as is an -category, it should also make sense in that context.
The general definition has a bit of cumbersome fine print, see definition 5.3.4.5 in
It becomes simpler in stable (infinity,1)-categoris:
An object in a stable (infinity,1)-category is compact if the -functor
commutes with all colimits.