Skip to content

Commit b17adc9

Browse files
committed
Add theme and direction parameters to web browser URL
1 parent 2ad87ae commit b17adc9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

langgraphics/watch.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ def watch(
4343
port: int = 8764,
4444
ws_port: int = 8765,
4545
open_browser: bool = True,
46+
theme: str = "system",
47+
direction: str = "TB",
4648
) -> Viewport:
4749
topology = extract(graph)
4850
manager = Broadcaster(topology)
@@ -52,6 +54,6 @@ def watch(
5254
start_ws_server(manager, host, ws_port)
5355

5456
if open_browser:
55-
webbrowser.open(f"http://{host}:{port}")
57+
webbrowser.open(f"http://{host}:{port}?theme={theme}&direction={direction}")
5658

5759
return Viewport(graph, manager, edge_lookup, http_server)

0 commit comments

Comments
 (0)