Handles processing of a single section and its subsections (leaf sections). Returns updated logs and token counters for this section.
(
section_name,
content,
outline,
sections,
style_logs,
critic_logs,
actor_logs,
img_logs,
slide_width,
slide_height,
name_to_hierarchy,
critic_template,
actor_template,
critic_agent,
actor_agent,
neg_img,
pos_img,
MAX_ATTEMPTS,
documentation,
total_input_token,
total_output_token,
)
| 159 | |
| 160 | |
| 161 | def process_section( |
| 162 | section_name, |
| 163 | content, |
| 164 | outline, |
| 165 | sections, |
| 166 | style_logs, |
| 167 | critic_logs, |
| 168 | actor_logs, |
| 169 | img_logs, |
| 170 | slide_width, |
| 171 | slide_height, |
| 172 | name_to_hierarchy, |
| 173 | critic_template, |
| 174 | actor_template, |
| 175 | critic_agent, |
| 176 | actor_agent, |
| 177 | neg_img, |
| 178 | pos_img, |
| 179 | MAX_ATTEMPTS, |
| 180 | documentation, |
| 181 | total_input_token, |
| 182 | total_output_token, |
| 183 | ): |
| 184 | """ |
| 185 | Handles processing of a single section and its subsections (leaf sections). |
| 186 | Returns updated logs and token counters for this section. |
| 187 | """ |
| 188 | results_per_leaf = [] |
| 189 | |
| 190 | # Grab the current code for this section |
| 191 | section_code = style_logs[section_name][-1]['code'] |
| 192 | |
| 193 | # Determine which leaf sections to process |
| 194 | if 'subsections' in content[section_name]: |
| 195 | subsections = list(content[section_name]['subsections'].keys()) |
| 196 | else: |
| 197 | subsections = [section_name] |
| 198 | |
| 199 | all_logs_for_section = [] |
| 200 | |
| 201 | for leaf_section in subsections: |
| 202 | # Process this leaf section |
| 203 | leaf_result = process_leaf_section( |
| 204 | leaf_section, |
| 205 | section_name, |
| 206 | outline, |
| 207 | content, |
| 208 | style_logs, |
| 209 | critic_logs, |
| 210 | actor_logs, |
| 211 | img_logs, |
| 212 | slide_width, |
| 213 | slide_height, |
| 214 | name_to_hierarchy, |
| 215 | critic_template, |
| 216 | actor_template, |
| 217 | critic_agent, |
| 218 | actor_agent, |
nothing calls this directly
no test coverage detected