Merge remote Agent workspace updates with message process rendering
Electron E2E / Electron E2E (macos-latest) (push) Canceled after 0s
Electron E2E / Electron E2E (ubuntu-latest) (push) Canceled after 0s
Electron E2E / Electron E2E (windows-latest) (push) Canceled after 0s

This commit is contained in:
brother7 committed 2026-10-13 11:01:05 +08:00
commit bf39f4071f
83 files changed
+8002 -1296

No files matched your search

+3 -3
View File
@@ -61,7 +61,7 @@ test('personal chat displays thinking, tools and Markdown, then restores them af
});
await page.goto(applicationUrl);
await page.getByTestId('ai-module-option-cloud_agents').click();
await page.getByRole('button', { name: /渲染测试助手.*打开对话/ }).click();
await page.getByRole('article', { name: '渲染测试助手', exact: true }).getByRole('button', { name: '和它聊聊', exact: true }).click();
const emit = async (items: unknown[], cursor: string) => page.evaluate(({ items, cursor }) => {
const sources = (window as unknown as { renderSources: EventTarget[] }).renderSources;
sources.at(-1)!.dispatchEvent(new MessageEvent('messages', { lastEventId: cursor, data: JSON.stringify({ run_id: 'render-run', thread_id: 'render-thread', payload: { items } }) }));
@@ -86,10 +86,10 @@ test('personal chat displays thinking, tools and Markdown, then restores them af
await expect(process.getByText('"实际检索资料"', { exact: false })).toBeVisible();
await page.screenshot({ path: testInfo.outputPath('personal-chat-process.png') });
await app.evaluate(() => (globalThis as unknown as { finishRenderRun: () => void }).finishRenderRun());
await page.evaluate(() => (window as unknown as { renderSources: EventTarget[] }).renderSources.at(-1)!.dispatchEvent(new MessageEvent('end', { data: JSON.stringify({ thread_id: 'render-thread', payload: { status: 'completed' } }) })));
await page.evaluate(() => (window as unknown as { renderSources: EventTarget[] }).renderSources.at(-1)!.dispatchEvent(new MessageEvent('end', { data: JSON.stringify({ run_id: 'render-run', thread_id: 'render-thread', payload: { status: 'completed' } }) })));
await expect(page.getByRole('heading', { name: '整理结果' })).toHaveCount(1);
await page.reload();
await page.getByRole('button', { name: /渲染测试助手.*打开对话/ }).click();
await page.getByRole('article', { name: '渲染测试助手', exact: true }).getByRole('button', { name: '和它聊聊', exact: true }).click();
await expect(page.getByRole('heading', { name: '整理结果' })).toBeVisible();
await page.getByTestId('cloud-message-process').locator(':scope > summary').click();
await expect(page.getByLabel('智能体思考过程')).toHaveText('先核对来源,再整理结果。');