File size: 962 Bytes
f0743f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | import { atom } from 'recoil';
import { TAttachment } from 'librechat-data-provider';
import { atomWithLocalStorage } from './utils';
import { BadgeItem } from '~/common';
const hideBannerHint = atomWithLocalStorage('hideBannerHint', [] as string[]);
const messageAttachmentsMap = atom<Record<string, TAttachment[] | undefined>>({
key: 'messageAttachmentsMap',
default: {},
});
const queriesEnabled = atom<boolean>({
key: 'queriesEnabled',
default: true,
});
const isEditingBadges = atom<boolean>({
key: 'isEditingBadges',
default: false,
});
const chatBadges = atomWithLocalStorage<Pick<BadgeItem, 'id'>[]>('chatBadges', [
// When adding new badges, make sure to add them to useChatBadges.ts as well and add them as last item
// DO NOT CHANGE THE ORDER OF THE BADGES ALREADY IN THE ARRAY
{ id: '1' },
// { id: '2' },
]);
export default {
hideBannerHint,
messageAttachmentsMap,
queriesEnabled,
isEditingBadges,
chatBadges,
};
|