gitpr-cli 0.0.23__py3-none-any.whl → 0.0.24__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.
- {gitpr_cli-0.0.23.dist-info → gitpr_cli-0.0.24.dist-info}/METADATA +1 -1
- {gitpr_cli-0.0.23.dist-info → gitpr_cli-0.0.24.dist-info}/RECORD +10 -10
- src/ai_providers.py +6 -4
- src/config.py +5 -1
- src/main.py +2 -2
- src/updater.py +2 -2
- {gitpr_cli-0.0.23.dist-info → gitpr_cli-0.0.24.dist-info}/WHEEL +0 -0
- {gitpr_cli-0.0.23.dist-info → gitpr_cli-0.0.24.dist-info}/entry_points.txt +0 -0
- {gitpr_cli-0.0.23.dist-info → gitpr_cli-0.0.24.dist-info}/licenses/LICENSE +0 -0
- {gitpr_cli-0.0.23.dist-info → gitpr_cli-0.0.24.dist-info}/top_level.txt +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
gitpr_cli-0.0.
|
|
1
|
+
gitpr_cli-0.0.24.dist-info/licenses/LICENSE,sha256=UQzLC6mwqb-ZNDkBBAqOxC-SMQcEID0gaM6oFcu6u48,27030
|
|
2
2
|
src/__init__.py,sha256=U6ksarernNcryHO20aj4rNG7w0thT7xdMs5KzBJyPvE,28
|
|
3
|
-
src/ai_providers.py,sha256=
|
|
3
|
+
src/ai_providers.py,sha256=rf4IJTG6P8nLKU-C-BdUdy68JvhnsgzvhEsJdp-9El0,3477
|
|
4
4
|
src/blame_engine.py,sha256=056Rp5JkQU2cFB4b3lmIx99xjwfLj-tc7jwyevDoik8,10383
|
|
5
5
|
src/cache.py,sha256=XggMTy00GlZfeF1VoLEYCdxL5h0eTg11TJfPIRPx7fs,3201
|
|
6
|
-
src/config.py,sha256=
|
|
6
|
+
src/config.py,sha256=J-Jg8jVCdtLsf9h4UZNrepS3bx09loOKzgZSWMELIQ8,6823
|
|
7
7
|
src/core.py,sha256=eIpnTttGQhUwrEm7Xh59HYVu59LQcprf7K-IwN7kNYk,17965
|
|
8
8
|
src/i18n.py,sha256=Bn1OrhCYEaT0kUidu5SeTu6kiIuWOZ4OjB-7mIb6RtY,3185
|
|
9
9
|
src/issue_engine.py,sha256=QLEEHp9l6_QiaaLLrFtBU_-LkkxPE2Gs5-TLEYEBWCA,3613
|
|
10
10
|
src/linter_engine.py,sha256=D04wvOgRa-vZEYknm-z-Cg7V_3gnoQz_64PMorWnISo,4414
|
|
11
|
-
src/main.py,sha256=
|
|
11
|
+
src/main.py,sha256=TEmIUTaqX1oAPmknmu7Eq4p06KioMO8EvommuEOiDqI,27708
|
|
12
12
|
src/security.py,sha256=Li0zM8ZURTK2nKRHIt49TWLO4DIddBEHzXPrVycv0Rs,1343
|
|
13
13
|
src/spinner.py,sha256=UM-53CfrfQ6Ymg4-d2_pYgMaDdiEV69DFetaQtCyJzo,6055
|
|
14
14
|
src/tui_issue.py,sha256=gcAJCIfMcdeMjrFJUWQQvdgBv7fnOBtxQxwdBk2Sk40,1789
|
|
15
|
-
src/updater.py,sha256=
|
|
15
|
+
src/updater.py,sha256=9huKjoz4eRC_i1pu5Lcw6_JNwLaS_drIVw7l6xiSE3o,5886
|
|
16
16
|
src/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
src/ui/help_screen.py,sha256=tjbokXhwyzLnkOC0S56NbpX-78hcFQnvsQMpNU1wt0c,1862
|
|
18
18
|
src/ui/issue_app.py,sha256=8MdBcOVdCHPFx6EUhs80CiZ2G-29KulskkCz9qMZ_Lg,4737
|
|
19
|
-
gitpr_cli-0.0.
|
|
20
|
-
gitpr_cli-0.0.
|
|
21
|
-
gitpr_cli-0.0.
|
|
22
|
-
gitpr_cli-0.0.
|
|
23
|
-
gitpr_cli-0.0.
|
|
19
|
+
gitpr_cli-0.0.24.dist-info/METADATA,sha256=36jmbuAbz0a1aCIr72fzPhXc-jKoqQglk8brhDRulh8,15488
|
|
20
|
+
gitpr_cli-0.0.24.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
21
|
+
gitpr_cli-0.0.24.dist-info/entry_points.txt,sha256=mh_4F_idM4cj0XhfRGBDQb5Nnku93YJ-dyKh5SufwlE,39
|
|
22
|
+
gitpr_cli-0.0.24.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
|
|
23
|
+
gitpr_cli-0.0.24.dist-info/RECORD,,
|
src/ai_providers.py
CHANGED
|
@@ -34,11 +34,13 @@ def call_ai_model(provider, api_key, api_model, prompt, system_instruction, quie
|
|
|
34
34
|
)
|
|
35
35
|
result_text = response.text
|
|
36
36
|
|
|
37
|
-
elif provider
|
|
38
|
-
# DeepSeek
|
|
39
|
-
|
|
37
|
+
elif provider in ["deepseek", "ollama"]:
|
|
38
|
+
# DeepSeek and Ollama are 100% compatible with the OpenAI library.
|
|
39
|
+
base_url = "https://api.deepseek.com" if provider == "deepseek" else "http://localhost:11434/v1"
|
|
40
|
+
client = OpenAI(api_key=api_key, base_url=base_url)
|
|
41
|
+
|
|
40
42
|
response = client.chat.completions.create(
|
|
41
|
-
model=api_model,
|
|
43
|
+
model=api_model,
|
|
42
44
|
messages=[
|
|
43
45
|
{"role": "system", "content": system_instruction},
|
|
44
46
|
{"role": "user", "content": prompt}
|
src/config.py
CHANGED
|
@@ -18,6 +18,8 @@ DEFAULT_CONFIG = {
|
|
|
18
18
|
"GEMINI_API_MODEL_SECONDARY": "gemini-flash-lite-latest",
|
|
19
19
|
"DEEPSEEK_API_MODEL_PRIMARY": "deepseek-v4-pro",
|
|
20
20
|
"DEEPSEEK_API_MODEL_SECONDARY": "deepseek-v4-flash",
|
|
21
|
+
"OLLAMA_API_MODEL_PRIMARY": "llama3",
|
|
22
|
+
"OLLAMA_API_MODEL_SECONDARY": "llama3",
|
|
21
23
|
"OUTPUT_FILE_NAME": "{branch}_{datetime}_PR_DESC.md",
|
|
22
24
|
"OUTPUT_FILE_NAME_REVIEW": "{branch}_{datetime}_PR_REVIEW.txt",
|
|
23
25
|
"OUTPUT_FILE_NAME_FULLREVIEW": "{branch}_{datetime}_PR_FULLREVIEW.txt",
|
|
@@ -39,6 +41,8 @@ def get_api_key(provider):
|
|
|
39
41
|
encrypted_key = os.getenv("GEMINI_API_KEY_ENCRYPTED")
|
|
40
42
|
elif provider == "deepseek":
|
|
41
43
|
encrypted_key = os.getenv("DEEPSEEK_API_KEY_ENCRYPTED")
|
|
44
|
+
elif provider == "ollama":
|
|
45
|
+
return "ollama-local" # Olama does not require authentication!
|
|
42
46
|
else:
|
|
43
47
|
return None
|
|
44
48
|
|
|
@@ -86,7 +90,7 @@ def setup_environment():
|
|
|
86
90
|
click.secho(__("🤖 Welcome to GitPR! Let's configure your AI engine."), fg="cyan", bold=True)
|
|
87
91
|
provider = click.prompt(
|
|
88
92
|
__("Which artificial intelligence do you want to use as default?"),
|
|
89
|
-
type=click.Choice(['gemini', 'deepseek'], case_sensitive=False),
|
|
93
|
+
type=click.Choice(['gemini', 'deepseek', 'ollama'], case_sensitive=False),
|
|
90
94
|
default='gemini'
|
|
91
95
|
).lower()
|
|
92
96
|
set_key(ENV_FILE, "DEFAULT_AI_PROVIDER", provider)
|
src/main.py
CHANGED
|
@@ -96,7 +96,7 @@ HELP_MAP: dict[str, dict[str, str]] = {
|
|
|
96
96
|
'provider': {
|
|
97
97
|
'url': get_doc_url('providers-ia.md'),
|
|
98
98
|
'title': __('AI Provider Selection (--provider)'),
|
|
99
|
-
'description': __('Forces the use of a specific AI provider for this execution: gemini (Google Gemini)
|
|
99
|
+
'description': __('Forces the use of a specific AI provider for this execution: gemini (Google Gemini), deepseek (DeepSeek) or ollama (Local). Temporarily overrides the default provider defined in the .env file.'),
|
|
100
100
|
},
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -133,7 +133,7 @@ HELP_PRIORITY: dict[str, int] = {
|
|
|
133
133
|
@click.option('-b', '--blame', type=str, help=__("Analyzes the origin of a business rule (e.g., file.py:10-20 or just file.py)."))
|
|
134
134
|
@click.option('-ht', '--history', is_flag=True, help=__("Uses the entire branch history (Git Log + PR Cache) as context to generate the issue."))
|
|
135
135
|
@click.option('-is', '--issue', is_flag=True, help=__("Generates a standardized Issue from current changes and opens the interactive interface."))
|
|
136
|
-
@click.option('-p', '--provider', type=click.Choice(['gemini', 'deepseek']), help=__("Forces the use of a specific AI provider for this execution."))
|
|
136
|
+
@click.option('-p', '--provider', type=click.Choice(['gemini', 'deepseek', 'ollama']), help=__("Forces the use of a specific AI provider for this execution."))
|
|
137
137
|
@click.option('-h', '--help', 'help_flag', is_flag=True, help=__("Shows this message and exits. Use with another flag for contextual help (e.g., -h --issue)."))
|
|
138
138
|
def cli(commit, review, fullreview, linter, skill, update, installhooks, hook, quiet, provider, input, blame, history, issue, help_flag):
|
|
139
139
|
"""
|
src/updater.py
CHANGED
|
@@ -7,8 +7,8 @@ import click
|
|
|
7
7
|
from datetime import datetime
|
|
8
8
|
|
|
9
9
|
# Current version of your local executable (Update this on every new build!)
|
|
10
|
-
__version__ = "0.0.
|
|
11
|
-
__lang_version__ = "v0.0.
|
|
10
|
+
__version__ = "0.0.24" # GitPR current version
|
|
11
|
+
__lang_version__ = "v0.0.2" # Language dictionary version control
|
|
12
12
|
GITHUB_API_URL = "https://api.github.com/repos/natanfiuza/gitpr/releases/latest"
|
|
13
13
|
PYPI_API_URL = "https://pypi.org/pypi/gitpr-cli/json"
|
|
14
14
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|