fix(web): keep model picker shortcuts in sync (#5400)
This commit is contained in:
1 parent
9697b765e5
commit
37d3667de4
1 file changed
+5
-1
@@ -541,6 +541,10 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
|
||||
}
|
||||
return mapping.size > 0 ? mapping : EMPTY_MODEL_JUMP_LABELS;
|
||||
}, [keybindings, modelJumpCommandByKey, modelJumpShortcutContext]);
|
||||
const modelListExtraData = useMemo(
|
||||
() => ({ favoritesSet, modelJumpLabelByKey }),
|
||||
[favoritesSet, modelJumpLabelByKey],
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const onWindowKeyDown = (event: globalThis.KeyboardEvent) => {
|
||||
@@ -710,7 +714,7 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
|
||||
<LegendList<string>
|
||||
ref={modelListRef}
|
||||
data={filteredItemKeys}
|
||||
extraData={favoritesSet}
|
||||
extraData={modelListExtraData}
|
||||
keyExtractor={(modelKey) => modelKey}
|
||||
renderItem={({ item: modelKey, index }) => {
|
||||
if (legacySection?.key === modelKey) {
|
||||
|
||||
Reference in new issue
Block a user