Skip to content

Commit 0359923

Browse files
aseembits93Codeflash Bot
authored andcommitted
bugfix
1 parent 42b4637 commit 0359923

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

codeflash/api/aiservice.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,6 @@ def get_optimization_review(
557557
function_trace_id: str,
558558
coverage_message: str,
559559
replay_tests: str,
560-
root_dir: Path,
561560
concolic_tests: str, # noqa: ARG002
562561
calling_fn_details: str,
563562
) -> str:
@@ -583,18 +582,13 @@ def get_optimization_review(
583582
"""
584583
diff_str = "\n".join(
585584
[
586-
unified_diff_strings(
587-
code1=original_code[p],
588-
code2=new_code[p],
589-
fromfile=Path(p).relative_to(root_dir).as_posix(),
590-
tofile=Path(p).relative_to(root_dir).as_posix(),
591-
)
585+
unified_diff_strings(code1=original_code[p], code2=new_code[p], fromfile=Path(p), tofile=Path(p))
592586
for p in original_code
593587
if not is_zero_diff(original_code[p], new_code[p])
594588
]
595589
)
596590
code_diff = f"```diff\n{diff_str}\n```"
597-
logger.info("!lsp|Computing Optimization Review…")
591+
logger.info("!lsp|Reviewing Optimization…")
598592
payload = {
599593
"code_diff": code_diff,
600594
"explanation": explanation.raw_explanation_message,

0 commit comments

Comments
 (0)