Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Explain code" should explain the current file when no code is selected #13

Open
AnthonyLenglet opened this issue Feb 7, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@AnthonyLenglet
Copy link

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

@AnthonyLenglet AnthonyLenglet added the enhancement New feature or request label Feb 7, 2023
@lgrammel
Copy link
Contributor

lgrammel commented Feb 7, 2023

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.

@lgrammel lgrammel added the help wanted Extra attention is needed label Mar 17, 2023
@trymeouteh
Copy link

#119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants