Add source preview to AI structure package
This commit is contained in:
@@ -1731,6 +1731,7 @@ def test_ai_structure_prepare_writes_ai_ready_package(tmp_path: Path):
|
||||
assert (output / "normalized_project.json").exists()
|
||||
assert (output / "sir_snapshot.json").exists()
|
||||
assert (output / "project_layout.json").exists()
|
||||
assert (output / "source_preview.json").exists()
|
||||
assert (output / "compact_objects.json").exists()
|
||||
assert (output / "compact_modules.json").exists()
|
||||
assert (codex_package / "AGENTS.md").exists()
|
||||
@@ -1740,6 +1741,7 @@ def test_ai_structure_prepare_writes_ai_ready_package(tmp_path: Path):
|
||||
assert (codex_package / "context" / "project-overview.md").exists()
|
||||
assert (codex_package / "indexes" / "codex-navigation.json").exists()
|
||||
assert (codex_package / "indexes" / "project-layout.json").exists()
|
||||
assert (codex_package / "indexes" / "source-preview.json").exists()
|
||||
assert (codex_package / "indexes" / "objects-compact.json").exists()
|
||||
assert (codex_package / "indexes" / "modules-compact.json").exists()
|
||||
assert (codex_package / "indexes" / "objects.json").exists()
|
||||
@@ -1842,6 +1844,7 @@ def test_ai_structure_prepare_understands_configuration_and_extension_folders(tm
|
||||
assert payload["status"] == "ready"
|
||||
assert payload["source_layout"]["main_configuration_root"] == "Конфигурация"
|
||||
assert payload["source_layout"]["extension_roots"] == ["CRM"]
|
||||
assert any(item["label"] == "Папки расширений" for item in payload["source_preview"])
|
||||
assert payload["normalized"]["extensions"] == 1
|
||||
codex_package = output / payload["codex_package_folder"]
|
||||
layout = json.loads((codex_package / "indexes" / "project-layout.json").read_text(encoding="utf-8"))
|
||||
|
||||
Reference in New Issue
Block a user