pkheria commited on
Commit
634b44d
·
1 Parent(s): eadc788

prompt fixed

Browse files
Files changed (3) hide show
  1. .DS_Store +0 -0
  2. app.py +7 -3
  3. commitlens.py +8 -8
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
app.py CHANGED
@@ -39,7 +39,7 @@ log = logging.getLogger("commitlens")
39
 
40
  MODEL_REPO_ID = "JetBrains/Mellum2-12B-A2.5B-Thinking"
41
  GROQ_MODEL = "llama-3.3-70b-versatile" # fast Groq-hosted 70B
42
- BATCH_TOKEN_BUDGET = 7000 # estimated input tokens; above this → sequential
43
 
44
  # ---------------------------------------------------------------------------
45
  # Prompts
@@ -50,12 +50,16 @@ SUMMARY_SYSTEM_PROMPT = """\
50
  You are a senior code reviewer. Given a git diff for ONE file, output EXACTLY:
51
  - 1 sentence: what changed (be specific, name functions/classes if relevant)
52
  - 1 sentence: likely reason for the change
53
- - Up to 3 bullet points of notable patterns, risks, or issues (skip if none)
 
 
 
 
54
 
55
  Rules:
56
  - Total response MUST be under 120 words
57
  - No preamble, no "Sure!", no restating the filename
58
- - No internal reasoning, no <think> blocks — final answer only
59
  - Use plain text, no markdown headers
60
  """
61
 
 
39
 
40
  MODEL_REPO_ID = "JetBrains/Mellum2-12B-A2.5B-Thinking"
41
  GROQ_MODEL = "llama-3.3-70b-versatile" # fast Groq-hosted 70B
42
+ # BATCH_TOKEN_BUDGET = 7000 # estimated input tokens; above this → sequential
43
 
44
  # ---------------------------------------------------------------------------
45
  # Prompts
 
50
  You are a senior code reviewer. Given a git diff for ONE file, output EXACTLY:
51
  - 1 sentence: what changed (be specific, name functions/classes if relevant)
52
  - 1 sentence: likely reason for the change
53
+
54
+ Reason:
55
+ - If the reason is explicitly evident from the diff, state it in 1 sentence.
56
+ - Otherwise output exactly:
57
+ Reason not evident from the diff.
58
 
59
  Rules:
60
  - Total response MUST be under 120 words
61
  - No preamble, no "Sure!", no restating the filename
62
+ - No internal reasoning, no <tool_call> blocks — final answer only
63
  - Use plain text, no markdown headers
64
  """
65
 
commitlens.py CHANGED
@@ -305,15 +305,15 @@ def build_prompts(ctx: CommitContext) -> list[str]:
305
  )
306
 
307
  # Before content
308
- if fc.before_content is not None:
309
- sections.append(
310
- "=== BEFORE CODE ===\n"
311
- f"{fc.before_content}\n"
312
- )
313
- else:
314
- sections.append("=== BEFORE CODE ===\n(file did not exist)\n")
315
 
316
- # After content
317
  # if fc.after_content is not None:
318
  # sections.append(
319
  # "=== AFTER CODE ===\n"
 
305
  )
306
 
307
  # Before content
308
+ # if fc.before_content is not None:
309
+ # sections.append(
310
+ # "=== BEFORE CODE ===\n"
311
+ # f"{fc.before_content}\n"
312
+ # )
313
+ # else:
314
+ # sections.append("=== BEFORE CODE ===\n(file did not exist)\n")
315
 
316
+ # # After content
317
  # if fc.after_content is not None:
318
  # sections.append(
319
  # "=== AFTER CODE ===\n"