feat: add bundled OpenCode skills and refine module flow
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user