d
This commit is contained in:
50
CLI.py
50
CLI.py
@@ -2856,6 +2856,56 @@ class PipelineExecutor:
|
||||
except Exception:
|
||||
auto_stage = None
|
||||
|
||||
source_cmd_for_selection = None
|
||||
source_args_for_selection: List[str] = []
|
||||
try:
|
||||
source_cmd_for_selection = (
|
||||
ctx.get_current_stage_table_source_command()
|
||||
or ctx.get_last_result_table_source_command()
|
||||
)
|
||||
source_args_for_selection = (
|
||||
ctx.get_current_stage_table_source_args()
|
||||
or ctx.get_last_result_table_source_args()
|
||||
or []
|
||||
)
|
||||
except Exception:
|
||||
source_cmd_for_selection = None
|
||||
source_args_for_selection = []
|
||||
|
||||
if not stages and selection_indices and source_cmd_for_selection:
|
||||
src_norm = _norm_cmd(source_cmd_for_selection)
|
||||
if src_norm in {".worker", "worker", "workers"}:
|
||||
if len(selection_indices) == 1:
|
||||
idx = selection_indices[0]
|
||||
row_args = None
|
||||
try:
|
||||
row_args = ctx.get_current_stage_table_row_selection_args(idx)
|
||||
except Exception:
|
||||
row_args = None
|
||||
if not row_args:
|
||||
try:
|
||||
row_args = ctx.get_last_result_table_row_selection_args(idx)
|
||||
except Exception:
|
||||
row_args = None
|
||||
if not row_args:
|
||||
try:
|
||||
items = ctx.get_last_result_items() or []
|
||||
if 0 <= idx < len(items):
|
||||
maybe = items[idx]
|
||||
if isinstance(maybe, dict):
|
||||
candidate = maybe.get("_selection_args")
|
||||
if isinstance(candidate, (list, tuple)):
|
||||
row_args = [str(x) for x in candidate if x is not None]
|
||||
except Exception:
|
||||
row_args = row_args or None
|
||||
|
||||
if row_args:
|
||||
stages.append(
|
||||
[str(source_cmd_for_selection)]
|
||||
+ [str(x) for x in row_args if x is not None]
|
||||
+ [str(x) for x in source_args_for_selection if x is not None]
|
||||
)
|
||||
|
||||
def _apply_row_action_to_stage(stage_idx: int) -> bool:
|
||||
if not selection_indices or len(selection_indices) != 1:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user