feat: add ask user question

This commit is contained in:
voocel
2026-03-09 19:52:43 +08:00
parent 75bdda1fe3
commit ef55c89e9d
13 changed files with 868 additions and 83 deletions

View File

@@ -34,6 +34,19 @@ func (s *Store) InitProgress(novelName string, totalChapters int) error {
})
}
// SetTotalChapters 根据大纲长度设定总章节数。
func (s *Store) SetTotalChapters(n int) error {
p, err := s.LoadProgress()
if err != nil {
return err
}
if p == nil {
p = &domain.Progress{}
}
p.TotalChapters = n
return s.SaveProgress(p)
}
// UpdatePhase 更新创作阶段。
func (s *Store) UpdatePhase(phase domain.Phase) error {
p, err := s.LoadProgress()