Package development with ChatGPT (or other LLMs)

It's possible to ask ChatGPT to write code and it tends to do a decent job. However, it's not so easy for more convoluted queries that require some background knowledge. Are there any plugins or extensions for RStudio (or other IDEs) that can scan the entire package codebase and provide more focused solutions? At least writing documentation or tests should be fairly doable.