I Tried to Make AI Writing Sound Human by Banning AI Words Through logit_bias
I tried to make AI writing sound more human with logit_bias, an API setting that changes how likely a model is to…
As a developer working with Cursor IDE, you've probably run into the line limit issue. Cursor has limitations on how large files can be for effective in-context usage, and when files get too long, you lose some of the IDE's most powerful features.
The solution? Refactor those unwieldy files into more manageable chunks. But first, you need to find them.
Here's a simple bash one-liner that will help you identify all those files in your repo that are exceeding reasonable line counts, while intelligently skipping over dependency directories like node_modules and vendor:
find . -type f -not -path "*/node_modules/*" -not -path "*/vendor/*" -not -path "*/.git/*" -not -path "*/dist/*" -not -path "*/build/*" | xargs wc -l | grep -v "total$" | awk '$1 > 100 {print $1 " lines: " $2}' | sort -nr
Depending on your project and Cursor's specific limits, you might want to adjust the threshold. Here are ready-to-use commands for various line counts:
find . -type f -not -path "*/node_modules/*" -not -path "*/vendor/*" -not -path "*/.git/*" -not -path "*/dist/*" -not -path "*/build/*" | xargs wc -l | grep -v "total$" | awk '$1 > 100 {print $1 " lines: " $2}' | sort -nr
find . -type f -not -path "*/node_modules/*" -not -path "*/vendor/*" -not -path "*/.git/*" -not -path "*/dist/*" -not -path "*/build/*" | xargs wc -l | grep -v "total$" | awk '$1 > 300 {print $1 " lines: " $2}' | sort -nr
find . -type f -not -path "*/node_modules/*" -not -path "*/vendor/*" -not -path "*/.git/*" -not -path "*/dist/*" -not -path "*/build/*" | xargs wc -l | grep -v "total$" | awk '$1 > 500 {print $1 " lines: " $2}' | sort -nr
find . -type f -not -path "*/node_modules/*" -not -path "*/vendor/*" -not -path "*/.git/*" -not -path "*/dist/*" -not -path "*/build/*" | xargs wc -l | grep -v "total$" | awk '$1 > 750 {print $1 " lines: " $2}' | sort -nr
This command does several things:
find to locate all files while excluding common dependency directorieswc -l to count lines in each filegrepawk to filter for files with more than X lines and format the output nicelyOnce you've identified your longest files, you can start breaking them down into more modular components. Your Cursor IDE experience will improve dramatically, as will your code architecture!
Give Vroni a GitHub issue, bug report, spec, or rough idea. It reads the repo, plans the change, writes code, runs checks, and works toward a review-ready pull request.
Take a look at vroni.com