Skip to content

v13

Choose a tag to compare

@LeoOfGit LeoOfGit released this 06 Jun 14:03
· 4 commits to main since this release

🇺🇸 [v13] - User site-packages Integration, Drag-and-Drop Reordering, Batch Import & Proxy Sync

🇨🇳 [v13] - 用户目录包融合、拖拽排序、批量导入与代理同步 (中文说明)

本次更新支持了对系统 Python 用户站点包(User site-packages)的自动探测与深度融合管理。完美解决了第三方包安装在用户漫游目录下导致主程序遗漏读取的问题,并提供鼠标悬停物理路径提示,保障了在任何权限场景下的平滑运行。同时引入了主界面环境卡片拖拽重排、右键删除、快捷批量导入,以及代理配置同源同步等提升用户体验的重大改进。

📦 用户目录包(User-Site)深度融合与并列展示

  • 双路径并发扫描:全面打破系统 site-packages 和 用户 user-site 之间的壁垒。程序在扫描系统环境包时,会自动探测其 site.getusersitepackages() 物理路径,并执行并发读取与合并。
  • 支持并列展示与冗余可见:彻底去除了对包名的强制去重合并字典。如果系统全局和用户目录下同时安装了同名包,OmniPack 将并列完整展示,让用户轻松发现冗余并自主决策。
  • 特异性依赖树组装:重构了 merge_dependency_info 依赖树合并机制。现在,即便存在同名冗余包,所有的实例实体均能正确绑定并展现出各自完备的依赖拓扑图,不存在任何依赖项丢失。
  • 树状就近定位路由:当展开父卡片懒加载子依赖时,算法会根据父节点的安装位置(系统/用户)执行就近匹配;如果只有单方安装,则安全跨目录跨路由关联。

🔄 主界面拖拽重排与右键管理

  • 直观的环境卡片拖拽:在 Pip 和 Npm 环境列表中,用户可以直接使用鼠标拖动环境卡片进行排序。在拖动过程中提供了亮蓝色的放置指示线,调整后的顺序会自动同步保存至配置文件(omnipack_config.json)。
  • 右键上下文菜单删除:在环境卡片 Header 上点击右键可快速唤出上下文菜单,一键删除/移除该环境,无需再进入设置对话框进行繁琐操作。

➕ 列表底部快捷添加环境与批量导入

  • 常驻快捷按钮:在 Pip 和 Npm 面板环境列表底部新增了“➕ Add Environment”常驻按钮,使添加环境更加便捷。
  • 多通道添加与批量导入 (Batch Paste):支持选择“项目/虚拟环境文件夹”、“python.exe/package.json 配置文件”、或“手动输入路径”。此外,新增了**“Batch Paste... (批量粘贴)”**功能,允许用户直接从 Windows 资源管理器或 Everything 中复制多行路径一键导入,极大提升了多项目导入的效率。

