Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.
TypeScript agent-skillscodex-clideskop-appdubbingimage-generationlocalizationskillsttsvideo-editingvideo-generationvideo-transcriptionvideo-translation
Merge PR #330 (French video translation source) into master
Leggett192128af706a
diff --cc apps/web/e2e/web-desktop-parity.spec.tsindex 99ed7e58,6c851de6..3606c13e--- a/apps/web/e2e/web-desktop-parity.spec.ts+++ b/apps/web/e2e/web-desktop-parity.spec.ts@@@ -1,113 -1,43 +1,150 @@@import type { CreatorServicesCapabilitiesResponse, CreatorYtDlpStatusResponse } from '@opencreator/protocol';import { test, expect } from './fixtures/runtime.js';+ test('法语源语言与中法双语设置在 Browser/Desktop 下保存并重载一致', async ({ browser, runtime }, testInfo) => {+ test.skip(testInfo.project.name !== 'chromium-desktop');+ const results: unknown[] = [];+ for (const platform of ['browser', 'desktop']) {+ const created = await runtime.api<{ job: { id: string } }>('POST', '/creator/jobs', {+ projectId: runtime.projectId, templateId: 'video-translation',+ state: { sourceUrl: 'https://www.youtube.com/watch?v=french', sourceLanguage: 'en',+ targetLanguage: 'zh_cn', bilingual: true, currentStep: 1, furthestStep: 1 }+ });+ const context = await browser.newContext({ viewport: { width: 1280, height: 800 }, reducedMotion: 'reduce' });+ const page = await context.newPage();+ if (platform === 'desktop') await installDesktopBridge(page);+ try {+ await runtime.openApp(page);+ await page.goto(`${runtime.origin}/#/workbench?tool=video-translation&jobId=${created.job.id}`);+ const request = page.waitForRequest(req => req.url().endsWith('/actions')+ && req.postDataJSON()?.input?.patch?.sourceLanguage === 'fr');+ await page.getByRole('combobox', { name: '源语言', exact: true }).selectOption('fr');+ const action = (await request).postDataJSON();+ const readSettings = async () => {+ const { job } = await runtime.api<{ job: { state: { sourceLanguage: string; targetLanguage: string; bilingual: boolean } } }>('GET', `/creator/jobs/${created.job.id}`);+ return { sourceLanguage: job.state.sourceLanguage, targetLanguage: job.state.targetLanguage, bilingual: job.state.bilingual };+ };+ await expect.poll(readSettings).toEqual({ sourceLanguage: 'fr', targetLanguage: 'zh_cn', bilingual: true });+ await page.reload();+ const source = page.getByRole('combobox', { name: '源语言', exact: true });+ await expect(source).toHaveValue('fr');+ await expect(page.getByRole('combobox', { name: '翻译为' })).toHaveValue('zh_cn');+ await expect(page.getByRole('switch', { name: '双语字幕' })).toBeChecked();+ results.push({ action: action.action, settings: await readSettings(),+ requested: { sourceLanguage: action.input.patch.sourceLanguage, targetLanguage: action.input.patch.targetLanguage, bilingual: action.input.patch.bilingual },+ options: await source.innerText(), sourceBox: await source.boundingBox() });+ } finally { await context.close(); }+ }+ expect(results[1]).toEqual(results[0]);+ });++test('Creator Issue 在 Browser/Desktop Bridge 下保持相同展示和 Agent 聚焦请求', async ({+ browser,+ runtime+}, testInfo) => {+ test.setTimeout(120_000);+ test.skip(+ testInfo.project.name !== 'chromium-desktop',+ '一致性规格内部固定创建 Browser/Desktop Chromium 上下文'+ );++ const created = await runtime.api<{ job: { id: string } }>('POST', '/creator/jobs', {+ projectId: runtime.projectId,+ templateId: 'image-generation',+ state: { prompt: 'Creator Issue parity' }+ });+ const reported = await runtime.api<{+ clientIssueId: string;+ issue: { id: string; diagnosticId: string; fallbackMessage: string };+ }>('POST', `/creator/jobs/${encodeURIComponent(created.job.id)}/issues/report`, {+ clientIssueId: 'e2e-creator-issue-parity',+ code: 'creator_e2e_failure',+ source: 'client',+ operation: 'creator.e2e',+ fallbackMessage: '操作未完成,请在 Agent 区域查看诊断。'+ });+ runtime.configureInvocations([+ { message: '已完成 Browser 诊断。' },+ { message: '已完成 Desktop 诊断。' }+ ]);++ const results: Array<{+ issueText: string;+ boxes: Record<string, { x: number; y: number; width: number; height: number }>;+ request: Record<string, unknown>;+ }> = [];+ for (const platform of ['browser', 'desktop'] as const) {+ const context = await browser.newContext({+ viewport: { width: 1440, height: 900 },+ deviceScaleFactor: 1,+ colorScheme: 'dark',+ reducedMotion: 'reduce'+ });+ const page = await context.newPage();+ if (platform === 'desktop') await installDesktopBridge(page);+ try {+ await runtime.openApp(page);+ await page.goto(+ `${runtime.origin}/#/workbench?tool=image-generation`+ + `&jobId=${encodeURIComponent(created.job.id)}`+ );++ const panel = page.getByRole('complementary', { name: 'OpenCreator' });+ const issue = panel.locator(`.creator-collaboration-issue[data-issue-id="${reported.issue.id}"]`);+ await expect(issue).toContainText('操作未完成,请在 Agent 区域查看诊断。');+ await expect(issue).toContainText('错误码:creator_e2e_failure');+ await expect(issue).not.toContainText(reported.issue.diagnosticId);+ await issue.getByRole('button', { name: '询问这个问题' }).click();++ const composer = panel.getByRole('textbox', { name: '告诉 Agent 你的要求' });+ await composer.fill('请说明这个问题的已确认事实、可能原因和下一步修复方法。');+ await expect(composer).toHaveValue('请说明这个问题的已确认事实、可能原因和下一步修复方法。');+ const responsePromise = page.waitForResponse(response => {+ const url = new URL(response.url());+ return response.request().method() === 'POST'+ && url.pathname.endsWith(`/creator/jobs/${created.job.id}/agent-turns`);+ }, { timeout: 45_000 });+ await panel.getByRole('button', { name: '发送给 Agent' }).click();+ const response = await responsePromise;+ expect(response.ok()).toBe(true);+ const request = response.request().postDataJSON() as Record<string, unknown>;+ expect(request).toMatchObject({+ message: '请说明这个问题的已确认事实、可能原因和下一步修复方法。',+ sandbox: 'danger-full-access',+ focusedIssueId: reported.issue.id+ });++ const boxes: Record<string, { x: number; y: number; width: number; height: number }> = {};+ for (const [name, locator] of [+ ['panel', panel],+ ['issue', issue],+ ['composer', panel.locator('.tool-agent-composer')]+ ] as const) {+ const box = await locator.boundingBox();+ expect(box, `${platform} 缺少 ${name} 尺寸目标`).not.toBeNull();+ boxes[name] = {+ x: Math.round(box!.x),+ y: Math.round(box!.y),+ width: Math.round(box!.width),+ height: Math.round(box!.height)+ };+ }+ const { clientMessageId: _clientMessageId, ...stableRequest } = request;+ results.push({+ issueText: normalizeParityText(await issue.innerText()),+ boxes,+ request: stableRequest+ });+ } finally {+ await context.close();+ }+ }++ expect(results[1]!.issueText).toBe(results[0]!.issueText);+ expect(results[1]!.boxes).toEqual(results[0]!.boxes);+ expect(results[1]!.request).toEqual(results[0]!.request);+});+test('Agent 面板在 Browser/Desktop Bridge 下均不显示产物版本详情', async ({ browser, runtime }, testInfo) => {test.skip(testInfo.project.name !== 'chromium-desktop', '内部使用相同内容视口');const created = await runtime.api<{ job: { id: string } }>('POST', '/creator/jobs', {