5 Commits

Author SHA1 Message Date
huangzhenpc
4e11deb530 优化界面提示:1. 统一所有提示框样式,使用自定义美观对话框 2. 添加复制按钮功能,方便用户操作 3. 优化未激活会员时的提示信息展示 2025-02-12 14:57:23 +08:00
huangzhenpc
4531f12c0d feat: 优化GUI界面和用户体验
1. 优化按钮样式和布局:增加按钮尺寸和内边距,使用不同颜色区分功能按钮,添加按钮悬停和点击效果,优化按钮间距和对齐方式

2. 添加会员状态检查:实现状态缓存机制减少API请求,添加状态自动更新定时器,根据剩余时间动态调整更新间隔

3. 改进加载提示:添加加载对话框组件,实现异步API请求机制,优化加载状态显示

4. 优化购买提示界面:美化提示框样式和排版,添加多个购买渠道信息,优化文本对齐和间距

5. 其他改进:修复tkinter相关打包问题,优化错误提示信息,改进日志记录,完善异常处理
2025-02-12 14:39:50 +08:00
huangzhenpc
e3058b9e39 feat: 完成PyQt5 GUI实现,支持系统托盘和图标显示
1. 实现了基于PyQt5的GUI界面 2. 添加系统托盘功能,支持最小化到托盘 3. 修复了图标显示问题,包括窗口图标和任务栏图标 4. 优化了打包配置,支持PyInstaller打包 5. 版本更新到v3.3.1
2025-02-12 14:18:08 +08:00
huangzhenpc
56b619c4dc chore: update version after GUI migration 2025-02-12 13:34:13 +08:00
huangzhenpc
c58903846d refactor: migrate GUI from tkinter to PyQt5
主要改动:

1. GUI框架迁移 - 从 tkinter 完全迁移到 PyQt5 - 重写了所有界面组件和布局 - 优化了界面交互逻辑

2. 界面改进 - 使用 QMainWindow 作为主窗口 - 采用 QVBoxLayout 和 QHBoxLayout 进行布局 - 使用 QFrame 组织界面结构 - 添加了状态显示区域的滚动功能

3. 功能优化 - 改进了错误处理和消息显示 - 使用 QMessageBox 替代 tkinter messagebox - 添加了剪贴板操作功能 - 优化了状态更新逻辑

4. 性能提升 - 移除了不必要的窗口刷新 - 使用 QTimer 优化状态检查 - 简化了窗口管理逻辑

5. 代码质量 - 改进了代码组织结构 - 增强了错误处理 - 添加了详细的日志记录 - 优化了资源管理

6. 依赖管理 - 更新了 PyInstaller spec 文件 - 添加了必要的 PyQt5 依赖 - 确保打包后的程序正常运行
2025-02-12 13:33:11 +08:00
14 changed files with 849 additions and 1311 deletions

View File

