Skip to content

zcode-cli 3.8.1-29

Choose a tag to compare

@xhqing xhqing released this 06 Sep 02:40
· 16 commits to main since this release

Always show the sign-in state in the TUI welcome banner

  • Always show the sign-in state in the TUI welcome banner: every boot state now renders an identity status line, no more blank space (packages/zcode-tui/src/index.ts, packages/zcode-tui/src/login-identity.ts, packages/zcode-tui/src/welcome-banner.ts, test/welcome-banner.test.ts, scripts/smoke-tui.ts; version bumped to 3.8.1-29 across VERSION, package.json, test/update.test.ts, and the three READMEs' badges and install URLs).
    • Why: the user reported that running zcode showed no sign-in information in the welcome banner — you could not tell whether the session was Signed in or Not signed in. Signed-in (OAuth / key) and custom-provider boots already had their identity line (the system built in 3.8.1-26 / 27); only the unconfigured-model-access loginRequired boot was blank — the identity was hard-set to undefined in that state so the banner rendered no identity line, and after 3.8.1-28 removed the persistent warnings there was nothing left at all.
    • What changed: the TUI adds readBannerIdentity() — when loginRequired=true (the unauthenticated boot where the runtime skips model loading) or the identity snapshot read fails / returns undefined (nothing configured at all), it falls back to a signedOut identity so the banner shows "Not signed in"; both the first paint (run()) and the identity refresh (refreshLoginIdentity()) now go through it. Status-bar metadata behavior is unchanged (signedOut still emits no user / key fields); the snapshot function readLoginIdentitySnapshot() and its undefined semantics stay untouched (other callers such as zcode identity are unaffected — the undefined fallback exists only at the banner layer).
    • Traceability & regression assessment: what 3.8.1-28 removed was guiding warning copy ("Model access is not configured. / Run /login..."), while this change adds a factual state line ("Not signed in" / "Signed in as ..." / "API key ...") — different in nature, and this was an explicit user request ("please add the default sign-in state"), so it is not a regression; the identity priority established in 3.8.1-26 / 27 (OAuth account name > key mapping name > masked key > signedOut) is fully unchanged, only adding the display fallback for the undefined case.
    • Verification: tsc --noEmit passes; full bun test 691 pass / 0 fail (78 files; welcome-banner adds two cases for the signedOut identity line in wide / compact layouts); TUI smoke all 5 green (smoke-tui's first screen gains a "Not signed in" assertion — a pristine HOME's loginRequired boot shows the line from the very first paint); after build:tui the vendored @zcode/tui copy was synced manually following the installLocalTui step (the runtime itself is unchanged).

Install

npm install -g https://github.com/xhqing/zcode-cli/releases/download/v3.8.1-29/zcode-cli-3.8.1-29.tgz