Debug state extraction
This commit is contained in:
@@ -496,10 +496,14 @@ Write ~{plan.word_count_target} words. Begin with chapter title.
|
|||||||
result_state = initial_state
|
result_state = initial_state
|
||||||
for node_output in self.graph.stream(initial_state, config):
|
for node_output in self.graph.stream(initial_state, config):
|
||||||
# node_output is {node_name: state}
|
# node_output is {node_name: state}
|
||||||
|
# Last node should be 'complete' with full state
|
||||||
for key, state in node_output.items():
|
for key, state in node_output.items():
|
||||||
if hasattr(state, 'stage'): # It's an OpusGraphState
|
if hasattr(state, 'stage'):
|
||||||
result_state = state
|
result_state = state
|
||||||
|
|
||||||
|
# Debug: print what we got
|
||||||
|
print(f"\n[DEBUG] Final state - chapters: {len(result_state.chapters)}, words: {result_state.total_word_count}")
|
||||||
|
|
||||||
return result_state
|
return result_state
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user