|
|
@@ -112,6 +112,7 @@ type SpeakingNotify = (
|
|
|
payload: { configId: string; sessionId: string },
|
|
|
) => void
|
|
|
const notifySpeakingProgress = inject<SpeakingNotify>('notifySpeakingProgress', () => {})
|
|
|
+const recordSpeakingStart = inject<(sessionId: string) => void>('recordSpeakingStart', () => {})
|
|
|
|
|
|
const speakingStore = useSpeakingStore()
|
|
|
|
|
|
@@ -334,6 +335,7 @@ async function startDialogue() {
|
|
|
configId: props.configId || '',
|
|
|
sessionId: preparedSession.value?.sessionId || '',
|
|
|
})
|
|
|
+ recordSpeakingStart(preparedSession.value?.sessionId || '')
|
|
|
} catch (err: unknown) {
|
|
|
if (err instanceof DialogueApiError) {
|
|
|
sessionError.value = `创建会话失败(${err.status}),请重试`
|