chore(plans): add input-history and model-selection plans

plans/input-history.md:
- Implementation plan for shell-style up/down arrow message history
  in SimpleInput, deriving history from session log conversation data
- Covers prop threading, history derivation, navigation state,
  keybinding details, modal parity, and test cases

plans/model-selection.md:
- Three-phase plan for model visibility and control: display current
  model, model picker at spawn, mid-session model switching via Zellij

plans/PLAN-tool-result-display.md:
- Updates to tool result display plan (pre-existing changes)

plans/subagent-visibility.md:
- Updates to subagent visibility plan (pre-existing changes)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
teernisse
2026-03-06 14:51:28 -05:00
parent abbede923d
commit c5b1fb3a80
4 changed files with 765 additions and 89 deletions

51
plans/model-selection.md Normal file
View File

@@ -0,0 +1,51 @@
# Model Selection & Display
## Summary
Add model visibility and control to the AMC dashboard. Users can see which model each agent is running, pick a model when spawning, and switch models mid-session.
## Models
| Label | Value sent to Claude Code |
|-------|--------------------------|
| Opus 4.6 | `opus` |
| Opus 4.5 | `claude-opus-4-5-20251101` |
| Sonnet 4.6 | `sonnet` |
| Haiku | `haiku` |
## Step 1: Display Current Model
Surface `context_usage.model` in `SessionCard.js`.
- Data already extracted by `parsing.py` (line 202) from conversation JSONL
- Already available via `/api/state` in `context_usage.model`
- Add model name formatter: `claude-opus-4-5-20251101` -> `Opus 4.5`
- Show in SessionCard (near agent badge or context usage area)
- Shows `null` until first assistant message
**Files**: `dashboard/components/SessionCard.js`
## Step 2: Model Picker at Spawn
Add model dropdown to `SpawnModal.js`. Pass to spawn API, which appends `--model <value>` to the claude command.
- Extend `/api/spawn` to accept optional `model` param
- Validate against allowed model list
- Prepend `--model {model}` to command in `AGENT_COMMANDS`
- Default: no flag (uses Claude Code's default)
**Files**: `dashboard/components/SpawnModal.js`, `amc_server/mixins/spawn.py`
## Step 3: Mid-Session Model Switch
Dropdown on SessionCard to change model for running sessions via Zellij.
- Send `/model <value>` to the agent's Zellij pane:
```bash
zellij -s {session} action write-chars "/model {value}" --pane-id {pane}
zellij -s {session} action write 10 --pane-id {pane}
```
- New endpoint: `POST /api/session/{id}/model` with `{"model": "opus"}`
- Only works when agent is idle (waiting for input). If mid-turn, command queues and applies after.
**Files**: `dashboard/components/SessionCard.js`, `amc_server/mixins/state.py` (or new mixin)