update
This commit is contained in:
@@ -15,7 +15,7 @@ from urllib.parse import urlparse, parse_qs, unquote, urljoin
|
||||
|
||||
from SYS.logger import log, debug, debug_panel
|
||||
from SYS.payload_builders import build_file_result_payload, normalize_file_extension
|
||||
from PluginCore.registry import get_plugin_with_capability, list_plugins_with_capability
|
||||
from PluginCore.registry import get_plugin_for_cmdlet, list_plugins_for_cmdlet
|
||||
from SYS.rich_display import (
|
||||
show_plugin_config_panel,
|
||||
show_store_config_panel,
|
||||
@@ -1478,7 +1478,7 @@ class search_file(Cmdlet):
|
||||
log("Error: search-file -plugin requires both plugin and query", file=sys.stderr)
|
||||
log(f"Usage: {self.usage}", file=sys.stderr)
|
||||
|
||||
providers_map = list_plugins_with_capability("search", config)
|
||||
providers_map = list_plugins_for_cmdlet("search-file", config)
|
||||
available = [n for n, a in providers_map.items() if a]
|
||||
unconfigured = [n for n, a in providers_map.items() if not a]
|
||||
|
||||
@@ -1499,8 +1499,10 @@ class search_file(Cmdlet):
|
||||
if hasattr(ctx_mod, "get_pipeline_state"):
|
||||
progress = ctx_mod.get_pipeline_state().live_progress
|
||||
|
||||
provider = get_plugin_with_capability(plugin_name, "search", config)
|
||||
if not provider:
|
||||
providers_map = list_plugins_for_cmdlet("search-file", config)
|
||||
provider = get_plugin_for_cmdlet(plugin_name, "search-file", config)
|
||||
resolved_plugin_name = str(getattr(provider, "name", "") or plugin_name).strip().lower()
|
||||
if not provider or not providers_map.get(resolved_plugin_name, False):
|
||||
if progress:
|
||||
try:
|
||||
progress.stop()
|
||||
@@ -1509,7 +1511,6 @@ class search_file(Cmdlet):
|
||||
|
||||
show_plugin_config_panel([plugin_name])
|
||||
|
||||
providers_map = list_plugins_with_capability("search", config)
|
||||
available = [n for n, a in providers_map.items() if a]
|
||||
if available:
|
||||
show_available_plugins_panel(available)
|
||||
|
||||
Reference in New Issue
Block a user