@@ -1,202 +0,0 @@
{
"package_json": {
"C:\\Users\\huangzhen\\AppData\\Local\\Programs\\Cursor\\resources\\app\\package.json": {
"homepage": "https://cursor.so",
"author": {
"name": "Cursor AI, Inc.",
"email": "hiring@cursor.so"
},
"productName": "Cursor",
"description": "Cursor is an AI-first coding environment.",
"main": "./out/main.js",
"dependencies": {
"@todesktop/runtime": "=1.6.1",
"@electron/asar": "^3.2.3",
"@anysphere/file-service": "0.0.0-73d604b6",
"@microsoft/1ds-core-js": "^3.2.13",
"@microsoft/1ds-post-js": "^3.2.13",
"@parcel/watcher": "2.5.0",
"@sentry/electron": "5.7.0",
"@sentry/node": "8.35.0",
"@types/semver": "^7.5.8",
"@vscode/deviceid": "^0.1.1",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/policy-watcher": "^1.1.8",
"@vscode/proxy-agent": "^0.27.0",
"@vscode/ripgrep": "^1.15.10",
"@vscode/spdlog": "^0.15.0",
"@vscode/sqlite3": "5.1.8-vscode",
"@vscode/sudo-prompt": "9.3.1",
"@vscode/tree-sitter-wasm": "^0.0.4",
"@vscode/vscode-languagedetection": "1.0.21",
"@vscode/windows-mutex": "^0.5.0",
"@vscode/windows-process-tree": "^0.6.0",
"@vscode/windows-registry": "^1.1.0",
"@xterm/addon-clipboard": "^0.2.0-beta.53",
"@xterm/addon-image": "^0.9.0-beta.70",
"@xterm/addon-ligatures": "^0.10.0-beta.70",
"@xterm/addon-search": "^0.16.0-beta.70",
"@xterm/addon-serialize": "^0.14.0-beta.70",
"@xterm/addon-unicode11": "^0.9.0-beta.70",
"@xterm/addon-webgl": "^0.19.0-beta.70",
"@xterm/headless": "^5.6.0-beta.70",
"@xterm/xterm": "^5.6.0-beta.70",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.2",
"jschardet": "3.1.4",
"kerberos": "2.1.1",
"minimist": "^1.2.6",
"multiformats": "^13.3.1",
"native-is-elevated": "0.7.0",
"native-keymap": "^3.3.5",
"native-watchdog": "^1.4.1",
"node-fetch": "2.7.0",
"node-pty": "1.1.0-beta22",
"open": "^8.4.2",
"tas-client-umd": "0.2.0",
"v8-inspect-profiler": "^0.1.1",
"vscode-oniguruma": "1.7.0",
"vscode-regexpp": "^3.1.0",
"vscode-textmate": "9.1.0",
"yauzl": "^3.0.0",
"yazl": "^2.4.3"
},
"name": "cursor",
"version": "0.45.11",
"type": "module",
"desktopName": "cursor-url-handler.desktop",
"overrides": {},
"tdBuildId": "250207y6nbaw5qc",
"email": "jrxqnsoz250264@nosqli.com",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc"
}
},
"storage_json": {
"telemetry.machineId": "758a7f7f7f79078f9f2c690514878ea3e8f064c0a49e837dd396db89df58429c",
"telemetry.macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
"telemetry.sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}",
"telemetry.devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
"backupWorkspaces": {
"workspaces": [],
"folders": [
{
"folderUri": "file:///d%3A/W/python/001cursro.app/interactive"
}
],
"emptyWindows": [
{
"backupFolder": "1739332115293"
}
]
},
"windowControlHeight": 35,
"profileAssociations": {
"workspaces": {
"file:///d%3A/W/python/001cursro.app/interactive": "__default__profile__"
},
"emptyWindows": {
"1739332115293": "__default__profile__"
}
},
"theme": "vs-dark",
"themeBackground": "#1f1f1f",
"windowSplash": {
"zoomLevel": 0,
"baseTheme": "vs-dark",
"colorInfo": {
"foreground": "#cccccc",
"background": "#1f1f1f",
"editorBackground": "#1f1f1f",
"titleBarBackground": "#181818",
"titleBarBorder": "#2b2b2b",
"activityBarBackground": "#181818",
"activityBarBorder": "#2b2b2b",
"sideBarBackground": "#181818",
"sideBarBorder": "#2b2b2b",
"statusBarBackground": "#181818",
"statusBarBorder": "#2b2b2b",
"statusBarNoFolderBackground": "#1f1f1f"
},
"layoutInfo": {
"sideBarSide": "left",
"editorPartMinWidth": 220,
"titleBarHeight": 35,
"activityBarWidth": 0,
"sideBarWidth": 170,
"statusBarHeight": 22,
"windowBorder": false
}
}
},
"registry": {
"HKLM_MachineGuid": {
"exists": true,
"value": "776c6b6c-195f-42dc-94d6-72b70c3aca74"
},
"HKCU_cursor_shell": {
"exists": false,
"values": {}
},
"HKCU_cursor_command": {
"exists": false,
"values": {}
},
"HKCU_cursor_auth": {
"exists": false,
"values": {}
},
"HKCU_cursor_updates": {
"exists": false,
"values": {}
},
"HKCU_cursor_main": {
"exists": false,
"values": {}
}
},
"files": {
"storage": {
"exists": true,
"is_dir": false,
"size": 1891,
"modified_time": "2025-02-12T11:48:42.627574"
},
"storage_backup": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:48:26.403770"
},
"user_data": {
"exists": false,
"is_dir": null,
"size": null,
"modified_time": null
},
"global_storage": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:48:47.490659"
},
"cache": {
"exists": false,
"is_dir": null,
"size": null,
"modified_time": null
},
"updater": {
"exists": true,
"is_dir": false,
"size": 0,
"modified_time": "2025-02-10T17:19:39.071580"
}
},
"telemetry": {
"machineId": "758a7f7f7f79078f9f2c690514878ea3e8f064c0a49e837dd396db89df58429c",
"macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
"devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
"sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}"
}
}

View File

