feat: granular context controls (include, exclude, size limits) - #4
Conversation
- Added `-i/--include`, `-e/--exclude`, and `-s/--max-size` flags to `ai-context` CLI. - Updated core processing logic to evaluate globs when walking directory paths. - Added strict evaluation of included extensions vs defaults and ignored items. - Added skipping files exceeding maximum size boundary (defaults to 10MB). - Documented new use case scenarios (Bug Hunt and Learn & Implement) into `README.md`. - Refactored `IgnorePatterns` into an extensible `PathFilter` structure. Co-authored-by: Tanq16 <37408906+Tanq16@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR introduces granular file filtering mechanisms to the
ai-contextproject, allowing users to better manage their AI token budgets by targeting specific files and omitting irrelevant, bulky artifacts.Key changes:
ignoreListflag with an explicit-i(--include),-e(--exclude), and-s(--max-size).filepath.Matchvia the refactoredPathFiltercomponent.processDirectoryandgenerateDirectoryTreeto skip paths viashouldInclude()and size limit assessments.README.mdto reflect these features with illustrative real-world examples ("Bug Hunt", "Learn & Implement").PR created automatically by Jules for task 17708558237133574544 started by @Tanq16