153739b9c3
## TODO - [ ] add dropdown to use records from outside the context - [x] add loader for files chip - [x] add roleId where it's necessary - [x] Split AvatarChip in two components. One with the icon that will call the second with leftComponent. - [ ] Fix tests - [x] Fix UI regression on Search
15 lines
460 B
TypeScript
15 lines
460 B
TypeScript
import { aiModelsState } from '@/client-config/states/aiModelsState';
|
|
import { useRecoilValue } from 'recoil';
|
|
import { SelectOption } from 'twenty-ui/input';
|
|
|
|
export const useAiModelOptions = (): SelectOption<string>[] => {
|
|
const aiModels = useRecoilValue(aiModelsState);
|
|
|
|
return aiModels
|
|
.map((model) => ({
|
|
value: model.modelId,
|
|
label: `${model.label} (${model.provider})`,
|
|
}))
|
|
.sort((a, b) => a.label.localeCompare(b.label));
|
|
};
|