From 16a8982f8edd8d9f19ce357ff66988cfea6b898a Mon Sep 17 00:00:00 2001 From: Emir Karabeg Date: Sat, 8 Feb 2025 14:52:21 -0800 Subject: [PATCH] Renamed to chat instead of aichat --- app/w/components/chat/chat.tsx | 4 ++-- stores/chat/store.ts | 4 ++-- stores/chat/types.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/w/components/chat/chat.tsx b/app/w/components/chat/chat.tsx index f132f88b4b..7587d1ecab 100644 --- a/app/w/components/chat/chat.tsx +++ b/app/w/components/chat/chat.tsx @@ -5,10 +5,10 @@ import { MessageCircle, Send, X } from 'lucide-react' import { Button } from '@/components/ui/button' import { Input } from '@/components/ui/input' import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip' -import { useAIChatStore } from '@/stores/chat/store' +import { useChatStore } from '@/stores/chat/store' export function Chat() { - const { messages, isProcessing, error, sendMessage } = useAIChatStore() + const { messages, isProcessing, error, sendMessage } = useChatStore() const [isOpen, setIsOpen] = useState(false) const [message, setMessage] = useState('') diff --git a/stores/chat/store.ts b/stores/chat/store.ts index ddc1c0e786..440afca01c 100644 --- a/stores/chat/store.ts +++ b/stores/chat/store.ts @@ -2,10 +2,10 @@ import { create } from 'zustand' import { devtools } from 'zustand/middleware' import { useWorkflowStore } from '../workflow/store' import { useEnvironmentStore } from '../environment/store' -import { AIChatStore, ChatMessage } from './types' +import { ChatStore, ChatMessage } from './types' import { getNextBlockNumber } from './utils' -export const useAIChatStore = create()( +export const useChatStore = create()( devtools( (set, get) => ({ messages: [], diff --git a/stores/chat/types.ts b/stores/chat/types.ts index cb13d73947..62e17a7813 100644 --- a/stores/chat/types.ts +++ b/stores/chat/types.ts @@ -5,16 +5,16 @@ export interface ChatMessage { timestamp: number } -export interface AIChatState { +export interface ChatState { messages: ChatMessage[] isProcessing: boolean error: string | null } -export interface AIChatActions { +export interface ChatActions { sendMessage: (content: string) => Promise clearChat: () => void setError: (error: string | null) => void } -export type AIChatStore = AIChatState & AIChatActions \ No newline at end of file +export type ChatStore = ChatState & ChatActions \ No newline at end of file