fix(agent): wire memory persistence in Message component (Go runtime) (#17256)

This commit is contained in:
euvre
2026-07-23 11:37:59 +08:00
committed by GitHub
parent b095a5511a
commit 7b29fc10ca
4 changed files with 221 additions and 22 deletions

View File

@@ -49,7 +49,7 @@ import (
"github.com/gin-gonic/gin"
"go.uber.org/zap"
_ "ragflow/internal/agent/component"
"ragflow/internal/agent/component"
"ragflow/internal/common"
"ragflow/internal/dao"
"ragflow/internal/engine"
@@ -705,6 +705,10 @@ func startServer(config *server.Config) {
mcpService := service.NewMCPService()
modelProviderService := service.NewModelProviderService()
// Wire the real MemorySaver so the Message component can persist
// conversation turns to memory stores declared in the canvas DSL.
component.SetMemorySaver(service.NewMemorySaverAdapter(memoryService))
// Initialize doc engine for skill search
docEngine := engine.Get()
documentDAO := dao.NewDocumentDAO()