repr-cli 0.2.18__py3-none-any.whl → 0.2.20__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/cli.py CHANGED
@@ -933,24 +933,40 @@ def generate(
933
933
  console.print(" repr generate --local")
934
934
  raise typer.Exit(1)
935
935
 
936
- if not local and not cloud:
937
- # Check config for default mode
938
- llm_config = get_llm_config()
939
- default_mode = llm_config.get("default", "local")
936
+ # Resolve LLM mode and model from config
937
+ llm_config = get_llm_config()
938
+ default_mode = llm_config.get("default", "local")
939
+ byok_provider = None
940
940
 
941
+ if not local and not cloud:
941
942
  if default_mode == "local":
942
943
  local = True
943
944
  elif default_mode == "cloud" and is_authenticated() and is_cloud_allowed():
944
945
  cloud = True
946
+ elif default_mode.startswith("byok:"):
947
+ byok_provider = default_mode.split(":", 1)[1]
945
948
  else:
946
949
  # Fallback: local if not signed in or cloud not allowed
947
950
  local = True
948
-
951
+
952
+ # Determine model and provider string for display
953
+ if byok_provider:
954
+ from .config import get_byok_config, BYOK_PROVIDERS
955
+ byok_cfg = get_byok_config(byok_provider)
956
+ model_name = byok_cfg.get("model") if byok_cfg else None
957
+ provider_name = BYOK_PROVIDERS.get(byok_provider, {}).get("name", byok_provider)
958
+ mode_str = f"{provider_name}: {model_name}" if model_name else provider_name
959
+ elif local:
960
+ provider_name = llm_config.get("local_provider") or "Ollama"
961
+ model_name = llm_config.get("local_model") or "llama3.2"
962
+ mode_str = f"{provider_name}: {model_name}"
963
+ else:
964
+ model_name = llm_config.get("cloud_model") or "gpt-4o-mini"
965
+ mode_str = f"Cloud: {model_name}"
966
+
949
967
  if not json_output:
950
968
  print_header()
951
969
 
952
- mode_str = "local LLM" if local else "cloud LLM"
953
-
954
970
  # Build timeframe string for display
955
971
  if commits:
956
972
  timeframe_str = f"specific commits"
@@ -1073,13 +1089,8 @@ def generate(
1073
1089
  if not json_output:
1074
1090
  console.print(f" Batch {current}/{total}")
1075
1091
 
1076
- # Determine model based on mode (respect config default if no flag given)
1077
- llm_config = get_llm_config()
1078
- use_local = local or (not cloud and llm_config.get("default") == "local")
1079
- if use_local:
1080
- model = llm_config.get("local_model") or "llama3.2"
1081
- else:
1082
- model = None # Use default cloud model
1092
+ # Use model_name resolved earlier (handles local, cloud, and BYOK)
1093
+ model = model_name
1083
1094
 
1084
1095
  try:
1085
1096
  # Run synthesis sync
@@ -1125,6 +1136,9 @@ def generate(
1125
1136
  story.public_show = result.show
1126
1137
  story.internal_show = result.show
1127
1138
  except Exception as e:
1139
+ # Print error for visibility
1140
+ if not json_output:
1141
+ print_warning(f" Post generation failed: {e}")
1128
1142
  # Fallback: build from story data
1129
1143
  from .story_synthesis import _build_fallback_codex
1130
1144
  result = _build_fallback_codex(story, "internal")
repr/story_synthesis.py CHANGED
@@ -683,10 +683,9 @@ class StorySynthesizer:
683
683
  analysis = BatchAnalysis.model_validate_json(content)
684
684
 
685
685
  except Exception as e:
686
- # Log the error for debugging
687
- import os
688
- if os.environ.get("REPR_DEBUG"):
689
- print(f"DEBUG: Exception in LLM call: {type(e).__name__}: {e}")
686
+ # Always print error for visibility
687
+ from rich.console import Console
688
+ Console(stderr=True).print(f"[yellow] LLM error: {type(e).__name__}: {e}[/]")
690
689
 
691
690
  # Fallback: each commit is its own story
692
691
  analysis = BatchAnalysis(stories=[
@@ -1095,6 +1094,9 @@ async def transform_story_for_feed(
1095
1094
  return result
1096
1095
 
1097
1096
  except Exception as e:
1097
+ # Print error for visibility
1098
+ from rich.console import Console
1099
+ Console(stderr=True).print(f"[yellow] Transform error: {type(e).__name__}: {e}[/]")
1098
1100
  # Fallback: construct structured content from available data
1099
1101
  return _build_fallback_codex(story, mode)
1100
1102
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: repr-cli
3
- Version: 0.2.18
3
+ Version: 0.2.20
4
4
  Summary: A beautiful, privacy-first CLI that analyzes your code repositories and generates a compelling developer profile
5
5
  Author-email: Repr <hello@repr.dev>
6
6
  License: MIT License
@@ -3,7 +3,7 @@ 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
5
  repr/change_synthesis.py,sha256=z7GmCeEHQFlnqLtKDGDvlM7p9MAWl_ByeIJstEVAhbU,15223
6
- repr/cli.py,sha256=OFYq2oAqobX8uV14Pfz0k8upyoPVUALzDcoOrpueIoQ,225197
6
+ repr/cli.py,sha256=peB96KMbYppZogPnzmSGvFld4HJGD55mXHg_9YBHyPs,225931
7
7
  repr/config.py,sha256=S69hdgFdvcHoIO2zihuvsSAQf2Gp41JtC5GGlE4Cy78,34233
8
8
  repr/configure.py,sha256=GnwjOC64F0uDD90IjA6LJNev8FlHHAHARuSLwBqI6k0,26860
9
9
  repr/cron.py,sha256=Hvo9ssVmGn09dLIHKWqzorKkW7eXdLQnQlBzagTX2Ko,11402
@@ -20,7 +20,7 @@ repr/openai_analysis.py,sha256=FZY9pAlC2zdIjxxXxvZ2C3F65nqOp5OpXHS4Bu26jec,30527
20
20
  repr/privacy.py,sha256=sN1tkoZjCDSwAjkQWeH6rHaLrtv727yT1HNHQ54GRis,9834
21
21
  repr/session_extractor.py,sha256=t1rEyhndjxMREt3gfmcGBYzFGEwzt1kAYbmXPq-QbU8,17104
22
22
  repr/storage.py,sha256=y_EYYKrUD2qNRKK2_vdjsIlPIq-IzfaNMUyj9aHofpQ,24223
23
- repr/story_synthesis.py,sha256=3wV9v8PQkoaSEGBouDtC6q_ewRLNAdo4EXjRYl7g9OU,46443
23
+ repr/story_synthesis.py,sha256=iRrW23egiLdXyzgdI9WsnOmhhWwQEk8-43elL7l-f-E,46609
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.18.dist-info/licenses/LICENSE,sha256=tI16Ry3IQhjsde6weJ_in6czzWW2EF4Chz1uicyDLAA,1061
54
- repr_cli-0.2.18.dist-info/METADATA,sha256=ntG6B0qQ8SrMx-bM6xWw8sIR3RIeqmhZruOC8bmXDDA,13387
55
- repr_cli-0.2.18.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
56
- repr_cli-0.2.18.dist-info/entry_points.txt,sha256=dlI-TCeDTW2rBC_nvOvMhwLihU4qsgD5r4Ot5BuVqSw,56
57
- repr_cli-0.2.18.dist-info/top_level.txt,sha256=LNgPqdJPQnlicRve7uzI4a6rEUdcxHrNkUq_2w7eeiA,5
58
- repr_cli-0.2.18.dist-info/RECORD,,
53
+ repr_cli-0.2.20.dist-info/licenses/LICENSE,sha256=tI16Ry3IQhjsde6weJ_in6czzWW2EF4Chz1uicyDLAA,1061
54
+ repr_cli-0.2.20.dist-info/METADATA,sha256=ncrhnw-aKNUpTryGzMykMWej-HqKrUSxsByhzADZx3E,13387
55
+ repr_cli-0.2.20.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
56
+ repr_cli-0.2.20.dist-info/entry_points.txt,sha256=dlI-TCeDTW2rBC_nvOvMhwLihU4qsgD5r4Ot5BuVqSw,56
57
+ repr_cli-0.2.20.dist-info/top_level.txt,sha256=LNgPqdJPQnlicRve7uzI4a6rEUdcxHrNkUq_2w7eeiA,5
58
+ repr_cli-0.2.20.dist-info/RECORD,,