[ZT] refactor: extract logic to generate response content