feat: update Makelore modules and conversations
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-07-31 10:08:41 +08:00
parent b8ca3f8eea
commit 80e8386fa6
175 changed files with 8036 additions and 10581 deletions

View File

@@ -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([]);
});
});