MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeWiki / format_system_prompt

Function format_system_prompt

codewiki/src/be/prompt_template.py:377–392  ·  view source on GitHub ↗

Format the system prompt with module name and optional custom instructions. Args: module_name: Name of the module to document custom_instructions: Optional custom instructions to append Returns: Formatted system prompt string

(module_name: str, custom_instructions: str = None)

Source from the content-addressed store, hash-verified

375 ".phtml": "php",
376 ".inc": "php",
377 ".rb": "ruby",
378}
379
380
381def is_flat_layout(layout: str | None) -> bool:
382 return layout == LAYOUT_FLAT
383
384
385def _layout_fields(module_name: str, module_path: list[str] | None, layout: str | None) -> dict:
386 doc_file = module_doc_file(module_name, module_path, layout)
387 if is_flat_layout(layout):
388 return {
389 "doc_file": doc_file,
390 "sub_module_location": "in the working directory under the name of `sub-module_name.md`",
391 "uniqueness_reason": "all docs share one flat directory",
392 }
393 folder = doc_file[: -len(".md")] + "/" if module_path else ""
394 location = (
395 f"by `generate_sub_module_documentation` under `{folder}` as `sub-module_name.md`"

Callers 3

run_module_agentMethod · 0.90
_resolve_promptFunction · 0.90

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected