Major improvements to file handling capabilities: - Add directory traversal support to all file-processing tools - Tools now accept both individual files and entire directories - Automatically expand directories and discover code files recursively - Smart filtering: skip hidden files, __pycache__, and non-code files - Progressive token loading: read as many files as possible within limits - Clear file separation markers with full paths for Gemini Key changes: - Rewrite file_utils.py with expand_paths() and improved read_files() - Update all tool descriptions to indicate directory support - Add comprehensive tests for directory handling and token limits - Document tool parameters and examples in README - Bump version to 2.4.2 All tools (analyze, review_code, debug_issue, think_deeper) now support: - Single files: "analyze main.py" - Directories: "review src/" - Mixed paths: "analyze config.py, src/, tests/" This enables analyzing entire projects or specific subsystems efficiently while respecting token limits and providing clear file boundaries. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
16 lines
343 B
Python
16 lines
343 B
Python
"""
|
|
Utility functions for Gemini MCP Server
|
|
"""
|
|
|
|
from .file_utils import read_file_content, read_files, expand_paths, CODE_EXTENSIONS
|
|
from .token_utils import check_token_limit, estimate_tokens
|
|
|
|
__all__ = [
|
|
"read_files",
|
|
"read_file_content",
|
|
"expand_paths",
|
|
"CODE_EXTENSIONS",
|
|
"estimate_tokens",
|
|
"check_token_limit",
|
|
]
|