on main help sign in
refactor(bash): make whitespace conform to spec

and make leading attribution reference conditional

commitef1990a520259dfde9a83e39a861368156d51adb authorAmolith <amolith@secluded.site> dateTue 4 Nov 2025, 15:05 (1 year ago) parent7b47c6c
1 file changed+10−6
internal/agent/tools/bash.tpl+10−6
internal/agent/tools/bash.tpl+10−6
@@ -60,17 +60,21 @@ When user asks to create git commit:
6060 - Use clear language, accurate reflection ("add"=new feature, "update"=enhancement, "fix"=bug fix)
6161 - Avoid generic messages, review draft
6262
63−4. Create commit with Crush signature using HEREDOC:
63+4. Create commit{{ if or (eq .Attribution.TrailerStyle "assisted-by") (eq .Attribution.TrailerStyle "co-authored-by")}} with attribution{{ end }} using HEREDOC:
6464 git commit -m "$(cat <<'EOF'
6565 Commit message here.
66−{{ if .Attribution.GeneratedWith}}
66+
67+{{- if .Attribution.GeneratedWith}}
6768 💘 Generated with Crush
68−{{ end }}
69−{{ if eq .Attribution.TrailerStyle "assisted-by"}}
69+{{- end}}
70+{{- if eq .Attribution.TrailerStyle "assisted-by"}}
71+
7072 Assisted-by: {{ .ModelName }} via Crush
71−{{ else if eq .Attribution.TrailerStyle "co-authored-by"}}
73+{{- else if eq .Attribution.TrailerStyle "co-authored-by"}}
74+
7275 Co-Authored-By: Crush <crush@charm.land>
73−{{ end }}
76+{{- end}}
77+
7478 EOF
7579 )"
7680