Skip to content

Commit 16a54e7

Browse files
committed
Write a git commit message Imperative mood, under 72 chars, no punctuation Reply with ONLY the message
1 parent 8ecf012 commit 16a54e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-commit-push-script.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ if [ -n "$SQUISH_BIN" ]; then
243243

244244
# Build JSON payload in pure bash — _json_str escapes all special chars
245245
# /no_think disables Qwen3 chain-of-thought so the model replies directly.
246-
_sys="Write a git commit message. Imperative mood, under 72 chars, no punctuation. Reply with ONLY the message."
246+
_sys="/no_think Write a single-line git commit message. Imperative mood, 50-100 characters, no punctuation at the end. Output the message text only — no quotes, no explanation, no newlines. Do not include git diff syntax like +/-. Focus on the code changes, not the file names. If the diff is empty, generate a generic message about the type of change (e.g. 'Update tests', 'Refactor code', 'Fix bug'). Do not include any content from <think> tags in the final message — those are for internal reasoning only and should be stripped from the output."
247247
_usr="/no_think Files: ${changed_names}\nStat: ${stat_summary}\nDiff:\n${stripped_diff}"
248-
PAYLOAD='{"model":"squish","messages":[{"role":"system","content":"'"$(_json_str "$_sys")"'"},{"role":"user","content":"'"$(_json_str "$_usr")"'"}],"max_tokens":150,"temperature":0.2,"stream":false,"stop":["\n","\r"]}'
248+
PAYLOAD='{"model":"squish","messages":[{"role":"system","content":"'"$(_json_str "$_sys")"'"},{"role":"user","content":"'"$(_json_str "$_usr")"'"}],"max_tokens":100,"temperature":0.2,"stream":false}'
249249

250250
# Run squish — curl in background, spinner inline in foreground (no subprocess)
251251
print_step "Asking AI for commit message (Squish local LLM)..."

0 commit comments

Comments
 (0)