refactor(workflow): Move domain resources events into the application layer (#729)

This commit is contained in:
Ryo
2025-08-13 21:06:56 +08:00
committed by GitHub
parent 8c3ae99643
commit 5d98e8ef93
47 changed files with 661 additions and 761 deletions

View File

@@ -26,7 +26,7 @@ import (
"github.com/cloudwego/eino/compose"
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo"
"github.com/coze-dev/coze-studio/backend/domain/workflow/internal/execute"
"github.com/coze-dev/coze-studio/backend/domain/workflow/internal/nodes"
@@ -413,7 +413,7 @@ func isDebugExecute(ctx context.Context) bool {
if execCtx == nil {
panic(fmt.Errorf("unable to get exe context"))
}
return execCtx.RootCtx.ExeCfg.Mode == plugin.ExecuteModeDebug || execCtx.RootCtx.ExeCfg.Mode == plugin.ExecuteModeNodeDebug
return execCtx.RootCtx.ExeCfg.Mode == workflowModel.ExecuteModeDebug || execCtx.RootCtx.ExeCfg.Mode == workflowModel.ExecuteModeNodeDebug
}
func getExecUserID(ctx context.Context) string {

View File

@@ -25,7 +25,7 @@ import (
"go.uber.org/mock/gomock"
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database"
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/database/databasemock"
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo"
@@ -72,10 +72,10 @@ func TestCustomSQL_Execute(t *testing.T) {
defer mockey.Mock(execute.GetExeCtx).Return(&execute.Context{
RootCtx: execute.RootCtx{
ExeCfg: plugin.ExecuteConfig{
Mode: plugin.ExecuteModeDebug,
ExeCfg: workflowModel.ExecuteConfig{
Mode: workflowModel.ExecuteModeDebug,
Operator: 123,
BizType: plugin.BizTypeWorkflow,
BizType: workflowModel.BizTypeWorkflow,
},
},
}).Build().UnPatch()

View File

@@ -27,7 +27,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/database"
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/plugin"
workflowModel "github.com/coze-dev/coze-studio/backend/api/model/crossdomain/workflow"
crossdatabase "github.com/coze-dev/coze-studio/backend/crossdomain/contract/database"
"github.com/coze-dev/coze-studio/backend/crossdomain/contract/database/databasemock"
"github.com/coze-dev/coze-studio/backend/domain/workflow/entity/vo"
@@ -57,10 +57,10 @@ func (m *mockDsSelect) Query() func(ctx context.Context, request *database.Query
func TestDataset_Query(t *testing.T) {
defer mockey.Mock(execute.GetExeCtx).Return(&execute.Context{
RootCtx: execute.RootCtx{
ExeCfg: plugin.ExecuteConfig{
Mode: plugin.ExecuteModeDebug,
ExeCfg: workflowModel.ExecuteConfig{
Mode: workflowModel.ExecuteModeDebug,
Operator: 123,
BizType: plugin.BizTypeWorkflow,
BizType: workflowModel.BizTypeWorkflow,
},
},
}).Build().UnPatch()