Repository navigation
Conversation
There was a problem hiding this comment.
This looks correct. I reproduced #66112 on the base with the issue's drive script: a TUI started from the project root with --session on a session in a sub-folder, then /models, shows the "Free models" page. With this PR the same run shows the normal picker with the provider's model (screenshots below). The new component test fails on the base and passes here, and the nearby dialog-model and connected-provider tests pass.
useLocation().ref falls back to the default location when no ref is set, so behaviour in the launch directory is unchanged. All callers of useConnected() render inside LocationProvider, so the new useLocation() call is safe there.
The public API is unchanged.
No blocking concerns.
Related: #60590
|
This overlaps with #60852, which made the same |
The model dialog read integration/provider/model lists for the startup directory, so starting the TUI directly into a session in another directory fell back to the free models page. Use the session location instead, matching the sidebar onboarding check.
d6ba93e to
796f63b
Compare
There was a problem hiding this comment.
The new commit is a rebase onto the latest dev with the same change. I re-ran the #66112 reproduction on the new base and with this PR. The base still opens the "Free models" page for a session in another directory, and the PR shows the normal picker (screenshots below). The new test still fails on the base and passes here, and the nearby tests pass.
The public API is unchanged.
No new concerns.
|
Fixed by #66424, which landed the same |


Issue for this PR
Closes #66112
Type of change
What does this PR do?
useConnected()read the integration/provider/model lists with no location, so they came from the directory the TUI was launched in. Starting the TUI directly in a session whose directory differs from that launch directory left those lists empty, and/modelsfell back to "Free models". This passes the session'suseLocation().refinstead, matching the sidebar onboarding check.How did you verify your code works?
Added a component test in
packages/tui/test/component/dialog-model.test.tsx(connected check uses the session location, not the launch directory). It renders "Free models" before this change while the session directory has a provider and a non-free model, and passes after.cd packages/tui && bun test test/component/dialog-model.test.tsx-> 3 passbun test test/util/connected-provider.test.ts-> 7 passbun typecheck-> no errorsbun run check(repo root) -> 36/36 tasksScreenshots / recordings
Not applicable; covered by the component test.
Checklist
Added by the opencode bot (AI-generated).
Related: #60590