@@ -1,216 +0,0 @@
{
"package_json": {
"C:\\Users\\huangzhen\\AppData\\Local\\Programs\\Cursor\\resources\\app\\package.json": {
"homepage": "https://cursor.so",
"author": {
"name": "Cursor AI, Inc.",
"email": "hiring@cursor.so"
},
"productName": "Cursor",
"description": "Cursor is an AI-first coding environment.",
"main": "./out/main.js",
"dependencies": {
"@todesktop/runtime": "=1.6.1",
"@electron/asar": "^3.2.3",
"@anysphere/file-service": "0.0.0-73d604b6",
"@microsoft/1ds-core-js": "^3.2.13",
"@microsoft/1ds-post-js": "^3.2.13",
"@parcel/watcher": "2.5.0",
"@sentry/electron": "5.7.0",
"@sentry/node": "8.35.0",
"@types/semver": "^7.5.8",
"@vscode/deviceid": "^0.1.1",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/policy-watcher": "^1.1.8",
"@vscode/proxy-agent": "^0.27.0",
"@vscode/ripgrep": "^1.15.10",
"@vscode/spdlog": "^0.15.0",
"@vscode/sqlite3": "5.1.8-vscode",
"@vscode/sudo-prompt": "9.3.1",
"@vscode/tree-sitter-wasm": "^0.0.4",
"@vscode/vscode-languagedetection": "1.0.21",
"@vscode/windows-mutex": "^0.5.0",
"@vscode/windows-process-tree": "^0.6.0",
"@vscode/windows-registry": "^1.1.0",
"@xterm/addon-clipboard": "^0.2.0-beta.53",
"@xterm/addon-image": "^0.9.0-beta.70",
"@xterm/addon-ligatures": "^0.10.0-beta.70",
"@xterm/addon-search": "^0.16.0-beta.70",
"@xterm/addon-serialize": "^0.14.0-beta.70",
"@xterm/addon-unicode11": "^0.9.0-beta.70",
"@xterm/addon-webgl": "^0.19.0-beta.70",
"@xterm/headless": "^5.6.0-beta.70",
"@xterm/xterm": "^5.6.0-beta.70",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.2",
"jschardet": "3.1.4",
"kerberos": "2.1.1",
"minimist": "^1.2.6",
"multiformats": "^13.3.1",
"native-is-elevated": "0.7.0",
"native-keymap": "^3.3.5",
"native-watchdog": "^1.4.1",
"node-fetch": "2.7.0",
"node-pty": "1.1.0-beta22",
"open": "^8.4.2",
"tas-client-umd": "0.2.0",
"v8-inspect-profiler": "^0.1.1",
"vscode-oniguruma": "1.7.0",
"vscode-regexpp": "^3.1.0",
"vscode-textmate": "9.1.0",
"yauzl": "^3.0.0",
"yazl": "^2.4.3"
},
"name": "cursor",
"version": "0.45.11",
"type": "module",
"desktopName": "cursor-url-handler.desktop",
"overrides": {},
"tdBuildId": "250207y6nbaw5qc",
"email": "jrxqnsoz250264@nosqli.com",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
"updateUrl": "",
"disableUpdate": true,
"enableNodeApiUncaughtExceptionPolicy": true,
"nodeOptions": [
"--force-node-api-uncaught-exceptions-policy=true"
]
}
},
"storage_json": {
"telemetry.machineId": "b0cbb2d13ca4c983be40d31e010819f16adb3d6083598f1457094837bdaa3def",
"telemetry.macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
"telemetry.sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}",
"telemetry.devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
"backupWorkspaces": {
"workspaces": [],
"folders": [
{
"folderUri": "file:///d%3A/W/python/001cursro.app/interactive"
}
],
"emptyWindows": []
},
"windowControlHeight": 35,
"profileAssociations": {
"workspaces": {
"file:///d%3A/W/python/001cursro.app/interactive": "__default__profile__"
},
"emptyWindows": {}
},
"theme": "vs-dark",
"themeBackground": "#1f1f1f",
"windowSplash": {
"zoomLevel": 0,
"baseTheme": "vs-dark",
"colorInfo": {
"foreground": "#cccccc",
"background": "#1f1f1f",
"editorBackground": "#1f1f1f",
"titleBarBackground": "#181818",
"titleBarBorder": "#2b2b2b",
"activityBarBackground": "#181818",
"activityBarBorder": "#2b2b2b",
"sideBarBackground": "#181818",
"sideBarBorder": "#2b2b2b",
"statusBarBackground": "#181818",
"statusBarBorder": "#2b2b2b",
"statusBarNoFolderBackground": "#1f1f1f"
},
"layoutInfo": {
"sideBarSide": "left",
"editorPartMinWidth": 220,
"titleBarHeight": 35,
"activityBarWidth": 0,
"sideBarWidth": 300,
"statusBarHeight": 22,
"windowBorder": false
}
},
"windowsState": {
"lastActiveWindow": {
"folder": "file:///d%3A/W/python/001cursro.app/interactive",
"backupPath": "C:\\Users\\huangzhen\\AppData\\Roaming\\Cursor\\Backups\\385f155a4a13070be99ee4e76a057235",
"uiState": {
"mode": 0,
"x": 512,
"y": 192,
"width": 1024,
"height": 768
}
},
"openedWindows": []
}
},
"registry": {
"HKLM_MachineGuid": {
"exists": true,
"value": "1deb25e7-cdd4-4367-a347-fba8b33b9b03"
},
"HKCU_cursor_shell": {
"exists": false,
"values": {}
},
"HKCU_cursor_command": {
"exists": false,
"values": {}
},
"HKCU_cursor_auth": {
"exists": false,
"values": {}
},
"HKCU_cursor_updates": {
"exists": false,
"values": {}
},
"HKCU_cursor_main": {
"exists": false,
"values": {}
}
},
"files": {
"storage": {
"exists": true,
"is_dir": false,
"size": 1980,
"modified_time": "2025-02-12T12:37:17.428609"
},
"storage_backup": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T12:37:17.371311"
},
"user_data": {
"exists": false,
"is_dir": null,
"size": null,
"modified_time": null
},
"global_storage": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T12:37:14.253083"
},
"cache": {
"exists": false,
"is_dir": null,
"size": null,
"modified_time": null
},
"updater": {
"exists": true,
"is_dir": false,
"size": 0,
"modified_time": "2025-02-10T17:19:39.071580"
}
},
"telemetry": {
"machineId": "b0cbb2d13ca4c983be40d31e010819f16adb3d6083598f1457094837bdaa3def",
"macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
"devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
"sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}"
}
}

