hermes-agent/tests/hermes_cli
teknium1 0a628c1aef fix(cli): handle unquoted multi-word session names in -c/--continue and -r/--resume
When a user runs `hermes -w -c Pokemon Agent Dev` without quoting the
session name, argparse would fail with:
  error: argument command: invalid choice: 'Agent'

This is because argparse parses `-c Pokemon` (consuming one token via
nargs='?'), then sees 'Agent' and tries to match it as a subcommand.

Fix: add _coalesce_session_name_args() that pre-processes sys.argv before
argparse, joining consecutive non-flag, non-subcommand tokens after -c or
-r into a single argument. This makes both quoted and unquoted multi-word
session names work transparently.

Includes 17 tests covering all edge cases: multi-word names, single-word,
bare flags, flag ordering, subcommand boundaries, and passthrough.
2026-03-09 21:36:29 -07:00
..
__init__.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_coalesce_session_args.py fix(cli): handle unquoted multi-word session names in -c/--continue and -r/--resume 2026-03-09 21:36:29 -07:00
test_commands.py feat: session naming with unique titles, auto-lineage, rich listing, resume by name 2026-03-08 15:20:29 -07:00
test_config.py test: reorganize test structure and add missing unit tests 2026-02-26 03:20:08 +03:00
test_doctor.py fix(doctor): recognize OPENAI_API_KEY custom endpoint config 2026-03-06 19:47:09 -08:00
test_model_validation.py feat: /provider command + fix gateway bugs + harden parse_model_input 2026-03-08 06:09:36 -07:00
test_models.py test: enhance session source tests and add validation for chat types 2026-02-26 00:53:57 -08:00
test_session_browse.py feat: interactive session browser with search filtering (#718) 2026-03-08 17:42:50 -07:00
test_set_config_value.py chore: remove all NOUS_API_KEY references 2026-03-08 17:45:38 -07:00
test_skills_hub.py fix: Initialize Skills Hub on list 2026-03-09 01:43:59 +08:00
test_tools_config.py Fix empty tool selection persistence 2026-03-08 06:11:18 -07:00