Type B' 추가: 03번 MDX용 레이아웃 (표 렌더링 + 불릿 전용 하단)
- block_assembler: _assemble_slide_html_type_b_prime 추가
- 하단 좌: normalized.tables를 표로 렌더링 (셀 중복 불릿 제거)
- 하단 우: 불릿만 (table_summaries 미사용)
- pipeline: layout_template 체크를 in ("B", "B'")로 확장
- 결과: 03번 표가 표로 렌더링됨, 하단 우에 잘못된 표 제거
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -332,7 +332,7 @@ async def generate_slide(
|
||||
)
|
||||
|
||||
# Phase X-B: 유형에 따라 컨테이너 생성 분기
|
||||
if context.analysis.layout_template == "B":
|
||||
if context.analysis.layout_template in ("B", "B'"):
|
||||
from src.space_allocator import build_containers_type_b
|
||||
container_specs = build_containers_type_b(
|
||||
page_structure=context.page_structure.roles,
|
||||
@@ -578,7 +578,7 @@ async def generate_slide(
|
||||
|
||||
# Type B: zone 간 재배분 (top↔bottom)
|
||||
# redistribute는 같은 zone 내에서만 동작하므로, Type B는 zone 간 여유를 수동 이전
|
||||
if context.analysis.layout_template == "B":
|
||||
if context.analysis.layout_template in ("B", "B'"):
|
||||
deficit_roles = [(r, rf.shortfall_px) for r, rf in fit_analysis.roles.items() if rf.shortfall_px > 0]
|
||||
surplus_roles = [(r, abs(rf.shortfall_px)) for r, rf in fit_analysis.roles.items() if rf.shortfall_px < -8]
|
||||
if deficit_roles and surplus_roles:
|
||||
@@ -808,7 +808,7 @@ async def generate_slide(
|
||||
# X'-6: 본문 표 요약 (유형 B — normalized.tables가 있으면)
|
||||
table_summaries = {}
|
||||
norm_tables = context.normalized.tables or []
|
||||
if norm_tables and context.analysis.layout_template == "B":
|
||||
if norm_tables and context.analysis.layout_template in ("B", "B'"):
|
||||
from src.kei_client import call_kei_summarize_popup
|
||||
for ti, table_data in enumerate(norm_tables):
|
||||
headers = table_data.get("headers", [])
|
||||
@@ -925,7 +925,7 @@ async def generate_slide(
|
||||
|
||||
async def stage_2(context: PipelineContext) -> dict:
|
||||
# Phase X-BX': Type B는 code_assembled 직접 사용, Sonnet 재구성 스킵
|
||||
if context.analysis.layout_template == "B":
|
||||
if context.analysis.layout_template in ("B", "B'"):
|
||||
from src.block_assembler import assemble_slide_html
|
||||
generated = assemble_slide_html(context)
|
||||
logger.info("[Stage 2] Type B: code_assembled 직접 사용 (Sonnet 스킵)")
|
||||
@@ -994,7 +994,7 @@ async def generate_slide(
|
||||
|
||||
async def stage_3(context: PipelineContext) -> dict:
|
||||
# Phase X-BX': Type B는 Stage 2에서 이미 완전한 HTML → renderer 스킵
|
||||
if context.analysis.layout_template == "B":
|
||||
if context.analysis.layout_template in ("B", "B'"):
|
||||
logger.info("[Stage 3] Type B: renderer 스킵 (generated_html 직접 사용)")
|
||||
return {"rendered_html": context.generated_html}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user