refactor(agents): remove unused createSisyphusJuniorAgent function
Remove dead code that was never called anywhere in the codebase. Also removes the unused CategoryConfig import. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
parent
c6fb0c701b
commit
8cad7ccf91
@ -1,6 +1,6 @@
|
|||||||
import type { AgentConfig } from "@opencode-ai/sdk"
|
import type { AgentConfig } from "@opencode-ai/sdk"
|
||||||
import { isGptModel } from "./types"
|
import { isGptModel } from "./types"
|
||||||
import type { AgentOverrideConfig, CategoryConfig } from "../config/schema"
|
import type { AgentOverrideConfig } from "../config/schema"
|
||||||
import {
|
import {
|
||||||
createAgentToolRestrictions,
|
createAgentToolRestrictions,
|
||||||
type PermissionValue,
|
type PermissionValue,
|
||||||
@ -132,64 +132,3 @@ export function createSisyphusJuniorAgentWithOverrides(
|
|||||||
thinking: { type: "enabled", budgetTokens: 32000 },
|
thinking: { type: "enabled", budgetTokens: 32000 },
|
||||||
} as AgentConfig
|
} as AgentConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createSisyphusJuniorAgent(
|
|
||||||
categoryConfig: CategoryConfig,
|
|
||||||
promptAppend?: string
|
|
||||||
): AgentConfig {
|
|
||||||
const prompt = buildSisyphusJuniorPrompt(promptAppend)
|
|
||||||
const model = categoryConfig.model
|
|
||||||
const baseRestrictions = createAgentToolRestrictions(BLOCKED_TOOLS)
|
|
||||||
const categoryPermission = categoryConfig.tools
|
|
||||||
? Object.fromEntries(
|
|
||||||
Object.entries(categoryConfig.tools).map(([k, v]) => [
|
|
||||||
k,
|
|
||||||
v ? ("allow" as const) : ("deny" as const),
|
|
||||||
])
|
|
||||||
)
|
|
||||||
: {}
|
|
||||||
const mergedPermission = {
|
|
||||||
...categoryPermission,
|
|
||||||
...baseRestrictions.permission,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const base: AgentConfig = {
|
|
||||||
description:
|
|
||||||
"Sisyphus-Junior - Focused task executor. Same discipline, no delegation.",
|
|
||||||
mode: "subagent" as const,
|
|
||||||
model,
|
|
||||||
maxTokens: categoryConfig.maxTokens ?? 64000,
|
|
||||||
prompt,
|
|
||||||
color: "#20B2AA",
|
|
||||||
permission: mergedPermission,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (categoryConfig.temperature !== undefined) {
|
|
||||||
base.temperature = categoryConfig.temperature
|
|
||||||
}
|
|
||||||
if (categoryConfig.top_p !== undefined) {
|
|
||||||
base.top_p = categoryConfig.top_p
|
|
||||||
}
|
|
||||||
|
|
||||||
if (categoryConfig.thinking) {
|
|
||||||
return { ...base, thinking: categoryConfig.thinking } as AgentConfig
|
|
||||||
}
|
|
||||||
|
|
||||||
if (categoryConfig.reasoningEffort) {
|
|
||||||
return {
|
|
||||||
...base,
|
|
||||||
reasoningEffort: categoryConfig.reasoningEffort,
|
|
||||||
textVerbosity: categoryConfig.textVerbosity,
|
|
||||||
} as AgentConfig
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isGptModel(model)) {
|
|
||||||
return { ...base, reasoningEffort: "medium" } as AgentConfig
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
...base,
|
|
||||||
thinking: { type: "enabled", budgetTokens: 32000 },
|
|
||||||
} as AgentConfig
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user