fix: focus built-in skill defaults
The Skills catalog exposed nine product-marketing recipes as independent capabilities and enabled every marketing package for every Runtime by default. It now keeps five top-level Skills, loads the nine recipes on demand through the product-marketing package, and leaves the three marketing Skills disabled until users enable them. Existing saved Skill settings remain authoritative. Release note: 内置 Skills 已从 14 个顶层入口精简为 5 个;去 AI 味和长文工具默认启用,产品营销类默认停用,已保存的用户设置保持不变。
This commit is contained in:
@@ -358,6 +358,54 @@ describe('CapabilityService', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('disables product marketing skills by default and preserves explicit enablement', async () => {
|
||||
const { filePath, builtinRoot, importedRoot, service } =
|
||||
await createService()
|
||||
await Promise.all([
|
||||
writeSkill(builtinRoot, 'product-marketing', '产品市场'),
|
||||
writeSkill(builtinRoot, 'product-evidence', '产品证据'),
|
||||
writeSkill(builtinRoot, 'product-presentation', '产品演示'),
|
||||
writeSkill(builtinRoot, 'deai-writing', '中文审校'),
|
||||
writeSkill(builtinRoot, 'longdoc-docx', '长文导出')
|
||||
])
|
||||
|
||||
const snapshot = await service.getSnapshot()
|
||||
expect(snapshot.skills).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: 'product-marketing',
|
||||
enabled: false
|
||||
}),
|
||||
expect.objectContaining({
|
||||
id: 'product-evidence',
|
||||
enabled: false
|
||||
}),
|
||||
expect.objectContaining({
|
||||
id: 'product-presentation',
|
||||
enabled: false
|
||||
}),
|
||||
expect.objectContaining({ id: 'deai-writing', enabled: true }),
|
||||
expect.objectContaining({ id: 'longdoc-docx', enabled: true })
|
||||
])
|
||||
)
|
||||
|
||||
await service.setSkillEnabled('product-marketing', true)
|
||||
const reloaded = new CapabilityService(
|
||||
filePath,
|
||||
builtinRoot,
|
||||
importedRoot,
|
||||
cipher
|
||||
)
|
||||
await expect(reloaded.getSnapshot()).resolves.toMatchObject({
|
||||
skills: expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: 'product-marketing',
|
||||
enabled: true
|
||||
})
|
||||
])
|
||||
})
|
||||
})
|
||||
|
||||
it('imports and removes a managed SKILL.md package', async () => {
|
||||
const { directory, service } = await createService()
|
||||
const packageRoot = join(directory, 'source-skill')
|
||||
|
||||
Reference in New Issue
Block a user