繁體中文

新功能

Homebrew 安裝後,設定狀態列不再走錯路

你用 Homebrew 安裝 Usage,卻看到「跑 python3 main.py --setup」時,現在不會再被帶進死巷。Homebrew(macOS 的套件安裝工具)裝的是應用程式,沒有原始碼資料夾;以前畫面下方的提示仍叫你照原始碼使用者的方式跑指令。你若翻進應用程式包裡執行 main.py,還會撞上看似無關的 ImportError,因為它必須由 py2app(把 Python 程式包成 macOS App 的工具)隨附的解譯器啟動。現在兩種提示都改指向「Set Up Status Line」按鈕,按一下就能設定顯示在終端機最底下的狀態列;直接誤跑內附的 main.py 時,也會明說為何不能這樣開。像買了組裝好的咖啡機,說明書不再叫你拆機找零件,而是帶你按面板上的設定鍵。

English

FEATURE

Homebrew installs now point you to the right status-line setup

If you installed Usage through Homebrew and saw python3 main.py --setup, that instruction no longer sends you down a dead end. Homebrew installs an app, not a source-code folder, but the footer once gave cask users the directions meant for people who cloned the repository. Digging into the app bundle and running its main.py only produced a misleading ImportError, because it needs the interpreter packaged by py2app. Both messages now point to the “Set Up Status Line” button, which does the job in one click for every type of install. And if the bundled main.py is launched directly, it explains why it cannot run that way. It is like buying an assembled coffee machine: the manual now points to its setup button instead of telling you to open the casing and hunt for parts.

原始 CHANGELOG

Original changelogHomebrew 安裝後,設定狀態列不再走錯路
**The app told Homebrew users to run a command that cannot work.** With no status file on disk, the popover footer said `Run python3 main.py --setup and open Claude Code once` — an instruction written for people who cloned the repo. Someone who installed the cask has no repo, so the natural next move is to look inside the bundle, and `main.py` really is in there: py2app copies it to `Contents/Resources/`. Running that copy with the system `python3` dies on `ImportError: cannot import name 'packaged_resource_path' from 'i18n'`, which points at the wrong thing entirely. The modules `main.py` imports are compiled into `lib/python313.zip`, and only the bundle's own interpreter has that on `sys.path`; with the real `i18n.py` unreachable, an unrelated PyPI package also named `i18n` in the user's site-packages answers the import instead. Both footer messages now name the "Set Up Status Line" button, which does the same job in one click and exists in every install regardless of how it was obtained. The bundled `main.py` additionally exits with an explanation when it is started without py2app's `RESOURCEPATH`, so the dead end says what it is instead of raising. (#92, reported by @kyang-06)