Skip to content

Commit ea0d57a

Browse files
committed
Update script to handle squish payload correctly and include diff in
1 parent 710e400 commit ea0d57a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

git-commit-push-script.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,10 @@ if [ -n "$SQUISH_BIN" ]; then
242242
' | head -c "$MAX_DIFF_CHARS")
243243

244244
# Build JSON payload in pure bash — _json_str escapes all special chars
245+
# /no_think disables Qwen3 chain-of-thought so the model replies directly.
245246
_sys="Write a git commit message. Imperative mood, under 72 chars, no punctuation. Reply with ONLY the message."
246-
_usr="Files: ${changed_names}\nStat: ${stat_summary}\nDiff:\n${stripped_diff}"
247-
PAYLOAD='{"model":"squish","messages":[{"role":"system","content":"'"$(_json_str "$_sys")"'"},{"role":"user","content":"'"$(_json_str "$_usr")"'"}],"max_tokens":20,"temperature":0.2,"stream":false,"stop":["\n","\r"]}'
247+
_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"]}'
248249

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

0 commit comments

Comments
 (0)