Coverage for agentos/desktop/__init__.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.14.3, created at 2026-07-02 09:59 +0800

1""" 

2AgentOS Desktop — 一键启动的桌面客户端 (v1.7.5) 

3 

4v1.7.5 增强: 

5- Textual TUI 终端界面(三面板:文件树/聊天/终端) 

6- 全键盘快捷键操作 

7- 实时流式输出 

8 

9v1.7.1: 

10- 可视化授权审批引擎(Agent 主动申请 → 用户点击允许/拒绝) 

11- 原生桌面壳支持(pywebview 窗口包裹) 

12- 权限模式一键切换 

13""" 

14 

15from agentos.desktop.server import DesktopServer, DesktopConfig, launch_desktop 

16try: 

17 from agentos.desktop.tui import launch_tui, TUIConfig, AgentOSTUI 

18except ImportError: 

19 class _StubApp: pass 

20 launch_tui = lambda **kw: print("ERROR: textual not installed. Run: pip install textual") # type: ignore 

21 TUIConfig = type('TUIConfig', (), {}) # type: ignore 

22 AgentOSTUI = _StubApp # type: ignore 

23 

24__all__ = [ 

25 "DesktopServer", 

26 "DesktopConfig", 

27 "launch_desktop", 

28 "launch_tui", 

29 "TUIConfig", 

30 "AgentOSTUI", 

31]