מה עושה api.addSaveableUserOptionField?

כמעט ואין תיעוד בנושא זה, ולקובץ ה-API של התוסף אין הערה המסבירה את השימוש בפונקציה זו. בנוסף, המקום היחיד שבו אני יכול לראות אותה בשימוש הוא בתוספים, לא בליבה. אז מה בדיוק עושה api.addSaveableUserOptionField()? האם נדרשת תצורה נוספת לשימוש בה?

I don’t know, but here’s what I think I found out.

But first–My question is why do you care? Is there something you’re trying to do? But maybe if you’re trying to create a plugin that has user options, this is how to to do it. It’s not used in core since it’s a hook especially for plugins to be able to have their own user options.

Looks like it’s used in the Chat plugin like here:

Looks like if your plugin has user options then you use this to establish that it’s a user option with the UserUpdater.

כן, אני מתכנן שיהיה לי הגדרת משתמש בתוסף. ראיתי בעבר ש-Chat ו-IIRC AI השתמשו בפונקציה זו כדי להוסיף הגדרות משתמש, אז תהיתי אם יש דרך מתועדת לעשות זאת.

לייק 1