View File

@@ -1,244 +0,0 @@
{
"package_json": {
"C:\\Users\\huangzhen\\AppData\\Local\\Programs\\Cursor\\resources\\app\\package.json": {
"homepage": "https://cursor.so",
"author": {
"name": "Cursor AI, Inc.",
"email": "hiring@cursor.so"
},
"productName": "Cursor",
"description": "Cursor is an AI-first coding environment.",
"main": "./out/main.js",
"dependencies": {
"@todesktop/runtime": "=1.6.1",
"@electron/asar": "^3.2.3",
"@anysphere/file-service": "0.0.0-73d604b6",
"@microsoft/1ds-core-js": "^3.2.13",
"@microsoft/1ds-post-js": "^3.2.13",
"@parcel/watcher": "2.5.0",
"@sentry/electron": "5.7.0",
"@sentry/node": "8.35.0",
"@types/semver": "^7.5.8",
"@vscode/deviceid": "^0.1.1",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/policy-watcher": "^1.1.8",
"@vscode/proxy-agent": "^0.27.0",
"@vscode/ripgrep": "^1.15.10",
"@vscode/spdlog": "^0.15.0",
"@vscode/sqlite3": "5.1.8-vscode",
"@vscode/sudo-prompt": "9.3.1",
"@vscode/tree-sitter-wasm": "^0.0.4",
"@vscode/vscode-languagedetection": "1.0.21",
"@vscode/windows-mutex": "^0.5.0",
"@vscode/windows-process-tree": "^0.6.0",
"@vscode/windows-registry": "^1.1.0",
"@xterm/addon-clipboard": "^0.2.0-beta.53",
"@xterm/addon-image": "^0.9.0-beta.70",
"@xterm/addon-ligatures": "^0.10.0-beta.70",
"@xterm/addon-search": "^0.16.0-beta.70",
"@xterm/addon-serialize": "^0.14.0-beta.70",
"@xterm/addon-unicode11": "^0.9.0-beta.70",
"@xterm/addon-webgl": "^0.19.0-beta.70",
"@xterm/headless": "^5.6.0-beta.70",
"@xterm/xterm": "^5.6.0-beta.70",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.2",
"jschardet": "3.1.4",
"kerberos": "2.1.1",
"minimist": "^1.2.6",
"multiformats": "^13.3.1",
"native-is-elevated": "0.7.0",
"native-keymap": "^3.3.5",
"native-watchdog": "^1.4.1",
"node-fetch": "2.7.0",
"node-pty": "1.1.0-beta22",
"open": "^8.4.2",
"tas-client-umd": "0.2.0",
"v8-inspect-profiler": "^0.1.1",
"vscode-oniguruma": "1.7.0",
"vscode-regexpp": "^3.1.0",
"vscode-textmate": "9.1.0",
"yauzl": "^3.0.0",
"yazl": "^2.4.3"
},
"name": "cursor",
"version": "0.45.11",
"type": "module",
"desktopName": "cursor-url-handler.desktop",
"overrides": {},
"tdBuildId": "250207y6nbaw5qc",
"email": "jrxqnsoz250264@nosqli.com",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc"
}
},
"storage_json": {
"telemetry.machineId": "31b3701f1790cdb754bd8a02bad4913a9f8a3f04c9e19c519996be8c7b8cb561",
"telemetry.macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
"telemetry.sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}",
"telemetry.devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
"backupWorkspaces": {
"workspaces": [],
"folders": [
{
"folderUri": "file:///d%3A/W/python/001cursro.app/interactive"
},
{
"folderUri": "file:///d%3A/W/python/003cursorapiadmin"
}
],
"emptyWindows": [
{
"backupFolder": "1739329218500"
},
{
"backupFolder": "1739329245089"
}
]
},
"windowControlHeight": 35,
"profileAssociations": {
"workspaces": {
"file:///d%3A/W/python/001cursro.app/interactive": "__default__profile__",
"file:///d%3A/W/python/003cursorapiadmin": "__default__profile__"
},
"emptyWindows": {}
},
"theme": "vs-dark",
"themeBackground": "#1f1f1f",
"windowSplash": {
"zoomLevel": 0,
"baseTheme": "vs-dark",
"colorInfo": {
"foreground": "#cccccc",
"background": "#1f1f1f",
"editorBackground": "#1f1f1f",
"titleBarBackground": "#181818",
"titleBarBorder": "#2b2b2b",
"activityBarBackground": "#181818",
"activityBarBorder": "#2b2b2b",
"sideBarBackground": "#181818",
"sideBarBorder": "#2b2b2b",
"statusBarBackground": "#181818",
"statusBarBorder": "#2b2b2b",
"statusBarNoFolderBackground": "#1f1f1f"
},
"layoutInfo": {
"sideBarSide": "left",
"editorPartMinWidth": 220,
"titleBarHeight": 35,
"activityBarWidth": 0,
"sideBarWidth": 170,
"statusBarHeight": 22,
"windowBorder": false
}
},
"windowsState": {
"lastActiveWindow": {
"folder": "file:///d%3A/W/python/001cursro.app/interactive",
"backupPath": "C:\\Users\\huangzhen\\AppData\\Roaming\\Cursor\\Backups\\385f155a4a13070be99ee4e76a057235",
"uiState": {
"mode": 0,
"x": 512,
"y": 192,
"width": 1024,
"height": 768
}
},
"openedWindows": [
{
"folder": "file:///d%3A/W/python/001cursro.app/interactive",
"backupPath": "C:\\Users\\huangzhen\\AppData\\Roaming\\Cursor\\Backups\\385f155a4a13070be99ee4e76a057235",
"uiState": {
"mode": 0,
"x": 512,
"y": 192,
"width": 1024,
"height": 768
}
},
{
"folder": "file:///d%3A/W/python/003cursorapiadmin",
"backupPath": "C:\\Users\\huangzhen\\AppData\\Roaming\\Cursor\\Backups\\b6b8cfb24ed2ddb05d90d45cce5443e7",
"uiState": {
"mode": 0,
"x": 512,
"y": 192,
"width": 1024,
"height": 768
}
}
]
}
},
"registry": {
"HKLM_MachineGuid": {
"exists": true,
"value": "d890ab3d-43cd-40c8-a9ef-f5683b5a64e3"
},
"HKCU_cursor_shell": {
"exists": false,
"values": {}
},
"HKCU_cursor_command": {
"exists": false,
"values": {}
},
"HKCU_cursor_auth": {
"exists": false,
"values": {}
},
"HKCU_cursor_updates": {
"exists": false,
"values": {}
},
"HKCU_cursor_main": {
"exists": false,
"values": {}
}
},
"files": {
"storage": {
"exists": true,
"is_dir": false,
"size": 3427,
"modified_time": "2025-02-12T11:40:57.046415"
},
"storage_backup": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:00:01.555876"
},
"user_data": {
"exists": false,
"is_dir": null,
"size": null,
"modified_time": null
},
"global_storage": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:47:27.627883"
},
"cache": {
"exists": false,
"is_dir": null,
"size": null,
"modified_time": null
},
"updater": {
"exists": true,
"is_dir": false,
"size": 0,
"modified_time": "2025-02-10T17:19:39.071580"
}
},
"telemetry": {
"machineId": "31b3701f1790cdb754bd8a02bad4913a9f8a3f04c9e19c519996be8c7b8cb561",
"macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
"devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
"sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}"
}
}

