Skip to content

fix(gui): reliable engine start, model switch, book folder lifecycle#5

Open
xingleiwu wants to merge 2 commits into
crazytreeChen:masterfrom
xingleiwu:fix/gui-headless-cocreate-ux
Open

fix(gui): reliable engine start, model switch, book folder lifecycle#5
xingleiwu wants to merge 2 commits into
crazytreeChen:masterfrom
xingleiwu:fix/gui-headless-cocreate-ux

Conversation

@xingleiwu

@xingleiwu xingleiwu commented Jul 15, 2026

Copy link
Copy Markdown

概述

在源码运行实测中修复 GUI 与 CLI 协作的多个问题,提升启动可靠性与书籍目录生命周期管理。

主要改动

引擎启动/恢复

  • spawn 后增加健康窗口,进程秒退不再假成功
  • 失败时返回 CLI 真实错误(stderr / last-error)
  • 输入框/共创不再用静默 fallback 掩盖主流程失败

模型配置

  • 清理非法
    oles(仅保留 coordinator/architect/writer/editor)
  • ModelsPage 合并保存,避免冲掉 reasoning 等字段
  • 模型切换支持自定义 Provider 显示名,并同步到当前书籍

书籍目录

  • 卡片支持「打开书籍目录」
  • 「导入目录」复制到托管 �ooks/
  • 删除书籍同时删除托管文件夹,并清理孤儿目录

其它

  • run.json 只写 output/novel/meta
  • 切书隔离 snapshot/events/stream
  • 共创 brief 归模型更新,减少 GUI 抢写

测试

  • Windows 源码运行:开始/继续写作正常
  • 删除书籍后托管目录消失
  • 模型切换与保存可用

- Fix headless start/resume when book workspace is missing or phase is init:
  resolve book cwd, build headless args with --prompt when not resumable.
- Align pending_steer path with CLI output/novel/meta layout.
- Add stage co-create IPC and multi-turn modal aligned with ainovel-cli:
  pause writing first, chat for direction, finish then inject stage plan and resume.
- Harden cocreate response parsing: strip protocol tags, drop meta-thinking,
  merge briefs instead of overwriting, keep previous draft on bad model output.
- Fix command palette Enter to run highlighted command; /cocreate opens modal.
- Fix sidebar active state so export action is not always highlighted.
- Add chapter body copy button; enlarge co-create modal layout.
- Wait for CLI process health before reporting start/resume success; surface real errors
- Sanitize provider roles for CLI contract; merge model config saves without wiping fields
- Write run.json only under output/novel/meta; apply active provider to managed books
- Co-create/input/resume flows no longer mask failures with silent fallback starts
- Book list: open folder, import copies into managed books dir, delete removes folders and orphans
- Model switch modal shows custom providers and syncs active book; role assignment persists valid roles only
@xingleiwu xingleiwu changed the title fix(gui): headless 启动/恢复、阶段共创与侧栏/章节体验修复 fix(gui): reliable engine start, model switch, book folder lifecycle Jul 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