feat: 添加启动绑定地址解析功能,支持从配置文件和环境变量迁移

This commit is contained in:
DrSmoothl
2026-04-04 20:13:04 +08:00
parent d87e6ec0bb
commit 2fb911a8d5
11 changed files with 437 additions and 41 deletions

View File

@@ -1414,6 +1414,24 @@ class WebUIConfig(ConfigBase):
)
"""是否启用WebUI"""
host: str = Field(
default="127.0.0.1",
json_schema_extra={
"x-widget": "input",
"x-icon": "globe",
},
)
"""WebUI 绑定主机地址"""
port: int = Field(
default=8001,
json_schema_extra={
"x-widget": "input",
"x-icon": "hash",
},
)
"""WebUI 绑定端口"""
mode: Literal["development", "production"] = Field(
default="production",
json_schema_extra={