@@ -182,8 +182,7 @@ def ls(app_target: str | None) -> None:
182182 "--color/--no-color" , default = True , help = "Enable or disable colored output."
183183)
184184@click .option ("--verbose" , is_flag = True , help = "Show verbose output with full details." )
185- @click .option ("--live-status" , is_flag = True , help = "Show live update status for each data source." )
186- def show (app_flow_specifier : str , color : bool , verbose : bool , live_status : bool ) -> None :
185+ def show (app_flow_specifier : str , color : bool , verbose : bool ) -> None :
187186 """
188187 Show the flow spec and schema.
189188
@@ -204,15 +203,6 @@ def show(app_flow_specifier: str, color: bool, verbose: bool, live_status: bool)
204203 console = Console (no_color = not color )
205204 console .print (fl ._render_spec (verbose = verbose ))
206205 console .print ()
207-
208- if live_status :
209- # Show live update status
210- console .print ("\n [bold cyan]Live Update Status:[/bold cyan]" )
211- options = flow .FlowLiveUpdaterOptions (live_mode = False , reexport_targets = False , print_stats = False )
212- with flow .FlowLiveUpdater (fl , options ) as updater :
213- updater .print_cli_status ()
214- console .print ()
215-
216206 table = Table (
217207 title = f"Schema for Flow: { fl .name } " ,
218208 title_style = "cyan" ,
@@ -261,6 +251,23 @@ def _drop_flows(flows: Iterable[flow.Flow], app_ref: str, force: bool = False) -
261251 setup_bundle .apply (report_to_stdout = True )
262252
263253
254+ def _deprecate_setup_flag (
255+ ctx : click .Context , param : click .Parameter , value : bool
256+ ) -> bool :
257+ """Callback to warn users that --setup flag is deprecated."""
258+ # Check if the parameter was explicitly provided by the user
259+ if param .name is not None :
260+ param_source = ctx .get_parameter_source (param .name )
261+ if param_source == click .core .ParameterSource .COMMANDLINE :
262+ click .secho (
263+ "Warning: The --setup flag is deprecated and will be removed in a future version. "
264+ "Setup is now always enabled by default." ,
265+ fg = "yellow" ,
266+ err = True ,
267+ )
268+ return value
269+
270+
264271def _setup_flows (
265272 flow_iter : Iterable [flow .Flow ],
266273 * ,
@@ -285,22 +292,6 @@ def _setup_flows(
285292 setup_bundle .apply (report_to_stdout = not quiet )
286293
287294
288- def _deprecate_setup_flag (
289- ctx : click .Context , param : click .Parameter , value : bool
290- ) -> bool :
291- """Callback to warn users that --setup flag is deprecated."""
292- if param .name is not None :
293- param_source = ctx .get_parameter_source (param .name )
294- if param_source == click .core .ParameterSource .COMMANDLINE :
295- click .secho (
296- "Warning: The --setup flag is deprecated and will be removed in a future version. "
297- "Setup is now always enabled by default." ,
298- fg = "yellow" ,
299- err = True ,
300- )
301- return value
302-
303-
304295def _show_no_live_update_hint () -> None :
305296 click .secho (
306297 "NOTE: No change capture mechanism exists. See https://cocoindex.io/docs/core/flow_methods#live-update for more details.\n " ,
@@ -488,10 +479,6 @@ def update(
488479 else :
489480 assert len (flow_list ) == 1
490481 with flow .FlowLiveUpdater (flow_list [0 ], options ) as updater :
491- if options .live_mode :
492- # Show initial status
493- updater .print_cli_status ()
494- click .echo ()
495482 updater .wait ()
496483 if options .live_mode :
497484 _show_no_live_update_hint ()
0 commit comments