Skip to content

Commit 64140b6

Browse files
authored
chore: make CLI output more clear to avoid confusion (#700)
1 parent 47d4169 commit 64140b6

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

python/cocoindex/cli.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,12 @@ def update(
408408
app_ref, flow_name = _parse_app_flow_specifier(app_flow_specifier)
409409
_load_user_app(app_ref)
410410

411+
if live:
412+
click.secho(
413+
"NOTE: Flow code changes will NOT be reflected in the server until you restart it.",
414+
fg="red",
415+
)
416+
411417
options = flow.FlowLiveUpdaterOptions(live_mode=live, print_stats=not quiet)
412418
if flow_name is None:
413419
if setup:
@@ -597,6 +603,10 @@ def server(
597603
),
598604
)
599605
else:
606+
click.secho(
607+
"NOTE: Flow code changes will NOT be reflected in the server until you restart it. Use --reload to enable auto-reload.",
608+
fg="red",
609+
)
600610
_run_server(*args)
601611

602612

@@ -633,9 +643,6 @@ def _run_server(
633643
if address is not None:
634644
server_settings.address = address
635645

636-
if COCOINDEX_HOST in cors_origins:
637-
click.echo(f"Open CocoInsight at: {COCOINDEX_HOST}/cocoinsight")
638-
639646
if run_setup:
640647
_setup_flows(
641648
flow.flows().values(),
@@ -649,6 +656,9 @@ def _run_server(
649656

650657
lib.start_server(server_settings)
651658

659+
if COCOINDEX_HOST in cors_origins:
660+
click.echo(f"Open CocoInsight at: {COCOINDEX_HOST}/cocoinsight")
661+
652662
click.secho("Press Ctrl+C to stop the server.", fg="yellow")
653663

654664
shutdown_event = threading.Event()

0 commit comments

Comments
 (0)