Skip to content

Commit

Permalink
[front] - feature: add scrollable area to model selection dropdown
Browse files Browse the repository at this point in the history
 - 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
  • Loading branch information
JulesBelveze committed Nov 15, 2024
1 parent 6f1ef4a commit c57d9af
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions front/components/assistant_builder/InstructionScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
DropdownMenuTrigger,
Page,
Popover,
ScrollArea,
Spinner,
} from "@dust-tt/sparkle";
import type {
Expand Down Expand Up @@ -402,25 +403,27 @@ function AdvancedSettings({
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuLabel label="Best performing models" />
<ModelList
modelConfigs={bestPerformingModelConfig}
onClick={(modelSettings) => {
setGenerationSettings({
...generationSettings,
modelSettings,
});
}}
/>
<DropdownMenuLabel label="Other models" />
<ModelList
modelConfigs={otherModelsConfig}
onClick={(modelSettings) => {
setGenerationSettings({
...generationSettings,
modelSettings,
});
}}
/>
<ScrollArea className="max-h-[300px]">
<ModelList
modelConfigs={bestPerformingModelConfig}
onClick={(modelSettings) => {
setGenerationSettings({
...generationSettings,
modelSettings,
});
}}
/>
<DropdownMenuLabel label="Other models" />
<ModelList
modelConfigs={otherModelsConfig}
onClick={(modelSettings) => {
setGenerationSettings({
...generationSettings,
modelSettings,
});
}}
/>
</ScrollArea>
</DropdownMenuContent>
</DropdownMenu>
</div>
Expand Down

0 comments on commit c57d9af

Please sign in to comment.