Skip to content

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.

Refactor Footer Component for Improved Prop Naming and Clarity

Salman-Ahamed52a940ad3235
diff --git a/packages/app/src/react/features/ai-chat/components/footer.tsx b/packages/app/src/react/features/ai-chat/components/footer.tsx
index bc15b7df..5cf4e064 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;
- ref: RefObject<ChatInputRef>;
+ chatInputRef: RefObject<ChatInputRef>;
submitDisabled: boolean;
showScrollButton: boolean;
scrollToBottom: (smooth?: boolean) => void; // eslint-disable-line no-unused-vars
@@ -20,14 +20,21 @@ const CHAT_WARNING_INFO =
"SmythOS can make mistakes, always check your work. We don't store chat history, save important work."; // eslint-disable-line quotes
export const Footer: FC<FooterProps> = (props) => {
- const { ref, uploadError, clearError, submitDisabled, showScrollButton, scrollToBottom } = props;
+ const {
+ chatInputRef,
+ 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={ref} submitDisabled={submitDisabled} />
+ <ChatInput ref={chatInputRef} submitDisabled={submitDisabled} />
</div>
<WarningInfo infoMessage={CHAT_WARNING_INFO} />
</div>