Skip to content

修复:write next 传递下一章节号 - #411

Open
xinna2001 wants to merge 1 commit into
Narcooo:masterfrom
xinna2001:fix/write-next-start-chapter
Open

xinna2001 wants to merge 1 commit into
Narcooo:masterfrom
xinna2001:fix/write-next-start-chapter

Conversation

@xinna2001

@xinna2001 xinna2001 commented Oct 15, 2026 •

Copy link
Copy Markdown

修改说明

  • 在调用 write_chapters 能力前读取下一篇尚未写入的章节号
  • 将必填参数 startChapterNumber 传入显式 Action
  • 增加命令参数构造的回归测试

问题原因

WriteChaptersParams 要求必须提供 startChapterNumber,但 inkos write next 原先调用 executeExplicitCapabilityTool 时没有传入该字段。因此,在刚完成初始化的书籍上执行写作命令,会在模型调用前失败并报错:

Unable to decode value as it does not match the expected schema

修复后通过 StateManager.getNextChapterNumber() 获取下一篇尚未写入的章节号,同时沿用现有能力层对覆盖已有章节、跳过章节等情况的保护。

验证结果

  • pnpm test:共 1,094 项测试通过(Core 701、Studio 304、CLI 89)
  • pnpm typecheck:全工作区通过
  • pnpm --filter @actalk/inkos build:通过
  • 本地真实冒烟:修复后 inkos write next 已成功生成并原子提交第 1~3 章

@xinna2001 xinna2001 changed the title fix: pass next chapter number to write action 修复:write next 传递下一章节号 Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant