fix(generate): add callback directly to generate