-
Notifications
You must be signed in to change notification settings - Fork 4
Big architecture refactor across the project #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Create modular directory structure (config, models, server, tools, ui, utils) - Add skeleton files with docstrings for all modules - Extract constants into utils/constants.py - Extract version checking into utils/version.py - Update REFACTOR.md to mark Task 1 as completed This is the first step in restructuring the codebase for better maintainability.
- Create ConfigManager class in config/manager.py - Move configuration defaults to config/defaults.py - Add configuration validation and schema checking - Update client.py to use the new configuration management system - Add helper functions for configuration path access - Update REFACTOR.md to mark Task 2 as completed
- Creating ServerConnector class in server/connector.py to manage server connections - Implementing server discovery functionality in server/discovery.py - Extracting connection code from MCPClient to improve separation of concerns - Adding proper error handling for connection failures - Fixing issue with duplicate server connections when using auto-discovery This change improves the codebase by: - Better separation of concerns - More testable server connection code - Clearer server discovery process - Preventing duplicate server connections
- Created ModelManager class in models/manager.py to handle all model operations - Implemented model listing, checking, selection and validation in the manager - Updated client.py to use ModelManager instead of direct implementation - Fixed all references to model operations throughout the codebase This refactoring improves code organization by moving model-related functionality to a dedicated class, following the single responsibility principle.
- Created ToolManager class to handle tool selection and management - Moved display_available_tools() and select_tools() from client.py to ToolManager - Updated client.py to use ToolManager for all tool-related operations - Added methods for enabling/disabling tools and filtering tools - Eliminated duplication by making ToolManager the single source of truth for tool states - Removed redundant ServerConnector updates in client code
…config component.
…ger selection. adding ollama local url constant.
- Extract helper methods to reduce code duplication - Split large select_tools method into smaller functions - Centralize server notification logic - Add proper type hints and documentation - Remove unnecessary abstraction layers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
v0.3.0 – Major Refactor Release
🚀 Highlights
• Big architecture refactor across the project
• Code is now more organized and modular
• Version bumped to 0.3.0
🔧 Changes
• Project Restructure: Set up a new folder structure with clear module separation.
• Tool Management: Moved tool logic into a dedicated ToolManager class.
• Model Management: Created ModelManager to handle all model-related tasks.
• Server Connection: Introduced ServerConnector and improved server discovery.
• Configuration: Centralized config logic into ConfigManager and added validation.
• Code Cleanup: Removed unused code, simplified components, and polished the structure.
• Readme & CLI: Updated the main README and improved CLI help messages.