Config: Move config file generation to tabby_config

Keep the models as a separate reference file without any extra
functions.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2024-09-16 22:22:24 -04:00
parent d2d07ed92d
commit 46f9fff210
3 changed files with 80 additions and 84 deletions

View File

@@ -1,8 +1,7 @@
import json
from loguru import logger
from common.config_models import generate_config_file
from common.tabby_config import config
from common.tabby_config import config, generate_config_file
from endpoints.server import export_openapi
@@ -18,10 +17,8 @@ def branch_to_actions() -> bool:
"Successfully wrote OpenAPI spec to "
+ f"{config.actions.openapi_export_path}"
)
elif config.actions.export_config:
generate_config_file(filename=config.actions.config_export_path)
else:
# did not branch
return False