File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
frontend/src/components/app-config Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 55 BotIcon ,
66 BrainIcon ,
77 ChevronRightIcon ,
8+ InfoIcon ,
89 PlusIcon ,
910 Trash2Icon ,
1011} from "lucide-react" ;
@@ -61,6 +62,7 @@ import {
6162} from "../ui/accordion" ;
6263import { Button } from "../ui/button" ;
6364import { Checkbox } from "../ui/checkbox" ;
65+ import { DropdownMenuSeparator } from "../ui/dropdown-menu" ;
6466import { Label } from "../ui/label" ;
6567import { ExternalLink } from "../ui/links" ;
6668import {
@@ -272,6 +274,32 @@ export const ModelSelector: React.FC<ModelSelectorProps> = ({
272274 placeholder = { placeholder }
273275 onSelect = { selectModel }
274276 triggerClassName = "text-sm"
277+ customDropdownContent = {
278+ < >
279+ < DropdownMenuSeparator />
280+ < p className = "px-2 py-1.5 text-sm text-muted-secondary flex items-center gap-1" >
281+ Enter a custom model
282+ < Tooltip content = "Models should include the provider prefix, e.g. 'openai/gpt-4o'" >
283+ < InfoIcon className = "h-3 w-3" />
284+ </ Tooltip >
285+ </ p >
286+ < div className = "px-2 py-1" >
287+ < Input
288+ className = "w-full border-border shadow-none focus-visible:shadow-xs"
289+ placeholder = { placeholder }
290+ { ...field }
291+ value = { asStringOrEmpty ( field . value ) }
292+ onKeyDown = { Events . stopPropagation ( ) }
293+ />
294+ { value && (
295+ < IncorrectModelId
296+ value = { value }
297+ includeSuggestion = { false }
298+ />
299+ ) }
300+ </ div >
301+ </ >
302+ }
275303 forRole = { forRole }
276304 />
277305 </ FormControl >
You can’t perform that action at this time.
0 commit comments