feat(agents): guide first helper creation and trial

This commit is contained in:
2026-09-14 21:23:45 +08:00
parent 1d00ba39bd
commit 6e6a8c92dd
16 changed files with 594 additions and 100 deletions

View File

@@ -187,7 +187,7 @@ it('keeps publication and access controls usable when cost history is unavailabl
throw new Error(operation);
});
render(<CloudAccessPanel slug={slug} revision={2} onPublished={() => undefined} />);
expect(await screen.findByText('当前发布版本 1')).toBeVisible();
expect(await screen.findByText('助手已准备好')).toBeVisible();
expect(screen.getByRole('button', { name: '停用智能体' })).toBeEnabled();
expect(await screen.findByText('费用暂不可用')).toBeVisible();
});
@@ -382,11 +382,13 @@ it('pins uncertain preview retries to the original request and revision after a
expect(submissions[0][1]).toEqual(submissions[1][1]);
expect(submissions[1][1]).toMatchObject({ expected_revision: 1, query: '原来的问题' });
fireEvent.click(screen.getByRole('button', { name: '用最新草稿试用' }));
expect(screen.queryByText('第一版回答')).not.toBeInTheDocument();
await waitFor(() => expect(screen.getByLabelText('消息')).toBeEnabled());
expect(screen.getByText('对比上一次试用 · 修订 1')).toBeVisible();
expect(screen.getByText('第一版回答')).not.toBeVisible();
fireEvent.click(screen.getByRole('button', { name: '查看历史对话' }));
fireEvent.change(screen.getByLabelText('历史对话'), { target: { value: 'thread-1' } });
await screen.findByText('第一版回答');
expect(screen.getByText('草稿预览 · 修订 1')).toBeVisible();
expect(screen.getByText('当前试用 · 修订 1')).toBeVisible();
});
it('uses Enter to send while preserving Shift+Enter and Chinese IME composition', async () => {