Copilot not reading context around selected code snippet and cannot read whole script #113547
Replies: 1 comment
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
I wonder if anyone else has had this issue and has a fix or any ideas. I can't find any similar issues posted. My copilot chat is virtually useless because it can't analyse my code in the context of the whole script.
The problem is: it will only answer questions about selected lines of code up to about 80 lines of code. Otherwise, if I select the whole script or don't select anything it says that I haven't provided any lines of code/script. I can't paste the whole script (250 lines) into the chat window because it says '400 error'. The comment it gives on selected subsets of code is usually wrong and breaks the program because it can't see how the rest of the program works. Same issue with using copilot inline. I can't see anything obvious from the logs. I even see it uploading my script in the chat as a reference when I ask a question but then it disappears and copilot says I haven't provided any script.
The fixes I've tried: Assuming it might be some sort of conflict, I've tried deactivating all other plugins, setting up the project in a virtual environment, uninstalling all versions of python (I had anaconda and a Homebrew version and the official from the Python website) except the MacOS one, and following this process to do a clean install/ reinstall [https://gist.github.com/MuhsinFatih/ee0154199803babb449b5bb98d3475f7]. I used Homebrew to install just one homebrew version of Python and set up only one project in a virtual environment. Same issue. I tried using the latest and second latest versions of co-pilot and co-pilot chat. I tried using copilot in both VS Code (my preference) and PyCharm. Same issue. Short of reinstalling my operating system or buying a new computer, what can I do? I really need copilot for a project. I've contacted Copilot support and they have been really nice and are looking into it but are currently scratching their heads so I wonder if anyone else has this issue or a way to reliably start from base to avoid it. Any help appreciated.
My System: Macbook Air, 13 inch 2017, Mac OS Monterey, 12.7.3, VS Code version (l1.87.2 (Universal), also tried latest intel version and latest PyCharm), Github copilot v1.175.0, GitHub Copilot Chat v0.13.1. Other extensions: Microsoft Python
v2024.2.1. I have these and have tried disabling: Microsoft Python Debugger v2024.2.0, Microsoft Pylance v2024.3.1. Python 3.12.2 (in venv). I have tried other Python interpreters.
Seeking: To know if anyone else has experienced this problem or has a suggestion for a fix or reseting and avoiding it somehow. Thanks heaps.
Beta Was this translation helpful? Give feedback.
All reactions