View File

@@ -1,216 +0,0 @@
{
"package_json": {
"C:\\Users\\huangzhen\\AppData\\Local\\Programs\\Cursor\\resources\\app\\package.json": {
"homepage": "https://cursor.so",
"author": {
"name": "Cursor AI, Inc.",
"email": "hiring@cursor.so"
},
"productName": "Cursor",
"description": "Cursor is an AI-first coding environment.",
"main": "./out/main.js",
"dependencies": {
"@todesktop/runtime": "=1.6.1",
"@electron/asar": "^3.2.3",
"@anysphere/file-service": "0.0.0-73d604b6",
"@microsoft/1ds-core-js": "^3.2.13",
"@microsoft/1ds-post-js": "^3.2.13",
"@parcel/watcher": "2.5.0",
"@sentry/electron": "5.7.0",
"@sentry/node": "8.35.0",
"@types/semver": "^7.5.8",
"@vscode/deviceid": "^0.1.1",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/policy-watcher": "^1.1.8",
"@vscode/proxy-agent": "^0.27.0",
"@vscode/ripgrep": "^1.15.10",
"@vscode/spdlog": "^0.15.0",
"@vscode/sqlite3": "5.1.8-vscode",
"@vscode/sudo-prompt": "9.3.1",
"@vscode/tree-sitter-wasm": "^0.0.4",
"@vscode/vscode-languagedetection": "1.0.21",
"@vscode/windows-mutex": "^0.5.0",
"@vscode/windows-process-tree": "^0.6.0",
"@vscode/windows-registry": "^1.1.0",
"@xterm/addon-clipboard": "^0.2.0-beta.53",
"@xterm/addon-image": "^0.9.0-beta.70",
"@xterm/addon-ligatures": "^0.10.0-beta.70",
"@xterm/addon-search": "^0.16.0-beta.70",
"@xterm/addon-serialize": "^0.14.0-beta.70",
"@xterm/addon-unicode11": "^0.9.0-beta.70",
"@xterm/addon-webgl": "^0.19.0-beta.70",
"@xterm/headless": "^5.6.0-beta.70",
"@xterm/xterm": "^5.6.0-beta.70",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.2",
"jschardet": "3.1.4",
"kerberos": "2.1.1",
"minimist": "^1.2.6",
"multiformats": "^13.3.1",
"native-is-elevated": "0.7.0",
"native-keymap": "^3.3.5",
"native-watchdog": "^1.4.1",
"node-fetch": "2.7.0",
"node-pty": "1.1.0-beta22",
"open": "^8.4.2",
"tas-client-umd": "0.2.0",
"v8-inspect-profiler": "^0.1.1",
"vscode-oniguruma": "1.7.0",
"vscode-regexpp": "^3.1.0",
"vscode-textmate": "9.1.0",
"yauzl": "^3.0.0",
"yazl": "^2.4.3"
},
"name": "cursor",
"version": "0.45.11",
"type": "module",
"desktopName": "cursor-url-handler.desktop",
"overrides": {},
"tdBuildId": "250207y6nbaw5qc",
"email": "jrxqnsoz250264@nosqli.com",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhdXRoMHx1c2VyXzAxSktTUEJLQlIxOTNKMjY3RENSVDRTR1YyIiwidGltZSI6IjE3MzkyNTAzNDgiLCJyYW5kb21uZXNzIjoiYWIyNWVhYTYtNDQzZC00Y2Q0IiwiZXhwIjo0MzMxMjUwMzQ4LCJpc3MiOiJodHRwczovL2F1dGhlbnRpY2F0aW9uLmN1cnNvci5zaCIsInNjb3BlIjoib3BlbmlkIHByb2ZpbGUgZW1haWwgb2ZmbGluZV9hY2Nlc3MiLCJhdWQiOiJodHRwczovL2N1cnNvci5jb20ifQ.f3VIttCJLWqhkEZpPmWJlYw32FuV_gLWl9E0N-O9oIc",
"updateUrl": "",
"disableUpdate": true,
"enableNodeApiUncaughtExceptionPolicy": true,
"nodeOptions": [
"--force-node-api-uncaught-exceptions-policy=true"
]
}
},
"storage_json": {
"telemetry.machineId": "9eb67b11924f32572a67e6480ce4f1cabf3f61503aa4918af506b259527a4745",
"telemetry.macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
"telemetry.sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}",
"telemetry.devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
"backupWorkspaces": {
"workspaces": [],
"folders": [
{
"folderUri": "file:///d%3A/W/python/001cursro.app/interactive"
}
],
"emptyWindows": []
},
"windowControlHeight": 35,
"profileAssociations": {
"workspaces": {
"file:///d%3A/W/python/001cursro.app/interactive": "__default__profile__"
},
"emptyWindows": {}
},
"theme": "vs-dark",
"themeBackground": "#1f1f1f",
"windowSplash": {
"zoomLevel": 0,
"baseTheme": "vs-dark",
"colorInfo": {
"foreground": "#cccccc",
"background": "#1f1f1f",
"editorBackground": "#1f1f1f",
"titleBarBackground": "#181818",
"titleBarBorder": "#2b2b2b",
"activityBarBackground": "#181818",
"activityBarBorder": "#2b2b2b",
"sideBarBackground": "#181818",
"sideBarBorder": "#2b2b2b",
"statusBarBackground": "#181818",
"statusBarBorder": "#2b2b2b",
"statusBarNoFolderBackground": "#1f1f1f"
},
"layoutInfo": {
"sideBarSide": "left",
"editorPartMinWidth": 220,
"titleBarHeight": 35,
"activityBarWidth": 0,
"sideBarWidth": 300,
"statusBarHeight": 22,
"windowBorder": false
}
},
"windowsState": {
"lastActiveWindow": {
"folder": "file:///d%3A/W/python/001cursro.app/interactive",
"backupPath": "C:\\Users\\huangzhen\\AppData\\Roaming\\Cursor\\Backups\\385f155a4a13070be99ee4e76a057235",
"uiState": {
"mode": 0,
"x": 512,
"y": 192,
"width": 1024,
"height": 768
}
},
"openedWindows": []
}
},
"registry": {
"HKLM_MachineGuid": {
"exists": true,
"value": "948b93c1-ee34-4a48-95d0-a2fce9af92b1"
},
"HKCU_cursor_shell": {
"exists": false,
"values": {}
},
"HKCU_cursor_command": {
"exists": false,
"values": {}
},
"HKCU_cursor_auth": {
"exists": false,
"values": {}
},
"HKCU_cursor_updates": {
"exists": false,
"values": {}
},
"HKCU_cursor_main": {
"exists": false,
"values": {}
}
},
"files": {
"storage": {
"exists": true,
"is_dir": false,
"size": 2214,
"modified_time": "2025-02-12T12:36:27.187387"
},
"storage_backup": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T12:33:10.408749"
},
"user_data": {
"exists": false,
"is_dir": null,
"size": null,
"modified_time": null
},
"global_storage": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T12:37:14.253083"
},
"cache": {
"exists": false,
"is_dir": null,
"size": null,
"modified_time": null
},
"updater": {
"exists": true,
"is_dir": false,
"size": 0,
"modified_time": "2025-02-10T17:19:39.071580"
}
},
"telemetry": {
"machineId": "9eb67b11924f32572a67e6480ce4f1cabf3f61503aa4918af506b259527a4745",
"macMachineId": "ff2a4a580f6e9e484c830204bb502866e9a333d3e0299ef81c34e01940da953e",
"devDeviceId": "1ae7f91c-3ab8-448c-bbd3-ef34345a5b05",
"sqmId": "{D73E6881-666C-4182-8CB2-E2A3EED5AEFF}"
}
}

