const db=new Dexie("LeadsAgentDB");db.version(1).stores({chats:"chatId, userId, createdAt, updatedAt, title",messages:"id, chatId, timestamp, type, role",leads:"++id, chatId, placeID, email, phone, website, _enrichedAt"}),db.version(2).stores({chats:"chatId, userId, createdAt, updatedAt, title",messages:"id, chatId, timestamp, type, role",leads:"++id, chatId, placeID, email, phone, website, _enrichedAt",emails:"email, chatId, extractedAt"}),db.version(3).stores({chats:"chatId, userId, createdAt, updatedAt, title",messages:"id, chatId, timestamp, type, role",leads:"++id, chatId, placeID, email, phone, website, _enrichedAt",emails:"email, chatId, extractedAt",artifacts:"artifactId, chatId, createdAt, name"}),window.agentDb=db;