更新: 1. 添加 Cursor 版本号读取功能 2. 更新程序版本到 3.0.2

This commit is contained in:
huangzhenpc
2025-02-12 10:05:04 +08:00
parent b531e9052b
commit 039cd06e43
3 changed files with 25 additions and 2 deletions

View File

@@ -53,6 +53,18 @@ class AccountSwitcher:
self.hardware_id = get_hardware_id()
self.registry = CursorRegistry() # 添加注册表操作工具类
def get_cursor_version(self) -> str:
"""获取Cursor版本号"""
try:
if self.package_json.exists():
with open(self.package_json, "r", encoding="utf-8") as f:
data = json.load(f)
return data.get("version", "未知")
return "未知"
except Exception as e:
logging.error(f"获取Cursor版本失败: {str(e)}")
return "未知"
def get_device_info(self) -> dict:
"""获取设备信息"""
try: