m
This commit is contained in:
@@ -5,7 +5,6 @@ from textual.widgets import Static, Button, Input, Label, ListView, ListItem, Ru
|
||||
from textual import on, work
|
||||
from typing import Any
|
||||
|
||||
from pathlib import Path
|
||||
from SYS.config import load_config, save_config, global_config
|
||||
from Store.registry import _discover_store_classes, _required_keys_for
|
||||
from ProviderCore.registry import list_providers
|
||||
@@ -111,12 +110,10 @@ class ConfigModal(ModalScreen):
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
# Load config from the workspace root (parent of SYS)
|
||||
workspace_root = Path(__file__).resolve().parent.parent.parent
|
||||
self.config_data = load_config(config_dir=workspace_root)
|
||||
self.config_data = load_config()
|
||||
self.current_category = "globals"
|
||||
self.editing_item_type = None # 'store' or 'provider'
|
||||
self.editing_item_name = None
|
||||
self.workspace_root = workspace_root
|
||||
self._button_id_map = {}
|
||||
self._input_id_map = {}
|
||||
|
||||
@@ -738,7 +735,7 @@ class ConfigModal(ModalScreen):
|
||||
self._update_config_value(event.select.id, event.value)
|
||||
|
||||
def save_all(self) -> None:
|
||||
save_config(self.config_data, config_dir=self.workspace_root)
|
||||
save_config(self.config_data)
|
||||
|
||||
def validate_current_editor(self) -> bool:
|
||||
"""Ensure all required fields for the current item are filled."""
|
||||
|
||||
Reference in New Issue
Block a user