Переглянути джерело

chore: rename mcp handle func name (#265)

zijiren 6 місяців тому
батько
коміт
815ffac7d4

+ 1 - 1
core/controller/mcp/groupmcp-server.go

@@ -188,7 +188,7 @@ func GroupMCPStreamable(c *gin.Context) {
 		return
 	}
 
-	handleGroupSSEStreamable(c, groupMcp)
+	handleGroupStreamable(c, groupMcp)
 }
 
 // handleGroupProxyStreamable processes Streamable proxy requests for group

+ 2 - 2
core/controller/mcp/host.go

@@ -170,7 +170,7 @@ func HostMCPStreamable(c *gin.Context) {
 			))
 			return
 		}
-		handlePublicSSEStreamable(c, publicMcp)
+		handlePublicStreamable(c, publicMcp)
 	}, func(c *gin.Context, mcpID string) {
 		group := middleware.GetGroup(c)
 
@@ -192,6 +192,6 @@ func HostMCPStreamable(c *gin.Context) {
 			return
 		}
 
-		handleGroupSSEStreamable(c, groupMcp)
+		handleGroupStreamable(c, groupMcp)
 	})
 }

+ 1 - 1
core/controller/mcp/mcp.go

@@ -169,7 +169,7 @@ func handleGroupSSEMessage(c *gin.Context, mcpType model.GroupMCPType, sessionID
 	}
 }
 
-func handleGroupSSEStreamable(c *gin.Context, groupMcp *model.GroupMCPCache) {
+func handleGroupStreamable(c *gin.Context, groupMcp *model.GroupMCPCache) {
 	switch groupMcp.Type {
 	case model.GroupMCPTypeProxyStreamable:
 		handleGroupProxyStreamable(c, groupMcp.ProxyConfig)

+ 2 - 2
core/controller/mcp/publicmcp-server.go

@@ -241,10 +241,10 @@ func PublicMCPStreamable(c *gin.Context) {
 		return
 	}
 
-	handlePublicSSEStreamable(c, publicMcp)
+	handlePublicStreamable(c, publicMcp)
 }
 
-func handlePublicSSEStreamable(c *gin.Context, publicMcp *model.PublicMCPCache) {
+func handlePublicStreamable(c *gin.Context, publicMcp *model.PublicMCPCache) {
 	switch publicMcp.Type {
 	case model.PublicMCPTypeProxySSE:
 		client, err := transport.NewSSE(