lgit-cli 5.4.0__py3-none-any.whl → 5.5.0__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.
- lgit/__init__.py +1 -1
- lgit/api.py +10 -10
- lgit/changelog.py +612 -221
- lgit/cli.py +133 -22
- lgit/compose.py +367 -75
- lgit/config.py +63 -0
- lgit/diffing.py +42 -0
- lgit/git.py +25 -0
- lgit/judgment.py +330 -0
- lgit/mechanical.py +337 -0
- lgit/models.py +41 -0
- lgit/patch.py +50 -3
- lgit/resources/model_pricing.json +2 -1
- lgit/resources/prompts/analysis.md +2 -0
- lgit/resources/prompts/fast.md +2 -0
- lgit/resources/prompts/map.md +2 -0
- lgit/resources/prompts/synthesis.md +116 -0
- lgit/synthesis.py +285 -0
- lgit/templates.py +70 -5
- {lgit_cli-5.4.0.dist-info → lgit_cli-5.5.0.dist-info}/METADATA +27 -2
- {lgit_cli-5.4.0.dist-info → lgit_cli-5.5.0.dist-info}/RECORD +24 -20
- {lgit_cli-5.4.0.dist-info → lgit_cli-5.5.0.dist-info}/WHEEL +1 -1
- {lgit_cli-5.4.0.dist-info → lgit_cli-5.5.0.dist-info}/entry_points.txt +0 -0
- {lgit_cli-5.4.0.dist-info → lgit_cli-5.5.0.dist-info}/licenses/LICENSE +0 -0
lgit/__init__.py
CHANGED
lgit/api.py
CHANGED
|
@@ -207,19 +207,19 @@ def strip_type_prefix(summary: str, commit_type: str | None = None, scope: str |
|
|
|
207
207
|
|
|
208
208
|
|
|
209
209
|
def summary_from_holistic_analysis(analysis: ConventionalAnalysis, config: CommitConfig, stat: str = "") -> str | None:
|
|
210
|
-
"""
|
|
211
|
-
|
|
212
|
-
del stat
|
|
210
|
+
"""Reuse a compliant analysis summary, repairing tense; return None when a summary call is needed."""
|
|
213
211
|
if not analysis.summary or not str(analysis.summary).strip():
|
|
214
212
|
return None
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
213
|
+
commit_type = str(analysis.commit_type)
|
|
214
|
+
scope = None if analysis.scope is None else str(analysis.scope)
|
|
215
|
+
draft = strip_type_prefix(str(analysis.summary).strip(), commit_type, scope).rstrip(" .")
|
|
216
|
+
summary, _ = _accept_summary(draft, commit_type, stat)
|
|
217
|
+
if summary is None:
|
|
218
|
+
return None
|
|
219
|
+
prefix = f"{commit_type}({scope}): " if scope else f"{commit_type}: "
|
|
220
|
+
if len((prefix + summary).encode("utf-8")) > min(config.summary_soft_limit, config.summary_hard_limit):
|
|
221
221
|
return None
|
|
222
|
-
return
|
|
222
|
+
return summary
|
|
223
223
|
|
|
224
224
|
|
|
225
225
|
async def generate_summary_from_analysis(
|