This commit is contained in:
2026-01-19 06:24:09 -08:00
parent a961ac3ce7
commit 7ddf0065d1
45 changed files with 627 additions and 411 deletions

View File

@@ -380,7 +380,7 @@ class ConfigModal(ModalScreen):
if stype in classes:
cls = classes[stype]
if hasattr(cls, "config") and callable(cls.config):
for field_def in cls.config():
for field_def in cls.config_schema():
k = field_def.get("key")
if k:
provider_schema_map[k.upper()] = field_def
@@ -395,7 +395,7 @@ class ConfigModal(ModalScreen):
try:
pcls = get_provider_class(item_name)
if pcls and hasattr(pcls, "config") and callable(pcls.config):
for field_def in pcls.config():
for field_def in pcls.config_schema():
k = field_def.get("key")
if k:
provider_schema_map[k.upper()] = field_def
@@ -667,7 +667,7 @@ class ConfigModal(ModalScreen):
for stype, cls in all_classes.items():
if hasattr(cls, "config") and callable(cls.config):
try:
if cls.config():
if cls.config_schema():
options.append(stype)
except Exception:
pass
@@ -680,7 +680,7 @@ class ConfigModal(ModalScreen):
pcls = get_provider_class(ptype)
if pcls and hasattr(pcls, "config") and callable(pcls.config):
try:
if pcls.config():
if pcls.config_schema():
options.append(ptype)
except Exception:
pass
@@ -856,7 +856,7 @@ class ConfigModal(ModalScreen):
cls = classes[stype]
# Use schema for defaults if present
if hasattr(cls, "config") and callable(cls.config):
for field_def in cls.config():
for field_def in cls.config_schema():
key = field_def.get("key")
if key:
val = field_def.get("default", "")
@@ -890,7 +890,7 @@ class ConfigModal(ModalScreen):
if pcls:
# Use schema for defaults
if hasattr(pcls, "config") and callable(pcls.config):
for field_def in pcls.config():
for field_def in pcls.config_schema():
key = field_def.get("key")
if key:
new_config[key] = field_def.get("default", "")
@@ -988,7 +988,7 @@ class ConfigModal(ModalScreen):
if pcls:
# Collect required keys from schema
if hasattr(pcls, "config") and callable(pcls.config):
for field_def in pcls.config():
for field_def in pcls.config_schema():
if field_def.get("required"):
k = field_def.get("key")
if k and k not in required_keys: