Skip to content

Commit 8ecf012

Browse files
committed
Increase commit message length limit to 120 for better summary clarity
1 parent ea0d57a commit 8ecf012

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
@@ -4,7 +4,7 @@ source ~/.bash_profile
44
# Configuration
55
MAX_DIFF_CHARS=300 # ~75 input tokens — halves prefill vs 600
66
TIMEOUT_SECONDS=120 # covers cold model.load_weights() (~90s) + inference
7-
MAX_COMMIT_LENGTH=72 # Standard git commit length
7+
MAX_COMMIT_LENGTH=120 # Increased — fits two-clause summaries without truncation
88

99
# Squish model selection.
1010
# qwen3:8b INT4 (~4.5 GB) — best quality on M3 16GB, ~22 tok/s generate.
@@ -245,7 +245,7 @@ if [ -n "$SQUISH_BIN" ]; then
245245
# /no_think disables Qwen3 chain-of-thought so the model replies directly.
246246
_sys="Write a git commit message. Imperative mood, under 72 chars, no punctuation. Reply with ONLY the message."
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":100,"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":150,"temperature":0.2,"stream":false,"stop":["\n","\r"]}'
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)