update and cleanup repo

This commit is contained in:
2026-05-26 15:32:01 -07:00
parent 5041d9fbb9
commit 0db899d0c3
72 changed files with 788 additions and 1884 deletions
+15 -25
View File
@@ -60,7 +60,7 @@ from SYS.rich_display import (
from cmdnat._status_shared import (
add_startup_check as _shared_add_startup_check,
collect_plugin_startup_checks as _collect_plugin_startup_checks,
has_tool as _has_tool,
has_provider as _has_provider,
)
@@ -479,7 +479,7 @@ class CmdletIntrospection:
def store_choices(config: Dict[str, Any], force: bool = False) -> List[str]:
try:
# Use the cached startup check from SharedArgs
from cmdlet._shared import SharedArgs
from SYS.cmdlet_spec import SharedArgs
return SharedArgs.get_store_choices(config, force=force)
except Exception:
return []
@@ -1361,7 +1361,7 @@ class CmdletCompleter(Completer):
)
if choices:
choice_list = choices
if normalized_prev in {"plugin", "provider"} and current_token:
if normalized_prev == "plugin" and current_token:
current_lower = current_token.lower()
filtered = [c for c in choices if c.lower().startswith(current_lower)]
if filtered:
@@ -1665,20 +1665,10 @@ class CmdletExecutor:
mod = import_cmd_module(cmd_name, reload_loaded=True)
data = getattr(mod, "CMDLET", None) if mod else None
if data and hasattr(data, "exec") and callable(getattr(data, "exec")):
from SYS.cmdlet_spec import collect_registered_cmdlet_names
run_fn = getattr(data, "exec")
registered_names = set()
raw_name = getattr(data, "name", None)
if raw_name:
registered_names.add(str(raw_name).replace("_", "-").lower())
registered_names.add(str(cmd_name).replace("_", "-").lower())
for alias_attr in ("alias", "aliases"):
alias_values = getattr(data, alias_attr, None)
if alias_values:
for alias in alias_values:
alias_text = str(alias or "").replace("_", "-").lower().strip()
if alias_text:
registered_names.add(alias_text)
for registered_name in registered_names:
for registered_name in collect_registered_cmdlet_names(data, fallback_name=cmd_name):
REGISTRY[registered_name] = run_fn
cmd_fn = run_fn
except Exception:
@@ -2336,7 +2326,7 @@ class CLI:
# Initialize the store choices cache at startup (filters disabled stores)
try:
from cmdlet._shared import SharedArgs
from SYS.cmdlet_spec import SharedArgs
config = self._config_loader.load()
SharedArgs._refresh_store_choices_cache(config)
except Exception:
@@ -2622,17 +2612,17 @@ Come to love it when others take what you share, as there is no greater joy
files=check.get("files"),
)
# Tool checks (configured via [tool=...])
if _has_tool(config, "florencevision"):
# Plugin support checks (configured via [plugin=...])
if _has_provider(config, "florencevision"):
try:
tool_cfg = config.get("tool")
fv_cfg = tool_cfg.get("florencevision") if isinstance(tool_cfg, dict) else None
plugin_cfg = config.get("plugin")
fv_cfg = plugin_cfg.get("florencevision") if isinstance(plugin_cfg, dict) else None
enabled = bool(fv_cfg.get("enabled")) if isinstance(fv_cfg, dict) else False
if not enabled:
_add_startup_check(
"DISABLED",
"FlorenceVision",
provider="tool",
provider="plugin",
detail="Not enabled",
)
else:
@@ -2643,21 +2633,21 @@ Come to love it when others take what you share, as there is no greater joy
_add_startup_check(
"DISABLED",
"FlorenceVision",
provider="tool",
provider="plugin",
detail="Missing: " + ", ".join(missing),
)
else:
_add_startup_check(
"ENABLED",
"FlorenceVision",
provider="tool",
provider="plugin",
detail="Ready",
)
except Exception as exc:
_add_startup_check(
"DISABLED",
"FlorenceVision",
provider="tool",
provider="plugin",
detail=str(exc),
)
except Exception as exc: