From 68c7ee17b1467b3f1ec728f25cc433cb3c193af3 Mon Sep 17 00:00:00 2001 From: samlhuillier Date: Wed, 29 Nov 2023 17:54:10 -0600 Subject: [PATCH] big improvements to settings modal --- src/components/FileEditorContainer.tsx | 1 - src/components/LeftSidebar/LeftSidebar.tsx | 7 +++--- src/components/Settings/Settings.tsx | 29 ++++++++++++++++++---- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/components/FileEditorContainer.tsx b/src/components/FileEditorContainer.tsx index 53c0690a..042ec1fa 100644 --- a/src/components/FileEditorContainer.tsx +++ b/src/components/FileEditorContainer.tsx @@ -4,7 +4,6 @@ import { MarkdownEditor } from "./File/MakdownEditor"; import SimilarEntriesComponent from "./Similarity/SimilarFilesSidebar"; import TitleBar from "./TitleBar"; import ChatWithLLM from "./Chat/Chat"; -import SettingsModal from "./Settings/SettingsModal"; import LeftSidebar from "./LeftSidebar/LeftSidebar"; interface FileEditorContainerProps {} diff --git a/src/components/LeftSidebar/LeftSidebar.tsx b/src/components/LeftSidebar/LeftSidebar.tsx index 29722d77..02b8dc63 100644 --- a/src/components/LeftSidebar/LeftSidebar.tsx +++ b/src/components/LeftSidebar/LeftSidebar.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import SettingsModal from "../Settings/SettingsModal"; +import SettingsModal from "../Settings/Settings"; import { MdSettings } from "react-icons/md"; // Importing Material Design settings icon const LeftSidebar: React.FC = () => { @@ -7,15 +7,14 @@ const LeftSidebar: React.FC = () => { return (
+
{/* Spacer div */} + setModalOpen(false)} /> - {/* */} - setModalOpen(false)} /> - {/*
*/} ); }; diff --git a/src/components/Settings/Settings.tsx b/src/components/Settings/Settings.tsx index 2f8300db..38977c67 100644 --- a/src/components/Settings/Settings.tsx +++ b/src/components/Settings/Settings.tsx @@ -30,9 +30,24 @@ const SettingsModal: React.FC = ({ isOpen, onClose }) => { return (
-

- Open AI Key Settings -

+

Settings

+

Embedding Model

+ +

LLM

+ +

Open AI Key

= ({ isOpen, onClose }) => { onKeyDown={handleKeyPress} placeholder="Note Name" /> + +

+ *Models are currently hardcoded. Custom models are coming very soon :) +

);