Strengthened writing.
This commit is contained in:
@@ -350,9 +350,10 @@ def rewrite_chapter_task(run_id, project_path, book_folder, chap_num, instructio
|
||||
|
||||
ai.init_models()
|
||||
|
||||
new_text = story.rewrite_chapter_content(bp, ms, chap_num, instruction, book_path)
|
||||
result = story.rewrite_chapter_content(bp, ms, chap_num, instruction, book_path)
|
||||
|
||||
if new_text:
|
||||
if result and result[0]:
|
||||
new_text, summary = result
|
||||
for ch in ms:
|
||||
if ch.get('num') == chap_num:
|
||||
ch['content'] = new_text
|
||||
@@ -361,7 +362,7 @@ def rewrite_chapter_task(run_id, project_path, book_folder, chap_num, instructio
|
||||
# Save the primary rewrite immediately
|
||||
with open(ms_path, 'w') as f: json.dump(ms, f, indent=2)
|
||||
|
||||
updated_ms = story.check_and_propagate(bp, ms, chap_num, book_path)
|
||||
updated_ms = story.check_and_propagate(bp, ms, chap_num, book_path, change_summary=summary)
|
||||
if updated_ms:
|
||||
ms = updated_ms
|
||||
|
||||
|
||||
Reference in New Issue
Block a user