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 Context for Enhanced Type Consistency
Salman-Ahamedc35709e937d1
diff --git a/packages/app/src/react/features/ai-chat/contexts/index.tsx b/packages/app/src/react/features/ai-chat/contexts/index.tsxindex 2f40a481..688c7680 100644--- a/packages/app/src/react/features/ai-chat/contexts/index.tsx+++ b/packages/app/src/react/features/ai-chat/contexts/index.tsx@@ -1,9 +1,9 @@/* eslint-disable no-unused-vars */-import { FileWithMetadata, IChatMessage } from '../types/chat.types';+import { IChatMessage, IMessageFile } from '@react/features/ai-chat';import { ChangeEvent, createContext, FC, PropsWithChildren, useContext } from 'react';interface ChatContextType {- files: FileWithMetadata[];+ files: IMessageFile[];uploadingFiles: Set<string>;isUploadInProgress: boolean;isMaxFilesUploaded: boolean;@@ -21,7 +21,7 @@ interface ChatContextType {isInputProcessing: boolean;messagesHistory: IChatMessage[];- sendMessage: (query: string, files?: FileWithMetadata[]) => void;+ sendMessage: (query: string, files?: IMessageFile[]) => void;retryLastMessage: () => void;stopGenerating: () => void;clearChatSession: () => Promise<void>;