Skip to content

Commit b4b9a18

Browse files
author
zihao.xue
committed
refactor: make invocation link clickable
1 parent 048dafc commit b4b9a18

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/uipath/_cli/cli_invoke.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import logging
33
import os
44
import tomllib
5+
import urllib.parse
56

67
import click
78
import httpx
@@ -113,7 +114,14 @@ def invoke(entrypoint: str | None, input: str | None, file: str | None) -> None:
113114
console.error("Error: Failed to get job key from response")
114115
if job_key:
115116
with console.spinner("Starting job ..."):
116-
job_url = f"{base_url}/orchestrator_/jobs(sidepanel:sidepanel/jobs/{job_key}/details)?fid={personal_workspace_folder_id}"
117+
url_params = {"fid": str(personal_workspace_folder_id)}
118+
job_url_path = urllib.parse.quote(
119+
f"orchestrator_/jobs(sidepanel:sidepanel/jobs/{job_key}/details)"
120+
)
121+
job_url_full_path = urllib.parse.urljoin(base_url, job_url_path)
122+
job_url = (
123+
f"{job_url_full_path}?{urllib.parse.urlencode(url_params)}"
124+
)
117125
console.magic("Job started successfully!")
118126
console.link("Monitor your job here: ", job_url)
119127
else:

0 commit comments

Comments
 (0)