From cf9a7235f7d823427e02b2e205caec07bde4559e Mon Sep 17 00:00:00 2001 From: RC-CHN <1051989940@qq.com> Date: Tue, 17 Feb 2026 16:59:05 +0800 Subject: [PATCH] fix(computer): return none for unsupported browser capability set the base booter browser property to return None instead of raising NotImplementedError so callers can handle missing browser support through capability checks --- astrbot/core/computer/booters/base.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/astrbot/core/computer/booters/base.py b/astrbot/core/computer/booters/base.py index d3f107450..99483a1ad 100644 --- a/astrbot/core/computer/booters/base.py +++ b/astrbot/core/computer/booters/base.py @@ -17,10 +17,8 @@ class ComputerBooter: def shell(self) -> ShellComponent: ... @property - def browser(self) -> BrowserComponent: - raise NotImplementedError( - f"{self.__class__.__name__} does not support browser capability." - ) + def browser(self) -> BrowserComponent | None: + return None async def boot(self, session_id: str) -> None: ...