Commit Graph

14 Commits

Author SHA1 Message Date
Eric Rahm e3262f8766 fix(core): combine .gitignore and .geminiignore logic for correct precedence (#11587)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
2025-11-01 17:06:34 +00:00
Eric Rahm b1059f891f refactor: Switch over to unified shouldIgnoreFile (#11815) 2025-10-25 01:55:12 +00:00
Eric Rahm 047bc44032 refactor(core): Clean up exclude description (#11678)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
2025-10-23 00:08:38 +00:00
Eric Rahm 92d412e542 refactor: simplify FilterReport and remove unused code (#11681)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Jacob Richman <jacob314@gmail.com>
2025-10-23 00:06:31 +00:00
Gaurav db99fc70b6 fix: gitignore handling (#8177) 2025-09-10 19:48:07 +00:00
Tommaso Sciortino 0e3a0d7dc5 Add .geminiignore support to the glob tool. (#8086) 2025-09-10 16:54:50 +00:00
Pascal Birchler 0f031a7f89 Explict imports & exports with type modifier (#3774) 2025-08-25 22:04:53 +00:00
Pascal Birchler ee4feea006 chore: consistently import node modules with prefix (#3013)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-08-25 20:11:27 +00:00
zfflxx 97d9386e3f @file don't respect config respectGitIgnore=false (#3382) (#3387)
Co-authored-by: Ryan Fang <ryan.fang@gllue.com>
2025-07-07 05:48:39 +00:00
Anas H. Sulaiman 4873fce791 centralize file filtering in FileDiscoveryService (#1039) 2025-06-14 14:25:34 +00:00
Tommaso Sciortino 28e656f882 Improve some tools to support abortSignal (#997) 2025-06-12 19:46:00 -07:00
DeWitt Clinton f2ab6d08c4 Improve the performance of filename completion over large repositories. (#938) 2025-06-12 07:09:38 -07:00
N. Taylor Mullen 72fa01f62d feat(git): Refactor gitignore handling to use ignore library instead of minimatch (#864) 2025-06-08 18:32:19 -07:00
Keith Ballinger c313762ba0 Ignore folders files (#651)
# Add .gitignore-Aware File Filtering to gemini-cli

This pull request introduces .gitignore-based file filtering to the gemini-cli, ensuring that git-ignored files are automatically excluded from file-related operations and suggestions throughout the CLI. The update enhances usability, reduces noise from build artifacts and dependencies, and provides new configuration options for fine-tuning file discovery.

Key Improvements
.gitignore File Filtering

All @ (at) commands, file completions, and core discovery tools now honor .gitignore patterns by default.
Git-ignored files (such as node_modules/, dist/, .env, and .git) are excluded from results unless explicitly overridden.
The behavior can be customized via a new fileFiltering section in settings.json, including options for:
Turning .gitignore respect on/off.
Adding custom ignore patterns.
Allowing or excluding build artifacts.
Configuration & Documentation Updates

settings.json schema extended with fileFiltering options.
Documentation updated to explain new filtering controls and usage patterns.
Testing

New and updated integration/unit tests for file filtering logic, configuration merging, and edge cases.
Test coverage ensures .gitignore filtering works as intended across different workflows.
Internal Refactoring

Core file discovery logic refactored for maintainability and extensibility.
Underlying tools (ls, glob, read-many-files) now support git-aware filtering out of the box.


Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-06-04 04:40:46 +00:00