Skip to content
This repository was archived by the owner on Aug 24, 2026. It is now read-only.

feat: granular context controls (include, exclude, size limits) - #4

Merged
Tanq16 merged 1 commit into
mainfrom
feature/granular-context-controls-17708558237133574544
May 21, 2026
Merged

feat: granular context controls (include, exclude, size limits)#4
Tanq16 merged 1 commit into
mainfrom
feature/granular-context-controls-17708558237133574544

Conversation

@Tanq16

@Tanq16 Tanq16 commented May 21, 2026

Copy link
Copy Markdown
Owner

This PR introduces granular file filtering mechanisms to the ai-context project, allowing users to better manage their AI token budgets by targeting specific files and omitting irrelevant, bulky artifacts.

Key changes:

  1. Replaced the simple ignoreList flag with an explicit -i (--include), -e (--exclude), and -s (--max-size).
  2. Configured file path matching correctly using filepath.Match via the refactored PathFilter component.
  3. Updated logic in processDirectory and generateDirectoryTree to skip paths via shouldInclude() and size limit assessments.
  4. Expanded README.md to reflect these features with illustrative real-world examples ("Bug Hunt", "Learn & Implement").

PR created automatically by Jules for task 17708558237133574544 started by @Tanq16

- 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>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@Tanq16
Tanq16 merged commit 54bbf64 into main May 21, 2026
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant