feat: add bundled OpenCode skills and refine module flow
Some checks failed
Electron E2E / Electron E2E (macos-latest) (push) Has been cancelled
Electron E2E / Electron E2E (ubuntu-latest) (push) Has been cancelled
Electron E2E / Electron E2E (windows-latest) (push) Has been cancelled

This commit is contained in:
inman
2026-08-14 18:15:55 +08:00
parent 88f9ee8708
commit c809002180
31 changed files with 1153 additions and 241 deletions

View File

@@ -183,6 +183,22 @@ describe('project-owned contact configuration', () => {
expect(markdown).toContain('"*": deny');
});
it('grants selected presentation and planning Skills to the materialized OpenCode Agent', async () => {
const projectPath = await mkdtemp(path.join(tmpdir(), 'makelore-project-config-planning-skills-'));
const initial = await createInitialProjectConfig(projectPath);
await writeProjectConfig(projectPath, {
...initial,
initialized: true,
agents: [createContact({ skillIds: ['frontend-slides', 'grilling', 'planning-with-files'] })],
});
const markdown = await readFile(path.join(projectPath, '.opencode', 'agent', 'agent-test.md'), 'utf8');
expect(markdown).toContain(' "*": deny\n frontend-slides: allow\n grilling: allow\n planning-with-files: allow');
expect(markdown).toContain('主动调用 `frontend-slides`');
expect(markdown).toContain('主动调用 `grilling`');
expect(markdown).toContain('主动调用 `planning-with-files`');
});
it('denies unselected skills when a contact has selected skills', async () => {
const projectPath = await mkdtemp(path.join(tmpdir(), 'makelore-project-config-selected-skills-'));
const initial = await createInitialProjectConfig(projectPath);