Commit Graph

8 Commits

Author SHA1 Message Date
Fahad
b6f8c43b81 refactor: remove emojis and apply code formatting
- Remove all emoji characters from output strings for better compatibility
- Update all tests to match non-emoji output
- Apply black formatting to all Python files
- Ensure all tests pass and linting succeeds
- Remove htmlcov directory (already in .gitignore)

This change improves cross-platform compatibility and ensures
consistent code formatting across the project.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 21:32:38 +04:00
Fahad
873354864a chore: remove unnecessary comment 2025-06-08 21:07:58 +04:00
Fahad
9a3c476056 feat: add version checking capability to MCP server
- Add version metadata (__version__, __updated__, __author__)
- Create get_version tool that returns server information
- Include Python version, start time, and configuration details
- Add comprehensive tests for version functionality
- Update existing tests to handle new tool count

Now you can check the server version from Claude by asking:
"Can you get the version of the Gemini MCP server?"

Version: 2.2.0
Updated: 2025-06-08
Author: Fahad Gilani

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 21:07:41 +04:00
Fahad
341022a35b feat: optimize analyze_code for Claude Code with improved formatting
BREAKING CHANGES:
- Remove verbose_output from tool schema (Claude Code can't accidentally use it)
- Always show minimal terminal output with file previews
- Improved file content formatting for Gemini with clear delimiters

Key improvements:
- Files formatted as "--- BEGIN FILE: path --- content --- END FILE: path ---"
- Direct code formatted as "--- BEGIN DIRECT CODE --- code --- END DIRECT CODE ---"
- Terminal shows file paths, sizes, and small previews (not full content)
- Clear prompt structure for Gemini: USER REQUEST | CODE TO ANALYZE sections
- Prevents terminal hangs/glitches with large files in Claude Code
- All tests updated and passing

This ensures Claude Code stays responsive while Gemini gets properly formatted content.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 20:59:35 +04:00
Fahad
22d387a858 feat: improve analyze_code terminal output with non-verbose mode
- Add verbose_output parameter (default: False) to CodeAnalysisRequest
- Modify prepare_code_context to return both full context and summary
- Show only file paths and sizes in terminal by default, not full content
- Full file content is still sent to Gemini for analysis
- Add comprehensive tests for verbose output functionality

This prevents terminal hangs when analyzing large files while still providing
Gemini with complete file contents for analysis.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 20:49:01 +04:00
Fahad
1d217ca397 fix: resolve cross-platform test failures on Windows and Ubuntu
- Add proper cross-platform path handling with Path.resolve()
- Fix file encoding issues by explicitly using UTF-8
- Correct mock paths to use google.generativeai instead of gemini_server.genai
- Create setup.py for proper package installation in CI
- Add conftest.py with Windows asyncio compatibility
- Update CI workflow to install package with pip install -e .
- Add import tests to verify package installation
- Set PYTHONPATH in test environment
- Simplify import mechanism in tests

These changes ensure tests pass consistently across Windows, Ubuntu, and macOS platforms.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 20:42:59 +04:00
Fahad
970b73c175 docs: Improve Quick Start instructions for better clarity
- Add explicit step to clone the repository first
- Include instructions for accessing config via Claude Desktop UI
- Clarify that users must replace placeholder paths with actual paths
- Add note to remember the cloned directory path

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 20:39:27 +04:00
Fahad
07fa02e46a test: Add comprehensive test suite with GitHub Actions CI
Added professional testing infrastructure:

Unit Tests:
- Comprehensive test suite covering all major functionality
- Tests for models, file operations, tool handlers, and error cases
- Async test support for MCP handlers
- Mocking for external API calls
- 84% code coverage achieved

CI/CD Pipeline:
- GitHub Actions workflow for automated testing
- Matrix testing across Python 3.8-3.12
- Cross-platform testing (Ubuntu, macOS, Windows)
- Automated linting with flake8, black, isort, and mypy
- Code coverage reporting with 80% minimum threshold

Configuration:
- pytest.ini with proper test discovery and coverage settings
- .coveragerc for coverage configuration
- Updated .gitignore for test artifacts
- Development dependencies in requirements.txt

Documentation:
- Added testing section to README
- Instructions for running tests locally
- Contributing guidelines with test requirements

This ensures code quality and reliability for all contributions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-08 20:26:04 +04:00