feat: polish voice studio workflow and bilingual copy
This commit is contained in:
@@ -9,6 +9,10 @@ import EmptyState from '../components/ui/EmptyState.vue'
|
||||
import LoadingSpinner from '../components/ui/LoadingSpinner.vue'
|
||||
import type { GenerationOpsSummary, GenerationProviderAnalytics } from '../types/generation'
|
||||
import type { VoiceSessionAnalytics, VoiceSessionSummary } from '../types/voiceSession'
|
||||
import {
|
||||
getVoiceSessionNextAction,
|
||||
getVoiceSessionNextStep,
|
||||
} from '../utils/voiceSession'
|
||||
import {
|
||||
getAssetStatusMeta,
|
||||
getGenerationStatusMeta,
|
||||
@@ -172,31 +176,16 @@ function continueActiveVoiceSession() {
|
||||
goToVoiceStudio()
|
||||
return
|
||||
}
|
||||
if (activeVoiceSession.value.latest_requires_confirmation) {
|
||||
goToVoiceStudio({
|
||||
reason: 'pending_confirmation',
|
||||
sessionId: activeVoiceSession.value.id,
|
||||
focus: 'confirmation',
|
||||
})
|
||||
const action = getVoiceSessionNextAction(activeVoiceSession.value)
|
||||
if (action.storyId) {
|
||||
router.push(`/story/${action.storyId}`)
|
||||
return
|
||||
}
|
||||
if (activeVoiceSession.value.latest_safety_message) {
|
||||
goToVoiceStudio({
|
||||
reason: 'safety_intervention',
|
||||
sessionId: activeVoiceSession.value.id,
|
||||
focus: 'safety',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (activeVoiceSession.value.attention_reasons.includes('failed_turn')) {
|
||||
goToVoiceStudio({
|
||||
reason: 'failed_turn',
|
||||
sessionId: activeVoiceSession.value.id,
|
||||
focus: 'failed',
|
||||
})
|
||||
return
|
||||
}
|
||||
goToVoiceStudio({ sessionId: activeVoiceSession.value.id })
|
||||
goToVoiceStudio({
|
||||
reason: action.reason,
|
||||
sessionId: activeVoiceSession.value.id,
|
||||
focus: action.focus,
|
||||
})
|
||||
}
|
||||
|
||||
function getStoryLink(story: StoryItem) {
|
||||
@@ -316,10 +305,21 @@ watch([selectedWindow, selectedCapability, selectedVoiceWindow], () => {
|
||||
>
|
||||
最近一轮触发了儿童内容安全兜底,建议回到工作台查看详细记录。
|
||||
</p>
|
||||
<div
|
||||
class="mt-3 rounded-xl border px-3 py-3 text-sm leading-6"
|
||||
:class="getVoiceSessionNextStep(activeVoiceSession).toneClass"
|
||||
>
|
||||
<div class="font-medium">
|
||||
建议动作:{{ getVoiceSessionNextStep(activeVoiceSession).label }}
|
||||
</div>
|
||||
<div class="mt-1 opacity-90">
|
||||
{{ getVoiceSessionNextStep(activeVoiceSession).description }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<BaseButton @click="continueActiveVoiceSession">
|
||||
<SparklesIcon class="h-5 w-5 mr-2" />
|
||||
继续语音共创
|
||||
{{ getVoiceSessionNextAction(activeVoiceSession).label }}
|
||||
</BaseButton>
|
||||
</div>
|
||||
</BaseCard>
|
||||
|
||||
Reference in New Issue
Block a user