Files
ai-agent/workflow/model/dto/file/file_temp_dto.go
qhd b1ee117f6c feat: 添加工作流取消与临时文件管理功能
- 新增临时文件(FileTemp)的实体、DAO和DTO,支持文件临时存储与批量操作
- 实现工作流执行取消功能,使用sync.Map管理context.CancelFunc,支持按会话取消运行中的流程
- 将流程执行状态"暂停"变更为"取消",并处理取消导致的错误
- 引入IsDialogue标识区分对话模式,调整判断/文案/图片节点的表单数据组装逻辑
- 重构ComposeMessagesReq,使用BuildType替代IsBuild和ModelTypeId
- 优化HTML内容提取逻辑,修复文案纯文本与图片URL的标签过滤及标签命名
- 在结果汇总节点中使用事务更新执行状态并批量保存输出文件记录
2026-05-15 09:37:23 +08:00

46 lines
1.3 KiB
Go

package file
import (
"gitea.com/red-future/common/beans"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
type CreateFileTempReq struct {
g.Meta `path:"/create" method:"post" tags:"临时文件管理" summary:"创建临时文件" dc:"创建临时文件"`
BusinessId string `json:"businessId"`
FileUrl string `json:"fileUrl"`
}
type CreateFileTempRes struct {
Id int64 `json:"id,string"`
}
type DeleteFileTempReq struct {
g.Meta `path:"/delete" method:"delete" tags:"临时文件管理" summary:"删除临时文件" dc:"删除临时文件"`
Id int64 `json:"id" v:"required#ID不能为空"`
}
type ListFileTempReq struct {
g.Meta `path:"/list" method:"get" tags:"临时文件管理" summary:"临时文件列表" dc:"临时文件列表"`
Page *beans.Page `json:"page"`
BusinessId string `json:"businessId"`
CreatedAt *gtime.Time `json:"createdAt"`
}
type ListFileTempRes struct {
List []*FileTempVO `json:"list"`
Total int `json:"total"`
}
type FileTempVO struct {
Id int64 `json:"id,string" dc:"id"`
BusinessId string `json:"businessId"`
FileUrl string `json:"fileUrl"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
}