Browse Source

refactor(lint): code lint

orenzhang 2 months ago
parent
commit
72ea6dd9f1

+ 12 - 4
src/lib/components/admin/Settings/Documents.svelte

@@ -387,8 +387,12 @@
 					<div class="flex items-center relative">
 						<Tooltip
 							content={BYPASS_EMBEDDING_AND_RETRIEVAL
-								? $i18n.t('Inject the entire content as context for comprehensive processing, this is recommended for complex queries.')
-								: $i18n.t('Default to segmented retrieval for focused and relevant content extraction, this is recommended for most cases.')}
+								? $i18n.t(
+										'Inject the entire content as context for comprehensive processing, this is recommended for complex queries.'
+									)
+								: $i18n.t(
+										'Default to segmented retrieval for focused and relevant content extraction, this is recommended for most cases.'
+									)}
 						>
 							<Switch bind:state={BYPASS_EMBEDDING_AND_RETRIEVAL} />
 						</Tooltip>
@@ -625,8 +629,12 @@
 						<div class="flex items-center relative">
 							<Tooltip
 								content={RAG_FULL_CONTEXT
-									? $i18n.t('Inject the entire content as context for comprehensive processing, this is recommended for complex queries.')
-									: $i18n.t('Default to segmented retrieval for focused and relevant content extraction, this is recommended for most cases.')}
+									? $i18n.t(
+											'Inject the entire content as context for comprehensive processing, this is recommended for complex queries.'
+										)
+									: $i18n.t(
+											'Default to segmented retrieval for focused and relevant content extraction, this is recommended for most cases.'
+										)}
 							>
 								<Switch bind:state={RAG_FULL_CONTEXT} />
 							</Tooltip>

+ 6 - 2
src/lib/components/admin/Settings/WebSearch.svelte

@@ -462,8 +462,12 @@
 						<div class="flex items-center relative">
 							<Tooltip
 								content={webConfig.BYPASS_WEB_SEARCH_EMBEDDING_AND_RETRIEVAL
-									? $i18n.t('Inject the entire content as context for comprehensive processing, this is recommended for complex queries.')
-									: $i18n.t('Default to segmented retrieval for focused and relevant content extraction, this is recommended for most cases.')}
+									? $i18n.t(
+											'Inject the entire content as context for comprehensive processing, this is recommended for complex queries.'
+										)
+									: $i18n.t(
+											'Default to segmented retrieval for focused and relevant content extraction, this is recommended for most cases.'
+										)}
 							>
 								<Switch bind:state={webConfig.BYPASS_WEB_SEARCH_EMBEDDING_AND_RETRIEVAL} />
 							</Tooltip>

+ 7 - 9
src/lib/components/channel/Messages.svelte

@@ -73,15 +73,13 @@
 						<div class="text-2xl font-medium capitalize">{channel.name}</div>
 
 						<div class=" text-gray-500">
-							{
-								$i18n.t(
-									'This channel was created on {{createdAt}}. This is the very beginning of the {{channelName}} channel.',
-									{
-										createdAt: dayjs(channel.created_at / 1000000).format('MMMM D, YYYY'),
-										channelName: channel.name,
-									}
-								)
-							}
+							{$i18n.t(
+								'This channel was created on {{createdAt}}. This is the very beginning of the {{channelName}} channel.',
+								{
+									createdAt: dayjs(channel.created_at / 1000000).format('MMMM D, YYYY'),
+									channelName: channel.name
+								}
+							)}
 						</div>
 					</div>
 				{:else}

+ 3 - 1
src/lib/components/chat/Messages/CodeBlock.svelte

@@ -441,7 +441,9 @@
 
 					{#if ($config?.features?.enable_code_execution ?? true) && (lang.toLowerCase() === 'python' || lang.toLowerCase() === 'py' || (lang === '' && checkPythonCode(code)))}
 						{#if executing}
-							<div class="run-code-button bg-none border-none p-1 cursor-not-allowed">{$i18n.t('Running')}</div>
+							<div class="run-code-button bg-none border-none p-1 cursor-not-allowed">
+								{$i18n.t('Running')}
+							</div>
 						{:else if run}
 							<button
 								class="flex gap-1 items-center run-code-button bg-none border-none bg-gray-50 hover:bg-gray-100 dark:bg-gray-850 dark:hover:bg-gray-800 transition rounded-md px-1.5 py-0.5"

+ 6 - 2
src/lib/components/common/FileItemModal.svelte

@@ -87,8 +87,12 @@
 						<div>
 							<Tooltip
 								content={enableFullContent
-									? $i18n.t('Inject the entire content as context for comprehensive processing, this is recommended for complex queries.')
-									: $i18n.t('Default to segmented retrieval for focused and relevant content extraction, this is recommended for most cases.')}
+									? $i18n.t(
+											'Inject the entire content as context for comprehensive processing, this is recommended for complex queries.'
+										)
+									: $i18n.t(
+											'Default to segmented retrieval for focused and relevant content extraction, this is recommended for most cases.'
+										)}
 							>
 								<div class="flex items-center gap-1.5 text-xs">
 									{#if enableFullContent}