fix(agents): remove duplicate category override application in general-agents
This commit is contained in:
@@ -5,7 +5,7 @@ import type { BrowserAutomationProvider } from "../../config/schema"
|
|||||||
import type { AvailableAgent } from "../dynamic-agent-prompt-builder"
|
import type { AvailableAgent } from "../dynamic-agent-prompt-builder"
|
||||||
import { AGENT_MODEL_REQUIREMENTS, isModelAvailable } from "../../shared"
|
import { AGENT_MODEL_REQUIREMENTS, isModelAvailable } from "../../shared"
|
||||||
import { buildAgent, isFactory } from "../agent-builder"
|
import { buildAgent, isFactory } from "../agent-builder"
|
||||||
import { applyCategoryOverride, applyOverrides } from "./agent-overrides"
|
import { applyOverrides } from "./agent-overrides"
|
||||||
import { applyEnvironmentContext } from "./environment-context"
|
import { applyEnvironmentContext } from "./environment-context"
|
||||||
import { applyModelResolution } from "./model-resolution"
|
import { applyModelResolution } from "./model-resolution"
|
||||||
|
|
||||||
@@ -79,12 +79,6 @@ export function collectPendingBuiltinAgents(input: {
|
|||||||
config = { ...config, variant: resolvedVariant }
|
config = { ...config, variant: resolvedVariant }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expand override.category into concrete properties (higher priority than factory/resolved)
|
|
||||||
const overrideCategory = (override as Record<string, unknown> | undefined)?.category as string | undefined
|
|
||||||
if (overrideCategory) {
|
|
||||||
config = applyCategoryOverride(config, overrideCategory, mergedCategories)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (agentName === "librarian") {
|
if (agentName === "librarian") {
|
||||||
config = applyEnvironmentContext(config, directory)
|
config = applyEnvironmentContext(config, directory)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user