| 15 | }; |
| 16 | |
| 17 | interface ConversationState { |
| 18 | getState: () => ConversationState; |
| 19 | conversationList: Conversation[]; |
| 20 | currentConversationId?: Id; |
| 21 | createConversation: (connectionId?: Id, databaseName?: string) => Conversation; |
| 22 | setCurrentConversationId: (conversationId: Id | undefined) => void; |
| 23 | getConversationById: (conversationId: Id | undefined) => Conversation | undefined; |
| 24 | updateConversation: (conversationId: Id, conversation: Partial<Conversation>) => void; |
| 25 | clearConversation: (filter: (conversation: Conversation) => boolean) => void; |
| 26 | updateSelectedTablesNameList: (selectedTableNameList: string[]) => void; |
| 27 | updateSelectedSchemaName: (selectedSchemaName: string) => void; |
| 28 | } |
| 29 | |
| 30 | export const useConversationStore = create<ConversationState>()( |
| 31 | persist( |
nothing calls this directly
no outgoing calls
no test coverage detected