Files
AgentCompany/tests/e2e/builtin-skills-fixture.ts
T
ZacharyZhang-NY eaaf36f859 Language-aware house style and a resizable chat split
House style now follows the app language: Chinese UI forces the new
bundled humanizer-zh skill into every run, English forces humanizer -
one variant per run, picked by preference with cross-language fallback
so an older catalogue never silently loses house style. Both variants
are protected from grant/revoke, list_skills labels each with its
language, the bundle guard requires both, and startup sync imports the
new skill into existing orgs on next launch. Covered by a unit test
that flips app_state.language and asserts which humanizer compiles.

The chat split is now adjustable: drag the conversation list's right
edge (200-480px, persisted in localStorage) and the composer textarea
grew a native vertical resize grip capped at 40vh.
2026-07-09 01:14:05 -04:00

31 lines
1.3 KiB
TypeScript

import { mkdirSync, writeFileSync } from "node:fs";
import { join } from "node:path";
/**
* A miniature of the real bundled catalogue: the forced humanizer skill plus
* one category of flat skills. E2E launches point
* AGENTCOMPANY_NEW_BUILTIN_SKILLS_DIR here so startup imports stay small and
* hermetic instead of reading the full repo bundle.
*/
export function seedBuiltinSkillsFixture(root: string): string {
mkdirSync(join(root, "humanizer"), { recursive: true });
writeFileSync(
join(root, "humanizer", "SKILL.md"),
"---\nname: humanizer\nversion: 2.1.1\ndescription: |\n Remove signs of AI-generated writing from text.\n---\n\nWrite like a person.\n",
"utf8",
);
mkdirSync(join(root, "Humanizer-zh"), { recursive: true });
writeFileSync(
join(root, "Humanizer-zh", "SKILL.md"),
"---\nname: humanizer-zh\nversion: 1.0.0\ndescription: |\n 去除文本中的 AI 生成痕迹。\n---\n\n像真人一样写作。\n",
"utf8",
);
mkdirSync(join(root, "engineering"), { recursive: true });
writeFileSync(
join(root, "engineering", "engineering-backend-architect.md"),
"---\nname: Backend Architect\ndescription: Scalable system design specialist.\n---\n\nDesign the systems that hold everything up.\n",
"utf8",
);
return root;
}