feat(plugin): add saas plugin under agent

This commit is contained in:
lijunwen.gigoo
2025-10-13 11:14:56 +08:00
parent 7a3492af3a
commit 45591e5ed0

View File

@ -22,6 +22,7 @@ import (
"strings"
"time"
"github.com/coze-dev/coze-studio/backend/api/model/app/bot_common"
productCommon "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_common"
productAPI "github.com/coze-dev/coze-studio/backend/api/model/marketplace/product_public_api"
pluginAPI "github.com/coze-dev/coze-studio/backend/api/model/plugin_develop"
@ -327,7 +328,12 @@ func convertPluginToProductInfo(plugin *entity.PluginInfo) *productAPI.ProductIn
Description: plugin.GetDesc(),
IconURL: plugin.GetIconURI(),
ListedAt: plugin.CreatedAt,
EntityType: productCommon.ProductEntityType_Plugin,
EntityType: func() productCommon.ProductEntityType {
if ptr.From(plugin.Source) == bot_common.PluginSource_FromSaas {
return productCommon.ProductEntityType_SaasPlugin
}
return productCommon.ProductEntityType_Plugin
}(),
IsOfficial: true,
Status: productCommon.ProductStatus_Listed,
UserInfo: &productCommon.UserInfo{