refactor(workflow): Move the variable component in the Workflow package into the common crossdomain package (#738)

This commit is contained in:
Ryo
2025-08-14 10:41:14 +08:00
committed by GitHub
parent 5d98e8ef93
commit dce313b8e3
16 changed files with 60 additions and 78 deletions

View File

@@ -25,7 +25,6 @@ import (
"github.com/coze-dev/coze-studio/backend/application/internal"
"github.com/coze-dev/coze-studio/backend/crossdomain/impl/code"
"github.com/coze-dev/coze-studio/backend/crossdomain/workflow/variable"
knowledge "github.com/coze-dev/coze-studio/backend/domain/knowledge/service"
dbservice "github.com/coze-dev/coze-studio/backend/domain/memory/database/service"
variables "github.com/coze-dev/coze-studio/backend/domain/memory/variables/service"
@@ -33,7 +32,6 @@ import (
search "github.com/coze-dev/coze-studio/backend/domain/search/service"
"github.com/coze-dev/coze-studio/backend/domain/workflow"
crossvariable "github.com/coze-dev/coze-studio/backend/domain/workflow/crossdomain/variable"
"github.com/coze-dev/coze-studio/backend/domain/workflow/service"
workflowservice "github.com/coze-dev/coze-studio/backend/domain/workflow/service"
"github.com/coze-dev/coze-studio/backend/infra/contract/cache"
@@ -75,8 +73,7 @@ func InitService(ctx context.Context, components *ServiceComponents) (*Applicati
workflow.SetRepository(workflowRepo)
workflowDomainSVC := service.NewWorkflowService(workflowRepo)
crossvariable.SetVariableHandler(variable.NewVariableHandler(components.VariablesDomainSVC))
crossvariable.SetVariablesMetaGetter(variable.NewVariablesMetaGetter(components.VariablesDomainSVC))
code.SetCodeRunner(components.CodeRunner)
callbacks.AppendGlobalHandlers(workflowservice.GetTokenCallbackHandler())
setEventBus(components.DomainNotifier)