I've been using Cody from Sourcegraph, and it'll write some really great code; business logic, not just tests/simple UI. It does a great job using patterns/models from elsewhere in your codebase.
Part of how it does that is through ingesting your codebase into its context window, and so I imagine that bigger/better context will only improve it. That's a bit of an assumption though.
I've found that I get better results if I cherry pick code to feed to Claude 3.5, instead of pasting whole files.
I'm kind of isolated, though, so maybe I just don't know the trick.