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 Import Statements in AI Chat Hooks to Use Type Definitions
Salman-Ahamed5d63e985f3dc
diff --git a/packages/app/src/react/features/ai-chat/hooks/use-agent-chat-context.ts b/packages/app/src/react/features/ai-chat/hooks/use-agent-chat-context.tsindex 8f16eb2a..6b12cccc 100644--- a/packages/app/src/react/features/ai-chat/hooks/use-agent-chat-context.ts+++ b/packages/app/src/react/features/ai-chat/hooks/use-agent-chat-context.ts@@ -9,7 +9,6 @@import { useCallback, useEffect, useRef } from 'react';import { useNavigate } from 'react-router-dom';-import { IChatMessage, IMessageFile } from '@react/features/ai-chat';import {useAgentSettings,useCreateChatMutation,@@ -17,6 +16,7 @@ import {useUpdateAgentSettingsMutation,} from '@react/features/ai-chat/hooks';import { useChat } from '@react/features/ai-chat/hooks/use-chat';+import { IChatMessage, IMessageFile } from '@react/features/ai-chat/types/chat.types';import { useAgent } from '@react/shared/hooks/agent';import { Observability } from '@shared/observability';import { EVENTS } from '@shared/posthog/constants/events';diff --git a/packages/app/src/react/features/ai-chat/hooks/use-chat-actions.ts b/packages/app/src/react/features/ai-chat/hooks/use-chat-actions.tsindex fd1ccf0d..28fb5e30 100644--- a/packages/app/src/react/features/ai-chat/hooks/use-chat-actions.ts+++ b/packages/app/src/react/features/ai-chat/hooks/use-chat-actions.ts@@ -1,7 +1,7 @@import { useCallback, useRef, useState } from 'react';-import { IChatMessage, IMessageFile } from '@react/features/ai-chat';import { CHAT_ERROR_MESSAGE } from '@react/features/ai-chat/constants';+import { IChatMessage, IMessageFile } from '@react/features/ai-chat/types/chat.types';import { chatUtils } from '@react/features/ai-chat/utils';interface UseChatActionsProps {diff --git a/packages/app/src/react/features/ai-chat/hooks/use-chat-stream.ts b/packages/app/src/react/features/ai-chat/hooks/use-chat-stream.tsindex 692be12d..58d178eb 100644--- a/packages/app/src/react/features/ai-chat/hooks/use-chat-stream.ts+++ b/packages/app/src/react/features/ai-chat/hooks/use-chat-stream.ts@@ -3,8 +3,12 @@* Provides clean interface for streaming chat responses with lifecycle management*/-import { IChatError, IStreamCallbacks, IStreamConfig } from '@react/features/ai-chat';import { ChatAPIClient } from '@react/features/ai-chat/clients/chat-api.client';+import {+ IChatError,+ IStreamCallbacks,+ IStreamConfig,+} from '@react/features/ai-chat/types/chat.types';import { useCallback, useRef, useState } from 'react';/**diff --git a/packages/app/src/react/features/ai-chat/hooks/use-chat.ts b/packages/app/src/react/features/ai-chat/hooks/use-chat.tsindex 206a6803..04a5311d 100644--- a/packages/app/src/react/features/ai-chat/hooks/use-chat.ts+++ b/packages/app/src/react/features/ai-chat/hooks/use-chat.ts@@ -11,7 +11,7 @@ import {IMessageFile,IUseChatReturn,TThinkingType,-} from '@react/features/ai-chat';+} from '@react/features/ai-chat/types/chat.types';import { useCallback, useRef, useState } from 'react';import { ChatAPIClient } from '../clients/chat-api.client';import { useChatStream } from './use-chat-stream';diff --git a/packages/app/src/react/features/ai-chat/hooks/use-fileupload.ts b/packages/app/src/react/features/ai-chat/hooks/use-fileupload.tsindex c5c7ee3b..cb9b450f 100644--- a/packages/app/src/react/features/ai-chat/hooks/use-fileupload.ts+++ b/packages/app/src/react/features/ai-chat/hooks/use-fileupload.ts@@ -1,7 +1,7 @@/* eslint-disable no-unused-vars */import { ChangeEvent, useCallback, useEffect, useState } from 'react';-import { IMessageFile } from '@react/features/ai-chat';+import { IMessageFile } from '@react/features/ai-chat/types/chat.types';import {createFileMetadata,deleteFile,