77import { AnalyticsEvent } from '@codebuff/common/constants/analytics-events'
88import db from '@codebuff/common/db/index'
99import * as schema from '@codebuff/common/db/schema'
10- import { formatValidationErrorMessage } from '@codebuff/common/util/agent-template-validation'
1110import { buildArray } from '@codebuff/common/util/array'
1211import { ensureEndsWithNewline } from '@codebuff/common/util/file'
1312import { generateCompactId } from '@codebuff/common/util/string'
@@ -296,25 +295,6 @@ const onInit = async (
296295 return
297296 }
298297
299- // Assemble local agent templates from fileContext
300- const { agentTemplates, validationErrors } =
301- assembleLocalAgentTemplates ( fileContext )
302-
303- if ( validationErrors . length > 0 ) {
304- logger . warn (
305- { errorCount : validationErrors . length } ,
306- 'Agent template validation errors found' ,
307- )
308- }
309-
310- const errorMessage = formatValidationErrorMessage ( validationErrors )
311-
312- // Get all agent names for frontend
313- const allAgentNames : Record < string , string > = { }
314- for ( const [ id , template ] of Object . entries ( agentTemplates ) ) {
315- allAgentNames [ id ] = template . displayName
316- }
317-
318298 // Send combined init and usage response
319299 const usageResponse = await genUsageResponse (
320300 fingerprintId ,
@@ -324,10 +304,6 @@ const onInit = async (
324304 sendAction ( ws , {
325305 ...usageResponse ,
326306 type : 'init-response' ,
327- message : errorMessage
328- ? `**Agent Template Validation Errors:**\n${ errorMessage } `
329- : undefined ,
330- agentNames : allAgentNames ,
331307 } )
332308 } )
333309}
0 commit comments