#3496: fix(tui): handle /model status and /model list subcommands
size: XS
experienced-contributor
Cluster:
UI and Model Management Enhancements
## Summary
Fixes #3469
The TUI's `/model` command was treating `status` and `list` as model names instead of subcommands, resulting in errors like `model not allowed: anthropic/status`.
## Changes
- Added handling for `/model status` - shows current model information
- Added handling for `/model list` - opens the model selector (same as `/models`)
## Test Plan
- [x] `pnpm lint` passes
- [x] `pnpm build` passes
- [x] `pnpm test` passes (793 test files, 4826 tests)
- [ ] Manual test: run `moltbot tui`, type `/model status` - should show current model info
- [ ] Manual test: run `moltbot tui`, type `/model list` - should open model selector
---
🤖 Generated with [Claude Code](https://claude.com/claude-code) (issue-hunter-pro)
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR fixes the TUI `/model` command so that `status` and `list` are treated as subcommands rather than model IDs. `/model status` now prints the current provider/model from `state.sessionInfo`, and `/model list` opens the same model selector UI as `/models`.
It also introduces `normalizeOutboundTextNewlines` and applies it to WhatsApp outbound messages so literal `\\n`/`\\r` escape sequences from LLM output render as actual newlines. Corresponding unit tests were added for the new normalizer, and the changelog was updated to reflect both fixes.
<h3>Confidence Score: 4/5</h3>
- This PR is likely safe to merge; changes are localized and covered by tests, with only minor behavioral/maintainability concerns.
- The `/model` subcommand handling is a small, well-scoped change in the TUI command switch, and the outbound newline normalization is exercised by new unit tests and applied only in the WhatsApp adapter. The main remaining concern is the unconditional decoding of literal `\\n` sequences (which may or may not match intended semantics for inbound text) and the slightly confusing module naming/location for the outbound normalizer.
- src/auto-reply/reply/inbound-text.ts (semantics), src/channels/plugins/outbound/whatsapp.ts (helper placement/naming)
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#8083: fix(tui): update model status immediately after /model command
by rohanjangala · 2026-02-03
80.7%
#21932: fix(tui): eliminate stale model indicator lag in TUI
by graysurf · 2026-02-20
77.6%
#20136: Telegram: fix cross-provider model checkmark in /models keyboard
by powerdot · 2026-02-18
76.0%
#6750: fix(tui): show session model overrides in status bar
by ewijaya · 2026-02-02
75.4%
#16478: fix(gateway): fall back to lookupContextTokens on model switch
by colddonkey · 2026-02-14
74.9%
#18957: fix(tts): replace deprecated ElevenLabs eleven_monolingual_v1 model
by BinHPdev · 2026-02-17
74.7%
#21791: feat(TUI): show main agent model in status footer
by chansuke · 2026-02-20
74.5%
#6059: fix #6044
by vivganes · 2026-02-01
74.2%
#9220: Fix: TUI drops API responses silently when runID already finalized
by vishaltandale00 · 2026-02-05
74.2%
#10196: fix(whatsapp): sanitize raw mention IDs in outbound messages
by koala73 · 2026-02-06
74.1%