|
|
@@ -98,7 +98,7 @@
|
|
|
import { ref, computed, watch, onMounted, onUnmounted, inject } from 'vue'
|
|
|
import type { DialogueReport, OverallEvaluation, PreviewAIRole, PreviewDialogueState, SessionStartInfo, VideoMeta } from '@/types/englishSpeaking'
|
|
|
import { useSpeakingStore } from '@/store/speaking'
|
|
|
-import { getSpeakingConfig } from '@/services/speaking'
|
|
|
+import { getSpeakingConfig, getDialogueDefaults } from '@/services/speaking'
|
|
|
import { createDialogueApi, DialogueApiError } from '../services/llmService'
|
|
|
|
|
|
import DialogueChatView from './DialogueChatView.vue'
|
|
|
@@ -537,7 +537,13 @@ watch(() => props.configId, (id) => {
|
|
|
loadConfigFromBackend(id)
|
|
|
})
|
|
|
|
|
|
-onMounted(() => {
|
|
|
+onMounted(async () => {
|
|
|
+ try {
|
|
|
+ const defaults = await getDialogueDefaults()
|
|
|
+ speakingStore.hydrateDefaults(defaults)
|
|
|
+ } catch (err) {
|
|
|
+ console.error('[speaking] failed to load dialogue defaults', err)
|
|
|
+ }
|
|
|
speakingStore.setPreviewState(dialogueState.value)
|
|
|
loadConfigFromBackend(props.configId)
|
|
|
if (fitWrapperRef.value) {
|