Skip to content

Commit 0dd157c

Browse files
committed
Refactor agent bot handling: remove sync evolution bot functionality and implement agent bot repository
1 parent 3d51590 commit 0dd157c

10 files changed

Lines changed: 194 additions & 482 deletions

File tree

cmd/api/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ func main() {
9292
customToolModule.Service,
9393
customMcpServerModule.Service,
9494
folderShareModule.Service,
95-
cfg.Evolution.BaseURL,
9695
)
9796

9897
// Initialize handlers

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func Load() (*Config, error) {
100100
ConnMaxIdleTime: LoadEnvOrDefault("DB_CONN_MAX_IDLE_TIME", "30m"), // 30 minutes
101101
},
102102
Evolution: EvolutionConfig{
103-
BaseURL: LoadEnvOrPanic("EVOLUTION_BASE_URL"),
103+
BaseURL: LoadEnvOrDefault("EVOLUTION_BASE_URL", ""),
104104
},
105105
EvoAuth: EvoAuthConfig{
106106
BaseURL: LoadEnvOrPanic("EVO_AUTH_BASE_URL"),

pkg/agent/client/evolution/client.go

Lines changed: 0 additions & 311 deletions
This file was deleted.

pkg/agent/handler/agent_handler.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ type AgentHandler interface {
3131
Delete(c *gin.Context)
3232
ImportAgents(c *gin.Context)
3333
ListAgentsByFolderID(c *gin.Context)
34-
SyncEvolutionBot(c *gin.Context)
3534
GetSharedAgent(c *gin.Context)
3635
GetShareAgent(c *gin.Context)
3736
AssignFolder(c *gin.Context)
@@ -109,11 +108,6 @@ func (h *agentHandler) RegisterRoutesMiddleware(router gin.IRouter) {
109108
agentAccessMiddleware,
110109
h.Delete)
111110

112-
// Sync permissions
113-
agents.POST("/:id/sync-evolution",
114-
permissionMiddleware.RequirePermission("ai_agents", "sync"),
115-
agentAccessMiddleware,
116-
h.SyncEvolutionBot)
117111
}
118112

119113
folders := router.Group("/agents/folders")

pkg/agent/handler/sync_evolution_handler.go

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)