feat: add bundled OpenCode skills and refine module flow
This commit is contained in:
@@ -285,6 +285,15 @@ async function installSlashCommandHost(
|
||||
shareEnabled: true,
|
||||
});
|
||||
}
|
||||
if (path === '/api/opencode/skills') {
|
||||
return respond({
|
||||
skills: [
|
||||
{ name: 'frontend-slides' },
|
||||
{ name: 'grilling' },
|
||||
{ name: 'planning-with-files' },
|
||||
],
|
||||
});
|
||||
}
|
||||
if (
|
||||
path
|
||||
=== '/api/opencode/sessions/ses_slash_e2e/summarize'
|
||||
@@ -331,8 +340,6 @@ test.describe('OpenCode slash commands', () => {
|
||||
await completeSetup(page);
|
||||
await installSlashCommandHost(electronApp);
|
||||
await page.reload();
|
||||
await page.getByTestId('sidebar-module-switcher-trigger').click();
|
||||
await page.getByTestId('sidebar-module-programming').click();
|
||||
await expect(page).toHaveURL(/\/opencode-chat$/);
|
||||
await page.getByTestId('project-agent-chat-game-development').click();
|
||||
const composer = page.getByRole('textbox');
|
||||
@@ -410,8 +417,6 @@ test.describe('OpenCode slash commands', () => {
|
||||
await installSlashCommandHost(electronApp);
|
||||
await page.reload();
|
||||
await page.setViewportSize({ width: 1280, height: 800 });
|
||||
await page.getByTestId('sidebar-module-switcher-trigger').click();
|
||||
await page.getByTestId('sidebar-module-programming').click();
|
||||
await expect(page).toHaveURL(/\/opencode-chat$/);
|
||||
await expect(page.getByTestId('opencode-message-composer')).toBeVisible();
|
||||
|
||||
@@ -422,6 +427,11 @@ test.describe('OpenCode slash commands', () => {
|
||||
const createPartnerDialog = page.getByRole('dialog', { name: '创建项目伙伴' });
|
||||
await expect(createPartnerDialog).toBeVisible();
|
||||
await expect(createPartnerDialog).toHaveCSS('z-index', '110');
|
||||
await expect(createPartnerDialog.getByLabel('绑定技能:项目演示')).not.toBeChecked();
|
||||
await expect(createPartnerDialog.getByLabel('绑定技能:方案质询')).toBeChecked();
|
||||
await expect(createPartnerDialog.getByLabel('绑定技能:项目规划')).toBeChecked();
|
||||
await createPartnerDialog.getByLabel('绑定技能:方案质询').uncheck();
|
||||
await expect(createPartnerDialog.getByLabel('绑定技能:方案质询')).not.toBeChecked();
|
||||
await createPartnerDialog.getByLabel(/伙伴名称/).fill('E2E层级检查');
|
||||
await page.getByRole('button', { name: '取消' }).click();
|
||||
await expect(createPartnerButton).toHaveClass(/text-brand/);
|
||||
|
||||
Reference in New Issue
Block a user