fix timezone handling and logging fallback robustness

This commit is contained in:
windyboy
2026-02-09 20:16:39 +08:00
parent 976a1fa1d0
commit aa0dc8ec47
13 changed files with 492 additions and 86 deletions
+5 -4
View File
@@ -15,8 +15,9 @@ from vlm.config import Config, load_config, create_default_config, validate_conf
from vlm.logging_config import setup_logging, get_logger
# Default configuration path
DEFAULT_CONFIG_PATH = Path.home() / ".vlm" / "config.yaml"
def default_config_path() -> Path:
"""Return the default config path resolved at runtime."""
return Path.home() / ".vlm" / "config.yaml"
class CLIContext:
@@ -34,7 +35,7 @@ pass_context = click.make_pass_decorator(CLIContext)
@click.option(
'--config',
type=click.Path(path_type=Path),
default=DEFAULT_CONFIG_PATH,
default=default_config_path,
help='Path to configuration file (default: ~/.vlm/config.yaml)'
)
@click.option(
@@ -1962,7 +1963,7 @@ def config_cmd(ctx: CLIContext):
@click.option(
'--path',
type=click.Path(path_type=Path),
default=DEFAULT_CONFIG_PATH,
default=default_config_path,
help='Path where configuration file should be created'
)
def config_init(path: Path):