Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion codeflash/optimization/function_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,25 @@ def process_review(
data["git_remote"] = self.args.git_remote
check_create_pr(**data)
elif self.args.staging_review:
create_staging(**data)
response = create_staging(**data)
if response.status_code == 200:
staging_url = f"https://app.codeflash.ai/review-optimizations/{self.function_trace_id[:-4] + exp_type if self.experiment_id else self.function_trace_id}"
console.print(
Panel(
f"[bold green]✅ Staging created:[/bold green]\n[link={staging_url}]{staging_url}[/link]",
title="Staging Link",
border_style="green",
)
)
else:
console.print(
Panel(
f"[bold red]❌ Failed to create staging[/bold red]\nStatus: {response.status_code}",
title="Staging Error",
border_style="red",
)
)

else:
# Mark optimization success since no PR will be created
mark_optimization_success(
Expand Down
Loading