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 Chat Component to Remove Unused Prop
Salman-Ahamed0e04700b0454
diff --git a/packages/app/src/react/features/ai-chat/components/chat.tsx b/packages/app/src/react/features/ai-chat/components/chat.tsxindex 9faf42b3..9295afe8 100644--- a/packages/app/src/react/features/ai-chat/components/chat.tsx+++ b/packages/app/src/react/features/ai-chat/components/chat.tsx@@ -12,7 +12,6 @@ import '../styles/index.css';interface IChatProps extends IChatMessage {scrollToBottom?: () => void; // Callback to scroll chat to bottom- showCopyButton?: boolean; // Control copy button visibility for SystemMessage}/**@@ -23,16 +22,7 @@ interface IChatProps extends IChatMessage {* @returns Appropriate message component*/export const Chat: FC<IChatProps> = (props) => {- const {- type,- files,- avatar,- message,- onRetryClick,- thinkingMessage,- scrollToBottom,- showCopyButton,- } = props;+ const { type, files, avatar, message, onRetryClick, thinkingMessage, scrollToBottom } = props;switch (type) {case 'loading':@@ -50,26 +40,11 @@ export const Chat: FC<IChatProps> = (props) => {thinkingMessage={thinkingMessage}onTypingComplete={() => scrollToBottom?.()}onTypingProgress={() => scrollToBottom?.()}- showCopyButton={showCopyButton}/>);case 'error':- return (- <SystemMessage- isError- message={message}- onRetryClick={onRetryClick}- showCopyButton={showCopyButton}- />- );+ return <SystemMessage isError message={message} onRetryClick={onRetryClick} />;default:- return (- <SystemMessage- isError- message="Something went wrong!"- onRetryClick={onRetryClick}- showCopyButton={showCopyButton}- />- );+ return <SystemMessage isError message="Something went wrong!" onRetryClick={onRetryClick} />;}};