Skip to content

Commit c57d9af

Browse files
committed
[front] - feature: add scrollable area to model selection dropdown
- Introduced a scrollable area within the model selection dropdown to enhance usability for long lists of models - Separated "Best performing models" and "Other models" into distinct sections within the scrollable area for better organization
1 parent 6f1ef4a commit c57d9af

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

front/components/assistant_builder/InstructionScreen.tsx

+22-19
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
DropdownMenuTrigger,
99
Page,
1010
Popover,
11+
ScrollArea,
1112
Spinner,
1213
} from "@dust-tt/sparkle";
1314
import type {
@@ -402,25 +403,27 @@ function AdvancedSettings({
402403
</DropdownMenuTrigger>
403404
<DropdownMenuContent>
404405
<DropdownMenuLabel label="Best performing models" />
405-
<ModelList
406-
modelConfigs={bestPerformingModelConfig}
407-
onClick={(modelSettings) => {
408-
setGenerationSettings({
409-
...generationSettings,
410-
modelSettings,
411-
});
412-
}}
413-
/>
414-
<DropdownMenuLabel label="Other models" />
415-
<ModelList
416-
modelConfigs={otherModelsConfig}
417-
onClick={(modelSettings) => {
418-
setGenerationSettings({
419-
...generationSettings,
420-
modelSettings,
421-
});
422-
}}
423-
/>
406+
<ScrollArea className="max-h-[300px]">
407+
<ModelList
408+
modelConfigs={bestPerformingModelConfig}
409+
onClick={(modelSettings) => {
410+
setGenerationSettings({
411+
...generationSettings,
412+
modelSettings,
413+
});
414+
}}
415+
/>
416+
<DropdownMenuLabel label="Other models" />
417+
<ModelList
418+
modelConfigs={otherModelsConfig}
419+
onClick={(modelSettings) => {
420+
setGenerationSettings({
421+
...generationSettings,
422+
modelSettings,
423+
});
424+
}}
425+
/>
426+
</ScrollArea>
424427
</DropdownMenuContent>
425428
</DropdownMenu>
426429
</div>

0 commit comments

Comments
 (0)