Skip to content

Commit 5b52035

Browse files
TonybynMp4claude
andcommitted
refactor(web): simplify favoritesSet initializer
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent bbbeff6 commit 5b52035

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎apps/web/src/components/chat/ModelPickerContent.tsx‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,7 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
433433
return favorites.length > 0 ? "favorites" : props.activeInstanceId;
434434
},
435435
);
436-
const favoritesSet = (() => {
437-
return new Set(favorites.map((fav) => providerModelKey(fav.provider, fav.model)));
438-
})();
436+
const favoritesSet = new Set(favorites.map((fav) => providerModelKey(fav.provider, fav.model)));
439437
const [expandedLegacyInstances, setExpandedLegacyInstances] = useState(() => {
440438
// Auto-expand the legacy group only when the active model actually lives
441439
// there. A favorited legacy model is hoisted into the main list, so

0 commit comments

Comments
 (0)