feat: replace Claude with GPT for AI chat integration
- Replace ClaudeAdapter with GPTAdapter using OpenAI GPT (gpt-5-mini) - Implement function calling for calendar operations (getDay, proposeCreate/Update/Delete, searchEvents) - Add provider-agnostic AI utilities in ai/utils/ (systemPrompt, toolDefinitions, toolExecutor, eventFormatter) - Add USE_TEST_RESPONSES env var to toggle between real AI and test responses - Switch ChatService.processMessage to use real AI provider - Add npm run format command for Prettier - Update CLAUDE.md with new architecture
This commit is contained in:
@@ -13,7 +13,11 @@ import Header from "../../components/Header";
|
||||
import BaseBackground from "../../components/BaseBackground";
|
||||
import { FlashList } from "@shopify/flash-list";
|
||||
import { ChatService } from "../../services";
|
||||
import { useChatStore, chatMessageToMessageData, MessageData } from "../../stores";
|
||||
import {
|
||||
useChatStore,
|
||||
chatMessageToMessageData,
|
||||
MessageData,
|
||||
} from "../../stores";
|
||||
import { ProposedEventChange } from "@caldav/shared";
|
||||
import { ProposedEventCard } from "../../components/ProposedEventCard";
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ interface ChatState {
|
||||
export const useChatStore = create<ChatState>((set) => ({
|
||||
messages: [],
|
||||
addMessages(messages) {
|
||||
set((state) => ({messages: [...state.messages, ...messages]}))
|
||||
set((state) => ({ messages: [...state.messages, ...messages] }));
|
||||
},
|
||||
addMessage: (message: MessageData) => {
|
||||
set((state) => ({ messages: [...state.messages, message] }));
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
export { useAuthStore } from "./AuthStore";
|
||||
export { useChatStore, chatMessageToMessageData, type MessageData } from "./ChatStore";
|
||||
export {
|
||||
useChatStore,
|
||||
chatMessageToMessageData,
|
||||
type MessageData,
|
||||
} from "./ChatStore";
|
||||
export { useEventsStore } from "./EventsStore";
|
||||
|
||||
Reference in New Issue
Block a user