Wanted to get the personas sorted as I have different descriptions for some personas and it would be nicer to have them grouped together.
With some AI assistance, I got a code that seems to work fine.
Replace line 46 with the below 7 lines of code. (1st line is the same as line 46, used as reference where to paste)
|
const userAvatars = await getUserAvatars(false); |
const userAvatars = await getUserAvatars(false);
userAvatars.sort((a, b) => {
const nameA = (power_user.personas[a] || a).toLowerCase();
const nameB = (power_user.personas[b] || b).toLowerCase();
return nameA.localeCompare(nameB);
});
Wanted to get the personas sorted as I have different descriptions for some personas and it would be nicer to have them grouped together.
With some AI assistance, I got a code that seems to work fine.
Replace line 46 with the below 7 lines of code. (1st line is the same as line 46, used as reference where to paste)
Extension-QuickPersona/index.js
Line 46 in 5509fb6