gitai-local 1.3.1__tar.gz → 1.3.2__tar.gz
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.
- {gitai_local-1.3.1 → gitai_local-1.3.2}/PKG-INFO +1 -1
- {gitai_local-1.3.1 → gitai_local-1.3.2}/gitai/config.py +10 -22
- {gitai_local-1.3.1 → gitai_local-1.3.2}/gitai/llm_client.py +5 -3
- {gitai_local-1.3.1 → gitai_local-1.3.2}/gitai/main.py +1 -1
- {gitai_local-1.3.1 → gitai_local-1.3.2}/gitai_local.egg-info/PKG-INFO +1 -1
- {gitai_local-1.3.1 → gitai_local-1.3.2}/pyproject.toml +1 -1
- {gitai_local-1.3.1 → gitai_local-1.3.2}/LICENSE +0 -0
- {gitai_local-1.3.1 → gitai_local-1.3.2}/README.md +0 -0
- {gitai_local-1.3.1 → gitai_local-1.3.2}/gitai/__init__.py +0 -0
- {gitai_local-1.3.1 → gitai_local-1.3.2}/gitai_local.egg-info/SOURCES.txt +0 -0
- {gitai_local-1.3.1 → gitai_local-1.3.2}/gitai_local.egg-info/dependency_links.txt +0 -0
- {gitai_local-1.3.1 → gitai_local-1.3.2}/gitai_local.egg-info/entry_points.txt +0 -0
- {gitai_local-1.3.1 → gitai_local-1.3.2}/gitai_local.egg-info/requires.txt +0 -0
- {gitai_local-1.3.1 → gitai_local-1.3.2}/gitai_local.egg-info/top_level.txt +0 -0
- {gitai_local-1.3.1 → gitai_local-1.3.2}/setup.cfg +0 -0
|
@@ -33,7 +33,7 @@ def ensure_model():
|
|
|
33
33
|
print(Fore.CYAN + "│ GitAI - First run: downloading AI model │")
|
|
34
34
|
print(Fore.CYAN + "│ AI Model Setup - one time only │")
|
|
35
35
|
print(Fore.CYAN + "│ │")
|
|
36
|
-
print(Fore.CYAN + "│ Developed by PyBloSoft © 2026 - Ver. 1.3.
|
|
36
|
+
print(Fore.CYAN + "│ Developed by PyBloSoft © 2026 - Ver. 1.3.2 │")
|
|
37
37
|
print(Fore.CYAN + "└─────────────────────────────────────────────┘\n")
|
|
38
38
|
|
|
39
39
|
MODEL_DIR.mkdir(parents=True, exist_ok=True)
|
|
@@ -50,25 +50,27 @@ def ensure_model():
|
|
|
50
50
|
|
|
51
51
|
def print_progress(pct, d_gb, t_gb):
|
|
52
52
|
bar_len = 30
|
|
53
|
-
filled
|
|
54
|
-
bar
|
|
55
|
-
|
|
53
|
+
filled = int(bar_len * pct)
|
|
54
|
+
bar = "█" * filled + "░" * (bar_len - filled)
|
|
55
|
+
|
|
56
|
+
line = f"\r\033[K[{bar}] {pct*100:.1f}% {d_gb:.2f}/{t_gb:.2f} GB"
|
|
57
|
+
sys.stdout.write(Fore.YELLOW + line + Style.RESET_ALL)
|
|
58
|
+
sys.stdout.flush()
|
|
56
59
|
|
|
57
|
-
f = None
|
|
58
60
|
try:
|
|
59
61
|
with open(tmp_path, "wb") as f:
|
|
60
62
|
with httpx.stream("GET", MODEL_URL, follow_redirects=True, timeout=None) as r:
|
|
61
63
|
r.raise_for_status()
|
|
62
|
-
total
|
|
64
|
+
total = int(r.headers.get("content-length", 0))
|
|
63
65
|
downloaded = 0
|
|
64
66
|
|
|
65
67
|
for chunk in r.iter_bytes(chunk_size=1024 * 256):
|
|
66
68
|
f.write(chunk)
|
|
67
69
|
downloaded += len(chunk)
|
|
68
70
|
if total:
|
|
69
|
-
pct
|
|
71
|
+
pct = downloaded / total
|
|
70
72
|
d_gb = downloaded / 1_073_741_824
|
|
71
|
-
t_gb = total
|
|
73
|
+
t_gb = total / 1_073_741_824
|
|
72
74
|
print_progress(pct, d_gb, t_gb)
|
|
73
75
|
|
|
74
76
|
sys.stdout.write("\033[?25h")
|
|
@@ -78,13 +80,6 @@ def ensure_model():
|
|
|
78
80
|
print(Fore.GREEN + "\n\n Model downloaded successfully.\n")
|
|
79
81
|
|
|
80
82
|
except KeyboardInterrupt:
|
|
81
|
-
|
|
82
|
-
if f and not f.closed:
|
|
83
|
-
try:
|
|
84
|
-
f.close()
|
|
85
|
-
except Exception:
|
|
86
|
-
pass
|
|
87
|
-
|
|
88
83
|
sys.stdout.write("\033[?25h")
|
|
89
84
|
sys.stdout.flush()
|
|
90
85
|
|
|
@@ -98,13 +93,6 @@ def ensure_model():
|
|
|
98
93
|
os._exit(1)
|
|
99
94
|
|
|
100
95
|
except Exception as e:
|
|
101
|
-
|
|
102
|
-
if f and not f.closed:
|
|
103
|
-
try:
|
|
104
|
-
f.close()
|
|
105
|
-
except Exception:
|
|
106
|
-
pass
|
|
107
|
-
|
|
108
96
|
sys.stdout.write("\033[?25h")
|
|
109
97
|
sys.stdout.flush()
|
|
110
98
|
|
|
@@ -111,14 +111,16 @@ def clean_git_diff(raw_diff, max_estimated=2500, debug=True):
|
|
|
111
111
|
percent = 95
|
|
112
112
|
|
|
113
113
|
filled_length = int(bar_length * percent // 100)
|
|
114
|
-
bar =
|
|
114
|
+
bar = '█' * filled_length + '░' * (bar_length - filled_length)
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
line = f"\r\033[K Crunching diff: [{bar}] {percent:.0f}%"
|
|
117
|
+
sys.stdout.write(Fore.YELLOW + line + Style.RESET_ALL)
|
|
117
118
|
sys.stdout.flush()
|
|
118
119
|
time.sleep(0.2)
|
|
119
120
|
|
|
120
121
|
bar_final = '█' * bar_length
|
|
121
|
-
|
|
122
|
+
final_line = f"\r\033[K Crunching diff: [{bar_final}] 100%\n\n"
|
|
123
|
+
sys.stdout.write(Fore.YELLOW + final_line + Style.RESET_ALL)
|
|
122
124
|
sys.stdout.flush()
|
|
123
125
|
|
|
124
126
|
finally:
|
|
@@ -97,7 +97,7 @@ def print_help():
|
|
|
97
97
|
|
|
98
98
|
print(Fore.CYAN + "═"*86)
|
|
99
99
|
print(Fore.CYAN + " GitAI CLI - Offline Privacy-First Commit Generator")
|
|
100
|
-
print(Fore.CYAN + " Developed by PyBloSoft © 2026 - Ver. 1.3.
|
|
100
|
+
print(Fore.CYAN + " Developed by PyBloSoft © 2026 - Ver. 1.3.2")
|
|
101
101
|
print(Fore.CYAN + "═"*86)
|
|
102
102
|
print("Usage:")
|
|
103
103
|
print(f" gitai {Style.DIM}Analyze staged changes and generate a conventional commit.{Style.RESET_ALL}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|