update
This commit is contained in:
@@ -505,14 +505,8 @@ class CmdletIntrospection:
|
||||
if normalized_arg == "plugin":
|
||||
canonical_cmd = (cmd_name or "").replace("_", "-").lower()
|
||||
try:
|
||||
from PluginCore.registry import (
|
||||
list_configured_plugin_names_with_capability,
|
||||
list_plugin_names_with_capability,
|
||||
list_plugin_names_for_cmdlet,
|
||||
)
|
||||
from PluginCore.registry import list_plugin_names_for_cmdlet
|
||||
except Exception:
|
||||
list_configured_plugin_names_with_capability = None # type: ignore
|
||||
list_plugin_names_with_capability = None # type: ignore
|
||||
list_plugin_names_for_cmdlet = None # type: ignore
|
||||
|
||||
plugin_choices: List[str] = []
|
||||
@@ -569,10 +563,6 @@ class CmdletIntrospection:
|
||||
) or []
|
||||
# Prefer configured plugins first, but still show valid plugin options.
|
||||
plugin_choices = _merge_choice_groups(configured, available)
|
||||
elif canonical_cmd in {"add-file"} and list_configured_plugin_names_with_capability is not None:
|
||||
plugin_choices = list_configured_plugin_names_with_capability("upload", config) or []
|
||||
elif list_configured_plugin_names_with_capability is not None:
|
||||
plugin_choices = list_configured_plugin_names_with_capability("search", config) or []
|
||||
|
||||
if plugin_choices:
|
||||
return plugin_choices
|
||||
|
||||
Reference in New Issue
Block a user