mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
fix: scope the overridden config over global for recording
This commit is contained in:
parent
38d1d928b7
commit
6968d20eff
2 changed files with 10 additions and 3 deletions
|
|
@ -36,6 +36,11 @@ interface RecordingsDialogProps {
|
|||
onOpenChange: (open: boolean) => void;
|
||||
workflowId: number;
|
||||
onRecordingsChange?: (recordings: RecordingResponseSchema[]) => void;
|
||||
ttsOverrides?: {
|
||||
provider?: string;
|
||||
model?: string;
|
||||
voice?: string;
|
||||
};
|
||||
}
|
||||
|
||||
const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5MB
|
||||
|
|
@ -57,6 +62,7 @@ export const RecordingsDialog = ({
|
|||
onOpenChange,
|
||||
workflowId,
|
||||
onRecordingsChange,
|
||||
ttsOverrides,
|
||||
}: RecordingsDialogProps) => {
|
||||
const { userConfig } = useUserConfig();
|
||||
const [recordings, setRecordings] = useState<RecordingResponseSchema[]>([]);
|
||||
|
|
@ -77,9 +83,9 @@ export const RecordingsDialog = ({
|
|||
const languageRef = useRef(language);
|
||||
languageRef.current = language;
|
||||
|
||||
const ttsProvider = (userConfig?.tts?.provider as string) ?? "";
|
||||
const ttsModel = (userConfig?.tts?.model as string) ?? "";
|
||||
const ttsVoiceId = (userConfig?.tts?.voice as string) ?? "";
|
||||
const ttsProvider = ttsOverrides?.provider ?? (userConfig?.tts?.provider as string) ?? "";
|
||||
const ttsModel = ttsOverrides?.model ?? (userConfig?.tts?.model as string) ?? "";
|
||||
const ttsVoiceId = ttsOverrides?.voice ?? (userConfig?.tts?.voice as string) ?? "";
|
||||
|
||||
const fetchRecordings = useCallback(async () => {
|
||||
if (!workflowId) return;
|
||||
|
|
|
|||
|
|
@ -914,6 +914,7 @@ function WorkflowSettingsContent({
|
|||
open={isRecordingsDialogOpen}
|
||||
onOpenChange={setIsRecordingsDialogOpen}
|
||||
workflowId={workflowId}
|
||||
ttsOverrides={workflowConfigurations?.model_overrides?.tts}
|
||||
/>
|
||||
<EmbedDialog
|
||||
open={isEmbedDialogOpen}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue