-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Priority
P0 - Critical (blocks CLI-31/32)
Effort
S (2-3 hours)
Description
Update the parser system to use the unified SessionState from core instead of its own Context type. This ensures the parser and wizard system share the same state model, which is essential for integration.
Background
The parser currently has its own Context type in ui/parser/types.py. With the wizard system now using a unified SessionState model (from CLI-4/5), we need to migrate the parser to use this same state model to enable proper integration.
Dependencies
- CLI-4 (Complete ✅)
- CLI-5 (Complete ✅)
Tasks
- Update
ui/parser/types.pyto import and useSessionStatefromcli_patterns.core.models - Migrate
Contextfields toSessionStatestructure - Update all parser implementations to use
SessionState - Update parser tests to use
SessionState - Remove old
Contextclass - Ensure MyPy strict mode compliance
- Run all parser tests to verify migration
Acceptance Criteria
- Parser uses
SessionStateinstead of customContext - All parser tests pass with updated state model
- No references to old
Contexttype remain - MyPy strict mode passes
- Parser and wizard systems share unified state model
Technical Notes
- This is primarily a refactoring task - functionality should remain the same
- The unified
SessionStatealready has fields for parser state (parse_mode, command_history) - Estimated ~150-200 lines changed
References
- cli-patterns-docs/future-work/CLI-4-follow-up-issues.md (lines 7-23)
- src/cli_patterns/core/models.py (SessionState definition)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request