diff --git a/.doc/system-design/module-boundaries.yaml b/.doc/system-design/module-boundaries.yaml index 1a25ace9..9ff33724 100644 --- a/.doc/system-design/module-boundaries.yaml +++ b/.doc/system-design/module-boundaries.yaml @@ -29,7 +29,7 @@ imports: - workflowdef chat: - app/chatflow - - bizdev + - app/stageflow - coordinator - ctxmgr - docgov diff --git a/internal/chat/action_executor.go b/internal/chat/action_executor.go index d0cd15f9..d98c4e33 100644 --- a/internal/chat/action_executor.go +++ b/internal/chat/action_executor.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "chat-agent-system/internal/bizdev" + "chat-agent-system/internal/app/stageflow" "chat-agent-system/internal/coordinator" "chat-agent-system/internal/docgov" "chat-agent-system/internal/taskrun" @@ -16,7 +16,6 @@ import ( // ActionServices 对话层执行 PendingAction 所需的后端服务。 type ActionServices struct { DocGov *docgov.GovernanceEngine - Bizdev bizdev.BizdevService TaskRuns *taskrun.Manager } @@ -95,7 +94,7 @@ func (s *Session) executeAction(ctx context.Context, action *coordinator.Pending return &ActionExecResult{DocState: string(doc.CurrentState), Message: "驳回完成"}, nil case "taskrun.resume", "taskrun.restart": - if s.Actions.TaskRuns == nil || s.Actions.Bizdev == nil { + if s.Actions.TaskRuns == nil { return nil, fmt.Errorf("task run services not available") } taskKey := action.TaskKey @@ -107,7 +106,7 @@ func (s *Session) executeAction(ctx context.Context, action *coordinator.Pending if action.Kind == "taskrun.resume" { resumeDir = action.WorkDir } - taskReq := bizdev.TaskRunRequest{ + taskReq := stageflow.TaskRunRequest{ TaskKey: taskKey, ProjectName: userCtx.Project.Name, UserID: uid, @@ -122,7 +121,7 @@ func (s *Session) executeAction(ctx context.Context, action *coordinator.Pending TaskKey: taskKey, Status: "running", } - created, err := s.Actions.TaskRuns.CreateAndStart(ctx, runID, record, taskReq, bizdev.StageRunRequest{}, resumeDir) + created, err := s.Actions.TaskRuns.CreateAndStart(ctx, runID, record, taskReq, stageflow.StageRunRequest{}, resumeDir) if err != nil { return nil, err } diff --git a/internal/server/server.go b/internal/server/server.go index 8c56f188..68570335 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -500,13 +500,10 @@ func (s *Server) getOrCreateSession( sess := chat.NewSession(sessionID, userCtx, s.rec, s.engine) sess.ChatLog = s.chatLog - if s.svc != nil { - sess.CtxMgr = s.ctxMgr - sess.Actions = &chat.ActionServices{ - DocGov: s.gov, - Bizdev: s.svc, - TaskRuns: s.taskRuns, - } + sess.CtxMgr = s.ctxMgr + sess.Actions = &chat.ActionServices{ + DocGov: s.gov, + TaskRuns: s.taskRuns, } // 若从持久层恢复了会话历史,回填消息列表、事实黑板与近期对话 (G3)。