🎨 包名高亮染色与悬停物理路径

  • 亮黄字体染色:去除了原有的 [User] 徽章,改用精美的亮黄色(#ffb703)直接对用户目录包的包名进行高亮染色,保持了极简清爽的现代暗黑 UI 美学。
  • 悬停 Tooltip 物理路径:无论在何层级、何深度的依赖卡片,只要将鼠标悬停在包名上,Tooltip 就会瞬间呈现出包在硬盘上的具体物理安装路径(如系统包显示为 C:\Program Files\...,用户包显示为 C:\Users\Leo\...),让物理布局一目了然。

🖥️ 系统/用户环境变量卡片 Tooltip 悬停显示

  • 移除 [PATH] 后缀:清理了 Python 与 Node.js 环境卡片标题后原本追加的 [PATH] 后缀。
  • 智能系统/用户变量识别:通过 Windows 注册表精确判断 Python 与 npm 路径归属:
    • 如果在系统环境变量中找到(无论用户变量中是否也存在),鼠标悬停在卡片名称上时会通过 Tooltip 提示 "In the System Variables"。
    • 如果仅在用户环境变量中找到,Tooltip 会提示 "In the User Variables"。

⚙️ 智能 PTY 命令分流与权限安全兜底 & 代理配置优化

  • 带位置标签的 Target 传输:UI 层与 PTY 交互时,包卡片将向操作队列注入如 numpy:user 或 numpy:system 等位置标签,命令行构建器根据标签智能生成卸载/升级命令(分流为 --target <user-site-path> 或 --system --python ...)。
  • 无特权安装 Fallback 兜底:在系统 Python 下安装或升级新包时,一旦探测到主程序运行在普通用户特权下(无管理员特权),会自动降级并使用 --target <user-site-path> 将包安装到用户目录中,彻底规避因写保护引起的 Permission Denied 错误,实现零报错流畅体验。
  • 代理配置同源同步 (Same for HTTP and HTTPS):在 Settings -> Proxy 设置中,增加了 “Same for HTTP and HTTPS” 复选框。勾选后,HTTPS 代理配置将自动同步并锁定为 HTTP 代理配置的值,避免了重复输入的冗余操作。

This release integrates full support for Python user site-packages (--user installs) into OmniPack's ecosystem. It resolves the problem where packages installed in the user's roaming directory were hidden from the UI, introducing a clean, badge-free color-highlighting scheme, hover-based physical path tooltips, and non-deduped parallel dependency chains for perfect environment visualization and smart permissions fallback. Furthermore, it introduces major user experience enhancements, including direct drag-and-drop reordering, right-click environment deletion, multi-channel batch path paste import, and unified HTTP/HTTPS proxy synchronization.

📦 Deep User-Site Integration & Dual-Path Parallel Scan

  • Bilingual Parallel Detection: OmniPack now automatically queries site.getusersitepackages() for system Python environments and launches concurrent listings of global site-packages and user site-packages.
  • Deduplication Removal for Redundant Visibility: Eliminated the dictionary-based name deduplication. When a package is installed in both system and user directories (possibly at different versions), OmniPack lists them side-by-side, allowing users to spot redundancies and choose which one to manage.
  • Instance-Level Dependency Merger: Refactored merge_dependency_info to enrich all concurrent instances of a package with tree dependencies, avoiding the issue where one of the duplicates appeared as a leaf or isolated node.
  • Location-Aware Child Resolution: When lazy-loading dependencies, child cards prioritize matching the parent node's location (system vs. user). If a mismatch occurs, the tree safely links across paths and inherits the correct style and path.

🔄 In-App Drag-and-Drop Reordering & Quick Management

  • Visual Drag-and-Drop: Users can now drag environment cards within Pip and Npm lists to reorder them directly. A bright-blue position indicator line assists during sorting, and the updated order is dynamically written to omnipack_config.json.
  • Right-Click Context Menu: Right-clicking the header of any environment card now opens a context menu allowing users to instantly delete/remove the environment, eliminating the need to use the settings dialog.

➕ Add Environment Shortcuts & Batch Paste

  • On-Panel Add Button: A permanent "➕ Add Environment" button is integrated at the bottom of the environment lists in Pip and Npm panels for easier management.
  • Multi-Channel Import with Batch Paste: Added options to add environments via folder picker, file browser (e.g., python.exe or package.json), or raw manual path input. Additionally, a new "Batch Paste..." option is introduced, permitting users to paste multiple paths (e.g. copied from File Explorer or Everything) to import them in a single batch.

🎨 Hover-to-Path Tooltips & Clean Color Highlight

  • Bespoke Yellow Highlighting: Replaced the [User] badge with an elegant bright-yellow (#ffb703) styling directly on the package name label for user-site installations, keeping the modern dark-themed aesthetic clean.
  • Physical Path Hover Tooltips: Hovering over any package name in the list displays its exact installation path (e.g., C:\Program Files\... for system packages and C:\Users\<User>\... for user packages) at any level of the dependency tree.

🖥️ Smart System/User PATH Environment Variable Tooltips

  • Removed [PATH] Suffixes: Removed the legacy [PATH] string appended to the title of Python and Node.js environment cards for a cleaner dark UI.
  • Dynamic Registry/PATH Tooltips: Uses dynamic Windows Registry validation to intelligently identify if a Python or npm executable is globally available:
    • If located in the System Environment Variables (even if duplicated in the User space), the card's title hover tooltip will display "In the System Variables".
    • If isolated only to the User Environment Variables, the tooltip will display "In the User Variables".

⚙️ Location-Aware PTY Commands & Permissions Fallback & Proxy Sync

  • Target Location Tagging: Package rows now generate target actions containing position markers (like numpy:user vs. numpy:system). The command builder parses these to automatically select --target <user-site-path> or --system --python <path>.
  • Non-Admin Installation Fallback: When installing or updating packages on a system Python without administrator privileges, OmniPack automatically routes the install command to the user site-packages directory via --target, resolving Permission Denied write errors on protected directories.
  • Unified Proxy Option: Added a "Same for HTTP and HTTPS" checkbox in Settings -> Proxy. When checked, the HTTPS proxy input is disabled and locked to automatically synchronize with the HTTP proxy value, simplifying the proxy configuration.