From f7289cd90f8acc3a488463b711c21755b7d890d4 Mon Sep 17 00:00:00 2001 From: Timothy Carambat Date: Mon, 25 Nov 2024 21:07:23 -0800 Subject: [PATCH 1/2] Normalize Input Fields (#2720) * WIP field normalization * more norms --- .../AzureAiOptions/index.jsx | 6 +++--- .../CohereOptions/index.jsx | 4 ++-- .../GenericOpenAiOptions/index.jsx | 12 +++++------ .../LMStudioOptions/index.jsx | 10 ++++----- .../LiteLLMOptions/index.jsx | 10 ++++----- .../LocalAiOptions/index.jsx | 12 +++++------ .../MistralAiOptions/index.jsx | 4 ++-- .../OllamaOptions/index.jsx | 10 ++++----- .../OpenAiOptions/index.jsx | 4 ++-- .../VoyageAiOptions/index.jsx | 4 ++-- frontend/src/components/Footer/index.jsx | 21 ++++++++++--------- .../LLMSelection/AnthropicAiOptions/index.jsx | 4 ++-- .../LLMSelection/ApiPieOptions/index.jsx | 6 +++--- .../AwsBedrockLLMOptions/index.jsx | 4 ++-- .../LLMSelection/AzureAiOptions/index.jsx | 8 +++---- .../LLMSelection/CohereAiOptions/index.jsx | 4 ++-- .../LLMSelection/DeepSeekOptions/index.jsx | 6 +++--- .../LLMSelection/GeminiLLMOptions/index.jsx | 6 +++--- .../GenericOpenAiOptions/index.jsx | 10 ++++----- .../LLMSelection/HuggingFaceOptions/index.jsx | 6 +++--- .../LLMSelection/LMStudioOptions/index.jsx | 10 ++++----- .../LLMSelection/LiteLLMOptions/index.jsx | 10 ++++----- .../LLMSelection/LocalAiOptions/index.jsx | 12 +++++------ .../LLMSelection/MistralOptions/index.jsx | 6 +++--- .../LLMSelection/NovitaLLMOptions/index.jsx | 10 ++++----- .../LLMSelection/OllamaLLMOptions/index.jsx | 14 ++++++------- .../LLMSelection/OpenAiOptions/index.jsx | 4 ++-- .../LLMSelection/OpenRouterOptions/index.jsx | 10 ++++----- .../LLMSelection/PerplexityOptions/index.jsx | 6 +++--- .../TextGenWebUIOptions/index.jsx | 6 +++--- .../LLMSelection/TogetherAiOptions/index.jsx | 6 +++--- .../LLMSelection/XAiLLMOptions/index.jsx | 6 +++--- .../Modals/DisplayRecoveryCodeModal/index.jsx | 2 +- .../DataConnectors/ConnectorOption/index.jsx | 2 +- .../Connectors/Confluence/index.jsx | 10 ++++----- .../Connectors/Github/index.jsx | 8 +++---- .../Connectors/Gitlab/index.jsx | 8 +++---- .../Connectors/Youtube/index.jsx | 2 +- .../Documents/Directory/FileRow/index.jsx | 2 +- .../Documents/Directory/FolderRow/index.jsx | 2 +- .../Directory/NewFolderModal/index.jsx | 2 +- .../Documents/Directory/index.jsx | 4 ++-- .../Documents/UploadFile/index.jsx | 4 ++-- .../WorkspaceFileRow/index.jsx | 2 +- .../Documents/WorkspaceDirectory/index.jsx | 2 +- .../Modals/ManageWorkspace/index.jsx | 4 ++-- .../src/components/Modals/NewWorkspace.jsx | 2 +- .../Modals/Password/MultiUserAuth.jsx | 8 +++---- .../Modals/Password/SingleUserAuth.jsx | 2 +- .../ThreadContainer/index.jsx | 2 +- .../Sidebar/ActiveWorkspaces/index.jsx | 4 ++-- .../TextToSpeech/ElevenLabsOptions/index.jsx | 6 +++--- .../TextToSpeech/OpenAiOptions/index.jsx | 4 ++-- .../NativeTranscriptionOptions/index.jsx | 2 +- .../OpenAiOptions/index.jsx | 4 ++-- frontend/src/components/UserIcon/index.jsx | 2 +- .../UserMenu/AccountModal/index.jsx | 8 +++---- .../components/UserMenu/UserButton/index.jsx | 2 +- .../AstraDBOptions/index.jsx | 4 ++-- .../ChromaDBOptions/index.jsx | 6 +++--- .../MilvusDBOptions/index.jsx | 6 +++--- .../PineconeDBOptions/index.jsx | 4 ++-- .../QDrantDBOptions/index.jsx | 4 ++-- .../WeaviateDBOptions/index.jsx | 4 ++-- .../ZillizCloudOptions/index.jsx | 4 ++-- .../ChatHistory/Citation/index.jsx | 2 +- .../Actions/ActionMenu/index.jsx | 4 ++-- .../Actions/EditMessage/index.jsx | 6 +++--- .../PromptInput/AgentMenu/index.jsx | 2 +- .../SlashPresets/AddPresetModal.jsx | 6 +++--- .../SlashPresets/EditPresetModal.jsx | 6 +++--- .../SlashCommands/SlashPresets/index.jsx | 4 ++-- .../SlashCommands/endAgentSession.jsx | 2 +- .../PromptInput/SlashCommands/reset.jsx | 2 +- .../PromptInput/SpeechToText/index.jsx | 2 +- .../PromptInput/TextSizeMenu/index.jsx | 8 +++---- .../ChatContainer/PromptInput/index.jsx | 6 +++--- .../src/components/lib/CTAButton/index.jsx | 2 +- .../Imported/ImportedSkillConfig/index.jsx | 2 +- .../NewConnectionModal.jsx | 12 +++++------ .../manage/DocumentSyncQueueRow/index.jsx | 2 +- .../Admin/Invitations/InviteRow/index.jsx | 4 ++-- .../Invitations/NewInviteModal/index.jsx | 2 +- .../src/pages/Admin/Invitations/index.jsx | 2 +- frontend/src/pages/Admin/Logging/index.jsx | 2 +- .../pages/Admin/Users/NewUserModal/index.jsx | 6 +++--- .../Users/UserRow/EditUserModal/index.jsx | 6 +++--- frontend/src/pages/Admin/Users/index.jsx | 2 +- .../Workspaces/NewWorkspaceModal/index.jsx | 2 +- .../Admin/Workspaces/WorkspaceRow/index.jsx | 2 +- .../FineTuning/Steps/DataUpload/index.jsx | 6 +++--- .../ApiKeys/ApiKeyRow/index.jsx | 4 ++-- .../ApiKeys/NewApiKeyModal/index.jsx | 2 +- .../pages/GeneralSettings/ApiKeys/index.jsx | 2 +- .../Appearance/CustomAppName/index.jsx | 2 +- .../Appearance/CustomMessages/index.jsx | 4 ++-- .../FooterCustomization/NewIconForm/index.jsx | 2 +- .../Appearance/LanguagePreference/index.jsx | 2 +- .../Appearance/SupportEmail/index.jsx | 2 +- .../GeneralSettings/AudioPreference/stt.jsx | 2 +- .../GeneralSettings/AudioPreference/tts.jsx | 2 +- .../BrowserExtensionApiKeyRow/index.jsx | 6 +++--- .../NewBrowserExtensionApiKeyModal/index.jsx | 2 +- .../BrowserExtensionApiKey/index.jsx | 2 +- .../GeneralSettings/Chats/ChatRow/index.jsx | 2 +- .../src/pages/GeneralSettings/Chats/index.jsx | 2 +- .../EmbedChats/ChatRow/index.jsx | 2 +- .../GeneralSettings/EmbedChats/index.jsx | 2 +- .../EmbedRow/EditEmbedModal/index.jsx | 2 +- .../EmbedConfigs/NewEmbedModal/index.jsx | 2 +- .../GeneralSettings/EmbedConfigs/index.jsx | 2 +- .../EmbeddingPreference/index.jsx | 2 +- .../GeneralSettings/LLMPreference/index.jsx | 2 +- .../pages/GeneralSettings/Security/index.jsx | 6 +++--- .../TranscriptionPreference/index.jsx | 2 +- .../GeneralSettings/VectorDatabase/index.jsx | 2 +- .../src/pages/Invite/NewUserModal/index.jsx | 4 ++-- .../Steps/CreateWorkspace/index.jsx | 2 +- .../OnboardingFlow/Steps/Survey/index.jsx | 6 +++--- .../OnboardingFlow/Steps/UserSetup/index.jsx | 6 +++--- .../AgentConfig/AgentModelSelection/index.jsx | 4 ++-- .../ChatHistorySettings/index.jsx | 2 +- .../ChatSettings/ChatPromptSettings/index.jsx | 2 +- .../ChatQueryRefusalResponse/index.jsx | 2 +- .../ChatTemperatureSettings/index.jsx | 2 +- .../ChatModelSelection/index.jsx | 2 +- .../WorkspaceLLMSelection/index.jsx | 2 +- .../SuggestedChatMessages/index.jsx | 4 ++-- .../GeneralAppearance/WorkspaceName/index.jsx | 2 +- .../Members/AddMemberModal/index.jsx | 5 ++--- .../DocumentSimilarityThreshold/index.jsx | 2 +- .../MaxContextSnippets/index.jsx | 2 +- frontend/src/utils/chat/markdown.js | 4 ++-- 133 files changed, 300 insertions(+), 300 deletions(-) diff --git a/frontend/src/components/EmbeddingSelection/AzureAiOptions/index.jsx b/frontend/src/components/EmbeddingSelection/AzureAiOptions/index.jsx index ccba035db9..ce1b9261ba 100644 --- a/frontend/src/components/EmbeddingSelection/AzureAiOptions/index.jsx +++ b/frontend/src/components/EmbeddingSelection/AzureAiOptions/index.jsx @@ -9,7 +9,7 @@ export default function AzureAiOptions({ settings }) { {[ diff --git a/frontend/src/components/EmbeddingSelection/GenericOpenAiOptions/index.jsx b/frontend/src/components/EmbeddingSelection/GenericOpenAiOptions/index.jsx index 84ae4ab8b7..9db83b444b 100644 --- a/frontend/src/components/EmbeddingSelection/GenericOpenAiOptions/index.jsx +++ b/frontend/src/components/EmbeddingSelection/GenericOpenAiOptions/index.jsx @@ -13,7 +13,7 @@ export default function GenericOpenAiEmbeddingOptions({ settings }) { e.target.blur()} @@ -63,7 +63,7 @@ export default function GenericOpenAiEmbeddingOptions({ settings }) { {showAdvancedControls ? "Hide" : "Show"} advanced settings {showAdvancedControls ? ( @@ -101,7 +101,7 @@ export default function GenericOpenAiEmbeddingOptions({ settings }) { e.target.blur()} diff --git a/frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx b/frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx index 4cf95168bd..bca7547f7d 100644 --- a/frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx +++ b/frontend/src/components/EmbeddingSelection/LMStudioOptions/index.jsx @@ -38,7 +38,7 @@ export default function LMStudioEmbeddingOptions({ settings }) { {showAdvancedControls ? "Hide" : "Show"} Manual Endpoint Input {showAdvancedControls ? ( @@ -94,7 +94,7 @@ export default function LMStudioEmbeddingOptions({ settings }) { {["mistral-embed"].map((model) => { diff --git a/frontend/src/components/EmbeddingSelection/OllamaOptions/index.jsx b/frontend/src/components/EmbeddingSelection/OllamaOptions/index.jsx index 49a111c2a3..eefdd58b31 100644 --- a/frontend/src/components/EmbeddingSelection/OllamaOptions/index.jsx +++ b/frontend/src/components/EmbeddingSelection/OllamaOptions/index.jsx @@ -41,7 +41,7 @@ export default function OllamaEmbeddingOptions({ settings }) { {showAdvancedControls ? "Hide" : "Show"} Manual Endpoint Input {showAdvancedControls ? ( @@ -97,7 +97,7 @@ export default function OllamaEmbeddingOptions({ settings }) { {[ diff --git a/frontend/src/components/EmbeddingSelection/VoyageAiOptions/index.jsx b/frontend/src/components/EmbeddingSelection/VoyageAiOptions/index.jsx index d16e456d3b..f65fccf72b 100644 --- a/frontend/src/components/EmbeddingSelection/VoyageAiOptions/index.jsx +++ b/frontend/src/components/EmbeddingSelection/VoyageAiOptions/index.jsx @@ -9,7 +9,7 @@ export default function VoyageAiOptions({ settings }) { {[ diff --git a/frontend/src/components/Footer/index.jsx b/frontend/src/components/Footer/index.jsx index 420f173f91..9248f1e258 100644 --- a/frontend/src/components/Footer/index.jsx +++ b/frontend/src/components/Footer/index.jsx @@ -15,6 +15,7 @@ import React, { useEffect, useState } from "react"; import SettingsButton from "../SettingsButton"; import { isMobile } from "react-device-detect"; import { Tooltip } from "react-tooltip"; +import { Link } from "react-router-dom"; export const MAX_ICONS = 3; export const ICON_COMPONENTS = { @@ -49,8 +50,8 @@ export default function Footer() {
- - +
- - +
- - +
{!isMobile && }
@@ -120,7 +121,7 @@ export default function Footer() { href={item.url} target="_blank" rel="noreferrer" - className="transition-all duration-300 p-2 rounded-full bg-theme-sidebar-footer-icon hover:bg-theme-sidebar-footer-icon-hover" + className="transition-all duration-300 flex w-fit h-fit p-2 p-2 rounded-full bg-theme-sidebar-footer-icon hover:bg-theme-sidebar-footer-icon-hover hover:border-slate-100" > {React.createElement( ICON_COMPONENTS?.[item.icon] ?? ICON_COMPONENTS.Info, diff --git a/frontend/src/components/LLMSelection/AnthropicAiOptions/index.jsx b/frontend/src/components/LLMSelection/AnthropicAiOptions/index.jsx index 2f42c57c5d..a745114f69 100644 --- a/frontend/src/components/LLMSelection/AnthropicAiOptions/index.jsx +++ b/frontend/src/components/LLMSelection/AnthropicAiOptions/index.jsx @@ -9,7 +9,7 @@ export default function AnthropicAiOptions({ settings }) { {[ "claude-instant-1.2", diff --git a/frontend/src/components/LLMSelection/ApiPieOptions/index.jsx b/frontend/src/components/LLMSelection/ApiPieOptions/index.jsx index 9799bf15d7..dd8162f40a 100644 --- a/frontend/src/components/LLMSelection/ApiPieOptions/index.jsx +++ b/frontend/src/components/LLMSelection/ApiPieOptions/index.jsx @@ -12,7 +12,7 @@ export default function ApiPieLLMOptions({ settings }) { diff --git a/frontend/src/components/LLMSelection/CohereAiOptions/index.jsx b/frontend/src/components/LLMSelection/CohereAiOptions/index.jsx index a871684740..a0bd333f47 100644 --- a/frontend/src/components/LLMSelection/CohereAiOptions/index.jsx +++ b/frontend/src/components/LLMSelection/CohereAiOptions/index.jsx @@ -9,7 +9,7 @@ export default function CohereAiOptions({ settings }) { {[ "command-r", diff --git a/frontend/src/components/LLMSelection/DeepSeekOptions/index.jsx b/frontend/src/components/LLMSelection/DeepSeekOptions/index.jsx index 66f402e697..ababd74f03 100644 --- a/frontend/src/components/LLMSelection/DeepSeekOptions/index.jsx +++ b/frontend/src/components/LLMSelection/DeepSeekOptions/index.jsx @@ -16,7 +16,7 @@ export default function DeepSeekOptions({ settings }) { @@ -153,7 +153,7 @@ export default function OllamaLLMOptions({ settings }) {
@@ -305,7 +305,7 @@ export default function MultiUserAuth() { name="username" type="text" placeholder={t("login.multi-user.placeholder-username")} - className="bg-theme-settings-input-bg text-theme-text-primary placeholder:text-theme-settings-input-placeholder focus:outline-primary-button active:outline-primary-button outline-none text-sm rounded-md p-2.5 w-full h-[48px] md:w-[300px] md:h-[34px]" + className="border-none bg-theme-settings-input-bg text-theme-text-primary placeholder:text-theme-settings-input-placeholder focus:outline-primary-button active:outline-primary-button outline-none text-sm rounded-md p-2.5 w-full h-[48px] md:w-[300px] md:h-[34px]" required={true} autoComplete="off" /> @@ -315,7 +315,7 @@ export default function MultiUserAuth() { name="password" type="password" placeholder={t("login.multi-user.placeholder-password")} - className="bg-theme-settings-input-bg text-theme-text-primary placeholder:text-theme-settings-input-placeholder focus:outline-primary-button active:outline-primary-button outline-none text-sm rounded-md p-2.5 w-full h-[48px] md:w-[300px] md:h-[34px]" + className="border-none bg-theme-settings-input-bg text-theme-text-primary placeholder:text-theme-settings-input-placeholder focus:outline-primary-button active:outline-primary-button outline-none text-sm rounded-md p-2.5 w-full h-[48px] md:w-[300px] md:h-[34px]" required={true} autoComplete="off" /> diff --git a/frontend/src/components/Modals/Password/SingleUserAuth.jsx b/frontend/src/components/Modals/Password/SingleUserAuth.jsx index a645dcf7be..06e3d783c6 100644 --- a/frontend/src/components/Modals/Password/SingleUserAuth.jsx +++ b/frontend/src/components/Modals/Password/SingleUserAuth.jsx @@ -94,7 +94,7 @@ export default function SingleUserAuth() { name="password" type="password" placeholder="Password" - className="bg-theme-settings-input-bg text-theme-text-primary placeholder:text-theme-settings-input-placeholder focus:outline-primary-button active:outline-primary-button outline-none text-sm rounded-md p-2.5 w-full h-[48px] md:w-[300px] md:h-[34px]" + className="border-none bg-theme-settings-input-bg text-theme-text-primary placeholder:text-theme-settings-input-placeholder focus:outline-primary-button active:outline-primary-button outline-none text-sm rounded-md p-2.5 w-full h-[48px] md:w-[300px] md:h-[34px]" required={true} autoComplete="off" /> diff --git a/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/index.jsx b/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/index.jsx index 3f7243c9a3..157e6623e8 100644 --- a/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/index.jsx +++ b/frontend/src/components/Sidebar/ActiveWorkspaces/ThreadContainer/index.jsx @@ -212,7 +212,7 @@ function DeleteAllThreadButton({ ctrlPressed, threads, onDelete }) { className="w-full relative flex h-[40px] items-center border-none hover:bg-red-400/20 rounded-lg group" >
-
+
@@ -101,7 +101,7 @@ export default function ActiveWorkspaces() { setSelectedWs(workspace); showModal(); }} - className="rounded-md flex items-center justify-center ml-auto p-[2px] hover:bg-[#646768] text-[#A7A8A9] hover:text-white" + className="border-none rounded-md flex items-center justify-center ml-auto p-[2px] hover:bg-[#646768] text-[#A7A8A9] hover:text-white" >
@@ -41,7 +41,7 @@ export default function ChromaDBOptions({ settings }) { autoComplete="off" type="password" defaultValue={settings?.ChromaApiKey ? "*".repeat(20) : ""} - className="bg-theme-settings-input-bg text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" + className="border-none bg-theme-settings-input-bg text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" placeholder="sk-myApiKeyToAccessMyChromaInstance" />
diff --git a/frontend/src/components/VectorDBSelection/MilvusDBOptions/index.jsx b/frontend/src/components/VectorDBSelection/MilvusDBOptions/index.jsx index 5ee58612ef..cc30868dcc 100644 --- a/frontend/src/components/VectorDBSelection/MilvusDBOptions/index.jsx +++ b/frontend/src/components/VectorDBSelection/MilvusDBOptions/index.jsx @@ -9,7 +9,7 @@ export default function MilvusDBOptions({ settings }) {
@@ -101,7 +101,7 @@ export default function AddPresetModal({ isOpen, onClose, onSave }) { maxLength={80} autoComplete="off" required={true} - className="bg-theme-settings-input-bg w-full text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" + className="border-none bg-theme-settings-input-bg w-full text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" />
diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/EditPresetModal.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/EditPresetModal.jsx index 6715cbe20b..3d661022a9 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/EditPresetModal.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/EditPresetModal.jsx @@ -85,7 +85,7 @@ export default function EditPresetModal({ value={command} onChange={handleCommandChange} required={true} - className="bg-theme-settings-input-bg w-full text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" + className="border-none bg-theme-settings-input-bg w-full text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" /> @@ -101,7 +101,7 @@ export default function EditPresetModal({ placeholder="This is a test prompt. Please respond with a poem about LLMs." defaultValue={preset.prompt} required={true} - className="bg-theme-settings-input-bg w-full text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" + className="border-none bg-theme-settings-input-bg w-full text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" >
@@ -117,7 +117,7 @@ export default function EditPresetModal({ defaultValue={preset.description} placeholder="Responds with a poem about LLMs." required={true} - className="bg-theme-settings-input-bg w-full text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" + className="border-none bg-theme-settings-input-bg w-full text-white placeholder:text-theme-settings-input-placeholder text-sm rounded-lg focus:outline-primary-button active:outline-primary-button outline-none block w-full p-2.5" />
diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/index.jsx index c8c493577c..ec42050a28 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/index.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/PromptInput/SlashCommands/SlashPresets/index.jsx @@ -85,7 +85,7 @@ export default function SlashPresets({ setShowing, sendCommand }) { setShowing(false); sendCommand(`${preset.command} `, false); }} - className="w-full hover:cursor-pointer hover:bg-theme-action-menu-item-hover px-2 py-2 rounded-xl flex flex-row justify-start" + className="border-none w-full hover:cursor-pointer hover:bg-theme-action-menu-item-hover px-2 py-2 rounded-xl flex flex-row justify-start" >
@@ -108,7 +108,7 @@ export default function SlashPresets({ setShowing, sendCommand }) { ))}