|
|
|
@ -23,6 +23,7 @@ import ( |
|
|
|
|
|
|
|
|
|
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/agentrun" |
|
|
|
|
"github.com/coze-dev/coze-studio/backend/api/model/crossdomain/singleagent" |
|
|
|
|
"github.com/coze-dev/coze-studio/backend/api/model/playground" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
// Requests and responses must not reference domain entities and can only use models under api/model/crossdomain.
|
|
|
|
@ -59,3 +60,60 @@ func DefaultSVC() SingleAgent { |
|
|
|
|
func SetDefaultSVC(svc SingleAgent) { |
|
|
|
|
defaultSVC = svc |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type ShortcutCommandComponentType string |
|
|
|
|
|
|
|
|
|
const ( |
|
|
|
|
ShortcutCommandComponentTypeText ShortcutCommandComponentType = "text" |
|
|
|
|
ShortcutCommandComponentTypeSelect ShortcutCommandComponentType = "select" |
|
|
|
|
ShortcutCommandComponentTypeFile ShortcutCommandComponentType = "file" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var ShortcutCommandComponentTypeMapping = map[playground.InputType]ShortcutCommandComponentType{ |
|
|
|
|
playground.InputType_TextInput: ShortcutCommandComponentTypeText, |
|
|
|
|
playground.InputType_Select: ShortcutCommandComponentTypeSelect, |
|
|
|
|
playground.InputType_MixUpload: ShortcutCommandComponentTypeFile, |
|
|
|
|
playground.InputType_UploadImage: ShortcutCommandComponentTypeFile, |
|
|
|
|
playground.InputType_UploadDoc: ShortcutCommandComponentTypeFile, |
|
|
|
|
playground.InputType_UploadTable: ShortcutCommandComponentTypeFile, |
|
|
|
|
playground.InputType_UploadAudio: ShortcutCommandComponentTypeFile, |
|
|
|
|
playground.InputType_VIDEO: ShortcutCommandComponentTypeFile, |
|
|
|
|
playground.InputType_ARCHIVE: ShortcutCommandComponentTypeFile, |
|
|
|
|
playground.InputType_CODE: ShortcutCommandComponentTypeFile, |
|
|
|
|
playground.InputType_TXT: ShortcutCommandComponentTypeFile, |
|
|
|
|
playground.InputType_PPT: ShortcutCommandComponentTypeFile, |
|
|
|
|
} |
|
|
|
|
type ShortcutCommandComponentFileType string |
|
|
|
|
|
|
|
|
|
const ( |
|
|
|
|
ShortcutCommandComponentFileTypeImage ShortcutCommandComponentFileType = "image" |
|
|
|
|
ShortcutCommandComponentFileTypeDoc ShortcutCommandComponentFileType = "doc" |
|
|
|
|
ShortcutCommandComponentFileTypeTable ShortcutCommandComponentFileType = "table" |
|
|
|
|
ShortcutCommandComponentFileTypeAudio ShortcutCommandComponentFileType = "audio" |
|
|
|
|
ShortcutCommandComponentFileTypeVideo ShortcutCommandComponentFileType = "video" |
|
|
|
|
ShortcutCommandComponentFileTypeZip ShortcutCommandComponentFileType = "zip" |
|
|
|
|
ShortcutCommandComponentFileTypeCode ShortcutCommandComponentFileType = "code" |
|
|
|
|
ShortcutCommandComponentFileTypeTxt ShortcutCommandComponentFileType = "txt" |
|
|
|
|
ShortcutCommandComponentFileTypePPT ShortcutCommandComponentFileType = "ppt" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
var ShortcutCommandComponentFileTypeMapping = map[playground.InputType]ShortcutCommandComponentFileType{ |
|
|
|
|
playground.InputType_UploadImage: ShortcutCommandComponentFileTypeImage, |
|
|
|
|
playground.InputType_UploadDoc: ShortcutCommandComponentFileTypeDoc, |
|
|
|
|
playground.InputType_UploadTable: ShortcutCommandComponentFileTypeTable, |
|
|
|
|
playground.InputType_UploadAudio: ShortcutCommandComponentFileTypeAudio, |
|
|
|
|
playground.InputType_VIDEO: ShortcutCommandComponentFileTypeVideo, |
|
|
|
|
playground.InputType_ARCHIVE: ShortcutCommandComponentFileTypeZip, |
|
|
|
|
playground.InputType_CODE: ShortcutCommandComponentFileTypeCode, |
|
|
|
|
playground.InputType_TXT: ShortcutCommandComponentFileTypeTxt, |
|
|
|
|
playground.InputType_PPT: ShortcutCommandComponentFileTypePPT, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type ShortcutCommandToolType string |
|
|
|
|
|
|
|
|
|
const ( |
|
|
|
|
ShortcutCommandToolTypeWorkflow ShortcutCommandToolType = "workflow" |
|
|
|
|
ShortcutCommandToolTypePlugin ShortcutCommandToolType = "plugin" |
|
|
|
|
) |
|
|
|
|