@@ -14,6 +14,7 @@ def _export_prompt_txt(args, output_dir: Path, formats: list[str], source_path:
1414 lines = _build_prompt_header (project_path )
1515 lines .extend (_build_main_files_section (output_dir , output_rel_path ))
1616 lines .extend (_build_optional_files_section (output_dir , output_rel_path ))
17+ lines .extend (_build_source_files_section (source_path ))
1718
1819 missing = _get_missing_files (output_dir )
1920 if missing :
@@ -41,6 +42,7 @@ def _export_chunked_prompt_txt(args, output_dir: Path, formats: list[str], sourc
4142 lines = _build_prompt_header (project_path )
4243 lines .extend (_build_main_files_section (output_dir , output_rel_path ))
4344 lines .extend (_build_optional_files_section (output_dir , output_rel_path ))
45+ lines .extend (_build_source_files_section (source_path ))
4446
4547 if subprojects :
4648 lines .extend (_build_subprojects_section (subprojects , output_dir , output_rel_path ))
@@ -94,6 +96,11 @@ def _get_prompt_paths(source_path: Optional[Path], output_dir: Path) -> Tuple[st
9496]
9597
9698
99+ _SOURCE_FILES = [
100+ ('code2llm/cli_exports/orchestrator.py' , 'Export orchestration - coordinates single-project and chunked export flows, including prompt generation' ),
101+ ]
102+
103+
97104def _build_prompt_header (project_path : str ) -> List [str ]:
98105 """Build header section of prompt."""
99106 return [
@@ -145,6 +152,27 @@ def _build_optional_files_section(output_dir: Path, output_rel_path: str) -> Lis
145152 return ["" , "Optional files:" , "" ] + lines
146153
147154
155+ def _build_source_files_section (source_path : Optional [Path ]) -> List [str ]:
156+ """Build source files section with size metrics."""
157+ if source_path is None :
158+ return []
159+
160+ source_root = source_path if source_path .is_dir () else source_path .parent
161+ lines = []
162+ for rel_path , desc in _SOURCE_FILES :
163+ file_path = source_root / rel_path
164+ if not file_path .exists ():
165+ continue
166+
167+ size_str = _format_size (file_path .stat ().st_size )
168+ lines .append (f"- { rel_path } ({ desc } ) [{ size_str } ]" )
169+
170+ if not lines :
171+ return []
172+
173+ return ["" , "Source files:" , "" ] + lines
174+
175+
148176def _format_size (size_bytes : int ) -> str :
149177 """Format file size in human readable format."""
150178 if size_bytes < 1024 :
0 commit comments