feat: add real PDF ingestion workflow

This commit is contained in:
Codex
2026-08-02 00:29:40 +08:00
parent 0eb2a86f36
commit 4d97a30616
18 changed files with 986 additions and 93 deletions
+7 -1
View File
@@ -80,7 +80,13 @@ def apply_command(project: ProjectSnapshot, request: CommandRequest) -> ProjectS
updated.failure_reason = None
if request.command == WorkflowCommand.SELECT_REGION:
updated.plan.selected_region_id = request.payload.get("region_id")
region_id = str(request.payload.get("region_id", ""))
if not any(region.id == region_id for region in updated.plan.regions):
raise InvalidTransitionError(f"Region '{region_id}' does not exist in this project.")
updated.plan.selected_region_id = region_id
for issue in updated.plan.issues:
if issue.kind == "region":
issue.resolved = True
elif request.command == WorkflowCommand.CONFIRM_PLAN:
updated.plan.ceiling_height_mm = int(
request.payload.get("ceiling_height_mm", updated.plan.ceiling_height_mm)