فهرست منبع

refac: styling

Timothy Jaeryang Baek 3 هفته پیش
والد
کامیت
384a53b339

+ 0 - 10
src/lib/components/admin/Settings/Database.svelte

@@ -233,14 +233,4 @@
 			{/if}
 		</div>
 	</div>
-
-	<!-- <div class="flex justify-end pt-3 text-sm font-medium">
-		<button
-			class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg"
-			type="submit"
-		>
-			{$i18n.t('Save')}
-		</button>
-
-	</div> -->
 </form>

+ 15 - 20
src/lib/components/chat/Chat.svelte

@@ -260,39 +260,34 @@
 
 		const model = atSelectedModel ?? $models.find((m) => m.id === selectedModels[0]);
 		if (model) {
+			// Set Default Tools
 			if (model?.info?.meta?.toolIds) {
 				selectedToolIds = [
 					...new Set(
 						[...(model?.info?.meta?.toolIds ?? [])].filter((id) => $tools.find((t) => t.id === id))
 					)
 				];
-			} else {
-				selectedToolIds = [];
 			}
 
+			// Set Default Filters
 			if (model?.info?.meta?.defaultFilterIds) {
-				console.log('model.info.meta.defaultFilterIds', model.info.meta.defaultFilterIds);
+				console.log(model);
 				selectedFilterIds = model.info.meta.defaultFilterIds;
-				console.log('selectedFilterIds', selectedFilterIds);
-			} else {
-				selectedFilterIds = [];
 			}
 
+			// Set Default Features
 			if (model?.info?.meta?.defaultFeatureIds) {
-				console.log('model.info.meta.defaultFeatureIds', model.info.meta.defaultFeatureIds);
-				imageGenerationEnabled = model.info.meta.defaultFeatureIds.includes('image_generation');
-				webSearchEnabled = model.info.meta.defaultFeatureIds.includes('web_search');
-				codeInterpreterEnabled = model.info.meta.defaultFeatureIds.includes('code_interpreter');
-
-				console.log({
-					imageGenerationEnabled,
-					webSearchEnabled,
-					codeInterpreterEnabled
-				});
-			} else {
-				imageGenerationEnabled = false;
-				webSearchEnabled = false;
-				codeInterpreterEnabled = false;
+				if (model.info?.meta?.capabilities?.['image_generation']) {
+					imageGenerationEnabled = model.info.meta.defaultFeatureIds.includes('image_generation');
+				}
+
+				if (model.info?.meta?.capabilities?.['web_search']) {
+					webSearchEnabled = model.info.meta.defaultFeatureIds.includes('web_search');
+				}
+
+				if (model.info?.meta?.capabilities?.['code_interpreter']) {
+					codeInterpreterEnabled = model.info.meta.defaultFeatureIds.includes('code_interpreter');
+				}
 			}
 		}
 	};

+ 1 - 1
src/lib/components/chat/Settings/Personalization/AddMemoryModal.svelte

@@ -76,7 +76,7 @@
 
 					<div class="flex justify-end pt-1 text-sm font-medium">
 						<button
-							class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-3xl flex flex-row space-x-1 items-center {loading
+							class="px-3.5 py-1.5 text-sm font-medium bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-full {loading
 								? ' cursor-not-allowed'
 								: ''}"
 							type="submit"

+ 1 - 1
src/lib/components/chat/Settings/Personalization/EditMemoryModal.svelte

@@ -86,7 +86,7 @@
 
 					<div class="flex justify-end pt-1 text-sm font-medium">
 						<button
-							class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-3xl flex flex-row space-x-1 items-center {loading
+							class="px-3.5 py-1.5 text-sm font-medium bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-full {loading
 								? ' cursor-not-allowed'
 								: ''}"
 							type="submit"

+ 1 - 1
src/lib/components/common/Switch.svelte

@@ -26,7 +26,7 @@
 		false)
 			? 'focus:outline focus:outline-2 focus:outline-gray-800 focus:dark:outline-gray-200'
 			: 'outline outline-1 outline-gray-100 dark:outline-gray-800'} {state
-			? ' bg-emerald-600'
+			? ' bg-emerald-500 dark:bg-emerald-700'
 			: 'bg-gray-200 dark:bg-transparent'}"
 	>
 		<Switch.Thumb

+ 1 - 1
src/lib/components/workspace/common/ManifestModal.svelte

@@ -61,7 +61,7 @@
 
 					<div class="flex justify-end pt-3 text-sm font-medium">
 						<button
-							class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg flex flex-row space-x-1 items-center"
+							class="px-3.5 py-1.5 text-sm font-medium bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-full"
 							type="submit"
 						>
 							{$i18n.t('Done')}