mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
`dev login` opened a browser for ChatGPT and had no way to reach the account the tool actually runs on. It now offers the four credentials that exist — Hanzo account, ChatGPT account, or a pasted key for either — with Hanzo first and selected, because Hanzo is the provider the default config names. A pasted key lands in the profile's own file, written through a temporary file so a failed write cannot truncate a working credential, and readable only by its owner. It is separate from auth.json, which the Hanzo tools share. Logout was the defect worth the most here: `run_logout` exits the process, so every statement after it was unreachable. On the default provider the Hanzo credential was never cleared at all, and the command still printed success — a logout that left the account readable. The Hanzo side is cleared first now, on every path, and a failure on one side no longer stops the other. Activating the Hanzo provider also writes the provider table when the profile lacks it, so switching to Hanzo in an older profile no longer names a provider that is not defined. Co-authored-by: Hanzo Dev <[email protected]>