From 9b4e1c0248b880005a483ae9c0b13c0e916195c5 Mon Sep 17 00:00:00 2001 From: crStiv Date: Mon, 20 Jan 2025 00:47:59 +0100 Subject: [PATCH 1/2] Update Settings.ts --- src/lib/types/Settings.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/lib/types/Settings.ts b/src/lib/types/Settings.ts index b66b0c8023b..fb300f73c1d 100644 --- a/src/lib/types/Settings.ts +++ b/src/lib/types/Settings.ts @@ -1,4 +1,4 @@ -import { defaultModel } from "$lib/server/models"; +import { defaultModel } from "../server/models"; import type { Assistant } from "./Assistant"; import type { Timestamps } from "./Timestamps"; import type { User } from "./User"; @@ -27,14 +27,3 @@ export interface Settings extends Timestamps { } export type SettingsEditable = Omit; -// TODO: move this to a constant file along with other constants -export const DEFAULT_SETTINGS = { - shareConversationsWithModelAuthors: true, - activeModel: defaultModel.id, - hideEmojiOnSidebar: false, - customPrompts: {}, - assistants: [], - tools: [], - disableStream: false, - directPaste: false, -} satisfies SettingsEditable; From 1941de08c1115ccbd7cc53ac224f2467637e367e Mon Sep 17 00:00:00 2001 From: crStiv Date: Mon, 20 Jan 2025 00:48:21 +0100 Subject: [PATCH 2/2] Create constants.ts --- src/lib/utils/constants.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/lib/utils/constants.ts diff --git a/src/lib/utils/constants.ts b/src/lib/utils/constants.ts new file mode 100644 index 00000000000..53fd854b378 --- /dev/null +++ b/src/lib/utils/constants.ts @@ -0,0 +1,13 @@ +import { defaultModel } from "./server/models"; +import type { SettingsEditable } from "./types/Settings"; + +export const DEFAULT_SETTINGS = { + shareConversationsWithModelAuthors: true, + activeModel: defaultModel.id, + hideEmojiOnSidebar: false, + customPrompts: {}, + assistants: [], + tools: [], + disableStream: false, + directPaste: false, +} satisfies SettingsEditable;