Private
Public Access
cleaning cruft part 2
This commit is contained in:
+3
-15
@@ -301,10 +301,7 @@ def build_file_items(base_dir: Path, files: list[str | Metadata]) -> list[Metada
|
||||
return items
|
||||
|
||||
def _build_files_section_from_items(file_items: list[Metadata]) -> str:
|
||||
"""
|
||||
Build the files markdown section from pre-read file items (avoids double I/O).
|
||||
[C: tests/test_aggregate_flags.py:test_auto_aggregate_skip, tests/test_context_composition_phase6.py:test_files_section_rendering, tests/test_tiered_context.py:test_build_files_section_with_dicts, tests/test_ui_summary_only_removal.py:test_aggregate_from_items_respects_auto_aggregate]
|
||||
"""
|
||||
"""Build the files markdown section from pre-read file items (avoids double I/O)."""
|
||||
sections = []
|
||||
file_items = file_items or []
|
||||
for item in file_items:
|
||||
@@ -330,9 +327,6 @@ def _build_files_section_from_items(file_items: list[Metadata]) -> str:
|
||||
return "\n\n---\n\n".join(sections)
|
||||
|
||||
def build_beads_section(base_dir: Path) -> str:
|
||||
"""
|
||||
[C: tests/test_aggregate_beads.py:test_build_beads_compaction]
|
||||
"""
|
||||
client = beads_client.BeadsClient(base_dir)
|
||||
if not client.is_initialized(): return ""
|
||||
beads = client.list_beads()
|
||||
@@ -369,17 +363,11 @@ def build_markdown_from_items(file_items: list[Metadata], screenshot_base_dir: P
|
||||
return "\n\n---\n\n".join(parts)
|
||||
|
||||
def build_markdown_no_history(file_items: list[Metadata], screenshot_base_dir: Path, screenshots: list[str], summary_only: bool = False, aggregation_strategy: str = "auto") -> str:
|
||||
"""
|
||||
Build markdown with only files + screenshots (no history). Used for stable caching.
|
||||
[C: src/app_controller.py:AppController._do_generate, tests/test_history_management.py:test_aggregate_blacklist]
|
||||
"""
|
||||
"""Build markdown with only files + screenshots (no history). Used for stable caching."""
|
||||
return build_markdown_from_items(file_items, screenshot_base_dir, screenshots, history=[], summary_only=summary_only, aggregation_strategy=aggregation_strategy)
|
||||
|
||||
def build_discussion_text(history: list[str]) -> str:
|
||||
"""
|
||||
Build just the discussion history section text. Returns empty string if no history.
|
||||
[C: src/app_controller.py:AppController._do_generate, tests/test_history_management.py:test_aggregate_includes_segregated_history]
|
||||
"""
|
||||
"""Build just the discussion history section text. Returns empty string if no history."""
|
||||
if not history:
|
||||
return ""
|
||||
return "## Discussion History\n\n" + build_discussion_section(history)
|
||||
|
||||
Reference in New Issue
Block a user