mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
Add TTS support with OpenAI-compatible endpoint configuration
- Add TTS settings schema and configuration UI with validation - Create backend TTS proxy with 24hr file-based caching - Add frontend useTTS hook with Cache API caching - Add TTS playback button on assistant messages (step-finish) - Include test button to verify TTS configuration
This commit is contained in:
1 parent
283348b64f
commit
fb91b4d3a3
12 files changed
+859
-5
No files matched your search
@@ -1,12 +1,22 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useSettings } from '@/hooks/useSettings'
|
||||
import { Loader2 } from 'lucide-react'
|
||||
import { Label } from '@/components/ui/label'
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'
|
||||
import { Switch } from '@/components/ui/switch'
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { TTSSettings } from './TTSSettings'
|
||||
|
||||
export function GeneralSettings() {
|
||||
const { preferences, isLoading, updateSettings, isUpdating } = useSettings()
|
||||
|
||||
const [gitToken, setGitToken] = useState('')
|
||||
|
||||
useEffect(() => {
|
||||
if (preferences) {
|
||||
setGitToken(preferences.gitToken || '')
|
||||
}
|
||||
}, [preferences])
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
@@ -108,8 +118,9 @@ export function GeneralSettings() {
|
||||
id="gitToken"
|
||||
type="password"
|
||||
placeholder="ghp_..."
|
||||
value={preferences?.gitToken || ''}
|
||||
onChange={(e) => updateSettings({ gitToken: e.target.value })}
|
||||
value={gitToken}
|
||||
onChange={(e) => setGitToken(e.target.value)}
|
||||
onBlur={() => updateSettings({ gitToken })}
|
||||
className="bg-background border-border text-foreground placeholder:text-muted-foreground"
|
||||
/>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
@@ -124,6 +135,10 @@ export function GeneralSettings() {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="mt-6">
|
||||
<TTSSettings />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user