fix(knowledge): align embedding configuration with Yuxi

This commit is contained in:
2026-09-14 23:37:16 +08:00
parent f92753329c
commit 5ed21835ae
5 changed files with 61 additions and 12 deletions

View File

@@ -38,7 +38,7 @@ test('personal cloud Agent creation, draft save and leave protection in Electron
if (path.endsWith('/actions')) {
const input = body.input ?? {};
if (body.operation === 'catalog') return result({ models: [{ id: 'test-model', name: '创作模型' }], resources: {}, pricing: null });
if (body.operation === 'knowledge') return result({ databases: [], models: ++knowledgeCatalogLoads === 1 ? [] : [{ id: 'fixture:test-embedding', name: '资料向量模型' }] });
if (body.operation === 'knowledge') return result({ databases: [], models: ++knowledgeCatalogLoads === 1 ? [] : [{ id: 'fixture:test-embedding', name: '资料向量模型', dimension: 1024 }] });
if (body.operation === 'resources') return result({ mcps: [], skills: [], subagents: [] });
if (body.operation === 'budget' || body.operation === 'saveBudget') {
if (body.operation === 'saveBudget') limits = input;
@@ -104,7 +104,8 @@ test('personal cloud Agent creation, draft save and leave protection in Electron
await expect(page.getByLabel('向量模型', { exact: true })).toBeDisabled();
await page.getByText('管理员配置说明', { exact: true }).click();
await expect(page.getByText(/Yuxi 后台/)).toContainText('智能体管理 → 模型供应商');
await expect(page.getByText(/Works Square 运营后台/)).toBeVisible();
await expect(page.getByText(/Yuxi 后台/)).toContainText('服务地址和 API Key');
await expect(page.getByText(/Works Square 运营后台|one-api/)).toHaveCount(0);
await page.getByLabel('知识库名称', { exact: true }).fill('我的创作资料');
await page.screenshot({ path: testInfo.outputPath('knowledge-empty.png') });
await page.getByRole('button', { name: '刷新知识库与模型', exact: true }).click();