From 3baf53c96dbea36d92c0f09c1c02f4507d0c0385 Mon Sep 17 00:00:00 2001 From: Callum Reid Date: Fri, 26 Jun 2026 17:14:02 -0400 Subject: [PATCH 1/3] feat: add personas voices CLI subcommand (API parity) --- src/client/mod.rs | 5 +++++ src/client/models/persona.rs | 27 +++++++++++++++++++++++++++ src/commands/personas.rs | 12 ++++++++++++ 3 files changed, 44 insertions(+) diff --git a/src/client/mod.rs b/src/client/mod.rs index 898b9fc..36c7ec1 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -583,6 +583,11 @@ impl PersonasClient<'_> { let resp: models::UpdateBackgroundSoundResponse = self.0.patch(url, &req).await?; Ok(resp.background_sound) } + + pub async fn list_voices(&self) -> Result { + let url = self.0.url("/v1/personas/voices"); + self.0.get(url).await + } } impl MetricsClient<'_> { diff --git a/src/client/models/persona.rs b/src/client/models/persona.rs index 6a07bdc..c6f3e2b 100644 --- a/src/client/models/persona.rs +++ b/src/client/models/persona.rs @@ -253,3 +253,30 @@ pub struct UpdateBackgroundSoundRequest { pub struct UpdateBackgroundSoundResponse { pub background_sound: BackgroundSoundResource, } + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Voice { + pub voice_name: String, + #[serde(default)] + pub supported_languages: Vec, + #[serde(flatten)] + pub extra: serde_json::Map, +} + +impl Tabular for Voice { + fn headers() -> Vec<&'static str> { + vec!["Voice Name", "Supported Languages"] + } + + fn row(&self) -> Vec { + vec![ + self.voice_name.clone(), + self.supported_languages.join(", "), + ] + } +} + +#[derive(Debug, Deserialize)] +pub struct ListVoicesResponse { + pub voices: Vec, +} diff --git a/src/commands/personas.rs b/src/commands/personas.rs index ed66c3c..3682449 100644 --- a/src/commands/personas.rs +++ b/src/commands/personas.rs @@ -33,6 +33,7 @@ pub enum PersonaCommands { }, #[command(name = "phone-numbers")] PhoneNumbers, + Voices, } impl PersonaCommands { @@ -46,6 +47,7 @@ impl PersonaCommands { Self::Delete(_) => "delete", Self::BackgroundSounds { command } => command.operation(), Self::PhoneNumbers => "phone-numbers", + Self::Voices => "voices", } } } @@ -279,6 +281,16 @@ pub async fn execute( vec![next_actions::context("personas")], ); } + PersonaCommands::Voices => { + let response = client.personas().list_voices().await?; + emit_list_with_actions( + ctx, + "personas", + operation, + &response.voices, + vec![next_actions::context("personas")], + ); + } } Ok(()) } From 45a17a0730de35cd9a208d7fa6f3026e010901b5 Mon Sep 17 00:00:00 2001 From: Callum Reid Date: Fri, 26 Jun 2026 17:24:00 -0400 Subject: [PATCH 2/3] chore: cargo fmt --- .worktrees/cli-parity | 1 + src/client/models/persona.rs | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) create mode 160000 .worktrees/cli-parity diff --git a/.worktrees/cli-parity b/.worktrees/cli-parity new file mode 160000 index 0000000..4510550 --- /dev/null +++ b/.worktrees/cli-parity @@ -0,0 +1 @@ +Subproject commit 451055036de18553cc30742aa94c37a161ecc436 diff --git a/src/client/models/persona.rs b/src/client/models/persona.rs index c6f3e2b..1b9b54b 100644 --- a/src/client/models/persona.rs +++ b/src/client/models/persona.rs @@ -269,10 +269,7 @@ impl Tabular for Voice { } fn row(&self) -> Vec { - vec![ - self.voice_name.clone(), - self.supported_languages.join(", "), - ] + vec![self.voice_name.clone(), self.supported_languages.join(", ")] } } From e23c24ea5650599a764ca46acbde04c7efcbf9c1 Mon Sep 17 00:00:00 2001 From: Callum Reid Date: Thu, 2 Jul 2026 10:48:57 -0700 Subject: [PATCH 3/3] fix: address review comments --- .gitignore | 1 + .worktrees/cli-parity | 1 - src/client/models/persona.rs | 5 +++-- 3 files changed, 4 insertions(+), 3 deletions(-) delete mode 160000 .worktrees/cli-parity diff --git a/.gitignore b/.gitignore index 1803c29..13ac30d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .DS_Store *.log .claude/ +.worktrees/ diff --git a/.worktrees/cli-parity b/.worktrees/cli-parity deleted file mode 160000 index 4510550..0000000 --- a/.worktrees/cli-parity +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 451055036de18553cc30742aa94c37a161ecc436 diff --git a/src/client/models/persona.rs b/src/client/models/persona.rs index 1b9b54b..5d77b61 100644 --- a/src/client/models/persona.rs +++ b/src/client/models/persona.rs @@ -265,11 +265,12 @@ pub struct Voice { impl Tabular for Voice { fn headers() -> Vec<&'static str> { - vec!["Voice Name", "Supported Languages"] + vec!["VOICE NAME", "SUPPORTED LANGUAGES"] } fn row(&self) -> Vec { - vec![self.voice_name.clone(), self.supported_languages.join(", ")] + let languages = self.supported_languages.join(", "); + vec![self.voice_name.clone(), truncate(&languages, 60)] } }