nsarrazin HF staff commited on
Commit
f2c9036
1 Parent(s): 8a3914c

🐛 Fix - Model switching no longer enables data sharing

Browse files
src/routes/settings/+page.server.ts CHANGED
@@ -13,8 +13,10 @@ export const actions = {
13
  const { ethicsModalAccepted, ...settings } = z
14
  .object({
15
  shareConversationsWithModelAuthors: z
16
- .boolean({ coerce: true })
17
- .default(DEFAULT_SETTINGS.shareConversationsWithModelAuthors),
 
 
18
  ethicsModalAccepted: z.boolean({ coerce: true }).optional(),
19
  activeModel: validateModel(models),
20
  customPrompts: z.record(z.string()).default({}),
 
13
  const { ethicsModalAccepted, ...settings } = z
14
  .object({
15
  shareConversationsWithModelAuthors: z
16
+ .union([z.literal("true"), z.literal("on"), z.literal("false"), z.null()])
17
+ .transform((value) => {
18
+ return value === "true" || value === "on";
19
+ }),
20
  ethicsModalAccepted: z.boolean({ coerce: true }).optional(),
21
  activeModel: validateModel(models),
22
  customPrompts: z.record(z.string()).default({}),