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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitai-local
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: AI-powered conventional commit message generator running 100% locally
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/PabloSalinasDev/GitAI-CLI
@@ -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.1 │")
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 = int(bar_len * pct)
54
- bar = Fore.YELLOW + "█" * filled + Style.DIM + "░" * (bar_len - filled)
55
- print(Fore.YELLOW + f"\r[{bar}" + Style.RESET_ALL + Fore.YELLOW + f"] {pct*100:.1f}% {d_gb:.2f}/{t_gb:.2f} GB", end="", flush=True)
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 = int(r.headers.get("content-length", 0))
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 = downloaded / total
71
+ pct = downloaded / total
70
72
  d_gb = downloaded / 1_073_741_824
71
- t_gb = total / 1_073_741_824
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 = Fore.YELLOW + '█' * filled_length + Style.DIM + '░' * (bar_length - filled_length)
114
+ bar = '█' * filled_length + '░' * (bar_length - filled_length)
115
115
 
116
- sys.stdout.write(Fore.YELLOW + f'\r Crunching diff: [{bar}' + Style.RESET_ALL + Fore.YELLOW + f'] {percent:.0f}%')
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
- sys.stdout.write(Fore.YELLOW + f'\r Crunching diff: [{bar_final}' + Fore.YELLOW + '] 100%\n\n')
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.1")
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}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitai-local
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: AI-powered conventional commit message generator running 100% locally
5
5
  License-Expression: MIT
6
6
  Project-URL: Homepage, https://github.com/PabloSalinasDev/GitAI-CLI
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gitai-local"
7
- version = "1.3.1"
7
+ version = "1.3.2"
8
8
  description = "AI-powered conventional commit message generator running 100% locally"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes
File without changes