feat: update Makelore modules and conversations
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { readdir, readFile } from 'node:fs/promises';
|
||||
import { readdirSync } from 'node:fs';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { BUNDLED_COURSE_SKILL_IDS } from '@electron/opencode/superpowers';
|
||||
import { projectTemplates } from '../../shared/project-config';
|
||||
|
||||
const projectRoot = process.cwd();
|
||||
const skillPath = path.join(projectRoot, '.opencode', 'skills', 'youth-plain-language', 'SKILL.md');
|
||||
@@ -19,19 +19,8 @@ describe('youth plain language Skill', () => {
|
||||
expect(content).toContain('不使用幼儿化或居高临下语气');
|
||||
});
|
||||
|
||||
it('is bundled and required by every current project Agent template', () => {
|
||||
it('remains available as a manually selectable Skill without being injected into new Agents', () => {
|
||||
expect(BUNDLED_COURSE_SKILL_IDS).toContain('youth-plain-language');
|
||||
expect(projectTemplates.flatMap((template) => template.agents).every(
|
||||
(agent) => agent.skillIds.includes('youth-plain-language'),
|
||||
)).toBe(true);
|
||||
});
|
||||
|
||||
it('is allowed by every bundled legacy Agent template', async () => {
|
||||
const agentDirectory = path.join(projectRoot, '.opencode', 'agent');
|
||||
const agentFiles = (await readdir(agentDirectory)).filter((name) => name.endsWith('.md'));
|
||||
const contents = await Promise.all(agentFiles.map((name) => readFile(path.join(agentDirectory, name), 'utf8')));
|
||||
|
||||
expect(agentFiles.length).toBeGreaterThan(0);
|
||||
expect(contents.every((content) => content.includes('youth-plain-language: allow'))).toBe(true);
|
||||
expect(readdirSync(path.join(projectRoot, '.opencode', 'agent'))).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user