Settings page is "fully" implementation.

This commit is contained in:
wei
2026-08-03 20:55:37 +08:00
parent ed9d25023d
commit 48b70c12af
16 changed files with 579 additions and 261 deletions
+20 -1
View File
@@ -1,4 +1,7 @@
from pathlib import Path
from typing import Mapping
from pydantic import ValidationError
class LauncherException(Exception):
@@ -110,4 +113,20 @@ class AuthenticationSessionException(LauncherException):
user_message = "Authentication failed. Session may expire."
class ThirdPartyAPIException(LauncherException):
user_message = "An error occurred while fetching third party API."
user_message = "An error occurred while fetching third party API."
class SettingsError(LauncherException):
user_message = "An settings error occurred."
class ModelRegistrationError(SettingsError):
user_message = "Settings section could not be registered."
class ConfigValidationError(SettingsError):
user_message = "Settings section could not be validated."
def __init__(self, errors: Mapping[str, ValidationError]) -> None:
self.errors = dict(errors)
details = "\n".join(
f"[{section}]\n{error}" for section, error in self.errors.items()
)
super().__init__(f"Invalid settings configuration:\n{details}")