View File

@@ -15,14 +15,14 @@ a = Analysis(
datas=[('icon', 'icon'), ('version.txt', '.')],
hiddenimports=[
'win32gui', 'win32con', 'win32process', 'psutil', # Windows API 相关
'tkinter', 'tkinter.ttk', # GUI 相关
'PyQt5', 'PyQt5.QtCore', 'PyQt5.QtGui', 'PyQt5.QtWidgets', # GUI 相关
'requests', 'urllib3', 'certifi', # 网络请求相关
'json', 'uuid', 'hashlib', 'logging' # 基础功能相关
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
excludes=['_tkinter', 'tkinter', 'Tkinter'], # 排除 tkinter 相关模块
noarchive=False,
optimize=0,
)

View File

@@ -1,59 +0,0 @@
{
"package_json_changes": {},
"registry_changes": {
"HKLM_MachineGuid": {
"before": {
"exists": true,
"value": "d890ab3d-43cd-40c8-a9ef-f5683b5a64e3"
},
"after": {
"exists": true,
"value": "776c6b6c-195f-42dc-94d6-72b70c3aca74"
}
}
},
"file_changes": {
"storage": {
"before": {
"exists": true,
"is_dir": false,
"size": 3427,
"modified_time": "2025-02-12T11:40:57.046415"
},
"after": {
"exists": true,
"is_dir": false,
"size": 1891,
"modified_time": "2025-02-12T11:48:42.627574"
}
},
"storage_backup": {
"before": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:00:01.555876"
},
"after": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:48:26.403770"
}
},
"global_storage": {
"before": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:47:27.627883"
},
"after": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:48:47.490659"
}
}
}
}

