# 「AI検索の発見」設定の切り替えが機能しない

**URL:** https://meta.discourse.org/t/toggling-the-ai-search-discoveries-preference-doesnt-work/391135
**Category:** Bug
**Tags:** ai
**Created:** [2025 年 12 月 12 日午前 9:57 UTC](https://meta.discourse.org/t/toggling-the-ai-search-discoveries-preference-doesnt-work/391135 "2025-12-12T09:57:29Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2025 年 12 月 12 日午後 2:44 UTC](https://meta.discourse.org/t/toggling-the-ai-search-discoveries-preference-doesnt-work/391135/7 "2025-12-12T14:44:44Z")

</div>

> [@david](#):
>
> コアに新しい valueTransformer を導入するのが最善でしょう

これはどうでしょうか？

> <https://github.com/discourse/discourse/pull/36658/commits/e3a16f952b7283a4365adc1b097d6960e40c93d7>
>
> Previously, plugins needed to use \`modifyClass\` to extend the
> \`saveAttrNames\` li…st in preference controllers. This approach is
> not ideal as it overrides controller methods and can be fragile.
> 
> This commit introduces a \`preferences-save-attributes\` value
> transformer that provides a supported way for plugins to add
> custom fields to any preference page's save list.
> 
> The transformer passes a \`page\` context parameter so plugins can
> target specific preference pages:
> 
> \`\`\`javascript
> api.registerValueTransformer(
> "preferences-save-attributes",
> ({ value: attrs, context }) =\> {
> if (context.page === "interface") {
> attrs.push("my\_custom\_field");
> }
> return attrs;
> }
> );
> 
> Available pages: account, emails, interface, navigation-menu,
> notifications, profile, tags, tracking, users.

---

_[View the full topic](https://meta.discourse.org/t/toggling-the-ai-search-discoveries-preference-doesnt-work/391135)._
