feat: Phase 6.1 收尾 — 目的路由接入所有AI组件

- Orchestrator 现在接受独立的 chatAdapter 和 intentAdapter
- BackgroundThinker 使用 deep_thinking purpose 适配器
- MemoryExtractor 使用 memory_extraction purpose 适配器
- Synthesizer 使用 chat purpose 适配器
- .env 回退时所有适配器共享同一 provider,完全向后兼容

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 22:19:57 +08:00
parent b1e89c606e
commit 313f41633a
2 changed files with 30 additions and 17 deletions
@@ -70,11 +70,13 @@ func (o *Orchestrator) getBus() bus.Bus {
return o.eventBus
}
// NewOrchestrator 创建编排器
// NewOrchestrator 创建编排器
// chatAdapter 用于对话生成 (PurposeChat)intentAdapter 用于意图分析 (PurposeIntentAnalysis)。
func NewOrchestrator(
personaLoader *persona.Loader,
contextBuilder *ctxbuild.Builder,
llmAdapter *llm.Adapter,
chatAdapter *llm.Adapter,
intentAdapter *llm.Adapter,
subManager *subsession.Manager,
memoryRetriever *memory.Retriever,
memoryExtractor *memory.Extractor,
@@ -82,10 +84,10 @@ func NewOrchestrator(
return &Orchestrator{
personaLoader: personaLoader,
contextBuilder: contextBuilder,
llmAdapter: llmAdapter,
llmAdapter: chatAdapter,
subManager: subManager,
intentAnalyzer: NewIntentAnalyzer(llmAdapter),
synthesizer: NewSynthesizer(llmAdapter),
intentAnalyzer: NewIntentAnalyzer(intentAdapter),
synthesizer: NewSynthesizer(chatAdapter),
memoryRetriever: memoryRetriever,
memoryExtractor: memoryExtractor,
}