Assuming I know roughly what it will generate, I usually prepend my chats with previsions against this kind of thing
"Add tabs here, assume the rest of the page will work with no futher modification, limit your changes so that any existing code keeps working"
I also do stuff like
"Project is using {X} libraries, keep dependencies minimal
Generate a method takes {Z} parameters, return {Y}, using {A}, {B} and {C} do {thing}"
I'll add stuff like Language version, frameworks or specific requests based on this, but then I just reuse the setup , So I like to keep the first message with as much context as possible, ideally separating project context from specific request
"Add tabs here, assume the rest of the page will work with no futher modification, limit your changes so that any existing code keeps working"
I also do stuff like "Project is using {X} libraries, keep dependencies minimal
Generate a method takes {Z} parameters, return {Y}, using {A}, {B} and {C} do {thing}"
I'll add stuff like Language version, frameworks or specific requests based on this, but then I just reuse the setup , So I like to keep the first message with as much context as possible, ideally separating project context from specific request