Merge pull request #22994 from overleaf/jdt-diasble-assist

Add a toggle to hide all AI features on a users account

GitOrigin-RevId: 978b02609c40f3975daa267aa6c10ac49e13d6f3
This commit is contained in:
Jimmy Domagala-Tang
2025-01-28 09:05:27 +00:00
committed by Copybot
parent e228b77c14
commit 0baaed6cdf
11 changed files with 81 additions and 14 deletions
@@ -0,0 +1,28 @@
import { db } from '../app/src/infrastructure/mongodb.js'
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
async function main() {
// update all applicable user models
await batchedUpdate(
db.users,
{
'writefull.enabled': false,
},
{
$set: {
'aiErrorAssistant.enabled': false,
},
}
)
console.log('completed syncing writefull state with error assist')
}
export default main
try {
await main()
process.exit(0)
} catch (error) {
console.error({ error })
process.exit(1)
}