MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / NewExtractionController

Function NewExtractionController

agent/memory_extraction.go:65–71  ·  view source on GitHub ↗
(cfg config.Config, baseRegistry *coretools.ToolRegistry, extractionConfig ...ExtractionConfig)

Source from the content-addressed store, hash-verified

63 }
64 return &ExtractionController{Config: cfg, ExtractionConfig: ec}
65}
66
67func (c *ExtractionController) ShouldExtract(state *AgentState) bool {
68 return state != nil && c.Config.LongTermMemoryEnabled && isFabricMemoryBackend(c.Config) &&
69 c.Engine != nil && state.MemoryExtractionCursor < len(state.Messages)
70}
71
72func (c *ExtractionController) Schedule(_ context.Context, state *AgentState, _ string) bool {
73 if !c.ShouldExtract(state) {
74 return false

Calls 1

DefaultExtractionConfigFunction · 0.85