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

Exclude a single file? #325

Closed
dennysfredericci opened this issue Nov 7, 2024 · 6 comments
Closed

Exclude a single file? #325

dennysfredericci opened this issue Nov 7, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@dennysfredericci
Copy link

Is there a way to exclude a specific file?

I have an Angular project, and I'd like to omit the package-lock.json file from the prompt. It’s unnecessarily large, with 14,627 lines in this relatively small project.

@dennysfredericci
Copy link
Author

Yep, looks like only directories can be excluded or files via .gitignore

@mydeveloperplanet
Copy link
Collaborator

You can also remove the json extension from the to be included file extensions but this is a suboptimal solution. Maybe we should also allow to exclude specific files besides the .gitignore file.
The package.json needs to be committed, but we do not want it to send to an LLM.
In my current project:

  • including json extension: 1M tokens
  • excluding json extension: 217K tokens

@stephanj
Copy link
Contributor

stephanj commented Nov 8, 2024

Agreed, excluding specific files is a must-have. Will add it to my to-do list for this month :)

@stephanj stephanj added the enhancement New feature or request label Nov 8, 2024
@stephanj stephanj self-assigned this Nov 8, 2024
stephanj added a commit that referenced this issue Nov 8, 2024
Feature #325: Exclude specific files by name
@stephanj
Copy link
Contributor

stephanj commented Nov 8, 2024

Couldn't resist and used DevoxxGenie and Claude Sonnet 3.5 (new) to suggest how to implement the feature. The suggested code look great and just worked. #MetaProgramming

image

Details @ #326

@stephanj stephanj closed this as completed Nov 8, 2024
@dennysfredericci
Copy link
Author

Hey! Now I have way fewer tokens since package-lock.json is excluded. Thanks, @stephanj! 🚀

Also, I updated IntelliJ to version 2023.2.2 and changed sinceBuild to 232 to install the plugin on slightly older IntelliJ versions. I am testing it now. If everything works, can I open a PR?

@stephanj
Copy link
Contributor

stephanj commented Nov 8, 2024

If everything still works, then a PR is very welcome. Thanks!

stephanj added a commit that referenced this issue Dec 9, 2024
Feature #325: Exclude specific files by name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants