refactor: split backend into standalone server project

Remove embedded frontend and workflow editor assets, add standalone API deployment configuration, and retain the current backend service updates.
This commit is contained in:
t
2026-08-20 21:46:55 +08:00
parent 954a3fe8d9
commit 3d47227fbd
612 changed files with 515 additions and 97334 deletions
@@ -44,6 +44,19 @@ func TestUpdateAIAgentKeepsPublishedRevisionActive(t *testing.T) {
if err := db.Create(config).Error; err != nil {
t.Fatalf("create ai config: %v", err)
}
createdModel, err := AIAgentService.buildAIAgentModel(0, request.CreateAIAgentRequest{
Name: "fixed ai reception agent",
AIConfigID: config.ID,
ServiceMode: enums.IMConversationServiceModeHumanOnly,
HandoffMode: enums.AIAgentHandoffModeWaitPool,
FallbackMode: enums.AIAgentFallbackModeNoAnswer,
})
if err != nil {
t.Fatalf("build ai agent model: %v", err)
}
if createdModel.ServiceMode != enums.IMConversationServiceModeAIFirst {
t.Fatalf("service mode = %d, want AI first", createdModel.ServiceMode)
}
agent := &models.AIAgent{
Name: "published agent", Status: enums.StatusOk, AIConfigID: config.ID,
ServiceMode: enums.IMConversationServiceModeAIFirst, HandoffMode: enums.AIAgentHandoffModeWaitPool,