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 AI Chat Codebase by Removing Deprecated Exports and Styles
Salman-Ahamedc097e091fc63
diff --git a/packages/app/src/react/features/ai-chat/components/common/index.ts b/packages/app/src/react/features/ai-chat/components/common/index.tsindex 598aaf83..e5bd1508 100644--- a/packages/app/src/react/features/ai-chat/components/common/index.ts+++ b/packages/app/src/react/features/ai-chat/components/common/index.ts@@ -1,3 +1,2 @@-export * from './file-item-preview';export * from './FileItemPreview';export * from './icons';diff --git a/packages/app/src/react/features/ai-chat/styles/index.css b/packages/app/src/react/features/ai-chat/styles/index.cssindex 8b89c434..c1121d74 100644--- a/packages/app/src/react/features/ai-chat/styles/index.css+++ b/packages/app/src/react/features/ai-chat/styles/index.css@@ -1,20 +1,3 @@-.type-effect:after {- content: ' ';- animation: blink 200ms linear infinite alternate;- border-left: 2px solid #444;- margin-left: 1px;-}--@keyframes blink {- 0% {- opacity: 0.2;- }-- 100% {- opacity: 1;- }-}-.type-writer-text {white-space: nowrap;position: relative;@@ -38,11 +21,6 @@animation: type-write-scroll infinite linear;}-.type-writer-scroll {- width: 100%;- display: flex;- overflow: hidden;-}@keyframes type-write-scroll {0% {@@ -52,48 +30,4 @@100% {left: calc(-100% + var(--my-scroll-var) - 10px);}-}--/* agent-chat-style scrollbar */-.scrollbar-hide::-webkit-scrollbar {- width: 8px;-}--.scrollbar-hide::-webkit-scrollbar-track {- background-color: #f1f1f1;-}--.scrollbar-hide::-webkit-scrollbar-thumb {- background-color: rgb(162, 158, 159);- border-radius: 5px;- box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);-}--.scrollbar-hide {- scrollbar-width: thin;- scrollbar-color: rgb(162, 158, 159) #f1f1f1;-}--.conversation-title {- display: -webkit-box;- -webkit-line-clamp: 1;- -webkit-box-orient: vertical;- display: flex;-}--.query-input {- display: block;- width: 100%;- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;- cursor: text;-}--.query-input:empty::before {- content: attr(data-placeholder);- display: block;- height: 100%;- color: #777;- font-size: 14px;- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;- font-weight: 300;}\ No newline at end of filediff --git a/packages/app/src/react/features/ai-chat/types/chat.ts b/packages/app/src/react/features/ai-chat/types/chat.tsindex 644be80e..01fafa7e 100644--- a/packages/app/src/react/features/ai-chat/types/chat.ts+++ b/packages/app/src/react/features/ai-chat/types/chat.ts@@ -138,44 +138,6 @@ export interface IAPIConfig {retry?: { attempts: number; delay: number };}-// ============================================================================-// SCROLL TYPES-// ============================================================================--export type TScrollBehavior = 'smooth' | 'auto' | 'instant';-export type TScrollLogicalPosition = 'start' | 'center' | 'end' | 'nearest';--export interface IScrollOptions {- behavior?: TScrollBehavior;- force?: boolean;- delay?: number;-}--export interface IScrollToElementOptions {- behavior?: TScrollBehavior;- block?: TScrollLogicalPosition;- inline?: TScrollLogicalPosition;-}--export interface IScrollPosition {- scrollTop: number;- scrollHeight: number;- clientHeight: number;- distanceFromBottom: number;- isNearBottom: boolean;-}--// ============================================================================-// DEBUG TYPES-// ============================================================================--export interface IDebugInfo {- content?: string | string[];- metaMessages?: IMetaMessages;- timestamp?: number;- updatedAt: number;-}-// ============================================================================// HOOK RETURN TYPES// ============================================================================@@ -229,17 +191,3 @@ export interface IFileUpload {setToast: (message: string) => void;setErrorMessage: (message: string) => void;}--export interface IScroll {- toBottom: (smooth?: boolean) => void;- smartToBottom: (smooth?: boolean) => void;-}--export interface IDragOptions {- onDrop: (files: File[]) => void | Promise<void>;-}--export interface IDragState {- isDragging: boolean;- dropRef: RefObject<HTMLDivElement | null>;-}diff --git a/packages/app/src/react/features/ai-chat/types/chat.types.ts b/packages/app/src/react/features/ai-chat/types/chat.types.tsindex 0a2bfa61..a5ed554e 100644--- a/packages/app/src/react/features/ai-chat/types/chat.types.ts+++ b/packages/app/src/react/features/ai-chat/types/chat.types.ts@@ -16,32 +16,10 @@ export type IChildren = { children: React.ReactNode };*/export type TMessageType = 'user' | 'system' | 'debug' | 'loading' | 'error' | 'meta';-/**- * Core chat message interface- *- * Design principles:- * - Type-based discrimination - `type` is single source of truth- * - No redundant boolean flags (isReplying, isRetrying, isError)- * - Minimal required fields- * - Optional fields for specific use cases- */-export interface IChatMessage {- id?: string | number; // Unique identifier- turnId?: string; // Conversation Turn ID- message: string; // Message content- type: TMessageType; // Message type - single source of truth for state- files?: IMessageFile[]; // Attached files (user messages only)- avatar?: string; // Avatar URL for system/AI messages- metaMessages?: IMetaMessages; // Full meta messages object for thinking component- onRetryClick?: () => void; // Retry callback for error messages- timestamp?: number; // Message timestamp (optional, for future use)-}-/*** File attachment structure* Simplified from previous complex nested structure*/-export interface IMessageFile {id: string; // Required ID for React keys and trackingfile: File; // The actual File object@@ -149,25 +127,6 @@ export interface IChatError {isAborted?: boolean; // User-initiated abort flag}-// ============================================================================-// HOOK INTERFACES-// ============================================================================--/**- * Chat hook return type- */-export interface IUseChatReturn {- // State- messages: IChatMessage[];- isStreaming: boolean;-- // Actions- sendMessage: (message: string, files?: File[] | IMessageFile[]) => Promise<void>;- retryMessage: () => Promise<void>;- stopStreaming: () => void;- clearMessages: () => void;-}-// ============================================================================// API CLIENT TYPES// ============================================================================@@ -181,4 +140,3 @@ export interface IAPIConfig {timeout?: number; // Request timeoutretry?: { attempts: number; delay: number }; // Retry configuration}-