feat: 補齊規格缺漏(狀態列顯示思考程度、動漫層與主題色、萃取角色包可啟動)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
59fcf2b3eb
commit
e99e7b1536
@@ -95,6 +95,14 @@ async function buildPlan($: Engine, p: Pending): Promise<Plan | string> {
|
||||
lines.push(`- 角色 ${p.workSlug}-${slug}(${c.name}):${m.action},${m.detail}${m.conflicts.length ? `,${m.conflicts.length} 項衝突待確認` : ''}`)
|
||||
conflicts.push(...m.conflicts)
|
||||
}
|
||||
// 索引讓啟動時能找到角色包(外掛更新後 characters/ 在外掛目錄內)。
|
||||
const indexPath = `${p.root}/characters/index.json`
|
||||
const index = (await readJson<{ packs: { work: string; workName: string; slug: string }[] }>($, indexPath)) ?? { packs: [] }
|
||||
for (const c of p.extracted.characters) {
|
||||
const slug = p.slugs[slugKey(c)]!
|
||||
if (!index.packs.some(x => x.work === p.workSlug && x.slug === slug)) index.packs.push({ work: p.workSlug, workName: p.extracted.work.name, slug })
|
||||
}
|
||||
files.push({ path: indexPath, json: index })
|
||||
if (errors.length) return `角色包 schema 驗證失敗,尚未寫入任何檔案:\n${errors.map(e => `- ${e}`).join('\n')}`
|
||||
return { files, lines, conflicts, workSlug: p.workSlug, workName: p.extracted.work.name }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user