mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
fix(native-chat): keep a pending hidden model pick listed
This commit is contained in:
@@ -222,7 +222,7 @@ export function descriptorRowElements(
|
||||
/>
|
||||
)
|
||||
// No search here, so search-only rows stay out; folded ones follow a More models toggle.
|
||||
const listed = choices.filter((choice) => !choice.hidden)
|
||||
const listed = choices.filter((choice) => !choice.hidden || choice.value === currentValue)
|
||||
const more = moreChoices ? listed.filter((choice) => choice.legacy) : []
|
||||
return [
|
||||
...listed.filter((choice) => !choice.legacy).map(choiceRow),
|
||||
|
||||
+4
-1
@@ -55,7 +55,10 @@ export function NativeChatModelCombobox({
|
||||
const searching = Boolean(query.trim())
|
||||
// Membership ignores the selection, so picking a model never moves rows in the open list.
|
||||
const folded = (choice: SessionOptionSelectChoice) => !searching && Boolean(choice.legacy)
|
||||
const listed = searching ? choices : choices.filter((choice) => !choice.hidden)
|
||||
// The current value stays listed even while a pending pick still carries its hidden flag.
|
||||
const listed = choices.filter(
|
||||
(choice) => searching || !choice.hidden || choice.value === currentValue
|
||||
)
|
||||
const legacyChoices = listed.filter(folded)
|
||||
const renderChoice = (choice: SessionOptionSelectChoice) => {
|
||||
const label = nativeChatSessionChoiceLabel(choice, say)
|
||||
|
||||
Reference in New Issue
Block a user