From ade590af80884777911fa62be8f0cbc14700238b Mon Sep 17 00:00:00 2001 From: Ryan Hopper-Lowe Date: Thu, 12 Sep 2024 15:15:56 -0500 Subject: [PATCH] fix: revert chat box to follow responsive design --- app/page.tsx | 8 +++++++- components/chat.tsx | 17 ++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index d85e2c0..1d4aab2 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -32,7 +32,13 @@ function RunFile() {
- +
diff --git a/components/chat.tsx b/components/chat.tsx index 1260670..dec6c1c 100644 --- a/components/chat.tsx +++ b/components/chat.tsx @@ -22,9 +22,14 @@ import KnowledgeDropdown from '@/components/scripts/knowledge-dropdown'; import SaveScriptDropdown from '@/components/scripts/script-save'; import { Tool } from '@gptscript-ai/gptscript'; import { rootTool } from '@/actions/gptscript'; +import clsx from 'clsx'; interface ScriptProps { className?: string; + classNames?: { + chatBar?: string; + messages?: string; + }; messagesHeight?: string; showAssistantName?: boolean; inputPlaceholder?: string; @@ -41,6 +46,7 @@ const Chat: React.FC = ({ disableInput = false, disableCommands = false, noChat = false, + classNames = {}, }) => { const inputRef = useRef(null); const [inputValue, _setInputValue] = useState(''); @@ -153,7 +159,7 @@ const Chat: React.FC = ({ ) : ( <> {showAssistantName && scriptDisplayName && ( -
+

{scriptDisplayName ?? ''}

@@ -165,7 +171,7 @@ const Chat: React.FC = ({
)} -
+
= ({ )} -
+
{showForm && hasParams ? (