SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
Refactor Footer component to replace chatInputRef with a more generic ref prop, enhancing flexibility in component usage.
Salman-Ahamed7bad278eef7a
diff --git a/packages/app/src/react/features/ai-chat/components/footer.tsx b/packages/app/src/react/features/ai-chat/components/footer.tsxindex d601afbf..bc15b7df 100644--- a/packages/app/src/react/features/ai-chat/components/footer.tsx+++ b/packages/app/src/react/features/ai-chat/components/footer.tsx@@ -10,7 +10,7 @@ import { FC, RefObject } from 'react';interface FooterProps {uploadError: { show: boolean; message: string };clearError: () => void;- chatInputRef: RefObject<ChatInputRef>;+ ref: RefObject<ChatInputRef>;submitDisabled: boolean;showScrollButton: boolean;scrollToBottom: (smooth?: boolean) => void; // eslint-disable-line no-unused-vars@@ -20,21 +20,14 @@ const CHAT_WARNING_INFO ="SmythOS can make mistakes, always check your work. We don't store chat history, save important work."; // eslint-disable-line quotesexport const Footer: FC<FooterProps> = (props) => {- const {- uploadError,- clearError,- chatInputRef,- submitDisabled,- showScrollButton,- scrollToBottom,- } = props;+ const { ref, uploadError, clearError, submitDisabled, showScrollButton, scrollToBottom } = props;return (<div className="w-full max-w-4xl">{uploadError.show && <ErrorToast message={uploadError.message} onClose={clearError} />}<div className="relative">{showScrollButton && <ScrollToBottomButton onClick={() => scrollToBottom(true)} />}- <ChatInput ref={chatInputRef} submitDisabled={submitDisabled} />+ <ChatInput ref={ref} submitDisabled={submitDisabled} /></div><WarningInfo infoMessage={CHAT_WARNING_INFO} /></div>