Skip to content

Commit d857aae

Browse files
committed
Replace DynamicAgentService with validateAgents function
1 parent 2c95530 commit d857aae

File tree

8 files changed

+1180
-1132
lines changed

8 files changed

+1180
-1132
lines changed

backend/src/templates/agent-registry.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { dynamicAgentService } from '@codebuff/common/templates/dynamic-agent-service'
1+
import { validateAgents } from '@codebuff/common/templates/agent-validation'
22

33
import { agentTemplates as staticTemplates } from './agent-list'
44
import { logger } from '../util/logger'
55

6-
import type { DynamicAgentValidationError } from '@codebuff/common/templates/dynamic-agent-service'
6+
import type { DynamicAgentValidationError } from '@codebuff/common/templates/agent-validation'
77
import type { AgentTemplate } from '@codebuff/common/types/agent-template'
88
import type { ProjectFileContext } from '@codebuff/common/util/file'
99

@@ -17,9 +17,9 @@ export async function getAllAgentTemplates({
1717
agentRegistry: AgentRegistry
1818
validationErrors: DynamicAgentValidationError[]
1919
}> {
20-
// Load dynamic agents using the service
21-
const { templates: dynamicTemplates, validationErrors } =
22-
await dynamicAgentService.loadAgents(fileContext.agentTemplates || {})
20+
const { templates: dynamicTemplates, validationErrors } = validateAgents(
21+
fileContext.agentTemplates || {},
22+
)
2323

2424
// Combine static and dynamic templates
2525
const agentRegistry = { ...staticTemplates, ...dynamicTemplates }

0 commit comments

Comments
 (0)