repr-cli 0.2.21__py3-none-any.whl → 0.2.23__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.
- repr/change_synthesis.py +39 -17
- repr/cli.py +65 -22
- repr/session_extractor.py +18 -7
- repr/story_synthesis.py +37 -15
- {repr_cli-0.2.21.dist-info → repr_cli-0.2.23.dist-info}/METADATA +1 -1
- {repr_cli-0.2.21.dist-info → repr_cli-0.2.23.dist-info}/RECORD +10 -10
- {repr_cli-0.2.21.dist-info → repr_cli-0.2.23.dist-info}/WHEEL +0 -0
- {repr_cli-0.2.21.dist-info → repr_cli-0.2.23.dist-info}/entry_points.txt +0 -0
- {repr_cli-0.2.21.dist-info → repr_cli-0.2.23.dist-info}/licenses/LICENSE +0 -0
- {repr_cli-0.2.21.dist-info → repr_cli-0.2.23.dist-info}/top_level.txt +0 -0
repr/change_synthesis.py
CHANGED
|
@@ -418,14 +418,25 @@ async def explain_group(
|
|
|
418
418
|
changes=changes_str,
|
|
419
419
|
)
|
|
420
420
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
421
|
+
async def make_request(use_temperature: bool = True):
|
|
422
|
+
kwargs = {
|
|
423
|
+
"model": model,
|
|
424
|
+
"messages": [
|
|
425
|
+
{"role": "system", "content": GROUP_EXPLAIN_SYSTEM},
|
|
426
|
+
{"role": "user", "content": prompt},
|
|
427
|
+
],
|
|
428
|
+
}
|
|
429
|
+
if use_temperature:
|
|
430
|
+
kwargs["temperature"] = 0.7
|
|
431
|
+
return await client.chat.completions.create(**kwargs)
|
|
432
|
+
|
|
433
|
+
try:
|
|
434
|
+
response = await make_request(use_temperature=True)
|
|
435
|
+
except Exception as e:
|
|
436
|
+
if "temperature" in str(e).lower() and "unsupported" in str(e).lower():
|
|
437
|
+
response = await make_request(use_temperature=False)
|
|
438
|
+
else:
|
|
439
|
+
raise
|
|
429
440
|
|
|
430
441
|
return response.choices[0].message.content.strip()
|
|
431
442
|
|
|
@@ -455,15 +466,26 @@ async def synthesize_changes(
|
|
|
455
466
|
unpushed=format_commit_changes(report.unpushed),
|
|
456
467
|
)
|
|
457
468
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
469
|
+
async def make_synthesis_request(use_temperature: bool = True):
|
|
470
|
+
kwargs = {
|
|
471
|
+
"model": model,
|
|
472
|
+
"messages": [
|
|
473
|
+
{"role": "system", "content": CHANGE_SYNTHESIS_SYSTEM},
|
|
474
|
+
{"role": "user", "content": prompt},
|
|
475
|
+
],
|
|
476
|
+
"response_format": {"type": "json_object"},
|
|
477
|
+
}
|
|
478
|
+
if use_temperature:
|
|
479
|
+
kwargs["temperature"] = 0.7
|
|
480
|
+
return await client.chat.completions.create(**kwargs)
|
|
481
|
+
|
|
482
|
+
try:
|
|
483
|
+
response = await make_synthesis_request(use_temperature=True)
|
|
484
|
+
except Exception as e:
|
|
485
|
+
if "temperature" in str(e).lower() and "unsupported" in str(e).lower():
|
|
486
|
+
response = await make_synthesis_request(use_temperature=False)
|
|
487
|
+
else:
|
|
488
|
+
raise
|
|
467
489
|
|
|
468
490
|
content = response.choices[0].message.content
|
|
469
491
|
data = json.loads(content)
|
repr/cli.py
CHANGED
|
@@ -1031,7 +1031,11 @@ def generate(
|
|
|
1031
1031
|
|
|
1032
1032
|
if not repo_commits:
|
|
1033
1033
|
if not json_output:
|
|
1034
|
-
|
|
1034
|
+
if commits:
|
|
1035
|
+
console.print(f" [dim]No commits matching specified SHAs[/]")
|
|
1036
|
+
else:
|
|
1037
|
+
filter_days_used = days if days else 90
|
|
1038
|
+
console.print(f" [dim]No commits in the last {filter_days_used} days[/]")
|
|
1035
1039
|
continue
|
|
1036
1040
|
|
|
1037
1041
|
# Filter out commits that are already part of existing stories (unless --force)
|
|
@@ -6071,16 +6075,29 @@ def create_branch(
|
|
|
6071
6075
|
|
|
6072
6076
|
prompt = COMMIT_MESSAGE_USER.format(changes=changes_str)
|
|
6073
6077
|
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
model
|
|
6077
|
-
messages
|
|
6078
|
+
async def make_branch_request(use_temperature: bool = True):
|
|
6079
|
+
kwargs = {
|
|
6080
|
+
"model": "gpt-4o-mini",
|
|
6081
|
+
"messages": [
|
|
6078
6082
|
{"role": "system", "content": COMMIT_MESSAGE_SYSTEM},
|
|
6079
6083
|
{"role": "user", "content": prompt},
|
|
6080
6084
|
],
|
|
6081
|
-
response_format
|
|
6082
|
-
|
|
6083
|
-
|
|
6085
|
+
"response_format": {"type": "json_object"},
|
|
6086
|
+
}
|
|
6087
|
+
if use_temperature:
|
|
6088
|
+
kwargs["temperature"] = 0.3
|
|
6089
|
+
return await client.chat.completions.create(**kwargs)
|
|
6090
|
+
|
|
6091
|
+
async def get_branch_response():
|
|
6092
|
+
try:
|
|
6093
|
+
return await make_branch_request(use_temperature=True)
|
|
6094
|
+
except Exception as e:
|
|
6095
|
+
if "temperature" in str(e).lower() and "unsupported" in str(e).lower():
|
|
6096
|
+
return await make_branch_request(use_temperature=False)
|
|
6097
|
+
raise
|
|
6098
|
+
|
|
6099
|
+
with create_spinner("Generating branch name..."):
|
|
6100
|
+
response = asyncio.run(get_branch_response())
|
|
6084
6101
|
data = json.loads(response.choices[0].message.content)
|
|
6085
6102
|
branch_name = data.get("branch", "")
|
|
6086
6103
|
commit_msg = data.get("message", "")
|
|
@@ -6223,16 +6240,29 @@ def commit_staged(
|
|
|
6223
6240
|
changes_str = format_file_changes(staged)
|
|
6224
6241
|
prompt = COMMIT_MESSAGE_USER.format(changes=changes_str)
|
|
6225
6242
|
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
model
|
|
6229
|
-
messages
|
|
6243
|
+
async def make_commit_request(use_temperature: bool = True):
|
|
6244
|
+
kwargs = {
|
|
6245
|
+
"model": "gpt-4o-mini",
|
|
6246
|
+
"messages": [
|
|
6230
6247
|
{"role": "system", "content": COMMIT_MESSAGE_SYSTEM},
|
|
6231
6248
|
{"role": "user", "content": prompt},
|
|
6232
6249
|
],
|
|
6233
|
-
response_format
|
|
6234
|
-
|
|
6235
|
-
|
|
6250
|
+
"response_format": {"type": "json_object"},
|
|
6251
|
+
}
|
|
6252
|
+
if use_temperature:
|
|
6253
|
+
kwargs["temperature"] = 0.3
|
|
6254
|
+
return await client.chat.completions.create(**kwargs)
|
|
6255
|
+
|
|
6256
|
+
async def get_commit_response():
|
|
6257
|
+
try:
|
|
6258
|
+
return await make_commit_request(use_temperature=True)
|
|
6259
|
+
except Exception as e:
|
|
6260
|
+
if "temperature" in str(e).lower() and "unsupported" in str(e).lower():
|
|
6261
|
+
return await make_commit_request(use_temperature=False)
|
|
6262
|
+
raise
|
|
6263
|
+
|
|
6264
|
+
with create_spinner("Generating commit message..."):
|
|
6265
|
+
response = asyncio.run(get_commit_response())
|
|
6236
6266
|
data = json.loads(response.choices[0].message.content)
|
|
6237
6267
|
branch_name = data.get("branch", "")
|
|
6238
6268
|
commit_msg = data.get("message", "")
|
|
@@ -6661,16 +6691,29 @@ def create_pr(
|
|
|
6661
6691
|
|
|
6662
6692
|
prompt = PR_USER.format(commits=commits_text)
|
|
6663
6693
|
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
model
|
|
6667
|
-
messages
|
|
6694
|
+
async def make_pr_request(use_temperature: bool = True):
|
|
6695
|
+
kwargs = {
|
|
6696
|
+
"model": "gpt-4o-mini",
|
|
6697
|
+
"messages": [
|
|
6668
6698
|
{"role": "system", "content": PR_SYSTEM},
|
|
6669
6699
|
{"role": "user", "content": prompt},
|
|
6670
6700
|
],
|
|
6671
|
-
response_format
|
|
6672
|
-
|
|
6673
|
-
|
|
6701
|
+
"response_format": {"type": "json_object"},
|
|
6702
|
+
}
|
|
6703
|
+
if use_temperature:
|
|
6704
|
+
kwargs["temperature"] = 0.3
|
|
6705
|
+
return await client.chat.completions.create(**kwargs)
|
|
6706
|
+
|
|
6707
|
+
async def get_pr_response():
|
|
6708
|
+
try:
|
|
6709
|
+
return await make_pr_request(use_temperature=True)
|
|
6710
|
+
except Exception as e:
|
|
6711
|
+
if "temperature" in str(e).lower() and "unsupported" in str(e).lower():
|
|
6712
|
+
return await make_pr_request(use_temperature=False)
|
|
6713
|
+
raise
|
|
6714
|
+
|
|
6715
|
+
with create_spinner("Generating PR..."):
|
|
6716
|
+
response = asyncio.run(get_pr_response())
|
|
6674
6717
|
data = json.loads(response.choices[0].message.content)
|
|
6675
6718
|
pr_title = data.get("title", current_branch)
|
|
6676
6719
|
pr_body = data.get("body", "")
|
repr/session_extractor.py
CHANGED
|
@@ -319,18 +319,29 @@ class SessionExtractor:
|
|
|
319
319
|
# Call LLM (using sync client to avoid event loop cleanup issues)
|
|
320
320
|
client = self._get_client()
|
|
321
321
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
model
|
|
325
|
-
messages
|
|
322
|
+
def make_extraction_request(use_temperature: bool = True):
|
|
323
|
+
kwargs = {
|
|
324
|
+
"model": self.model.split("/")[-1] if "/" in self.model else self.model,
|
|
325
|
+
"messages": [
|
|
326
326
|
{"role": "system", "content": EXTRACTION_SYSTEM_PROMPT},
|
|
327
327
|
{"role": "user", "content": EXTRACTION_USER_PROMPT.format(
|
|
328
328
|
session_transcript=transcript
|
|
329
329
|
)},
|
|
330
330
|
],
|
|
331
|
-
response_format
|
|
332
|
-
|
|
333
|
-
|
|
331
|
+
"response_format": {"type": "json_object"},
|
|
332
|
+
}
|
|
333
|
+
if use_temperature:
|
|
334
|
+
kwargs["temperature"] = 0.3
|
|
335
|
+
return client.chat.completions.create(**kwargs)
|
|
336
|
+
|
|
337
|
+
try:
|
|
338
|
+
try:
|
|
339
|
+
response = make_extraction_request(use_temperature=True)
|
|
340
|
+
except Exception as e:
|
|
341
|
+
if "temperature" in str(e).lower() and "unsupported" in str(e).lower():
|
|
342
|
+
response = make_extraction_request(use_temperature=False)
|
|
343
|
+
else:
|
|
344
|
+
raise
|
|
334
345
|
|
|
335
346
|
# Parse response
|
|
336
347
|
content = response.choices[0].message.content
|
repr/story_synthesis.py
CHANGED
|
@@ -648,18 +648,29 @@ class StorySynthesizer:
|
|
|
648
648
|
client = self._get_client()
|
|
649
649
|
commits_text = self._format_commits_for_prompt(commits)
|
|
650
650
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
model
|
|
654
|
-
messages
|
|
651
|
+
def make_request(use_temperature: bool = True):
|
|
652
|
+
kwargs = {
|
|
653
|
+
"model": self.model.split("/")[-1] if "/" in self.model else self.model,
|
|
654
|
+
"messages": [
|
|
655
655
|
{"role": "system", "content": STORY_SYNTHESIS_SYSTEM},
|
|
656
656
|
{"role": "user", "content": STORY_SYNTHESIS_USER.format(
|
|
657
657
|
commits_text=commits_text
|
|
658
658
|
)},
|
|
659
659
|
],
|
|
660
|
-
response_format
|
|
661
|
-
|
|
662
|
-
|
|
660
|
+
"response_format": {"type": "json_object"},
|
|
661
|
+
}
|
|
662
|
+
if use_temperature:
|
|
663
|
+
kwargs["temperature"] = 0.3
|
|
664
|
+
return client.chat.completions.create(**kwargs)
|
|
665
|
+
|
|
666
|
+
try:
|
|
667
|
+
try:
|
|
668
|
+
response = make_request(use_temperature=True)
|
|
669
|
+
except Exception as e:
|
|
670
|
+
if "temperature" in str(e).lower() and "unsupported" in str(e).lower():
|
|
671
|
+
response = make_request(use_temperature=False)
|
|
672
|
+
else:
|
|
673
|
+
raise
|
|
663
674
|
|
|
664
675
|
content = response.choices[0].message.content
|
|
665
676
|
|
|
@@ -1061,17 +1072,28 @@ async def transform_story_for_feed(
|
|
|
1061
1072
|
)
|
|
1062
1073
|
response_model = InternalStory
|
|
1063
1074
|
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
messages=[
|
|
1075
|
+
def make_story_request(use_temperature: bool = True):
|
|
1076
|
+
kwargs = {
|
|
1077
|
+
"model": model_name.split("/")[-1] if "/" in model_name else model_name,
|
|
1078
|
+
"messages": [
|
|
1069
1079
|
{"role": "system", "content": system_prompt},
|
|
1070
1080
|
{"role": "user", "content": user_prompt},
|
|
1071
1081
|
],
|
|
1072
|
-
response_format
|
|
1073
|
-
|
|
1074
|
-
|
|
1082
|
+
"response_format": {"type": "json_object"},
|
|
1083
|
+
}
|
|
1084
|
+
if use_temperature:
|
|
1085
|
+
kwargs["temperature"] = 0.7
|
|
1086
|
+
return client.chat.completions.create(**kwargs)
|
|
1087
|
+
|
|
1088
|
+
try:
|
|
1089
|
+
# Use sync client to avoid event loop cleanup issues
|
|
1090
|
+
try:
|
|
1091
|
+
response = make_story_request(use_temperature=True)
|
|
1092
|
+
except Exception as e:
|
|
1093
|
+
if "temperature" in str(e).lower() and "unsupported" in str(e).lower():
|
|
1094
|
+
response = make_story_request(use_temperature=False)
|
|
1095
|
+
else:
|
|
1096
|
+
raise
|
|
1075
1097
|
|
|
1076
1098
|
content = response.choices[0].message.content.strip()
|
|
1077
1099
|
|
|
@@ -2,8 +2,8 @@ repr/__init__.py,sha256=_YVX4f3_NtxGhDquXGSiaxkfAG2BdWZlB4MbobLsO74,447
|
|
|
2
2
|
repr/__main__.py,sha256=N7amYwdGB3yzk2ZJJbtH2hhESNkDuhDL11dDEm5Kl60,166
|
|
3
3
|
repr/api.py,sha256=rJRn_4xZXipdBFMrsZbQPWfZKfPLWJpTI0uYUyvjFhw,22814
|
|
4
4
|
repr/auth.py,sha256=TpqwqwZ3tAEolcSYu-zD8oHhzfwHALkauPP1xg5VTiY,12208
|
|
5
|
-
repr/change_synthesis.py,sha256=
|
|
6
|
-
repr/cli.py,sha256=
|
|
5
|
+
repr/change_synthesis.py,sha256=0Dy16cALop3BwElZe9QAwy3R9ZpY1yBKTKhRJJ4M3Ik,16126
|
|
6
|
+
repr/cli.py,sha256=V0qoAYLzPDtbynWyQGJ5ixtrTk1DsL8vA6szeRRGr_8,227881
|
|
7
7
|
repr/config.py,sha256=S69hdgFdvcHoIO2zihuvsSAQf2Gp41JtC5GGlE4Cy78,34233
|
|
8
8
|
repr/configure.py,sha256=GnwjOC64F0uDD90IjA6LJNev8FlHHAHARuSLwBqI6k0,26860
|
|
9
9
|
repr/cron.py,sha256=Hvo9ssVmGn09dLIHKWqzorKkW7eXdLQnQlBzagTX2Ko,11402
|
|
@@ -18,9 +18,9 @@ repr/mcp_server.py,sha256=IhQM35bMD5c-6ASYIAa9VfnrvxzvFlZntUqkBm08Xqk,39752
|
|
|
18
18
|
repr/models.py,sha256=mQAkP1bBiAFPweC0OxU-UwKNLZkinvVYHB0KjItHt3Q,20093
|
|
19
19
|
repr/openai_analysis.py,sha256=Pz3KMT5B91dcHOKPUQlFoMpTKlzjDO5idnmhkyAb6y8,31965
|
|
20
20
|
repr/privacy.py,sha256=sN1tkoZjCDSwAjkQWeH6rHaLrtv727yT1HNHQ54GRis,9834
|
|
21
|
-
repr/session_extractor.py,sha256=
|
|
21
|
+
repr/session_extractor.py,sha256=7rTtce0lnQSHqW92pl5VRY479JW_NKkM_q4Q_vvJ5sk,17591
|
|
22
22
|
repr/storage.py,sha256=y_EYYKrUD2qNRKK2_vdjsIlPIq-IzfaNMUyj9aHofpQ,24223
|
|
23
|
-
repr/story_synthesis.py,sha256=
|
|
23
|
+
repr/story_synthesis.py,sha256=aRVAbJI8ZsB3OpNcbmAjavPRTzkF7WNcH1ZaLbRvp8g,47495
|
|
24
24
|
repr/telemetry.py,sha256=M1NribTkiezpvweLrdbJxKDU2mlTe7frke6sUP0Yhiw,7000
|
|
25
25
|
repr/templates.py,sha256=5Z3vftQMn87ufvEVt0uWx_gagmvdZGoNxjD1Q9ZbS0w,11029
|
|
26
26
|
repr/timeline.py,sha256=z84PL_CfYikiNkz0oN4_glLxOQIQCeCUIGwXYvS6Dfk,22527
|
|
@@ -50,9 +50,9 @@ repr/loaders/base.py,sha256=AE9lFr8ZvPYt6KDwBTkNv3JF5A2QakVn9gA_ha77GLU,4308
|
|
|
50
50
|
repr/loaders/claude_code.py,sha256=sWAiQgNVWsdw9qUDcfHDBi5k6jBL7D8_SI3NAEsL-io,11106
|
|
51
51
|
repr/loaders/clawdbot.py,sha256=daKfTjI16tZrlwGUNaVOnLwxKyV6eW102CgIOu4mwAw,12064
|
|
52
52
|
repr/loaders/gemini_antigravity.py,sha256=_0HhtC1TwB2gSu20Bcco_W-V3Bt6v9O2iqOL6kIHQLU,13766
|
|
53
|
-
repr_cli-0.2.
|
|
54
|
-
repr_cli-0.2.
|
|
55
|
-
repr_cli-0.2.
|
|
56
|
-
repr_cli-0.2.
|
|
57
|
-
repr_cli-0.2.
|
|
58
|
-
repr_cli-0.2.
|
|
53
|
+
repr_cli-0.2.23.dist-info/licenses/LICENSE,sha256=tI16Ry3IQhjsde6weJ_in6czzWW2EF4Chz1uicyDLAA,1061
|
|
54
|
+
repr_cli-0.2.23.dist-info/METADATA,sha256=PsDE6Ne4eRK4inzupoTr-5fSRquVPKWV2iH07YraHSk,13387
|
|
55
|
+
repr_cli-0.2.23.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
56
|
+
repr_cli-0.2.23.dist-info/entry_points.txt,sha256=dlI-TCeDTW2rBC_nvOvMhwLihU4qsgD5r4Ot5BuVqSw,56
|
|
57
|
+
repr_cli-0.2.23.dist-info/top_level.txt,sha256=LNgPqdJPQnlicRve7uzI4a6rEUdcxHrNkUq_2w7eeiA,5
|
|
58
|
+
repr_cli-0.2.23.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|