From ef1990a520259dfde9a83e39a861368156d51adb Mon Sep 17 00:00:00 2001 From: Amolith Date: Tue, 4 Nov 2025 15:05:26 -0700 Subject: [PATCH] refactor(bash): make whitespace conform to spec and make leading attribution reference conditional --- internal/agent/tools/bash.tpl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/internal/agent/tools/bash.tpl b/internal/agent/tools/bash.tpl index 247a0a113fe0306dd63bec7bf82b610721d59fd6..222facc989d3e62f25a037dc36686e30ec82e90f 100644 --- a/internal/agent/tools/bash.tpl +++ b/internal/agent/tools/bash.tpl @@ -60,17 +60,21 @@ When user asks to create git commit: - Use clear language, accurate reflection ("add"=new feature, "update"=enhancement, "fix"=bug fix) - Avoid generic messages, review draft -4. Create commit with Crush signature using HEREDOC: +4. Create commit{{ if or (eq .Attribution.TrailerStyle "assisted-by") (eq .Attribution.TrailerStyle "co-authored-by")}} with attribution{{ end }} using HEREDOC: git commit -m "$(cat <<'EOF' Commit message here. -{{ if .Attribution.GeneratedWith}} + +{{- if .Attribution.GeneratedWith}} 💘 Generated with Crush -{{ end }} -{{ if eq .Attribution.TrailerStyle "assisted-by"}} +{{- end}} +{{- if eq .Attribution.TrailerStyle "assisted-by"}} + Assisted-by: {{ .ModelName }} via Crush -{{ else if eq .Attribution.TrailerStyle "co-authored-by"}} +{{- else if eq .Attribution.TrailerStyle "co-authored-by"}} + Co-Authored-By: Crush -{{ end }} +{{- end}} + EOF )"