Skip to content

Commit c4e15cf

Browse files
Merge branch 'main' into fix/explanation-print
2 parents aefe030 + fbb4bbe commit c4e15cf

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

codeflash/optimization/function_optimizer.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,25 @@ def process_review(
12561256
data["git_remote"] = self.args.git_remote
12571257
check_create_pr(**data)
12581258
elif self.args.staging_review:
1259-
create_staging(**data)
1259+
response = create_staging(**data)
1260+
if response.status_code == 200:
1261+
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}"
1262+
console.print(
1263+
Panel(
1264+
f"[bold green]✅ Staging created:[/bold green]\n[link={staging_url}]{staging_url}[/link]",
1265+
title="Staging Link",
1266+
border_style="green",
1267+
)
1268+
)
1269+
else:
1270+
console.print(
1271+
Panel(
1272+
f"[bold red]❌ Failed to create staging[/bold red]\nStatus: {response.status_code}",
1273+
title="Staging Error",
1274+
border_style="red",
1275+
)
1276+
)
1277+
12601278
else:
12611279
# Mark optimization success since no PR will be created
12621280
mark_optimization_success(

0 commit comments

Comments
 (0)