From 26c71c18915ec7dc0a30e81149c46b26e03c384f Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Mon, 15 Jun 2026 22:41:36 +0800 Subject: [PATCH] fix: avoid WebUI ready banner when assets missing --- astrbot/dashboard/server.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/astrbot/dashboard/server.py b/astrbot/dashboard/server.py index f00511da40..2253fb5727 100644 --- a/astrbot/dashboard/server.py +++ b/astrbot/dashboard/server.py @@ -545,7 +545,13 @@ def run(self): raise Exception(f"端口 {port} 已被占用") - parts = [f"\n ✨✨✨\n AstrBot v{VERSION} WebUI is ready\n\n"] + if (Path(self.data_path) / "index.html").is_file(): + webui_status = "WebUI is ready" + else: + webui_status = ( + f"WebUI is NOT ready: static files are missing at {self.data_path}" + ) + parts = [f"\n ✨✨✨\n AstrBot v{VERSION} {webui_status}\n\n"] parts.append(f" ➜ Local: {scheme}://localhost:{port}\n") for ip in ip_addr: parts.append(f" ➜ Network: {scheme}://{ip}:{port}\n")