MCPcopy Index your code
hub / github.com/FSoft-AI4Code/CodeWiki / format_leaf_system_prompt

Function format_leaf_system_prompt

codewiki/src/be/prompt_template.py:395–410  ·  view source on GitHub ↗

Format the leaf 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 leaf system prompt string

(module_name: str, custom_instructions: str = None)

Source from the content-addressed store, hash-verified

393
394
395def format_leaf_system_prompt(module_name: str, custom_instructions: str = None) -> str:
396 """
397 Format the leaf system prompt with module name and optional custom instructions.
398
399 Args:
400 module_name: Name of the module to document
401 custom_instructions: Optional custom instructions to append
402
403 Returns:
404 Formatted leaf system prompt string
405 """
406 custom_section = ""
407 if custom_instructions:
408 custom_section = f"\n\n<CUSTOM_INSTRUCTIONS>\n{custom_instructions}\n</CUSTOM_INSTRUCTIONS>"
409
410 return LEAF_SYSTEM_PROMPT.format(module_name=module_name, custom_instructions=custom_section).strip()

Callers 3

run_module_agentMethod · 0.90
_resolve_promptFunction · 0.90

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected