feat: add Code-style voice composer to current Agents trial

This commit is contained in:
鲨鱼辣椒 committed 2026-10-13 19:12:35 +08:00
1 parent 7c51bb4a00
commit f61efaf046
60 files changed
+3383 -1286

No files matched your search

+4 -4
View File
@@ -133,7 +133,7 @@ it('ignores an obsolete terminal history response after a new request starts in
}) })));
await act(async () => { resolveOld({ ...history, run: { ...run, status: 'completed' }, messages: [savedAssistant()] }); });
expect(screen.getByLabelText('智能体思考过程')).toHaveTextContent('新请求思考');
expect(screen.getByRole('button', { name: '停止回答', exact: true })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '停止', exact: true })).toBeInTheDocument();
expect(screen.queryByText('完整回答')).not.toBeInTheDocument();
});
@@ -160,7 +160,7 @@ it('ignores a pending history read when approval resumes the same request in a n
expect(screen.getAllByLabelText('智能体思考过程').map(item => item.textContent).join('')).toContain('操作前的思考');
expect(screen.getAllByLabelText('智能体思考过程').map(item => item.textContent).join('')).toContain('操作后的思考');
expect(screen.queryByRole('button', { name: '允许执行', exact: true })).not.toBeInTheDocument();
expect(screen.getByRole('button', { name: '停止回答', exact: true })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '停止', exact: true })).toBeInTheDocument();
});
it('reopens a resumed same-Run stream and ignores its obsolete interrupted history response', async () => {
@@ -193,7 +193,7 @@ it('reopens a resumed same-Run stream and ignores its obsolete interrupted histo
await act(async () => { resolveOld({ ...history, run: { ...run, status: 'interrupted' }, messages: [savedAssistant()] }); });
expect(screen.getAllByLabelText('智能体思考过程').map(item => item.textContent).join('')).toContain('恢复后的思考');
expect(screen.getAllByTestId('cloud-message-process').every(item => !item.hasAttribute('open'))).toBe(true);
expect(screen.getByRole('button', { name: '停止回答', exact: true })).toBeInTheDocument();
expect(screen.getByRole('button', { name: '停止', exact: true })).toBeInTheDocument();
expect(screen.queryByRole('button', { name: '允许执行', exact: true })).not.toBeInTheDocument();
expect(screen.queryByText('完整回答')).not.toBeInTheDocument();
expect(resumedStream.close).not.toHaveBeenCalled();
@@ -218,7 +218,7 @@ it('ignores a late approval receipt after the user discards input and starts a n
expect(screen.queryByTestId('cloud-message-process')).not.toBeInTheDocument();
expect(screen.getByRole('heading', { name: '问它一个小问题' })).toBeInTheDocument();
await act(async () => { resolveResume({ run_id: 'resumed-old-run', status: 'running' }); });
expect(screen.queryByRole('button', { name: '停止回答', exact: true })).not.toBeInTheDocument();
expect(screen.queryByRole('button', { name: '停止', exact: true })).not.toBeInTheDocument();
expect(screen.queryByRole('button', { name: '允许执行', exact: true })).not.toBeInTheDocument();
expect(screen.queryByTestId('cloud-message-process')).not.toBeInTheDocument();
expect(screen.getByRole('heading', { name: '问它一个小问题' })).toBeInTheDocument();