Repository navigation
feat(tui): gate the prompt footer model indicator on configured providers - #33
Merged
Merged
Conversation
…ders PR #30 hid the footer's model/provider indicator whenever the current provider id was `opencode`/`opencode-go`, which also suppressed it for a user who deliberately authenticated OpenCode / OpenCode-Go. The intent was only to hide the free hosted Zen default while nothing is configured. Gate the indicator on the shared `useConnected()` predicate instead — the same "a real provider is configured" signal `app.tsx`'s startup dialog and the provider/model pickers already use. `connected()` is false only in the unconfigured default state (sole provider is free hosted `opencode`), so a configured gateway/real provider, or a deliberately-authenticated opencode/opencode-go, shows its model normally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #30. That PR gated the prompt footer's model/provider indicator on
!isHostedZenModel(), matching the current provider id (opencode/opencode-go). That over-reaches: it also hides the indicator for a user who deliberately authenticated OpenCode / OpenCode-Go.The actual intent is to suppress the model/provider prose only in the unconfigured default state — where upstream's free hosted Zen (
opencode) is the sole provider and the user has configured nothing.This swaps the gate to the fork's existing
useConnected()predicate (packages/tui/src/component/use-connected.tsx) — the same "a real provider is configured" signal already used byapp.tsx's startup configure dialog and the provider/model pickers.Build— model/provider hiddenaigateway/ real provider)Build · <model> · <provider>Build · <model> · <provider>— the case #30 wrongly hidWhy
connected()is false only when the sole provider is the free hostedopencode(all models cost 0). Keying off configuration state rather than provider identity means the footer stays hidden by default but respects a user who intentionally connects any provider, including OpenCode itself.Notes
useConnected()instead of a bespoke provider-id memo, so the footer, startup gate, and pickers now share one predicate.DIVERGENCES.mdentry updated to describe the new gate.bun typecheckclean;bun testinpackages/tuishows 189 pass with 2 failures that are pre-existing onmain(app.exit ... epilogue,formats session continuation summary) and unrelated to this change.🤖 Generated with Claude Code