File diff suppressed because it is too large Load Diff

BIN
icon/logo1.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
icon/logo2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
icon/logo3.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

61
main.py
View File

@@ -1,9 +1,31 @@
import logging
import sys
import traceback
import os
import atexit
import shutil
import tempfile
from pathlib import Path
from PyQt5.QtWidgets import QApplication, QMessageBox, QSystemTrayIcon, QMenu
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import Qt
from gui.main_window import MainWindow
def cleanup_temp():
"""清理临时文件"""
try:
temp_dir = Path(tempfile._get_default_tempdir())
for item in temp_dir.glob('_MEI*'):
try:
if item.is_dir():
shutil.rmtree(str(item), ignore_errors=True)
elif item.is_file():
item.unlink()
except:
pass
except:
pass
def setup_logging():
"""设置日志"""
try:
@@ -27,6 +49,9 @@ def setup_logging():
def main():
"""主函数"""
try:
# 注册退出时的清理函数
atexit.register(cleanup_temp)
setup_logging()
# 检查Python版本
@@ -41,17 +66,45 @@ def main():
logging.info(f" - {p}")
logging.info("正在初始化主窗口...")
app = QApplication(sys.argv)
# 设置应用程序ID (在设置图标之前)
if sys.platform == "win32":
import ctypes
myappid = u'nezha.cursor.helper.v3'
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
logging.info(f"设置应用程序ID: {myappid}")
# 设置应用程序图标
try:
icon_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "icon", "two.ico")
if os.path.exists(icon_path):
app_icon = QIcon(icon_path)
if not app_icon.isNull():
app.setWindowIcon(app_icon)
logging.info(f"成功设置应用程序图标: {icon_path}")
else:
logging.error("图标文件加载失败")
else:
logging.error(f"图标文件不存在: {icon_path}")
except Exception as e:
logging.error(f"设置应用程序图标失败: {str(e)}")
window = MainWindow()
window.setWindowIcon(app.windowIcon()) # 确保窗口使用相同的图标
logging.info("正在启动主窗口...")
window.run()
window.show()
sys.exit(app.exec_())
except Exception as e:
error_msg = f"程序运行出错: {str(e)}\n{traceback.format_exc()}"
logging.error(error_msg)
# 使用tkinter的消息框显示错误
from tkinter import messagebox
messagebox.showerror("错误", error_msg)
# 使用 QMessageBox 显示错误
app = QApplication(sys.argv)
QMessageBox.critical(None, "错误", error_msg)
sys.exit(1)
if __name__ == "__main__":
main()

