@@ -20,6 +20,7 @@ src/agent_chat_cli/
2020│ ├── flex.py # Horizontal flex container
2121│ ├── header.py # App header with MCP server status
2222│ ├── messages.py # Message data models and widgets
23+ │ ├── model_selection_menu.py # Model selection menu
2324│ ├── slash_command_menu.py # Slash command menu with filtering
2425│ ├── spacer.py # Empty spacer widget
2526│ ├── thinking_indicator.py # "Agent is thinking" indicator
@@ -61,6 +62,7 @@ The application follows a loosely coupled architecture with four main orchestrat
6162Centralized management of UI state behaviors. Handles:
6263- Thinking indicator visibility and cursor blink state
6364- Tool permission prompt display/hide
65+ - Model selection menu visibility
6466- Interrupt state tracking
6567
6668This class was introduced in PR #9 to consolidate scattered UI state logic from Actions and Renderer into a single cohesive module.
@@ -79,6 +81,8 @@ User-initiated action handlers:
7981- ` interrupt() ` : Cancels current agent operation
8082- ` new() ` : Starts new conversation, clears history
8183- ` respond_to_tool_permission() ` : Handles permission prompt responses
84+ - ` show_model_menu() ` : Displays model selection menu
85+ - ` change_model() ` : Switches active Claude model
8286
8387** AgentLoop** (` core/agent_loop.py ` )
8488Manages the Claude Agent SDK client lifecycle:
@@ -108,10 +112,16 @@ Text input with:
108112** SlashCommandMenu** (` components/slash_command_menu.py ` )
109113Command menu triggered by ` / ` :
110114- Fuzzy filtering as you type (text shows in input)
111- - Commands: ` /new ` , ` /clear ` , ` /save ` , ` /exit `
115+ - Commands: ` /new ` , ` /clear ` , ` /model ` , ` / save` , ` /exit `
112116- Backspace removes filter chars; closes menu when empty
113117- Escape closes and clears
114118
119+ ** ModelSelectionMenu** (` components/model_selection_menu.py ` )
120+ Model selection menu triggered by ` /model ` :
121+ - Choose between Sonnet, Haiku, and Opus models
122+ - Switches the active model for the current conversation
123+ - Enter to select, Escape to cancel
124+
115125### Message History Navigation
116126
117127The UserInput component maintains a bash-like command history:
0 commit comments