refactor(bash): make whitespace conform to spec

Amolith created

and make leading attribution reference conditional

Change summary

internal/agent/tools/bash.tpl | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)

Detailed changes

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 <crush@charm.land>
-{{ end }}
+{{- end}}
+
    EOF
    )"