MCPcopy Create free account
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 for fpath, names in by_file.items():
394 if fpath:
395 lines.append(f"{' ' * (indent + 1)} {fpath}: {', '.join(names)}")
396 else:
397 lines.append(f"{' ' * (indent + 1)} {', '.join(names)}")
398
399 if (
400 ("children" in value)
401 and isinstance(value["children"], dict)
402 and len(value["children"]) > 0
403 ):
404 lines.append(f"{' ' * (indent + 1)} Children:")
405 _walk(value["children"], indent + 2)
406
407 _walk(module_tree, 0)
408 return "\n".join(lines)
409
410
411def _fence_language(path: str) -> str:
412 """Markdown fence language for ``path`` (falls back to ``text``)."""
413 base = path.replace("\\", "/").rsplit("/", 1)[-1]

Callers 3

run_module_agentMethod · 0.90
_resolve_promptFunction · 0.90

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected