mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-24 06:45:22 +00:00
fix: show all provider models when no providers connected
When no providers were connected, the model dialog would hide models that were in the recent list, but the recent section wasn't being displayed. This caused models to completely disappear. The filter was checking recentList (which only contained non-favorite recent items) instead of recents (all recent items), causing models to be incorrectly filtered out of the main provider list when the recent section wasn't shown.
This commit is contained in:
@@ -158,7 +158,7 @@ export function DialogModel(props: { providerID?: string }) {
|
||||
(item) => item.providerID === value.providerID && item.modelID === value.modelID,
|
||||
)
|
||||
if (inFavorites) return false
|
||||
const inRecents = recentList.some(
|
||||
const inRecents = recents.some(
|
||||
(item) => item.providerID === value.providerID && item.modelID === value.modelID,
|
||||
)
|
||||
if (inRecents) return false
|
||||
|
||||
Reference in New Issue
Block a user