ollama / components /Chatbar /Chatbar.context.tsx
rippanteq7's picture
Upload folder using huggingface_hub
bbef364 verified
raw
history blame
702 Bytes
import { Dispatch, createContext } from 'react';
import { ActionType } from '@/hooks/useCreateReducer';
import { Conversation } from '@/types/chat';
import { SupportedExportFormats } from '@/types/export';
import { ChatbarInitialState } from './Chatbar.state';
export interface ChatbarContextProps {
state: ChatbarInitialState;
dispatch: Dispatch<ActionType<ChatbarInitialState>>;
handleDeleteConversation: (conversation: Conversation) => void;
handleClearConversations: () => void;
handleExportData: () => void;
handleImportConversations: (data: SupportedExportFormats) => void;
}
const ChatbarContext = createContext<ChatbarContextProps>(undefined!);
export default ChatbarContext;