Merge pull request #4020 from scw1109/fix/default-agent-sort-order
fix: respect default_agent in sort shim ordering
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
normalizeAgentForPromptKey,
|
||||
} from "../shared/agent-display-names";
|
||||
import { AGENT_NAME_MAP } from "../shared/migration";
|
||||
import { setDefaultAgentForSort } from "../shared/agent-sort-shim";
|
||||
import { registerAgentName } from "../features/claude-code-session-state";
|
||||
import {
|
||||
discoverConfigSourceSkills,
|
||||
@@ -399,6 +400,12 @@ export async function applyAgentConfig(params: {
|
||||
);
|
||||
}
|
||||
|
||||
if (configuredDefaultAgent) {
|
||||
setDefaultAgentForSort(
|
||||
(params.config as { default_agent?: string }).default_agent ?? configuredDefaultAgent,
|
||||
);
|
||||
}
|
||||
|
||||
const agentResult = params.config.agent as Record<string, unknown>;
|
||||
for (const name of Object.keys(agentResult)) {
|
||||
registerAgentName(name);
|
||||
|
||||
Reference in New Issue
Block a user