feat: 添加工作流取消与临时文件管理功能

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

View File

@@ -11,7 +11,6 @@ type CreateSkillTemplateReq struct {
Name string `json:"name"`
Description string `json:"description"`
Category string `json:"category"`
FileName string `json:"fileName"`
FileUrl string `json:"fileUrl"`
}
@@ -20,12 +19,30 @@ type CreateSkillTemplateRes struct {
Id int64 `json:"id,string"`
}
type UpdateSkillTemplateReq struct {
g.Meta `path:"/update" method:"put" tags:"Skill技能管理" summary:"修改Skill用户技能" dc:"修改Skill用户技能"`
Id int64 `json:"id" v:"required#ID不能为空"`
Name string `json:"name"`
Description string `json:"description"`
FileName string `json:"fileName"`
FileUrl string `json:"fileUrl"`
}
type DeleteSkillTemplateReq struct {
g.Meta `path:"/delete" method:"delete" tags:"Skill技能管理" summary:"删除Skill技能" dc:"删除Skill技能"`
Id int64 `json:"id" v:"required#ID不能为空"`
}
type GetSkillTemplateReq struct {
g.Meta `path:"/get" method:"get" tags:"Skill技能管理" summary:"Skill技能详情" dc:"Skill技能详情"`
Id int64 `json:"id"`
Name string `json:"name"`
NotInId int64 `json:"notInId"`
}
type ListSkillTemplateReq struct {
g.Meta `path:"/list" method:"get" tags:"Skill技能管理" summary:"Skill技能列表" dc:"Skill技能列表"`
@@ -42,7 +59,6 @@ type SkillTemplateVO struct {
Id int64 `json:"id,string" dc:"id"`
Name string `json:"name"`
Description string `json:"description"`
Category string `json:"category"`
FileName string `json:"fileName"`
FileUrl string `json:"fileUrl"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`

View File

@@ -11,7 +11,6 @@ type CreateSkillUserReq struct {
Name string `json:"name"`
Description string `json:"description"`
Category string `json:"category"`
FileName string `json:"fileName"`
FileUrl string `json:"fileUrl"`
}
@@ -20,12 +19,40 @@ type CreateSkillUserRes struct {
Id int64 `json:"id,string"`
}
type UpdateSkillUserReq struct {
g.Meta `path:"/update" method:"put" tags:"Skill用户技能管理" summary:"修改Skill用户技能" dc:"修改Skill用户技能"`
Id int64 `json:"id" v:"required#ID不能为空"`
Name string `json:"name"`
Description string `json:"description"`
FileName string `json:"fileName"`
FileUrl string `json:"fileUrl"`
}
type DeleteSkillUserReq struct {
g.Meta `path:"/delete" method:"delete" tags:"Skill用户技能管理" summary:"删除Skill用户技能" dc:"删除Skill用户技能"`
Id int64 `json:"id" v:"required#ID不能为空"`
}
type GetSkillUserReq struct {
g.Meta `path:"/get" method:"get" tags:"Skill用户技能管理" summary:"Skill用户技能详情" dc:"Skill用户技能详情"`
Id int64 `json:"id"`
Name string `json:"name"`
Creator string `json:"creator"`
NotInId int64 `json:"notInId"`
}
type GetSkillReq struct {
g.Meta `path:"/getUserOrTemplate" method:"get" tags:"Skill用户技能管理" summary:"Skill技能详情" dc:"Skill技能详情"`
Id int64 `json:"id"`
Name string `json:"name"`
Creator string `json:"creator"`
NotInId int64 `json:"notInId"`
}
type ListSkillReq struct {
g.Meta `path:"/list" method:"get" tags:"Skill用户技能管理" summary:"Skill用户技能列表" dc:"Skill用户技能列表"`
@@ -48,12 +75,12 @@ type ListSkillUserRes struct {
}
type SkillUserVO struct {
Id int64 `json:"id,string" dc:"id"`
Name string `json:"name"`
Description string `json:"description"`
Category string `json:"category"`
FileName string `json:"fileName"`
FileUrl string `json:"fileUrl"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
Id int64 `json:"id,string" dc:"id"`
Name string `json:"name"`
Description string `json:"description"`
FileName string `json:"fileName"`
FileUrl string `json:"fileUrl"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
ImgAddressPrefix string `json:"imgAddressPrefix"`
}