Add comprehensive token usage tracking and beautiful ASCII art interface
to enhance user experience and provide cost transparency.
- Add TokenTracker class for real-time token usage monitoring
- Implement ASCII art banner with pyfiglet integration
- Add cost estimation based on OpenAI pricing models
- Display real-time token usage after each AI operation
- Add 'tokens' command in interactive mode for usage statistics
- Show session summary with detailed analytics at session end
- Integrate token tracking into OpenAIProvider with optional TokenTracker
- Add pyfiglet and tiktoken dependencies to pyproject.toml
- Create ascii_art.py module for banner display functionality
- Update main.py to initialize and manage token tracking sessions
- Add session management with unique session IDs
- Implement detailed usage tables with rich formatting
- Update README.md with token tracking features and examples
- Add ASCII art banner to welcome screen documentation
- Include cost transparency and usage analytics sections
- Update version to 0.2.5 in README examples
- Remove Windows from supported OS list in bug report template
- Add comprehensive unit tests for TokenTracker functionality
- Add unit tests for ASCII art display features
- Ensure proper error handling and edge cases covered
- Real-time cost estimates displayed after each operation
- Beautiful ASCII art welcome banner that adapts to terminal width
- Session-based token tracking with detailed summaries
- Interactive 'tokens' command for on-demand usage statistics
- Rich formatted tables for better readability
Breaking Changes: None
Dependencies Added: pyfiglet>=1.0.0, tiktoken>=0.5.0
- Add psutil>=5.0.0 to test and all optional dependencies
- Fix ModuleNotFoundError in performance tests that use psutil for memory monitoring
- Ensure all performance tests can run without import errors
- Performance tests now pass successfully (5/5 tests passing)
The psutil library is required for memory leak detection and performance monitoring
in the test suite, particularly for monitoring process memory usage during
stress testing scenarios.
- Fix B110 bandit security issue in main.py by replacing broad exception handling
with specific exception types and proper logging
- Add logger initialization to main module for better error tracking
- Fix linting issues: remove unused variable in run_tests.py
- Improve test code style by combining nested with statements
- All code quality checks now pass: format, lint, and mypy
The main security fix addresses the "try, except, pass" pattern that could
hide important errors by implementing proper exception handling with logging
for both expected file system errors and unexpected errors.
- Reorganize core modules with improved separation of concerns
- Split context scanning into basic and extended implementations
- Consolidate security modules into dedicated credential and path security
- Replace monolithic intent schema with modular intent models
- Add comprehensive logging configuration system
- Implement new file operations and prompt enhancement modules
- Create structured test organization with unit, integration, security, and performance tests
- Remove deprecated modules and consolidate functionality
- Update CI/CD pipeline and project configuration
- Enhance documentation and contributing guidelines
This refactoring improves maintainability, testability, and modularity while preserving core functionality.