Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion sdks/python/src/opik/cli/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def connect(

tui = RunnerTUI()
tui.start()
tui.print_banner(runner_id, project_name)
tui.print_banner(runner_id, project_name, url=client.config.url_override)

# Suppress OPIK log lines from leaking into the TUI
opik_logger = logging.getLogger("opik")
Expand Down
25 changes: 17 additions & 8 deletions sdks/python/src/opik/runner/tui.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,30 @@ def stop(self) -> None:
self._live.stop()
self._live = None

def print_banner(self, runner_id: str, project_name: str = "") -> None:
def print_banner(
self,
runner_id: str,
project_name: str = "",
url: str = "",
Comment thread
collincunn marked this conversation as resolved.
) -> None:
# Align url/project lines under "runner:" visually
# " ⠀⃝ opik " is ~13 chars wide in a terminal
padding = " " * 11

info = Text()
info.append(" ")
info.append("\u2800\u20dd", style="rgb(224,62,45)")
info.append(" opik ", style="bold")
info.append(f"runner: {runner_id}", style="dim")
if url:
info.append(f"\n{padding}")
info.append(f"url: {url}", style="dim")
Comment thread
collincunn marked this conversation as resolved.
if project_name:
info.append(f" project: {project_name}", style="dim")
info.append(f"\n{padding}")
info.append(f"project: {project_name}", style="dim")

if self._live is not None:
self._console.print(info)
self._console.print()
else:
self._console.print(info)
self._console.print()
self._console.print(info)
self._console.print()

def app_line(self, stream: str, line: str) -> None:
color = _color_for_line(self._line_count)
Expand Down
Loading