Skip to content

Commit c4547ce

Browse files
committed
docs: update architecture
1 parent a5a9222 commit c4547ce

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
.PHONY: dev console lint install start test type-check
1+
.PHONY: agent console dev lint install start test type-check
22

33
install:
44
uv sync && uv run pre-commit install && cp .env.example .env && echo "Please edit the .env file with your API keys."
55

6+
agent:
7+
uv run chat
8+
69
console:
710
uv run textual console -x SYSTEM -x EVENT -x DEBUG -x INFO
811

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ make install
2626
Update the `.env` with your `ANTHROPIC_API_KEY` and then run:
2727

2828
```bash
29-
make start
29+
# Start the agent
30+
make agent
3031

3132
# Alternatively, if in dev (see below)
3233
make dev

docs/architecture.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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
6162
Centralized 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

6668
This 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`)
8488
Manages the Claude Agent SDK client lifecycle:
@@ -108,10 +112,16 @@ Text input with:
108112
**SlashCommandMenu** (`components/slash_command_menu.py`)
109113
Command 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

117127
The UserInput component maintains a bash-like command history:

0 commit comments

Comments
 (0)