View File

@@ -1,4 +1,9 @@
# Use Tsinghua mirror for faster download in China:
# pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
requests==2.31.0
pyinstaller==6.3.0
pillow==10.2.0 # 用于处理图标
setuptools==65.5.1 # 解决pkg_resources.extern问题
pillow==10.2.0 # For icon processing
setuptools==65.5.1 # Fix pkg_resources.extern issue
PyQt5==5.15.10 # GUI framework
pywin32==306 # Windows API support

View File

@@ -1,106 +0,0 @@
{
"github_changes": {
"package_json_changes": {},
"registry_changes": {
"HKLM_MachineGuid": {
"before": {
"exists": true,
"value": "d890ab3d-43cd-40c8-a9ef-f5683b5a64e3"
},
"after": {
"exists": true,
"value": "776c6b6c-195f-42dc-94d6-72b70c3aca74"
}
}
},
"file_changes": {
"storage": {
"before": {
"exists": true,
"is_dir": false,
"size": 3427,
"modified_time": "2025-02-12T11:40:57.046415"
},
"after": {
"exists": true,
"is_dir": false,
"size": 1891,
"modified_time": "2025-02-12T11:48:42.627574"
}
},
"storage_backup": {
"before": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:00:01.555876"
},
"after": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:48:26.403770"
}
},
"global_storage": {
"before": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:47:27.627883"
},
"after": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T11:48:47.490659"
}
}
}
},
"our_changes": {
"package_json_changes": {},
"registry_changes": {
"HKLM_MachineGuid": {
"before": {
"exists": true,
"value": "948b93c1-ee34-4a48-95d0-a2fce9af92b1"
},
"after": {
"exists": true,
"value": "1deb25e7-cdd4-4367-a347-fba8b33b9b03"
}
}
},
"file_changes": {
"storage_backup": {
"before": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T12:33:10.408749"
},
"after": {
"exists": true,
"is_dir": true,
"size": null,
"modified_time": "2025-02-12T12:37:17.371311"
}
},
"storage": {
"before": {
"exists": true,
"is_dir": false,
"size": 2214,
"modified_time": "2025-02-12T12:36:27.187387"
},
"after": {
"exists": true,
"is_dir": false,
"size": 1980,
"modified_time": "2025-02-12T12:37:17.428609"
}
}
}
}
}

View File

@@ -1 +1 @@
3.2.6
3.3.4