Skip to content

Refactor InputMode into a proper state machine enum#76

Open
tcdent wants to merge 1 commit intomainfrom
claude/refactor-inputmode-enum-ZhUPY
Open

Refactor InputMode into a proper state machine enum#76
tcdent wants to merge 1 commit intomainfrom
claude/refactor-inputmode-enum-ZhUPY

Conversation

@tcdent
Copy link
Copy Markdown
Owner

@tcdent tcdent commented Apr 2, 2026

Move key mapping and state transition logic into methods on InputMode,
encapsulating behavior with the state it belongs to. Transition methods
(begin_streaming, finish_streaming, await_tool_approval, resume_streaming,
reset) enforce valid state changes via debug_assert, catching invalid
transitions during development. Semantic helpers (is_idle, is_busy) replace
raw equality checks throughout the codebase.

https://claude.ai/code/session_0131MmNJi1QqvcV9w8A3TAQS

Move key mapping and state transition logic into methods on InputMode,
encapsulating behavior with the state it belongs to. Transition methods
(begin_streaming, finish_streaming, await_tool_approval, resume_streaming,
reset) enforce valid state changes via debug_assert, catching invalid
transitions during development. Semantic helpers (is_idle, is_busy) replace
raw equality checks throughout the codebase.

https://claude.ai/code/session_0131MmNJi1QqvcV9w8A3TAQS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants