usage

usage 0.29.22

工具與目錄
在這頁

新功能 1 項

01

自訂 Codex 資料夾不再變成空白頁

你把 Codex 資料放到另一個地方時,usage 原本可能把它當成不存在,畫面只留空白的 Codex 區塊,還不告訴你原因。問題出在 CODEX_HOME 環境變數(程式啟動前交給它的隱藏設定):它本來能指定 Codex 資料夾,適合多個帳號或容器化設定,但 usage 裡讀取資料的七個入口仍死盯著預設的 ~/.codex/。像搬家後把新住址寫在信封上,七位送件員卻全往舊址跑。現在它們先交給同一個 codex_paths.codex_home() 幫手確認地址;有 CODEX_HOME 就照它找,沒設才回到 ~/.codex/。因此自訂資料夾的使用者能重新看到 Codex 資料。

官方原文

**Codex data was unreadable for anyone with a custom CODEX_HOME.** Every path into Codex's local data (codex_loader.py, adapters/codex.py, session_hooks.py, setup_hook.py, fsevents_watch.py, menubar_state.py, analyzer/subscription.py) was hardcoded to ~/.codex/..., so anyone who set the CODEX_HOME environment variable — multiple accounts, containerized setups — got an empty Codex section with no explanation. All of them now resolve through a single codex_paths.codex_home() helper that honors CODEX_HOME and falls back to ~/.codex/ when it's unset.