This commit is contained in:
GH Action - Upstream Sync 2024-02-02 18:15:34 +00:00
commit a9730c8754
4 changed files with 17 additions and 6 deletions

View File

@ -13,7 +13,7 @@ export function getEmojiUrl(unified: string, style: EmojiStyle) {
// Whoever owns this Content Delivery Network (CDN), I am using your CDN to serve emojis // Whoever owns this Content Delivery Network (CDN), I am using your CDN to serve emojis
// Old CDN broken, so I had to switch to this one // Old CDN broken, so I had to switch to this one
// Author: https://github.com/H0llyW00dzZ // Author: https://github.com/H0llyW00dzZ
return `https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/${style}/64/${unified}.png`; return `https://fastly.jsdelivr.net/npm/emoji-datasource-apple/img/${style}/64/${unified}.png`;
} }
export function AvatarPicker(props: { export function AvatarPicker(props: {

View File

@ -268,7 +268,7 @@ function CheckButton() {
const syncStore = useSyncStore(); const syncStore = useSyncStore();
const couldCheck = useMemo(() => { const couldCheck = useMemo(() => {
return syncStore.coundSync(); return syncStore.cloudSync();
}, [syncStore]); }, [syncStore]);
const [checkState, setCheckState] = useState< const [checkState, setCheckState] = useState<
@ -472,7 +472,7 @@ function SyncItems() {
const promptStore = usePromptStore(); const promptStore = usePromptStore();
const maskStore = useMaskStore(); const maskStore = useMaskStore();
const couldSync = useMemo(() => { const couldSync = useMemo(() => {
return syncStore.coundSync(); return syncStore.cloudSync();
}, [syncStore]); }, [syncStore]);
const [showSyncConfigModal, setShowSyncConfigModal] = useState(false); const [showSyncConfigModal, setShowSyncConfigModal] = useState(false);

View File

@ -213,6 +213,15 @@ export const DEFAULT_MODELS = [
providerType: "openai", providerType: "openai",
}, },
}, },
{
name: "gpt-3.5-turbo-0125",
available: true,
provider: {
id: "openai",
providerName: "OpenAI",
providerType: "openai",
},
},
{ {
name: "gpt-3.5-turbo-0301", name: "gpt-3.5-turbo-0301",
available: true, available: true,

View File

@ -48,7 +48,7 @@ const DEFAULT_SYNC_STATE = {
export const useSyncStore = createPersistStore( export const useSyncStore = createPersistStore(
DEFAULT_SYNC_STATE, DEFAULT_SYNC_STATE,
(set, get) => ({ (set, get) => ({
coundSync() { cloudSync() {
const config = get()[get().provider]; const config = get()[get().provider];
return Object.values(config).every((c) => c.toString().length > 0); return Object.values(config).every((c) => c.toString().length > 0);
}, },
@ -60,8 +60,10 @@ export const useSyncStore = createPersistStore(
export() { export() {
const state = getLocalAppState(); const state = getLocalAppState();
const datePart = isApp const datePart = isApp
? `${new Date().toLocaleDateString().replace(/\//g, '_')} ${new Date().toLocaleTimeString().replace(/:/g, '_')}` ? `${new Date().toLocaleDateString().replace(/\//g, "_")} ${new Date()
: new Date().toLocaleString(); .toLocaleTimeString()
.replace(/:/g, "_")}`
: new Date().toLocaleString();
const fileName = `Backup-${datePart}.json`; const fileName = `Backup-${datePart}.json`;
downloadAs(JSON.stringify(state), fileName); downloadAs(JSON.stringify(state), fileName);