Skip to content

Commit 5df6ad7

Browse files
fix: rearanged default agent order
1 parent f754531 commit 5df6ad7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

api/models/Agent.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,16 @@ const getListAgents = async (searchParameter) => {
445445
agent.author = agent.author.toString();
446446
}
447447
return agent;
448+
}).sort((a, b) => {
449+
// Prioritize "Eve - Automation Expert" agent first
450+
const isAEve = a.name?.toLowerCase().includes('eve') && a.name?.toLowerCase().includes('automation');
451+
const isBEve = b.name?.toLowerCase().includes('eve') && b.name?.toLowerCase().includes('automation');
452+
453+
if (isAEve && !isBEve) return -1;
454+
if (!isAEve && isBEve) return 1;
455+
456+
// For other agents, maintain original order (no change)
457+
return 0;
448458
});
449459

450460
const hasMore = agents.length > 0;

0 commit comments

Comments
 (0)