Skip to content

refactor(voices): extract shared --list-voices rendering and voice validation#212

Merged
alexkroman merged 1 commit into
mainfrom
claude/code-pattern-extraction-3q0e4k
Jun 17, 2026
Merged

refactor(voices): extract shared --list-voices rendering and voice validation#212
alexkroman merged 1 commit into
mainfrom
claude/code-pattern-extraction-3q0e4k

Conversation

@alexkroman

Copy link
Copy Markdown
Collaborator

The agent and agent-cascade slices independently reimplemented the same
grouped --list-voices rendering loop and the same unknown-voice usage guard.
Both catalogs stay separate (Voice Agent ids vs the TTS catalog); only the
presentation/validation was duplicated.

  • core/choices.py: add render_grouped, the label/indent/blank-line block
    renderer both format_voice_lists now call.
  • app/agent_shared.py: add validate_voice, the unknown---voice UsageError
    guard both run paths now call (joins the existing resolve_system_prompt).

Behavior-preserving; covered by the existing voice/list-voices/error snapshot
tests plus a direct render_grouped test for the empty-group branch.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_015pPWS42r4R3qKmzXzcQYtk

…lidation

The `agent` and `agent-cascade` slices independently reimplemented the same
grouped `--list-voices` rendering loop and the same unknown-voice usage guard.
Both catalogs stay separate (Voice Agent ids vs the TTS catalog); only the
presentation/validation was duplicated.

- core/choices.py: add `render_grouped`, the label/indent/blank-line block
  renderer both `format_voice_list`s now call.
- app/agent_shared.py: add `validate_voice`, the unknown-`--voice` UsageError
  guard both run paths now call (joins the existing `resolve_system_prompt`).

Behavior-preserving; covered by the existing voice/list-voices/error snapshot
tests plus a direct `render_grouped` test for the empty-group branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015pPWS42r4R3qKmzXzcQYtk
@alexkroman alexkroman enabled auto-merge June 17, 2026 03:46
@alexkroman alexkroman added this pull request to the merge queue Jun 17, 2026
Merged via the queue into main with commit 7c13e3d Jun 17, 2026
19 checks passed
@alexkroman alexkroman deleted the claude/code-pattern-extraction-3q0e4k branch June 17, 2026 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants