Coverage for agentos/desktop/__init__.py: 91%
11 statements
« prev ^ index » next coverage.py v7.14.3, created at 2026-07-08 01:44 +0800
« prev ^ index » next coverage.py v7.14.3, created at 2026-07-08 01:44 +0800
1"""
2AgentOS Desktop — 一键启动的桌面客户端 (v1.7.5)
4v1.7.5 增强:
5- Textual TUI 终端界面(三面板:文件树/聊天/终端)
6- 全键盘快捷键操作
7- 实时流式输出
9v1.7.1:
10- 可视化授权审批引擎(Agent 主动申请 → 用户点击允许/拒绝)
11- 原生桌面壳支持(pywebview 窗口包裹)
12- 权限模式一键切换
13"""
15from agentos.desktop.server import DesktopConfig, DesktopServer, launch_desktop
17try:
18 from agentos.desktop.tui import AgentOSTUI, TUIConfig, launch_tui
19except ImportError:
21 class _StubApp:
22 pass
24 def launch_tui(**kw):
25 return print("ERROR: textual not installed. Run: pip install textual") # type: ignore
27 TUIConfig = type("TUIConfig", (), {}) # type: ignore
28 AgentOSTUI = _StubApp # type: ignore
30__all__ = [
31 "DesktopServer",
32 "DesktopConfig",
33 "launch_desktop",
34 "launch_tui",
35 "TUIConfig",
36 "AgentOSTUI",
37]