feat(cli): add /reasoning slash command to manage reasoning effort

Cherry-picked from PR #789 by Aum08Desai, rebased onto current main
with conflict resolution and improvements:

- Added /reasoning command: view current level or set to none|low|medium|high|xhigh
- Persists to config via save_config_value, forces agent re-init
- Resolved conflict with COMMANDS_BY_CATEGORY refactor (added to Configuration category)
- Restricted valid levels to none, low, medium, high, xhigh (removed 'minimal')
- Updated _parse_reasoning_config in cli.py and _load_reasoning_config in gateway/run.py
- Improved display messages (show all valid options, clearer defaults/disabled state)
- Added EXPECTED_COMMANDS entry for regression guard
- Expanded test suite: 16 tests covering all levels, rejection, display, case insensitivity,
  config save failure

Co-authored-by: Aum08Desai <145567217+Aum08Desai@users.noreply.github.com>
This commit is contained in:
Aum08Desai 2026-03-11 06:11:53 -07:00 committed by teknium1
parent c837ef949d
commit e6b325cc24
5 changed files with 176 additions and 5 deletions

View file

@ -12,7 +12,7 @@ EXPECTED_COMMANDS = {
"/personality", "/clear", "/history", "/new", "/reset", "/retry",
"/undo", "/save", "/config", "/cron", "/skills", "/platforms",
"/verbose", "/compress", "/title", "/usage", "/insights", "/paste",
"/reload-mcp", "/rollback", "/background", "/skin", "/quit",
"/reload-mcp", "/rollback", "/background", "/skin", "/reasoning", "/quit",
}