gac 1.13.0__py3-none-any.whl → 1.13.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gac might be problematic. Click here for more details.

gac/__version__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Version information for gac package."""
2
2
 
3
- __version__ = "1.13.0"
3
+ __version__ = "1.13.1"
gac/prompt.py CHANGED
@@ -454,6 +454,39 @@ def clean_commit_message(message: str) -> str:
454
454
  """
455
455
  message = message.strip()
456
456
 
457
+ # Remove <think> tags and their content (some providers like MiniMax include reasoning)
458
+ # Only remove multi-line reasoning blocks, never single-line content that might be descriptions
459
+ # Strategy: Remove blocks that clearly contain internal newlines (multi-line reasoning)
460
+
461
+ # Step 1: Remove multi-line <think>...</think> blocks (those with newlines inside)
462
+ # Pattern: <think> followed by content that includes newlines, ending with </think>
463
+ # This safely distinguishes reasoning from inline mentions like "handle <think> tags"
464
+ # Use negative lookahead to prevent matching across multiple blocks
465
+ while re.search(r"<think>(?:(?!</think>)[^\n])*\n.*?</think>", message, flags=re.DOTALL | re.IGNORECASE):
466
+ message = re.sub(
467
+ r"<think>(?:(?!</think>)[^\n])*\n.*?</think>\s*", "", message, flags=re.DOTALL | re.IGNORECASE, count=1
468
+ )
469
+
470
+ # Step 2: Remove blocks separated by blank lines (before or after the message)
471
+ message = re.sub(r"\n\n+\s*<think>.*?</think>\s*", "", message, flags=re.DOTALL | re.IGNORECASE)
472
+ message = re.sub(r"<think>.*?</think>\s*\n\n+", "", message, flags=re.DOTALL | re.IGNORECASE)
473
+
474
+ # Step 3: Handle orphaned opening <think> tags followed by newline
475
+ message = re.sub(r"<think>\s*\n.*$", "", message, flags=re.DOTALL | re.IGNORECASE)
476
+
477
+ # Step 4: Handle orphaned closing </think> tags at the start (before any conventional prefix)
478
+ conventional_prefixes_pattern = r"(feat|fix|docs|style|refactor|perf|test|build|ci|chore)[\(:)]"
479
+ if re.search(r"^.*?</think>", message, flags=re.DOTALL | re.IGNORECASE):
480
+ prefix_match = re.search(conventional_prefixes_pattern, message, flags=re.IGNORECASE)
481
+ think_match = re.search(r"</think>", message, flags=re.IGNORECASE)
482
+
483
+ if not prefix_match or (think_match and think_match.start() < prefix_match.start()):
484
+ # No prefix or </think> comes before prefix - remove everything up to and including it
485
+ message = re.sub(r"^.*?</think>\s*", "", message, flags=re.DOTALL | re.IGNORECASE)
486
+
487
+ # Step 5: Remove orphaned closing </think> tags at the end (not part of inline mentions)
488
+ message = re.sub(r"</think>\s*$", "", message, flags=re.IGNORECASE)
489
+
457
490
  # Remove any markdown code blocks
458
491
  message = re.sub(r"```[\w]*\n|```", "", message)
459
492
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gac
3
- Version: 1.13.0
3
+ Version: 1.13.1
4
4
  Summary: LLM-powered Git commit message generator with multi-provider support
5
5
  Project-URL: Homepage, https://github.com/cellwebb/gac
6
6
  Project-URL: Documentation, https://github.com/cellwebb/gac#readme
@@ -94,7 +94,7 @@ gac
94
94
  - **Anthropic** • **Cerebras** • **Chutes.ai** • **DeepSeek** • **Fireworks**
95
95
  - **Gemini** • **Groq** • **LM Studio** • **MiniMax** • **Ollama** • **OpenAI**
96
96
  - **OpenRouter** • **Streamlake** • **Synthetic.new** • **Together AI**
97
- - **Z.AI** • **Z.AI Coding** • **Custom Endpoint (Anthropic/OpenAI)**
97
+ - **Z.AI** • **Z.AI Coding** • **Custom Endpoints (Anthropic/OpenAI)**
98
98
 
99
99
  ### 🧠 **Smart LLM Analysis**
100
100
 
