v1.7.0 - Internal Refactoring & Code Quality
What's Changed
Internal Refactoring - Code Quality Improvements
This release focuses on internal code quality with no user-facing changes. All features work exactly as before, but the codebase is now significantly cleaner and more maintainable.
Major Refactoring:
-
✅ SessionState Component - Centralized session management
- Replaced 8 scattered instance variables with single cohesive component
- Single source of truth for query count, conversation history, timing, and accumulated usage
- Cleaner delta calculation for AWS Strands cumulative token tracking
-
✅ CommandRouter Component - Type-safe command parsing
- Replaced 330+ lines of manual string parsing with enum-based routing
- All commands now use
CommandTypeenum for type safety - Easier to add new commands and maintain existing ones
- Better separation of command parsing from command handling
Quality Metrics:
- 510 tests passing (100% pass rate)
- 100% mypy type coverage
- Ruff linting compliant
- chat_loop.py reduced from 3,188 to 2,948 lines (-240 lines)
Components Extracted:
- StreamingEventParser - Event parsing logic
- ResponseRenderer - Response formatting and display
- UsageExtractor - Token/metadata extraction
- CommandRouter - Command parsing and routing
- SessionState - Session state management
Full Changelog
See CHANGELOG.md for complete version history.