rubberduck-ai / rubberduck-vscode

Use AI-powered code edits, explanations, code generation, error diagnosis, and chat in Visual Studio Code with the official OpenAI API.
https://marketplace.visualstudio.com/items?itemName=Rubberduck.rubberduck-vscode
MIT License
582 stars 70 forks source link

Variable 'selectedText' is undefined #73

Open davidarny opened 1 year ago

davidarny commented 1 year ago

Hi! Thanks for great extension, loving it ❤️

Just want to note that when clicking Edit Code button with nothing selected a VSCode error popup will appear. I think can be solved by adding a check for a selectedText or disabling a button

https://user-images.githubusercontent.com/17799810/225029452-746f186b-4805-40d3-84a3-6a20aa6bfb68.mov

opus-x commented 10 months ago

I have the same issue when invoking Diagnose Errors from the context menu. Seems to only happen when a part of the code is selected and a Python module is imported but not installed.