iter(g37): llms-full 增加组合配方章节
This commit is contained in:
@@ -359,12 +359,21 @@ function renderAgentDocs(index, tokens) {
|
||||
}
|
||||
lines.push('---', '');
|
||||
}
|
||||
/*** 读取组合配方(与 CLI 同目录的 recipes.md),缺失时返回空串 ***/
|
||||
function loadRecipes() {
|
||||
const p = path.join(ROOT, 'packages', 'tools', 'cli', 'recipes.md');
|
||||
return fs.existsSync(p) ? fs.readFileSync(p, 'utf8').trim() : '';
|
||||
}
|
||||
|
||||
const tokenList = loadTokenList(); // 令牌唯一来源:tokens.css(含字号、间距复合值)
|
||||
if (tokenList.length) {
|
||||
lines.push('## 设计令牌(--ua-*)', '');
|
||||
for (const t of tokenList) lines.push(`- ${t.cssVar}: ${t.value}${t.dark && t.dark !== t.value ? `(暗色 ${t.dark})` : ''}`);
|
||||
lines.push('', '皮肤包只允许消费这些变量:写死 #hex 会被 verify 拦截,拼错变量名会被令牌引用校验拦截。', '');
|
||||
}
|
||||
|
||||
const recipes = loadRecipes(); // 组合配方:跨组件的拼装指导,清单参数表表达不了
|
||||
if (recipes) lines.push('', recipes, '');
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user