Skip to content

prompt_library

git_prompts

compose_git_prompt(*language_sections)

Combine the git base prompt with language-specific sections.

Each language_section is appended as a paragraph after the base prompt.

Source code in src/ursa/prompt_library/git_prompts.py
18
19
20
21
22
23
24
25
26
27
28
29
def compose_git_prompt(*language_sections: str) -> str:
    """Combine the git base prompt with language-specific sections.

    Each language_section is appended as a paragraph after the base prompt.
    """
    parts = [git_base_prompt.strip()]
    parts.extend(
        section.strip()
        for section in language_sections
        if section and section.strip()
    )
    return "\n\n".join(parts)