mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: Add missing TTS message types to WebviewMessage and ExtensionMessage interfaces
- Add ttsProvider, ttsGoogleVoice, ttsAzureVoice, ttsAzureRegion message types - Add getTtsVoices, getTtsUsageStats, checkTtsProviderConfigured message types - Add ttsVoices, ttsUsageStats, ttsProviderConfigured response types - Fix type casting for ttsProvider update - Handle Azure region as secret storage
This commit is contained in:
parent
82a3e7b3a7
commit
1e290e3531
3 changed files with 17 additions and 3 deletions
|
|
@ -1318,7 +1318,7 @@ export const webviewMessageHandler = async (
|
|||
case "ttsProvider":
|
||||
// Handle TTS provider selection
|
||||
if (message.text) {
|
||||
await updateGlobalState("ttsProvider", message.text)
|
||||
await updateGlobalState("ttsProvider", message.text as "default" | "google-cloud" | "azure")
|
||||
await provider.postStateToWebview()
|
||||
}
|
||||
break
|
||||
|
|
@ -1337,9 +1337,9 @@ export const webviewMessageHandler = async (
|
|||
}
|
||||
break
|
||||
case "ttsAzureRegion":
|
||||
// Handle Azure region selection
|
||||
// Handle Azure region selection (stored as a secret)
|
||||
if (message.text) {
|
||||
await updateGlobalState("ttsAzureRegion", message.text)
|
||||
await provider.contextProxy.storeSecret("azureTtsRegion", message.text)
|
||||
await provider.postStateToWebview()
|
||||
}
|
||||
break
|
||||
|
|
|
|||
|
|
@ -101,6 +101,9 @@ export interface ExtensionMessage {
|
|||
| "remoteBrowserEnabled"
|
||||
| "ttsStart"
|
||||
| "ttsStop"
|
||||
| "ttsVoices"
|
||||
| "ttsUsageStats"
|
||||
| "ttsProviderConfigured"
|
||||
| "maxReadFileLine"
|
||||
| "fileSearchResults"
|
||||
| "toggleApiConfigPin"
|
||||
|
|
@ -211,6 +214,10 @@ export interface ExtensionMessage {
|
|||
queuedMessages?: QueuedMessage[]
|
||||
list?: string[] // For dismissedUpsells
|
||||
organizationId?: string | null // For organizationSwitchResult
|
||||
voices?: any[] // For TTS voices
|
||||
stats?: any // For TTS usage stats
|
||||
provider?: string // For TTS provider checks
|
||||
configured?: boolean // For TTS provider configuration status
|
||||
}
|
||||
|
||||
export type ExtensionState = Pick<
|
||||
|
|
|
|||
|
|
@ -97,6 +97,13 @@ export interface WebviewMessage {
|
|||
| "soundEnabled"
|
||||
| "ttsEnabled"
|
||||
| "ttsSpeed"
|
||||
| "ttsProvider"
|
||||
| "ttsGoogleVoice"
|
||||
| "ttsAzureVoice"
|
||||
| "ttsAzureRegion"
|
||||
| "getTtsVoices"
|
||||
| "getTtsUsageStats"
|
||||
| "checkTtsProviderConfigured"
|
||||
| "soundVolume"
|
||||
| "diffEnabled"
|
||||
| "enableCheckpoints"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue