rubberduck-vscode
rubberduck-vscode copied to clipboard
"Explain code" should explain the current file when no code is selected
Is this request related to a problem? Please describe.
Currently, whenever you select the option "explain code", not selecting any code in the file gives you the error Variable 'selectedText' is too short
, forcing you to select the entire file before asking for the AI to explain the entire code
Describe the solution you'd like
Whenever no code is selected, the selectedText
variable should be equal to the entirety of the file currently in focus
I agree. The reason selections are required at the moment is that the prompt input size is limited (4096 tokens - tokens reserved for the response), so you'd run into errors with larger files. But that could be solved with a different error message.
https://github.com/rubberduck-ai/rubberduck-vscode/issues/119