fix: resolve CI build failures
Some checks failed
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
2026-01-31 04:00:17 +00:00
parent 72706232ae
commit 2fa5d14369

View File

@@ -0,0 +1,30 @@
CONVENTIONAL_PROMPT = """Generate a conventional commit message for these changes.
Format: <type>(<scope>): <description>
Types: feat, fix, docs, style, refactor, test, chore
Changes:
{diff}
Recent commits for context:
{history}
Respond with only the commit message."""
DEFAULT_PROMPT = """Generate a concise commit message for these changes.
Changes:
{diff}
Recent commits for context:
{history}
Respond with only the commit message."""
def build_prompt(diff, conventional=False, history=None):
"""Build prompt for commit message generation."""
diff_text = "\n".join(diff) if isinstance(diff, list) else str(diff)
history_text = "\n".join(history) if history else "No previous commits"
template = CONVENTIONAL_PROMPT if conventional else DEFAULT_PROMPT
return template.format(diff=diff_text, history=history_text)