Let $\cal K$ be a 2-category, and $A$ an object therein. Is there a way to define the "slice object" $A/a$ in $\cal K$ formally (in such a way that if $K = Cat$ we recover precisely the notion of the slice category $A/a$)?
I suggest that if $\cal K$ has comma objects then $A/a = (1_A\downarrow a)$ where $a\colon 1\to A$ is an "element" of $A$ and $1_A$ is the identity.
Is this construction meaningful? If yes, there is a diagram $a\mapsto A/a$ from ${\cal K}(1,A)$ to $\cal K$. What's its colimit (supposing each hom-category is small and $\cal K$ admits this colimit)?