Skip to content

Commit 0427165

Browse files
adhitShetclaude
authored andcommitted
fix: update misleading comment in orderProfilesByMode to reflect both sort criteria
Comment now accurately describes that sorting is by type preference (oauth > token > api_key) then by lastUsed oldest-first for round-robin within type. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 9112170 commit 0427165

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/agents/auth-profiles/order.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function orderProfilesByMode(order: string[], store: AuthProfileStore): string[]
144144
}
145145
}
146146

147-
// Sort available profiles by lastUsed (oldest first = round-robin)
147+
// Sort available profiles by type preference, then by lastUsed (oldest first = round-robin within type)
148148
const scored = available.map((profileId) => {
149149
const type = store.profiles[profileId]?.type;
150150
const typeScore = type === "oauth" ? 0 : type === "token" ? 1 : type === "api_key" ? 2 : 3;

0 commit comments

Comments
 (0)