构造函数
constructor
-
new AgentService( dataDir: string, config?: Partial<AgentConfig>, llmConfig?: LLMConfig, sharedLLMService?: LLMService, sharedToolRegistry?: ToolRegistry,): AgentService
参数
- dataDir: string
可选config: Partial<AgentConfig>
可选llmConfig: LLMConfig
可选sharedLLMService: LLMService
可选sharedToolRegistry: ToolRegistry
方法
setLLMConfig
-
setLLMConfig(config: LLMConfig): void
返回 void
setPrompts
-
setPrompts(prompts: Partial<AgentPrompts> | null): void
参数
- prompts: Partial<AgentPrompts> | null
返回 void
setProjectRoot
-
setProjectRoot(root: string): void
返回 void
getProjectRoot
-
返回 string
getProjectContext
-
getProjectContext(): ProjectContext | null
返回 ProjectContext | null
getConfig
-
updateConfig
-
返回 void
initAgents
-
plan
-
plan( description: string, options?: { seedTest?: string; prdPath?: string; outputDir?: string },): Promise<AgentResult<TestPlan>>
参数
- description: string
可选options: { seedTest?: string; prdPath?: string; outputDir?: string }
generate
-
generate( planPath: string, options?: { outputDir?: string; seedTest?: string },): Promise<AgentResult<string[]>>
参数
- planPath: string
可选options: { outputDir?: string; seedTest?: string }
heal
-
heal( testFilePath: string, options?: { runId?: string; testId?: string; error?: string; stackTrace?: string; },): Promise<AgentResult<AgentHealResult>>
参数
- testFilePath: string
可选options: { runId?: string; testId?: string; error?: string; stackTrace?: string }
parseMarkdownPlan
-
parseMarkdownPlan(filePath: string): TestPlan | null
createSessionContext
-
createSessionContext(): AgentSessionContext
返回 AgentSessionContext
AgentService — 向后兼容类。 新代码请使用 UnifiedAIService。