(model, systemPrompt, mcpMode)
| 205 | |
| 206 | // Create a new chat |
| 207 | function createNewChat(model, systemPrompt, mcpMode) { |
| 208 | if (!window.Alpine || !Alpine.store("chat")) { |
| 209 | return null; |
| 210 | } |
| 211 | |
| 212 | const chatStore = Alpine.store("chat"); |
| 213 | const chat = chatStore.createChat(model, systemPrompt, mcpMode); |
| 214 | |
| 215 | // Save to storage |
| 216 | saveChatsToStorage(); |
| 217 | |
| 218 | // Update UI to reflect new active chat |
| 219 | updateUIForActiveChat(); |
| 220 | |
| 221 | return chat; |
| 222 | } |
| 223 | |
| 224 | // Switch to a different chat |
| 225 | function switchChat(chatId) { |
nothing calls this directly
no test coverage detected