gac 0.15.4__py3-none-any.whl → 0.16.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 +1 -1
- gac/ai.py +1 -4
- gac/config.py +8 -2
- gac/diff_cli.py +5 -1
- gac/init_cli.py +2 -1
- gac/main.py +1 -0
- gac/preprocess.py +6 -1
- {gac-0.15.4.dist-info → gac-0.16.1.dist-info}/METADATA +3 -2
- gac-0.16.1.dist-info/RECORD +20 -0
- gac-0.15.4.dist-info/RECORD +0 -20
- {gac-0.15.4.dist-info → gac-0.16.1.dist-info}/WHEEL +0 -0
- {gac-0.15.4.dist-info → gac-0.16.1.dist-info}/entry_points.txt +0 -0
- {gac-0.15.4.dist-info → gac-0.16.1.dist-info}/licenses/LICENSE +0 -0
gac/__version__.py
CHANGED
gac/ai.py
CHANGED
|
@@ -28,10 +28,7 @@ def count_tokens(content: str | list[dict[str, str]] | dict[str, Any], model: st
|
|
|
28
28
|
if model.startswith("anthropic"):
|
|
29
29
|
import anthropic
|
|
30
30
|
|
|
31
|
-
return anthropic.Client().
|
|
32
|
-
model=model,
|
|
33
|
-
messages=[{"role": "user", "content": text}],
|
|
34
|
-
)
|
|
31
|
+
return anthropic.Client().count_tokens(text)
|
|
35
32
|
|
|
36
33
|
try:
|
|
37
34
|
encoding = get_encoding(model)
|
gac/config.py
CHANGED
|
@@ -12,12 +12,18 @@ from gac.constants import EnvDefaults, Logging
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def load_config() -> dict[str, str | int | float | bool]:
|
|
15
|
-
"""Load configuration from $HOME/.gac.env, then ./.env, then environment variables."""
|
|
15
|
+
"""Load configuration from $HOME/.gac.env, then ./.gac.env or ./.env, then environment variables."""
|
|
16
16
|
user_config = Path.home() / ".gac.env"
|
|
17
17
|
if user_config.exists():
|
|
18
18
|
load_dotenv(user_config)
|
|
19
|
+
|
|
20
|
+
# Check for both .gac.env and .env in project directory
|
|
21
|
+
project_gac_env = Path(".gac.env")
|
|
19
22
|
project_env = Path(".env")
|
|
20
|
-
|
|
23
|
+
|
|
24
|
+
if project_gac_env.exists():
|
|
25
|
+
load_dotenv(project_gac_env, override=True)
|
|
26
|
+
elif project_env.exists():
|
|
21
27
|
load_dotenv(project_env, override=True)
|
|
22
28
|
|
|
23
29
|
config = {
|
gac/diff_cli.py
CHANGED
|
@@ -28,7 +28,11 @@ import click
|
|
|
28
28
|
|
|
29
29
|
from gac.errors import GitError, with_error_handling
|
|
30
30
|
from gac.git import get_diff, get_staged_files
|
|
31
|
-
from gac.preprocess import
|
|
31
|
+
from gac.preprocess import (
|
|
32
|
+
filter_binary_and_minified,
|
|
33
|
+
smart_truncate_diff,
|
|
34
|
+
split_diff_into_sections,
|
|
35
|
+
)
|
|
32
36
|
from gac.utils import print_message, setup_logging
|
|
33
37
|
|
|
34
38
|
|
gac/init_cli.py
CHANGED
|
@@ -21,7 +21,8 @@ def init() -> None:
|
|
|
21
21
|
|
|
22
22
|
providers = [
|
|
23
23
|
("Anthropic", "claude-3-5-haiku-latest"),
|
|
24
|
-
("
|
|
24
|
+
("Cerebras", "qwen-3-coder-480b"),
|
|
25
|
+
("Groq", "meta-llama/llama-4-maverick-17b-128e-instruct"),
|
|
25
26
|
("Ollama", "gemma3"),
|
|
26
27
|
("OpenAI", "gpt-4.1-mini"),
|
|
27
28
|
]
|
gac/main.py
CHANGED
gac/preprocess.py
CHANGED
|
@@ -11,7 +11,12 @@ import os
|
|
|
11
11
|
import re
|
|
12
12
|
|
|
13
13
|
from gac.ai import count_tokens
|
|
14
|
-
from gac.constants import
|
|
14
|
+
from gac.constants import (
|
|
15
|
+
CodePatternImportance,
|
|
16
|
+
FilePatterns,
|
|
17
|
+
FileTypeImportance,
|
|
18
|
+
Utility,
|
|
19
|
+
)
|
|
15
20
|
|
|
16
21
|
logger = logging.getLogger(__name__)
|
|
17
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gac
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.1
|
|
4
4
|
Summary: AI-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
|
|
@@ -23,6 +23,7 @@ Requires-Python: >=3.10
|
|
|
23
23
|
Requires-Dist: aisuite
|
|
24
24
|
Requires-Dist: anthropic
|
|
25
25
|
Requires-Dist: black
|
|
26
|
+
Requires-Dist: cerebras-cloud-sdk
|
|
26
27
|
Requires-Dist: click
|
|
27
28
|
Requires-Dist: docstring-parser
|
|
28
29
|
Requires-Dist: groq
|
|
@@ -61,7 +62,7 @@ Description-Content-Type: text/markdown
|
|
|
61
62
|
|
|
62
63
|
- **AI-Powered Commit Messages:** Automatically generates clear, concise, and context-aware commit messages using large language models.
|
|
63
64
|
- **Deep Contextual Analysis:** Understands your code by analyzing staged changes, repository structure, and recent commit history to provide highly relevant suggestions.
|
|
64
|
-
- **Multi-Provider & Model Support:** Flexibly works with various leading AI providers (like Anthropic, Groq, OpenAI) and models, easily configured through an interactive setup or environment variables.
|
|
65
|
+
- **Multi-Provider & Model Support:** Flexibly works with various leading AI providers (like Anthropic, Cerebras, Groq, OpenAI) and models, easily configured through an interactive setup or environment variables.
|
|
65
66
|
- **Seamless Git Workflow:** Integrates smoothly into your existing Git routine as a simple drop-in replacement for `git commit`.
|
|
66
67
|
- **Extensive Customization:** Tailor commit messages to your needs with a rich set of flags, including one-liners (`-o`), AI hints (`-h`), commit scope (`-s`), and specific model selection (`-m`).
|
|
67
68
|
- **Streamlined Workflow Commands:** Boost your productivity with convenient options to stage all changes (`-a`), auto-confirm commits (`-y`), and push to your remote repository (`-p`) in a single step.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
gac/__init__.py,sha256=z9yGInqtycFIT3g1ca24r-A3699hKVaRqGUI79wsmMc,415
|
|
2
|
+
gac/__version__.py,sha256=Nn6L3pp556ky75qbTLQD6rcOsZBm0606HEo_QVleOxQ,67
|
|
3
|
+
gac/ai.py,sha256=kxZ0UMU_2i9Vb2fXKAUcuFCeZJAZ9G8OSjgTVF06h-Y,5452
|
|
4
|
+
gac/cli.py,sha256=UCGaKpGrm8B603V04yMYGkfv9S5-CksSy7zzeqwp13s,4280
|
|
5
|
+
gac/config.py,sha256=7gyD4dDZhb_xL0gjOxfA3cqmz-5LwaMUT3MCTAPBjug,1330
|
|
6
|
+
gac/config_cli.py,sha256=v9nFHZO1RvK9fzHyuUS6SG-BCLHMsdOMDwWamBhVVh4,1608
|
|
7
|
+
gac/constants.py,sha256=gcygNGl4I48vYtuhpdCFKnYRjhxcRWMQYCerxPq0wCY,4731
|
|
8
|
+
gac/diff_cli.py,sha256=wnVQ9OFGnM0d2Pj9WVjWbo0jxqIuRHVAwmb8wU9Pa3E,5676
|
|
9
|
+
gac/errors.py,sha256=3vIRMQ2QF3sP9_rPfXAFuu5ZSjIVX4FxM-FAuiR8N-8,7416
|
|
10
|
+
gac/git.py,sha256=ZdEvq5ssJw-EncQi_PnAevF9WZoVz7or4AwSJHbMFMs,5181
|
|
11
|
+
gac/init_cli.py,sha256=aNllguofrcLn0ML9tzLVWFkPbwlAvCM9m7undHhMLEo,1825
|
|
12
|
+
gac/main.py,sha256=_BX_B9Denex9MwceT1udBQjzoMLLD2czU8TlHvPRE80,9520
|
|
13
|
+
gac/preprocess.py,sha256=4igtZ9OTHgTpqwlJmbcGaqzmdD0HHCZJwsZ9eG118Gk,15360
|
|
14
|
+
gac/prompt.py,sha256=mgKcSuhs0VKXznkcEbPXGia_Mgz66NtYMlJPLVLH6jg,13779
|
|
15
|
+
gac/utils.py,sha256=koJNQ4FXUTitnKQ7hC_9sPudLi_BSOpcryYsz5n_z-Q,3973
|
|
16
|
+
gac-0.16.1.dist-info/METADATA,sha256=h5IDdn0PVx1EINVixoJlsmzRjuza3lCTilxFNM0h41U,7569
|
|
17
|
+
gac-0.16.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
18
|
+
gac-0.16.1.dist-info/entry_points.txt,sha256=tdjN-XMmcWfL92swuRAjT62bFLOAwk9bTMRLGP5Z4aI,36
|
|
19
|
+
gac-0.16.1.dist-info/licenses/LICENSE,sha256=s11puNmYfzwoSwG96nhOJe268Y1QFckr8-Hmzo3_eJE,1087
|
|
20
|
+
gac-0.16.1.dist-info/RECORD,,
|
gac-0.15.4.dist-info/RECORD
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
gac/__init__.py,sha256=z9yGInqtycFIT3g1ca24r-A3699hKVaRqGUI79wsmMc,415
|
|
2
|
-
gac/__version__.py,sha256=FjfRaGX0nXE4YXkbsH2NFoMQ99yeEezRwgdgrFxON18,67
|
|
3
|
-
gac/ai.py,sha256=Ijpgcp1L_SJy37Q3p3leSFMXST6RNWruUEsYlkoz-XM,5549
|
|
4
|
-
gac/cli.py,sha256=UCGaKpGrm8B603V04yMYGkfv9S5-CksSy7zzeqwp13s,4280
|
|
5
|
-
gac/config.py,sha256=9-llgaRMzL2qtH5nmoRGtgpUw7IJg143jWDcppmYcSA,1128
|
|
6
|
-
gac/config_cli.py,sha256=v9nFHZO1RvK9fzHyuUS6SG-BCLHMsdOMDwWamBhVVh4,1608
|
|
7
|
-
gac/constants.py,sha256=gcygNGl4I48vYtuhpdCFKnYRjhxcRWMQYCerxPq0wCY,4731
|
|
8
|
-
gac/diff_cli.py,sha256=GVegRNB1a4D-wUOtVlb6Q_6sXbj4kD2Yt-H4r2sRHxc,5659
|
|
9
|
-
gac/errors.py,sha256=3vIRMQ2QF3sP9_rPfXAFuu5ZSjIVX4FxM-FAuiR8N-8,7416
|
|
10
|
-
gac/git.py,sha256=ZdEvq5ssJw-EncQi_PnAevF9WZoVz7or4AwSJHbMFMs,5181
|
|
11
|
-
gac/init_cli.py,sha256=s6nB4k__6Da7Ljq4MB9-rlrcTxB6Nt82OMDKk0pZP-M,1778
|
|
12
|
-
gac/main.py,sha256=yll8TzauryYLkQHiVuu3Bfh0nb3tzbPrLmtvQo2FkPM,9492
|
|
13
|
-
gac/preprocess.py,sha256=UwcijCKjfuqGeeMRR1yd3FWLdX-uHjb8UIwxjxpbEpo,15339
|
|
14
|
-
gac/prompt.py,sha256=mgKcSuhs0VKXznkcEbPXGia_Mgz66NtYMlJPLVLH6jg,13779
|
|
15
|
-
gac/utils.py,sha256=koJNQ4FXUTitnKQ7hC_9sPudLi_BSOpcryYsz5n_z-Q,3973
|
|
16
|
-
gac-0.15.4.dist-info/METADATA,sha256=kDkyxD0L2sanTxAyX47f-GMdsaKQI3RRkC-c0y20IBE,7525
|
|
17
|
-
gac-0.15.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
18
|
-
gac-0.15.4.dist-info/entry_points.txt,sha256=tdjN-XMmcWfL92swuRAjT62bFLOAwk9bTMRLGP5Z4aI,36
|
|
19
|
-
gac-0.15.4.dist-info/licenses/LICENSE,sha256=s11puNmYfzwoSwG96nhOJe268Y1QFckr8-Hmzo3_eJE,1087
|
|
20
|
-
gac-0.15.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|