Unified · Split
| @@ -541,6 +541,10 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: { · 540 unmodified lines | ||
| 541 | 541 | } |
| 542 | 542 | return mapping.size > 0 ? mapping : EMPTY_MODEL_JUMP_LABELS; |
| 543 | 543 | }, [keybindings, modelJumpCommandByKey, modelJumpShortcutContext]); |
| 544 | + const modelListExtraData = useMemo( | |
| 545 | + () => ({ favoritesSet, modelJumpLabelByKey }), | |
| 546 | + [favoritesSet, modelJumpLabelByKey], | |
| 547 | + ); | |
| 544 | 548 | |
| 545 | 549 | useEffect(() => { |
| 546 | 550 | const onWindowKeyDown = (event: globalThis.KeyboardEvent) => { |
| @@ -710,7 +714,7 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: { · 163 unmodified lines | ||
| 710 | 714 | <LegendList<string> |
| 711 | 715 | ref={modelListRef} |
| 712 | 716 | data={filteredItemKeys} |
| 713 | − extraData={favoritesSet} | |
| 717 | + extraData={modelListExtraData} | |
| 714 | 718 | keyExtractor={(modelKey) => modelKey} |
| 715 | 719 | renderItem={({ item: modelKey, index }) => { |
| 716 | 720 | if (legacySection?.key === modelKey) { |