Commit graph

1 commit

Author SHA1 Message Date
Chad Metcalf
f1961e7e54
refactor: extract shared flag processing logic to eliminate duplication
Extract common flag processing logic from TUI and headless code paths into
shared flagProcessor module. This eliminates code duplication where both
paths independently converted readonly/auto flags to mode and structured
permission overrides.

Changes:
- Add src/flags/flagProcessor.ts with shared flag processing functions
- Replace duplicated logic in chat.ts (lines 168-173 and 259-264)
- Add comprehensive unit tests for all flag processing scenarios
- Add validation for conflicting --readonly and --auto flags

This is a pure refactor with no behavior changes. All existing functionality
preserved while eliminating 20+ lines of duplicated code.
2025-08-03 15:14:54 -07:00