continuing refactor

This commit is contained in:
2026-05-03 21:20:05 -07:00
parent 77cab1bd27
commit 5534812426
50 changed files with 1004 additions and 428 deletions
+10 -10
View File
@@ -364,7 +364,7 @@ class TagEditorPopup(ModalScreen[None]):
if to_del:
del_args = " ".join(json.dumps(t) for t in to_del)
del_cmd = f"delete-tag -store {store_tok}{query_chunk} {del_args}"
del_cmd = f"delete-tag -instance {store_tok}{query_chunk} {del_args}"
_log_pipeline_command("delete-tag", del_cmd)
del_res = runner.run_pipeline(del_cmd, seeds=self._seeds, isolate=True)
_log_pipeline_result("delete-tag", del_res)
@@ -381,7 +381,7 @@ class TagEditorPopup(ModalScreen[None]):
if to_add:
add_args = " ".join(json.dumps(t) for t in to_add)
add_cmd = f"add-tag -store {store_tok}{query_chunk} {add_args}"
add_cmd = f"add-tag -instance {store_tok}{query_chunk} {add_args}"
_log_pipeline_command("add-tag", add_cmd)
add_res = runner.run_pipeline(add_cmd, seeds=self._seeds, isolate=True)
_log_pipeline_result("add-tag", add_res)
@@ -1028,7 +1028,7 @@ class PipelineHubApp(App):
Rules (simple + non-destructive):
- If output path is set and the first stage is download-file and has no -path/--path, append -path.
- If a store is selected and pipeline has no add-file stage, append add-file -store <store>.
- If an instance is selected and pipeline has no add-file stage, append add-file -instance <name>.
"""
base = str(pipeline_text or "").strip()
if not base:
@@ -1080,7 +1080,7 @@ class PipelineHubApp(App):
if should_auto_add_file:
store_token = json.dumps(selected_store)
joined = f"{joined} | add-file -store {store_token}"
joined = f"{joined} | add-file -instance {store_token}"
return joined
@@ -1656,7 +1656,7 @@ class PipelineHubApp(App):
try:
if to_del:
del_args = " ".join(json.dumps(t) for t in to_del)
del_cmd = f"delete-tag -store {store_tok}{query_chunk} {del_args}"
del_cmd = f"delete-tag -instance {store_tok}{query_chunk} {del_args}"
del_res = runner.run_pipeline(del_cmd, seeds=seeds, isolate=True)
if not getattr(del_res, "success", False):
failures.append(
@@ -1669,7 +1669,7 @@ class PipelineHubApp(App):
if to_add:
add_args = " ".join(json.dumps(t) for t in to_add)
add_cmd = f"add-tag -store {store_tok}{query_chunk} {add_args}"
add_cmd = f"add-tag -instance {store_tok}{query_chunk} {add_args}"
add_res = runner.run_pipeline(add_cmd, seeds=seeds, isolate=True)
if not getattr(add_res, "success", False):
failures.append(
@@ -2358,7 +2358,7 @@ class PipelineHubApp(App):
self.notify("Delete action requires store + hash", severity="warning", timeout=3)
return
query = f"hash:{hash_value}"
cmd = f"delete-file -store {json.dumps(store_name)} -query {json.dumps(query)}"
cmd = f"delete-file -instance {json.dumps(store_name)} -query {json.dumps(query)}"
self._start_pipeline_execution(cmd)
return
@@ -2398,11 +2398,11 @@ class PipelineHubApp(App):
query = f"hash:{hash_value}"
base_copy = (
f"search-file -store {json.dumps(store_name)} {json.dumps(query)}"
f" | add-file -store {json.dumps(selected_store)}"
f"search-file -instance {json.dumps(store_name)} {json.dumps(query)}"
f" | add-file -instance {json.dumps(selected_store)}"
)
if action == "move_to_selected_store":
delete_cmd = f"delete-file -store {json.dumps(store_name)} -query {json.dumps(query)}"
delete_cmd = f"delete-file -instance {json.dumps(store_name)} -query {json.dumps(query)}"
cmd = f"{base_copy} | @ | {delete_cmd}"
else:
cmd = base_copy