Simplify Agent settings and start conversations directly

This commit is contained in:
鲨鱼辣椒 committed 2026-10-12 19:38:57 +08:00
1 parent f7b1003c4c
commit 0a43ae901f
9 files changed
+402 -102

No files matched your search

@@ -187,20 +187,21 @@ for (const width of [375, 768, 1024, 1440]) {
await expect(tabs.getByRole('tab', { name: '高级设置', exact: true })).toHaveAttribute('aria-selected', 'true');
await expect(advanced.getByRole('navigation')).toHaveCount(0);
await expect(advanced.getByRole('tablist')).toHaveCount(0);
const headings = ['模型', '工具箱(Tool)', '做事手册(Skill)', 'MCP 服务', '子智能体', '知识库', '费用上限', '运行限制'];
const headings = ['模型', '工具箱(Tool)', '做事手册(Skill)', 'MCP 服务', '子智能体', '知识库'];
for (const name of headings) await expect(advanced.getByRole('heading', { name, exact: true })).toBeVisible();
await expect(advanced.getByRole('heading').first()).toHaveText('模型');
await expect(advanced.getByLabel('模型', { exact: true })).toHaveAttribute('required', '');
await expect(advanced.getByText('选它做事时能用的工具。', { exact: true })).toBeVisible();
await expect(advanced.getByText('给它一本手册,照着方法做。', { exact: true })).toBeVisible();
for (const copy of ['选它做事时能用的工具。', '给它一本手册,照着方法做。', '管理我的云端能力']) {
await expect(advanced.getByText(copy, { exact: true })).toHaveCount(0);
}
for (const name of ['费用上限', '运行限制']) await expect(advanced.getByRole('heading', { name, exact: true })).toHaveCount(0);
await expect(advanced.getByLabel('模型', { exact: true })).toBeInViewport();
await expectConfigurationBounds(page);
if (width === 375 || width === 1440) {
await page.screenshot({ path: test.info().outputPath(`agent-advanced-upper-${width}.png`), animations: 'disabled' });
}
await advanced.getByLabel('单次运行时限(秒)', { exact: true }).scrollIntoViewIfNeeded();
await expect(advanced.getByLabel('单次运行时限(秒)', { exact: true })).toBeInViewport();
await expect(advanced.getByLabel('每日上限(词元点数)', { exact: true })).toBeVisible();
await advanced.getByText('管理我的知识文档', { exact: true }).scrollIntoViewIfNeeded();
await expect(advanced.getByText('管理我的知识文档', { exact: true })).toBeInViewport();
await expectConfigurationBounds(page);
if (width === 375 || width === 1440) {
await page.screenshot({ path: test.info().outputPath(`agent-advanced-lower-${width}.png`), animations: 'disabled' });
@@ -213,7 +214,7 @@ for (const width of [375, 768, 1024, 1440]) {
expect(calls.filter(call => call.method === 'PATCH' || call.path === '/api/cloud-agents/avatars/preset'
|| (call.method === 'POST' && call.path === '/api/cloud-agents/agents'))).toEqual([]);
expect(calls.filter(call => call.path === '/api/cloud-agents/actions')
.every(call => ['catalog', 'resources', 'knowledge', 'budget', 'access'].includes(String(call.input?.operation)))).toBe(true);
.every(call => ['catalog', 'knowledge', 'access'].includes(String(call.input?.operation)))).toBe(true);
});
}