feat: configure embedding servers and transcript agents

This commit is contained in:
yiling
2026-12-04 18:54:29 +08:00
parent 72a7f68c92
commit 553269012c
57 changed files with 1686 additions and 271 deletions
@@ -16,6 +16,7 @@ test('starts a transcript for an archived video and tracks it in the file metada
let submissions = 0
let rejectSubmission = true
let statusRequests = 0
let transcriptionEnabled = false
page.on('request', (request) => {
if (new URL(request.url()).pathname === statusPath) {
expect(request.method()).toBe('GET')
@@ -25,7 +26,7 @@ test('starts a transcript for an archived video and tracks it in the file metada
})
await page.route('**/api/signup-info', async (route) => {
const response = await route.fetch()
await route.fulfill({ json: { ...(await response.json()), transcriptionEnabled: true } })
await route.fulfill({ json: { ...(await response.json()), transcriptionEnabled } })
})
await page.route('**/api/transcription/languages', (route) =>
route.fulfill({
@@ -61,12 +62,17 @@ test('starts a transcript for an archived video and tracks it in the file metada
)
.toMatchObject({ status: 'processed', media: { proxyType: 'video' } })
await prisma.asset.update({ where: { id: fileId }, data: { status: 'processing' } })
await page.goto(projectPath)
const action = page.getByRole('menuitem', { name: 'Generate Transcripts' })
await fileCard(page, fileName).click({ button: 'right' })
await expect(page.getByRole('menu')).toBeVisible()
await expect(action).toHaveCount(0)
transcriptionEnabled = true
const [signupInfo] = await Promise.all([
page.waitForResponse('**/api/signup-info'),
page.goto(projectPath),
])
expect(await signupInfo.json()).toMatchObject({ transcriptionEnabled: true })
const action = page.getByRole('menuitem', { name: 'Generate Transcripts' })
await fileCard(page, fileName).click({ button: 'right' })
await expect(action).toBeDisabled()
await prisma.asset.update({ where: { id: fileId }, data: { status: 'archived' } })