Deploy to VPS / deploy (push) Failing after 1m45s
- Implemented AppHeader component with theme toggle and connection status. - Created AppSidebar component for navigation with connection status indicator. - Added MobileNav component for mobile navigation with responsive design. - Introduced shared components: DetailStat, EmptyState, ErrorState, LoadingSkeleton, and StatCard for consistent UI. - Developed hooks for async data fetching: useAsync, useConfig, useDashboard, useGuilds, useMedia, useMessages, useRecordings, and useVoice. - Added chatbot API functions for sending messages and managing chat history.
12 lines
389 B
TypeScript
12 lines
389 B
TypeScript
import type { ChatbotResponse, ChatHistoryMessage } from "@/lib/types";
|
|
import { api } from "./client";
|
|
|
|
export const chatbotApi = {
|
|
send: (message: string) =>
|
|
api.post<ChatbotResponse>("/api/mascot/chat", { message }),
|
|
|
|
getHistory: () => api.get<ChatHistoryMessage[]>("/api/mascot/chat/history"),
|
|
|
|
clearHistory: () => api.delete<{ ok: boolean }>("/api/mascot/chat/history"),
|
|
};
|