@@ -1,5 +1,5 @@
1
1
  gac/__init__.py,sha256=z9yGInqtycFIT3g1ca24r-A3699hKVaRqGUI79wsmMc,415
2
- gac/__version__.py,sha256=oFvFxf8Y4B3yJ6IccvXPcWK4lxUIK8Dr3Vc_FOg4a8E,67
2
+ gac/__version__.py,sha256=A8B58TFddAWnFeWicw2ARWohW-Mxq5pytP5yNFLSuKM,67
3
3
  gac/ai.py,sha256=fg642la4yMecOwfZHQ7Ixl6z-5_qj9Q1SxwVMnPDCcY,4244
4
4
  gac/ai_utils.py,sha256=EDkw0nnwnV5Ba2CLEo2HC15-L5BZtGJATin5Az0ZHkg,7426
5
5
  gac/cli.py,sha256=crUUI6osYtE3QAZ7r6DRlVk9gR3X2PctzS1sssVQ9_g,5070
@@ -12,7 +12,7 @@ gac/git.py,sha256=g6tvph50zV-wrTWrxARYXEpl0NeI8-ffFwHoqhp3fSE,8033
12
12
  gac/init_cli.py,sha256=JsHMZBFt_2aFMATlbL_ugSZGQGJf8VRosFjNIRGNM8U,6573
13
13
  gac/main.py,sha256=dJrBSN5rJlbWspLGDx3eUJU4uZFVhvuv7qtgIvF7RH4,14723
14
14
  gac/preprocess.py,sha256=aMxsjGxy9YP752NWjgf0KP5Sn6p8keIJAGlMYr8jDgQ,15373
15
- gac/prompt.py,sha256=d_kBXmhf3bDVLyDj8J7AS7GBAxF2jlc8lXoHX3Dzi5k,24255
15
+ gac/prompt.py,sha256=zJ85IRskEqYZa3x7lmh2LImJgAHSmeKducaNjWXN5DA,26482
16
16
  gac/security.py,sha256=15Yp6YR8QC4eECJi1BUCkMteh_veZXUbLL6W8qGcDm4,9920
17
17
  gac/utils.py,sha256=nV42-brIHW_fBg7x855GM8nRrqEBbRzTSweg-GTyGE8,3971
18
18
  gac/providers/__init__.py,sha256=3WTzh3ngAdvR40eezpMMFD7Zibb-LxexDYUcSm4axQI,1305
@@ -34,8 +34,8 @@ gac/providers/streamlake.py,sha256=KAA2ZnpuEI5imzvdWVWUhEBHSP0BMnprKXte6CbwBWY,2
34
34
  gac/providers/synthetic.py,sha256=sRMIJTS9LpcXd9A7qp_ZjZxdqtTKRn9fl1W4YwJZP4c,1855
35
35
  gac/providers/together.py,sha256=1bUIVHfYzcEDw4hQPE8qV6hjc2JNHPv_khVgpk2IJxI,1667
36
36
  gac/providers/zai.py,sha256=kywhhrCfPBu0rElZyb-iENxQxxpVGykvePuL4xrXlaU,2739
37
- gac-1.13.0.dist-info/METADATA,sha256=pu638LGgkEXsDWzoHnchIkOOne5MjzQ25ILkDtXVOfs,7878
38
- gac-1.13.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
- gac-1.13.0.dist-info/entry_points.txt,sha256=tdjN-XMmcWfL92swuRAjT62bFLOAwk9bTMRLGP5Z4aI,36
40
- gac-1.13.0.dist-info/licenses/LICENSE,sha256=vOab37NouL1PNs5BswnPayrMCqaN2sqLfMQfqPDrpZg,1103
41
- gac-1.13.0.dist-info/RECORD,,
37
+ gac-1.13.1.dist-info/METADATA,sha256=3n8jxhzg53I2lTJINWC1uHNm56w7ux1P3Nv3dbyzT_Q,7879
38
+ gac-1.13.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
+ gac-1.13.1.dist-info/entry_points.txt,sha256=tdjN-XMmcWfL92swuRAjT62bFLOAwk9bTMRLGP5Z4aI,36
40
+ gac-1.13.1.dist-info/licenses/LICENSE,sha256=vOab37NouL1PNs5BswnPayrMCqaN2sqLfMQfqPDrpZg,1103
41
+ gac-1.13.1.dist-info/RECORD,,
File without changes