From f73cae2a736f2c7388b60c15ea0ffdb8498f2c23 Mon Sep 17 00:00:00 2001 From: Ased Mammad Date: Thu, 7 Mar 2024 22:21:00 +0330 Subject: [PATCH] format some files with prettier --- i18next-parser.config.ts | 6 ++++-- src/lib/components/chat/MessageInput.svelte | 2 +- src/lib/components/chat/Settings/Interface.svelte | 5 ++++- src/routes/(app)/+page.svelte | 5 ++++- src/routes/(app)/c/[id]/+page.svelte | 5 ++++- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/i18next-parser.config.ts b/i18next-parser.config.ts index eccc8a3f5..0db38bd36 100644 --- a/i18next-parser.config.ts +++ b/i18next-parser.config.ts @@ -10,13 +10,15 @@ export default { contextSeparator: '_', createOldCatalogs: false, defaultNamespace: 'translation', - defaultValue: '', + defaultValue: function (locale, namespace, key, value) { + return key; + }, indentation: 2, keepRemoved: false, keySeparator: false, lexers: { svelte: ['JavascriptLexer'], - js: ['JavascriptLexer'], // if you're writing jsx inside .js files, change this to JsxLexer + js: ['JavascriptLexer'], ts: ['JavascriptLexer'], default: ['JavascriptLexer'] diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index 077bafd93..a32eeb2ad 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -21,7 +21,7 @@ export let suggestionPrompts = []; export let autoScroll = true; - let chatTextAreaElement:HTMLTextAreaElement + let chatTextAreaElement: HTMLTextAreaElement; let filesInputElement; let promptsElement; diff --git a/src/lib/components/chat/Settings/Interface.svelte b/src/lib/components/chat/Settings/Interface.svelte index 84b3399ea..be8a61234 100644 --- a/src/lib/components/chat/Settings/Interface.svelte +++ b/src/lib/components/chat/Settings/Interface.svelte @@ -82,7 +82,10 @@ fullScreenMode = settings.fullScreenMode ?? false; titleAutoGenerateModel = settings.titleAutoGenerateModel ?? ''; titleGenerationPrompt = - settings.titleGenerationPrompt ?? $i18n.t("Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':") + ' {{prompt}}'; + settings.titleGenerationPrompt ?? + $i18n.t( + "Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':" + ) + ' {{prompt}}'; }); diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte index 73a6e0087..5da585be0 100644 --- a/src/routes/(app)/+page.svelte +++ b/src/routes/(app)/+page.svelte @@ -769,7 +769,10 @@ if ($settings.titleAutoGenerate ?? true) { const title = await generateTitle( localStorage.token, - $settings?.titleGenerationPrompt ?? $i18n.t("Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':") + ' {{prompt}}', + $settings?.titleGenerationPrompt ?? + $i18n.t( + "Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':" + ) + ' {{prompt}}', $settings?.titleAutoGenerateModel ?? selectedModels[0], userPrompt ); diff --git a/src/routes/(app)/c/[id]/+page.svelte b/src/routes/(app)/c/[id]/+page.svelte index 575a1cdcf..fdfdddb89 100644 --- a/src/routes/(app)/c/[id]/+page.svelte +++ b/src/routes/(app)/c/[id]/+page.svelte @@ -778,7 +778,10 @@ if ($settings.titleAutoGenerate ?? true) { const title = await generateTitle( localStorage.token, - $settings?.titleGenerationPrompt ?? $i18n.t("Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':") + ' {{prompt}}', + $settings?.titleGenerationPrompt ?? + $i18n.t( + "Create a concise, 3-5 word phrase as a header for the following query, strictly adhering to the 3-5 word limit and avoiding the use of the word 'title':" + ) + ' {{prompt}}', $settings?.titleAutoGenerateModel ?? selectedModels[0], userPrompt );