@restnfeel/agentc-starter-kit
Version:
한국어 기업용 CMS 모듈 - Task Master AI와 함께 빠르게 웹사이트를 구현할 수 있는 재사용 가능한 컴포넌트 시스템
59 lines • 1.79 kB
TypeScript
import { ReactNode } from "react";
export interface Message {
id: string;
content: string;
sender: "user" | "ai";
timestamp: Date;
type?: "text" | "error" | "system";
isStreaming?: boolean;
}
export interface ModalState {
isOpen: boolean;
isMinimized: boolean;
position: {
x: number;
y: number;
};
size: {
width: string;
height: string;
};
zIndex: number;
}
export interface ChatSession {
id: string;
messages: Message[];
createdAt: Date;
lastActivity: Date;
title?: string;
}
export interface ModalStateContextType {
modalState: ModalState;
openModal: () => void;
closeModal: () => void;
minimizeModal: () => void;
maximizeModal: () => void;
setModalPosition: (x: number, y: number) => void;
setModalSize: (width: string, height: string) => void;
bringToFront: () => void;
currentSession: ChatSession | null;
sessions: ChatSession[];
createSession: (title?: string) => string;
switchSession: (sessionId: string) => void;
deleteSession: (sessionId: string) => void;
addMessage: (message: Omit<Message, "id" | "timestamp">) => void;
clearCurrentSession: () => void;
saveToStorage: () => void;
loadFromStorage: () => void;
clearStorage: () => void;
}
export declare function useModalState(): ModalStateContextType;
interface ModalStateProviderProps {
children: ReactNode;
persistToStorage?: boolean;
maxSessions?: number;
sessionTimeout?: number;
}
export declare function ModalStateProvider({ children, persistToStorage, maxSessions, sessionTimeout, }: ModalStateProviderProps): import("react/jsx-runtime").JSX.Element;
export default ModalStateProvider;
//# sourceMappingURL=modal-state-context.d.ts.map