I recently noticed that there are *two* senses in which colimits are functorial, and I'm curious about their interplay.

Let $C$ be a cocomplete category. Then, on the one hand, for any diagram category $I$ we have a functor $\mathrm{colim} : \mathrm{Fun}(I,C) \to C$ (left adjoint to the "constant $I$-shaped diagram" functor). But then also, colimits are functorial for maps of categories over $C$: for any pair of composable arrows $$ I \xrightarrow{F} J \xrightarrow{G} C , $$ we obtain an induced map $$\mathrm{colim}_I(GF) \to \mathrm{colim}_J(G)$$ in $C$ (by the universal property of $\mathrm{colim}_I(GF)$).

These two situations can be unified: ignoring set-theoretic issues (and I guess maybe coherence issues too), there is a functor $$ \mathrm{Cat}^{op} \xrightarrow{\mathrm{Fun}(-,C)} \mathrm{Cat} , $$ whose corresponding Grothendieck fibration $$ X_C \to \mathrm{Cat} $$ has as its fiber over $I \in \mathrm{Cat}$ the functor category $\mathrm{Fun}(I,C)$, while its cartesian arrows select pullbacks. Thus, I would expect that "colimit" should assemble to a functor $$ X_C \xrightarrow{\mathrm{colim}} C $$ whose restriction to each fiber is a left adjoint.

Has anyone studied this sort of thing?