diff --git a/src/components/Chat/ChatConfigComponents/exampleAgents.ts b/src/components/Chat/ChatConfigComponents/exampleAgents.ts index 6b29235a..3cdc4836 100644 --- a/src/components/Chat/ChatConfigComponents/exampleAgents.ts +++ b/src/components/Chat/ChatConfigComponents/exampleAgents.ts @@ -8,13 +8,11 @@ const defaultAgentPromptTemplate: PromptTemplate = [ Here are some guidelines you must follow: - Always respond in the same language as the user's query and context. - You may be given context from the user's knowledge base that is relevant to the user's query. If so, please use it. -- You may be given a list of tools that you can use to help you search the user's knowledge base or perform actions on the user's knowledge base. -- If provided to you, the search tool is particularly useful, although you should *not* use it initially if context has already been provided. - The date and time of the query is {TODAY}.`, }, { role: 'user', - content: `The user's query is: {QUERY}`, + content: `{QUERY}`, }, ] diff --git a/src/components/Chat/MessageComponents/ChatSources.tsx b/src/components/Chat/MessageComponents/ChatSources.tsx index a8e42317..00e05d63 100644 --- a/src/components/Chat/MessageComponents/ChatSources.tsx +++ b/src/components/Chat/MessageComponents/ChatSources.tsx @@ -64,8 +64,8 @@ const ChatSources: React.FC = ({ contextItems }) => { - -
+ +
diff --git a/src/components/Chat/MessageComponents/UserMessage.tsx b/src/components/Chat/MessageComponents/UserMessage.tsx index e289e429..ea353740 100644 --- a/src/components/Chat/MessageComponents/UserMessage.tsx +++ b/src/components/Chat/MessageComponents/UserMessage.tsx @@ -8,17 +8,29 @@ interface UserMessageProps { message: ReorChatMessage } -const UserMessage: React.FC = ({ message }) => ( -
-
- - {getDisplayMessage(message)} - +const UserMessage: React.FC = ({ message }) => { + const displayMessage = getDisplayMessage(message) + const messageLength = displayMessage?.length || 0 + + // Determine font size class based on message length + const getFontSizeClass = () => { + if (messageLength > 100) return 'text-lg' + if (messageLength > 50) return 'text-xl' + return 'text-2xl' + } + + return ( +
+
+ + {displayMessage} + +
-
-) + ) +} export default UserMessage diff --git a/src/components/Common/EmptyPage.tsx b/src/components/Common/EmptyPage.tsx index 0ba0bc17..c2ee86e6 100644 --- a/src/components/Common/EmptyPage.tsx +++ b/src/components/Common/EmptyPage.tsx @@ -8,27 +8,29 @@ const EmptyPage: React.FC = () => { const { createUntitledNote } = useContentContext() return ( -
-
- -
-

No File Selected!

-

Open a file to begin using Reor!

-
- - +
+
+
+ +
+

No File Selected!

+

Open a file and get back to work!

+
+ + +
) diff --git a/src/components/Common/MarkdownRenderer.tsx b/src/components/Common/MarkdownRenderer.tsx index c734644e..4c8eb6f3 100644 --- a/src/components/Common/MarkdownRenderer.tsx +++ b/src/components/Common/MarkdownRenderer.tsx @@ -9,7 +9,7 @@ interface MarkdownRendererProps { const MarkdownRenderer: React.FC = ({ content }) => { return ( {content} diff --git a/src/components/MainPage.tsx b/src/components/MainPage.tsx index 2ca1c9da..c1243818 100644 --- a/src/components/MainPage.tsx +++ b/src/components/MainPage.tsx @@ -47,7 +47,7 @@ const MainContent: React.FC = () => { const MainPageContent: React.FC = () => { const { currentlyOpenFilePath } = useFileContext() - const { showChatbot, setShowChatbot } = useChatContext() + const { showChatbot, setShowChatbot, openNewChat } = useChatContext() const { setShowEditor, showEditor } = useContentContext() const { getShortcutDescription } = useAppShortcuts() @@ -57,7 +57,7 @@ const MainPageContent: React.FC = () => {
-
+
@@ -85,7 +85,11 @@ const MainPageContent: React.FC = () => { {showChatbot && (
- setShowChatbot(false)} onMaximize={() => setShowEditor(false)} /> + setShowChatbot(false)} + onMaximize={() => setShowEditor(false)} + onNewChat={() => openNewChat()} + />
diff --git a/src/components/TitleBar/NavigationButtons.tsx b/src/components/TitleBar/NavigationButtons.tsx index 74d435be..37ac18bc 100644 --- a/src/components/TitleBar/NavigationButtons.tsx +++ b/src/components/TitleBar/NavigationButtons.tsx @@ -8,7 +8,7 @@ import '../../styles/history.scss' import { useFileContext } from '@/contexts/FileContext' import { useContentContext } from '@/contexts/ContentContext' -const FileHistoryNavigator: React.FC = () => { +const NavigationButtons: React.FC = () => { const [showMenu, setShowMenu] = useState('') const longPressTimer = useRef(null) const buttonRefBack = useRef(null) @@ -160,4 +160,4 @@ const FileHistoryNavigator: React.FC = () => { ) } -export default FileHistoryNavigator +export default NavigationButtons diff --git a/src/components/TitleBar/TitleBar.tsx b/src/components/TitleBar/TitleBar.tsx index b710178d..f1017e9f 100644 --- a/src/components/TitleBar/TitleBar.tsx +++ b/src/components/TitleBar/TitleBar.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useState } from 'react' import { BsChatLeftDots, BsChatLeftDotsFill } from 'react-icons/bs' -import FileHistoryNavigator from './NavigationButtons' +import NavigationButtons from './NavigationButtons' import ExternalLink from '../Common/ExternalLink' import { useChatContext } from '@/contexts/ChatContext' @@ -22,7 +22,7 @@ const TitleBar: React.FC = () => { return (
- +
{
- -
+ +
) return ( diff --git a/src/components/ui/window-controls.tsx b/src/components/ui/window-controls.tsx index 2db3a8ac..d7f87b50 100644 --- a/src/components/ui/window-controls.tsx +++ b/src/components/ui/window-controls.tsx @@ -1,15 +1,26 @@ /* eslint-disable jsx-a11y/control-has-associated-label */ import React from 'react' -import { X, Maximize2 } from 'lucide-react' +import { X, Maximize2, Plus } from 'lucide-react' interface WindowControlsProps { onClose: () => void onMaximize: () => void + onNewChat?: () => void } -const WindowControls = ({ onClose, onMaximize }: WindowControlsProps) => ( +const WindowControls = ({ onClose, onMaximize, onNewChat }: WindowControlsProps) => (
+ {onNewChat && ( + + )}