MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / launch_webui

Function launch_webui

start_webui.py:242–263  ·  view source on GitHub ↗
(host: str, port: int, dry_run: bool)

Source from the content-addressed store, hash-verified

240
241
242def launch_webui(host: str, port: int, dry_run: bool) -> int:
243 os.environ["APP_HOST"] = host
244 os.environ["WEBUI_HOST"] = host
245 os.environ["APP_PORT"] = str(port)
246 os.environ["WEBUI_PORT"] = str(port)
247
248 if dry_run:
249 log(f"[dry-run] 将执行: {sys.executable} webui.py")
250 log(f"[dry-run] 环境覆盖: APP_HOST={host}, APP_PORT={port}")
251 return 0
252
253 log(f"使用 Python 解释器: {sys.executable}")
254 log("开始启动 Web UI 主进程")
255
256 from webui import start_webui as run_webui
257
258 try:
259 run_webui()
260 return 0
261 except KeyboardInterrupt:
262 log("收到 Ctrl+C,Web UI 已请求停止", "WARN")
263 return 0
264
265
266def main() -> int:

Callers 1

mainFunction · 0.85

Calls 1

logFunction · 0.85

Tested by

no test coverage detected