Phase X-B 진행중: 유형 B 조립 + 텍스트 보존 강화 + 원본 MDX 복구
X-B-3~5 완료: - space_allocator: build_containers_type_b() 추가 - assemble_stage2: _assemble_type_b() 추가 (소제목 카드형) - pipeline.py: layout_template 분기 (A/B) - pipeline_context: Analysis.layout_template 필드 - validators: 유형 B 검증 완화 텍스트 보존 강화: - KEI_PROMPT: 제목 원본 그대로, 텍스트 재작성 금지 - KEI_STRUCTURED_TEXT_PROMPT: 소제목 유지, 원본 문장 그대로 원본 MDX 복구: - samples/mdx_batch/02.mdx: 표 데이터 누락 수정 (원본에서 재복사) 미해결 (다음 세션): - 들여쓰기: 대제목→중제목→소제목→본문 계층 구조 - 이미지 캡션: [그림 제목] 형식 (대괄호 포함) - 상단 컨테이너: 빈칸 위로 붙이기 - 카드 디자인: 안전과품질/생산성향상/소통과신뢰 디자인 개선 - 제목: Kei가 원본 제목 바꾸는 문제 잔존 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -176,6 +176,7 @@ async def generate_slide(
|
||||
core_message=analysis_raw.get("core_message", ""),
|
||||
title=analysis_raw.get("title", ""),
|
||||
total_pages=analysis_raw.get("total_pages", 1),
|
||||
layout_template=analysis_raw.get("layout_template", "A"),
|
||||
)
|
||||
|
||||
# I-6: 슬라이드 제목 ↔ 첫 꼭지 제목 중복 검증
|
||||
@@ -248,6 +249,7 @@ async def generate_slide(
|
||||
[t.model_dump() for t in updated_topics],
|
||||
context.normalized.clean_text,
|
||||
raw_content=context.raw_content,
|
||||
layout_template=context.analysis.layout_template,
|
||||
)
|
||||
if validation_errors:
|
||||
return {"_errors": validation_errors}
|
||||
@@ -327,14 +329,27 @@ async def generate_slide(
|
||||
f"비율: body:sidebar={container_ratio[0]}:{container_ratio[1]}"
|
||||
)
|
||||
|
||||
# 컨테이너 스펙 계산 (기존 space_allocator 활용)
|
||||
container_specs = calculate_container_specs(
|
||||
page_structure=context.page_structure.roles,
|
||||
topics=[t.model_dump() for t in context.topics],
|
||||
preset=preset,
|
||||
slide_width=settings.slide_width,
|
||||
slide_height=settings.slide_height,
|
||||
)
|
||||
# Phase X-B: 유형에 따라 컨테이너 생성 분기
|
||||
if context.analysis.layout_template == "B":
|
||||
from src.space_allocator import build_containers_type_b
|
||||
container_specs = build_containers_type_b(
|
||||
page_structure=context.page_structure.roles,
|
||||
slide_width=settings.slide_width,
|
||||
slide_height=settings.slide_height,
|
||||
image_sizes=image_sizes if isinstance(image_sizes, list) else (
|
||||
[{**v, "key": k} for k, v in image_sizes.items()] if image_sizes else None
|
||||
),
|
||||
)
|
||||
logger.info(f"[X-B] 유형 B 컨테이너 생성")
|
||||
else:
|
||||
# 유형 A: 기존 코드 그대로
|
||||
container_specs = calculate_container_specs(
|
||||
page_structure=context.page_structure.roles,
|
||||
topics=[t.model_dump() for t in context.topics],
|
||||
preset=preset,
|
||||
slide_width=settings.slide_width,
|
||||
slide_height=settings.slide_height,
|
||||
)
|
||||
|
||||
# ContainerSpec → ContainerInfo 변환
|
||||
containers = {}
|
||||
|
||||
Reference in New Issue
Block a user