Skip to content

Commit f2c9036

Browse files
committed
🐛 Fix - Model switching no longer enables data sharing
1 parent 8a3914c commit f2c9036

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/routes/settings/+page.server.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ export const actions = {
1313
const { ethicsModalAccepted, ...settings } = z
1414
.object({
1515
shareConversationsWithModelAuthors: z
16-
.boolean({ coerce: true })
17-
.default(DEFAULT_SETTINGS.shareConversationsWithModelAuthors),
16+
.union([z.literal("true"), z.literal("on"), z.literal("false"), z.null()])
17+
.transform((value) => {
18+
return value === "true" || value === "on";
19+
}),
1820
ethicsModalAccepted: z.boolean({ coerce: true }).optional(),
1921
activeModel: validateModel(models),
2022
customPrompts: z.record(z.string()).default({}),

0 commit comments

Comments
 (0)